Kaynağa Gözat

自选排班的科室绑定人员,上班根据科室类型查询科室

seimin 1 yıl önce
ebeveyn
işleme
df0f249ea2

+ 1 - 1
main.js

@@ -7,7 +7,7 @@ import './mixins/mixin'
7 7
 // new VConsole();
8 8
 // import eruda from 'eruda';
9 9
 // eruda.init();
10
-console.info('v2.4.40');
10
+console.info('v2.4.41');
11 11
 Vue.prototype.wx = wx //声明扫码
12 12
 Vue.prototype.audios = [] //待播放的语音集合
13 13
 // #endif

+ 31 - 1
pages/search/search.vue

@@ -40,6 +40,7 @@
40 40
   //引用mSearch组件,如不需要删除即可
41 41
   import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
42 42
   import {
43
+    get,
43 44
     post,
44 45
     webHandle
45 46
   } from "../../http/http.js";
@@ -84,6 +85,9 @@
84 85
         searchData: [], //搜索结果
85 86
         //系统设置的科室类型
86 87
         sysDeptType: 0,
88
+        //自选排班-科室绑定人员-科室类型 start
89
+        quickCombinationDeptType: 0,
90
+        //自选排班-科室绑定人员-科室类型 end
87 91
       };
88 92
     },
89 93
     onUnload() {
@@ -99,7 +103,9 @@
99 103
         this.configName = options.configName;
100 104
         this.id = options.id;
101 105
         this.changedept = options.changedept;
102
-        this.getSysDeptType();
106
+        
107
+        options.quickCombinationId && this.getQuickCombinationDeptType(+options.quickCombinationId);
108
+        
103 109
       } else if (this.type == "sendBack") {
104 110
         this.code = options.code;
105 111
         this.infoDATA = options.infoDATA;
@@ -187,6 +193,28 @@
187 193
           }
188 194
         })
189 195
       },
196
+      //获取系统设置的科室类型 quickCombinationDeptType
197
+      getQuickCombinationDeptType(quickCombinationId) {
198
+        let postData = {
199
+          "idx": 0,
200
+          "sum": 1,
201
+          workAllocationQuickConfig: {
202
+            id: quickCombinationId
203
+          }
204
+        }
205
+        post("/simple/data/fetchDataList/workAllocationQuickConfig", postData).then((res) => {
206
+          if (res.status == 200) {
207
+            let workAllocationQuickConfig = res.list[0] || {};
208
+            // 科室绑定人员
209
+            if(workAllocationQuickConfig.ruleType == 3){
210
+              this.sysDeptType = -1;
211
+              this.quickCombinationDeptType = workAllocationQuickConfig.deptTypeList.map(v => v.id).toString();
212
+            }else{
213
+              this.getSysDeptType();
214
+            }
215
+          }
216
+        })
217
+      },
190 218
       //监听输入
191 219
       inputChange(event) {
192 220
         //兼容引入组件时传入参数情况
@@ -222,6 +250,8 @@
222 250
         if (this.type != "sendBack" && this.type != "sendBackPatientList" && this.type != "settingCode" && this.type != "bloodSelect" && this.type != "showDepartmentQrcode") {
223 251
           if (this.sysDeptType === 0) {
224 252
             return;
253
+          } else if(this.quickCombinationDeptType){
254
+            postData.department.deptTypeIds = this.quickCombinationDeptType;
225 255
           } else {
226 256
             postData.department.type = {
227 257
               id: this.sysDeptType

+ 38 - 4
pages/searchMuti/searchMuti.vue

@@ -41,6 +41,7 @@
41 41
         dataList: [],
42 42
         //系统设置的科室类型
43 43
         sysDeptType: 0,
44
+        quickCombinationDeptType: 0,
44 45
         // 弹窗model
45 46
         models: {
46 47
           disjunctor: false,
@@ -55,7 +56,8 @@
55 56
         this.configName = options.configName;
56 57
         this.id = options.id;
57 58
         this.changedept = options.changedept;
58
-        this.getSysDeptType();
59
+        
60
+        options.quickCombinationId && this.getQuickCombinationDeptType(+options.quickCombinationId);
59 61
       } else {
60 62
         this.getSysDeptType();
61 63
       }
@@ -72,6 +74,29 @@
72 74
       know() {
73 75
         this.models.disjunctor = false;
74 76
       },
77
+      //获取系统设置的科室类型
78
+      getQuickCombinationDeptType(quickCombinationId) {
79
+        let postData = {
80
+          "idx": 0,
81
+          "sum": 1,
82
+          workAllocationQuickConfig: {
83
+            id: quickCombinationId
84
+          }
85
+        }
86
+        post("/simple/data/fetchDataList/workAllocationQuickConfig", postData).then((res) => {
87
+          if (res.status == 200) {
88
+            let workAllocationQuickConfig = res.list[0] || {};
89
+            // 科室绑定人员
90
+            if(workAllocationQuickConfig.ruleType == 3){
91
+              this.sysDeptType = -1;
92
+              this.quickCombinationDeptType = workAllocationQuickConfig.deptTypeList.map(v => v.id).toString();
93
+              this.getBuildings();
94
+            }else{
95
+              this.getSysDeptType();
96
+            }
97
+          }
98
+        })
99
+      },
75 100
       // 确认
76 101
       determine() {
77 102
         console.log(this.dataList);
@@ -89,13 +114,22 @@
89 114
         } else {
90 115
           let postData = {
91 116
             "idx": 0,
92
-            "sum": 1000,
117
+            "sum": 9999,
93 118
             department: {
94
-              // hospital: {id: this.hosId},
95
-              type: {id: this.sysDeptType},
96 119
               buildIds: dataList.map(v => v.id).toString()
97 120
             }
98 121
           }
122
+          
123
+          if (this.sysDeptType === 0) {
124
+            return;
125
+          } else if(this.quickCombinationDeptType){
126
+            postData.department.deptTypeIds = this.quickCombinationDeptType;
127
+          } else {
128
+            postData.department.type = {
129
+              id: this.sysDeptType
130
+            }
131
+          }
132
+          
99 133
           uni.showLoading({
100 134
             title: "加载中",
101 135
           });

+ 4 - 2
pages/setDept/setDept.vue

@@ -92,14 +92,16 @@
92 92
       },
93 93
       // 添加科室
94 94
       addDeptClick() {
95
+        let setDeptConfg = uni.getStorageSync("setDeptConfg") || {};
95 96
         uni.navigateTo({
96
-          url: `../search/search?type=setDept&configName=${this.configName}&id=${this.id}&changedept=${this.changedept}`,
97
+          url: `../search/search?type=setDept&configName=${this.configName}&id=${this.id}&changedept=${this.changedept}&quickCombinationId=${setDeptConfg.id || ''}`,
97 98
         });
98 99
       },
99 100
       // 楼栋选择
100 101
       addBuildingClick() {
102
+        let setDeptConfg = uni.getStorageSync("setDeptConfg") || {};
101 103
         uni.navigateTo({
102
-          url: `../searchMuti/searchMuti?type=setBuilding&configName=${this.configName}&id=${this.id}&changedept=${this.changedept}`,
104
+          url: `../searchMuti/searchMuti?type=setBuilding&configName=${this.configName}&id=${this.id}&changedept=${this.changedept}&quickCombinationId=${setDeptConfg.id || ''}`,
103 105
         });
104 106
       },
105 107
       // 删除科室