SmsCheckStatistics.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  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="check_status" />
  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="3" 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="4" 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="4" 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. <!--稽核状态-->
  210. <a-col :span="3" style="padding-top: 10px" >
  211. <a-card>
  212. <a-statistic
  213. title="未完善"
  214. :value="Incomplete"
  215. :precision="0"
  216. suffix="个"
  217. :value-style="{ color: '#fa073f' }"
  218. style="margin-right: 10px"
  219. >
  220. <template #prefix>
  221. </template>
  222. </a-statistic>
  223. </a-card>
  224. </a-col>
  225. <a-col :span="4" style="padding-top: 10px" >
  226. <a-card>
  227. <a-statistic
  228. title="待稽核"
  229. :value="toBeAudited"
  230. :precision="0"
  231. suffix="个"
  232. :value-style="{ color: '#810320' }"
  233. style="margin-right: 50px"
  234. >
  235. <template #prefix>
  236. </template>
  237. </a-statistic>
  238. </a-card>
  239. </a-col>
  240. <a-col :span="4" style="padding-top: 10px" >
  241. <a-card>
  242. <a-statistic
  243. title="待整改"
  244. :value="toBeRectified"
  245. :precision="0"
  246. suffix="个"
  247. :value-style="{ color: '#0a0a09' }"
  248. style="margin-right: 50px"
  249. >
  250. <template #prefix>
  251. </template>
  252. </a-statistic>
  253. </a-card>
  254. </a-col>
  255. <a-col :span="4" style="padding-top: 10px" >
  256. <a-card>
  257. <a-statistic
  258. title="通过"
  259. :value="pass"
  260. :precision="0"
  261. suffix="个"
  262. :value-style="{ color: '#3f8600' }"
  263. style="margin-right: 50px"
  264. >
  265. <template #prefix>
  266. </template>
  267. </a-statistic>
  268. </a-card>
  269. </a-col>
  270. <!--稽核状态-->
  271. <a-col :span="19" style="top: 10px">
  272. <a-card title="稽核概况统计" :bordered="false">
  273. <!-- table区域-begin -->
  274. <div>
  275. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  276. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  277. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  278. </div>
  279. <a-table
  280. ref="table"
  281. size="middle"
  282. :scroll="{x:true}"
  283. bordered
  284. rowKey="id"
  285. :columns="columns"
  286. :dataSource="dataSource"
  287. :pagination="ipagination"
  288. :loading="loading"
  289. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  290. class="j-table-force-nowrap"
  291. @change="handleTableChange">
  292. <template slot="action" slot-scope="text, record">
  293. <!-- <span v-has="'task:check:list:improve'" v-if="record.checkState == 1 || record.checkState == 0-->
  294. <!-- || record.checkState == 3 || record.checkState == 4" >-->
  295. <!-- <a @click="showImprove(record)">完善</a>-->
  296. <!-- <a-divider type="vertical"/>-->
  297. <!-- </span>-->
  298. <!-- <span v-has="'task:check:list:upload'" v-if="record.checkState == 1 || record.checkState == 0-->
  299. <!-- || record.checkState == 3 || record.checkState == 4">-->
  300. <!-- <a @click="showUpload(record)">上传</a>-->
  301. <!-- <a-divider type="vertical"/>-->
  302. <!-- </span>-->
  303. <!-- <span v-has="'task:check:list:submit'" v-if="record.checkState == 1 || record.checkState == 4">-->
  304. <!-- <a @click="handSubmit(record)">提交</a>-->
  305. <!-- <a-divider type="vertical"/>-->
  306. <!-- </span>-->
  307. <!-- <span v-has="'task:check:list:check'" v-if="record.checkState === 2 || record.checkState === 3">-->
  308. <!-- <a @click="showCheckCheck(record)">稽核</a>-->
  309. <!-- <a-divider type="vertical" />-->
  310. <!-- </span>-->
  311. <!-- <span v-has="'task:check:list:history'" v-if="record.checkState >= 4">-->
  312. <!-- <a @click="showCheckLog(record)">历史</a>-->
  313. <!-- <a-divider type="vertical" />-->
  314. <!-- </span>-->
  315. <span v-has="'task:check:list:notice'" >
  316. <a @click="showCheckList(record)">详情</a>
  317. <a-divider type="vertical" />
  318. </span>
  319. <a-dropdown>
  320. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  321. <a-menu slot="overlay">
  322. <a-menu-item v-has="'task:check:list:delete'">
  323. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  324. <a>删除</a>
  325. </a-popconfirm>
  326. </a-menu-item>
  327. <a-menu-item v-has="'task:check:list:clear'">
  328. <a-popconfirm title="确定清空吗?" @confirm="() => dataDelete(record.id)">
  329. <a>清空</a>
  330. </a-popconfirm>
  331. </a-menu-item>
  332. </a-menu>
  333. </a-dropdown>
  334. </template>
  335. <template v-slot:customerName="text, record">
  336. <a @click="showCheckDetail(record)">{{text}}</a>
  337. </template>
  338. <template v-slot:checkState="status">
  339. <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
  340. </template>
  341. <template v-slot:rowIndex="text,records,index">
  342. {{ (ipagination.current - 1) * ipagination.pageSize + Number(index)+1 }}
  343. </template>
  344. </a-table>
  345. </div>
  346. <!-- table区域 end -->
  347. </a-card>
  348. </a-col>
  349. </a-row>
  350. </div>
  351. <!-- 查询区域 -->
  352. </template>
  353. <script>
  354. import moment from 'moment';
  355. import {getAction} from "@api/manage";
  356. import * as echarts from 'echarts';
  357. import '@/assets/less/TableExpand.less'
  358. import { JeecgListMixin } from '@/mixins/JeecgListMixin';
  359. import { mixinDevice } from '@/utils/mixin'
  360. export default {
  361. name: 'SmsCheckWorkLogList',
  362. mixins:[JeecgListMixin,mixinDevice],
  363. data() {
  364. return {
  365. description: '稽核工作日志管理页面',
  366. startDate: '',
  367. endDate:'',
  368. superFieldList:[],
  369. taskDate:'',
  370. customerNo:'',
  371. customerName:'',
  372. url: {
  373. "statusRefuse": "/smsCheck/customerInfo/status/refuse",
  374. "taskList": "/smsCheck/task/list",
  375. "dateList": "/smsCheck/task/year/list",
  376. //基本信息 规范信息 附件资料 异常稽核统计
  377. "checkStateCount": "/smsCheck/workLog/check/state/count",
  378. //各个稽核点状态
  379. statusToCount:"/smsCheck/statistics/statusToCount",
  380. //根据稽核状态 查 任务状稽核类型统计数
  381. checkStatusToCount:"/smsCheck/statistics/checkStatusToCount",
  382. //各个稽核点个数
  383. "statisticsCount": "/smsCheck/statistics/count",
  384. //用户工作量接口
  385. "findStaffNoCount" : "/smsCheck/workLog/find/staff/no/count",
  386. queryTask: "/smsCheck/task/queryById",
  387. list: "/smsCheck/statistics/list",
  388. count: "/smsCheck/customerInfo/count",
  389. delete: "/smsCheck/customerInfo/delete",
  390. edit: "/smsCheck/customerInfo/edit",
  391. notice: "/smsCheck/customerInfo/notice",
  392. editCheck: "/smsCheck/customerInfo/edit/check/state",
  393. dataDelete: "/smsCheck/customerData/clear",
  394. deleteBatch:"/smsCheck/statistics/deleteBatch",
  395. exportXlsUrl: "/smsCheck/statistics/exportXls",
  396. importExcelUrl:""
  397. },
  398. columns: [
  399. {
  400. title: '#',
  401. dataIndex: '',
  402. key:'rowIndex',
  403. width:60,
  404. align:"center",
  405. scopedSlots: { customRender: 'rowIndex' }
  406. },{
  407. title:'任务状态',
  408. align:"left",
  409. sorter: true,
  410. dataIndex: 'taskState',
  411. customRender:function (text,record,index) {
  412. if (text === '0') {
  413. return '未开始';
  414. } else if (text === '1') {
  415. return '进行中';
  416. }else if (text === '2') {
  417. return '已结束';
  418. }
  419. return text;
  420. }
  421. },{
  422. title:'任务名称',
  423. align:"left",
  424. sorter: true,
  425. dataIndex: 'taskName'
  426. },
  427. {
  428. title:'客户名称',
  429. align:"left",
  430. sorter: true,
  431. dataIndex: 'customerName',
  432. scopedSlots: { customRender: 'customerName' }
  433. },
  434. {
  435. title:'客户编号',
  436. align:"center",
  437. sorter: true,
  438. dataIndex: 'customerNo'
  439. },
  440. {
  441. title:'服务号码(全)',
  442. align:"center",
  443. dataIndex: 'smsNumber'
  444. },
  445. {
  446. title:'用户编号',
  447. align:"center",
  448. dataIndex: 'userNo'
  449. },
  450. {
  451. title:'入网时间',
  452. align:"center",
  453. sorter: true,
  454. dataIndex: 'networkAccessTime'
  455. },
  456. {
  457. title:'用户状态',
  458. align:"center",
  459. dataIndex: 'userState',
  460. customRender:function (text,record,index) {
  461. if (text === '1') {
  462. return '在用';
  463. } else if (text === '2') {
  464. return '拆机';
  465. }
  466. return text;
  467. }
  468. },
  469. {
  470. title:'员工姓名',
  471. align:"center",
  472. dataIndex: 'staffName'
  473. },
  474. {
  475. title:'员工工号',
  476. align:"center",
  477. sorter: true,
  478. dataIndex: 'staffNo'
  479. },
  480. {
  481. title:'稽核状态',
  482. align:"center",
  483. sorter: true,
  484. dataIndex: 'checkState',
  485. scopedSlots: {customRender: 'checkState'},
  486. // scopedSlots: { customRender: 'checkState' },
  487. // customRender:function (text,record,index) {
  488. // if (text === 0) {
  489. // return '未处理';
  490. // } else if (text === 1) {
  491. // return '未完善';
  492. // }else if (text === 2) {
  493. // return '待稽核';
  494. // }else if (text === 3) {
  495. // return '已整改';
  496. // }else if (text === 4) {
  497. // return '待整改';
  498. // }else if (text === 5) {
  499. // return '稽核通过';
  500. // }
  501. // return text;
  502. // }
  503. },
  504. {
  505. title:'稽核类型',
  506. align:"center",
  507. sorter: true,
  508. dataIndex: 'type',
  509. customRender:function (text,record,index) {
  510. if (text === '1') {
  511. return '行短稽核';
  512. }else if (text === '2') {
  513. return '物联网业务稽核';
  514. }else if (text === '3') {
  515. return '防诈骗方向复开';
  516. }else if (text === '4') {
  517. return '中继线稽核';
  518. }
  519. }
  520. },
  521. {
  522. title: '操作',
  523. dataIndex: 'action',
  524. align:"center",
  525. scopedSlots: { customRender: 'action' }
  526. }
  527. ],
  528. isorter:{
  529. column: 'checkState',
  530. order: 'asc',
  531. },
  532. $abnormalCheckPie: "",
  533. $abnormalCheckHistogram: "",
  534. $abnormalCreateTimeTrend: "",
  535. lineNum: 0,
  536. latestDate: '180',
  537. reopeningNum: 0,
  538. businessNum: 0,
  539. trunkLineAuditNum: 0,
  540. sumCount:0,
  541. treeData: [],
  542. expandedKeys: ['2022', '2022-10'],
  543. selectedKeys: {},
  544. statusAuditPieData: [],
  545. canvas: {},
  546. taskId:'',
  547. taskName:'',
  548. taskState:'',
  549. taskType:'',
  550. completed:'',
  551. inProgress:'',
  552. notStart:'',
  553. viewIs:'',
  554. checkState:'',
  555. Incomplete:'',
  556. toBeAudited:'',
  557. toBeRectified:'',
  558. pass:''
  559. }
  560. },
  561. created() {
  562. const waterMarkText = '业务风险管控智能化系统';
  563. this.canvas = document.createElement('canvas');
  564. const ctx = this.canvas.getContext('2d');
  565. this.canvas.width = this.canvas.height = 100;
  566. ctx.textAlign = 'center';
  567. ctx.textBaseline = 'middle';
  568. ctx.globalAlpha = 0.08;
  569. ctx.font = '20px Microsoft Yahei';
  570. ctx.translate(50, 50);
  571. ctx.rotate(-Math.PI / 4);
  572. ctx.fillText(waterMarkText, 0, 0);
  573. //初始化日期 默认最近180天
  574. //this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
  575. //稽核任务列表(树)
  576. this.taskList();
  577. //this.queryParam.taskState = this.$route.query.state;
  578. this.searchQuery();
  579. // this.getSuperFieldList();
  580. },
  581. computed: {
  582. importExcelUrl: function(){
  583. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  584. },
  585. },
  586. filters: {
  587. statusTypeFilter(type) {
  588. const statusTypeMap = {
  589. '0': 'error',
  590. '1': 'error',
  591. '2': 'warning',
  592. '3': 'warning',
  593. '4': 'processing',
  594. '5': 'success'
  595. }
  596. return statusTypeMap[type]
  597. },
  598. statusFilter(status) {
  599. const statusMap = {
  600. '0': '未完善',
  601. '1': '未完善',
  602. '2': '待稽核',
  603. '3': '待稽核',
  604. '4': '待整改',
  605. '5': '通过'
  606. }
  607. return statusMap[status]
  608. }
  609. },
  610. methods: {
  611. showCheckList(record) {
  612. //this.$router.push({path: '/specialApply/task/checkStatisticsDetails', query: {id: record.id,customerNo: record.customerNo}});
  613. if (record.type==='3'){
  614. //特审复开审批 /specialApply/modules/TaskCheckDetails /sms/check/task/check/detail
  615. this.$router.push({ path: '/specialApply/modules/TaskCheckDetails', query:{id:record.id}});
  616. }
  617. if (record.type==='4'){
  618. // 中断线稽核详情
  619. this.$router.push({ path: '/truckCheck/modules/TaskCheckDetails', query:{id:record.id}});
  620. }
  621. if (record.type==='2'){
  622. // 物联网稽核
  623. this.$router.push({ path: '/lotCheck/modules/TaskCheckDetails', query:{id:record.id}});
  624. }
  625. if (record.type==='1'){
  626. // 行短稽核
  627. this.$router.push({ path: '/sms/check/task/check/detail', query:{id:record.id}});
  628. }
  629. },
  630. searchReset(){
  631. this.taskType='',
  632. this.taskState='',
  633. this.customerName='',
  634. this.startDate='',
  635. this.endDate='',
  636. this.taskName='',
  637. this.checkState='',
  638. this.customerNo='';
  639. let queryParam = {
  640. "customerName":this.customerName,
  641. "startDate": this.startDate,
  642. "endDate": this.endDate,
  643. "infoId":this.taskId,
  644. "taskName":this.taskName,
  645. "customerNo":this.customerNo,
  646. "taskType":this.taskType,
  647. "taskState":this.taskState,
  648. "checkState":this.checkState
  649. }
  650. this.statisticsCount(queryParam);
  651. this.selectList(queryParam);
  652. },
  653. searchQuery(){
  654. //直接加载urT. ist接口数据
  655. let queryParam = {
  656. "customerName":this.customerName,
  657. "startDate": this.startDate,
  658. "endDate": this.endDate,
  659. "infoId":this.taskId,
  660. "taskName":this.taskName,
  661. "customerNo":this.customerNo,
  662. "taskType":this.taskType,
  663. "taskState":this.taskState,
  664. "checkState":this.checkState
  665. }
  666. this.statisticsCount(queryParam);
  667. this.selectList(queryParam);
  668. },
  669. getSuperFieldList(){
  670. let fieldList=[];
  671. fieldList.push({type:'string',value:'taskName',text:'任务名称',dictCode:''})
  672. fieldList.push({type:'string',value:'taskState',text:'任务状态',dictCode:'sms_check_task_state'})
  673. fieldList.push({type:'datetime',value:'taskStartTime',text:'任务开始时间'})
  674. fieldList.push({type:'datetime',value:'taskEndTime',text:'任务结束时间'})
  675. fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
  676. fieldList.push({type:'string',value:'fileUrl',text:'文件路径',dictCode:''})
  677. fieldList.push({type:'string',value:'customerCount',text:'客户总数',dictCode:''})
  678. fieldList.push({type:'string',value:'checkCount',text:'稽核数',dictCode:''})
  679. this.superFieldList = fieldList
  680. },
  681. selectList(queryParam){
  682. this.viewIs=this.taskType;
  683. this.loadData(null,queryParam);
  684. },
  685. // 显示上传页面
  686. handSubmit(record) {
  687. let that = this;
  688. let model = {
  689. id: record.id,
  690. }
  691. postAction(this.url.editCheck, model)
  692. .then((res) => {
  693. if (res.success) {
  694. that.$message.success(res.message)
  695. that.loadData(that.ipagination.current);
  696. } else {
  697. that.$message.warning(res.message)
  698. }
  699. }).finally(() => {
  700. })
  701. },
  702. changeReportDate(a, event){
  703. this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
  704. this.statisticsCount(this.taskId);
  705. },
  706. //选择日期 读取数据
  707. handleChange(value,model){
  708. this.statisticsCount(this.taskId);
  709. },
  710. statisticsCount(queryParam) {
  711. //根据稽核状态 查 任务状稽核类型统计数
  712. getAction(this.url.checkStatusToCount, queryParam).then(res => {
  713. if (res.success) {
  714. this.Incomplete = res.result["0"] ;
  715. this.toBeAudited = res.result["2"];
  716. this.toBeRectified = res.result["4"];
  717. this.pass = res.result["5"];
  718. }
  719. }).finally(() => {
  720. })
  721. if (this.taskType===''){
  722. getAction(this.url.statisticsCount, queryParam).then(res => {
  723. if (res.success) {
  724. this.lineNum = res.result["lineNum"] ;
  725. this.businessNum = res.result["businessNum"];
  726. this.reopeningNum = res.result["reopeningNum"];
  727. this.trunkLineAuditNum = res.result["trunkLineAuditNum"];
  728. this.sumCount = res.result["totalNum"];
  729. }
  730. }).finally(() => {
  731. })
  732. }else {
  733. getAction(this.url.statusToCount, queryParam).then(res => {
  734. if (res.success) {
  735. this.notStart = res.result["0"] ;
  736. this.inProgress = res.result["1"];
  737. this.completed = res.result["2"];
  738. this.sumCount = res.result["num"] ;
  739. }
  740. }).finally(() => {
  741. })
  742. }
  743. },
  744. //树点击事件
  745. onTreeNodeSelect(id) {
  746. if (id && id.length > 0) {
  747. if (id == "all") {
  748. this.taskId = null;
  749. this.searchQuery();
  750. return;
  751. }
  752. let split = id[0].split("key-");
  753. if (split.length == 2) {
  754. let taskId = split[1];
  755. this.taskId = taskId;
  756. //更新豆腐块 更新列表
  757. this.searchQuery();
  758. }
  759. }
  760. },
  761. onExpand(expandedKeys) {
  762. this.expandedKeys = expandedKeys;
  763. },
  764. taskDateList(taskData) {
  765. getAction(this.url["dateList"]).then(res => {
  766. if (res.success) {
  767. let result = res.result;
  768. let years = result[0];
  769. let months = result[1];
  770. let YearLevel = {}
  771. let monthLevel = {}
  772. for (var i in years) {
  773. let year = years[i].yearTime;
  774. let children = {
  775. "title": year,
  776. "key": year,
  777. "children": []
  778. }
  779. YearLevel[year] = children
  780. }
  781. for (var j in months) {
  782. let month = months[j].monthTime;
  783. let splitElement = month.split("-")[0];
  784. let children = {
  785. "title": month,
  786. "key": month,
  787. "children": []
  788. }
  789. YearLevel[splitElement].children.push(children)
  790. }
  791. for (var k in taskData) {
  792. let taskDatum = taskData[k];
  793. let taskStartTime = taskDatum.taskStartTime;
  794. let taskDatumType = taskDatum.type;
  795. let typeName ='';
  796. if (taskDatumType === 1) {
  797. typeName= '行短稽核';
  798. }else if (taskDatumType === 2) {
  799. typeName= '物联网稽核';
  800. }else if (taskDatumType === 3) {
  801. typeName= '复开审批';
  802. }else if (taskDatumType === 4) {
  803. typeName= '中继线稽核';
  804. }
  805. if (taskStartTime != null && taskStartTime != undefined) {
  806. let children = {
  807. "title": taskDatum.taskName + "[" + taskDatum.customerCount + "]"+ typeName,
  808. "key": "key" + "-" + taskDatum.id,
  809. "isLeaf": true,
  810. }
  811. let strings = taskStartTime.split("-");
  812. let year = strings[0];
  813. let month = strings[0] + "-" + strings[1];
  814. for (var z in YearLevel[year].children) {
  815. let title = YearLevel[year].children[z].title;
  816. if (title == month) {
  817. YearLevel[year].children[z].children.push(children);
  818. break;
  819. }
  820. }
  821. }
  822. }
  823. let allChildren = {
  824. "title": "全部任务",
  825. "key": "all",
  826. "children": []
  827. }
  828. for (var u in YearLevel) {
  829. this.treeData.push(YearLevel[u])
  830. }
  831. this.treeData.push(allChildren)
  832. this.treeData = this.treeData.reverse();
  833. }
  834. }
  835. )
  836. },
  837. //任务列表数据
  838. taskList() {
  839. let queryParam = {
  840. pageNo: 1,
  841. pageSize: 1000000,
  842. }
  843. getAction(this.url["taskList"], queryParam).then(res => {
  844. if (res.success) {
  845. let records = res.result.records;
  846. //稽核任务菜单
  847. this.taskDateList(records);
  848. }
  849. })
  850. },
  851. getRecentDay: function (n) {
  852. let day = moment(new Date())
  853. .subtract(n, "days")
  854. .format("YYYY-MM-DD");
  855. return day;
  856. },
  857. }
  858. }
  859. </script>
  860. <style scoped>
  861. </style>