XMLWAN 4 gadus atpakaļ
vecāks
revīzija
f7488ef1a3

+ 2 - 2
src/api/patient/patient.js Parādīt failu

@@ -692,9 +692,9 @@ export function DeleteBed(id, params) {
692 692
   })
693 693
 }
694 694
 
695
-export function LoginOut(params) {
695
+export function LoginOut(id, params) {
696 696
   return request({
697
-    url: '/m/api/patient/loginout',
697
+    url: '/m/api/patient/loginout?id=' + id,
698 698
     method: 'get',
699 699
     params: params
700 700
   })

+ 54 - 7
src/pages/allDoctorAdvice/index.vue Parādīt failu

@@ -13,9 +13,12 @@
13 13
         :key="index"
14 14
       >
15 15
         <div v-for="(it, i) in item.child" :key="i">
16
+            <div style="display:flex;justify-content:space-between;align-items:center">
16 17
             <p class="time" v-if="i<1">
17 18
               {{ it.advice_date ? getTime(it.advice_date) : "" }}
18 19
             </p>
20
+            <van-icon class="ellipsis" name="ellipsis" @click="DeleteFive(item.start_time,item.child[0].execution_staff,index)" />
21
+            </div>
19 22
           <div class="statOrder">
20 23
             <div v-if="it.advice_type == 1 && it.parent_id == 0">
21 24
               <div class="statOrderTitle">
@@ -40,7 +43,7 @@
40 43
                 />
41 44
                 </div>
42 45
                 <div v-for="(i, index) in childList" :key="index">
43
-                 <div style="display:flex;justify-content:space-between" v-if="i.parent_id == it.id">
46
+                 <div style="display:flex;justify-content:space-between" >
44 47
                     <p>
45 48
                       ▲ {{ i.advice_name }} {{ i.advice_desc
46 49
                       }}{{ i.drug_spec_unit }} {{ i.prescribing_number
@@ -150,6 +153,14 @@
150 153
           @cancel="onCancelThree"
151 154
           @select="onSelectThree"
152 155
         />
156
+
157
+        <van-action-sheet
158
+          v-model="newShowFour"
159
+          :actions="actions4"
160
+          cancel-text="取消"
161
+          @cancel="onCancelFour"
162
+          @select="onSelectFour"
163
+      />
153 164
     </div>
154 165
   </div>
155 166
 </template>
@@ -159,7 +170,8 @@ import {
159 170
   GetDoctorAdviceDetail,
160 171
   getAllDoctor,
161 172
   DeleteChild,
162
-  DeletePatient
173
+  DeletePatient,
174
+  DeleteManagement
163 175
 } from "@/api/patient/patient";
164 176
 import { Dialog } from "vant";
165 177
 import { uParseTime } from "@/utils/tools";
@@ -178,9 +190,12 @@ export default {
178 190
       actions1: [{ name: "删除" }],
179 191
       actions2: [{ name: "删除" }],
180 192
       actions3: [{ name: "删除" }],
193
+      actions4: [{ name: "全部删除" }],
194
+      newShow: false,
181 195
       newShowOne: false,
182 196
       newShowTwo: false,
183 197
       newShowThree: false,
198
+      newShowFour: false,
184 199
       index: 0,
185 200
       state: 0
186 201
     };
@@ -206,14 +221,14 @@ export default {
206 221
           this.childList = objarr;
207 222
           let dataInfo = {};
208 223
           doctorAdvicedetail.forEach((item, index) => {
209
-            let { groupno } = item;
210
-            if (!dataInfo[groupno]) {
211
-              dataInfo[groupno] = {
212
-                groupno,
224
+            let { start_time } = item;
225
+            if (!dataInfo[start_time]) {
226
+              dataInfo[start_time] = {
227
+                start_time,
213 228
                 child: []
214 229
               };
215 230
             }
216
-            dataInfo[groupno].child.push(item);
231
+            dataInfo[start_time].child.push(item);
217 232
           });
218 233
           let list = Object.values(dataInfo); // list 转换成功的数据
219 234
           let arr = [];
@@ -275,6 +290,12 @@ export default {
275 290
         }
276 291
       }
277 292
     },
293
+    DeleteFive(id, state, index) {
294
+      this.id = id;
295
+      this.state = state;
296
+      this.index = index;
297
+      this.newShowFour = true;
298
+    },
278 299
     toDelete(id, state, index) {
279 300
       this.id = id;
280 301
       this.state = state;
@@ -330,6 +351,14 @@ export default {
330 351
     onSelectThree() {
331 352
       this.DeleteChild(this.id, this.index, this.state);
332 353
     },
354
+    onSelectFour(val) {
355
+      if (val.name === "全部删除") {
356
+        this.DeleteManagement(this.id, this.staff, this.index);
357
+      }
358
+    },
359
+    onCancelFour() {
360
+      this.newShowFour = false;
361
+    },
333 362
     DeletePatient(id, index, state) {
334 363
       if (state == 1) {
335 364
         this.$toast("医嘱已执行,无法删除");
@@ -367,6 +396,24 @@ export default {
367 396
           }
368 397
         });
369 398
       });
399
+    },
400
+    DeleteManagement(id, index, staff) {
401
+      if (staff > 0) {
402
+        this.$toast("医嘱已执行,无法删除");
403
+        return false;
404
+      }
405
+      Dialog.confirm({
406
+        title: "删除提示!",
407
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
408
+      }).then(() => {
409
+        DeleteManagement(id).then(response => {
410
+          if (response.data.state === 1) {
411
+            var msg = response.data.data.msg;
412
+            this.doctorAdvicedetail.splice(index, 1);
413
+            this.newShowFour = false;
414
+          }
415
+        });
416
+      });
370 417
     }
371 418
   },
372 419
   created() {

+ 24 - 141
src/pages/doctorAdvice/components/DoctorManagement.vue Parādīt failu

@@ -32,11 +32,11 @@
32 32
 
33 33
           <div class="adviceOne" v-for="(item,index) in this.doctorAdvice" :key="index" v-show="showOne">
34 34
             <div class="adviceTitle">
35
-              <p>{{getTime(item.child[0].start_time)}}</p>
36
-              <van-icon class="ellipsis" name="ellipsis" @click="Delete(item.groupno, index, item.child[0].execution_staff)" />
35
+              <p>{{getTime(item.start_time)}}</p>
36
+              <van-icon class="ellipsis" name="ellipsis" @click="Delete(item.start_time, index, item.child[0].execution_staff)" />
37 37
             </div>
38 38
 
39
-         <div v-for="(it,i) in item.child" :key="i">
39
+         <div v-for="(it,i) in item.child.slice(0,3)" :key="i">
40 40
             <div class="statOrder"  v-if="it.advice_type == 1 && it.parent_id == 0" >
41 41
               <div class="statOrderTitle">
42 42
                 <span v-if="i<1">长期医嘱</span>
@@ -94,134 +94,11 @@
94 94
                 </div>
95 95
             </div>
96 96
          </div>
97
-<!--             <div class="doctorBox">-->
98
-<!--                <p>开嘱医生:{{ item.child[0].user_name }}</p>-->
99
-<!--                <p>执行护士:{{ getDoctor(item.child[0].execution_staff) }}</p>-->
100
-<!--                <p>核对护士:{{ getDoctor(item.child[0].checker) }}</p>-->
101
-<!--              </div>-->
102
-            <div class="all" @click="toDoctorAdviceDetail(item.groupno)">全部</div>
97
+            <div class="all" @click="toDoctorAdviceDetail(item.start_time)">全部</div>
103 98
           </div>
104 99
         </van-list>
105 100
       </div>
106 101
 
107
-<!--      <div class="adviceBox" v-show="showOne">-->
108
-<!--        <van-list-->
109
-<!--          v-model="loading"-->
110
-<!--          :finished="finished"-->
111
-<!--          finished-text="没有更多了"-->
112
-<!--          @load="onLoad"-->
113
-<!--        >-->
114
-<!--          <div-->
115
-<!--            class="adviceOne"-->
116
-<!--            v-for="(item, index) in doctorAdvice"-->
117
-<!--            :key="index"-->
118
-<!--          >-->
119
-<!--            <div v-for="(it, i) in item.child" :key="i">-->
120
-<!--              <div class="adviceTitle" v-if="it.advice_date">-->
121
-<!--                <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>-->
122
-<!--                <van-icon-->
123
-<!--                  class="ellipsis"-->
124
-<!--                  name="ellipsis"-->
125
-<!--                  @click="Delete(item.groupno, index, it.execution_staff)"-->
126
-<!--                />-->
127
-<!--              </div>-->
128
-
129
-<!--              <div-->
130
-<!--                class="statOrder"-->
131
-<!--                v-if="it.advice_type == 1 && it.parent_id == 0"-->
132
-<!--              >-->
133
-<!--                <div class="statOrderTitle" v-if="i < 3">-->
134
-<!--                  <span>长期医嘱</span>-->
135
-<!--                  <span style="margin-left:1rem">-->
136
-<!--                    {{ getTimes(it.start_time) }}-->
137
-<!--                  </span>-->
138
-<!--                </div>-->
139
-<!--                <div class="orderContent" v-if="i < 3">-->
140
-<!--                  <p v-if="it.parent_id === 0">-->
141
-<!--                    {{ it.advice_name }} {{ it.advice_desc-->
142
-<!--                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
143
-<!--                    }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
144
-<!--                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
145
-<!--                    {{ it.execution_frequency }}-->
146
-<!--                  </p>-->
147
-<!--                  <div v-for="(i, index) in childList" :key="index">-->
148
-<!--                    <p v-if="i.parent_id == it.id">-->
149
-<!--                      ▲ {{ i.advice_name }} {{ i.advice_desc-->
150
-<!--                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
151
-<!--                      }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
152
-<!--                      }}{{ i.single_dose_unit }}-->
153
-<!--                      {{ i.delivery_way }}-->
154
-<!--                      {{ i.execution_frequency }}-->
155
-<!--                    </p>-->
156
-<!--                  </div>-->
157
-<!--                </div>-->
158
-<!--                <div-->
159
-<!--                  class="doctorBox"-->
160
-<!--                  v-if="-->
161
-<!--                    it.user_name ||-->
162
-<!--                      it.execution_staff ||-->
163
-<!--                      (it.checker && i == item.child.length)-->
164
-<!--                  "-->
165
-<!--                >-->
166
-<!--                  <p>开嘱医生:{{ it.user_name }}</p>-->
167
-<!--                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
168
-<!--                  <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
169
-<!--                </div>-->
170
-<!--              </div>-->
171
-
172
-<!--              <div-->
173
-<!--                class="statOrder"-->
174
-<!--                v-if="it.advice_type == 3 && it.parent_id == 0"-->
175
-<!--              >-->
176
-<!--                <div class="longOrderTitle" v-if="i < 3">-->
177
-<!--                  <span>临时医嘱</span>-->
178
-<!--                  <span style="margin-left:1rem">-->
179
-<!--                    {{ getTimes(item.child[0].start_time) }}-->
180
-<!--                  </span>-->
181
-<!--                </div>-->
182
-<!--                <div class="orderContent" v-if="i < 3">-->
183
-<!--                  <p>-->
184
-<!--                    {{ it.advice_name }} {{ it.advice_desc-->
185
-<!--                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
186
-<!--                    }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
187
-<!--                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
188
-<!--                    {{ it.execution_frequency }}-->
189
-<!--                  </p>-->
190
-<!--                  <div v-for="(i, index) in childList" :key="index">-->
191
-<!--                    <p v-if="i.parent_id == it.id">-->
192
-<!--                      ▲ {{ i.advice_name }} {{ i.advice_desc-->
193
-<!--                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
194
-<!--                      }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
195
-<!--                      }}{{ i.single_dose_unit }}-->
196
-<!--                      {{ i.delivery_way }}-->
197
-<!--                      {{ i.execution_frequency }}-->
198
-<!--                    </p>-->
199
-<!--                  </div>-->
200
-<!--                </div>-->
201
-<!--                <div-->
202
-<!--                  class="doctorBox"-->
203
-<!--                  v-if="-->
204
-<!--                    it.user_name ||-->
205
-<!--                      it.execution_staff ||-->
206
-<!--                      (it.checker && i == item.child.length)-->
207
-<!--                  "-->
208
-<!--                >-->
209
-<!--                  <p>开嘱医生:{{ it.user_name }}</p>-->
210
-<!--                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
211
-<!--                  <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
212
-<!--                </div>-->
213
-<!--              </div>-->
214
-<!--            </div>-->
215
-<!--            <div-->
216
-<!--              class="all"-->
217
-<!--              @click="toDoctorAdviceDetail(item.child[0].groupno)"-->
218
-<!--            >-->
219
-<!--              全部-->
220
-<!--            </div>-->
221
-<!--          </div>-->
222
-<!--        </van-list>-->
223
-<!--      </div>-->
224
-
225 102
       <div class="noimgBox" v-show="showTwo">
226 103
         <img src="../../../assets/images/none.png" alt />
227 104
       </div>
@@ -345,7 +222,8 @@ export default {
345 222
       index: 0,
346 223
       staff: 0,
347 224
       childId: 0,
348
-      state: 0
225
+      state: 0,
226
+      list: []
349 227
     };
350 228
   },
351 229
   methods: {
@@ -353,7 +231,7 @@ export default {
353 231
       this.typeShow = false;
354 232
     },
355 233
     onConfirm(value) {
356
-      this.page = 1;
234
+      this.form.page = 1;
357 235
       this.type = value;
358 236
       this.typeShow = false;
359 237
       this.doctorAdvice = [];
@@ -367,7 +245,7 @@ export default {
367 245
       );
368 246
     },
369 247
     getstartTime(value) {
370
-      this.page = 1;
248
+      this.form.page = 1;
371 249
       let year = value.getFullYear();
372 250
       let month = value.getMonth() + 1;
373 251
       let day = value.getDate();
@@ -391,7 +269,7 @@ export default {
391 269
       this.startShow = false;
392 270
     },
393 271
     getstartTime2(value) {
394
-      this.page = 1;
272
+      this.form.page = 1;
395 273
       let year = value.getFullYear();
396 274
       let month = value.getMonth() + 1;
397 275
       let day = value.getDate();
@@ -435,22 +313,27 @@ export default {
435 313
       ).then(response => {
436 314
         if (response.data.state === 1) {
437 315
           var advice = response.data.data.advice;
438
-          // console.log("advice", advice);
316
+          console.log("advice", advice);
439 317
           var one = response.data.data.one;
318
+          console.log("one", one);
319
+          var total = response.data.data.total;
320
+          this.total = total;
321
+          console.log("total", total);
440 322
           let dataInfo = {};
441 323
           one.forEach((item, index) => {
442
-            let { groupno } = item;
443
-            if (!dataInfo[groupno]) {
444
-              dataInfo[groupno] = {
445
-                groupno,
324
+            let { start_time } = item;
325
+            if (!dataInfo[start_time]) {
326
+              dataInfo[start_time] = {
327
+                start_time,
446 328
                 child: []
447 329
               };
448 330
             }
449 331
           });
450 332
           let list = Object.values(dataInfo);
333
+          console.log("list", list);
451 334
           list.map(item => {
452 335
             for (let i = 0; i < advice.length; i++) {
453
-              if (item.groupno === advice[i].groupno) {
336
+              if (item.start_time === advice[i].start_time) {
454 337
                 item.child.push(advice[i]);
455 338
               }
456 339
             }
@@ -464,10 +347,9 @@ export default {
464 347
           this.childList = objarr;
465 348
           let arr = this.doctorAdvice;
466 349
           arr.push(...list.reverse());
350
+          console.log("arr", arr);
467 351
           this.doctorAdvice = arr;
468
-          var total = response.data.data.total;
469
-          this.total = total;
470
-          // console.log("total", total);
352
+
471 353
           this.loading = false;
472 354
         }
473 355
       });
@@ -498,7 +380,7 @@ export default {
498 380
     onLoad() {
499 381
       setTimeout(() => {
500 382
         this.form.page++;
501
-        // console.log("page", this.form.page);
383
+        console.log("page", this.form.page);
502 384
         if (this.form.page <= Math.ceil(this.total / 5)) {
503 385
           this.getDoctorAdvices(
504 386
             this.patient_id,
@@ -514,6 +396,7 @@ export default {
514 396
         }
515 397
       }, 1000);
516 398
     },
399
+
517 400
     toDoctorAdviceDetail(id) {
518 401
       var patientid = this.$route.query.patientid;
519 402
       this.$router.push(

+ 1 - 0
src/pages/homeIndex/index.vue Parādīt failu

@@ -269,6 +269,7 @@ export default {
269 269
           this.isCreateOrg = response.data.data.isCreateOrg;
270 270
           if (this.isCreateOrg) {
271 271
             this.orgs = response.data.data.orgs;
272
+            console.log("orgs", this.orgs);
272 273
             this.apps = response.data.data.apps;
273 274
             this.banners = response.data.data.banners;
274 275
             this.org_arr = [];

+ 4 - 6
src/pages/my/index.vue Parādīt failu

@@ -144,10 +144,10 @@ export default {
144 144
   },
145 145
   methods: {
146 146
     LoginOut() {
147
-      LoginOut().then(response => {
147
+      LoginOut(this.adminid).then(response => {
148 148
         if (response.data.state === 1) {
149 149
           var msg = response.data.data.msg;
150
-          console.log("msg是", msg);
150
+          // console.log("msg是", msg);
151 151
           this.isRouterAlive = false;
152 152
           this.$nextTick(function() {
153 153
             this.isRouterAlive = true;
@@ -160,7 +160,7 @@ export default {
160 160
       GetHomeData().then(response => {
161 161
         if (response.data.state === 1) {
162 162
           var orgs = response.data.data.orgs;
163
-          console.log("orgs", orgs);
163
+          // console.log("orgs", orgs);
164 164
           this.organaziton = orgs;
165 165
         }
166 166
       });
@@ -169,7 +169,7 @@ export default {
169 169
       getMyInformation(id).then(response => {
170 170
         if (response.data.state === 1) {
171 171
           var roleInfo = response.data.data.roleInfo;
172
-          console.log("roleInfo", roleInfo);
172
+          // console.log("roleInfo", roleInfo);
173 173
           this.admin_user_id = roleInfo.id;
174 174
           this.adminid = roleInfo.admin_user_id;
175 175
           this.roleInfo = roleInfo;
@@ -216,13 +216,11 @@ export default {
216 216
   },
217 217
   created() {
218 218
     var adminid = this.$store.getters.user.user.id;
219
-
220 219
     this.getMyInformation(adminid);
221 220
     this.getMyOrganazition(adminid);
222 221
     this.getMyInforName(adminid);
223 222
     this.GetHomeData();
224 223
     this.creator = this.$store.getters.user.org.creator;
225
-    console.log("id是dongxi", this.creator);
226 224
   }
227 225
 };
228 226
 </script>

+ 31 - 28
src/pages/patientCenter/editOrg/index.vue Parādīt failu

@@ -15,7 +15,9 @@
15 15
       </div>
16 16
       <div class="infoOne">
17 17
         <p class="infoTitle">机构类型</p>
18
-        <van-cell is-link @click="showPopup(1)">{{ type_name }}</van-cell>
18
+        <van-cell is-link>
19
+          <van-field v-model="type_name" :readonly="readonly" @click="showPopup(1)"></van-field>
20
+        </van-cell>
19 21
         <van-popup v-model="show1" position="bottom" :style="{ height: '60%' }">
20 22
           <van-area
21 23
             :area-list="orgtype"
@@ -24,13 +26,15 @@
24 26
             @confirm="chooseCityTwo"
25 27
             :columns-num="2"
26 28
             @change="onChangeTwo"
27
-            :readonly="readonly"
29
+           :readonly="readonly"
28 30
           />
29 31
         </van-popup>
30 32
       </div>
31 33
       <div class="infoOne">
32 34
         <p class="infoTitle">机构地区</p>
33
-        <van-cell is-link @click="showPopup(2)">{{ org_area }}</van-cell>
35
+        <van-cell is-link>
36
+          <van-field v-model="org_area" :readonly="readonly" @click="showPopup(2)"></van-field>
37
+        </van-cell>
34 38
         <van-popup v-model="show2" position="bottom" :style="{ height: '60%' }">
35 39
           <van-area
36 40
             :area-list="area"
@@ -90,7 +94,7 @@ export default {
90 94
   components: {},
91 95
   data() {
92 96
     return {
93
-      readonly:true,
97
+      readonly: true,
94 98
       org_area: "",
95 99
       type_name: "",
96 100
       contact: false,
@@ -4206,27 +4210,39 @@ export default {
4206 4210
     };
4207 4211
   },
4208 4212
   methods: {
4213
+    spread() {
4214
+      var spancontent = document.getElementById("copy").innerHTML;
4215
+      if (spancontent == "修改") {
4216
+        this.readonly = false;
4217
+        document.getElementById("copy").innerHTML = "保存";
4218
+      }
4219
+      if (spancontent == "保存") {
4220
+        this.updateOrg();
4221
+      }
4222
+    },
4209 4223
     showPopup(index) {
4210
-      if (index === 1) {
4211
-        this.show1 = true;
4212
-      } else if (index === 2) {
4213
-        this.show2 = true;
4224
+      if (this.readonly == true) {
4225
+        return false;
4226
+      }
4227
+      if (this.readonly == false) {
4228
+        if (index === 1) {
4229
+          this.show1 = true;
4230
+        } else if (index === 2) {
4231
+          this.show2 = true;
4232
+        }
4214 4233
       }
4215 4234
     },
4216 4235
     // 机构地址
4217 4236
     chooseCity(value) {
4218
-      console.log("city", value);
4219 4237
       this.show2 = false;
4220 4238
       const arr = [];
4221 4239
       value.map(item => {
4222
-        console.log(item);
4223 4240
         arr.push(item.name);
4224 4241
       });
4225 4242
       const str = arr.join("-");
4226 4243
       this.org_area = str;
4227 4244
     },
4228 4245
     chooseCityTwo(value) {
4229
-      console.log("value是什么", value);
4230 4246
       this.show1 = false;
4231 4247
       const arr = [];
4232 4248
       value.map(item => {
@@ -4263,9 +4279,6 @@ export default {
4263 4279
       this.orgForm.district_name = countName;
4264 4280
     },
4265 4281
     onChangeTwo(picker, value, index) {
4266
-      console.log(picker);
4267
-      console.log(value);
4268
-      console.log(index);
4269 4282
       let orgtypeName = "";
4270 4283
       for (let index = 0; index < value.length; index++) {
4271 4284
         orgtypeName = value[0].name;
@@ -4300,7 +4313,7 @@ export default {
4300 4313
       getOrgInformation(id).then(response => {
4301 4314
         if (response.data.state === 1) {
4302 4315
           var information = response.data.data.information;
4303
-          console.log("information", information);
4316
+         // console.log("information", information);
4304 4317
           var typeName = response.data.data.typeName;
4305 4318
           var name = response.data.data.name;
4306 4319
           this.orgForm.org_name = information.org_name;
@@ -4319,16 +4332,7 @@ export default {
4319 4332
         }
4320 4333
       });
4321 4334
     },
4322
-    spread() {
4323
-      var spancontent = document.getElementById("copy").innerHTML;
4324
-      if (spancontent == "修改") {
4325
-        this.readonly = false;
4326
-        document.getElementById("copy").innerHTML = "保存";
4327
-      }
4328
-      if (spancontent == "保存") {
4329
-        this.updateOrg();
4330
-      }
4331
-    },
4335
+
4332 4336
     updateOrg() {
4333 4337
       if (this.orgForm.org_name.trim().length <= 0) {
4334 4338
         Toast("机构名字不能为空");
@@ -4364,7 +4368,7 @@ export default {
4364 4368
       updateOrg(this.orgForm, this.orgForm.id).then(response => {
4365 4369
         if (response.data.state === 1) {
4366 4370
           var org = response.data.data.org;
4367
-          console.log("org", org);
4371
+          // console.log('org', org)
4368 4372
           this.$router.push("/homeIndex");
4369 4373
         } else {
4370 4374
           Toast.fail(response.data.msg);
@@ -4378,8 +4382,7 @@ export default {
4378 4382
           var orgtype = response.data.data.orgType;
4379 4383
         }
4380 4384
       });
4381
-    },
4382
- 
4385
+    }
4383 4386
   },
4384 4387
   created() {
4385 4388
     var id = this.$route.query.id;

+ 63 - 7
src/pages/patients/editPatient.vue Parādīt failu

@@ -23,7 +23,7 @@
23 23
         placeholder="请选择"
24 24
         required
25 25
         :readonly="readonly"
26
-        @click="show = true"
26
+        @click="clickSex"
27 27
       />
28 28
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
29 29
         <van-picker :columns="columns" show-toolbar @change="onChange" />
@@ -97,7 +97,7 @@
97 97
           required
98 98
           :readonly="readonly"
99 99
           placeholder="请选择"
100
-          @click="show3 = true"
100
+          @click="clickPatientSoure"
101 101
         />
102 102
         <van-popup v-model="show3" position="bottom" :style="{ height: '40%' }">
103 103
           <van-picker :columns="columns2" show-toolbar @change="onChange1" />
@@ -109,7 +109,7 @@
109 109
           required
110 110
           :readonly="readonly"
111 111
           placeholder="请选择"
112
-          @click="show4 = true"
112
+          @click="clickLapseto"
113 113
         />
114 114
         <van-popup v-model="show4" position="bottom" :style="{ height: '40%' }">
115 115
           <van-picker :columns="columns4" show-toolbar @change="onChange2" />
@@ -157,7 +157,7 @@
157 157
           right-icon="arrow"
158 158
           :readonly="readonly"
159 159
           placeholder="请选择"
160
-          @click="show2 = true"
160
+          @click="clickDate"
161 161
         />
162 162
         <van-popup v-model="show2" position="bottom" :style="{ height: '40%' }">
163 163
           <van-datetime-picker
@@ -235,7 +235,7 @@
235 235
           right-icon="arrow"
236 236
           :readonly="readonly"
237 237
           placeholder="请选择"
238
-          @click="show12 = true"
238
+          @click="clickDateTwo"
239 239
         />
240 240
         <van-popup
241 241
           v-model="show12"
@@ -257,7 +257,7 @@
257 257
           right-icon="arrow"
258 258
           :readonly="readonly"
259 259
           placeholder="请选择"
260
-          @click="show14 = true"
260
+          @click="clickPatientType"
261 261
         />
262 262
         <van-popup
263 263
           v-model="show14"
@@ -276,7 +276,7 @@
276 276
           right-icon="arrow"
277 277
           :readonly="readonly"
278 278
           placeholder="请选择"
279
-          @click="show13 = true"
279
+          @click="clickTreatMethod"
280 280
         />
281 281
         <van-popup
282 282
           v-model="show13"
@@ -780,6 +780,62 @@ export default {
780 780
         this.updatedPatient();
781 781
       }
782 782
     },
783
+    clickSex() {
784
+      if (this.readonly == true) {
785
+        this.show = false;
786
+      }
787
+      if (this.readonly == false) {
788
+        this.show = true;
789
+      }
790
+    },
791
+    clickPatientSoure() {
792
+      if (this.readonly == true) {
793
+        this.show3 = false;
794
+      }
795
+      if (this.readonly == false) {
796
+        this.show3 = true;
797
+      }
798
+    },
799
+    clickLapseto() {
800
+      if (this.readonly == true) {
801
+        this.show4 = false;
802
+      }
803
+      if (this.readonly == false) {
804
+        this.show4 = true;
805
+      }
806
+    },
807
+    clickDate() {
808
+      if (this.readonly == true) {
809
+        this.show2 = false;
810
+      }
811
+      if (this.readonly == false) {
812
+        this.show2 = true;
813
+      }
814
+    },
815
+    clickDateTwo() {
816
+      if (this.readonly == true) {
817
+        this.show12 = false;
818
+      }
819
+      if (this.readonly == false) {
820
+        this.show12 = true;
821
+      }
822
+    },
823
+    clickPatientType() {
824
+      if (this.readonly == true) {
825
+        this.show14 = false;
826
+      }
827
+      if (this.readonly == false) {
828
+        this.show14 = true;
829
+      }
830
+    },
831
+    clickTreatMethod() {
832
+      if (this.readonly == true) {
833
+        this.show13 = false;
834
+      }
835
+      if (this.readonly == false) {
836
+        this.show13 = true;
837
+      }
838
+    },
783 839
     updatedPatient() {
784 840
       if (this.patientForm.name === "") {
785 841
         this.$toast("姓名不能为空");