coys il y a 2 ans
Parent
commit
fa58e8e74f

+ 5 - 0
package-lock.json

@@ -1789,6 +1789,11 @@
       "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
       "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
     },
+    "@vant/touch-emulator": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/@vant/touch-emulator/-/touch-emulator-1.4.0.tgz",
+      "integrity": "sha512-Zt+zISV0+wpOew2S1siOJ3G22y+hapHAKmXM+FhpvWzsRc4qahaYXatCAITuuXt0EcDp7WvEeTO4F7p9AtX/pw=="
+    },
     "@vue/babel-helper-vue-jsx-merge-props": {
       "version": "1.4.0",
       "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",

+ 1 - 0
package.json

@@ -11,6 +11,7 @@
   },
   "dependencies": {
     "@riophae/vue-treeselect": "0.4.0",
+    "@vant/touch-emulator": "^1.4.0",
     "amfe-flexible": "^2.2.1",
     "axios": "^1.3.4",
     "better-scroll": "^2.5.1",

+ 6 - 1
src/components/peopleList/index.vue

@@ -13,7 +13,8 @@
     <van-action-sheet class="bigsheetbox" v-model="show" position="bottom" title="选择人员">
       <van-row>
         <van-col span="24">
-          <van-search v-model="searchVal" placeholder="请输入搜索关键词" @input="onSearch" />
+          <!-- <van-search v-model="searchVal" placeholder="请输入搜索关键词" /> -->
+          <van-search v-model="searchVal" placeholder="请输入搜索关键词" clearable @input="onSearch" />
         </van-col>
       </van-row>
 
@@ -156,6 +157,7 @@ export default {
         }
       })
     },
+   
     onCancel() {
       this.searchVal = ''
       this.peopleListCpoy = this.peopleList
@@ -195,6 +197,9 @@ export default {
 .bigsheetbox {
   height: calc(100vh - 100px);
 }
+.van-field__control{
+  padding-right: 20px;
+}
 .line {
   width: 100%;
   height: 3px;

+ 1 - 0
src/main.js

@@ -29,6 +29,7 @@ import './filters'
 Vue.config.productionTip = false
 import VCalendar from 'v-calendar';
 import globals from "@/utils/global.js"//全局混入
+import '@vant/touch-emulator'
 Vue.use(Vant);
 Vue.use(VueEasytable);
 Vue.use(globals);

+ 36 - 17
src/router/index.js

@@ -1,36 +1,55 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-import  {routers}  from './router.config.js'
+import { routers } from './router.config.js'
 
 Vue.use(Router)
-const  router = new Router({
-  mode:"hash",
+const router = new Router({
+  mode: 'hash',
   scrollBehavior: () => ({ y: 0 }),
-  routes:routers
+  routes: routers
 })
 
 // 解决编程式路由往同一地址跳转时会报错的情况
-const originalPush = Router.prototype.push;
-const originalReplace = Router.prototype.replace;
+const originalPush = Router.prototype.push
+const originalReplace = Router.prototype.replace
 // push
 Router.prototype.push = function push(location, onResolve, onReject) {
-  if (onResolve || onReject)
-    return originalPush.call(this, location, onResolve, onReject);
-  return originalPush.call(this, location).catch(err => err);
-};
+  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
+  return originalPush.call(this, location).catch(err => err)
+}
 //replace
 Router.prototype.replace = function push(location, onResolve, onReject) {
-  if (onResolve || onReject)
-    return originalReplace.call(this, location, onResolve, onReject);
-  return originalReplace.call(this, location).catch(err => err);
+  if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject)
+  return originalReplace.call(this, location).catch(err => err)
 }
 // 路由守卫
 router.beforeEach((to, from, next) => {
-  console.log('从'+from.path+'跳向'+to.path)
-  if( to.path === '/login' || to.path==='/tokenlogin') return next();
+  console.log('从' + from.path + '跳向' + to.path)
+  //如果当前是工作台页面返回的时候判断当前是否是A标签跳转是进行重定向到works
+  switch (to.path) {
+    case '/lz':
+      next('/works') 
+      break
+    case '/dy':
+      next('/works') 
+      break
+    case '/jc':
+      next('/works') 
+      break
+    case '/yl':
+      next('/works') 
+      break
+    case '/px':
+      next('/works') 
+      break
+    case '/qt':
+      next('/works') 
+      break
+  }
+  if (to.path === '/login' || to.path === '/tokenlogin') return next()
 
-  let token = sessionStorage.getItem('access_token');
-  if(!token) return next('/login');
+  let token = sessionStorage.getItem('access_token')
+  if (!token) return next('/login')
   next()
 })
 

+ 95 - 35
src/views/home/works.vue

@@ -2,20 +2,35 @@
   <div class="index-container">
     <top-bar></top-bar>
     <!-- 步骤条 -->
-    <van-steps :active="active">
-      <van-step>履职</van-step>
-      <van-step>调阅</van-step>
-      <van-step>检查</van-step>
-      <van-step>演练</van-step>
-      <van-step>培训</van-step>
-      <van-step>其他</van-step>
-     
+    <van-steps :active="active" active-icon="success" active-color="#38f">
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#lz">履职</a> </van-badge>
+      </van-step>
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#bf">布防</a> </van-badge>
+      </van-step>
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#jc">检查</a> </van-badge>
+      </van-step>
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#dy">调阅</a></van-badge>
+      </van-step>
+      
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#yl">演练</a> </van-badge>
+      </van-step>
+      <van-step
+        ><van-badge :content="3" color="#1989fa"> <a href="#px">培训</a> </van-badge>
+      </van-step>
+      <van-step
+        ><van-badge :content="0" color="#1989fa"> <a href="#qt">其他</a> </van-badge>
+      </van-step>
     </van-steps>
     <div class="big_box" @scroll="scrolling">
-      <!-- 待办列表 -->
+      <!-- 履职列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="lz">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -24,13 +39,54 @@
         </van-cell>
         <!-- 待办区域 -->
         <div class="marginCls">
-          <van-empty description="暂无数据" />
+          <!-- <van-empty description="暂无数据" /> -->
+          <van-cell-group>
+            <van-cell
+              v-for="(i, index) in 6"
+              :key="index"
+              class="mainTitle"
+              value="待履职"
+              :title="'检查任务'"
+              :label="'2020-01-01 10:10:23'"
+              is-link
+              :to="{ path: 'path', query: { id: 'v.id', enable: 1 } }"
+              :value-class="`title-orange`"
+            />
+          </van-cell-group>
+        </div>
+      </div>
+      <!-- 布防列表 -->
+      <div class="cellMargin">
+        <!-- 标题区域 -->
+        <van-cell value="0" is-link id="bf">
+          <!-- 使用 title 插槽来自定义标题 -->
+          <template #title>
+            <span class="titleLeft"> </span>
+            <span class="custom-title">布防任务</span>
+          </template>
+        </van-cell>
+        <!-- 待办区域 -->
+        <div class="marginCls">
+          <!-- <van-empty description="暂无数据" /> -->
+          <van-cell-group>
+            <van-cell
+              v-for="(i, index) in 6"
+              :key="index"
+              class="mainTitle"
+              value="待布防"
+              :title="'检查任务'"
+              :label="'2020-01-01 10:10:23'"
+              is-link
+              :to="{ path: 'path', query: { id: 'v.id', enable: 1 } }"
+              :value-class="`title-orange`"
+            />
+          </van-cell-group>
         </div>
       </div>
-      <!-- 待办列表 -->
+      <!-- 调阅列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="dy">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -44,7 +100,7 @@
               v-for="(i, index) in 6"
               :key="index"
               class="mainTitle"
-              value="待履职"
+              value="待调阅"
               :title="'检查任务'"
               :label="'2020-01-01 10:10:23'"
               is-link
@@ -54,10 +110,10 @@
           </van-cell-group>
         </div>
       </div>
-      <!-- 待办列表 -->
+      <!-- 检查列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="jc">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -81,10 +137,10 @@
           </van-cell-group>
         </div>
       </div>
-      <!-- 待办列表 -->
+      <!-- 演练列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="yl">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -108,10 +164,10 @@
           </van-cell-group>
         </div>
       </div>
-      <!-- 待办列表 -->
+      <!-- 培训列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="px">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -135,10 +191,10 @@
           </van-cell-group>
         </div>
       </div>
-      <!-- 待办列表 -->
+      <!-- 其他列表 -->
       <div class="cellMargin">
         <!-- 标题区域 -->
-        <van-cell value="0" is-link>
+        <van-cell value="0" is-link id="qt">
           <!-- 使用 title 插槽来自定义标题 -->
           <template #title>
             <span class="titleLeft"> </span>
@@ -179,14 +235,11 @@ export default {
       oldScrollTop: ''
     }
   },
-  mounted() {
-   
-  },
+  mounted() {},
   methods: {
     scrolling(el) {
-    
       // 滚动条距文档顶部的距离
-      let scrollTop =  document.querySelector('.big_box').scrollTop || document.body.scrollTop
+      let scrollTop = document.querySelector('.big_box').scrollTop || document.body.scrollTop
       // 滚动条滚动的距离
       let scrollStep = scrollTop - this.oldScrollTop
       console.log('header 滚动距离 ', scrollTop)
@@ -197,25 +250,26 @@ export default {
       let windowHeight = document.querySelector('.big_box').clientHeight || document.body.clientHeight
       //变量scrollHeight是滚动条的总高度
       let scrollHeight = document.querySelector('.big_box').scrollHeight || document.body.scrollHeight
-
+      console.log(scrollTop, 'sssssssssssss')
       //滚动条到底部的条件
       if (scrollTop + windowHeight == scrollHeight) {
         console.log('到了最底')
         this.active = 5
-        console.log(this.active,'sss');
+        console.log(this.active, 'sss')
         //你想做的事情
         return
       }
-      if (scrollTop >= 300) {
-        
-        this.active =Math.floor(scrollTop / 250) 
-      } 
+      if (scrollTop >= 260) {
+        this.active = Math.floor(scrollTop / 250)
+      } else {
+        this.active = 0
+      }
       // 判断是否到了最顶部
       if (scrollTop <= 0) {
         console.log('header 到了最顶部')
         this.active = 0
       }
-      console.log(this.active);
+      console.log(this.active)
     }
   },
   beforeDestroy() {
@@ -257,7 +311,7 @@ export default {
   height: 400px;
   width: 100%;
   background-color: #fff;
-  overflow-y: scroll;
+  // overflow-y: scroll;
 }
 .van-empty {
   width: 100%;
@@ -273,4 +327,10 @@ export default {
   height: calc(100vh - 520px);
   overflow: auto;
 }
+a {
+  text-decoration: none;
+  color: inherit;
+  margin-right: 10px;
+}
+
 </style>

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

@@ -5,13 +5,13 @@
       <div class="title" style="padding-top: 10px; margin-top: 0px">监控主机:{{ list.hostName }}</div>
       <div class="title">视频通道:{{ list.videoChannelName }}</div>
       <van-row class="List titleList">
-        <van-col class="vancol" span="6">类型</van-col>
-        <van-col class="vancol" span="18">状态</van-col>
+        <van-col class="vancol" span="10">类型</van-col>
+        <van-col class="vancol" span="14">检查情况</van-col>
       </van-row>
       <div v-for="item in list.coreMonitoringTaskMonitorInfoList" :key="item.id">
         <van-row>
-          <van-col class="vancol" span="6">{{ item.project | proJectListFilter(this_) }}</van-col>
-          <van-col class="vancol" span="18"
+          <van-col class="vancol" span="10">{{ item.project | proJectListFilter(this_) }}</van-col>
+          <van-col class="vancol" span="14"
             ><span :style="{ color: item.situation == 1 ? '#ffa05c' : '#12b533' }">{{
               item.situation | dictFilter(this_)
             }}</span></van-col
@@ -19,8 +19,8 @@
         </van-row>
         <van-row v-if="item.situation == 1">
 
-          <van-col class="abnorText" span="6">异常原因:</van-col>
-          <van-col class="abnorText" span="18">{{ item.abnormalIllustrate }}</van-col>
+          <van-col class="abnorText" span="10">异常原因:</van-col>
+          <van-col class="abnorText" span="14">{{ item.abnormalIllustrate }}</van-col>
         </van-row>
        
       </div>

+ 8 - 3
src/views/menu/monitoringCall/components/taskInfo.vue

@@ -31,7 +31,7 @@
                     shape="square"
                   >
                 </van-checkbox>
-                <span @click.stop="textTitleHandler(item.remark)" class="info">{{ item.dictLabel }}</span>
+                <span @click="textTitleHandler(item.remark)" class="info">{{ item.dictLabel }}</span>
                 </van-col>
                 <van-radio-group v-model="item.situation" @change="checkHandler($event, item)">
                   <van-col class="itemCls" span="7" v-for="itemDict in dictList" :key="itemDict.dictValue">
@@ -101,7 +101,11 @@ export default {
   created() {
     this.disabled = +this.$route.params.id.split('_')[3] ? true : false
   },
-  mounted() {},
+ 
+mounted(){
+  let list = document.querySelector('.mainItem')
+  list.addEventListener('touchmove', e => e.stopPropagation(), false)
+},
 
   methods: {
     //组件初始化
@@ -229,8 +233,8 @@ export default {
 </script>
 <style lang="scss" scoped>
 .mainItem {
-  overflow: scroll;
   height: 750px;
+  overflow: scroll;
 }
 .rowItem {
   margin-bottom: 30px;
@@ -260,6 +264,7 @@ export default {
   color: black;
 }
 .mainBox {
+  
   .titleList {
     background-color: #e8e8e8;
     margin-top: 20px;

+ 27 - 29
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -85,10 +85,10 @@
       <div class="label">评优状态</div>
       <div>{{ trainingData.recStatusText }}</div>
     </div>
-    <div class="mainItem" v-if="$route.params.id.split('_')[1] === 'comment'" >
+    <div class="mainItem" v-if="$route.params.id.split('_')[1] === 'comment'">
       <!-- <div class="label"></div> -->
       <div>
-        <van-checkbox-group  v-model="result" direction="horizontal" @change="clickChekcBox($event)">
+        <van-checkbox-group v-model="result" direction="horizontal" @change="clickChekcBox($event)">
           <van-checkbox
             v-for="item in resultList"
             :key="item.value"
@@ -177,6 +177,8 @@ export default {
         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() {
@@ -190,6 +192,7 @@ export default {
     disabledShow() {
       if (
         this.$route.params.id.split('_')[1] === 'info' ||
+        this.$route.params.id.split('_')[1] === 'info1' ||
         this.$route.params.id.split('_')[1] === 'comment' ||
         this.$route.params.id.split('_')[1] === 'learning'
       ) {
@@ -208,6 +211,7 @@ export default {
     peopleShow() {
       if (
         this.$route.params.id.split('_')[1] === 'info' ||
+        this.$route.params.id.split('_')[1] === 'info1' ||
         this.$route.params.id.split('_')[1] === 'comment' ||
         this.$route.params.id.split('_')[1] === 'learning'
       ) {
@@ -255,19 +259,19 @@ export default {
         this.imgList = this.trainingData.imageList.split(',') || []
         //获取当前登录人机构类型
         this.orgType = window.sessionStorage.getItem('SET_USER_ORGTYPE')
-        
+
         if (this.orgType == 1) {
           //省联社
           this.resultList = [
             {
               name: '设置为省级优秀案例',
               value: 5,
-             
+
               disabled: false
             }
           ]
-          if(data.recStatus==5){
-            this.result=[5]
+          if (data.recStatus == 5) {
+            this.result = [5]
           }
         } else if (this.orgType == 2) {
           //办事处
@@ -275,21 +279,20 @@ export default {
             {
               name: '设置为地区优秀案例',
               value: 3,
-             
+
               disabled: false
             },
             {
               name: '推荐为省级优秀案例',
               value: 4,
-              
+
               disabled: true
             }
           ]
-          if(data.recStatus==4){
-            this.result=[3,4]
-          }else if(data.recStatus==3){
-            this.result=[3]
-
+          if (data.recStatus == 4) {
+            this.result = [3, 4]
+          } else if (data.recStatus == 3) {
+            this.result = [3]
           }
         } else if (this.orgType == 3) {
           //行社
@@ -297,21 +300,20 @@ export default {
             {
               name: '设置为行社优秀案例',
               value: 1,
-              
+
               disabled: false
             },
             {
               name: '推荐为地区优秀案例',
               value: 2,
-              
+
               disabled: true
             }
           ]
-          if(data.recStatus==2){
-            this.result=[1,2]
-          }else if(data.recStatus==1){
-            this.result=[1]
-
+          if (data.recStatus == 2) {
+            this.result = [1, 2]
+          } else if (data.recStatus == 1) {
+            this.result = [1]
           }
         }
       }
@@ -331,16 +333,15 @@ export default {
       }
     },
     clickChekcBox(v) {
-     console.log(v);
+      console.log(v)
       if (v[0] == this.resultList[0].value) {
-        
         this.resultList[1].disabled = this.disabledCheck('false')
         // if(v.length>1){
         //   this.result=[]
         // }
         // this.resultList[1].checked = this.disabledCheck('false')
-      } else if(v[0]>this.resultList[0].value){
-        this.result=[]
+      } else if (v[0] > this.resultList[0].value) {
+        this.result = []
       } else {
         this.resultList[1].disabled = this.disabledCheck('true')
         // this.result=[]
@@ -391,17 +392,14 @@ export default {
           })
       } else {
         //评价推优
-        
 
         submitRecTask({
           drillTaskId: this.trainingData.id,
           recStatus: Math.max(...this.result)
         }).then(res => {
-          ;
-          if(this.result&&this.result.length>0){
-
+          if (this.result && this.result.length > 0) {
             Toast('评优成功')
-          }else{
+          } else {
             Toast('取消成功')
           }
           setTimeout(() => {

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

@@ -103,7 +103,7 @@
             </div>
             <div class="mainItem" @click="goInfo(item.id)">
               <div>演练时间</div>
-              <div>{{ item.startDate }}</div>
+              <div>{{ item.drillTime }}</div>
             </div>
             <div class="mainItem">
               <div>签名情况</div>

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

@@ -359,7 +359,7 @@ export default {
 
     //跳转详情
     goInfo(id) {
-      this.$router.push('/commentSign/' + id + '_info')
+      this.$router.push('/commentSign/' + id + '_info1')
     },
 
     onCancel() {