newTimeliness.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <template>
  2. <div class="dataShare-new-timeliness-container layout-pd">
  3. <el-card shadow="never">
  4. <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
  5. <el-form-item label="时间段" prop="crTime">
  6. <el-date-picker
  7. v-model="state.queryParams.crTime"
  8. type="daterange"
  9. unlink-panels
  10. range-separator="至"
  11. start-placeholder="开始时间"
  12. end-placeholder="结束时间"
  13. :shortcuts="shortcuts"
  14. @change="handleQuery"
  15. value-format="YYYY-MM-DD"
  16. :clearable="false"
  17. />
  18. </el-form-item>
  19. <el-form-item label-width="0">
  20. <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
  21. <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
  22. <SvgIcon name="ele-Refresh" class="mr5" />重置
  23. </el-button>
  24. </el-form-item>
  25. </el-form>
  26. </el-card>
  27. <el-row :gutter="20">
  28. <el-divider><el-text tag="b" class="font16">工单</el-text></el-divider>
  29. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  30. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  31. <el-statistic :value="state.data.orderCountNum">
  32. <template #title>
  33. <span class="color-info font14">工单总量</span>
  34. </template>
  35. </el-statistic>
  36. </el-card>
  37. </el-col>
  38. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  39. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  40. <el-statistic :value="state.data.handleEndOrderNum">
  41. <template #title>
  42. <span class="color-info font14">办结件数</span>
  43. </template>
  44. </el-statistic>
  45. </el-card>
  46. </el-col>
  47. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  48. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  49. <el-statistic :value="state.data.handleEndOrderOnTime">
  50. <template #title>
  51. <span class="color-info font14">按时办结数量</span>
  52. </template>
  53. </el-statistic>
  54. </el-card>
  55. </el-col>
  56. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  57. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  58. <el-statistic :value="state.data.handleEndOrderRate">
  59. <template #title>
  60. <span class="color-info font14">办结率</span>
  61. </template>
  62. <template #suffix>%</template>
  63. </el-statistic>
  64. </el-card>
  65. </el-col>
  66. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  67. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  68. <el-statistic :value="state.data.handleEndOrderOnTimeRate">
  69. <template #title>
  70. <span class="color-info font14">按时办结率</span>
  71. </template>
  72. <template #suffix>%</template>
  73. </el-statistic>
  74. </el-card>
  75. </el-col>
  76. <el-divider><el-text tag="b" class="font16">工单及时率</el-text> </el-divider>
  77. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  78. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  79. <el-statistic :value="state.data.orderTimely">
  80. <template #title>
  81. <span class="color-info font14">工单及时上传</span>
  82. </template>
  83. </el-statistic>
  84. </el-card>
  85. </el-col>
  86. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  87. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  88. <el-statistic :value="state.data.orderNotTimely">
  89. <template #title>
  90. <span class="color-info font14">工单未及时上传</span>
  91. </template>
  92. </el-statistic>
  93. </el-card>
  94. </el-col>
  95. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  96. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  97. <el-statistic :value="state.data.orderTimelinessRate">
  98. <template #title>
  99. <span class="color-info font14">工单及时率</span>
  100. </template>
  101. <template #suffix>%</template>
  102. </el-statistic>
  103. </el-card>
  104. </el-col>
  105. <el-divider><el-text tag="b" class="font16">电话数量</el-text></el-divider>
  106. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  107. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  108. <el-statistic :value="state.data.telCountNum">
  109. <template #title>
  110. <span class="color-info font14">电话总量</span>
  111. </template>
  112. </el-statistic>
  113. </el-card> </el-col
  114. ><el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  115. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  116. <el-statistic :value="state.data.telConnectCountNum">
  117. <template #title>
  118. <span class="color-info font14">电话接通数</span>
  119. </template>
  120. </el-statistic>
  121. </el-card> </el-col
  122. ><el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  123. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  124. <el-statistic :value="state.data.telNotConnectCountNum">
  125. <template #title>
  126. <span class="color-info font14">电话未接通数</span>
  127. </template>
  128. </el-statistic>
  129. </el-card>
  130. </el-col>
  131. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  132. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  133. <el-statistic :value="state.data.telConnectRate">
  134. <template #title>
  135. <span class="color-info font14">电话接通率</span>
  136. </template>
  137. <template #suffix>%</template>
  138. </el-statistic>
  139. </el-card>
  140. </el-col>
  141. <el-divider><el-text tag="b" class="font16">电话及时率</el-text></el-divider>
  142. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  143. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  144. <el-statistic :value="state.data.telTimely">
  145. <template #title>
  146. <span class="color-info font14">电话及时上传</span>
  147. </template>
  148. </el-statistic>
  149. </el-card>
  150. </el-col>
  151. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  152. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  153. <el-statistic :value="state.data.telNotTimely">
  154. <template #title>
  155. <span class="color-info font14">电话未及时上传</span>
  156. </template>
  157. </el-statistic>
  158. </el-card>
  159. </el-col>
  160. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  161. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  162. <el-statistic :value="state.data.telTimelinessRate">
  163. <template #title>
  164. <span class="color-info font14">电话及时率</span>
  165. </template>
  166. <template #suffix>%</template>
  167. </el-statistic>
  168. </el-card>
  169. </el-col>
  170. <el-divider><el-text tag="b" class="font16">匹配率</el-text></el-divider>
  171. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  172. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  173. <el-statistic :value="state.data.rgdhOrderCount">
  174. <template #title>
  175. <span class="color-info font14">电话来源工单数量</span>
  176. </template>
  177. </el-statistic>
  178. </el-card>
  179. </el-col>
  180. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  181. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  182. <el-statistic :value="state.data.containTel">
  183. <template #title>
  184. <span class="color-info font14">匹配通话记录数</span>
  185. </template>
  186. </el-statistic>
  187. </el-card>
  188. </el-col>
  189. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  190. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  191. <el-statistic :value="state.data.notContainTel">
  192. <template #title>
  193. <span class="color-info font14">未匹配通话记录数</span>
  194. </template>
  195. </el-statistic>
  196. </el-card>
  197. </el-col>
  198. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  199. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  200. <el-statistic :value="state.data.matchingRate">
  201. <template #title>
  202. <span class="color-info font14">匹配率</span>
  203. </template>
  204. <template #suffix>%</template>
  205. </el-statistic>
  206. </el-card>
  207. </el-col>
  208. <el-divider><el-text tag="b" class="font16">回访</el-text></el-divider>
  209. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  210. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  211. <el-statistic :value="state.data.visitCountNum">
  212. <template #title>
  213. <span class="color-info font14">回访总量</span>
  214. </template>
  215. </el-statistic>
  216. </el-card>
  217. </el-col>
  218. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  219. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  220. <el-statistic :value="state.data.satisfactionCountNum">
  221. <template #title>
  222. <span class="color-info font14">满意总量</span>
  223. </template>
  224. </el-statistic>
  225. </el-card>
  226. </el-col>
  227. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  228. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  229. <el-statistic :value="state.data.notSatisfiedCountNum">
  230. <template #title>
  231. <span class="color-info font14">不满意总量</span>
  232. </template>
  233. </el-statistic>
  234. </el-card>
  235. </el-col>
  236. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  237. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  238. <el-statistic :value="state.data.satisfactionRate">
  239. <template #title>
  240. <span class="color-info font14">满意率</span>
  241. </template>
  242. <template #suffix>%</template>
  243. </el-statistic>
  244. </el-card> </el-col
  245. ><el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  246. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  247. <el-statistic :value="state.data.notSatisfiedRate">
  248. <template #title>
  249. <span class="color-info font14">不满意率</span>
  250. </template>
  251. <template #suffix>%</template>
  252. </el-statistic>
  253. </el-card>
  254. </el-col>
  255. <el-divider><el-text tag="b" class="font16">知识库</el-text></el-divider>
  256. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  257. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  258. <el-statistic :value="state.data.knowledgeCount">
  259. <template #title>
  260. <span class="color-info font14">知识库总量</span>
  261. </template>
  262. </el-statistic>
  263. </el-card>
  264. </el-col>
  265. <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4">
  266. <el-card shadow="never" v-loading="state.loading" class="statistics-item">
  267. <el-statistic :value="state.data.updateKnowledgeCount">
  268. <template #title>
  269. <span class="color-info font14">更新知识库量</span>
  270. </template>
  271. </el-statistic>
  272. </el-card>
  273. </el-col>
  274. </el-row>
  275. </div>
  276. </template>
  277. <script setup lang="tsx" name="dataShareNewTimeliness">
  278. import { onMounted, reactive, ref } from 'vue';
  279. import { FormInstance } from 'element-plus';
  280. import { defaultDate, shortcuts } from '@/utils/constants';
  281. import { formatDate } from '@/utils/formatTime';
  282. import { getTimeRateNew } from '@/api/dataShare';
  283. import Other from '@/utils/other';
  284. const proTableRef = ref<RefType>(); // 表格ref
  285. // 表格配置项
  286. const columns = ref<any[]>([
  287. { prop: 'provinceNo', label: '省工单编号', align: 'center' },
  288. {
  289. prop: 'firstTime',
  290. label: '初次推送时间',
  291. align: 'center',
  292. width: 170,
  293. render: (scope) => {
  294. return <span>{formatDate(scope.row.firstTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  295. },
  296. },
  297. {
  298. prop: 'lastTime',
  299. label: '最近一次推送时间',
  300. align: 'center',
  301. width: 170,
  302. render: (scope) => {
  303. return <span>{formatDate(scope.row.lastTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  304. },
  305. },
  306. {
  307. prop: 'sendTimes',
  308. label: '推送次数',
  309. align: 'center',
  310. },
  311. {
  312. prop: 'isSuccess',
  313. label: '推送状态',
  314. align: 'center',
  315. render: (scope) => {
  316. return <span>{scope.row.isSuccess ? '成功' : '失败'}</span>;
  317. },
  318. },
  319. {
  320. prop: 'platformSource',
  321. label: '平台名称',
  322. align: 'center',
  323. },
  324. { prop: 'taskType', label: '任务类型', align: 'center' },
  325. { prop: 'request', label: '请求参数', align: 'center' },
  326. {
  327. prop: 'generationTime',
  328. label: '生成时间',
  329. align: 'center',
  330. width: 170,
  331. render: (scope) => {
  332. return <span>{formatDate(scope.row.generationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  333. },
  334. },
  335. {
  336. prop: 'creationTime',
  337. label: '创建时间',
  338. align: 'center',
  339. width: 170,
  340. render: (scope) => {
  341. return <span>{formatDate(scope.row.creationTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
  342. },
  343. },
  344. ]);
  345. // 定义变量内容
  346. const ruleFormRef = ref<RefType>(); // 表单ref
  347. const state = reactive<any>({
  348. queryParams: {
  349. crTime: defaultDate,
  350. StartDate: null,
  351. EndDate: null,
  352. },
  353. loading: false, // 加载
  354. data: {
  355. orderCountNum: 0, // 工单总量
  356. handleEndOrderNum: 0, // 办结件数
  357. handleEndOrderOnTime: 0, // 按时办结数量
  358. orderTimely: 0, // 按时办结率
  359. orderNotTimely: 0, // 不按时办结数量
  360. orderTimelinessRate: 0, // 按时办结率
  361. handleEndOrderRate: 0, // 办结率
  362. handleEndOrderOnTimeRate: 0, // 按时办结率
  363. telCountNum: 0, // 电话总量
  364. telConnectCountNum: 0, // 电话接通数
  365. telNotConnectCountNum: 0, // 电话未接通数
  366. telTimely: 0, // 按时接通率
  367. telNotTimely: 0, // 不按时接通数量
  368. telTimelinessRate: 0, // 按时接通率
  369. telConnectRate: 0, // 接通率
  370. rgdhOrderCount: 0, // 电话来源工单数量
  371. containTel: 0, // 包含电话数量
  372. notContainTel: 0, // 不包含电话数量
  373. matchingRate: 0, // 匹配率
  374. visitCountNum: 0, // 回访总量
  375. satisfactionCountNum: 0, // 满意总量
  376. notSatisfiedCountNum: 0, // 不满意总量
  377. satisfactionRate: 0, // 满意率
  378. notSatisfactionRate: 0, // 不满意率
  379. knowledgeCount: 0, // 知识库总量
  380. updateKnowledgeCount: 0, // 更新知识库量
  381. },
  382. });
  383. /** 搜索按钮操作 */
  384. const handleQuery = () => {
  385. // state.queryParams.PageIndex = 1;
  386. queryList();
  387. };
  388. /** 获取列表 */
  389. const queryList = () => {
  390. state.loading = true;
  391. let request = Other.deepClone(state.queryParams);
  392. request.StartDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
  393. request.EndDate = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
  394. Reflect.deleteProperty(request, 'crTime');
  395. getTimeRateNew(request)
  396. .then((res: any) => {
  397. state.data = res.result ?? {};
  398. state.loading = false;
  399. })
  400. .catch(() => {
  401. state.loading = false;
  402. });
  403. };
  404. /** 重置按钮操作 */
  405. const resetQuery = (formEl: FormInstance | undefined) => {
  406. if (!formEl) return;
  407. formEl.resetFields();
  408. queryList();
  409. };
  410. onMounted(() => {
  411. queryList();
  412. });
  413. </script>
  414. <style scoped lang="scss">
  415. .dataShare-new-timeliness-container {
  416. .el-divider--horizontal {
  417. margin: 24px 0;
  418. }
  419. .statistics-item {
  420. margin-bottom: 10px;
  421. }
  422. }
  423. </style>