Browse Source

搜索科室部分情况,查询接口增加科室类型的筛选,科室类型根据系统设置来

seimin 3 years ago
parent
commit
e492348261
1 changed files with 29 additions and 2 deletions
  1. 29 2
      pages/search/search.vue

+ 29 - 2
pages/search/search.vue

@@ -78,6 +78,8 @@
78
         timer: null, //定时器
78
         timer: null, //定时器
79
         searchText: '', //搜索文本
79
         searchText: '', //搜索文本
80
         searchData: [], //搜索结果
80
         searchData: [], //搜索结果
81
+        //系统设置的科室类型
82
+        sysDeptType: 0,
81
       };
83
       };
82
     },
84
     },
83
     onUnload() {
85
     onUnload() {
@@ -92,21 +94,27 @@
92
         this.configName = options.configName;
94
         this.configName = options.configName;
93
         this.id = options.id;
95
         this.id = options.id;
94
         this.changedept = options.changedept;
96
         this.changedept = options.changedept;
97
+        this.getSysDeptType();
95
       } else if (this.type == "sendBack") {
98
       } else if (this.type == "sendBack") {
96
         this.code = options.code;
99
         this.code = options.code;
97
         this.infoDATA = options.infoDATA;
100
         this.infoDATA = options.infoDATA;
98
         this.patientOrders = options.patientOrders;
101
         this.patientOrders = options.patientOrders;
99
         this.workData = options.workData;
102
         this.workData = options.workData;
103
+        this.sysDeptType = -1;
100
       } else if (this.type == "sendBackPatientList") {
104
       } else if (this.type == "sendBackPatientList") {
101
         this.cid = options.cid;
105
         this.cid = options.cid;
102
         this.cdept = options.cdept;
106
         this.cdept = options.cdept;
103
         this.currentItem = options.currentItem;
107
         this.currentItem = options.currentItem;
104
         this.scrollYY = options.scrollYY;
108
         this.scrollYY = options.scrollYY;
109
+        this.sysDeptType = -1;
105
       } else if (this.type == "settingCode") { //设置科室二维码
110
       } else if (this.type == "settingCode") { //设置科室二维码
106
         this.uniName = options.uniName;
111
         this.uniName = options.uniName;
107
         this.queryDept = options.queryDept;
112
         this.queryDept = options.queryDept;
108
         this.queryDeptId = options.queryDeptId;
113
         this.queryDeptId = options.queryDeptId;
109
         this.qrCode = options.qrCode;
114
         this.qrCode = options.qrCode;
115
+        this.sysDeptType = -1;
116
+      } else {
117
+        this.getSysDeptType();
110
       }
118
       }
111
       this.init();
119
       this.init();
112
       // #ifdef APP-PLUS
120
       // #ifdef APP-PLUS
@@ -152,6 +160,21 @@
152
           this.inputChange(event);
160
           this.inputChange(event);
153
         }, 500)
161
         }, 500)
154
       },
162
       },
163
+      //获取系统设置的科室类型baba sysDeptType
164
+      getSysDeptType() {
165
+        let postData = {
166
+          "idx": 0,
167
+          "sum": 1,
168
+          systemConfiguration: {
169
+            keyconfig: "busiViewDeptId"
170
+          }
171
+        }
172
+        post("/simple/data/fetchDataList/systemConfiguration", postData).then((res) => {
173
+          if (res.status == 200) {
174
+            this.sysDeptType = res.list[0].valueconfig
175
+          }
176
+        })
177
+      },
155
       //监听输入
178
       //监听输入
156
       inputChange(event) {
179
       inputChange(event) {
157
         //兼容引入组件时传入参数情况
180
         //兼容引入组件时传入参数情况
@@ -175,8 +198,12 @@
175
         };
198
         };
176
         //不是送回病房
199
         //不是送回病房
177
         if (this.type != "sendBack" && this.type != "sendBackPatientList" && this.type != "settingCode") {
200
         if (this.type != "sendBack" && this.type != "sendBackPatientList" && this.type != "settingCode") {
178
-          postData.department.type = {
179
-            id: "281"
201
+          if (this.sysDeptType === 0) {
202
+            return;
203
+          } else {
204
+            postData.department.type = {
205
+              id: this.sysDeptType
206
+            }
180
           }
207
           }
181
         }
208
         }
182
         uni.showLoading({
209
         uni.showLoading({