coys před 2 roky
rodič
revize
c8746d3df7

+ 1 - 1
src/components/NavBar/index.vue

@@ -14,7 +14,7 @@ export default {
   components:{NavBar},
   computed:{
     title (){
-      return this.$router.history.current .meta.title
+      return this.$router.history.current.meta.title
     }
   },
   methods:{

+ 12 - 0
src/router/router.config.js

@@ -28,6 +28,18 @@ export let routers = [
     meta: { title: '添加监控调阅', keepAlive: false }
   },
   {
+    path: '/update/:id',
+    name: 'update',
+    component: () => import('@/views/menu/monitoringCall/components/addInfo'),
+    meta: { title: '编辑监控调阅', keepAlive: false }
+  },
+  {
+    path: '/info/:id',
+    name: 'info',
+    component: () => import('@/views/menu/monitoringCall/components/addInfo'),
+    meta: { title: '监控调阅详情', keepAlive: false }
+  },
+  {
     path: '/training',
     name: 'training',
     component: () => import('@/views/menu/training/index'),

+ 26 - 20
src/views/menu/monitoringCall/components/addInfo.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <NavBar />
-    <div class="bigBox">
+    <div :class="disabled? 'bigBoxInfo':'bigBox'">
       <van-row>
         <van-col span="24">
           <!-- <van-cell title="任务名称" value="每周监控调阅(0501~0507)" /> -->
@@ -32,7 +32,7 @@
               show-toolbar
               :columns="hostList"
               @confirm="onConfirm"
-              @cancel="showHost=false"
+              @cancel="showHost = false"
               @change="onChange"
             >
               <template #option="option">
@@ -50,7 +50,7 @@
           <van-field
             required
             v-model="fieldValue"
-            :disabled="disabled||ishost"
+            :disabled="disabled || ishost"
             is-link
             readonly
             label="视频通道"
@@ -63,7 +63,7 @@
               show-toolbar
               :columns="columns"
               @confirm="onConfirmPassage"
-              @cancel="showStatus=false"
+              @cancel="showStatus = false"
               @change="onChange"
             >
               <template #option="option">
@@ -76,7 +76,7 @@
         >
       </van-row>
       <van-row>
-        <van-col span="24">
+        <van-col span="24" v-if="!disabled">
           <van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o">
             请选择实际调阅项目进行填写,不需要编辑所有项目
           </van-notice-bar>
@@ -90,7 +90,9 @@
             <van-collapse-item :name="item.dictValue" v-for="item in dataList" :key="item.dictValue">
               <template #title>
                 <div>
-                  <van-checkbox :disabled="disabled" v-model="item.isChecked" shape="square">{{ item.dictLabel }}</van-checkbox>
+                  <van-checkbox :disabled="disabled" v-model="item.isChecked" shape="square">{{
+                    item.dictLabel
+                  }}</van-checkbox>
                 </div>
               </template>
 
@@ -98,6 +100,7 @@
                 <van-col span="24">
                   <van-dropdown-menu>
                     <van-dropdown-item
+                      :disabled ="disabled"
                       v-model="item.situation"
                       @change="changeHandler($event, item)"
                       :options="dictList"
@@ -112,7 +115,9 @@
                       v-model="item.abnormalIllustrate"
                       rows="2"
                       autosize
+                      :disabled="disabled"
                       required
+                      :maxlength="50"
                       label="异常说明"
                       type="textarea"
                       placeholder="请输入异常说明"
@@ -128,10 +133,10 @@
       </div>
 
       <!-- 底部按钮 -->
-      <div class="bottomClass">
+      <div class="bottomClass" >
         <van-row>
           <van-col span="24">
-            <van-button type="info" :disabled="disabled" @click="addForm">{{
+            <van-button type="info" v-if="!disabled"  @click="addForm">{{
               $route.params.id.split('_')[2] == 'edit' ? '修改' : '添加'
             }}</van-button>
           </van-col>
@@ -158,7 +163,7 @@ import { mapGetters } from 'vuex'
 export default {
   data() {
     return {
-      disabled:'',//是否禁用
+      disabled: '', //是否禁用
       taskId: '', //任务ID
       falg: false, //校验是否通过
       dictList: [], //异常正常字典
@@ -202,21 +207,23 @@ export default {
   },
   created() {
     this.init()
-    this.disabled=+this.$route.params.id.split('_')[3]? true:false
-    console.log(this.disabled);
+    this.disabled = +this.$route.params.id.split('_')[3] ? true : false
+    console.log(this.disabled)
   },
 
   mounted() {},
   methods: {
     //根据卡片ID获取详情数据
     getInfoHandler() {
+      console.log(this.dataList);
       //判断当前路由的信息是新增还是编辑
-      if (this.$route.params.id.split('_')[2] == 'edit' && this.dataList.length > 0) {
+      if ((this.$route.params.id.split('_')[2] == 'edit') && this.dataList.length > 0) {
         //当前是编辑
         //获取卡片详情数据
         getEditInfo(this.$route.params.id.split('_')[1]).then(res => {
           let { data, msg, code } = res
           if (code == 200) {
+            
             ;(this.activeNames = ['']), //滞空选中
               this.dataList.forEach(item => {
                 data.coreMonitoringTaskMonitorInfoList.forEach(i => {
@@ -314,7 +321,6 @@ export default {
     },
     //表单提交前校验
     beforSubmitV() {
-      
       this.falg = false
       if (this.host == '' && this.hostId == '') {
         Toast('监控主机不能为空!')
@@ -326,24 +332,20 @@ export default {
         this.falg = true
         return
       }
-      console.log( this.dataList);
-      
+      console.log(this.dataList)
+
       this.dataList.forEach(item => {
-        
         if (item.situation == '1' && item.abnormalIllustrate == '') {
-          
           Toast(`${item.dictLabel}的异常情况说明不能为空!`)
           this.falg = true
         }
       })
-      
     },
     //表单提交
     addForm() {
       this.beforSubmitV()
-      
+
       if (this.falg) {
-        
         //校验不通过
       } else {
         let list = []
@@ -398,6 +400,10 @@ export default {
   height: calc(100vh - 260px);
   overflow: scroll;
 }
+.bigBoxInfo {
+  height: calc(100vh);
+  overflow: scroll;
+}
 .van-button {
   width: 100%;
   margin-top: 10px;

+ 0 - 1
src/views/menu/monitoringCall/components/consultInfo.vue

@@ -14,7 +14,6 @@
         <!-- 调阅列表 -->
         <div class="topBox" v-for="item in taskData.coreMonitoringTaskRegistrationMonitorVOList" :key="item.id">
           <!-- //主机列表组件 -->
-
           <MonitoingList :list="item" :taskStatus="taskData.taskStatus"></MonitoingList>
         </div>
       </div>

+ 42 - 7
src/views/menu/monitoringCall/components/monitoringList.vue

@@ -12,15 +12,15 @@
         <van-col class="vancol" span="6">检查情况</van-col>
         <van-col class="vancol" span="12">异常说明</van-col>
       </van-row>
-      <van-row class="List" v-for="item in list.coreMonitoringTaskMonitorInfoList" :key="item.id">
-        <van-col class="vancol" span="6">{{ item.project | proJectListFilter(this_) }}</van-col>
+      <van-row class="Listmain" v-for="item in list.coreMonitoringTaskMonitorInfoList" :key="item.id">
+        <div class="itemMain" >{{ item.project | proJectListFilter(this_) }}</div>
 
-        <van-col class="vancol" span="6"
+        <div   class="itemMain"
           ><span :style="{ color: item.situation == 1 ? '#d97b7e' : '#12b533' }">{{
             item.situation | dictFilter(this_)
-          }}</span></van-col
+          }}</span></div
         >
-        <van-col class="vancol" span="12">{{ item.abnormalIllustrate }}</van-col>
+        <div  class="info" >{{ item.abnormalIllustrate }}</div>
       </van-row>
     </div>
   </div>
@@ -85,8 +85,15 @@ export default {
   methods: {
     //编辑项目
     editHandler(isEdit) {
+      let path=''
+      if(isEdit===1){
+        path='info'
+      }else{
+        path='update'
+      }
       // isEdit 1查看 0编辑
-      this.$router.push('/addInfo/' + this.$route.params.id + '_' + this.list.id + '_edit'+'_'+isEdit)
+      console.log();
+      this.$router.push(`/${path}/` + this.$route.params.id.split('_')[0] + '_' + this.list.id + '_edit'+'_'+isEdit)
     }
   }
 }
@@ -115,6 +122,32 @@ export default {
   background-color: #fff;
   margin-bottom: -1px;
   text-align: left;
+  height: 100%;
+}
+.Listmain{
+
+  border: 1px solid #ccc;
+  background-color: #fff;
+  margin-bottom: -1px;
+  text-align: left;
+  align-items: center;
+  display: flex;
+  height: 100%;
+ 
+  .itemMain{
+    width: 25%;
+    min-height: 136px;
+    line-height: 136px;
+    height: 100%;
+    text-align: center;
+    border-left: 1px solid #ccc;
+  }
+  .info{
+    flex: 1;
+    min-height: 136px;
+    height: 100%;
+    border-left: 1px solid #ccc;
+  }
 }
 .titleList {
   font-size: 26px;
@@ -122,8 +155,10 @@ export default {
   font-weight: bold;
 }
 .vancol {
-  height: 60px;
+  height: 100%;
+  // min-height: 60px;
   line-height: 60px;
+  
   border-left: 1px solid #ccc;
   padding-left: 5px;
 }

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

@@ -363,10 +363,11 @@ export default {
   padding-right: 10px;
   bottom: 5%;
   right: 2%;
+  
   position: absolute;
   font-size: 20px;
   border-radius: 10px;
-  background-color: #da0000;
+  background-color: #1989fa;
 }
 .monitoring {
   color: white;

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

@@ -129,7 +129,7 @@ export default {
         .then(res => {
           console.log(process.env.NODE_ENV);
           /*上传成功*/
-          let imgUrl = process.env.NODE_ENV === 'development' ? config.baseUrl + res.data.url : window.origin + res.data.url
+          let imgUrl = process.env.NODE_ENV === 'development' ? config.baseUrl + res.data.url :res.data.url
          this.submitSign(imgUrl)
           
           // this.$emit("imgUrl", res.data.url);