Răsfoiți Sursa

修复监控调阅,弹框不能滑动,及默认调阅主机列表数据刷新之后主机列表被折叠的优化,

coys 1 an în urmă
părinte
comite
fa8bf81f7f

+ 36 - 0
src/utils/onresizeMixins.js

@@ -0,0 +1,36 @@
+export const onresizeHandler = {
+  data() {
+    return {
+      docmHeight: document.documentElement.clientHeight || document.body.clientHeight,
+      showHeight: document.documentElement.clientHeight || document.body.clientHeight,
+      isBtn: true //是否显示隐藏保存提交按钮(演练登记&教育培训)
+    }
+  },
+  created() {
+    /** 组件中设置dicts数组,会将字典存储在vuex中*/
+    if (this.dicts && this.dicts.length > 0) {
+      this.setDicts()
+    }
+  },
+  watch: {
+    //监听显示高度
+    showHeight: function () {
+      if (this.docmHeight > this.showHeight) {
+        //隐藏
+        this.isBtn = false
+      } else {
+        //显示
+        this.isBtn = true
+      }
+    }
+  },
+  mounted() {
+    //监听事件
+    window.onresize = () => {
+      return (() => {
+        this.showHeight = document.documentElement.clientHeight || document.body.clientHeight
+      })()
+    }
+  },
+ 
+}

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

@@ -1,6 +1,8 @@
 <template>
     <div class="index-container">   
-
+        <div>
+            哈哈哈哈哈
+        </div>
     </div>
 </template>
 

+ 11 - 6
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -100,31 +100,36 @@ export default {
 
           //如果当前是调阅中则获取视频主机和通道
           if (data && data.taskStatus < 2) {
-            this.getHostHandler()
+            this.getHostHandler(1)
           }
         }
       })
     },
-    getHostHandler(num = '') {
-      this.endNum = num == 1 ? true : false
+    getHostHandler(num = 0) {
+      // num//判断是不是第一次初始化
 
       getSysDeviceByTaskId({ taskId: this.$route.params.id.split('_')[0] }).then(res => {
         let { code, data, msg } = res
         if (code == 200) {
           this.hostList = data
-          this.activeNames = [this.hostList[0].hostId]
+          if(num==1){
+            console.log('////');
+            this.activeNames = [this.hostList[0].hostId]
+          }else{
+            console.log(this.activeNames,'////');
+          }
         }
       })
     },
     addInfoHandler() {
-      console.log(this.taskData)
+     
       this.$router.push('/addInfo/' + this.$route.params.id.split('_')[0] + '_' + this.taskData.id + '_add')
     },
     //结束调阅
     endMontor() {
       //没有记录的时候不能结束调阅
       let falg = this.taskData.coreMonitoringTaskRegistrationMonitorVOList
-      if (this.endNum || (falg && falg.length > 0)) {
+      if ( (falg && falg.length > 0)) {
         this.$refs.scandialog.visible = true
       } else {
         Dialog({ message: '调阅项目登记不能为全空!' })

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

@@ -70,7 +70,7 @@ export default {
       this.$refs.taskInfo.init(this.taskId,videoId,this.hostId)
     },
     resetList(){
-        this.$emit('resetList',1)
+        this.$emit('resetList',0)
     }
   }
 }

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <van-overlay :show="show">
+    <van-overlay :show="show" :lock-scroll="false">
       <div class="wrapper">
         <div class="block">
           <!-- 标题信息 -->
@@ -113,8 +113,8 @@ export default {
   },
 
   mounted() {
-    let list = document.querySelector('.mainItem')
-    list.addEventListener('touchmove', e => e.stopPropagation(), false)
+    // let list = document.querySelector('.mainItem')
+    // list.addEventListener('touchmove', e => e.stopPropagation(), false)
   },
 
   methods: {

+ 6 - 3
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -93,7 +93,7 @@
       <!-- 参考预案演练库 -->
       <div class="mainItem">
         <div class="label labelPeople">
-          <van-button size="small" @click="rehearsalHandler" type="info">参考预案演练库</van-button>
+          <van-button size="small" @click="rehearsalHandler" type="info">参考演练范本库</van-button>
         </div>
       </div>
       <!-- 演练库选择组件 -->
@@ -110,6 +110,7 @@
         row="3"
         maxlength="2000"
         show-word-limit
+       
         placeholder="请填写预设案由"
       />
 
@@ -152,7 +153,7 @@
           <Upload v-model="form.imageList" :multiple="true" :maxCount="5" @input="listHandler"></Upload>
         </template>
       </van-field>
-      <div class="btns">
+      <div class="btns" v-show="isBtn">
         <van-button type="info" @click="submitHandler(1)">保存</van-button>
         <van-button type="info" @click="submitHandler(2)">提交</van-button>
       </div>
@@ -163,7 +164,7 @@
 import NavBar from '@/components/NavBar'
 import CheckPeople from '@/components/peopleList/index.vue'
 import Upload from '@/components/upload/index.vue'
-
+import {onresizeHandler} from '@/utils/onresizeMixins.js'
 import { getrehearsalInfo, drillInfo } from '@/api/drillTask.js'
 import { newDateTimeMin } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
@@ -172,6 +173,7 @@ import VuePdf from '@/components/pdfCom/index.vue'
 
 export default {
   name: 'SocAppAddTraining',
+  mixins:[onresizeHandler],
   components: {
     VuePdf,
     yldialog,
@@ -509,6 +511,7 @@ export default {
   background-color: #fff;
   // margin: 16px;
   display: flex;
+  
   justify-content: space-around;
   .van-button {
     width: 300px;

+ 4 - 1
src/views/menu/training/components/addTraining.vue

@@ -130,7 +130,7 @@
           <Upload v-model="form.imageList" :multiple="true" :maxCount="5" @input="listHandler"></Upload>
         </template>
       </van-field>
-      <div class="btns">
+      <div class="btns" v-show="isBtn">
         <van-button type="info" @click="submitHandler(1)">保存</van-button>
         <van-button type="info" @click="submitHandler(2)">提交</van-button>
       </div>
@@ -156,8 +156,11 @@ import { newDateTimeMin } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
 import { uniqBy } from 'lodash'
 import PDFAndImgLook from '@/components/imgAndPDF/index.vue'
+import {onresizeHandler} from '@/utils/onresizeMixins.js'
+
 export default {
   name: 'SocAppAddTraining',
+  mixins:[onresizeHandler],
   components: {
     SelectData,
 

+ 2 - 1
vue.config.js

@@ -112,7 +112,8 @@ module.exports = defineConfig({
       '/dev': {
         // target: "http://10.87.10.55:8080",
         // target: "http://10.87.10.91:8080",
-        target: "http://10.87.11.173:8080",
+        // target: "http://10.87.11.173:8080",
+        target: "http://10.87.10.47:8080",
         // ws:true,
         changOrigin:true,
         pathRewrite:{