cash_flow.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div id="flow">
  3. <el-card v-for="(i, index) in list" :key="`flow-${index}`" style="margin: 10px">
  4. <template #header>
  5. <el-row type="flex" :gutter="10" justify="space-between">
  6. <el-col :span="8">{{ getStep(i) }}</el-col>
  7. <el-col :span="5">{{ getTime(i) }}</el-col>
  8. </el-row>
  9. </template>
  10. 意见:
  11. <p>{{ i.desc }}</p>
  12. </el-card>
  13. </div>
  14. </template>
  15. <script>
  16. const { cashStatus } = require('@common/dict/couindex');
  17. const moment = require('moment');
  18. import { mapState, createNamespacedHelpers } from 'vuex';
  19. export default {
  20. name: 'flow',
  21. props: { list: { type: Array } },
  22. components: {},
  23. data: function () {
  24. return {
  25. status: cashStatus,
  26. };
  27. },
  28. created() {},
  29. methods: {
  30. getStep(data) {
  31. const { status } = data;
  32. const r = this.status.find((f) => f.value === status);
  33. if (r) return r.label;
  34. else return '未知步骤';
  35. },
  36. getTime(data) {
  37. return moment(_.get(data, 'desc_time')).format('YYYY-MM-DD HH:mm:ss');
  38. },
  39. },
  40. computed: {
  41. ...mapState(['user', 'menuParams']),
  42. pageTitle() {
  43. return `${this.$route.meta.title}`;
  44. },
  45. },
  46. metaInfo() {
  47. return { title: this.$route.meta.title };
  48. },
  49. };
  50. </script>
  51. <style lang="less" scoped></style>