SmsCheckStatistics.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <template>
  2. <div>
  3. <a-row :gutter="16" style="height: 1000px">
  4. <a-col :span="5" style="height: 100%;">
  5. <a-card title="任务选择" :bordered="false" style="height: 100%">
  6. <a-directory-tree
  7. style="height: auto"
  8. v-model:expandedKeys="expandedKeys"
  9. v-model:selectedKeys="selectedKeys"
  10. multiple
  11. :tree-data="treeData"
  12. @expand="onExpand"
  13. @select="onTreeNodeSelect"
  14. ></a-directory-tree>
  15. </a-card>
  16. </a-col>
  17. <!-- 查询区域 -->
  18. <a-col :span="19">
  19. <div class="table-page-search-wrapper">
  20. <a-form layout="inline" @keyup.enter.native="searchQuery">
  21. <a-row :gutter="24">
  22. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23. <a-form-item label="客户编号">
  24. <j-input placeholder="请输入客户编号" v-model:value="customerNo"></j-input>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  28. <a-form-item label="客户名称">
  29. <j-input placeholder="客户名称" v-model:value="customerName" ></j-input>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  33. <a-form-item label="任务名称">
  34. <j-input placeholder="任务名称" v-model:value="taskName" ></j-input>
  35. </a-form-item>
  36. </a-col>
  37. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  38. <a-form-item label="任务状态">
  39. <j-dict-select-tag placeholder="请选择任务状态" v-model:value="taskState" dictCode="sms_check_task_state" />
  40. </a-form-item>
  41. </a-col>
  42. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  43. <a-form-item label="稽核类型">
  44. <j-dict-select-tag placeholder="请选择稽核类型" v-model:value="taskType" dictCode="sms_check_task_type" />
  45. </a-form-item>
  46. </a-col>
  47. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  48. <a-form-item label="稽核状态">
  49. <j-dict-select-tag placeholder="请选择稽核状态" v-model:value="checkState" dictCode="sms_check_check_state" />
  50. </a-form-item>
  51. </a-col>
  52. <template v-if="toggleSearchStatus">
  53. <a-col :xl="10" :lg="11" :md="12" :sm="24">
  54. <a-form-item label="开始时间">
  55. <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择开始时间" class="query-group-cust" v-model:value="startDate"></j-date>
  56. </a-form-item>
  57. <a-form-item label="结束时间">
  58. <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择结束时间" class="query-group-cust" v-model:value="endDate"></j-date>
  59. </a-form-item>
  60. </a-col>
  61. </template>
  62. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  63. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"></span>
  64. </a-col>
  65. </a-row>
  66. </a-form>
  67. </div>
  68. </a-col>
  69. <!-- 操作按钮区域 -->
  70. <div class="table-operator">
  71. <a-button type="primary" icon="download" @click="handleExportXls('稽核统计')">导出</a-button>
  72. <!-- 高级查询区域 -->
  73. <a-dropdown v-if="selectedRowKeys.length > 0">
  74. <a-menu slot="overlay">
  75. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  76. </a-menu>
  77. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  78. </a-dropdown>
  79. <a-button type="primary" @click="searchQuery()" icon="search" >查询</a-button>
  80. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  81. <a @click="handleToggleSearch" style="margin-left: 8px">
  82. {{ toggleSearchStatus ? '收起' : '展开' }}
  83. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  84. </a>
  85. </div>
  86. <!-- 查询区域-END -->
  87. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === '' ">
  88. <a-card>
  89. <a-statistic
  90. title="行短稽核"
  91. :value="lineNum"
  92. :precision="0"
  93. suffix="个"
  94. :value-style="{ color: '#fa073f' }"
  95. style="margin-right: 10px"
  96. >
  97. <template #prefix>
  98. </template>
  99. </a-statistic>
  100. </a-card>
  101. </a-col>
  102. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === ''">
  103. <a-card>
  104. <a-statistic
  105. title="物联网业务稽核"
  106. :value="businessNum"
  107. :precision="0"
  108. suffix="个"
  109. :value-style="{ color: '#810320' }"
  110. style="margin-right: 50px"
  111. >
  112. <template #prefix>
  113. </template>
  114. </a-statistic>
  115. </a-card>
  116. </a-col>
  117. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === ''">
  118. <a-card>
  119. <a-statistic
  120. title="复开审批"
  121. :value="reopeningNum"
  122. :precision="0"
  123. suffix="个"
  124. :value-style="{ color: '#0a0a09' }"
  125. style="margin-right: 50px"
  126. >
  127. <template #prefix>
  128. </template>
  129. </a-statistic>
  130. </a-card>
  131. </a-col>
  132. <a-col :span="4" style="padding-top: 10px" v-if="this.viewIs === ''">
  133. <a-card>
  134. <a-statistic
  135. title="中继线稽核"
  136. :value="trunkLineAuditNum"
  137. :precision="0"
  138. suffix="个"
  139. :value-style="{ color: '#3f8600' }"
  140. style="margin-right: 50px"
  141. >
  142. <template #prefix>
  143. </template>
  144. </a-statistic>
  145. </a-card>
  146. </a-col>
  147. <a-col :span="4" style="padding-top: 10px">
  148. <a-card>
  149. <a-statistic
  150. title="新增稽核数量"
  151. :value="sumCount"
  152. :precision="0"
  153. suffix="个"
  154. :value-style="{ color: '#3f8600' }"
  155. style="margin-right: 50px"
  156. >
  157. <template #prefix>
  158. </template>
  159. </a-statistic>
  160. </a-card>
  161. </a-col>
  162. <!--稽核状态 -->
  163. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs !== '' ">
  164. <a-card>
  165. <a-statistic
  166. title="未开始"
  167. :value="notStart"
  168. :precision="0"
  169. suffix="个"
  170. :value-style="{ color: '#3f8600' }"
  171. style="margin-right: 50px"
  172. >
  173. <template #prefix>
  174. </template>
  175. </a-statistic>
  176. </a-card>
  177. </a-col>
  178. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs !== '' ">
  179. <a-card>
  180. <a-statistic
  181. title="进行中"
  182. :value="inProgress"
  183. :precision="0"
  184. suffix="个"
  185. :value-style="{ color: '#810320' }"
  186. style="margin-right: 50px"
  187. >
  188. <template #prefix>
  189. </template>
  190. </a-statistic>
  191. </a-card>
  192. </a-col>
  193. <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs !== '' ">
  194. <a-card>
  195. <a-statistic
  196. title="已结束"
  197. :value="completed"
  198. :precision="0"
  199. suffix="个"
  200. :value-style="{ color: '#3f8600' }"
  201. style="margin-right: 50px"
  202. >
  203. <template #prefix>
  204. </template>
  205. </a-statistic>
  206. </a-card>
  207. </a-col>
  208. <!--稽核状态 -->
  209. <a-col :span="19" style="top: 10px">
  210. <a-card title="稽核概况统计" :bordered="false">
  211. <!-- table区域-begin -->
  212. <div>
  213. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  214. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  215. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  216. </div>
  217. <a-table
  218. ref="table"
  219. size="middle"
  220. :scroll="{x:true}"
  221. bordered
  222. rowKey="id"
  223. :columns="columns"
  224. :dataSource="dataSource"
  225. :pagination="ipagination"
  226. :loading="loading"
  227. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  228. class="j-table-force-nowrap"
  229. @change="handleTableChange">
  230. <template slot="action" slot-scope="text, record">
  231. <!-- <span v-has="'task:check:list:improve'" v-if="record.checkState == 1 || record.checkState == 0-->
  232. <!-- || record.checkState == 3 || record.checkState == 4" >-->
  233. <!-- <a @click="showImprove(record)">完善</a>-->
  234. <!-- <a-divider type="vertical"/>-->
  235. <!-- </span>-->
  236. <!-- <span v-has="'task:check:list:upload'" v-if="record.checkState == 1 || record.checkState == 0-->
  237. <!-- || record.checkState == 3 || record.checkState == 4">-->
  238. <!-- <a @click="showUpload(record)">上传</a>-->
  239. <!-- <a-divider type="vertical"/>-->
  240. <!-- </span>-->
  241. <!-- <span v-has="'task:check:list:submit'" v-if="record.checkState == 1 || record.checkState == 4">-->
  242. <!-- <a @click="handSubmit(record)">提交</a>-->
  243. <!-- <a-divider type="vertical"/>-->
  244. <!-- </span>-->
  245. <!-- <span v-has="'task:check:list:check'" v-if="record.checkState === 2 || record.checkState === 3">-->
  246. <!-- <a @click="showCheckCheck(record)">稽核</a>-->
  247. <!-- <a-divider type="vertical" />-->
  248. <!-- </span>-->
  249. <!-- <span v-has="'task:check:list:history'" v-if="record.checkState >= 4">-->
  250. <!-- <a @click="showCheckLog(record)">历史</a>-->
  251. <!-- <a-divider type="vertical" />-->
  252. <!-- </span>-->
  253. <span v-has="'task:check:list:notice'" >
  254. <a @click="showCheckList(record)">详情</a>
  255. <a-divider type="vertical" />
  256. </span>
  257. <a-dropdown>
  258. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  259. <a-menu slot="overlay">
  260. <a-menu-item v-has="'task:check:list:delete'">
  261. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  262. <a>删除</a>
  263. </a-popconfirm>
  264. </a-menu-item>
  265. <a-menu-item v-has="'task:check:list:clear'">
  266. <a-popconfirm title="确定清空吗?" @confirm="() => dataDelete(record.id)">
  267. <a>清空</a>
  268. </a-popconfirm>
  269. </a-menu-item>
  270. </a-menu>
  271. </a-dropdown>
  272. </template>
  273. <template v-slot:customerName="text, record">
  274. <a @click="showCheckDetail(record)">{{text}}</a>
  275. </template>
  276. <template v-slot:checkState="status">
  277. <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
  278. </template>
  279. <template v-slot:rowIndex="text,records,index">
  280. {{ (ipagination.current - 1) * ipagination.pageSize + Number(index)+1 }}
  281. </template>
  282. </a-table>
  283. </div>
  284. <!-- table区域 end -->
  285. </a-card>
  286. </a-col>
  287. </a-row>
  288. </div>
  289. <!-- 查询区域 -->
  290. </template>
  291. <script>
  292. import moment from 'moment';
  293. import {getAction} from "@api/manage";
  294. import * as echarts from 'echarts';
  295. import '@/assets/less/TableExpand.less'
  296. import { JeecgListMixin } from '@/mixins/JeecgListMixin';
  297. import { mixinDevice } from '@/utils/mixin'
  298. export default {
  299. name: 'SmsCheckWorkLogList',
  300. mixins:[JeecgListMixin,mixinDevice],
  301. data() {
  302. return {
  303. description: '稽核工作日志管理页面',
  304. startDate: '',
  305. endDate:'',
  306. superFieldList:[],
  307. taskDate:'',
  308. customerNo:'',
  309. customerName:'',
  310. url: {
  311. "statusRefuse": "/smsCheck/customerInfo/status/refuse",
  312. "taskList": "/smsCheck/task/list",
  313. "dateList": "/smsCheck/task/year/list",
  314. //基本信息 规范信息 附件资料 异常稽核统计
  315. "checkStateCount": "/smsCheck/workLog/check/state/count",
  316. //各个稽核点状态
  317. statusToCount:"/smsCheck/statistics/statusToCount",
  318. //各个稽核点个数
  319. "statisticsCount": "/smsCheck/statistics/count",
  320. //用户工作量接口
  321. "findStaffNoCount" : "/smsCheck/workLog/find/staff/no/count",
  322. queryTask: "/smsCheck/task/queryById",
  323. list: "/smsCheck/statistics/list",
  324. count: "/smsCheck/customerInfo/count",
  325. delete: "/smsCheck/customerInfo/delete",
  326. edit: "/smsCheck/customerInfo/edit",
  327. notice: "/smsCheck/customerInfo/notice",
  328. editCheck: "/smsCheck/customerInfo/edit/check/state",
  329. dataDelete: "/smsCheck/customerData/clear",
  330. deleteBatch:"/smsCheck/statistics/deleteBatch",
  331. exportXlsUrl: "/smsCheck/statistics/exportXls",
  332. importExcelUrl:""
  333. },
  334. columns: [
  335. {
  336. title: '#',
  337. dataIndex: '',
  338. key:'rowIndex',
  339. width:60,
  340. align:"center",
  341. scopedSlots: { customRender: 'rowIndex' }
  342. },{
  343. title:'任务状态',
  344. align:"left",
  345. sorter: true,
  346. dataIndex: 'taskState',
  347. customRender:function (text,record,index) {
  348. if (text === '0') {
  349. return '未开始';
  350. } else if (text === '1') {
  351. return '进行中';
  352. }else if (text === '2') {
  353. return '已结束';
  354. }
  355. return text;
  356. }
  357. },{
  358. title:'任务名称',
  359. align:"left",
  360. sorter: true,
  361. dataIndex: 'taskName'
  362. },
  363. {
  364. title:'客户名称',
  365. align:"left",
  366. sorter: true,
  367. dataIndex: 'customerName',
  368. scopedSlots: { customRender: 'customerName' }
  369. },
  370. {
  371. title:'客户编号',
  372. align:"center",
  373. sorter: true,
  374. dataIndex: 'customerNo'
  375. },
  376. {
  377. title:'服务号码(全)',
  378. align:"center",
  379. dataIndex: 'smsNumber'
  380. },
  381. {
  382. title:'用户编号',
  383. align:"center",
  384. dataIndex: 'userNo'
  385. },
  386. {
  387. title:'入网时间',
  388. align:"center",
  389. sorter: true,
  390. dataIndex: 'networkAccessTime'
  391. },
  392. {
  393. title:'用户状态',
  394. align:"center",
  395. dataIndex: 'userState',
  396. customRender:function (text,record,index) {
  397. if (text === '1') {
  398. return '在用';
  399. } else if (text === '2') {
  400. return '拆机';
  401. }
  402. return text;
  403. }
  404. },
  405. {
  406. title:'员工姓名',
  407. align:"center",
  408. dataIndex: 'staffName'
  409. },
  410. {
  411. title:'员工工号',
  412. align:"center",
  413. sorter: true,
  414. dataIndex: 'staffNo'
  415. },
  416. {
  417. title:'稽核状态',
  418. align:"center",
  419. sorter: true,
  420. dataIndex: 'checkState',
  421. scopedSlots: {customRender: 'checkState'},
  422. // scopedSlots: { customRender: 'checkState' },
  423. // customRender:function (text,record,index) {
  424. // if (text === 0) {
  425. // return '未处理';
  426. // } else if (text === 1) {
  427. // return '未完善';
  428. // }else if (text === 2) {
  429. // return '待稽核';
  430. // }else if (text === 3) {
  431. // return '已整改';
  432. // }else if (text === 4) {
  433. // return '待整改';
  434. // }else if (text === 5) {
  435. // return '稽核通过';
  436. // }
  437. // return text;
  438. // }
  439. },
  440. {
  441. title:'稽核类型',
  442. align:"center",
  443. sorter: true,
  444. dataIndex: 'type',
  445. customRender:function (text,record,index) {
  446. if (text === '1') {
  447. return '行短稽核';
  448. }else if (text === '2') {
  449. return '物联网业务稽核';
  450. }else if (text === '3') {
  451. return '复开审批';
  452. }else if (text === '4') {
  453. return '中继线稽核';
  454. }
  455. }
  456. },
  457. {
  458. title: '操作',
  459. dataIndex: 'action',
  460. align:"center",
  461. scopedSlots: { customRender: 'action' }
  462. }
  463. ],
  464. isorter:{
  465. column: 'checkState',
  466. order: 'asc',
  467. },
  468. $abnormalCheckPie: "",
  469. $abnormalCheckHistogram: "",
  470. $abnormalCreateTimeTrend: "",
  471. lineNum: 0,
  472. latestDate: '180',
  473. reopeningNum: 0,
  474. businessNum: 0,
  475. trunkLineAuditNum: 0,
  476. sumCount:0,
  477. treeData: [],
  478. expandedKeys: ['2022', '2022-10'],
  479. selectedKeys: {},
  480. statusAuditPieData: [],
  481. canvas: {},
  482. taskId:'',
  483. taskName:'',
  484. taskState:'',
  485. taskType:'',
  486. completed:'',
  487. inProgress:'',
  488. notStart:'',
  489. viewIs:'',
  490. checkState:''
  491. }
  492. },
  493. created() {
  494. const waterMarkText = '北区稽核平台';
  495. this.canvas = document.createElement('canvas');
  496. const ctx = this.canvas.getContext('2d');
  497. this.canvas.width = this.canvas.height = 100;
  498. ctx.textAlign = 'center';
  499. ctx.textBaseline = 'middle';
  500. ctx.globalAlpha = 0.08;
  501. ctx.font = '20px Microsoft Yahei';
  502. ctx.translate(50, 50);
  503. ctx.rotate(-Math.PI / 4);
  504. ctx.fillText(waterMarkText, 0, 0);
  505. //初始化日期 默认最近180天
  506. //this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
  507. //稽核任务列表(树)
  508. this.taskList();
  509. //this.queryParam.taskState = this.$route.query.state;
  510. this.searchQuery();
  511. // this.getSuperFieldList();
  512. },
  513. computed: {
  514. importExcelUrl: function(){
  515. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  516. },
  517. },
  518. filters: {
  519. statusTypeFilter(type) {
  520. const statusTypeMap = {
  521. '0': 'error',
  522. '1': 'error',
  523. '2': 'warning',
  524. '3': 'warning',
  525. '4': 'processing',
  526. '5': 'success'
  527. }
  528. return statusTypeMap[type]
  529. },
  530. statusFilter(status) {
  531. const statusMap = {
  532. '0': '未完善',
  533. '1': '未完善',
  534. '2': '待稽核',
  535. '3': '待稽核',
  536. '4': '待整改',
  537. '5': '通过'
  538. }
  539. return statusMap[status]
  540. }
  541. },
  542. methods: {
  543. showCheckList(record) {
  544. //this.$router.push({path: '/specialApply/task/checkStatisticsDetails', query: {id: record.id,customerNo: record.customerNo}});
  545. if (record.type==='3'){
  546. //特审复开审批 /specialApply/modules/TaskCheckDetails /sms/check/task/check/detail
  547. this.$router.push({ path: '/specialApply/modules/TaskCheckDetails', query:{id:record.id}});
  548. }
  549. if (record.type==='4'){
  550. // 中断线稽核详情
  551. this.$router.push({ path: '/truckCheck/modules/TaskCheckDetails', query:{id:record.id}});
  552. }
  553. if (record.type==='2'){
  554. // 物联网稽核
  555. this.$router.push({ path: '/lotCheck/modules/TaskCheckDetails', query:{id:record.id}});
  556. }
  557. if (record.type==='1'){
  558. // 行短稽核
  559. this.$router.push({ path: '/sms/check/task/check/detail', query:{id:record.id}});
  560. }
  561. },
  562. searchReset(){
  563. this.taskType='',
  564. this.taskState='',
  565. this.customerName='',
  566. this.startDate='',
  567. this.endDate='',
  568. this.taskName='',
  569. this.checkState='',
  570. this.customerNo='';
  571. let queryParam = {
  572. "customerName":this.customerName,
  573. "startDate": this.startDate,
  574. "endDate": this.endDate,
  575. "infoId":this.taskId,
  576. "taskName":this.taskName,
  577. "customerNo":this.customerNo,
  578. "taskType":this.taskType,
  579. "taskState":this.taskState,
  580. "checkState":this.checkState
  581. }
  582. this.statisticsCount(queryParam);
  583. this.selectList(queryParam);
  584. },
  585. searchQuery(){
  586. //直接加载urT. ist接口数据
  587. let queryParam = {
  588. "customerName":this.customerName,
  589. "startDate": this.startDate,
  590. "endDate": this.endDate,
  591. "infoId":this.taskId,
  592. "taskName":this.taskName,
  593. "customerNo":this.customerNo,
  594. "taskType":this.taskType,
  595. "taskState":this.taskState,
  596. "checkState":this.checkState
  597. }
  598. this.statisticsCount(queryParam);
  599. this.selectList(queryParam);
  600. },
  601. getSuperFieldList(){
  602. let fieldList=[];
  603. fieldList.push({type:'string',value:'taskName',text:'任务名称',dictCode:''})
  604. fieldList.push({type:'string',value:'taskState',text:'任务状态',dictCode:'sms_check_task_state'})
  605. fieldList.push({type:'datetime',value:'taskStartTime',text:'任务开始时间'})
  606. fieldList.push({type:'datetime',value:'taskEndTime',text:'任务结束时间'})
  607. fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
  608. fieldList.push({type:'string',value:'fileUrl',text:'文件路径',dictCode:''})
  609. fieldList.push({type:'string',value:'customerCount',text:'客户总数',dictCode:''})
  610. fieldList.push({type:'string',value:'checkCount',text:'稽核数',dictCode:''})
  611. this.superFieldList = fieldList
  612. },
  613. selectList(queryParam){
  614. this.viewIs=this.taskType;
  615. this.loadData(null,queryParam);
  616. },
  617. // 显示上传页面
  618. handSubmit(record) {
  619. let that = this;
  620. let model = {
  621. id: record.id,
  622. }
  623. postAction(this.url.editCheck, model)
  624. .then((res) => {
  625. if (res.success) {
  626. that.$message.success(res.message)
  627. that.loadData(that.ipagination.current);
  628. } else {
  629. that.$message.warning(res.message)
  630. }
  631. }).finally(() => {
  632. })
  633. },
  634. changeReportDate(a, event){
  635. this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
  636. this.statisticsCount(this.taskId);
  637. },
  638. //选择日期 读取数据
  639. handleChange(value,model){
  640. this.statisticsCount(this.taskId);
  641. },
  642. statisticsCount(queryParam) {
  643. if (this.taskType===''){
  644. getAction(this.url.statisticsCount, queryParam).then(res => {
  645. if (res.success) {
  646. this.lineNum = res.result["lineNum"] ;
  647. this.businessNum = res.result["businessNum"];
  648. this.reopeningNum = res.result["reopeningNum"];
  649. this.trunkLineAuditNum = res.result["trunkLineAuditNum"];
  650. this.sumCount = res.result["totalNum"];
  651. }
  652. }).finally(() => {
  653. })
  654. }else {
  655. getAction(this.url.statusToCount, queryParam).then(res => {
  656. if (res.success) {
  657. this.notStart = res.result["0"] ;
  658. this.inProgress = res.result["1"];
  659. this.completed = res.result["2"];
  660. this.sumCount = res.result["num"] ;
  661. }
  662. }).finally(() => {
  663. })
  664. }
  665. },
  666. //树点击事件
  667. onTreeNodeSelect(id) {
  668. if (id && id.length > 0) {
  669. if (id == "all") {
  670. this.taskId = null;
  671. this.searchQuery();
  672. return;
  673. }
  674. let split = id[0].split("key-");
  675. if (split.length == 2) {
  676. let taskId = split[1];
  677. this.taskId = taskId;
  678. //更新豆腐块 更新列表
  679. this.searchQuery();
  680. }
  681. }
  682. },
  683. onExpand(expandedKeys) {
  684. this.expandedKeys = expandedKeys;
  685. },
  686. taskDateList(taskData) {
  687. getAction(this.url["dateList"]).then(res => {
  688. if (res.success) {
  689. let result = res.result;
  690. let years = result[0];
  691. let months = result[1];
  692. let YearLevel = {}
  693. let monthLevel = {}
  694. for (var i in years) {
  695. let year = years[i].yearTime;
  696. let children = {
  697. "title": year,
  698. "key": year,
  699. "children": []
  700. }
  701. YearLevel[year] = children
  702. }
  703. for (var j in months) {
  704. let month = months[j].monthTime;
  705. let splitElement = month.split("-")[0];
  706. let children = {
  707. "title": month,
  708. "key": month,
  709. "children": []
  710. }
  711. YearLevel[splitElement].children.push(children)
  712. }
  713. for (var k in taskData) {
  714. let taskDatum = taskData[k];
  715. let taskStartTime = taskDatum.taskStartTime;
  716. let taskDatumType = taskDatum.type;
  717. let typeName ='';
  718. if (taskDatumType === 1) {
  719. typeName= '行短稽核';
  720. }else if (taskDatumType === 2) {
  721. typeName= '物联网稽核';
  722. }else if (taskDatumType === 3) {
  723. typeName= '复开审批';
  724. }else if (taskDatumType === 4) {
  725. typeName= '中继线稽核';
  726. }
  727. if (taskStartTime != null && taskStartTime != undefined) {
  728. let children = {
  729. "title": taskDatum.taskName + "[" + taskDatum.customerCount + "]"+ typeName,
  730. "key": "key" + "-" + taskDatum.id,
  731. "isLeaf": true,
  732. }
  733. let strings = taskStartTime.split("-");
  734. let year = strings[0];
  735. let month = strings[0] + "-" + strings[1];
  736. for (var z in YearLevel[year].children) {
  737. let title = YearLevel[year].children[z].title;
  738. if (title == month) {
  739. YearLevel[year].children[z].children.push(children);
  740. break;
  741. }
  742. }
  743. }
  744. }
  745. let allChildren = {
  746. "title": "全部任务",
  747. "key": "all",
  748. "children": []
  749. }
  750. for (var u in YearLevel) {
  751. this.treeData.push(YearLevel[u])
  752. }
  753. this.treeData.push(allChildren)
  754. this.treeData = this.treeData.reverse();
  755. }
  756. }
  757. )
  758. },
  759. //任务列表数据
  760. taskList() {
  761. let queryParam = {
  762. pageNo: 1,
  763. pageSize: 1000000,
  764. }
  765. getAction(this.url["taskList"], queryParam).then(res => {
  766. if (res.success) {
  767. let records = res.result.records;
  768. //稽核任务菜单
  769. this.taskDateList(records);
  770. }
  771. })
  772. },
  773. getRecentDay: function (n) {
  774. let day = moment(new Date())
  775. .subtract(n, "days")
  776. .format("YYYY-MM-DD");
  777. return day;
  778. },
  779. }
  780. }
  781. </script>
  782. <style scoped>
  783. </style>