waits-list.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="message-list waits-list">
  3. <div
  4. v-for="item in tableData"
  5. :key="item.id"
  6. class="message-item cursor-pointer"
  7. @click="editSopFlowHandle(item)"
  8. >
  9. <div class="m-head">
  10. <div class="m-title">
  11. <span>{{ item.taskName }}</span>
  12. <t-tag v-if="item.diffTime == 0" theme="success" variant="light"
  13. >正常</t-tag
  14. >
  15. <template v-else>
  16. <t-tag theme="danger" variant="light">已超时</t-tag>
  17. <t-tag theme="danger" variant="light"
  18. >超时时长:{{ item.diffTime <= 30 ? '30天' : '大于30天' }}</t-tag
  19. >
  20. </template>
  21. </div>
  22. <div class="m-time">{{ timestampFilter(item.flowTime, 'mm') }}</div>
  23. </div>
  24. <div class="m-body">
  25. <div class="m-content">{{ item.typeStr }}</div>
  26. <t-space class="m-info" :size="5">
  27. <p>发起人:{{ item.createRealName }}</p>
  28. <p>服务单元: {{ item.serviceName }} </p>
  29. <p>客户类型:{{ customerTypeFilter(item.customType) }}</p>
  30. <p>客户名称:{{ item.customName }}</p>
  31. <template #separator>
  32. <t-divider layout="vertical" />
  33. </template>
  34. </t-space>
  35. </div>
  36. </div>
  37. <t-pagination
  38. v-if="pagination.total > 0"
  39. class="page-pagination"
  40. v-model="pagination.pageNumber"
  41. v-model:pageSize="pagination.pageSize"
  42. :total="pagination.total"
  43. showJumper
  44. :showPageSize="false"
  45. @change="onChange"
  46. />
  47. <div class="none-box" v-if="!tableData.length">
  48. <img src="../../../../assets/none_message.svg" />
  49. <p>暂无数据</p>
  50. </div>
  51. <!-- SopStepDialog -->
  52. <sop-step-dialog
  53. v-model:visible="showSopStepDialog"
  54. :sop="curSopData"
  55. type="fill"
  56. @confirm="sopStepConfirm"
  57. ></sop-step-dialog>
  58. </div>
  59. </template>
  60. <script setup name="MyTaskList">
  61. import { timestampFilter, customerTypeFilter } from '@/utils/filter';
  62. import SopStepDialog from '@/views/sop/sop-manange/sop-step/sop-step-dialog.vue';
  63. const { tableData, pagination, onChange } = defineProps([
  64. 'tableData',
  65. 'pagination',
  66. 'onChange',
  67. ]);
  68. const showSopStepDialog = ref(false);
  69. const curSopData = ref({});
  70. const editSopFlowHandle = (row) => {
  71. curSopData.value = row;
  72. showSopStepDialog.value = true;
  73. };
  74. const sopStepConfirm = () => {
  75. onChange(pagination);
  76. };
  77. </script>