Переглянути джерело

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

seimin 3 роки тому
батько
коміт
e492348261
1 змінених файлів з 29 додано та 2 видалено
  1. 29 2
      pages/search/search.vue

+ 29 - 2
pages/search/search.vue

@@ -78,6 +78,8 @@
78 78
         timer: null, //定时器
79 79
         searchText: '', //搜索文本
80 80
         searchData: [], //搜索结果
81
+        //系统设置的科室类型
82
+        sysDeptType: 0,
81 83
       };
82 84
     },
83 85
     onUnload() {
@@ -92,21 +94,27 @@
92 94
         this.configName = options.configName;
93 95
         this.id = options.id;
94 96
         this.changedept = options.changedept;
97
+        this.getSysDeptType();
95 98
       } else if (this.type == "sendBack") {
96 99
         this.code = options.code;
97 100
         this.infoDATA = options.infoDATA;
98 101
         this.patientOrders = options.patientOrders;
99 102
         this.workData = options.workData;
103
+        this.sysDeptType = -1;
100 104
       } else if (this.type == "sendBackPatientList") {
101 105
         this.cid = options.cid;
102 106
         this.cdept = options.cdept;
103 107
         this.currentItem = options.currentItem;
104 108
         this.scrollYY = options.scrollYY;
109
+        this.sysDeptType = -1;
105 110
       } else if (this.type == "settingCode") { //设置科室二维码
106 111
         this.uniName = options.uniName;
107 112
         this.queryDept = options.queryDept;
108 113
         this.queryDeptId = options.queryDeptId;
109 114
         this.qrCode = options.qrCode;
115
+        this.sysDeptType = -1;
116
+      } else {
117
+        this.getSysDeptType();
110 118
       }
111 119
       this.init();
112 120
       // #ifdef APP-PLUS
@@ -152,6 +160,21 @@
152 160
           this.inputChange(event);
153 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 179
       inputChange(event) {
157 180
         //兼容引入组件时传入参数情况
@@ -175,8 +198,12 @@
175 198
         };
176 199
         //不是送回病房
177 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 209
         uni.showLoading({