coys 2 rokov pred
rodič
commit
6d918c7d7e

+ 26 - 17
src/api/public.js

@@ -1,7 +1,5 @@
 import request from '@/utils/request'
 
-
-
 // 登录方法
 export function login(data) {
   return request({
@@ -21,7 +19,7 @@ export function tokenLogin(token) {
     headers: {
       isToken: false
     },
-    method: 'get',
+    method: 'get'
   })
 }
 
@@ -41,19 +39,17 @@ export function register(data) {
 export function getMenu() {
   return request({
     url: '/system/menu/getRouters',
-    method: 'get',
+    method: 'get'
   })
 }
 // 获取天气预警
 export function getTheAreaWeather(orgId) {
   return request({
     url: `/core/weatherWarning/getTheAreaWeather/${orgId}`,
-    method: 'get',
+    method: 'get'
   })
 }
 
-
-
 // 刷新方法
 export function refreshToken() {
   return request({
@@ -94,7 +90,7 @@ export function deptTreeList(id) {
   return request({
     url: '/system/dept/deptTree',
     method: 'get',
-    params:{
+    params: {
       id
     }
   })
@@ -108,35 +104,48 @@ export function getDict(dictType) {
   })
 }
 //通过组织机构ID获取人员
-export function getOrgPeople(orgId){
+export function getOrgPeople(orgId) {
   return request({
     url: `/system/user/getByOrgId/${orgId}`,
-    method: 'get',
-
+    method: 'get'
   })
 }
 
 //上传文件
-export function upload(data,type) {
+export function upload(data, type) {
   return request({
     url: '/file/file/upload',
     method: 'post',
     headers: {
-      'Content-Type': 'multipart/form-data',
+      'Content-Type': 'multipart/form-data'
     },
     data,
-    params:{
+    params: {
       busType: type
     }
   })
 }
 
-// 机构树
-export function deptTreeSelect(removeId) {
+//修改前的 机构树  组织机构用户使用的树
+export function userAndOrgTree(removeId) {
   return request({
     url: '/system/dept/deptTree',
     method: 'get',
-    params:removeId
+    params: removeId
+  })
+}
+//常规业务使用的树
+export function deptTreeSelect(data) {
+  if (!data) {
+    data = {
+      excludeOrgCode: '900000000',
+      excludeOrgName: '各部门'
+    }
+  }
+  return request({
+    url: '/system/dept/deptTree/business',
+    method: 'post',
+    data
   })
 }
 

+ 17 - 32
src/components/peopleList/index.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-    
     <van-field
       readonly
       clickable
@@ -14,13 +13,7 @@
     <van-action-sheet class="bigsheetbox" v-model="show" position="bottom" title="选择人员">
       <van-row>
         <van-col span="24">
-          <van-search
-            v-model="searchVal"
-            show-action
-            placeholder="请输入搜索关键词"
-            @input="onSearch"
-            @cancel="onCancel"
-          />
+          <van-search v-model="searchVal" placeholder="请输入搜索关键词" @input="onSearch" />
         </van-col>
       </van-row>
 
@@ -30,7 +23,7 @@
             <van-cell-group>
               <van-cell v-for="item in peopleListCpoy" clickable :key="item.id" :title="`${item.name}`">
                 <template #right-icon>
-                  <van-checkbox :name="item.id"   />
+                  <van-checkbox :name="item.id" />
                 </template>
               </van-cell>
             </van-cell-group>
@@ -58,7 +51,6 @@ export default {
   props: {
     organizationId: {
       //机构ID
-      
     },
     userList: {
       type: Array,
@@ -110,23 +102,19 @@ export default {
       this.getpeople()
     },
     //监听弹框是否打开
-    show(val){
-      if(val){
+    show(val) {
+      if (val) {
         this.getpeople()
-        
       }
     },
     //监听人员数组变化
     userList(val) {
-      this.peoplesId=[]
-      this.$set(this.$data,'peoples',val.map(item => item.userName).join(','))
+      this.peoplesId = []
+      this.$set(this.$data, 'peoples', val.map(item => item.userName).join(','))
 
-       
-      
-       val.map(item => {
+      val.map(item => {
         this.peoplesId.push(item.userId)
       })
-     
     }
   },
 
@@ -137,25 +125,22 @@ export default {
     onLoad() {},
     getpeople() {
       getOrgPeople(this.orgId).then(res => {
-      
         let { code, data, msg } = res
         if (code == 200) {
           this.peopleList = data
-          this.peopleList.forEach(item=>{
-            item.userName=item.name
-            item.username=item.name
-            item.userId=item.id
+          this.peopleList.forEach(item => {
+            item.userName = item.name
+            item.username = item.name
+            item.userId = item.id
           })
           this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
-        
+
           this.peopleListCpoy.forEach(item => {
             this.peoplesId.forEach(i => {
-             
-              console.log(this.peoplesId);
+              console.log(this.peoplesId)
               if (item.userId === i) {
-                
                 this.$set(item, 'checked', true)
-              }else{
+              } else {
                 this.$set(item, 'checked', false)
               }
             })
@@ -184,10 +169,10 @@ export default {
           }
         })
       })
-      
+
       // this.peoples = list.map(item => item.name).join(',')
-     
-      this.$set(this.$data,'peoples',list.map(item => item.name).join(','))
+
+      this.$set(this.$data, 'peoples', list.map(item => item.name).join(','))
       // 抛出已选择人员信息
       this.$emit('userList', list)
       this.show = false

+ 51 - 52
src/views/menu/monitoringCall/components/taskInfo.vue

@@ -9,7 +9,7 @@
               <div class="textTitle">调阅记录</div>
             </van-col>
             <van-col span="24">
-              <div class="text">{{videoChannelName}}</div>
+              <div class="text">{{ videoChannelName }}</div>
             </van-col>
           </van-row>
           <!-- //主体内容 -->
@@ -22,18 +22,23 @@
             <div class="mainItem">
               <van-row class="rowItem" v-for="item in dataList" :key="item.id">
                 <van-col class="itemCls" span="10"
-                  ><van-checkbox v-model="item.isChecked" @change="checkedFc($event, item)" :disabled="disabled" icon-size="16px" shape="square">{{
-                    item.dictLabel
-                  }}</van-checkbox>
+                style="display: flex;"
+                  ><van-checkbox
+                    v-model="item.isChecked"
+                    @change="checkedFc($event, item)"
+                    :disabled="disabled"
+                    icon-size="16px"
+                    shape="square"
+                  >
+                </van-checkbox>
+                <span @click.stop="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">
-                    <van-radio icon-size="16px"  :name="itemDict.dictValue">{{
-                      itemDict.dictLabel
-                    }}</van-radio></van-col
+                    <van-radio icon-size="16px" :name="itemDict.dictValue">{{ itemDict.dictLabel }}</van-radio></van-col
                   >
                 </van-radio-group>
-              
+
                 <van-col span="24" v-if="item.situation == '1'">
                   <van-field
                     v-model="item.abnormalIllustrate"
@@ -69,13 +74,8 @@
   </div>
 </template>
 <script>
-import {
-
-  updateInfo,
-  getEditInfo,
-
-} from '@/api/toConsult.js'
-import {  Toast } from 'vant'
+import { updateInfo, getEditInfo } from '@/api/toConsult.js'
+import { Toast, Dialog } from 'vant'
 
 export default {
   name: 'SocAppTaskInfo',
@@ -115,7 +115,6 @@ export default {
           this.$set(item, 'situation', '') //异常情况初始化默认值
           this.$set(item, 'isChecked', false) //选中初始值
           this.$set(item, 'abnormalIllustrate', '') //情况说明初始化默认值
-          
         })
         //获取异常情况字典
         this.getDictHandler('core_check_type', res => {
@@ -130,44 +129,39 @@ export default {
     },
     //复选框选中变化
     checkHandler(val, item) {
-      if(val){
-        item.isChecked=true
+      if (val) {
+        item.isChecked = true
       }
-      if (val&&item.situation=='0') {
+      if (val && item.situation == '0') {
         item.abnormalIllustrate = ''
       }
     },
-    checkedFc(val,item){
-      if(val){
-        if(!item.situation){
-          item.situation='0'
-        } 
-          
-      }else{
-        item.situation=''
-        item.abnormalIllustrate=''
+    checkedFc(val, item) {
+      if (val) {
+        if (!item.situation) {
+          item.situation = '0'
+        }
+      } else {
+        item.situation = ''
+        item.abnormalIllustrate = ''
       }
-      
     },
     getInfoHandler(id, videoId, hostId) {
       //获取卡片详情数据
-      getEditInfo({ taskId: id+'', videoId: videoId+'', hostId: hostId+'' }).then(res => {
+      getEditInfo({ taskId: id + '', videoId: videoId + '', hostId: hostId + '' }).then(res => {
         let { data, msg, code } = res
         if (code == 200) {
-          
-            this.dataList.forEach(item => {
-              data.coreMonitoringTaskMonitorInfoList.forEach(i => {
-                if (i.project === item.dictValue) {
-                  
-                  //查询赋值
-                  this.$set(item, 'isChecked', true)
-                  this.$set(item, 'situation', i.situation)
-                  this.$set(item, 'abnormalIllustrate', i.abnormalIllustrate)
-                  
-                }
-              })
+          this.dataList.forEach(item => {
+            data.coreMonitoringTaskMonitorInfoList.forEach(i => {
+              if (i.project === item.dictValue) {
+                //查询赋值
+                this.$set(item, 'isChecked', true)
+                this.$set(item, 'situation', i.situation)
+                this.$set(item, 'abnormalIllustrate', i.abnormalIllustrate)
+              }
             })
-            console.log(this.dataList);
+          })
+          console.log(this.dataList)
           //赋值主机&通道名称
           this.host = data.hostName
           this.hostId = data.host
@@ -175,8 +169,6 @@ export default {
           this.videoChannel = data.videoChannel
           this.taskRegistrationId = data.registrationId
           this.id = data.id
-            
-         
         }
       })
     },
@@ -186,12 +178,11 @@ export default {
       this.falg = false
 
       this.dataList.forEach(item => {
-
         if (item.isChecked) {
-          console.log(item);
+          console.log(item)
           if (item.situation == '1' && item.abnormalIllustrate == '') {
             Toast(`${item.dictLabel}的异常情况说明不能为空!`)
-            
+
             this.falg = true
           }
         }
@@ -206,7 +197,7 @@ export default {
 
         this.dataList.forEach(item => {
           if (item.isChecked) {
-            item.project=item.dictValue
+            item.project = item.dictValue
             list.push(item)
           }
         })
@@ -216,18 +207,22 @@ export default {
           host: this.hostId,
           videoChannel: this.videoChannel,
           taskRegistrationId: this.taskRegistrationId,
-          id: this.id||'',
+          id: this.id || '',
           coreMonitoringTaskMonitorInfoList: list
         }).then(res => {
           let { data, msg, code } = res
           if (code == 200) {
             Toast('编辑成功!')
-           this.show=false
-           this.$emit('resetList')
+            this.show = false
+            this.$emit('resetList')
           }
           this.falg = false
         })
       }
+    },
+    //文字提示
+    textTitleHandler(text) {
+      Dialog({ message: text ? text : '提示' })
     }
   }
 }
@@ -288,4 +283,8 @@ export default {
 .btn {
   width: 90%;
 }
+.info {
+  color: #1989fa;
+  text-decoration: underline;
+}
 </style>

+ 17 - 11
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -60,7 +60,9 @@
       </van-popup>
       <!-- 参考预案演练库 -->
       <div class="mainItem">
-        <div class="label labelPeople"><van-button size="small" @click="rehearsalHandler" type="info">参考预案演练库</van-button></div>
+        <div class="label labelPeople">
+          <van-button size="small" @click="rehearsalHandler" type="info">参考预案演练库</van-button>
+        </div>
       </div>
       <!-- 演练库选择组件 -->
       <yldialog ref="yldialog" :dictValue="form.type" @checkList="checkList"></yldialog>
@@ -113,9 +115,15 @@
         @userList="lackUserListHandler"
       ></CheckPeople>
       <!-- 上传 -->
-      <van-field readonly clickable name="uploader" label="上传图片">
+      <van-field
+        readonly
+        clickable
+        name="uploader"
+        required
+        label="上传图片"
+      >
         <template #input>
-          <Upload v-model="form.imageList" :maxCount="5" @input="listHandler"></Upload>
+          <Upload  v-model="form.imageList" :maxCount="5" @input="listHandler"></Upload>
         </template>
       </van-field>
       <div class="btns">
@@ -243,16 +251,14 @@ export default {
 
   methods: {
     //预案演练选中数据
-    checkList(list){
-     this.form.presetCase=list[0].defaultCause
-   
-     
+    checkList(list) {
+      this.form.presetCase = list[0].defaultCause
     },
     //打开演练库弹框
-    rehearsalHandler(){
+    rehearsalHandler() {
       this.$refs.yldialog.init()
     },
-  
+
     //演练类型确认
     onConfirm(val) {
       this.form.typeText = val //演练类型赋值
@@ -379,8 +385,8 @@ export default {
       obj.taskUserList = []
 
       obj.taskUserList.push(...this.userPeopleList, ...this.lackPeopleList)
-      console.log(obj);
-      
+      console.log(obj)
+
       drillInfo({
         id: this.trainingData.id,
         // type: this.trainingData.type,

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

@@ -122,7 +122,7 @@
         @userList="lackUserListHandler"
       ></CheckPeople>
       <!-- 上传 -->
-      <van-field readonly clickable name="uploader" label="上传图片">
+      <van-field readonly required clickable name="uploader" label="上传图片">
         <template #input>
           <Upload v-model="form.imageList" :maxCount="5" @input="listHandler"></Upload>
         </template>