Răsfoiți Sursa

修复监控调阅bug及跳转问题

coys 1 an în urmă
părinte
comite
3b84ee0903

Fișier diff suprimat deoarece este prea mare
+ 1 - 11727
package-lock.json


+ 9 - 7
src/components/nfcPopup/alone.vue

@@ -53,14 +53,16 @@ export default {
     }
   },
   mounted() {
-    window.openNFCScanCallBack = this.openNFCScanCallBack
-    window.openCameraCallBack = this.openCameraCallBack
+    // window.openNFCScanCallBack = this.openNFCScanCallBack
+    // window.openCameraCallBack = this.openCameraCallBack
   },
   methods: {
     nfcTakePhotos() {
       this.useCamera(1)
     },
     submitNFC() {
+      // window.openNFCScanCallBack=null
+      window.openNFCScanCallBack = this.openNFCScanCallBack
       this.useNFC()
     },
     openCameraCallBack(data) {
@@ -120,17 +122,17 @@ export default {
       if (this.objNfc.errorCode == 0) {
         this.$emit('changeNFC', this.objNfc.content)
         Toast.success('扫描成功')
-
+        window.openNFCScanCallBack =null
         this.visible = false
       } else {
         Toast.error(this.objNfc.errorString)
       }
     }
   },
-  destroyed() {
-    window.openCameraCallBack = null
-    window.openNFCScanCallBack = null
-  }
+  // destroyed() {
+  //   window.openCameraCallBack = null
+  //   window.openNFCScanCallBack = null
+  // }
 }
 </script>
 <style lang="scss">

+ 2 - 0
src/router/index.js

@@ -61,6 +61,8 @@ router.beforeEach((to, from, next) => {
       next('/works')
     case '/wtzg':
       next('/works')
+    case '/lfsp':
+      next('/works')
       break
   }
   if (to.path === '/login' || to.path === '/tokenlogin') return next()

+ 5 - 0
src/views/home/works.vue

@@ -201,6 +201,11 @@ export default {
           break
         case '/qt':
           str = '/qt'
+        case 10:
+          str = '/lfsp'
+          strName = '待审批'
+          path = '/visitCheck'
+          pathInfo = '/visitCheckDetail?id=' + id 
           break
       }
 

+ 1 - 1
src/views/menu/cockpit/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="index-container">
-    <NavBar :go="{ type: 'push', path: '/menu' }" />
+    <NavBar  />
     <van-row>
       <van-col span="24">
         <org-tree v-model="cascaderValue" :name="'sss'" :isHangsheTree="true" @changeItem="getDataList"></org-tree>

+ 49 - 15
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -1,10 +1,9 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/monitoringCall' }" />
+    <NavBar />
     <div class="bigBox">
       <van-collapse v-model="activeNames" @open="addActiveNames">
         <div class="titleBox">
-          
           <div class="textTitle">{{ taskData.taskName }}</div>
           <div class="text">调阅开始时间:{{ taskData.taskStartTime }}</div>
           <div class="text" v-if="taskData.taskStatus == 2">调阅结束时间:{{ taskData.taskEndTime }}</div>
@@ -106,7 +105,7 @@ export default {
         }
       })
     },
-    getHostHandlerA(){
+    getHostHandlerA() {
       this.getHostHandler()
       this.init()
     },
@@ -134,26 +133,61 @@ export default {
       //没有记录的时候不能结束调阅
       let falg = this.taskData.coreMonitoringTaskRegistrationMonitorVOList
       if (falg && falg.length > 0) {
-        this.$refs.scandialog.visible = true
-        this.globalLoading=true
+        let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
+
+        startDate = Date.parse(new Date(startDate))
+        let endDate = Date.parse(new Date())
+        if (endDate - startDate) {
+          Dialog.confirm({
+            title: '提示',
+            message: `本次调阅共计花费${this.dateTime(endDate - startDate)}`
+          })
+            .then(() => {
+              this.$refs.scandialog.visible = true
+        this.globalLoading = true
+            })
+            .catch(() => {
+              // on cancel
+            })
+        }
+        
       } else {
         Dialog({ message: '调阅项目登记不能为全空!' })
         return
       }
 
-      // let startDate = JSON.parse(JSON.stringify(this.taskData.taskStartTime))
-
-      // startDate = Date.parse(new Date(startDate))
-      // let endDate = Date.parse(new Date())
-      // if (endDate - startDate <= 3600000) {
-      //   Dialog({ message: '该调阅未满一个小时请确认' })
-      //   // 未满一小时不能结束调阅
-      // } else {
+      // else {
       // this.$refs.scandialog.visible = true
 
       //   startDate = new Date(startDate)
       // }
     },
+    dateTime(msd) {
+      //将毫秒秒转化为xx小时xx分钟xx秒
+
+      let time = parseFloat(msd) / 1000 //先将毫秒转化成秒
+      if (null != time && '' != time) {
+        if (time > 60 && time < 60 * 60) {
+          time =
+            parseInt(time / 60.0) + '分钟' + parseInt((parseFloat(time / 60.0) - parseInt(time / 60.0)) * 60) + '秒'
+        } else if (time >= 60 * 60 && time < 60 * 60 * 24) {
+          time =
+            parseInt(time / 3600.0) +
+            '小时' +
+            parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) +
+            '分钟' +
+            parseInt(
+              (parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
+                parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) *
+                60
+            ) +
+            '秒'
+        } else {
+          time = parseInt(time) + '秒'
+        }
+      }
+      return time
+    },
     //文件上传
     resultImg(img) {
       this.photoHandler(img[0].url)
@@ -184,7 +218,8 @@ export default {
         id: this.taskData.id,
         taskId: this.$route.params.id.split('_')[0]
       }).then(res => {
-        this.$router.push('/monitoringCall')
+        this.$router.go(-1)
+        
       })
     },
     addActiveNames() {}
@@ -213,7 +248,6 @@ export default {
     font-size: 30px;
     font-weight: bold;
     padding: 20px;
-   
   }
   .text {
     padding: 20px;

+ 2 - 2
src/views/menu/monitoringCall/components/monitoringList.vue

@@ -157,8 +157,8 @@ export default {
   border-right: 1px solid #ccc;
 }
 .yctext {
-  border-left: 1px solid #ccc;
-  margin-left: -1px;
+  border-left: 2px solid #ccc;
+  
  
 }
 .abnorText {

+ 4 - 4
src/views/menu/monitoringCall/components/passage.vue

@@ -11,8 +11,8 @@
         <span class="pors success" v-if="item.type == '1'">
           <van-icon name="success" size="14" color="#fff" />
         </span>
-        <span class="pors error" v-if="item.type == '2'">
-          <van-icon name="fail" size="14" color="#fff" />
+        <span class="pors success" v-if="item.type == '2'">
+          <van-icon name="success" size="14" color="#fff" />
         </span>
         
        <span :class="item.videoName.length<=10? 'textClass':'textClassLength10'">
@@ -105,8 +105,8 @@ export default {
 .cls2 {
   background-color: #fff;
   // background-color: #ff6b00;
-  border: 1px solid #f30407;
-  color: #f30407;
+  border: 1px solid #3cbda9;
+  color: #3cbda9;
 }
 .pors {
   position: absolute;

+ 1 - 1
src/views/menu/monitoringCall/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/menu' }" />
+    <NavBar  />
     <van-row>
       <van-col span="24">
         <org-tree v-model="cascaderValue" @change="getDataList"></org-tree>

+ 2 - 2
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/rehearsalTask' }" />
+    <NavBar  />
     <van-form class="bigbox" ref="form">
       <div class="mainItem">
         <div class="label">标题</div>
@@ -500,7 +500,7 @@ export default {
         let { code, msg } = res
         if (code == 200) {
           Toast(`${type == 1 ? '保存' : '提交'}成功`)
-          this.$router.push('/rehearsalTask')
+          this.$router.go(-1)
         } else {
           Toast(msg)
         }

+ 19 - 20
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: goBack }" />
+    <NavBar  />
     <div class="bigbox">
       <div class="mainItem">
         <van-row>
@@ -9,9 +9,6 @@
           </van-col>
           <van-col :span="16">
             <div>{{ trainingData.title }}</div>
-           
-            
-            
           </van-col>
         </van-row>
       </div>
@@ -305,19 +302,21 @@ export default {
   },
   computed: {
     goBack() {
-      if (
-        this.$route.params.id.split('_')[1] === 'evaluate' ||
-        this.$route.params.id.split('_')[1] === 'edit' ||
-        this.$route.params.id.split('_')[1] === 'info'
-      ) {
-        return '/rehearsalTask'
-      } else if (this.$route.params.id.split('_')[1] === 'comment') {
-        return '/rehearsaloptimal'
-      } else if (this.$route.params.id.split('_')[1] === 'learning') {
-        return '/rehearsallearning'
-      } else if (this.$route.params.id.split('_')[1] === 'info1') {
-        return '/rehearsaloptimal'
-      }
+      this.$router.go(-1)
+     
+      // if (
+      //   this.$route.params.id.split('_')[1] === 'evaluate' ||
+      //   this.$route.params.id.split('_')[1] === 'edit' ||
+      //   this.$route.params.id.split('_')[1] === 'info'
+      // ) {
+      //   return '/rehearsalTask'
+      // } else if (this.$route.params.id.split('_')[1] === 'comment') {
+      //   return '/rehearsaloptimal'
+      // } else if (this.$route.params.id.split('_')[1] === 'learning') {
+      //   return '/rehearsallearning'
+      // } else if (this.$route.params.id.split('_')[1] === 'info1') {
+      //   return '/rehearsaloptimal'
+      // }
     },
     evaluate() {
       if (this.$route.params.id.split('_')[1] === 'evaluate') {
@@ -524,7 +523,7 @@ export default {
               if (code == 200) {
                 Toast('评价成功')
                 setTimeout(() => {
-                  this.$router.push('/rehearsalTask')
+                  this.$router.go(-1)
                 }, 1000)
               } else {
                 Toast(msg)
@@ -547,7 +546,7 @@ export default {
             Toast('取消成功')
           }
           setTimeout(() => {
-            this.$router.push('/rehearsaloptimal')
+            this.$router.go(-1)
           }, 1000)
         })
       }
@@ -600,7 +599,7 @@ export default {
         id: this.trainingData.id,
         signImage: url
       }).then(res => {
-        this.$router.push('/rehearsalTask')
+        this.$router.go(-1)
       })
     }
   }

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

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="topBox">
-      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <NavBar  />
 
       <van-row>
         <van-col span="24">

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

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="topBox">
-      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <NavBar  />
 
       <van-row>
         <van-col span="24">

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

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="topBox">
-      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <NavBar  />
 
       <van-row>
         <van-col span="24">

+ 2 - 2
src/views/menu/resumptionEvaluate/evaluate.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/resumptionEvaluate' }" />
+    <NavBar  />
     <div class="evaluate">
       <div class="bgcwirte">
         <van-row class="cell_cls">
@@ -185,7 +185,7 @@ export default {
         submitEvaluate({ coreEvaluateTaskContentList: obj.coreEvaluateContentList, id: obj.id }).then(res => {
           let { code, msg } = res
           Toast.success(msg)
-          this.$router.push('/resumptionEvaluate')
+          this.$router.go(-1)
         })
       })
       // this.formData.coreEvaluateContentList.forEach

+ 1 - 1
src/views/menu/resumptionEvaluate/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="topBox">
-      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <NavBar />
 
       <van-row>
         <van-col span="24">

+ 2 - 2
src/views/menu/training/components/addTraining.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/training' }" />
+    <NavBar  />
     <van-form class="bigbox" ref="form">
       <div class="mainItem">
         <div class="label">培训主题</div>
@@ -467,7 +467,7 @@ export default {
         let { code, msg } = res
         if (code == 200) {
           Toast(`${type == 1 ? '保存' : '提交'}成功`)
-          this.$router.push('/training')
+          this.$router.go(-1)
         } else {
           Toast(msg)
         }

+ 2 - 2
src/views/menu/training/components/personnelSignature.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <NavBar :go="{ type: 'push', path: '/training' }" />
+    <NavBar  />
     <div class="bigbox">
       <div class="mainItem">
         <van-row>
@@ -332,7 +332,7 @@ export default {
         id: this.trainingData.id,
         signImage: url
       }).then(res => {
-        this.$router.push('/training')
+        this.$router.go(-1)
       })
     },
     tagHandler(i) {

+ 1 - 1
src/views/menu/training/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="topBox">
-      <NavBar :go="{ type: 'push', path: '/menu' }" />
+      <NavBar  />
 
       <van-row>
         <van-col span="24">

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff