Ver código fonte

1.特审复开申请列表视频BUG修复

liuhy 3 anos atrás
pai
commit
87ae71e7be

+ 2 - 0
package.json

@@ -28,9 +28,11 @@
     "lodash.get": "^4.4.2",
     "lodash.pick": "^4.4.0",
     "md5": "^2.2.1",
+    "moment": "^2.29.4",
     "nprogress": "^0.2.0",
     "pdfjs-dist": "^2.5.207",
     "qiankun": "^2.5.1",
+    "reqwest": "^2.0.5",
     "tinymce": "5.4.1",
     "viser-vue": "^2.4.8",
     "vue": "^2.6.10",

+ 8 - 7
src/views/smscheck/CheckWorkReport.vue

@@ -4,7 +4,7 @@
       <SmsCheckWorkLogList></SmsCheckWorkLogList>
     </div>
 
-    <div>
+<!--    <div>
       <div style="padding:24px">
         <div>
           <div style="width: 100%;text-align: right;margin-top: 20px">
@@ -26,30 +26,31 @@
 
     <div style="padding:24px">
       <sms-check-work-log-chart-scale></sms-check-work-log-chart-scale>
-    </div>
+    </div>-->
   </div>
 
 
 </template>
 <script>
  import SmsCheckWorkLogList from './SmsCheckWorkLogList'
- import SmsCheckWorkChartNotApproved from './modules/SmsCheckWorkChartNotApproved'
+ /*import SmsCheckWorkChartNotApproved from './modules/SmsCheckWorkChartNotApproved'
  import SmsCheckWorkChartFail from './modules/SmsCheckWorkChartFail'
  import SmsCheckWorkChartAdopt from './modules/SmsCheckWorkChartAdopt'
- import SmsCheckWorkLogChartScale from './modules/SmsCheckWorkLogChartScale'
+ import SmsCheckWorkLogChartScale from './modules/SmsCheckWorkLogChartScale'*/
  
  export default {
    name: 'CheckWorkReport',
    components: {
      SmsCheckWorkLogList,
-     SmsCheckWorkChartNotApproved,
+    /* SmsCheckWorkChartNotApproved,
      SmsCheckWorkChartFail,
      SmsCheckWorkChartAdopt,
-     SmsCheckWorkLogChartScale,
+     SmsCheckWorkLogChartScale,*/
    },
    data() {
      return {
-       indexStyle:2
+       indexStyle:2,
+
      }
    },
    methods:{

+ 733 - 250
src/views/smscheck/SmsCheckWorkLogList.vue

@@ -1,288 +1,771 @@
 <template>
-  <a-card :bordered="false">
-    <!-- 查询区域 -->
-    <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.customerNo"></j-input>
-            </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.createTime_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.createTime_end"></j-date>
+
+  <div>
+
+    <a-row :gutter="16" style="height: 1622px">
+      <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>
+
+      <!--筛选条件-->
+      <a-col :span="19">
+        <a-form layout="inline">
+          <a-row :gutter="24">
+            <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>
-          </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>
-    <!-- 查询区域-END -->
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button type="primary" icon="download" @click="handleExportXls('稽核工作日志')">导出</a-button>
-<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</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-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>
-
-    <!-- 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"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
-      <!--        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
-
-<!--        <template slot="htmlSlot" slot-scope="text">
-          <div v-html="text"></div>
-        </template>
-        <template slot="imgSlot" slot-scope="text,record">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
-          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
-        </template>-->
-        <template slot="fileSlot" slot-scope="text">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
-          <a-button
-            v-else
-            :ghost="true"
-            type="primary"
-            icon="download"
-            size="small"
-            @click="downloadFile(text)">
-            下载
-          </a-button>
-        </template>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleDetail(record)">详情</a>
-<!--          <a @click="handleEdit(record)">编辑</a>-->
-          <a-divider type="vertical" />
-<!--          <a-dropdown>
-&lt;!&ndash;            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>&ndash;&gt;
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-&lt;!&ndash;              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>&ndash;&gt;
-            </a-menu>
-          </a-dropdown>-->
-        </span>
-
-      </a-table>
-    </div>
-
-    <sms-check-work-log-modal ref="modalForm" @ok="modalFormOk"></sms-check-work-log-modal>
-  </a-card>
+          </a-row>
+        </a-form>
+
+
+      </a-col>
+
+      <a-col :span="5" style="padding-top: 10px">
+        <a-card>
+          <a-statistic
+            title="未完善客户数量"
+            :value="toImproveUser"
+            :precision="0"
+            suffix="个"
+            :value-style="{ color: '#fa073f' }"
+            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="tobeRectified"
+            :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="toBeAudited"
+            :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="auditPassed"
+            :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">
+          <div id="statusRefusePie" ref="statusRefusePie" style="width:100%;height:370px"></div>
+        </a-card>
+      </a-col>
+
+      <a-col :span="19" style="padding-top: 30px">
+        <a-card title="稽核历史异常分析" :bordered="false">
+          <div id="statusAuditPie" ref="statusAuditPie" style="width:50%;height:370px;float: left"></div>
+          <div id="statusAuditHistogram" ref="statusAuditHistogram" style="width:50%;height:370px;left: 50%"></div>
+        </a-card>
+      </a-col>
+
+      <a-col :span="19" style="top: 10px">
+        <a-card title="稽核历史异常时间分布" :bordered="false">
+          <div id="abnormalCreateTimeTrend" ref="abnormalCreateTimeTrend" style="width:100%;height:370px"></div>
+        </a-card>
+      </a-col>
+
+    </a-row>
+
+
+  </div>
+
+  <!-- 查询区域 -->
+
+
 </template>
 
 <script>
 
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-  import SmsCheckWorkLogModal from './modules/SmsCheckWorkLogModal'
 
-  export default {
-    name: 'SmsCheckWorkLogList',
-    mixins:[JeecgListMixin, mixinDevice],
-    components: {
-      SmsCheckWorkLogModal
+import moment from 'moment';
+import {getAction} from "@api/manage";
+import * as echarts from 'echarts';
+
+export default {
+  name: 'SmsCheckWorkLogList',
+  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",
+        "abnormalCreateTime": "/smsCheck/workLog/check/abnormal/count"
+      },
+      // '1': '未完善',
+      statusMap: {
+        '0': '未完善',
+        '2': '待稽核',
+        '4': '待整改',
+        "5": '稽核通过',
+      },
+      abnormalMap: {
+        "basicCheckState": "基本信息异常",
+        "standardState": "规范信息异常",
+        "dataState": "附件资料异常异常"
+      },
+      $statusRefusePie: "",
+      $abnormalCheckPie: "",
+      $abnormalCheckHistogram: "",
+      $abnormalCreateTimeTrend: "",
+      toImproveUser: 0,
+      latestDate: '180',
+      toBeAudited: 0,
+      tobeRectified: 0,
+      auditPassed: 0,
+      treeData: [],
+      expandedKeys: ['2022', '2022-10'],
+      selectedKeys: {},
+      statusAuditPieData: [],
+      canvas: {},
+      taskId:null,
+
+    }
+  },
+  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);
+
+    //初始化日期 默认最近180天
+    this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
+
+    //稽核任务列表(树)
+    this.taskList();
+    //稽核概况统计
+    this.statusRefuse();
+    //稽核历史异常分析
+    this.checkStateCount(this.url.checkStateCount);
+    this.abnormalCreateTime();
+
+
+  },
+  computed: {},
+
+  methods: {
+
+    changeReportDate(a, event){
+      //当前 value this.latestDatec
+      //console.log(this.latestDate)
+      this.taskDate = [this.getRecentDay(parseInt(this.latestDate)), this.getRecentDay(0)]
+      this.statusRefuse(this.taskId);
+      this.checkStateCount(this.url.checkStateCount, this.taskId);
+      this.abnormalCreateTime(this.taskId);
     },
-    data () {
-      return {
-        description: '稽核工作日志管理页面',
-        // 表头
-        columns: [
+
+    handleChange(value,model){
+      this.taskDate = model
+     // model 当前value
+      this.statusRefuse(this.taskId);
+      this.checkStateCount(this.url.checkStateCount, this.taskId);
+      this.abnormalCreateTime(this.taskId);
+
+    },
+    abnormalCreateTime(infoId) {
+      let taskDate = this.taskDate;
+      let queryParam = {
+        "startDate": taskDate[0],
+        "endDate": taskDate[1],
+        "infoId": infoId
+      }
+      getAction(this.url.abnormalCreateTime, queryParam).then(res => {
+        if (res.success) {
+          let data = [];
+          let resultList = res.resultList;
+          for (var i in resultList) {
+            let resultListElement = resultList[i];
+            let time = resultListElement.createTime;
+            let count = parseInt(resultListElement.count);
+            data.push([time, count])
+          }
+          let dateList = data.map(function (item) {
+            return item[0];
+          });
+          let valueList = data.map(function (item) {
+            return item[1];
+          });
+          this.abnormalCreateTimetrend(dateList, valueList)
+        }
+      }).finally(() => {
+
+      })
+
+    },
+
+    abnormalCreateTimetrend(dateList, valueList) {
+      let option = {
+        title: {
+          text: '稽核异常数量',
+          left: 'center',
+
+        },
+        lineStyle: {
+          color: '#5a6fc0'
+        },
+
+        backgroundColor: {
+          type: 'pattern',
+          image: this.canvas,
+          repeat: 'repeat'
+        },
+        visualMap: [
           {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
+            show: false,
+            type: 'continuous',
+            seriesIndex: 0,
+            min: 0,
+            max: 400
           },
-         /* {
-            title:'客户信息',
-            align:"center",
-            dataIndex: 'infoId'
-          },*/
           {
-            title:'客户编号',
-            align:"center",
-            dataIndex: 'customerNo'
-          },
-         /* {
-            title:'客户资料编号',
-            align:"center",
-            dataIndex: 'dataId'
-          },*/
+            show: false,
+            type: 'continuous',
+            seriesIndex: 1,
+            dimension: 0,
+            min: 0,
+            max: dateList.length - 1
+          }
+        ],
+        tooltip: {
+          trigger: 'axis'
+        },
+        legend: {
+          data: ['稽核异常']
+        },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true
+        },
+        toolbox: {
+          feature: {
+            saveAsImage: {}
+          }
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: dateList
+        },
+        yAxis: {
+          type: 'value'
+        },
+        series: [
           {
-            title:'基本信息稽核状态',
-            align:"center",
-            dataIndex: 'basicCheckState',
-            customRender:function (text){
-              if (text===0){
-                return "未处理";
-              }else if (text===1){
-                return "未通过";
-              }else if (text===2){
-                return "通过";
+            name: 'Email',
+            type: 'line',
+            stack: 'Total',
+            data: valueList
+          }
+        ]
+      };
+
+      this.$abnormalCreateTimeTrend = echarts.init(document.getElementById('abnormalCreateTimeTrend'))
+      this.$abnormalCreateTimeTrend.setOption(option)
+
+    },
+
+
+    checkStateCount(url, taskId) {
+      let taskDate = this.taskDate;
+      let queryParam = {
+        "startDate": taskDate[0],
+        "endDate": taskDate[1],
+        "infoId": taskId
+      }
+      getAction(url, queryParam).then(res => {
+        if (res.success) {
+          let resultList = res.resultList;
+          let pieData = [];
+          let histogramSource = ['资料驳回分布']
+          let dimensions = ['product']
+
+          for (var i in resultList) {
+            let resultListElement = resultList[i];
+            let name = resultListElement.name;
+            let state = resultListElement.state;
+            let count = resultListElement.count;
+            if (state === "2") {
+              var abnormalMapElement = this.abnormalMap[name];
+              if (abnormalMapElement != null && abnormalMapElement != undefined) {
+                pieData.push({
+                  "name": abnormalMapElement,
+                  "value": count
+                })
+                dimensions.push(abnormalMapElement.toString())
+                histogramSource.push(parseInt(count));
               }
             }
-          },
+          }
+          this.checkStatePie(pieData);
+          this.checkStateHistogram(dimensions, histogramSource)
+
+
+        }
+      }).finally(() => {
+
+      })
+    },
+
+    checkStateHistogram(dimensions, source) {
+
+      let option = {
+        backgroundColor: {
+          type: 'pattern',
+          image: this.canvas,
+          repeat: 'repeat'
+        },
+        legend: {},
+        tooltip: {},
+        dataset: {
+          source: [
+            dimensions,
+            source
+          ]
+        },
+        xAxis: {type: 'category'},
+        yAxis: {},
+        // Declare several bar series, each will be mapped
+        // to a column of dataset.source by default.
+        series: [{type: 'bar'}, {type: 'bar'}, {type: 'bar'}]
+      };
+      this.$abnormalCheckHistogram = echarts.init(document.getElementById('statusAuditHistogram'))
+      this.$abnormalCheckHistogram.setOption(option)
+
+    },
+    checkStatePie(data) {
+
+      let option = {
+        tooltip: {
+          trigger: 'item'
+        },
+        backgroundColor: {
+          type: 'pattern',
+          image: this.canvas,
+          repeat: 'repeat'
+        },
+        /*title: [
           {
-            title:'基本信息稽核结果',
-            align:"center",
-            dataIndex: 'basicCheckNote'
+            text: '异常类型占比',
+            //subtext: '总计 ' + builderJson.all + " 稽核通过 " + builderJson.charts["稽核通过"],
+            left: '25%',
+            textAlign: 'center'
           },
+        ],*/
+        legend: {
+          top: '5%',
+          left: 'center'
+        },
+        series: [
           {
-            title:'规范信息稽核状态',
-            align:"center",
-            dataIndex: 'standardCheckState',
-            customRender:function (text){
-              if (text===0){
-                return "未处理";
-              }else if (text===1){
-                return "未通过";
-              }else if (text===2){
-                return "通过";
+            name: '',
+            type: 'pie',
+            radius: ['40%', '70%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2
+            },
+            label: {
+              show: false,
+              position: 'center'
+            },
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: '40',
+                fontWeight: 'bold'
               }
+            },
+            labelLine: {
+              show: false
+            },
+            data: data
+          }
+        ]
+      };
+      this.$abnormalCheckPie = echarts.init(document.getElementById('statusAuditPie'))
+      this.$abnormalCheckPie.setOption(option)
+    },
+
+
+    //树点击事件
+    onTreeNodeSelect(id) {
+      if (id && id.length > 0) {
+        if (id == "all") {
+          this.statusRefuse();
+          this.checkStateCount(this.url.checkStateCount);
+          this.abnormalCreateTime();
+          this.taskId = null;
+          return;
+        }
+        let split = id[0].split("key-");
+        if (split.length == 2) {
+          let taskId = split[1];
+          this.statusRefuse(taskId);
+          this.checkStateCount(this.url.checkStateCount, taskId);
+          this.abnormalCreateTime(taskId);
+          this.taskId = id;
+        }
+      }
+    },
+    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);
+        }
+      })
+
+
+    },
+
+
+    //查询各类型稽核进度
+    statusRefuse(taskId) {
+      let taskDate = this.taskDate;
+      let queryParam = {
+        "startDate": taskDate[0],
+        "endDate": taskDate[1],
+        "taskId": taskId
+      }
+      if (taskDate.length = 2) {
+        getAction(this.url["statusRefuse"], queryParam).then(res => {
+          if (res.success) {
+            let builderJson = {};
+            let columnDate = {};
+            let pieDate = {};
+            let all = 0;
+            let resultList = res.resultList;
+            for (var i in resultList) {
+              let resultListElement = resultList[i];
+              let status = this.statusMap[resultListElement.checkState];
+              if (status != undefined && status != null) {
+                all = all + resultListElement.count
+                columnDate[status] = resultListElement.count
+              }
+            }
+            builderJson = {
+              "all": all,
+              "charts": columnDate,
+              "ie": 9743
+            }
+            this.statusRefusePie(builderJson)
+          }
+        })
+      }
+    },
+    statusRefusePie(builderJson) {
+      if (builderJson.charts["稽核通过"] == null || builderJson.charts["稽核通过"] == undefined) {
+        builderJson.charts["稽核通过"] = 0;
+      }
+      if (builderJson.charts["未完善"] == null || builderJson.charts["未完善"] == undefined) {
+        builderJson.charts["未完善"] = 0;
+      }
+      if (builderJson.charts["待稽核"] == null || builderJson.charts["待稽核"] == undefined) {
+        builderJson.charts["待稽核"] = 0;
+      }
+      if (builderJson.charts["待整改"] == null || builderJson.charts["待整改"] == undefined) {
+        builderJson.charts["待整改"] = 0;
+      }
+
+      this.toImproveUser = builderJson.charts["未完善"];
+      this.toBeAudited = builderJson.charts["待稽核"];
+      this.tobeRectified = builderJson.charts["待整改"];
+      this.auditPassed = builderJson.charts["稽核通过"];
+
+      let option = {
+        backgroundColor: {
+          type: 'pattern',
+          image: this.canvas,
+          repeat: 'repeat'
+        },
+        tooltip: {},
+        title: [
+          {
+            text: '稽核完成进度',
+            subtext: '总计 ' + builderJson.all + " 稽核通过 " + builderJson.charts["稽核通过"],
+            left: '25%',
+            textAlign: 'center'
           },
           {
-            title:'规范信息稽核结果',
-            align:"center",
-            dataIndex: 'istandardCheckNote'
+            text: '稽核类型占比',
+            subtext: '总计 ' + builderJson.all,
+            left: '75%',
+            textAlign: 'center'
+          }
+        ],
+        grid: [
+          {
+            top: 50,
+            width: '50%',
+            bottom: '5%',
+            left: 10,
+            containLabel: true
           },
           {
-            title:'附件资料稽核状态',
-            align:"center",
-            dataIndex: 'dataCheckState',
-            customRender:function (text){
-              if (text===0){
-                return "未处理";
-              }else if (text===1){
-                return "未通过";
-              }else if (text===2){
-                return "通过";
-              }
+            top: 50,
+            width: '50%',
+            bottom: '5%',
+            left: 10,
+            containLabel: true
+          }
+
+        ],
+
+        xAxis: [
+          {
+            type: 'value',
+            max: builderJson.all,
+            splitLine: {
+              show: false
             }
-          },
+          }
+        ],
+        yAxis: [
           {
-            title:'附件资料稽核结果',
-            align:"center",
-            dataIndex: 'dataCheckNote'
-          },
-          /*{
-            title:'员工id',
-            align:"center",
-            dataIndex: 'staffId'
-          },*/
+            type: 'category',
+            data: Object.keys(builderJson.charts),
+            axisLabel: {
+              interval: 0,
+              rotate: 30
+            },
+            splitLine: {
+              show: false
+            }
+          }
+        ],
+        series: [
           {
-            title:'员工编号',
-            align:"center",
-            dataIndex: 'staffNo'
+            type: 'bar',
+            stack: 'chart',
+            z: 3,
+            label: {
+              position: 'right',
+              show: true
+            },
+            data: Object.keys(builderJson.charts).map(function (key) {
+              return builderJson.charts[key];
+            }),
+            itemStyle: {
+              normal: {
+                //这里是颜色
+                color: function (params) {
+                  //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
+                  var colorList = ['#5c6fc4', '#f0be47', '#d2232c', '#81c463', '#BBFFAA', '#749f83', '#ca8622'];
+                  return colorList[params.dataIndex]
+                }
+              }
+            }
           },
           {
-            title:'稽核时间',
-            align:"center",
-            dataIndex: 'createTime'
+            type: 'bar',
+            stack: 'chart',
+            silent: true,
+            itemStyle: {
+              color: '#eee'
+            },
+            data: Object.keys(builderJson.charts).map(function (key) {
+              return builderJson.all - builderJson.charts[key];
+            }),
+
+
           },
+
           {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            /*fixed:"right",*/
-            width:100,
-            scopedSlots: { customRender: 'action' }
-          }
-        ],
-        url: {
-          list: "/smsCheck/workLog/list",
-          delete: "/smsCheck/workLog/delete",
-          deleteBatch: "/smsCheck/workLog/deleteBatch",
-          exportXlsUrl: "/smsCheck/workLog/exportXls",
-          importExcelUrl: "smsCheck/workLog/importExcel",
+            type: 'pie',
+            radius: [0, '80%'],
+            center: ['75%', '55%'],
+            data: Object.keys(builderJson.charts).map(function (key) {
+              return {
+                name: key,
+                value: builderJson.charts[key]
+              };
+            }),
+            itemStyle: {
+              normal: {
+                //这里是颜色
+                color: function (params) {
+                  //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
+                  var colorList = ['#5a6fc0', '#f0be47', '#d2232c', '#81c463', '#BBFFAA', '#749f83', '#ca8622'];
+                  return colorList[params.dataIndex]
+                }
+              }
+            }
+          },
 
-        },
-        dictOptions:{},
-        superFieldList:[],
-      }
-    },
-    created() {
-    this.getSuperFieldList();
+
+        ]
+      };
+
+      this.$statusRefusePie = echarts.init(document.getElementById('statusRefusePie'))
+      this.$statusRefusePie.setOption(option)
     },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      },
+
+    getRecentDay: function (n) {
+      let day = moment(new Date())
+        .subtract(n, "days")
+        .format("YYYY-MM-DD");
+      return day;
     },
-    methods: {
-      initDictConfig(){
-      },
-      getSuperFieldList(){
-        let fieldList=[];
-        fieldList.push({type:'string',value:'infoId',text:'客户信息id',dictCode:''})
-        fieldList.push({type:'string',value:'customerNo',text:'客户编号',dictCode:''})
-        fieldList.push({type:'string',value:'dataId',text:'客户资料id',dictCode:''})
-        fieldList.push({type:'int',value:'basicCheckState',text:'基本信息稽核状态',dictCode:''})
-        fieldList.push({type:'string',value:'basicCheckNote',text:'基本信息稽核结果',dictCode:''})
-        fieldList.push({type:'int',value:'standardCheckState',text:'规范信息稽核状态',dictCode:''})
-        fieldList.push({type:'string',value:'istandardCheckNote',text:'规范信息稽核结果',dictCode:''})
-        fieldList.push({type:'int',value:'dataCheckState',text:'附件资料稽核状态',dictCode:''})
-        fieldList.push({type:'string',value:'dataCheckNote',text:'附件资料稽核结果',dictCode:''})
-        fieldList.push({type:'string',value:'staffId',text:'员工id',dictCode:''})
-        fieldList.push({type:'string',value:'staffNo',text:'员工编号',dictCode:''})
-        this.superFieldList = fieldList
-      }
-    }
+
   }
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+
 </style>

+ 288 - 0
src/views/smscheck/SmsCheckWorkLogList20221018.vue

@@ -0,0 +1,288 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <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.customerNo"></j-input>
+            </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.createTime_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.createTime_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>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('稽核工作日志')">导出</a-button>
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</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-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>
+
+    <!-- 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"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+      <!--        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
+
+<!--        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>-->
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">详情</a>
+<!--          <a @click="handleEdit(record)">编辑</a>-->
+          <a-divider type="vertical" />
+<!--          <a-dropdown>
+&lt;!&ndash;            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>&ndash;&gt;
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+&lt;!&ndash;              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>&ndash;&gt;
+            </a-menu>
+          </a-dropdown>-->
+        </span>
+
+      </a-table>
+    </div>
+
+    <sms-check-work-log-modal ref="modalForm" @ok="modalFormOk"></sms-check-work-log-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import SmsCheckWorkLogModal from './modules/SmsCheckWorkLogModal'
+
+  export default {
+    name: 'SmsCheckWorkLogList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      SmsCheckWorkLogModal
+    },
+    data () {
+      return {
+        description: '稽核工作日志管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+         /* {
+            title:'客户信息',
+            align:"center",
+            dataIndex: 'infoId'
+          },*/
+          {
+            title:'客户编号',
+            align:"center",
+            dataIndex: 'customerNo'
+          },
+         /* {
+            title:'客户资料编号',
+            align:"center",
+            dataIndex: 'dataId'
+          },*/
+          {
+            title:'基本信息稽核状态',
+            align:"center",
+            dataIndex: 'basicCheckState',
+            customRender:function (text){
+              if (text===0){
+                return "未处理";
+              }else if (text===1){
+                return "未通过";
+              }else if (text===2){
+                return "通过";
+              }
+            }
+          },
+          {
+            title:'基本信息稽核结果',
+            align:"center",
+            dataIndex: 'basicCheckNote'
+          },
+          {
+            title:'规范信息稽核状态',
+            align:"center",
+            dataIndex: 'standardCheckState',
+            customRender:function (text){
+              if (text===0){
+                return "未处理";
+              }else if (text===1){
+                return "未通过";
+              }else if (text===2){
+                return "通过";
+              }
+            }
+          },
+          {
+            title:'规范信息稽核结果',
+            align:"center",
+            dataIndex: 'istandardCheckNote'
+          },
+          {
+            title:'附件资料稽核状态',
+            align:"center",
+            dataIndex: 'dataCheckState',
+            customRender:function (text){
+              if (text===0){
+                return "未处理";
+              }else if (text===1){
+                return "未通过";
+              }else if (text===2){
+                return "通过";
+              }
+            }
+          },
+          {
+            title:'附件资料稽核结果',
+            align:"center",
+            dataIndex: 'dataCheckNote'
+          },
+          /*{
+            title:'员工id',
+            align:"center",
+            dataIndex: 'staffId'
+          },*/
+          {
+            title:'员工编号',
+            align:"center",
+            dataIndex: 'staffNo'
+          },
+          {
+            title:'稽核时间',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            /*fixed:"right",*/
+            width:100,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/smsCheck/workLog/list",
+          delete: "/smsCheck/workLog/delete",
+          deleteBatch: "/smsCheck/workLog/deleteBatch",
+          exportXlsUrl: "/smsCheck/workLog/exportXls",
+          importExcelUrl: "smsCheck/workLog/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'infoId',text:'客户信息id',dictCode:''})
+        fieldList.push({type:'string',value:'customerNo',text:'客户编号',dictCode:''})
+        fieldList.push({type:'string',value:'dataId',text:'客户资料id',dictCode:''})
+        fieldList.push({type:'int',value:'basicCheckState',text:'基本信息稽核状态',dictCode:''})
+        fieldList.push({type:'string',value:'basicCheckNote',text:'基本信息稽核结果',dictCode:''})
+        fieldList.push({type:'int',value:'standardCheckState',text:'规范信息稽核状态',dictCode:''})
+        fieldList.push({type:'string',value:'istandardCheckNote',text:'规范信息稽核结果',dictCode:''})
+        fieldList.push({type:'int',value:'dataCheckState',text:'附件资料稽核状态',dictCode:''})
+        fieldList.push({type:'string',value:'dataCheckNote',text:'附件资料稽核结果',dictCode:''})
+        fieldList.push({type:'string',value:'staffId',text:'员工id',dictCode:''})
+        fieldList.push({type:'string',value:'staffNo',text:'员工编号',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 23 - 39
src/views/specialApply/Main.vue

@@ -284,17 +284,16 @@
                 :beforeUpload="beforeUploadVideo"
                 :multiple="true"
                 :remove="handleRemoveVideo"
-                @preview="handlePreview"
+                @preview="handlePreviewVideo"
               >
 
                 <div v-if="fileListVideo.length < 1">
                   <a-icon type="plus"/>
                   <div class="ant-upload-text">点我上传承诺视频</div>
                 </div>
-
               </a-upload>
               <!-- 放大预览窗口 -->
-              <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
+              <a-modal :visible="previewVideo" :footer="null" @cancel="handleVideoCancel">
                 <!--                <img alt="example" style="width: 100%" :src="previewImage"/>-->
                 <video
                   ref="myVideo"
@@ -379,38 +378,8 @@ export default {
           {required: true, message: '必须输入客户名称'},
         ],
       },
-      /*fileList: [{
-        uid: '-1',
-        name: 'image.png',
-        status: 'done',
-        url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
-      }, {
-        uid: '-2',
-        name: 'image.png',
-        status: 'done',
-        url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
-      }, {
-        uid: '-3',
-        name: 'image.png',
-        status: 'done',
-        url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
-      }, {
-        uid: '-4',
-        name: 'image.png',
-        status: 'done',
-        url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
-      }, {
-        uid: '-xxx',
-        percent: 50,
-        name: 'image.png',
-        status: 'uploading',
-        url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
-      }, {
-        uid: '-5',
-        name: 'image.png',
-        status: 'error',
-      }],*/
       previewVisible: false,
+      previewVideo:false,
       previewImage: "",
       uploading: false,
 
@@ -486,12 +455,10 @@ export default {
   mounted() {
     // 监听视频播放
     this.$refs.myVideo.addEventListener("play", () => {
-      console.log("video is playing");
       this.openTimer();
     });
     // 监听视频暂停
     this.$refs.myVideo.addEventListener("pause", () => {
-      console.log("video is stop");
       this.closeTimer();
     });
   },
@@ -806,10 +773,10 @@ export default {
     },
     //承诺视频
     handleRemoveVideo(file) {
-      const index = this.fileListVoucher.indexOf(file)
-      const newFileList = this.fileListVoucher.slice()
+      const index = this.fileListVideo.indexOf(file)
+      const newFileList = this.fileListVideo.slice()
       newFileList.splice(index, 1)
-      this.fileListVoucher = newFileList
+      this.fileListVideo = newFileList
     },
 
 
@@ -909,6 +876,11 @@ export default {
     handleCancel() {//点击关闭图片预览
       this.previewVisible = false;
     },
+
+    handleVideoCancel(){
+      this.previewVideo = false;
+    },
+
     //点击查看大图
     async handlePreview(file) {//点击查看大图
       if (!file.url && !file.preview) {
@@ -917,6 +889,18 @@ export default {
       this.previewImage = file.url || file.preview;
       this.previewVisible = true;
     },
+    //点击查看视频大图
+    async handlePreviewVideo(file) {//点击查看大图
+      if (!file.url && !file.preview) {
+        file.preview = await this.getBase64(file.originFileObj);
+      }
+      this.previewImage = file.url || file.preview;
+      this.previewVideo = true;
+    },
+
+
+
+
     //提交申请
     handleUpload() {
       const formData = new FormData();

+ 26 - 5
src/views/specialApply/modules/AdminDetails.vue

@@ -238,13 +238,12 @@
               listType="picture-card"
               :fileList="fileListVideo"
               :multiple="true"
-              @preview="handlePreview"
+              @preview="handlePreviewVideo"
             >
-
-
             </a-upload>
-            <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
-                       <img alt="example" style="width: 100%" :src="previewImage"/>&ndash;&gt;
+
+            <a-modal :visible="previewVideo" :footer="null" @cancel="handleVideoCancel">
+              <!--                <img alt="example" style="width: 100%" :src="previewImage"/>-->
               <video
                 ref="myVideo"
                 :poster="poster"
@@ -259,6 +258,8 @@
 
             </a-modal>
 
+
+
           </div>
         </a-card>
 
@@ -350,6 +351,7 @@ export default {
       fileListVideo: [],
 
       previewVisible: false,
+      previewVideo:false,
       previewImage: "",
 
       labelCol: {span: 1},
@@ -422,9 +424,19 @@ export default {
 
 
   },
+
   methods: {
 
 
+
+
+    handleVideoCancel(){
+      this.previewVideo = false;
+    },
+
+
+
+
     // 开启定时器
     openTimer() {
       this.timer = setInterval(() => {
@@ -640,6 +652,15 @@ export default {
       this.previewImage = file.url || file.preview;
       this.previewVisible = true;
     },
+
+    //点击查看视频大图
+    async handlePreviewVideo(file) {//点击查看大图
+      if (!file.url && !file.preview) {
+        file.preview = await this.getBase64(file.originFileObj);
+      }
+      this.previewImage = file.url || file.preview;
+      this.previewVideo = true;
+    },
   },
 
 

+ 20 - 10
src/views/specialApply/modules/Details.vue

@@ -238,13 +238,12 @@
               listType="picture-card"
               :fileList="fileListVideo"
               :multiple="true"
-              @preview="handlePreview"
+              @preview="handlePreviewVideo"
             >
-
-
             </a-upload>
-            <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
-                       <img alt="example" style="width: 100%" :src="previewImage"/>&ndash;&gt;
+
+            <a-modal :visible="previewVideo" :footer="null" @cancel="handleVideoCancel">
+              <!--                <img alt="example" style="width: 100%" :src="previewImage"/>-->
               <video
                 ref="myVideo"
                 :poster="poster"
@@ -265,11 +264,6 @@
 
 
 
-
-
-
-
-
       </a-form-model>
 
 <!--      <a-form-model
@@ -350,6 +344,7 @@ export default {
       fileListVideo: [],
 
       previewVisible: false,
+      previewVideo:false,
       previewImage: "",
 
       labelCol: {span: 1},
@@ -632,6 +627,11 @@ export default {
     handleCancel() {//点击关闭图片预览
       this.previewVisible = false;
     },
+
+    handleVideoCancel(){
+      this.previewVideo = false;
+    },
+
     //点击查看大图
     async handlePreview(file) {//点击查看大图
       if (!file.url && !file.preview) {
@@ -640,6 +640,16 @@ export default {
       this.previewImage = file.url || file.preview;
       this.previewVisible = true;
     },
+
+    //点击查看视频大图
+    async handlePreviewVideo(file) {//点击查看大图
+      if (!file.url && !file.preview) {
+        file.preview = await this.getBase64(file.originFileObj);
+      }
+      this.previewImage = file.url || file.preview;
+      this.previewVideo = true;
+    },
+
   },