Procházet zdrojové kódy

Merge remote-tracking branch 'remotes/origin/V0.0.6' into V0.0.6_iot

jiawuxian před 1 rokem
rodič
revize
f3a13781d7

+ 1 - 2
babel.config.js

@@ -9,6 +9,5 @@ if (IS_PROD) {
 }
 
 module.exports = {
-  presets: [['@vue/cli-plugin-babel/preset', { useBuiltIns: 'usage', corejs: 3 }]],
-  plugins
+  presets: [['@babel/preset-env', {useBuiltIns: 'usage', corejs: 3}], '@vue/babel-preset-jsx'], plugins
 }

+ 3 - 0
package.json

@@ -10,6 +10,7 @@
     "build": "vue-cli-service build"
   },
   "dependencies": {
+    "@babel/polyfill": "^7.12.1",
     "@better-scroll/core": "^2.5.1",
     "@better-scroll/observe-dom": "^2.5.1",
     "@better-scroll/pull-down": "^2.5.1",
@@ -17,6 +18,8 @@
     "@popperjs/core": "^2.11.8",
     "@riophae/vue-treeselect": "0.4.0",
     "@vant/touch-emulator": "^1.4.0",
+    "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
+    "@vue/babel-preset-jsx": "^1.4.0",
     "amfe-flexible": "^2.2.1",
     "axios": "^1.6.0",
     "browser-fs-access": "^0.34.1",

+ 5 - 1
src/App.vue

@@ -8,7 +8,7 @@
 // import watercom from '@/components/waterCom.vue'
 
 export default {
-  
+
   name: 'App'
 }
 </script>
@@ -37,4 +37,8 @@ html,body,div,h1,h2,h3,h4,h5,p{
   padding: 0;
   margin: 0;
 }
+pre{
+  white-space: pre-wrap;
+  word-wrap: break-word;
+}
 </style>

+ 198 - 0
src/components/GxSearchSelectCell/index.vue

@@ -0,0 +1,198 @@
+<template>
+  <div class="select-cell">
+    <van-cell
+      v-if="disabled"
+      :required="required"
+      :border="border"
+      :title="title"
+      :value="isRow?label:null"
+      :label="!isRow?label:null" />
+    <van-cell
+      v-else
+      :required="required"
+      :title="title"
+      :border="border"
+      :value="isRow?label:null"
+      :label="!isRow?label:null"
+      is-link
+      @click="clickItem"/>
+    <!-- :label="!isRow?label:null" -->
+    <van-popup v-model="showPicker" round lazy-render position="bottom" :close-on-popstate="true" get-container="#app">
+      <van-search  v-model="searchKey" placeholder="请输入搜索关键词" @input="onSearch" @clear="resetColumns" />
+      <van-picker
+        v-bind="$attrs"
+        show-toolbar
+        :value-key="prop.label"
+        v-model="selected"
+        :columns="columnsData"
+        @confirm="pickerConfirm"
+        confirm-button-text="确定"
+        @cancel="cancelPicker"
+      />
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import {getDict} from "@/api/toConsult";
+export default {
+  props:{
+    //禁用
+    disabled:{
+      type: [Boolean,String],
+      default: false,
+    },
+    //双向绑定的数据
+    value:{
+      type: [String,Number],
+      default: null,
+    },
+    required:{
+      type: [Boolean,String],
+      default: false,
+    },
+    border:{
+      type: [Boolean,String],
+      default: false,
+    },
+    //标题
+    title:{
+      type: String,
+      default: null,
+    },
+    //父组件给的列表数据
+    dataList:{
+      type: Array,
+      default: ()=>[],
+    },
+    //是否显示全部选项
+    isAll:{
+      type: Boolean,
+      default: false,
+    },
+    //单行显示或者多行显示
+    isRow:{
+      type: Boolean,
+      default: false,
+    },
+    //自定义字段
+    prop:{
+      type: Object,
+      default: ()=>(
+        {
+          label:'dictLabel',
+          value:'dictValue'
+        }
+      ) ,
+    }
+  },
+  data(){
+    return{
+      showPicker:false,
+      label:'无',
+      searchKey:null,
+      keyName:this.prop.label,
+      columnsData:[],
+    }
+  },
+  computed:{
+    columns(){
+      if(this.isAll){
+        let obj = {};
+        obj[this.prop.label] = '全部';
+        obj[this.prop.value] = null;
+        this.columnsData = [obj,...this.dataList];
+        return [obj,...this.dataList];
+      }else{
+        console.log(this.dataList);
+        this.columnsData = this.dataList;
+      }
+      return this.dataList;
+    },
+    selected(){
+      if(!this.value) {
+        if(this.isAll){
+          this.label = '全部';
+          return null;
+        }
+        this.label = '无';
+        return null;
+      }
+      let val;
+      this.columns.forEach(v=> {
+        if (v[this.prop.value] === this.value) {
+          val = v;
+          this.label = v[this.prop.label];
+        }
+      });
+      return val;
+    },
+  },
+  methods:{
+    resetColumns() {
+      this.searchKey = "";
+      this.columnsData = this.columns;
+    },
+    onSearch() {
+      if (!this.searchKey.length) {
+        this.columnsData = this.columns;
+        return;
+      }
+      let newArr = [];
+      if (this.columnsData.length) {
+        newArr = this.columnsData.filter((item) => {
+          return item[this.keyName].includes(this.searchKey);
+        });
+      }
+      this.columnsData = newArr;
+    },
+    cancelPicker(){
+      this.showPicker = false;
+    },
+    pickerConfirm(val){
+      if(!val) return;
+      this.label = val[this.prop.label];
+      this.showPicker = false;
+      this.$emit('change',val[this.prop.value]);
+      this.$emit('itemInfo',val)
+    },
+    clickItem(){
+      this.showPicker = true;
+    },
+  },
+  model:{
+    prop: 'value',
+    event: 'change',
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.select-cell{
+  position: relative;
+  box-sizing: border-box;
+  width: 100%;
+  overflow: hidden;
+  color: #323233;
+  background-color: #fff;
+}
+.select-cell::after{
+  position: absolute;
+  box-sizing: border-box;
+  content: ' ';
+  pointer-events: none;
+  right: 30px;
+  bottom: 0;
+  left: 30px;
+  border-bottom: 1px solid #ebedf0;
+  -webkit-transform: scaleY(.5);
+  transform: scaleY(.5);
+}
+.van-cell__label{
+  margin: 0;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  width: 260px;
+}
+</style>

+ 31 - 10
src/utils/globalMixins.js

@@ -39,8 +39,10 @@ export default {
       let item = this.dictionary.find(v => {
         return v.key === key
       })
-      console.log(item, 'item')
-      return item?.value
+      if(item){
+        return item.value;
+      }
+      return null;
     },
     /** 获取字典值
      * key: String 查询具体值
@@ -48,15 +50,34 @@ export default {
      * 组件页面中需要设置:mapGetters(['dictionary']']),
      * */
     getDictLabel(key, dictType) {
-      let item = this.dictionary?.find(v => {
-        return v.key === dictType
-      })
-      let dictLabel = item?.value?.find(v => {
-        if (v.dictValue == key) {
-          return v?.dictLabel
+      if(this.dictionary){
+        let item = this.dictionary.find(v => {
+          return v.key === dictType
+        })
+        if(item){
+          let val = item.value;
+          if(val){
+            let dictLabel = val.find(v => {
+              if (v.dictValue == key) {
+                return v.dictLabel
+              }
+            })
+            if(dictLabel){
+              return dictLabel.dictLabel
+            }else{
+              return null;
+            }
+          }else{
+            return null;
+          }
+
+        }else{
+          return null;
         }
-      })
-      return dictLabel?.dictLabel
+
+      }
+      return null;
+
     },
     //时间范围模板:2020-01-01~2020-01-02
     rangDate(start, end, a) {

+ 1 - 1
src/views/home/isMy.vue

@@ -46,7 +46,7 @@
     <div class="detail-box" v-if="dataInfo">
       <div class="message-content">
         <div class="text-content">
-          <p>{{dataInfo.content}}</p>
+          <p v-html="dataInfo.content"></p>
         </div>
       </div>
     </div>

+ 13 - 3
src/views/home/works.vue

@@ -115,7 +115,12 @@ export default {
     iColorClas(type, status) {
       if (status == 0|| (type == 9 && status == 1)|| (type == 9 && status == 10) || (type == 0 && status == 1) || (type == 2 && status == 1)) {
         return 'wj-title-blue'
-      } else {
+      }
+      else if(type == 9 && status == 13) 
+      {
+        return 'wj-title-red'
+      }
+      else {
         return 'wj-title-orange'
       }
     },
@@ -253,7 +258,9 @@ export default {
           strName = '待确认'
         } else if (val == 9 && taskType == 10) {
           strName = '待整改'
-        } else if (val == 9 && taskType == 1) {
+        }else if (val == 9 && taskType == 13) {
+          strName = '已逾期'
+        }else if (val == 9 && taskType == 1) {
           strName = '待审批'
         }
         return strName
@@ -273,7 +280,10 @@ export default {
         if (val == 9 && taskType == 10) {
           strName = '待整改'
           pathInfo = '/problemDetail?id=' + id + '&type=reform'
-
+        }
+        if (val == 9 && taskType == 13) {
+          strName = '已逾期'
+          pathInfo = '/problemDetail?id=' + id + '&type=reform'
         }
         //监控调阅
         if (val == 3 && taskType == 1) {

+ 5 - 2
src/views/menu/NFCmanage/index.vue

@@ -13,8 +13,8 @@
           <van-cell title="NFC编码" :value="formData.code" />
           <van-field required label="标签名称" v-model="formData.labelName" placeholder="请输入" />
           <van-cell required title="选择所属机构" :label="formData.orgName" is-link  @click="clickItem"/>
-          <select-cell required :disabled="areaList.length == 0" v-model="formData.areaId" title="选择区域" :border="true" :prop="props" :dataList="areaList"></select-cell>
-          <select-cell required :disabled="pointList.length == 0" v-model="formData.checkId" title="选择采集点" :prop="checkProps" :dataList="pointList"></select-cell>
+          <gx-select-cell required :disabled="areaList.length == 0" v-model="formData.areaId" title="选择区域" :border="true" :prop="props" :dataList="areaList"></gx-select-cell>
+          <gx-select-cell required :disabled="pointList.length == 0" v-model="formData.checkId" title="选择采集点" :prop="checkProps" :dataList="pointList"></gx-select-cell>
         </van-cell-group>
         <van-cell-group v-else :border="false">
           <van-cell title="NFC编码" :value="nfcInfo.code" />
@@ -43,6 +43,7 @@ import NavBar from '@/components/NavBar';
 import Card from '@/components/card';
 import OrgPicker from '@/components/OrgPicker';
 import SelectCell from '@/components/selectCell';
+import GxSelectCell from '@/components/GxSearchSelectCell';
 import {mapGetters} from "vuex";
 import {binding,unbinding,nfcDetails,areaList,checkList} from './api';
 export default {
@@ -51,6 +52,7 @@ export default {
     Card,
     OrgPicker,
     SelectCell,
+    GxSelectCell,
   },
   data(){
     return{
@@ -188,6 +190,7 @@ export default {
         return
       }
       this.useNFC();
+    // this.openNFCScanCallBack({"content":"123456789"});
     },
     changeOrg(selected){
       this.showPicker = false;

+ 11 - 11
src/views/menu/cockpit/components/comprehensiveData.vue

@@ -93,7 +93,7 @@
               <div>整改率</div>
               <div class="wj-title-blue font5vw">{{ parseInt(offATMCheckList['整改率'] * 100) }}%</div>
             </van-col>
-          </van-row>
+          </van-row>          
           <van-row class="boxCard" v-if="safetyCheck">
             <van-col :span="24" class="titleSty">
               <span class="leftSty"></span><span>{{ '安全检查' }}</span>
@@ -103,12 +103,12 @@
               <div class="wj-title-blue font5vw">{{ safetyCheck['隐患数'] }}</div>
             </van-col>
             <van-col :span="8" class="boxmain centerBox">
-              <div>有异议</div>
-              <div class="wj-title-blue font5vw">{{ safetyCheck['有异议'] }}</div>
+              <div>已整改</div>
+              <div class="wj-title-blue font5vw">{{ safetyCheck['已整改'] }}</div>
             </van-col>
             <van-col :span="8" class="boxmain">
-              <div>已取消</div>
-              <div class="wj-title-blue font5vw">{{ safetyCheck['已取消'] }}</div>
+              <div>整改率</div>
+              <div class="wj-title-blue font5vw">{{ parseInt(safetyCheck['整改率'] * 100) }}%</div>
             </van-col>
           </van-row>
           <van-row class="boxCard" v-if="safetyCheck">
@@ -116,16 +116,16 @@
               <span class="leftSty"></span><span>{{ '安全检查' }}</span>
             </van-col>
             <van-col :span="8" class="boxmain">
-              <div>已确认</div>
-              <div class="wj-title-blue font5vw">{{ safetyCheck['已确认'] }}</div>
+              <div>问题数</div>
+              <div class="wj-title-blue font5vw">{{ safetyCheck['问题数'] }}</div>
             </van-col>
             <van-col :span="8" class="boxmain centerBox">
-              <div>已整改</div>
-              <div class="wj-title-blue font5vw">{{ safetyCheck['已整改'] }}</div>
+              <div>有异议</div>
+              <div class="wj-title-blue font5vw">{{ safetyCheck['有异议'] }}</div>
             </van-col>
             <van-col :span="8" class="boxmain">
-              <div>整改率</div>
-              <div class="wj-title-blue font5vw">{{ parseInt(safetyCheck['整改率'] * 100) }}%</div>
+              <div>已取消</div>
+              <div class="wj-title-blue font5vw">{{ safetyCheck['已取消'] }}</div>
             </van-col>
           </van-row>
         </div>

+ 18 - 9
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -19,7 +19,7 @@
             <MonitoingList :list="item" :taskStatus="taskData.taskStatus"></MonitoingList>
           </div>
         </div>
-       
+
         <div v-else>
           <van-collapse-item :name="item.hostId" v-for="item in hostList" :key="item.hostId">
             <template #title>
@@ -97,12 +97,16 @@ export default {
         let { code, data, msg } = res
         if (code == 200) {
           this.taskData = data
+        if (data && data.taskStatus < 2) {
+              this.getHostHandler(num)
+            }
+          if(num === 1 && data.taskStatus !=2){
+            Dialog.alert({
+            message: '当前为调阅通道选择界面,仅需选择实际调阅通道,无需全选。',
+            }).then(() => {
 
-          //如果当前是调阅中则获取视频主机和通道
-          if (data && data.taskStatus < 2) {
-            this.getHostHandler(num)
-          }
-        }
+            });
+          }        }
       })
     },
     getHostHandlerA(num) {
@@ -133,9 +137,14 @@ export default {
       let falg = this.taskData.coreMonitoringTaskRegistrationMonitorVOList
       if (falg && falg.length > 0) {
         let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
+        let obj=startDate.replace(/-/g,"/");
 
         startDate = Date.parse(new Date(startDate))
+        if(!startDate){
+          startDate = Date.parse(new Date(obj));
+        }
         let endDate = Date.parse(new Date())
+
         if (endDate - startDate) {
           Dialog.confirm({
             title: '提示',
@@ -149,7 +158,7 @@ export default {
               // on cancel
             })
         }
-        
+
       } else {
         Dialog({ message: '调阅项目登记不能为全空!' })
         return
@@ -218,11 +227,11 @@ export default {
         taskId: this.$route.params.id.split('_')[0]
       }).then(res => {
         this.$router.go(-1)
-        
+
       })
     },
     addActiveNames() {
-      
+
     }
   }
 }

+ 7 - 0
src/views/menu/monitoringCall/components/taskInfo.vue

@@ -120,6 +120,13 @@
     methods: {
       //组件初始化
       init(taskId, videoId, hostId) {
+        // Toast(`当前为调阅项目选择界面,仅需部分登记发现调阅项目填写正常或者异常项,无需全部填写。`,{duration:5000});
+        Dialog.alert({
+            message: '当前为调阅项目选择界面,仅需部分登记发现调阅项目填写正常或者异常项,无需全部填写。',
+          }).then(() => {
+          });
+        
+        
         this.taskId = taskId
         this.show = true
         //获取调阅字典

+ 1 - 1
src/views/menu/problemItem/detail.vue

@@ -25,7 +25,7 @@
                 </van-col>
                 <van-col :span="17">
                   <span
-                    v-if="taskInfo.overdueStatus"
+                    v-if="taskInfo.reformStatus && taskInfo.reformStatus==10 && taskInfo.overdueStatus"
                     :style="{ color: getState(getDictLabel(taskInfo.overdueStatus, 'app_question_status')) }"
                   >
                     {{ getDictLabel(taskInfo.overdueStatus, 'app_question_status') }}

+ 9 - 5
src/views/menu/problemItem/index.vue

@@ -13,7 +13,7 @@
           v-model="query.status"
           :data-list="getDictItem('app_question_status')"
           @change="refreshData"/>
-        <date-cell title="整改日期"  v-model="query.reformDate" @change="refreshData"/>
+        <date-cell title="截止日期"  v-model="query.reformDate" @change="refreshData"/>
       </div>
       <div class="card-list">
         <Scroll
@@ -45,7 +45,7 @@
                   </van-button>
                   <van-button
                     style="width: 60px;"
-                    v-else-if="v.orgId==orgId && v.confirmStatus==2 && v.reformStatus!=11"
+                    v-else-if="v.orgId==orgId && v.confirmStatus==2 && v.reformStatus!=11 && v.reformStatus!=13"
                     hairline
                     size="mini"
                     type="info"
@@ -67,7 +67,7 @@
                 <template #default>
                   <div class="info-box">
                     <div class="info-desc">问题状态:
-                      <span v-if="v.overdueStatus" :style="{color:getState(getDictLabel(v.overdueStatus,'app_question_status'))}">
+                      <span v-if="v.reformStatus && v.reformStatus==10 && v.overdueStatus" :style="{color:getState(getDictLabel(v.overdueStatus,'app_question_status'))}">
                         {{getDictLabel(v.overdueStatus,'app_question_status')}}
                       </span>
                       <span v-else-if="v.reformStatus" :style="{color:getState(getDictLabel(v.reformStatus,'app_question_status'))}">
@@ -161,6 +161,8 @@ export default {
           return '#008cd6';
         case '已整改':
           return '#009240';
+        case '逾期整改':
+          return '#D7000F';
         case '已逾期':
           return '#D7000F';
       }
@@ -183,7 +185,6 @@ export default {
     },
     //获取数据列表
     getDataList(){
-      console.log('233333')
       //if(!this.query.orgId) return this.$toast('请选择机构');
       if( this.dataList.length !== 0 && this.dataList.length >= this.total) {
         this.pullup = false;
@@ -206,7 +207,10 @@ export default {
           this.query.pageNum++;
           this.$refs.Scroll.refresh();
         }
-      })
+      });
+      setTimeout(() => {
+        this.query.orgId = this.orgId;
+      }, 200);
     },
     clickItem(id,type){
       this.$router.push({

+ 49 - 14
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -400,6 +400,11 @@ export default {
         if (this.orgType == 1) {
           //省联社
           this.resultList = [
+          {
+              name: '不推荐',
+              value: 8,
+              disabled: false
+            },
             {
               name: '设置为省级优秀案例',
               value: 5,
@@ -413,6 +418,11 @@ export default {
         } else if (this.orgType == 2) {
           //办事处
           this.resultList = [
+          {
+              name: '不推荐',
+              value: 7,
+              disabled: false
+            },
             {
               name: '设置为地区优秀案例',
               value: 3,
@@ -435,6 +445,11 @@ export default {
           //行社
           this.resultList = [
             {
+              name: '不推荐',
+              value: 6,
+              disabled: false
+            },
+            {
               name: '设置为行社优秀案例',
               value: 1,
 
@@ -470,22 +485,32 @@ export default {
       }
     },
     clickChekcBox(v) {
-      console.log(v)
-      console.log(this.resultList[0])
+      // console.log(v)
+      // console.log(this.resultList[0])
+      console.log("clickChekcBox",v,this.resultList)
+      // console.log("clickChekcBoxx",v[0] < this.resultList[0].value,v[0],,v[0]==this.resultList[1])
+      
       if (v[0] == this.resultList[0].value) {
         if (this.resultList[1]) {
-          this.resultList[1].disabled = this.disabledCheck('false')
+          this.resultList[1].disabled = this.disabledCheck('true')
         }
-        // if(v.length>1){
-        //   this.result=[]
-        // }
-        // this.resultList[1].checked = this.disabledCheck('false')
-      } else if (v[0] > this.resultList[0].value) {
-        this.result = []
-      } else {
-        this.resultList[1].disabled = this.disabledCheck('true')
-
-        // this.result=[]
+        if (this.resultList[2]) {
+          this.resultList[2].disabled = this.disabledCheck('true')
+        }
+        console.log("clickChekcBox1",v,this.resultList)
+      } else if (v[0] < this.resultList[0].value && v[0]==this.resultList[1].value) {
+            this.resultList[0].disabled = this.disabledCheck('true')
+            this.resultList[2].disabled = this.disabledCheck('false')
+            console.log("clickChekcBox2",v,this.resultList)
+      }
+      else if (v[0] < this.resultList[0].value && v[0]>this.resultList[1].value) {
+          this.result=[];
+      }
+      else {       
+          this.resultList[0].disabled = this.disabledCheck('false')
+          this.resultList[1].disabled = this.disabledCheck('false')
+          this.resultList[2].disabled = this.disabledCheck('true')
+          console.log("clickChekcBox3",v,this.resultList)
       }
     },
     signatureHandler() {
@@ -529,7 +554,11 @@ export default {
           })
       } else {
         //评价推优
-
+        if(!this.result || this.result.length==0)
+        {
+          this.$toast.fail('请至少选择一项评优推优选项');
+          return;
+        }
         submitRecTask({
           drillTaskId: this.trainingData.id,
           recStatus: Math.max(...this.result)
@@ -645,6 +674,12 @@ export default {
   .van-col {
     text-align: justify;
     white-space: pre-wrap;
+    .van-checkbox-group--horizontal{
+      .van-checkbox--horizontal{
+        margin-top:3.2vw;
+}
+    }
+   
   }
   .zl {
     display: block !important;

+ 1 - 1
src/views/menu/rehearsalTask/optimal.vue

@@ -198,7 +198,7 @@ export default {
           this.statusValue='2'
           break
         case '3':
-          this.fieldValue = '正常案例'
+          this.fieldValue = '普通案例'
           this.statusValue='0'
           break
         case '1':

+ 12 - 4
src/views/menu/resumption/detail.vue

@@ -358,10 +358,10 @@
     },
     methods: {
       showButtoFun(vel) {
-        if (val === 1) {
+        if (vel === 1) {
           this.showButton = false
         }
-        if (val === 2) {
+        if (vel === 2) {
           this.showButton = true
         }
       },
@@ -408,6 +408,9 @@
           nfcCode = nfcStr.content
         }
         this.checkNfcFilter(nfcCode)
+
+        //保存一次数据
+        this.resumptionDataSave();
       },
       checkNfcFilter(nfcCode) {
         let areaId = null
@@ -567,6 +570,9 @@
         this.resumptionData.noPointNums = total - num
         this.validateAreaAll()
         this.openCollapseItems()
+
+        //保存一次数据
+        this.resumptionDataSave();
       },
       changeSwitch() {
         let num = 0
@@ -681,7 +687,9 @@
       },
       changeNfcImg(imgItem) {
         this.updateNFC(1, imgItem.nfcCode, imgItem)
-        this.validateArea(this.areaId)
+        this.validateArea(this.areaId);
+
+        this.resumptionDataSave();
       },
       updateNFC(type, nfcCode, imgItem) {
         //type 1 表示新增加扫描的数据,2 表示新增未扫描的数量,0 未做任何操作
@@ -730,7 +738,7 @@
             if (this.areaId === item.areaId) {
               this.areaYesList.push(item)
             }
-          } else {
+          }else {
             this.noList.push(item)
             if (this.areaId === item.areaId) {
               this.areaNoList.push(item)

+ 8 - 0
src/views/menu/resumption/list.vue

@@ -54,6 +54,7 @@
                   :key="v.id"
                   :title="v.planName"
                   :label="formatTime(v.planStartTime,v.planEndTime,'HH:mm')"
+                  @click="overdueOnClick()"
                   :value-class="`title-red`">
                   <template #right-icon>
                       <span :style="{ color: getState(getDictLabel(v.status, 'resumption_status')) }">
@@ -112,6 +113,7 @@
                 <van-cell
                   v-for="v in otherList.proceed"
                   :key="v.id"
+                  @click="overdueOnClick()"
                   :title="v.planName"
                   :label="formatTime(v.planStartTime,v.planEndTime,'YYYY-MM-DD')"
                   :value-class="`title-red`">
@@ -203,6 +205,12 @@ export default {
         })
       }
     },
+    overdueOnClick(){     
+        this.$toast.fail({
+          message: '逾期任务无法登记',
+          position: 'top'
+        })
+    },
     getState(state) {
       switch (state) {
         case '待履职':

+ 44 - 35
src/views/menu/securityCheckRegister/add.vue

@@ -176,7 +176,7 @@ import NfcPopup from '@/components/nfcPopup/more'
 import AddCheck from './addCheck'
 import { registerDetail, registerSubmit } from './api'
 import { imgUrl} from '@/utils'
-import { ImagePreview } from 'vant'
+import {Dialog, ImagePreview} from 'vant'
 import { mapGetters } from 'vuex'
 import dayjs from 'dayjs'
 export default {
@@ -379,6 +379,8 @@ export default {
       });
       if(!checkOk){
         this.$toast.fail( "扫描结果不在本次检查范围内!");
+      }else{
+        this.saveData();
       }
     },
 
@@ -509,37 +511,47 @@ export default {
 //
     //提交数据
     submitData() {
-      //验证必填项
-      let pointData = this.checkList.flatMap(v => v.pointList);
-      let allNfcList = [];
-      pointData.forEach(v=>{
-        if(v.nfcList && v.nfcList.length > 0){
-          allNfcList.push(...v.nfcList)
-        }
-      })
-      if(allNfcList.length > 0){
-        let result = allNfcList.some(v=>v.status != 1);
-        if(result){
-          this.$toast('请先扫描NFC标签');
-          return;
-        }
-      }
-      let arr = pointData.filter(v => {
-        if (v.status === 1) {
-          return !v.remark || !v.rectificationDeadline
-        }
-      })
-      if (arr.length) return this.$toast(`${arr[0].itemName}:该信息不完整请填写`);
-      this.taskInfo.isSubmit = 1;
-      console.log(this.taskInfo,'taskInfo');
-      registerSubmit(this.taskInfo).then(res => {
-        this.$toast('提交成功');
-        this.toPagesFcn();
-      }).catch(error=>{
-        if( error === '任务已完成'){
-          this.toPagesFcn();
-        }
+      Dialog.confirm({
+        title: '提示',
+        message: '是否提交当前检查任务?提交后不能修改,如要修改请使用保存按钮!',
       })
+        .then(() => {
+          //验证必填项
+          let pointData = this.checkList.flatMap(v => v.pointList);
+          let allNfcList = [];
+          pointData.forEach(v=>{
+            if(v.nfcList && v.nfcList.length > 0){
+              allNfcList.push(...v.nfcList)
+            }
+          })
+          if(allNfcList.length > 0){
+            let result = allNfcList.some(v=>v.status != 1);
+            if(result){
+              this.$toast('请先扫描NFC标签');
+              return;
+            }
+          }
+          let arr = pointData.filter(v => {
+            if (v.status === 1) {
+              return !v.remark || !v.rectificationDeadline
+            }
+          })
+          if (arr.length) return this.$toast(`${arr[0].itemName}:该信息不完整请填写`);
+          this.taskInfo.isSubmit = 1;
+          console.log(this.taskInfo,'taskInfo');
+          registerSubmit(this.taskInfo).then(res => {
+            this.$toast('提交成功');
+            this.toPagesFcn();
+          }).catch(error=>{
+            if( error === '任务已完成'){
+              this.toPagesFcn();
+            }
+          });
+        })
+        .catch(() => {
+          // on cancel
+        });
+
     },
     //页面跳转逻辑
     toPagesFcn(){
@@ -571,7 +583,6 @@ export default {
     //点击NFC图标
     clickNFC(arr) {
       this.NFCList = arr;
-      console.log(this.NFCList,'NFCList')
       this.$refs.NfcPopup.show(arr);
     },
     //清空数据
@@ -587,7 +598,6 @@ export default {
     },
     //切换开关时添加操作时间
     switchChange(item) {
-      console.log(item, '666')
       if (item.status == '0') {
         item.remark = null;
         item.rectificationDeadline = null;
@@ -596,7 +606,6 @@ export default {
     },
     //添加图片时的回调
     changeNfcImg(imgItem) {
-      console.log(imgItem, this.NFCList, 'imgItem')
       this.NFCList.forEach(v => {
         if (v.nfcCode === imgItem.nfcCode) {
           v.img = imgItem.url;
@@ -606,7 +615,7 @@ export default {
           this.nfcImage.push(v);
         }
       })
-      console.log(this.NFCList, this.nfcImage, 'nfcObj')
+      this.saveData();
     },
   }
 }