liuzhihui %!s(int64=2) %!d(string=hace) años
padre
commit
175e0ba324

+ 51 - 44
CallCenterWeb.UI/RMYY/src/views/faultRepairManagement/repairList/index.vue

443
     <el-dialog :visible.sync="dialogdept" title="转基建">
443
     <el-dialog :visible.sync="dialogdept" title="转基建">
444
       <el-form ref="redeploydeptForm" :model="redeploydeptForm" :rules="rules" label-width="100px">
444
       <el-form ref="redeploydeptForm" :model="redeploydeptForm" :rules="rules" label-width="100px">
445
         <el-form-item label="科室" prop="ToDept">
445
         <el-form-item label="科室" prop="ToDept">
446
-          <select-dept-tree :deptparam="deptidArr1" v-model="redeploydeptForm.ToDept" @post-deptid="getDeptid1" />
446
+          <select-gzbx-dept-tree :deptparam="deptidArr1" v-model="redeploydeptForm.ToDept" @post-deptid="getDeptid1" />
447
         </el-form-item>
447
         </el-form-item>
448
         <el-form-item label="人员" prop="ToUserCode">
448
         <el-form-item label="人员" prop="ToUserCode">
449
           <el-select v-model="redeploydeptForm.ToUserCode" clearable filterable placeholder="请选择人员"
449
           <el-select v-model="redeploydeptForm.ToUserCode" clearable filterable placeholder="请选择人员"
565
   } from "@/api/commonAPI";
565
   } from "@/api/commonAPI";
566
   import fieldDATA from "@/utils/fieldsData.js";
566
   import fieldDATA from "@/utils/fieldsData.js";
567
   import selectOrderTypeTwo from "@/components/context/commonSelect/selectOrderTypeTwo.vue";
567
   import selectOrderTypeTwo from "@/components/context/commonSelect/selectOrderTypeTwo.vue";
568
-  import addDefinedList from "@/components/context/addDefinedList";
568
+  import addDefinedList from "@/components/context/addDefinedList";
569
+  import selectGzbxDeptTree from "@/components/context/commonSelect/selectGzbxDeptTree.vue";
569
   import {
570
   import {
570
     getMaintenancerList,
571
     getMaintenancerList,
571
     postTaskOrders,
572
     postTaskOrders,
596
     name: "RepairList",
597
     name: "RepairList",
597
     components: {
598
     components: {
598
       Pagination,
599
       Pagination,
599
-      selectOrderTypeTwo,
600
+      selectOrderTypeTwo,
601
+      selectGzbxDeptTree
600
     },
602
     },
601
     data() {
603
     data() {
602
       return {
604
       return {
874
             deptid: id, // 字典管理的工单标识
876
             deptid: id, // 字典管理的工单标识
875
           };
877
           };
876
           GetPerson(params).then((res) => {
878
           GetPerson(params).then((res) => {
877
-            this.deptUserArr = res.rows;
879
+            this.deptUserArr = res.rows;
880
+            if(this.dialogdept == true){//转基建默认第一个
881
+              if(this.deptUserArr.length>0){
882
+                this.redeploydeptForm.ToUserCode = this.deptUserArr[0]
883
+              }
884
+            }
878
           });
885
           });
879
           resolve();
886
           resolve();
880
         });
887
         });
1254
         this.dialogdept = true;
1261
         this.dialogdept = true;
1255
         this.redeploydeptForm.WorkOrderCode = code;
1262
         this.redeploydeptForm.WorkOrderCode = code;
1256
         //清空
1263
         //清空
1257
-        this.deptidArr1 = []
1258
-        this.redeploydeptForm.ToDept = ""
1259
-        this.redeploydeptForm.ToUserCode = ""
1260
-        //获取配置信息
1261
-        if (this.$store.getters.workTypeMap[parseInt(type)]) {
1262
-          const autoData = JSON.parse(
1263
-            this.$store.getters.workTypeMap[parseInt(type)].autoDept || "[]"
1264
-          );
1265
-          const applyHos = this.$store.getters.deptmap[parseInt(applyid)].ids[0];
1266
-          this.applyHos = applyHos
1267
-          console.log(autoData,applyHos,'autoDataapplyHos')
1268
-          if (!autoData || autoData[0] == null) {
1269
-            // 没有配置信息['4005','89']['1','6']
1270
-            this.deptidArr1 = ['1','6']
1271
-            this.redeploydeptForm.ToDept = this.deptidArr1[this.deptidArr1.length-1]
1272
-            this.getDeptman(this.deptidArr1[this.deptidArr1.length-1]);
1273
-            return;
1274
-          }
1275
-          var hosall = [];
1276
-          for (var i = 0; i < autoData.length; i++) {
1277
-            hosall.push(autoData[i].autoyq);
1278
-          }
1279
-          for (var i = 0; i < autoData.length; i++) {
1280
-            if (autoData[i].autoyq == applyHos) {
1281
-              //有院区
1282
-              this.deptidArr1 =
1283
-                this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1284
-              this.redeploydeptForm.ToDept = autoData[i].autodept;
1285
-              this.getDeptman(autoData[i].autodept);
1286
-              this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1287
-            } else if (autoData[i].autoyq == "0" && hosall.indexOf(applyHos) < 0) {
1288
-              //全部
1289
-              this.deptidArr1 =
1290
-                this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1291
-              this.redeploydeptForm.ToDept = autoData[i].autodept;
1292
-              this.getDeptman(autoData[i].autodept);
1293
-              this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1294
-            }
1295
-          }
1296
-        }
1264
+        // this.deptidArr1 = []
1265
+        // this.redeploydeptForm.ToDept = ""
1266
+        // this.redeploydeptForm.ToUserCode = ""
1267
+        // //获取配置信息
1268
+        // if (this.$store.getters.workTypeMap[parseInt(type)]) {
1269
+        //   const autoData = JSON.parse(
1270
+        //     this.$store.getters.workTypeMap[parseInt(type)].autoDept || "[]"
1271
+        //   );
1272
+        //   const applyHos = this.$store.getters.deptmap[parseInt(applyid)].ids[0];
1273
+        //   this.applyHos = applyHos
1274
+        //   console.log(autoData,applyHos,'autoDataapplyHos')
1275
+        //   if (!autoData || autoData[0] == null) {
1276
+        //     // 没有配置信息['4005','89']['1','6']
1277
+        //     this.deptidArr1 = ['1','6']
1278
+        //     this.redeploydeptForm.ToDept = this.deptidArr1[this.deptidArr1.length-1]
1279
+        //     this.getDeptman(this.deptidArr1[this.deptidArr1.length-1]);
1280
+        //     return;
1281
+        //   }
1282
+        //   var hosall = [];
1283
+        //   for (var i = 0; i < autoData.length; i++) {
1284
+        //     hosall.push(autoData[i].autoyq);
1285
+        //   }
1286
+        //   for (var i = 0; i < autoData.length; i++) {
1287
+        //     if (autoData[i].autoyq == applyHos) {
1288
+        //       //有院区
1289
+        //       this.deptidArr1 =
1290
+        //         this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1291
+        //       this.redeploydeptForm.ToDept = autoData[i].autodept;
1292
+        //       this.getDeptman(autoData[i].autodept);
1293
+        //       this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1294
+        //     } else if (autoData[i].autoyq == "0" && hosall.indexOf(applyHos) < 0) {
1295
+        //       //全部
1296
+        //       this.deptidArr1 =
1297
+        //         this.$store.getters.deptmap[parseInt(autoData[i].autodept)].ids;
1298
+        //       this.redeploydeptForm.ToDept = autoData[i].autodept;
1299
+        //       this.getDeptman(autoData[i].autodept);
1300
+        //       this.redeploydeptForm.ToUserCode = autoData[i].autousercode;
1301
+        //     }
1302
+        //   }
1303
+        // }
1297
       },
1304
       },
1298
       redeployZuzhang(code) {
1305
       redeployZuzhang(code) {
1299
         this.getReason("ZUZHANG");
1306
         this.getReason("ZUZHANG");

+ 9 - 0
CallCenterWeb.UI/RMYYAPP/pages/myTask/repairList/addRepair/pageData.js

45
 			}
45
 			}
46
 		})
46
 		})
47
 	},
47
 	},
48
+	getDetRepair(fn){
49
+		let deptDataTree
50
+		http.get("Department/GetTreeListNew").then((res)=>{
51
+			if(res.state.toLowerCase() ==="success"){
52
+				deptDataTree = filterDepartTreeDatas(res.data,0,-1,'')
53
+				fn(deptDataTree,res.data)
54
+			}
55
+		})
56
+	},
48
 	//标本信息
57
 	//标本信息
49
 	getBB(str,fn){
58
 	getBB(str,fn){
50
 		let bbdata = []
59
 		let bbdata = []

+ 17 - 4
CallCenterWeb.UI/RMYYAPP/pages/myTask/repairList/repairDetail/tranferDetail/tranferDetail.vue

47
 		onLoad(option) {
47
 		onLoad(option) {
48
 			this.getHosptallist() // 院区
48
 			this.getHosptallist() // 院区
49
 			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
49
 			this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
50
+			this.state = option.state
51
+			this.workorderid = option.wid
52
+			console.log(option.state)
53
+			if(option.state == 'trunWork'){
54
+				pageData.getDetRepair((res,list) => {
55
+					this.tranformDepartList = res
56
+				})
57
+				return
58
+			}
50
 			pageData.getDet((res,list) => {
59
 			pageData.getDet((res,list) => {
51
 				this.tranformDepartList = res
60
 				this.tranformDepartList = res
52
 				//默认-清空
61
 				//默认-清空
100
 						}
109
 						}
101
 					}
110
 					}
102
 				})
111
 				})
103
-			})		
104
-			this.state = option.state
105
-			this.workorderid = option.wid			
112
+			})						
106
 		},
113
 		},
107
 		methods: {
114
 		methods: {
108
 			getTextByCode(code){
115
 			getTextByCode(code){
144
 					pageData.getApplicant(e.value.split('_')[1], (res,data,candidates) => {
151
 					pageData.getApplicant(e.value.split('_')[1], (res,data,candidates) => {
145
 						this.tranforPeopleList = res
152
 						this.tranforPeopleList = res
146
 						this.candidates = candidates
153
 						this.candidates = candidates
154
+						//转基建默认第一个
155
+						if(this.state == 'trunWork'){
156
+							console.log(this.tranforPeopleList,'this.tranforPeopleList')
157
+							this.tranforPeopleName = this.getTextByCode(this.tranforPeopleList[0].value)
158
+							this.tranforPeople = this.tranforPeopleName
159
+						}
147
 					})
160
 					})
148
 				}
161
 				}
149
-				
162
+			    
150
 			},
163
 			},
151
 			departSearchTrue(e){
164
 			departSearchTrue(e){
152
 				this.tranformDepart = e.value
165
 				this.tranformDepart = e.value