Browse Source

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

seimin 1 year ago
parent
commit
df0f249ea2
4 changed files with 74 additions and 8 deletions
  1. 1 1
      main.js
  2. 31 1
      pages/search/search.vue
  3. 38 4
      pages/searchMuti/searchMuti.vue
  4. 4 2
      pages/setDept/setDept.vue

+ 1 - 1
main.js

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

+ 31 - 1
pages/search/search.vue

@@ -40,6 +40,7 @@
40
   //引用mSearch组件,如不需要删除即可
40
   //引用mSearch组件,如不需要删除即可
41
   import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
41
   import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
42
   import {
42
   import {
43
+    get,
43
     post,
44
     post,
44
     webHandle
45
     webHandle
45
   } from "../../http/http.js";
46
   } from "../../http/http.js";
@@ -84,6 +85,9 @@
84
         searchData: [], //搜索结果
85
         searchData: [], //搜索结果
85
         //系统设置的科室类型
86
         //系统设置的科室类型
86
         sysDeptType: 0,
87
         sysDeptType: 0,
88
+        //自选排班-科室绑定人员-科室类型 start
89
+        quickCombinationDeptType: 0,
90
+        //自选排班-科室绑定人员-科室类型 end
87
       };
91
       };
88
     },
92
     },
89
     onUnload() {
93
     onUnload() {
@@ -99,7 +103,9 @@
99
         this.configName = options.configName;
103
         this.configName = options.configName;
100
         this.id = options.id;
104
         this.id = options.id;
101
         this.changedept = options.changedept;
105
         this.changedept = options.changedept;
102
-        this.getSysDeptType();
106
+        
107
+        options.quickCombinationId && this.getQuickCombinationDeptType(+options.quickCombinationId);
108
+        
103
       } else if (this.type == "sendBack") {
109
       } else if (this.type == "sendBack") {
104
         this.code = options.code;
110
         this.code = options.code;
105
         this.infoDATA = options.infoDATA;
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
       inputChange(event) {
219
       inputChange(event) {
192
         //兼容引入组件时传入参数情况
220
         //兼容引入组件时传入参数情况
@@ -222,6 +250,8 @@
222
         if (this.type != "sendBack" && this.type != "sendBackPatientList" && this.type != "settingCode" && this.type != "bloodSelect" && this.type != "showDepartmentQrcode") {
250
         if (this.type != "sendBack" && this.type != "sendBackPatientList" && this.type != "settingCode" && this.type != "bloodSelect" && this.type != "showDepartmentQrcode") {
223
           if (this.sysDeptType === 0) {
251
           if (this.sysDeptType === 0) {
224
             return;
252
             return;
253
+          } else if(this.quickCombinationDeptType){
254
+            postData.department.deptTypeIds = this.quickCombinationDeptType;
225
           } else {
255
           } else {
226
             postData.department.type = {
256
             postData.department.type = {
227
               id: this.sysDeptType
257
               id: this.sysDeptType

+ 38 - 4
pages/searchMuti/searchMuti.vue

@@ -41,6 +41,7 @@
41
         dataList: [],
41
         dataList: [],
42
         //系统设置的科室类型
42
         //系统设置的科室类型
43
         sysDeptType: 0,
43
         sysDeptType: 0,
44
+        quickCombinationDeptType: 0,
44
         // 弹窗model
45
         // 弹窗model
45
         models: {
46
         models: {
46
           disjunctor: false,
47
           disjunctor: false,
@@ -55,7 +56,8 @@
55
         this.configName = options.configName;
56
         this.configName = options.configName;
56
         this.id = options.id;
57
         this.id = options.id;
57
         this.changedept = options.changedept;
58
         this.changedept = options.changedept;
58
-        this.getSysDeptType();
59
+        
60
+        options.quickCombinationId && this.getQuickCombinationDeptType(+options.quickCombinationId);
59
       } else {
61
       } else {
60
         this.getSysDeptType();
62
         this.getSysDeptType();
61
       }
63
       }
@@ -72,6 +74,29 @@
72
       know() {
74
       know() {
73
         this.models.disjunctor = false;
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
       determine() {
101
       determine() {
77
         console.log(this.dataList);
102
         console.log(this.dataList);
@@ -89,13 +114,22 @@
89
         } else {
114
         } else {
90
           let postData = {
115
           let postData = {
91
             "idx": 0,
116
             "idx": 0,
92
-            "sum": 1000,
117
+            "sum": 9999,
93
             department: {
118
             department: {
94
-              // hospital: {id: this.hosId},
95
-              type: {id: this.sysDeptType},
96
               buildIds: dataList.map(v => v.id).toString()
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
           uni.showLoading({
133
           uni.showLoading({
100
             title: "加载中",
134
             title: "加载中",
101
           });
135
           });

+ 4 - 2
pages/setDept/setDept.vue

@@ -92,14 +92,16 @@
92
       },
92
       },
93
       // 添加科室
93
       // 添加科室
94
       addDeptClick() {
94
       addDeptClick() {
95
+        let setDeptConfg = uni.getStorageSync("setDeptConfg") || {};
95
         uni.navigateTo({
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
       addBuildingClick() {
101
       addBuildingClick() {
102
+        let setDeptConfg = uni.getStorageSync("setDeptConfg") || {};
101
         uni.navigateTo({
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
       // 删除科室