Explorar el Código

Merge branch 'V0.0.8' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.8

zhulu hace 1 año
padre
commit
8c1a4bc2c0

+ 19 - 10
src/api/drillTask.js

@@ -6,7 +6,7 @@ import request from '@/utils/request'
 export function getdrillTask(query) {
   return request({
     url: '/core/app/drill/task/list',
-    
+
     method: 'get',
     params:query
   })
@@ -15,16 +15,25 @@ export function getdrillTask(query) {
 export function getrehearsalInfo(query) {
   return request({
     url: `/core/app/drill/task/${query}`,
-    
+
     method: 'get',
-    
+
   })
 }
 //演练库列表
 export function drillDictionaryList(query) {
   return request({
     url: `/core/app/drillDictionary/listData`,
-    
+
+    method: 'get',
+    params:query
+  })
+}
+//网点预案列表
+export function drillDictionaryBranchList(query) {
+  return request({
+    url: `/core/app/drillDictionary/listBranchData`,
+
     method: 'get',
     params:query
   })
@@ -33,7 +42,7 @@ export function drillDictionaryList(query) {
 export function drillInfo(data) {
   return request({
     url: `/core/app/drill/task`,
-    
+
     method: 'put',
     data
   })
@@ -42,7 +51,7 @@ export function drillInfo(data) {
 export function drillSignInfo(data) {
   return request({
     url: `/core/app/drill/task/evaluate`,
-    
+
     method: 'post',
     data
   })
@@ -51,7 +60,7 @@ export function drillSignInfo(data) {
 export function edittrainingInfo(data) {
   return request({
     url: `/core/eduTask`,
-    
+
     method: 'put',
     data
   })
@@ -61,7 +70,7 @@ export function getsignUserList(id) {
   return request({
     url: `/core/app/drill/task/signUserList/${id}`,
     method: 'get',
-    
+
   })
 }
 //签名提交
@@ -81,7 +90,7 @@ export function getrehearsalList(id) {
       isToken: false
     },
     method: 'get',
-    
+
   })
 }
 //获取演练计划排名列表
@@ -114,6 +123,6 @@ export function getPanelList() {
       isToken: false
     },
     method: 'get',
-    
+
   })
 }

+ 35 - 4
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -113,6 +113,9 @@
         <div class="label labelPeople">
           <van-button size="small" @click="rehearsalHandler" type="info">参考演练范本库</van-button>
         </div>
+        <div class="label labelPeople">
+          <van-button size="small" @click="rehearsalBranchHandler" type="info">网点预案</van-button>
+        </div>
       </div>
       <!-- 演练库选择组件 -->
       <yldialog ref="yldialog" :dictValue="form.type" @checkList="checkList"></yldialog>
@@ -194,7 +197,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 {getrehearsalInfo, drillInfo, drillDictionaryBranchList} from '@/api/drillTask.js'
 import { newDateTimeMin } from '@/utils/date.js'
 import { Dialog, Toast } from 'vant'
 import yldialog from './dialog.vue'
@@ -211,12 +214,20 @@ export default {
     Upload,
     CheckPeople
   },
+  props:{
+    organizationId: {
+      //机构ID
+      type: String,
+      default: JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+    }
+  },
   data() {
     return {
       // this_window: window,
       studyList: [], //资料数组
       startDateTime: new Date(),
       endDateTime: new Date(),
+      orgId: this.organizationId || '',
 
       falg: false, //校验是否通过
 
@@ -245,7 +256,8 @@ export default {
       columns: [],
       columnsType: [],
       columnsList: [],
-      columnsListType: []
+      columnsListType: [],
+      branchList: []
     }
   },
   created() {
@@ -258,6 +270,21 @@ export default {
       this.columnsListType = res
       this.columnsType = res.map(item => item.dictLabel)
     })
+    //获取网点预案
+    drillDictionaryBranchList({ orgId: this.orgId, dictValue: '' }).then(res => {
+      let { code, data, msg } = res
+      if (code == 200) {
+        this.branchList = data
+        if (this.branchList.length === 0){
+          //Toast('本网点还未编制预案,请及时到网页端网点预案管理菜单维护')
+          Dialog.alert({
+            message: '本网点还未编制预案,请及时到网页端网点预案管理菜单维护',
+          }).then(() => {
+
+          });
+        }
+      }
+    })
     //获取详情信息
     getrehearsalInfo(this.$route.params.id).then(res => {
       let { code, data, msg } = res
@@ -343,6 +370,10 @@ export default {
     rehearsalHandler() {
       this.$refs.yldialog.init()
     },
+    //打开演练库弹框
+    rehearsalBranchHandler() {
+      this.$refs.yldialog.initBranch()
+    },
 
     //演练项目确认
     onConfirm(val) {
@@ -403,7 +434,7 @@ export default {
     //表单提交前校验
     beforSubmitV() {
       this.falg = false
-      let startDate = JSON.parse(JSON.stringify(this.form.drillStartTime))      
+      let startDate = JSON.parse(JSON.stringify(this.form.drillStartTime))
       let objStart=startDate.replace(/-/g,"/");
       startDate = Date.parse(new Date(startDate))
       if(!startDate){
@@ -415,7 +446,7 @@ export default {
         return
       }
 
-      let endDate = JSON.parse(JSON.stringify(this.form.drillEndTime))      
+      let endDate = JSON.parse(JSON.stringify(this.form.drillEndTime))
       let objend=endDate.replace(/-/g,"/");
       endDate = Date.parse(new Date(endDate))
       if(!endDate){

+ 18 - 1
src/views/menu/rehearsalTask/components/dialog.vue

@@ -46,7 +46,7 @@
 </template>
 <script>
 import { deptTreeList } from '@/api/toConsult.js'
-import { drillDictionaryList } from '@/api/drillTask.js'
+import { drillDictionaryList,drillDictionaryBranchList } from '@/api/drillTask.js'
 import OrgTree from '@/components/orgTree'
 import { list } from '@/api/protection'
 export default {
@@ -133,6 +133,23 @@ export default {
         }
       })
     },
+    initBranch() {
+      this.show = true
+      this.getBranchPeople()
+    },
+    getBranchPeople() {
+      drillDictionaryBranchList({ orgId: this.orgId, dictValue: this.dictValue }).then(res => {
+        let { code, data, msg } = res
+        if (code == 200) {
+          console.log(res)
+          this.peopleList = data
+          this.peopleListCpoy = JSON.parse(JSON.stringify(this.peopleList))
+          this.peopleListCpoy.forEach(item => {
+            this.$set(item, 'checked', false)
+          })
+        }
+      })
+    },
 
     onSearch(val) {
       this.peopleListCpoy = this.peopleList.filter(item => {