unSigned.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <div class="statistics-department-unSigned-container layout-padding">
  3. <div class="layout-padding-auto layout-padding-view pd20">
  4. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
  5. <el-form-item prop="crTime">
  6. <statistical-time v-model="state.queryParams.crTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading"/>
  7. </el-form-item>
  8. <el-form-item label="数据范围" prop="Level">
  9. <el-segmented
  10. :options="[
  11. {
  12. value: '0',
  13. label: '全部',
  14. },
  15. {
  16. value: '1',
  17. label: '本级',
  18. },
  19. {
  20. value: '2',
  21. label: '下级',
  22. },
  23. ]"
  24. v-model="state.queryParams.Level"
  25. @change="handleQuery"
  26. :disabled="state.loading"
  27. />
  28. </el-form-item>
  29. <el-form-item label="签收状态" prop="Signed">
  30. <el-segmented
  31. :options="[
  32. {
  33. value: '0',
  34. label: '未签收',
  35. },
  36. {
  37. value: '1',
  38. label: '已签收',
  39. },
  40. ]"
  41. v-model="state.queryParams.Signed"
  42. @change="handleQuery"
  43. :disabled="state.loading"
  44. />
  45. </el-form-item>
  46. <el-form-item>
  47. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  48. <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
  49. <SvgIcon name="ele-Refresh" class="mr5" />重置
  50. </el-button>
  51. <el-popover :width="500" trigger="click">
  52. <template #reference>
  53. <el-button type="primary" title="口径说明"><SvgIcon name="ele-QuestionFilled" class="mr5"/>口径说明</el-button>
  54. </template>
  55. <el-descriptions title="" :column="1" border style="max-height: 400px; overflow: auto">
  56. <el-descriptions-item label="工单状态">未签收、办理中、退回信件、办理完成</el-descriptions-item>
  57. <el-descriptions-item label="来源渠道">工单来源方式</el-descriptions-item>
  58. <el-descriptions-item label="当前节点">当前工单流转目标所在的部门</el-descriptions-item>
  59. <el-descriptions-item label="工单编码">工单编号(系统自动生成)</el-descriptions-item>
  60. <el-descriptions-item label="受理时间">工单新建时间</el-descriptions-item>
  61. <el-descriptions-item label="工单标题">工单标题</el-descriptions-item>
  62. <el-descriptions-item label="工单期满时间">工单到期办理时间</el-descriptions-item>
  63. <el-descriptions-item label="转办部门">工单转办给部门办理</el-descriptions-item>
  64. <el-descriptions-item label="转办时间">转办工单的时间</el-descriptions-item>
  65. <el-descriptions-item label="签收部门">工单办理部门</el-descriptions-item>
  66. <el-descriptions-item label="未签收时间(小时)">未签收工单的时间</el-descriptions-item>
  67. <el-descriptions-item label="受理类型">工单受理类型</el-descriptions-item>
  68. <el-descriptions-item label="热点分类">工单热点分类</el-descriptions-item>
  69. </el-descriptions>
  70. </el-popover>
  71. </el-form-item>
  72. </el-form>
  73. <vxe-toolbar
  74. ref="toolbarRef"
  75. :loading="state.loading"
  76. custom
  77. :refresh="{
  78. queryMethod: queryList,
  79. }"
  80. :tools="[{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }]"
  81. >
  82. </vxe-toolbar>
  83. <div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
  84. <vxe-table
  85. border
  86. :loading="state.loading"
  87. :data="state.tableData"
  88. :column-config="{ resizable: true }"
  89. :row-config="{ isCurrent: true, isHover: true, height: 30,useKey:true }"
  90. ref="tableRef"
  91. height="auto"
  92. auto-resize
  93. show-overflow
  94. :scrollY="{ enabled: true, gt: 20, mode: 'wheel' }"
  95. id="statisticsDepartmentUnSigned"
  96. :custom-config="{
  97. storage: true,
  98. }"
  99. showHeaderOverflow
  100. :params="{ exportMethod: departmentUnSignExport, exportParams: requestParams }"
  101. >
  102. <vxe-column field="order.expiredStatusText" title="超期状态" width="90" align="center">
  103. <template #default="{ row }">
  104. <span :class="'overdue-status-' + row.order?.expiredStatus" :title="row.order?.expiredStatusText"></span>
  105. </template>
  106. </vxe-column>
  107. <vxe-column field="order.statusText" title="工单状态" width="100"></vxe-column>
  108. <vxe-column field="order.sourceChannel" title="来源渠道" width="100"></vxe-column>
  109. <vxe-column field="order.currentStepName" title="当前节点" width="110"></vxe-column>
  110. <vxe-column field="order.no" title="工单编码" width="140"></vxe-column>
  111. <vxe-column field="order.title" title="工单标题" width="200">
  112. <template #default="{ row }">
  113. <order-detail :order="row.order" @updateList="queryList">{{ row.order?.title }}</order-detail>
  114. </template>
  115. </vxe-column>
  116. <vxe-column field="order.startTime" title="受理时间" width="160">
  117. <template #default="{ row }">
  118. {{ formatDate(row.order?.startTime, 'YYYY-mm-dd HH:MM:SS') }}
  119. </template>
  120. </vxe-column>
  121. <vxe-column field="order.expiredTime" title="工单期满时间" width="160">
  122. <template #default="{ row }">
  123. {{ formatDate(row.order?.expiredTime, 'YYYY-mm-dd HH:MM:SS') }}
  124. </template>
  125. </vxe-column>
  126. <vxe-column field="workflowStep.creatorOrgName" title="转办部门" width="140"></vxe-column>
  127. <vxe-column field="workflowStep.creationTime" title="转办时间" width="160">
  128. <template #default="{ row }">
  129. {{ formatDate(row.workflowStep?.creationTime, 'YYYY-mm-dd HH:MM:SS') }}
  130. </template>
  131. </vxe-column>
  132. <vxe-column field="workflowStep.acceptorOrgName" title="签收部门" width="140"></vxe-column>
  133. <vxe-column field="unsignedTime" title="未签收时间(小时)" width="140"></vxe-column>
  134. <vxe-column field="order.acceptType" title="受理类型" width="110"></vxe-column>
  135. <vxe-column field="order.hotspotName" title="热点分类" width="150"></vxe-column>
  136. </vxe-table>
  137. </div>
  138. <pagination
  139. @pagination="queryList"
  140. :total="state.total"
  141. v-model:current-page="state.queryParams.PageIndex"
  142. v-model:page-size="state.queryParams.PageSize"
  143. :disabled="state.loading"
  144. />
  145. </div>
  146. </div>
  147. </template>
  148. <script setup lang="tsx" name="statisticsDepartmentUnSigned">
  149. import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
  150. import type { FormInstance } from 'element-plus';
  151. import { useRoute, useRouter } from 'vue-router';
  152. import { formatDate } from '@/utils/formatTime';
  153. import { departmentUnSignExport, departmentUnSign, departmentSecondDetailExport } from '@/api/statistics/department';
  154. import { defaultDate } from '@/utils/constants';
  155. import Other from '@/utils/other';
  156. // 引入组件
  157. const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
  158. const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
  159. const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
  160. // 定义变量内容
  161. const state = reactive<any>({
  162. queryParams: {
  163. PageIndex: 1, // 当前页
  164. PageSize: 20, // 每页条数
  165. Level: '0',
  166. Signed: '0',
  167. crTime: defaultDate, // 时间默认今天开始到今天结束
  168. },
  169. tableData: [], //表单
  170. loading: false, // 加载
  171. total: 0, // 总数
  172. });
  173. const ruleFormRef = ref<RefType>(); // 表单ref
  174. // 手动查询,将页码设置为1
  175. const handleQuery = () => {
  176. state.queryParams.PageIndex = 1;
  177. queryList();
  178. };
  179. const requestParams = ref<EmptyObjectType>({});
  180. /** 获取列表 */
  181. const queryList = () => {
  182. requestParams.value = Other.deepClone(state.queryParams);
  183. requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
  184. requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
  185. Reflect.deleteProperty(requestParams.value, 'crTime');
  186. state.loading = true;
  187. departmentUnSign(requestParams.value)
  188. .then((response: any) => {
  189. state.tableData = response?.result.items ?? [];
  190. state.total = response?.result.total;
  191. state.loading = false;
  192. })
  193. .catch(() => {
  194. state.loading = false;
  195. });
  196. };
  197. /** 重置按钮操作 */
  198. const statisticalTimeRef = ref<RefType>();
  199. const resetQuery = (formEl: FormInstance | undefined) => {
  200. if (!formEl) return;
  201. formEl.resetFields();
  202. statisticalTimeRef.value.reset();
  203. queryList();
  204. };
  205. const toolbarRef = ref<RefType>();
  206. const tableRef = ref<RefType>();
  207. onMounted(() => {
  208. queryList();
  209. if (tableRef.value && toolbarRef.value) {
  210. tableRef.value.connect(toolbarRef.value);
  211. }
  212. });
  213. </script>