浏览代码

稽核统计 xiangqing-2

sunyize 2 年之前
父节点
当前提交
09411cc0ec
共有 1 个文件被更改,包括 216 次插入88 次删除
  1. 216 88
      src/views/statistics/SmsCheckStatistics.vue

+ 216 - 88
src/views/statistics/SmsCheckStatistics.vue

@@ -40,17 +40,24 @@
                   <j-input placeholder="任务名称" v-model:value="taskName" ></j-input>
                 </a-form-item>
               </a-col>
+
+              <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                <a-form-item label="任务状态">
+                  <j-dict-select-tag placeholder="请选择任务状态" v-model:value="taskState"  dictCode="sms_check_task_state" />
+                </a-form-item>
+              </a-col>
+              <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                <a-form-item label="稽核类型">
+                  <j-dict-select-tag placeholder="请选择稽核类型" v-model:value="taskType"  dictCode="sms_check_task_type" />
+                </a-form-item>
+              </a-col>
+              <a-col :xl="6" :lg="7" :md="8" :sm="24">
+                <a-form-item label="稽核状态">
+                  <j-dict-select-tag placeholder="请选择稽核状态" v-model:value="checkState"  dictCode="sms_check_check_state" />
+                </a-form-item>
+              </a-col>
               <template v-if="toggleSearchStatus">
-                <a-col :xl="6" :lg="7" :md="8" :sm="24">
-                  <a-form-item label="任务状态">
-                    <j-dict-select-tag placeholder="请选择任务状态" v-model:value="taskState"  dictCode="sms_check_task_state" />
-                  </a-form-item>
-                </a-col>
-                <a-col :xl="6" :lg="7" :md="8" :sm="24">
-                  <a-form-item label="稽核类型">
-                    <j-dict-select-tag placeholder="请选择稽核类型" v-model:value="taskType"  dictCode="sms_check_task_type" />
-                  </a-form-item>
-                </a-col>
+
 
                 <a-col :xl="10" :lg="11" :md="12" :sm="24">
                   <a-form-item label="开始时间">
@@ -71,14 +78,9 @@
       </a-col>
       <!-- 操作按钮区域 -->
       <div class="table-operator">
-        <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
         <a-button type="primary" icon="download" @click="handleExportXls('稽核统计')">导出</a-button>
-        <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-          <a-button type="primary" icon="import">导入</a-button>
-        </a-upload>
         <!-- 高级查询区域 -->
-        <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
-        <a-dropdown v-if="selectedRowKeys.length > 0">
+         <a-dropdown v-if="selectedRowKeys.length > 0">
           <a-menu slot="overlay">
             <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
           </a-menu>
@@ -95,7 +97,7 @@
       </div>
       <!-- 查询区域-END -->
 
-      <a-col :span="5" style="padding-top: 10px">
+      <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === '' ">
         <a-card>
           <a-statistic
             title="行短稽核"
@@ -111,7 +113,7 @@
         </a-card>
       </a-col>
 
-      <a-col :span="5" style="padding-top: 10px">
+      <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === ''">
         <a-card>
           <a-statistic
             title="物联网业务稽核"
@@ -128,7 +130,7 @@
         </a-card>
       </a-col>
 
-      <a-col :span="5" style="padding-top: 10px">
+      <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs === ''">
         <a-card>
           <a-statistic
             title="复开审批"
@@ -144,7 +146,7 @@
           </a-statistic>
         </a-card>
       </a-col>
-      <a-col :span="4" style="padding-top: 10px">
+      <a-col :span="4" style="padding-top: 10px" v-if="this.viewIs === ''">
         <a-card>
           <a-statistic
             title="中继线稽核"
@@ -176,6 +178,60 @@
           </a-statistic>
         </a-card>
       </a-col>
+
+      <!--稽核状态 -->
+      <a-col :span="5" style="padding-top: 10px"  v-if="this.viewIs !== '' ">
+        <a-card>
+          <a-statistic
+            title="未开始"
+            :value="notStart"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#3f8600' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+      <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs !== '' ">
+        <a-card>
+          <a-statistic
+            title="进行中"
+            :value="inProgress"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#810320' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+      <a-col :span="5" style="padding-top: 10px" v-if="this.viewIs !== '' ">
+        <a-card>
+          <a-statistic
+            title="已结束"
+            :value="completed"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#3f8600' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+
+      <!--稽核状态 -->
+
+
       <a-col :span="19" style="top: 10px">
         <a-card title="稽核概况统计" :bordered="false">
           <!-- table区域-begin -->
@@ -255,9 +311,9 @@
               <template v-slot:customerName="text, record">
                 <a @click="showCheckDetail(record)">{{text}}</a>
               </template>
-              <!--              <template v-slot:checkState="status">-->
-              <!--                <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>-->
-              <!--              </template>-->
+                            <template v-slot:checkState="status">
+                              <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
+                            </template>
               <template v-slot:rowIndex="text,records,index">
                 {{ (ipagination.current - 1) * ipagination.pageSize + Number(index)+1 }}
               </template>
@@ -300,6 +356,8 @@ export default {
         "dateList": "/smsCheck/task/year/list",
         //基本信息 规范信息  附件资料 异常稽核统计
         "checkStateCount": "/smsCheck/workLog/check/state/count",
+        //各个稽核点状态
+        statusToCount:"/smsCheck/statistics/statusToCount",
         //各个稽核点个数
         "statisticsCount": "/smsCheck/statistics/count",
         //用户工作量接口
@@ -404,30 +462,30 @@ export default {
           align:"center",
           sorter: true,
           dataIndex: 'checkState',
+          scopedSlots: {customRender: 'checkState'},
         //  scopedSlots: { customRender: 'checkState' },
-          customRender:function (text,record,index) {
-            if (text === 0) {
-              return '未处理';
-            } else if (text === 1) {
-              return '未完善';
-            }else if (text === 2) {
-              return '待稽核';
-            }else if (text === 3) {
-              return '已整改';
-            }else if (text === 4) {
-              return '待整改';
-            }else if (text === 5) {
-              return '稽核通过';
-            }
-            return text;
-          }
+        //   customRender:function (text,record,index) {
+        //     if (text === 0) {
+        //       return '未处理';
+        //     } else if (text === 1) {
+        //       return '未完善';
+        //     }else if (text === 2) {
+        //       return '待稽核';
+        //     }else if (text === 3) {
+        //       return '已整改';
+        //     }else if (text === 4) {
+        //       return '待整改';
+        //     }else if (text === 5) {
+        //       return '稽核通过';
+        //     }
+        //     return text;
+        //   }
         },
         {
             title:'稽核类型',
             align:"center",
             sorter: true,
             dataIndex: 'type',
-            //  scopedSlots: { customRender: 'checkState' },
             customRender:function (text,record,index) {
               if (text === '1') {
                 return '行短稽核';
@@ -469,7 +527,12 @@ export default {
       taskId:'',
       taskName:'',
       taskState:'',
-      taskType:''
+      taskType:'',
+      completed:'',
+      inProgress:'',
+      notStart:'',
+      viewIs:'',
+      checkState:''
     }
   },
 
@@ -503,21 +566,79 @@ export default {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     },
   },
+
+  filters: {
+    statusTypeFilter(type) {
+      const statusTypeMap = {
+        '0': 'error',
+        '1': 'error',
+        '2': 'warning',
+        '3': 'warning',
+        '4': 'processing',
+        '5': 'success'
+      }
+      return statusTypeMap[type]
+    },
+    statusFilter(status) {
+      const statusMap = {
+        '0': '未完善',
+        '1': '未完善',
+        '2': '待稽核',
+        '3': '待稽核',
+        '4': '待整改',
+        '5': '通过'
+      }
+      return statusMap[status]
+    }
+  },
+
   methods: {
 
-    // 显示导入页面
+
     showCheckList(record) {
-      this.$router.push({path: '/specialApply/task/checkStatisticsDetails', query: {id: record.id,customerNo: record.customerNo}});
+      //this.$router.push({path: '/specialApply/task/checkStatisticsDetails', query: {id: record.id,customerNo: record.customerNo}});
+      if (record.type==='3'){
+        //特审复开审批 /specialApply/modules/TaskCheckDetails  /sms/check/task/check/detail
+        this.$router.push({ path: '/specialApply/modules/TaskCheckDetails', query:{id:record.id}});
+      }
+      if (record.type==='4'){
+
+        // 中断线稽核详情
+        this.$router.push({ path: '/truckCheck/modules/TaskCheckDetails', query:{id:record.id}});
+      }
+      if (record.type==='2'){
+
+        // 物联网稽核
+        this.$router.push({ path: '/lotCheck/modules/TaskCheckDetails', query:{id:record.id}});
+      }
+
+      if (record.type==='1'){
+        // 行短稽核
+        this.$router.push({ path: '/sms/check/task/check/detail', query:{id:record.id}});
+      }
     },
     searchReset(){
-          this.taskType='',
-          this.taskState='',
-          this.customerName='',
-          this.startDate='',
-          this.endDate='',
-          this.taskName='',
-          this.customerNo=''
-
+      this.taskType='',
+        this.taskState='',
+        this.customerName='',
+        this.startDate='',
+        this.endDate='',
+        this.taskName='',
+        this.checkState='',
+        this.customerNo='';
+        let queryParam = {
+        "customerName":this.customerName,
+        "startDate": this.startDate,
+        "endDate":  this.endDate,
+        "infoId":this.taskId,
+        "taskName":this.taskName,
+        "customerNo":this.customerNo,
+        "taskType":this.taskType,
+        "taskState":this.taskState,
+          "checkState":this.checkState
+      }
+        this.statisticsCount(queryParam);
+        this.selectList(queryParam);
     },
 
     searchQuery(){
@@ -530,8 +651,10 @@ export default {
         "taskName":this.taskName,
         "customerNo":this.customerNo,
         "taskType":this.taskType,
-        "taskState":this.taskState
+        "taskState":this.taskState,
+        "checkState":this.checkState
       }
+
       this.statisticsCount(queryParam);
       this.selectList(queryParam);
     },
@@ -549,35 +672,12 @@ export default {
       this.superFieldList = fieldList
     },
     selectList(queryParam){
+      this.viewIs=this.taskType;
       this.loadData(null,queryParam);
     },
 
 
-    tabChange (key) {
-      // 稽核状态(0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;)
-      if (key === 'all') {
-        this.currentCheckState = null;
-        this.queryParam.checkState_MultiString = this.currentCheckState;
-        this.currentTab = 'all';
-      } else if (key === 'undo') {
-        this.currentCheckState = '0,1';
-        this.queryParam.checkState_MultiString = this.currentCheckState;
-        this.currentTab = 'undo';
-      } else if (key === 'uncheck') {
-        this.currentCheckState = '2,3';
-        this.queryParam.checkState_MultiString = this.currentCheckState;
-        this.currentTab = 'uncheck';
-      } else if (key === 'checked') {
-        this.currentCheckState = '4';
-        this.queryParam.checkState_MultiString = this.currentCheckState;
-        this.currentTab = 'checked';
-      } else if (key === 'passed') {
-        this.currentCheckState = '5';
-        this.queryParam.checkState_MultiString = this.currentCheckState;
-        this.currentTab = 'passed';
-      }
-      this.loadData(1);
-    },
+
     // 显示上传页面
     handSubmit(record) {
       let that = this;
@@ -608,17 +708,31 @@ export default {
     },
 
     statisticsCount(queryParam) {
-      getAction(this.url.statisticsCount, queryParam).then(res => {
-        if (res.success) {
-          this.lineNum = res.result["lineNum"] ;
-          this.businessNum = res.result["businessNum"];
-          this.reopeningNum = res.result["reopeningNum"];
-          this.trunkLineAuditNum = res.result["trunkLineAuditNum"];
-          this.sumCount =  res.result["totalNum"];
-        }
-      }).finally(() => {
+      if (this.taskType===''){
+        getAction(this.url.statisticsCount, queryParam).then(res => {
+          if (res.success) {
+            this.lineNum = res.result["lineNum"] ;
+            this.businessNum = res.result["businessNum"];
+            this.reopeningNum = res.result["reopeningNum"];
+            this.trunkLineAuditNum = res.result["trunkLineAuditNum"];
+            this.sumCount =  res.result["totalNum"];
+          }
+        }).finally(() => {
+
+        })
+      }else {
+        getAction(this.url.statusToCount, queryParam).then(res => {
+          if (res.success) {
+            this.notStart = res.result["0"] ;
+            this.inProgress  = res.result["1"];
+            this.completed  = res.result["2"];
+            this.sumCount =  res.result["num"]  ;
+          }
+        }).finally(() => {
+
+        })
+      }
 
-      })
     },
 
     //树点击事件
@@ -675,9 +789,23 @@ export default {
             for (var k in taskData) {
               let taskDatum = taskData[k];
               let taskStartTime = taskDatum.taskStartTime;
+
+              let taskDatumType = taskDatum.type;
+              let typeName ='';
+              if (taskDatumType === 1) {
+                typeName= '行短稽核';
+              }else if (taskDatumType === 2) {
+                typeName=  '物联网稽核';
+              }else if (taskDatumType === 3) {
+                typeName=  '复开审批';
+              }else if (taskDatumType === 4) {
+                typeName=  '中继线稽核';
+              }
+
+
               if (taskStartTime != null && taskStartTime != undefined) {
                 let children = {
-                  "title": taskDatum.taskName + "[" + taskDatum.customerCount + "]",
+                  "title": taskDatum.taskName + "[" + taskDatum.customerCount + "]"+ typeName,
                   "key": "key" + "-" + taskDatum.id,
                   "isLeaf": true,
                 }