sunyize 2 роки тому
батько
коміт
9fe4c9e550
1 змінених файлів з 665 додано та 0 видалено
  1. 665 0
      src/views/statistics/SmsCheckStatistics.vue

+ 665 - 0
src/views/statistics/SmsCheckStatistics.vue

@@ -0,0 +1,665 @@
+<template>
+
+  <div>
+
+    <a-row :gutter="16" style="height: 800px">
+      <a-col :span="5" style="height: 100%;">
+        <a-card title="任务选择" :bordered="false" style="height: 100%">
+          <a-directory-tree
+            style="height: auto"
+            v-model:expandedKeys="expandedKeys"
+            v-model:selectedKeys="selectedKeys"
+            multiple
+            :tree-data="treeData"
+            @expand="onExpand"
+            @select="onTreeNodeSelect"
+          ></a-directory-tree>
+        </a-card>
+      </a-col>
+
+
+
+
+<!--      &lt;!&ndash; 查询区域 &ndash;&gt;-->
+<!--      <div class="table-page-search-wrapper">-->
+<!--        <a-form layout="inline" @keyup.enter.native="searchQuery">-->
+<!--          <a-row :gutter="24">-->
+<!--            <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
+<!--              <a-form-item label="任务名称">-->
+<!--                <j-input placeholder="请输入任务名称" v-model="queryParam.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="queryParam.taskState" dictCode="sms_check_task_state"/>-->
+<!--              </a-form-item>-->
+<!--            </a-col>-->
+<!--            <template v-if="toggleSearchStatus">-->
+<!--              <a-col :xl="10" :lg="11" :md="12" :sm="24">-->
+<!--                <a-form-item label="开始时间">-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.taskStartTime_begin"></j-date>-->
+<!--                  <span class="query-group-split-cust"></span>-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.taskStartTime_end"></j-date>-->
+<!--                </a-form-item>-->
+<!--              </a-col>-->
+<!--              <a-col :xl="10" :lg="11" :md="12" :sm="24">-->
+<!--                <a-form-item label="结束时间">-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.taskEndTime_begin"></j-date>-->
+<!--                  <span class="query-group-split-cust"></span>-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.taskEndTime_end"></j-date>-->
+<!--                </a-form-item>-->
+<!--              </a-col>-->
+<!--            </template>-->
+<!--            <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
+<!--            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
+<!--              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>-->
+<!--              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
+<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
+<!--                {{ toggleSearchStatus ? '收起' : '展开' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
+<!--              </a>-->
+<!--            </span>-->
+<!--            </a-col>-->
+<!--          </a-row>-->
+<!--        </a-form>-->
+<!--      </div>-->
+
+<!--      &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
+<!--      <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>-->
+<!--        &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--        <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--        <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>-->
+<!--          <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+<!--        </a-dropdown>-->
+<!--      </div>-->
+      <!-- 查询区域-END -->
+      <!--筛选条件-->
+      <a-col :span="19">
+        <a-form layout="inline">
+          <a-row :gutter="24">
+            <a-form-item label="任务状态">
+              <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.taskState" dictCode="sms_check_task_state"/>
+            </a-form-item>
+            <a-col :xl="16" :lg="7" :md="8" :sm="24">
+              <a-form-item label="稽核工作日期范围">
+                <a-range-picker @change="handleChange" v-model:value="taskDate"/>
+                <a-radio-group @change="changeReportDate()" style="padding-left: 10px" v-model:value="latestDate" button-style="solid">
+                  <a-radio-button value="7">最近7天</a-radio-button>
+                  <a-radio-button value="30">最近30天</a-radio-button>
+                  <a-radio-button value="180">最近180天</a-radio-button>
+                </a-radio-group>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </a-col>
+
+      <a-col :span="5" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="行短稽核"
+            :value="lineNum"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#fa073f' }"
+            style="margin-right: 10px"
+          >
+            <template #prefix>
+              <arrow-up-outlined/>
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+
+      <a-col :span="5" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="物联网业务稽核"
+            :value="businessNum"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#810320' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+              <arrow-up-outlined/>
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+
+      <a-col :span="5" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="复开审批"
+            :value="reopeningNum"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#0a0a09' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+              <arrow-up-outlined/>
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+      <a-col :span="4" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="中继线稽核"
+            :value="trunkLineAuditNum"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#3f8600' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+              <arrow-up-outlined/>
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+      <a-col :span="4" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="新增稽核数量"
+            :value="sumCount"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#3f8600' }"
+            style="margin-right: 50px"
+          >
+            <template #prefix>
+              <arrow-up-outlined/>
+            </template>
+          </a-statistic>
+        </a-card>
+      </a-col>
+      <a-col :span="19" style="top: 10px">
+        <a-card title="稽核概况统计" :bordered="false">
+          <!-- table区域-begin -->
+          <div>
+            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+              <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+              <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+            </div>
+
+            <a-table
+              ref="table"
+              size="middle"
+              :scroll="{x:true}"
+              bordered
+              rowKey="id"
+              :columns="columns"
+              :dataSource="dataSource"
+              :pagination="ipagination"
+              :loading="loading"
+              :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+              class="j-table-force-nowrap"
+              @change="handleTableChange">
+
+
+              <template slot="action" slot-scope="text, record">
+            <span v-has="'task:check:list:improve'" v-if="record.checkState == 1 || record.checkState == 0
+            || record.checkState == 3 || record.checkState == 4" >
+              <a @click="showImprove(record)">完善</a>
+              <a-divider type="vertical"/>
+            </span>
+
+                <span v-has="'task:check:list:upload'" v-if="record.checkState == 1 || record.checkState == 0
+            || record.checkState == 3 || record.checkState == 4">
+              <a @click="showUpload(record)">上传</a>
+              <a-divider type="vertical"/>
+            </span>
+
+                <span v-has="'task:check:list:submit'" v-if="record.checkState == 1 || record.checkState == 4">
+              <a @click="handSubmit(record)">提交</a>
+              <a-divider type="vertical"/>
+            </span>
+
+                <span v-has="'task:check:list:check'" v-if="record.checkState === 2 || record.checkState === 3">
+              <a @click="showCheckCheck(record)">稽核</a>
+              <a-divider type="vertical" />
+            </span>
+
+                <span v-has="'task:check:list:history'" v-if="record.checkState >= 4">
+              <a @click="showCheckLog(record)">历史</a>
+              <a-divider type="vertical" />
+            </span>
+
+                <span v-has="'task:check:list:notice'" v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
+              <a @click="noticeDeal(record)">催办</a>
+              <a-divider type="vertical" />
+            </span>
+
+                <a-dropdown>
+                  <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+                  <a-menu slot="overlay">
+
+                    <a-menu-item v-has="'task:check:list:delete'">
+                      <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                        <a>删除</a>
+                      </a-popconfirm>
+                    </a-menu-item>
+                    <a-menu-item v-has="'task:check:list:clear'">
+                      <a-popconfirm title="确定清空吗?" @confirm="() => dataDelete(record.id)">
+                        <a>清空</a>
+                      </a-popconfirm>
+                    </a-menu-item>
+                  </a-menu>
+                </a-dropdown>
+              </template>
+
+              <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:rowIndex="text,records,index">
+                {{ (ipagination.current - 1) * ipagination.pageSize + Number(index)+1 }}
+              </template>
+
+            </a-table>
+
+          </div>
+          <!-- table区域 end -->
+        </a-card>
+      </a-col>
+    </a-row>
+  </div>
+  <!-- 查询区域 -->
+</template>
+
+<script>
+
+
+import moment from 'moment';
+import {getAction} from "@api/manage";
+import * as echarts from 'echarts';
+import '@/assets/less/TableExpand.less'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin';
+
+export default {
+  name: 'SmsCheckWorkLogList',
+  mixins:[JeecgListMixin],
+  data() {
+    return {
+      description: '稽核工作日志管理页面',
+      taskDate: '',
+      url: {
+        "statusRefuse": "/smsCheck/customerInfo/status/refuse",
+        "taskList": "/smsCheck/task/list",
+        "dateList": "/smsCheck/task/year/list",
+        //基本信息 规范信息  附件资料 异常稽核统计
+        "checkStateCount": "/smsCheck/workLog/check/state/count",
+        //各个稽核点个数
+        "statisticsCount": "/smsCheck/statistics/count",
+        //用户工作量接口
+        "findStaffNoCount" : "/smsCheck/workLog/find/staff/no/count",
+        queryTask: "/smsCheck/task/queryById",
+        list: "/smsCheck/statistics/list",
+        count: "/smsCheck/customerInfo/count",
+        delete: "/smsCheck/customerInfo/delete",
+        edit: "/smsCheck/customerInfo/edit",
+        notice: "/smsCheck/customerInfo/notice",
+        editCheck: "/smsCheck/customerInfo/edit/check/state",
+        dataDelete: "/smsCheck/customerData/clear",
+        exportXlsUrl: "smsCheck/customerInfo/exportXls",
+      },
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          scopedSlots: { customRender: 'rowIndex' }
+        },
+        {
+          title:'客户名称',
+          align:"left",
+          sorter: true,
+          dataIndex: 'customerName',
+          scopedSlots: { customRender: 'customerName' }
+        },
+        {
+          title:'客户编号',
+          align:"center",
+          sorter: true,
+          dataIndex: 'customerNo'
+        },
+        {
+          title:'服务号码(全)',
+          align:"center",
+          dataIndex: 'smsNumber'
+        },
+        {
+          title:'用户编号',
+          align:"center",
+          dataIndex: 'userNo'
+        },
+        {
+          title:'入网时间',
+          align:"center",
+          sorter: true,
+          dataIndex: 'networkAccessTime'
+        },
+        {
+          title:'用户状态',
+          align:"center",
+          dataIndex: 'userState',
+          customRender:function (text,record,index) {
+            if (text === '1') {
+              return '在用';
+            } else if (text === '2') {
+              return '拆机';
+            }
+            return text;
+          }
+        },
+        {
+          title:'员工姓名',
+          align:"center",
+          dataIndex: 'staffName'
+        },
+        {
+          title:'员工工号',
+          align:"center",
+          sorter: true,
+          dataIndex: 'staffNo'
+        },
+        {
+          title:'稽核进度',
+          align:"center",
+          sorter: true,
+          dataIndex: 'checkState',
+          scopedSlots: { customRender: 'checkState' }
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align:"center",
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      isorter:{
+        column: 'checkState',
+        order: 'asc',
+      },
+
+      $abnormalCheckPie: "",
+      $abnormalCheckHistogram: "",
+      $abnormalCreateTimeTrend: "",
+      lineNum: 0,
+      latestDate: '180',
+      reopeningNum: 0,
+      businessNum: 0,
+      trunkLineAuditNum: 0,
+      sumCount:0,
+      treeData: [],
+      expandedKeys: ['2022', '2022-10'],
+      selectedKeys: {},
+      statusAuditPieData: [],
+      canvas: {},
+      taskId:'',
+
+    }
+  },
+
+  created() {
+
+
+    const waterMarkText = '北区稽核平台';
+    this.canvas = document.createElement('canvas');
+    const ctx = this.canvas.getContext('2d');
+    this.canvas.width = this.canvas.height = 100;
+    ctx.textAlign = 'center';
+    ctx.textBaseline = 'middle';
+    ctx.globalAlpha = 0.08;
+    ctx.font = '20px Microsoft Yahei';
+    ctx.translate(50, 50);
+    ctx.rotate(-Math.PI / 4);
+    ctx.fillText(waterMarkText, 0, 0);
+    this.statisticsCount(this.taskId);
+    //初始化日期 默认最近180天
+    this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
+
+    //稽核任务列表(树)
+    this.taskList();
+
+    this.abnormalCreateTime(this.taskId);
+    this.queryParam.taskState = this.$route.query.state;
+
+    this.selectList();
+
+    this.loadData(null,queryParam);
+    //this.getSuperFieldList();
+
+  },
+  computed: {},
+
+  methods: {
+
+    selectList(){
+      let taskDate = this.taskDate;
+      //直接加载urT. ist接口数据
+      let queryParam = {
+        "startDate": taskDate[0],
+        "endDate": taskDate[1],
+        "infoId":this.taskId
+      }
+
+      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;
+      let model = {
+        id: record.id,
+      }
+      postAction(this.url.editCheck, model)
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message)
+            that.loadData(that.ipagination.current);
+          } else {
+            that.$message.warning(res.message)
+          }
+        }).finally(() => {
+
+      })
+    },
+    changeReportDate(a, event){
+      this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
+      this.statisticsCount(this.taskId);
+    },
+
+    //选择日期 读取数据
+    handleChange(value,model){
+      this.statisticsCount(this.taskId);
+
+    },
+
+    statisticsCount(infoId) {
+
+      let taskDate = this.taskDate;
+      let queryParam = {
+        "startDate": taskDate[0],
+        "endDate": taskDate[1],
+        "infoId": infoId
+      }
+      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(() => {
+
+      })
+      this.selectList();
+    },
+
+    //树点击事件
+    onTreeNodeSelect(id) {
+      if (id && id.length > 0) {
+        if (id == "all") {
+          this.taskId = null;
+          //更新列表
+          this.selectList();
+          //更新豆腐块
+          this.statisticsCount(this.taskId);
+          return;
+        }
+        let split = id[0].split("key-");
+        if (split.length == 2) {
+          let taskId = split[1];
+          this.taskId = taskId;
+          //更新列表
+          this.selectList();
+          //更新豆腐块
+          this.statisticsCount(this.taskId);
+        }
+      }
+    },
+    onExpand(expandedKeys) {
+      this.expandedKeys = expandedKeys;
+    },
+
+    taskDateList(taskData) {
+      getAction(this.url["dateList"]).then(res => {
+          if (res.success) {
+            let result = res.result;
+            let years = result[0];
+            let months = result[1];
+            let YearLevel = {}
+            let monthLevel = {}
+
+            for (var i in years) {
+              let year = years[i].yearTime;
+              let children = {
+                "title": year,
+                "key": year,
+                "children": []
+              }
+              YearLevel[year] = children
+            }
+
+            for (var j in months) {
+              let month = months[j].monthTime;
+              let splitElement = month.split("-")[0];
+              let children = {
+                "title": month,
+                "key": month,
+                "children": []
+              }
+              YearLevel[splitElement].children.push(children)
+            }
+
+            for (var k in taskData) {
+              let taskDatum = taskData[k];
+              let taskStartTime = taskDatum.taskStartTime;
+              if (taskStartTime != null && taskStartTime != undefined) {
+                let children = {
+                  "title": taskDatum.taskName + "[" + taskDatum.customerCount + "]",
+                  "key": "key" + "-" + taskDatum.id,
+                  "isLeaf": true,
+                }
+                let strings = taskStartTime.split("-");
+                let year = strings[0];
+                let month = strings[0] + "-" + strings[1];
+                for (var z in YearLevel[year].children) {
+                  let title = YearLevel[year].children[z].title;
+                  if (title == month) {
+                    YearLevel[year].children[z].children.push(children);
+                    break;
+                  }
+                }
+              }
+            }
+
+            let allChildren = {
+              "title": "全部任务",
+              "key": "all",
+              "children": []
+            }
+
+            for (var u in YearLevel) {
+              this.treeData.push(YearLevel[u])
+            }
+            this.treeData.push(allChildren)
+            this.treeData = this.treeData.reverse();
+
+
+          }
+        }
+      )
+    },
+
+    //任务列表数据
+    taskList() {
+      let queryParam = {
+        pageNo: 1,
+        pageSize: 1000000,
+
+      }
+      getAction(this.url["taskList"], queryParam).then(res => {
+        if (res.success) {
+          let records = res.result.records;
+          //稽核任务菜单
+          this.taskDateList(records);
+        }
+      })
+    },
+    getRecentDay: function (n) {
+      let day = moment(new Date())
+        .subtract(n, "days")
+        .format("YYYY-MM-DD");
+      return day;
+    },
+
+  }
+}
+</script>
+<style scoped>
+
+</style>