detailSatisfied.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <div class="judicial-statistics-detail-satisfaction-container layout-pd">
  3. <el-card shadow="never">
  4. <ProTable
  5. ref="proTableRef"
  6. :columns="columns"
  7. :data="state.tableData"
  8. @updateTable="queryList"
  9. :loading="state.loading"
  10. :total="state.total"
  11. v-model:page-index="state.queryParams.PageIndex"
  12. v-model:page-size="state.queryParams.PageSize"
  13. >
  14. <template #expiredStatus="{ row }">
  15. <span :class="'overdue-status-' + row.expiredStatus" :title="row.expiredStatusText"></span>
  16. </template>
  17. <template #title="{ row }">
  18. <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
  19. </template>
  20. <template #employeeName="{ row }">
  21. <span
  22. >{{ row.acceptorName }} <span v-if="row.acceptorStaffNo">[{{ row.acceptorStaffNo }}]</span>
  23. </span>
  24. </template>
  25. <template #isTheClueTrue="{row}">
  26. <span>{{ row.isTheClueTrue !== null ? (row.isTheClueTrue ? '是' : '否') : '' }}</span>
  27. </template>
  28. <template #isProvince="{ row }">
  29. <span>{{ row.isProvince ? '省工单' : '市工单' }}</span>
  30. </template>
  31. <!-- 表格操作 -->
  32. <template #operation="{ row }">
  33. <el-button link type="primary" @click="visitDetail(row)" title="查看回访详情"> 回访详情 </el-button>
  34. <order-detail :order="row.order" @updateList="queryList" />
  35. </template>
  36. </ProTable>
  37. </el-card>
  38. <!-- 回访详情 -->
  39. <visit-detail-com ref="visitDetailRef" @updateList="queryList" />
  40. </div>
  41. </template>
  42. <script setup lang="tsx" name="judicialStatisticsDetailSatisfied">
  43. import { onMounted, reactive, ref, defineAsyncComponent } from 'vue';
  44. import { FormInstance } from 'element-plus';
  45. import { departmentSatisfactionDetail } from '@/api/judicial';
  46. import dayjs from 'dayjs';
  47. import { formatDate } from '@/utils/formatTime';
  48. import { useRoute } from 'vue-router';
  49. // 引入组件
  50. const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/component/Visit-detail.vue')); // 回访
  51. const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
  52. // 表格配置项
  53. const columns = ref<any[]>([
  54. { prop: 'expiredStatus', label: '超期状态', align: 'center' },
  55. { prop: 'no', label: '工单编码', width: 150 },
  56. { prop: 'provinceNo', label: '省编号', width: 200 },
  57. { prop: 'isProvince', label: '省/市工单', width: 100 },
  58. { prop: 'actualHandleStepName', label: '办理节点', width: 150 },
  59. { prop: 'statusText', label: '工单状态', width: 100 },
  60. { prop: 'title', label: '工单标题', width: 300 },
  61. {
  62. prop: 'startTime',
  63. label: '受理时间',
  64. width: 170,
  65. render: (scope) => {
  66. return <span>{formatDate(scope.row.startTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  67. },
  68. },
  69. {
  70. prop: 'expiredTime',
  71. label: '工单期满时间',
  72. width: 170,
  73. render: (scope) => {
  74. return <span>{formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  75. },
  76. },
  77. {
  78. prop: 'filedTime',
  79. label: '办结时间',
  80. width: 170,
  81. render: (scope) => {
  82. return <span>{formatDate(scope.row.filedTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  83. },
  84. },
  85. { prop: 'orgLevelOneName', label: '一级部门', width: 170 },
  86. { prop: 'actualHandleOrgName', label: '接办部门', width: 170 },
  87. { prop: 'acceptType', label: '受理类型', width: 150 },
  88. { prop: 'sourceChannel', label: '来源方式', width: 100 },
  89. { prop: 'hotspotName', label: '热点分类', width: 200 },
  90. {
  91. prop: 'isPassTheBuckOrder',
  92. label: '是否推诿工单',
  93. width: 120,
  94. render: (scope) => {
  95. return <span>{scope.row.isPassTheBuckOrder ? '是' : '否'}</span>;
  96. },
  97. },
  98. {
  99. prop: 'isTheClueTrue',
  100. label: '线索是否属实',
  101. width: 120
  102. },
  103. { prop: 'eventTypeName', label: '事项类型', width: 200 },
  104. { prop: 'operation', label: '操作', fixed: 'right', width: 170, align: 'center' },
  105. ]);
  106. // 定义变量内容
  107. const ruleFormRef = ref<RefType>(); // 表单ref
  108. const state = reactive({
  109. queryParams: {
  110. // 查询条件
  111. PageIndex: 1,
  112. PageSize: 10,
  113. TypeId: '1', //
  114. LineNum: null,
  115. crTime: [],
  116. },
  117. tableData: [], //表单
  118. loading: false, // 加载
  119. total: 0, // 总数
  120. });
  121. /** 搜索按钮操作 */
  122. const handleQuery = () => {
  123. // state.queryParams.PageIndex = 1;
  124. queryList();
  125. };
  126. const historyParams = history.state;
  127. const route = useRoute();
  128. if (historyParams.StartDate) {
  129. state.queryParams.crTime = [dayjs(historyParams.StartDate).format('YYYY-MM-DD'), dayjs(historyParams.EndDate).format('YYYY-MM-DD')];
  130. }
  131. /** 获取列表 */
  132. const queryList = () => {
  133. state.loading = true;
  134. const request = {
  135. StartDate: historyParams.StartDate,
  136. EndDate: historyParams.EndDate,
  137. TypeId: historyParams.TypeId,
  138. OrgCode: route.params.id,
  139. DateValue: historyParams.DateValue,
  140. PageIndex: state.queryParams.PageIndex,
  141. PageSize: state.queryParams.PageSize,
  142. };
  143. departmentSatisfactionDetail(request)
  144. .then((res: any) => {
  145. state.tableData = res.result?.items ?? [];
  146. state.total = res.result.total ?? 0;
  147. state.loading = false;
  148. })
  149. .catch(() => {
  150. state.loading = false;
  151. });
  152. };
  153. /** 重置按钮操作 */
  154. const resetQuery = (formEl: FormInstance | undefined) => {
  155. if (!formEl) return;
  156. formEl.resetFields();
  157. queryList();
  158. };
  159. // 回访详情
  160. const visitDetailRef = ref<RefType>();
  161. const visitDetail = (row: any) => {
  162. const rowData = {
  163. ...row,
  164. orderId: row.id,
  165. id: row.visitId,
  166. };
  167. if ([10, 20].includes(row.visitState)) {
  168. visitDetailRef.value.openDialog(rowData, '回访');
  169. } else {
  170. visitDetailRef.value.openDialog(rowData, '回访详情');
  171. }
  172. };
  173. onMounted(() => {
  174. queryList();
  175. });
  176. </script>