Browse Source

技能博物馆------全馆值班

jbb 2 years ago
parent
commit
45d22f079c
1 changed files with 34 additions and 3 deletions
  1. 34 3
      src/views/activiti/form/demoForm2.vue

+ 34 - 3
src/views/activiti/form/demoForm2.vue

@@ -131,7 +131,7 @@ export default {
                 add: this.add,
                 gv:this.funName,
                 department:[],//技能博物管下拉框信息
-                personListJn:[]//技能博物馆人员信息下拉框
+                personListJn:[],//技能博物馆人员信息下拉框
             },
             postInfo: {},//职位信息
             deptInfo: {},//部门信息
@@ -221,9 +221,24 @@ export default {
                              if (res.success) {
                                  var aa = []
                                  res.result.records.map(item =>{
-                                     aa.push({value:item.realname,label:item.realname,workNo:item.workNo,post:item.post,nInductionTime:item.nInductionTimenInductionTime})
+                                     aa.push(
+                                         {value:item.realname,
+                                         label:item.realname,
+                                         workNo:item.workNo,
+                                         post:item.post,
+                                         nInductionTime:item.nInductionTimenInductionTime,
+                                         phone:item.phone,
+                                         telephone:item.telephone,
+                                         departIds_dictText:item.departIds_dictText,
+                                         departIds:item.departIds
+                                         })
                                  })
                               this.dynamicData.personListJn = aa
+                              //技能博物馆 --- 全馆值班   此时无法触碰到handleChange方法  手动触发
+                              if(this.processData.businessTable == 'bwg_house_duty'){
+                                this.handleChange()
+                              }
+
                             } else {
                                  this.$message.error(res.message)
                              }
@@ -292,6 +307,7 @@ export default {
                     this.init()
                 }
             }
+            
 
             // 后台检测到流程节点有关联表单且前台处于我的待办界面打开表单详情
             if (res.result.isSave && this.processData.isSuspended != undefined) {
@@ -652,7 +668,7 @@ export default {
             }
          },
         // 表单字段数值发生改变事件
-        handleChange (value, key) {  
+        handleChange (value, key) { 
           if(key == 'proposer' && this.processData.businessTable == 'regular_employee_apply'){//员工转正申请:申请人部门
             this.$refs.KFB.setData({apply_department:this.deptInfo[value]})   
           }
@@ -676,6 +692,21 @@ export default {
               })
             // this.$refs.KFB.setData({employee_number:this.postInfo[value]})   
           }
+         //技能博物馆 ---- 全馆值班 (根据登录姓名带出其他字段的值)
+         if(this.processData.businessTable == 'bwg_house_duty'){
+                var that = this
+                 setTimeout(function(){
+                   that.dynamicData.personListJn.map(item =>{
+                     if(item.label == that.$store.getters.nickname){
+                      that.$refs.KFB.setData({department_id:item.departIds}) 
+                      that.$refs.KFB.setData({department_name:item.departIds_dictText}) 
+                      that.$refs.KFB.setData({telephone:item.telephone}) 
+                      that.$refs.KFB.setData({mobile_telephone:item.phone}) 
+                     }
+                   })
+                 },200)
+         }
+           
                  
             //改变的表单是主子表类型时
             if((value instanceof Array) && (key.indexOf('child&')!==-1)){