Просмотр исходного кода

Merge branch 'master' of http://git.shengws.com/csx/Pad_New

csx 4 лет назад
Родитель
Сommit
e93cf77c1b

+ 5 - 5
src/api/patient.js Просмотреть файл

@@ -15,14 +15,14 @@ export function EditDialysisSolution(id, solution) {
15 15
   })
16 16
 }
17 17
 
18
-export function EditAssessmentBeforeDislysis(id, assessment_date, before,mode) {
18
+export function EditAssessmentBeforeDislysis(id, assessment_date, before, mode) {
19 19
   return request({
20
-    url: '/m/api/assessmentbefore/commit?patient=' + id + '&assessment_date=' + assessment_date+"&mode="+mode,
20
+    url: '/m/api/assessmentbefore/commit?patient=' + id + '&assessment_date=' + assessment_date + '&mode=' + mode,
21 21
     method: 'post',
22 22
     data: before,
23
-    headers:{"Permission":1},
24
-
25
-
23
+    headers: {
24
+      'Permission': 1
25
+    }
26 26
 
27 27
   })
28 28
 }

+ 55 - 7
src/api/patient/patient.js Просмотреть файл

@@ -584,9 +584,9 @@ export function SaveBirthday(data) {
584 584
   })
585 585
 }
586 586
 
587
-export function getOrgName(params) {
587
+export function getOrgName(id, params) {
588 588
   return request({
589
-    url: '/m/api/patient/getorgname',
589
+    url: '/m/api/patient/getorgname?id=' + id,
590 590
     method: 'Get',
591 591
     params: params
592 592
   })
@@ -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
   })
@@ -725,7 +725,6 @@ export function getBloodPatient(params) {
725 725
 }
726 726
 
727 727
 export function DeletePatient(id, params) {
728
-  console.log('医嘱id', id)
729 728
   return request({
730 729
     url: '/m/api/patient/deletePatient?id=' + id,
731 730
     method: 'delete',
@@ -762,9 +761,9 @@ export function getMyOrganazition(id, params) {
762 761
   })
763 762
 }
764 763
 
765
-export function getOrgInformation(params) {
764
+export function getOrgInformation(id, params) {
766 765
   return request({
767
-    url: '/m/api/org/getorginformation',
766
+    url: '/m/api/org/getorginformation?id=' + id,
768 767
     method: 'get',
769 768
     params: params
770 769
   })
@@ -793,3 +792,52 @@ export function getMyInforName(id, params) {
793 792
     params: params
794 793
   })
795 794
 }
795
+
796
+export function getPartionDetail(id, params) {
797
+  return request({
798
+    url: '/m/api/patient/getpartiondetail?id=' + id,
799
+    method: 'get',
800
+    params: params
801
+  })
802
+}
803
+
804
+export function UpdatePartition(params) {
805
+  return request({
806
+    url: '/m/api/patient/updatepartition',
807
+    method: 'get',
808
+    params: params
809
+  })
810
+}
811
+
812
+export function getGroupDetail(id, params) {
813
+  return request({
814
+    url: '/m/api/patient/getgroupdetail?id=' + id,
815
+    method: 'get',
816
+    params: params
817
+  })
818
+}
819
+
820
+export function updateGroup(params) {
821
+  return request({
822
+    url: '/m/api/patient/updategroup',
823
+    method: 'get',
824
+    params: params
825
+  })
826
+}
827
+
828
+export function getBedDetail(id, params) {
829
+  return request({
830
+    url: '/m/api/patient/getbeddetail?id=' + id,
831
+    method: 'get',
832
+    params: params
833
+  })
834
+}
835
+
836
+export function updateBed(params) {
837
+  console.log('params', params)
838
+  return request({
839
+    url: '/m/api/patient/updatebed',
840
+    method: 'get',
841
+    params: params
842
+  })
843
+}

+ 128 - 66
src/pages/allDoctorAdvice/index.vue Просмотреть файл

@@ -13,14 +13,17 @@
13 13
         :key="index"
14 14
       >
15 15
         <div v-for="(it, i) in item.child" :key="i">
16
-            <p class="time">
16
+            <div style="display:flex;justify-content:space-between;align-items:center">
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">
22
-                <span>长期医嘱</span>
23
-                <span style="margin-left:1rem">
25
+                <span v-if="i<1">长期医嘱</span>
26
+                <span style="margin-left:1rem" v-if="i<1">
24 27
                   {{ getTimes(it.start_time) }}
25 28
                 </span>
26 29
               </div>
@@ -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
@@ -56,24 +59,21 @@
56 59
                        />
57 60
                   </div>
58 61
                 </div>
59
-              </div>
60
-              <div
61
-                class="doctorBox"
62
-                v-if="it.advice_doctor || it.execution_staff || it.checker"
63
-              >
64
-                <p>开嘱医生:{{ getDoctor(it.advice_doctor) }}</p>
65
-                <p>执行护士:{{ getDoctor(item.execution_staff) }}</p>
66
-                <p>核对护士:{{ getDoctor(item.checker) }}</p>
67
-              </div>
68
-            </div>
62
+                  <div class="doctorBox">
63
+                      <p>开嘱医生:{{ getDoctor(it.advice_doctor)}}</p>
64
+                      <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
65
+                      <p>核对护士:{{ getDoctor(it.checker) }}</p>
66
+                  </div>
67
+               </div>
68
+             </div>
69 69
 
70 70
             <div
71 71
               class="statOrder"
72 72
               v-if="it.advice_type == 3 && it.parent_id == 0"
73 73
             >
74 74
               <div class="longOrderTitle">
75
-                <span>临时医嘱</span>
76
-                <span style="margin-left:1rem">
75
+                <span v-if="i<1">临时医嘱</span>
76
+                <span style="margin-left:1rem" v-if="i<1">
77 77
                   {{ getTimes(item.child[0].start_time) }}
78 78
                 </span>
79 79
               </div>
@@ -89,7 +89,7 @@
89 89
                       <van-icon
90 90
                         class="ellipsis"
91 91
                         name="ellipsis"
92
-                        @click="newShowTwo=true"
92
+                        @click="DeleteTwo(it.id,it.execution_state,index)"
93 93
                        />
94 94
                  </div>
95 95
                 <div v-for="(i, index) in childList" :key="index">
@@ -105,14 +105,13 @@
105 105
                      <van-icon
106 106
                         class="ellipsis"
107 107
                         name="ellipsis"
108
-                        @click="newShowThree=true"
108
+                        @click="DeleteThree(i.id,i.execution_state,index)"
109 109
                        />
110 110
                   </div>
111 111
                 </div>
112 112
               </div>
113 113
               <div
114 114
                 class="doctorBox"
115
-                v-if="it.advice_doctor || it.execution_staff || it.checker"
116 115
               >
117 116
                 <p>开嘱医生:{{ getDoctor(it.advice_doctor) }}</p>
118 117
                 <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
@@ -121,6 +120,7 @@
121 120
             </div>
122 121
           </div>
123 122
         </div>
123
+
124 124
       </div>
125 125
 
126 126
         <van-action-sheet
@@ -153,6 +153,14 @@
153 153
           @cancel="onCancelThree"
154 154
           @select="onSelectThree"
155 155
         />
156
+
157
+        <van-action-sheet
158
+          v-model="newShowFour"
159
+          :actions="actions4"
160
+          cancel-text="取消"
161
+          @cancel="onCancelFour"
162
+          @select="onSelectFour"
163
+      />
156 164
     </div>
157 165
   </div>
158 166
 </template>
@@ -162,7 +170,8 @@ import {
162 170
   GetDoctorAdviceDetail,
163 171
   getAllDoctor,
164 172
   DeleteChild,
165
-  DeletePatient
173
+  DeletePatient,
174
+  DeleteManagement
166 175
 } from "@/api/patient/patient";
167 176
 import { Dialog } from "vant";
168 177
 import { uParseTime } from "@/utils/tools";
@@ -181,10 +190,12 @@ export default {
181 190
       actions1: [{ name: "删除" }],
182 191
       actions2: [{ name: "删除" }],
183 192
       actions3: [{ name: "删除" }],
193
+      actions4: [{ name: "全部删除" }],
194
+      newShow: false,
184 195
       newShowOne: false,
185 196
       newShowTwo: false,
186 197
       newShowThree: false,
187
-      id: 0,
198
+      newShowFour: false,
188 199
       index: 0,
189 200
       state: 0
190 201
     };
@@ -210,47 +221,46 @@ export default {
210 221
           this.childList = objarr;
211 222
           let dataInfo = {};
212 223
           doctorAdvicedetail.forEach((item, index) => {
213
-            let { groupno } = item;
214
-            if (!dataInfo[groupno]) {
215
-              dataInfo[groupno] = {
216
-                groupno,
224
+            let { start_time } = item;
225
+            if (!dataInfo[start_time]) {
226
+              dataInfo[start_time] = {
227
+                start_time,
217 228
                 child: []
218 229
               };
219 230
             }
220
-            dataInfo[groupno].child.push(item);
231
+            dataInfo[start_time].child.push(item);
221 232
           });
222 233
           let list = Object.values(dataInfo); // list 转换成功的数据
223 234
           let arr = [];
224 235
 
225
-          list.map(item => {
226
-            let arr2 = [];
227
-            if (item.child.length > 1) {
228
-              item.child.map(it => {
229
-                if (arr.indexOf(it.advice_date) == -1) {
230
-                  arr.push(it.advice_date);
231
-                } else {
232
-                  delete it["advice_date"];
233
-                }
234
-              });
235
-              for (var i = item.child.length - 1; i != -1; i--) {
236
-                let obj = {};
237
-                obj.checker = item.child[i].checker;
238
-                obj.execution_staff = item.child[i].execution_staff;
239
-                obj.user_name = item.child[i].advice_doctor;
240
-                if (
241
-                  JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
242
-                ) {
243
-                  console.log("ajsdkljasldkasjdlkasjs");
244
-                  arr2.push(obj);
245
-                } else {
246
-                  console.log("删除");
247
-                  delete item.child[i]["checker"];
248
-                  delete item.child[i]["execution_staff"];
249
-                  delete item.child[i]["advice_doctor"];
250
-                }
251
-              }
252
-            }
253
-          });
236
+          // list.map(item => {
237
+          //   let arr2 = [];
238
+          //   if (item.child.length > 1) {
239
+          //     item.child.map(it => {
240
+          //       if (arr.indexOf(it.advice_date) == -1) {
241
+          //         arr.push(it.advice_date);
242
+          //       } else {
243
+          //         delete it["advice_date"];
244
+          //       }
245
+          //     });
246
+          //     for (var i = item.child.length - 1; i != -1; i--) {
247
+          //       let obj = {};
248
+          //       obj.checker = item.child[i].checker;
249
+          //       obj.execution_staff = item.child[i].execution_staff;
250
+          //       obj.user_name = item.child[i].advice_doctor;
251
+          //       if (
252
+          //         JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
253
+          //       ) {
254
+          //         arr2.push(obj);
255
+          //       } else {
256
+          //         console.log("删除");
257
+          //         delete item.child[i]["checker"];
258
+          //         delete item.child[i]["execution_staff"];
259
+          //         delete item.child[i]["advice_doctor"];
260
+          //       }
261
+          //     }
262
+          //   }
263
+          // });
254 264
 
255 265
           console.log("list是 ", list);
256 266
           this.doctorAdvicedetail = list;
@@ -280,23 +290,36 @@ export default {
280 290
         }
281 291
       }
282 292
     },
293
+    DeleteFive(id, state, index) {
294
+      this.id = id;
295
+      this.state = state;
296
+      this.index = index;
297
+      this.newShowFour = true;
298
+    },
283 299
     toDelete(id, state, index) {
284
-      console.log("id", id);
285
-      console.log("state", state);
286 300
       this.id = id;
287 301
       this.state = state;
288 302
       this.index = index;
289 303
       this.newShow = true;
290 304
     },
291 305
     Delete(id, state, index) {
292
-      console.log("id", id);
293
-      console.log("state", state);
294 306
       this.id = id;
295 307
       this.state = state;
296 308
       this.index = index;
297 309
       this.newShowOne = true;
298 310
     },
299
-
311
+    DeleteTwo(id, state, index) {
312
+      this.id = id;
313
+      this.state = state;
314
+      this.index = index;
315
+      this.newShowTwo = true;
316
+    },
317
+    DeleteThree(id, state, index) {
318
+      this.id = id;
319
+      this.state = state;
320
+      this.index = index;
321
+      this.newShowThree = true;
322
+    },
300 323
     onCancel() {
301 324
       this.newShow = false;
302 325
     },
@@ -313,10 +336,29 @@ export default {
313 336
         this.DeleteChild(this.id, this.index, this.state);
314 337
       }
315 338
     },
316
-    onSelectTwo() {},
317
-    onCancelTwo() {},
318
-    onCancelThree() {},
319
-    onSelectThree() {},
339
+    onSelectTwo(val) {
340
+      if (val.name === "删除") {
341
+        this.DeletePatient(this.id, this.state, this.index);
342
+      }
343
+      this.newShowTwo = false;
344
+    },
345
+    onCancelTwo() {
346
+      this.newShowTwo = false;
347
+    },
348
+    onCancelThree() {
349
+      this.newShowThree = false;
350
+    },
351
+    onSelectThree() {
352
+      this.DeleteChild(this.id, this.index, this.state);
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
+    },
320 362
     DeletePatient(id, index, state) {
321 363
       if (state == 1) {
322 364
         this.$toast("医嘱已执行,无法删除");
@@ -330,6 +372,7 @@ export default {
330 372
           if (response.data.state === 1) {
331 373
             var msg = response.data.data.msg;
332 374
             this.GetDoctorAdviceDetail(this.id);
375
+            this.doctorAdvicedetail.splice(index, 1);
333 376
             this.newShow = false;
334 377
           }
335 378
         });
@@ -347,22 +390,41 @@ export default {
347 390
         DeleteChild(id).then(response => {
348 391
           if (response.data.state === 1) {
349 392
             var msg = response.data.data.msg;
350
-
351 393
             this.childList.splice(index, 1);
352 394
             this.newShowOne = false;
395
+            this.newShowThree = false;
396
+          }
397
+        });
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;
353 414
           }
354 415
         });
355 416
       });
356 417
     }
357 418
   },
358 419
   created() {
359
-    this.active = parseInt(this.$route.query.active);
360 420
     setRem();
361 421
     setHeight();
362 422
     var id = this.$route.query.id;
423
+    console.log("id是--------", id);
363 424
     this.GetDoctorAdviceDetail(id);
364 425
     var patientid = this.$route.query.patientid;
365 426
     this.id = patientid;
427
+    this.active = parseInt(this.$route.query.active);
366 428
     this.getAllDoctor();
367 429
   }
368 430
 };

+ 7 - 1
src/pages/configureCenter/components/Bed.vue Просмотреть файл

@@ -44,7 +44,7 @@ export default {
44 44
       finished: false,
45 45
       newShow: false,
46 46
       show: false,
47
-      actions: [{ name: "删除" }],
47
+      actions: [{ name: "编辑" }, { name: "删除" }],
48 48
       page: 1,
49 49
       limit: 10,
50 50
       total: 0,
@@ -114,6 +114,9 @@ export default {
114 114
       if (val.name === "删除") {
115 115
         this.DeleteBed(this.id, this.index);
116 116
       }
117
+      if (val.name === "编辑") {
118
+        this.$router.push("/editbed?id=" + this.id + "&active=" + this.active);
119
+      }
117 120
     },
118 121
     onCancel() {
119 122
       this.newShow = false;
@@ -129,6 +132,9 @@ export default {
129 132
             console.log("msg", msg);
130 133
             this.BedNumber.splice(index, 1);
131 134
             this.newShow = false;
135
+          } else {
136
+            this.$toast("该床位尚有排班安排,不能删除");
137
+            this.newShow = false;
132 138
           }
133 139
         });
134 140
       });

+ 6 - 1
src/pages/configureCenter/components/Grouping.vue Просмотреть файл

@@ -40,7 +40,7 @@ export default {
40 40
       loading: false,
41 41
       finished: false,
42 42
       newShow: false,
43
-      actions: [{ name: "删除" }],
43
+      actions: [{ name: "编辑" }, { name: "删除" }],
44 44
       page: 1,
45 45
       limit: 10,
46 46
       group: [],
@@ -94,6 +94,11 @@ export default {
94 94
       if (val.name === "删除") {
95 95
         this.DeleteGroup(this.id, this.number, this.index);
96 96
       }
97
+      if (val.name === "编辑") {
98
+        this.$router.push(
99
+          "/editgroup?id=" + this.id + "&active=" + this.active
100
+        );
101
+      }
97 102
     },
98 103
     DeleteGroup(id, number, index) {
99 104
       if (number !== "") {

+ 6 - 2
src/pages/configureCenter/components/Partition.vue Просмотреть файл

@@ -23,6 +23,7 @@
23 23
         <van-icon class="addIcon" name="add" @click="addPartition" />新增
24 24
       </div>
25 25
     </div>
26
+
26 27
     <van-action-sheet
27 28
       v-model="newShow"
28 29
       :actions="actions"
@@ -45,7 +46,7 @@ export default {
45 46
       loading: false,
46 47
       finished: false,
47 48
       newShow: false,
48
-      actions: [{ name: "删除" }],
49
+      actions: [{ name: "编辑" }, { name: "删除" }],
49 50
       page: 1,
50 51
       limit: 10,
51 52
       zone: [],
@@ -113,12 +114,15 @@ export default {
113 114
       if (val.name === "删除") {
114 115
         this.DeleteZone(this.id, this.number, this.index);
115 116
       }
117
+      if (val.name === "编辑") {
118
+        this.$router.push("/editpartition?id=" + this.id);
119
+      }
116 120
     },
117 121
     Delete(id, number, index) {
122
+      this.newShow = true;
118 123
       this.id = id;
119 124
       this.index = index;
120 125
       this.number = number;
121
-      this.newShow = true;
122 126
     },
123 127
     DeleteZone(id, number, index) {
124 128
       if (number !== "") {

+ 23 - 143
src/pages/doctorAdvice/components/DoctorManagement.vue Просмотреть файл

@@ -30,13 +30,13 @@
30 30
          finished-text="没有更多了"
31 31
          >
32 32
 
33
-          <div class="adviceOne" v-for="(item,index) in this.doctorAdvice" :key="index">
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="newShow = true" />
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();
@@ -415,7 +293,6 @@ export default {
415 293
       );
416 294
       this.endShow = false;
417 295
     },
418
-    changeData(val) {},
419 296
     getDoctorAdvices(patientid) {
420 297
       if (this.type === "全部") {
421 298
         this.form.type = 0;
@@ -438,20 +315,25 @@ export default {
438 315
           var advice = response.data.data.advice;
439 316
           console.log("advice", advice);
440 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);
441 322
           let dataInfo = {};
442 323
           one.forEach((item, index) => {
443
-            let { groupno } = item;
444
-            if (!dataInfo[groupno]) {
445
-              dataInfo[groupno] = {
446
-                groupno,
324
+            let { start_time } = item;
325
+            if (!dataInfo[start_time]) {
326
+              dataInfo[start_time] = {
327
+                start_time,
447 328
                 child: []
448 329
               };
449 330
             }
450 331
           });
451 332
           let list = Object.values(dataInfo);
333
+          console.log("list", list);
452 334
           list.map(item => {
453 335
             for (let i = 0; i < advice.length; i++) {
454
-              if (item.groupno === advice[i].groupno) {
336
+              if (item.start_time === advice[i].start_time) {
455 337
                 item.child.push(advice[i]);
456 338
               }
457 339
             }
@@ -463,14 +345,11 @@ export default {
463 345
             }
464 346
           }
465 347
           this.childList = objarr;
466
-          console.log("list", list);
467 348
           let arr = this.doctorAdvice;
468 349
           arr.push(...list.reverse());
350
+          console.log("arr", arr);
469 351
           this.doctorAdvice = arr;
470
-          console.log("listtwo", this.doctorAdvice);
471
-          var total = response.data.data.total;
472
-          this.total = total;
473
-          console.log("total", total);
352
+
474 353
           this.loading = false;
475 354
         }
476 355
       });
@@ -517,6 +396,7 @@ export default {
517 396
         }
518 397
       }, 1000);
519 398
     },
399
+
520 400
     toDoctorAdviceDetail(id) {
521 401
       var patientid = this.$route.query.patientid;
522 402
       this.$router.push(

+ 61 - 98
src/pages/homeIndex/index.vue Просмотреть файл

@@ -26,15 +26,7 @@
26 26
         </van-swipe-item>
27 27
       </van-swipe>
28 28
     </div>
29
-    <van-overlay :show="show" @click="show = false">
30
-      <div class="arrowBox">
31
-        <img src="../../assets/images/toparrow.png" alt />
32
-      </div>
33
-      <div class="signBox">
34
-        <p>请点击右上角“+”图标</p>
35
-        <p style="color:#1989fa">创建自己的医院/组织/团队</p>
36
-      </div>
37
-    </van-overlay>
29
+    <van-overlay :show="show" @click="show = false" />
38 30
     <!--<div class="noticeBox">-->
39 31
     <!--<i class="iconfont icon-public-notice notice"></i>-->
40 32
     <!--<div class="noticeNews">-->
@@ -127,77 +119,67 @@
127 119
   import "../../styles/newStyle.scss";
128 120
   import {setRem} from "@/libs/functionRem";
129 121
 
130
-  export default {
131
-    data() {
132
-      return {
133
-        show: false,
134
-        value1: 0,
135
-        isCreateOrg: false,
136
-        isSubSuperAdmin:false,
137
-        org_arr: [],
138
-        banners: [],
139
-        apps: [],
140
-        option1: [
141
-          {text: "新款商品", value: 0},
142
-          {text: "全部商品全部商品全部商品全部商品全部商品全部商品", value: 1},
143
-          {text: "活动商品", value: 2}
144
-        ]
145
-      };
122
+export default {
123
+  data() {
124
+    return {
125
+      show: true,
126
+      value1: 0,
127
+      isCreateOrg: false,
128
+      org_arr: [],
129
+      banners: [],
130
+      apps: [],
131
+      option1: [
132
+        { text: "新款商品", value: 0 },
133
+        { text: "全部商品全部商品全部商品全部商品全部商品全部商品", value: 1 },
134
+        { text: "活动商品", value: 2 }
135
+      ]
136
+    };
137
+  },
138
+  methods: {
139
+    toStaffManage() {
140
+      if (this.isCreateOrg) {
141
+        this.$router.push({ path: "/manageconsole/staff" });
142
+      } else {
143
+        this.$toast({
144
+          message: "你尚未创建机构,请先创建机构"
145
+        });
146
+      }
146 147
     },
147
-    methods: {
148
-      toStaffManage(){
149
-        if(this.isCreateOrg){
150
-          this.$router.push({path: "/manageconsole/staff"});
151
-        }else{
152
-          this.$toast({
153
-            message: "你尚未创建机构,请先创建机构"
154
-          });
155
-        }
156
-
157
-      },toRoleManage(){
158
-        if(this.isCreateOrg){
159
-          this.$router.push({path: "/manageconsole/role"});
160
-        }else{
161
-          this.$toast({
162
-            message: "你尚未创建机构,请先创建机构"
163
-          });
164
-        }
165
-      },toConfigCenter(){
166
-        if(this.isCreateOrg){
167
-
168
-
169
-        }else{
170
-          this.$toast({
171
-            message: "你尚未创建机构,请先创建机构"
172
-          });
173
-        }
174
-
175
-      },toOrgSetting(){
176
-        if(this.isCreateOrg){
177
-
178
-
179
-        }else{
180
-          this.$toast({
181
-            message: "你尚未创建机构,请先创建机构"
182
-          });
183
-        }
184
-
185
-      },
186
-      changeOrg(value){
187
-        Toast.loading({forbidClick: true, duration: 0})
188
-        let params={
189
-          org_id : value
190
-
191
-        }
192
-        ChangeOrg(params).then(response => {
193
-          if (response.data.state === 1) {
194
-            //清除之前的数据
195
-            this.$store.dispatch("SetScheduals", {
196
-             scheduals: []
197
-            });
198
-            this.$store.dispatch("SetWaitScheduals", {
199
-              waitscheduals: []
200
-            });
148
+    toRoleManage() {
149
+      if (this.isCreateOrg) {
150
+        this.$router.push({ path: "/manageconsole/role" });
151
+      } else {
152
+        this.$toast({
153
+          message: "你尚未创建机构,请先创建机构"
154
+        });
155
+      }
156
+    },
157
+    toConfigCenter() {
158
+      if (this.isCreateOrg) {
159
+        this.$router.push("/configurecenter");
160
+      } else {
161
+        this.$toast({
162
+          message: "你尚未创建机构,请先创建机构"
163
+        });
164
+      }
165
+    },
166
+    toOrgSetting() {
167
+      if (this.isCreateOrg) {
168
+        this.$router.push("/editorg?id=" + this.value1);
169
+      } else {
170
+        this.$toast({
171
+          message: "你尚未创建机构,请先创建机构"
172
+        });
173
+      }
174
+    },
175
+    changeOrg(value) {
176
+      Toast.loading({ forbidClick: true, duration: 0 });
177
+      let params = {
178
+        org_id: value
179
+      };
180
+      ChangeOrg(params).then(response => {
181
+        if (response.data.state === 1) {
182
+          // 清除之前的数据
201 183
 
202 184
             var user = response.data.data.user;
203 185
             var admin = response.data.data.admin;
@@ -494,25 +476,6 @@
494 476
     top: 3.125rem;
495 477
     z-index: 9;
496 478
   }
497
-  .arrowBox {
498
-    text-align: right;
499
-    img {
500
-      width: 2.5rem;
501
-      margin-right: 1.625rem;
502
-    }
503
-  }
504
-  .signBox {
505
-    width: 18.75rem;
506
-    height: 5.625rem;
507
-    margin: 0 auto;
508
-    background: #fff;
509
-    border-radius: 0.25rem;
510
-    text-align: center;
511
-    padding-top: 1.25rem;
512
-    p {
513
-      line-height: 1.5rem;
514
-    }
515
-  }
516 479
 }
517 480
 </style>
518 481
 <style lang="scss">

+ 66 - 58
src/pages/my/index.vue Просмотреть файл

@@ -2,29 +2,27 @@
2 2
   <div class="page_my">
3 3
     <div class="myTop">
4 4
       <img src="../../assets/images/myBanner.png" alt />
5
-      <div class="avatar">
6
-        <img v-if="roleInfo.avatar != ''" :src="roleInfo.avatar" alt />
7
-        <img v-if="roleInfo.avatar == ''" src="../../assets/images/mydefault.png" alt />
8
-      </div>
9
-      <div class="userMain" @click="toMyIndex">
10
-        <div class="userBox">
11
-          <div class="userTxt">
12
-            <span v-if="roleInfo.user_name!=''">
13
-              <p class="userName">{{ roleInfo.user_name }}</p>
14
-            </span>
15
-            <span v-if="roleInfo.user_name==''">
16
-              <p class="userName">{{ userName.name }}</p>
17
-            </span>
18
-            <p class="signature">{{ roleInfo.message }}</p>
5
+        <div class="avatar">
6
+          <img v-if="roleInfo.avatar != ''" :src="roleInfo.avatar" alt />
7
+          <img
8
+            v-if="roleInfo.avatar == ''"
9
+            src="../../assets/images/mydefault.png"
10
+            alt
11
+          />
12
+        </div>
13
+        <div class="userMain" @click="toMyIndex">
14
+          <div class="userBox">
15
+            <div class="userTxt">
16
+              <span v-if="roleInfo.user_name!=''"><p class="userName">{{ roleInfo.user_name }}</p></span>
17
+                <span v-if="roleInfo.user_name==''"><p class="userName">{{ userName.name }}</p></span>
18
+              <p class="signature">{{ roleInfo.message }}</p>
19
+            </div>
20
+            <van-icon name="arrow" />
19 21
           </div>
20
-          <van-icon name="arrow" />
21 22
         </div>
23
+      <div class="invitebox">
24
+        <img src="../../assets/images/invite.png" alt />
22 25
       </div>
23
-      <router-link to="/invite">
24
-        <div class="invitebox">
25
-          <img src="../../assets/images/invite.png" alt />
26
-        </div>
27
-      </router-link>
28 26
 
29 27
       <div class="myInfo" @click="toMyInfo">
30 28
         <div class="myInfoLeft">
@@ -45,26 +43,22 @@
45 43
     </div>
46 44
 
47 45
     <div class="myBox">
48
-      <div class="myBoxOne">
49
-        <div class="myInfoLeft">
50
-          <img src="../../assets/images/myIcon2.png" alt />
51
-          <p>我的医院/组织/团队</p>
46
+        <div class="myBoxOne">
47
+          <div class="myInfoLeft">
48
+            <img src="../../assets/images/myIcon2.png" alt />
49
+            <p>我的医院/组织/团队</p>
50
+          </div>
51
+          <van-icon class="arrow" name="arrow" />
52 52
         </div>
53
-        <van-icon class="arrow" name="arrow" />
54
-      </div>
55 53
       <div class="myBoxTwo noBorder" v-for="(item,index) in organaziton" :key="index">
56 54
         <div class="myInfoLeft">
57
-          <span v-if="item.org_logo == ''">
58
-            <img src="../../assets/images/m01.png" alt />
59
-          </span>
60
-          <span v-if="item.org_logo !==''">
61
-            <img :src="item.org_logo" />
62
-          </span>
55
+          <span v-if="item.org_logo == ''"><img src="../../assets/images/m01.png" alt /></span>
56
+          <span v-if="item.org_logo !==''"><img :src="item.org_logo"></span>
63 57
           <p>{{item.org_name}}</p>
64 58
         </div>
65
-        <div class="myInfoRight" v-if="item.is_super_admin == 1">
66
-          <div class="myInfoRightBtn" @click="toEditOrg()">管理</div>
67
-          <van-icon class="arrow" name="arrow" @click="toManage" />
59
+        <div class="myInfoRight">
60
+          <div v-if="item.creator == $store.getters.user.org.creator" class="myInfoRightBtn" @click="toEditOrg(item.id)">管理</div>
61
+          <van-icon class="arrow" name="arrow"  @click="toManage(item.creator,item.id)"/>
68 62
         </div>
69 63
       </div>
70 64
     </div>
@@ -89,21 +83,21 @@
89 83
       </router-link>
90 84
     </div>
91 85
     <div class="myBox">
92
-      <!--      <div class="myBoxOne">-->
93
-      <!--        <div class="myInfoLeft">-->
94
-      <!--          <img src="../../assets/images/myIcon5.png" alt />-->
95
-      <!--          <p>常见问题</p>-->
96
-      <!--        </div>-->
97
-      <!--        <van-icon class="arrow" name="arrow" />-->
98
-      <!--      </div>-->
86
+<!--      <div class="myBoxOne">-->
87
+<!--        <div class="myInfoLeft">-->
88
+<!--          <img src="../../assets/images/myIcon5.png" alt />-->
89
+<!--          <p>常见问题</p>-->
90
+<!--        </div>-->
91
+<!--        <van-icon class="arrow" name="arrow" />-->
92
+<!--      </div>-->
99 93
 
100
-      <!--      <div class="myBoxOne" @click="toFeed">-->
101
-      <!--        <div class="myInfoLeft">-->
102
-      <!--          <img src="../../assets/images/myIcon6.png" alt />-->
103
-      <!--          <p>意见反馈</p>-->
104
-      <!--        </div>-->
105
-      <!--        <van-icon class="arrow" name="arrow" />-->
106
-      <!--      </div>-->
94
+<!--      <div class="myBoxOne" @click="toFeed">-->
95
+<!--        <div class="myInfoLeft">-->
96
+<!--          <img src="../../assets/images/myIcon6.png" alt />-->
97
+<!--          <p>意见反馈</p>-->
98
+<!--        </div>-->
99
+<!--        <van-icon class="arrow" name="arrow" />-->
100
+<!--      </div>-->
107 101
 
108 102
       <router-link to="/about">
109 103
         <div class="myBoxOne">
@@ -136,6 +130,7 @@ import {
136 130
   getMyInforName
137 131
 } from "@/api/patient/patient";
138 132
 import { uParseTime } from "@/utils/tools";
133
+import { GetHomeData } from "@/api/home";
139 134
 export default {
140 135
   data() {
141 136
     return {
@@ -143,15 +138,16 @@ export default {
143 138
       admin_user_id: 0,
144 139
       adminid: 0,
145 140
       organaziton: [],
146
-      userName: {}
141
+      userName: {},
142
+      creator: 0
147 143
     };
148 144
   },
149 145
   methods: {
150 146
     LoginOut() {
151
-      LoginOut().then(response => {
147
+      LoginOut(this.adminid).then(response => {
152 148
         if (response.data.state === 1) {
153 149
           var msg = response.data.data.msg;
154
-          console.log("msg是", msg);
150
+          // console.log("msg是", msg);
155 151
           this.isRouterAlive = false;
156 152
           this.$nextTick(function() {
157 153
             this.isRouterAlive = true;
@@ -160,22 +156,32 @@ export default {
160 156
         }
161 157
       });
162 158
     },
159
+    GetHomeData() {
160
+      GetHomeData().then(response => {
161
+        if (response.data.state === 1) {
162
+          var orgs = response.data.data.orgs;
163
+          // console.log("orgs", orgs);
164
+          this.organaziton = orgs;
165
+        }
166
+      });
167
+    },
163 168
     getMyInformation(id) {
164 169
       getMyInformation(id).then(response => {
165 170
         if (response.data.state === 1) {
166 171
           var roleInfo = response.data.data.roleInfo;
167
-          console.log("roleInfo", roleInfo);
172
+          // console.log("roleInfo", roleInfo);
168 173
           this.admin_user_id = roleInfo.id;
169 174
           this.adminid = roleInfo.admin_user_id;
170 175
           this.roleInfo = roleInfo;
171 176
         }
172 177
       });
173 178
     },
179
+
174 180
     getMyOrganazition(id) {
175 181
       getMyOrganazition(id).then(response => {
176 182
         if (response.data.state === 1) {
177 183
           var organaziton = response.data.data.organaziton;
178
-          this.organaziton = organaziton;
184
+          // this.organaziton = organaziton;
179 185
         }
180 186
       });
181 187
     },
@@ -198,11 +204,11 @@ export default {
198 204
     toMyInfo() {
199 205
       this.$router.push("/myInfo?id=" + this.admin_user_id);
200 206
     },
201
-    toManage() {
202
-      this.$router.push("/organizationinfo?id=" + this.adminid);
207
+    toManage(id, orgid) {
208
+      this.$router.push("/organizationinfo?id=" + id + "&orgid=" + orgid);
203 209
     },
204
-    toEditOrg() {
205
-      this.$router.push("/newMy");
210
+    toEditOrg(id) {
211
+      this.$router.push("/editorg?id=" + id);
206 212
     },
207 213
     toMyIndex() {
208 214
       this.$router.push("/myInfo?id=" + this.admin_user_id);
@@ -213,6 +219,8 @@ export default {
213 219
     this.getMyInformation(adminid);
214 220
     this.getMyOrganazition(adminid);
215 221
     this.getMyInforName(adminid);
222
+    this.GetHomeData();
223
+    this.creator = this.$store.getters.user.org.creator;
216 224
   }
217 225
 };
218 226
 </script>

+ 14 - 9
src/pages/my/organizationInfo.vue Просмотреть файл

@@ -7,7 +7,8 @@
7 7
     <div class="organizeBox">
8 8
       <div class="organizeBoxOne">
9 9
         <div class="organizeBoxOneLeft">
10
-          <img src="../../assets/images/m01.png" alt />
10
+          <span v-if="org_logo==''"><img src="../../assets/images/m01.png" alt /></span>
11
+          <span v-if="org_logo!=''"><img :src="org_logo" alt /></span>
11 12
           <p>{{ org_short_name }}</p>
12 13
         </div>
13 14
         <van-icon class="arrow" name="arrow" />
@@ -27,13 +28,13 @@
27 28
       </div>
28 29
       <div class="organizeBoxTwo">
29 30
         <div>角色</div>
30
-        <div class="rolebox">
31
+        <div class="rolebox" v-if="role_name !=''">
31 32
           <div class="roleboxBtn">{{ role_name }}</div>
32 33
         </div>
33 34
       </div>
34 35
       <div class="organizeBoxTwo">
35 36
         <div>职位</div>
36
-        <div class="organizeBoxTwoTxt">{{ positionName }}</div>
37
+        <div class="organizeBoxTwoTxt" v-if="positionName!=''">{{ positionName }}</div>
37 38
       </div>
38 39
     </div>
39 40
   </div>
@@ -51,16 +52,19 @@ export default {
51 52
       org_short_name: "",
52 53
       telephone: "",
53 54
       role_name: "",
54
-      positionName: ""
55
+      positionName: "",
56
+      org_logo: ""
55 57
     };
56 58
   },
57 59
   methods: {
58
-    getOrgName() {
59
-      getOrgName().then(response => {
60
+    getOrgName(id) {
61
+      getOrgName(id).then(response => {
60 62
         if (response.data.state === 1) {
61 63
           var name = response.data.data.name;
64
+          this.org_short_name = name.org_name;
65
+          this.org_logo = name.org_logo;
62 66
           this.telephone = name.telephone;
63
-          // console.log("name", name);
67
+          console.log("name", name);
64 68
         }
65 69
       });
66 70
     },
@@ -124,10 +128,11 @@ export default {
124 128
   },
125 129
   created() {
126 130
     this.user_name = this.$store.getters.user.user.user_name;
127
-    this.org_short_name = this.$store.getters.user.org.org_short_name;
131
+    // this.org_short_name = this.$store.getters.user.org.org_short_name;
128 132
     var id = this.$route.query.id;
129 133
     console.log("id", id);
130
-    this.getOrgName();
134
+    var orgid = this.$route.query.orgid;
135
+    this.getOrgName(orgid);
131 136
     this.getRoleName(id);
132 137
     this.getAllOrganization(id);
133 138
   }

+ 42 - 22
src/pages/patientCenter/editOrg/index.vue Просмотреть файл

@@ -3,16 +3,21 @@
3 3
     <div class="createOrganizationTitle">
4 4
       <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
5 5
       <span class="titleName">创建医院/组织/团队</span>
6
+       <div style="margin-left:40px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
6 9
     </div>
7 10
     <div class="tips">填写真实信息,获取更精准服务</div>
8 11
     <div class="infoBox">
9 12
       <div class="infoOne">
10 13
         <p class="infoTitle">机构名称</p>
11
-        <van-field v-model="orgForm.org_name" placeholder="请填写机构名称"/>
14
+        <van-field v-model="orgForm.org_name" placeholder="请填写机构名称" :readonly="readonly"/>
12 15
       </div>
13 16
       <div class="infoOne">
14 17
         <p class="infoTitle">机构类型</p>
15
-        <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>
16 21
         <van-popup v-model="show1" position="bottom" :style="{ height: '60%' }">
17 22
           <van-area
18 23
             :area-list="orgtype"
@@ -21,12 +26,15 @@
21 26
             @confirm="chooseCityTwo"
22 27
             :columns-num="2"
23 28
             @change="onChangeTwo"
29
+           :readonly="readonly"
24 30
           />
25 31
         </van-popup>
26 32
       </div>
27 33
       <div class="infoOne">
28 34
         <p class="infoTitle">机构地区</p>
29
-        <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>
30 38
         <van-popup v-model="show2" position="bottom" :style="{ height: '60%' }">
31 39
           <van-area
32 40
             :area-list="area"
@@ -34,23 +42,23 @@
34 42
             @cancel="show2=false"
35 43
             @confirm="chooseCity"
36 44
             @change="onChange"
45
+            :readonly="readonly"
37 46
           />
38 47
         </van-popup>
39 48
       </div>
40 49
       <div class="infoOne">
41 50
         <p class="infoTitle">详细地址</p>
42
-        <van-field v-model="orgForm.address" placeholder="请填写"/>
51
+        <van-field v-model="orgForm.address" placeholder="请填写" :readonly="readonly"/>
43 52
       </div>
44 53
       <div class="infoOne">
45 54
         <p class="infoTitle">联系人</p>
46
-        <van-field v-model="orgForm.contact_name" placeholder="请填写"/>
55
+        <van-field v-model="orgForm.contact_name" placeholder="请填写" :readonly="readonly"/>
47 56
       </div>
48 57
       <div class="infoOne">
49 58
         <p class="infoTitle">联系电话</p>
50
-        <van-field v-model="orgForm.telephone" placeholder="请填写"/>
59
+        <van-field v-model="orgForm.telephone" placeholder="请填写" :readonly="readonly"/>
51 60
       </div>
52 61
     </div>
53
-    <div class="create" @click="updateOrg()">保存</div>
54 62
     <div class="problem">
55 63
       遇到问题?点击
56 64
       <span @click="contact = true">联系客服</span>
@@ -86,6 +94,7 @@ export default {
86 94
   components: {},
87 95
   data() {
88 96
     return {
97
+      readonly: true,
89 98
       org_area: "",
90 99
       type_name: "",
91 100
       contact: false,
@@ -4201,27 +4210,39 @@ export default {
4201 4210
     };
4202 4211
   },
4203 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
+    },
4204 4223
     showPopup(index) {
4205
-      if (index === 1) {
4206
-        this.show1 = true;
4207
-      } else if (index === 2) {
4208
-        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
+        }
4209 4233
       }
4210 4234
     },
4211 4235
     // 机构地址
4212 4236
     chooseCity(value) {
4213
-      console.log("city", value);
4214 4237
       this.show2 = false;
4215 4238
       const arr = [];
4216 4239
       value.map(item => {
4217
-        console.log(item);
4218 4240
         arr.push(item.name);
4219 4241
       });
4220 4242
       const str = arr.join("-");
4221 4243
       this.org_area = str;
4222 4244
     },
4223 4245
     chooseCityTwo(value) {
4224
-      console.log("value是什么", value);
4225 4246
       this.show1 = false;
4226 4247
       const arr = [];
4227 4248
       value.map(item => {
@@ -4258,9 +4279,6 @@ export default {
4258 4279
       this.orgForm.district_name = countName;
4259 4280
     },
4260 4281
     onChangeTwo(picker, value, index) {
4261
-      console.log(picker);
4262
-      console.log(value);
4263
-      console.log(index);
4264 4282
       let orgtypeName = "";
4265 4283
       for (let index = 0; index < value.length; index++) {
4266 4284
         orgtypeName = value[0].name;
@@ -4291,11 +4309,11 @@ export default {
4291 4309
     callPhone() {
4292 4310
       window.location.href = "tel://075586526342";
4293 4311
     },
4294
-    getOrgInformation() {
4295
-      getOrgInformation().then(response => {
4312
+    getOrgInformation(id) {
4313
+      getOrgInformation(id).then(response => {
4296 4314
         if (response.data.state === 1) {
4297 4315
           var information = response.data.data.information;
4298
-          console.log("information", information);
4316
+         // console.log("information", information);
4299 4317
           var typeName = response.data.data.typeName;
4300 4318
           var name = response.data.data.name;
4301 4319
           this.orgForm.org_name = information.org_name;
@@ -4314,6 +4332,7 @@ export default {
4314 4332
         }
4315 4333
       });
4316 4334
     },
4335
+
4317 4336
     updateOrg() {
4318 4337
       if (this.orgForm.org_name.trim().length <= 0) {
4319 4338
         Toast("机构名字不能为空");
@@ -4349,7 +4368,7 @@ export default {
4349 4368
       updateOrg(this.orgForm, this.orgForm.id).then(response => {
4350 4369
         if (response.data.state === 1) {
4351 4370
           var org = response.data.data.org;
4352
-          console.log("org", org);
4371
+          // console.log('org', org)
4353 4372
           this.$router.push("/homeIndex");
4354 4373
         } else {
4355 4374
           Toast.fail(response.data.msg);
@@ -4366,7 +4385,8 @@ export default {
4366 4385
     }
4367 4386
   },
4368 4387
   created() {
4369
-    this.getOrgInformation();
4388
+    var id = this.$route.query.id;
4389
+    this.getOrgInformation(id);
4370 4390
     this.getAllOrgType();
4371 4391
   }
4372 4392
 };

+ 90 - 17
src/pages/patients/editPatient.vue Просмотреть файл

@@ -4,7 +4,7 @@
4 4
       <div class="addPatientsTitle">
5 5
         <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
6 6
         <span class="titleName">编辑患者</span>
7
-        <div @click="updatedPatient"><p>保存</p></div>
7
+        <span @click="spread" id="copy">修改</span>
8 8
       </div>
9 9
     </van-sticky>
10 10
     <div class="basicTitle">基本信息</div>
@@ -13,6 +13,7 @@
13 13
         v-model="patientForm.name"
14 14
         required
15 15
         label="姓名"
16
+        :readonly="readonly"
16 17
         placeholder="请输入"
17 18
       />
18 19
       <van-field
@@ -21,8 +22,8 @@
21 22
         right-icon="arrow"
22 23
         placeholder="请选择"
23 24
         required
24
-        readonly
25
-        @click="show = true"
25
+        :readonly="readonly"
26
+        @click="clickSex"
26 27
       />
27 28
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
28 29
         <van-picker :columns="columns" show-toolbar @change="onChange" />
@@ -33,12 +34,13 @@
33 34
         label="身份证号"
34 35
         @blur="checkIdCardNo"
35 36
         placeholder="请输入"
37
+        :readonly="readonly"
36 38
       />
37 39
       <van-field
38 40
         v-model="patientForm.birthday"
39 41
         required
40 42
         label="出生日期"
41
-        readonly
43
+        :readonly="readonly"
42 44
         placeholder="请输入"
43 45
       />
44 46
       <van-field
@@ -47,6 +49,7 @@
47 49
         required
48 50
         label="手机号"
49 51
         placeholder="请输入"
52
+        :readonly="readonly"
50 53
       />
51 54
       <van-cell>
52 55
         <!-- 使用 title 插槽来自定义标题 -->
@@ -77,6 +80,7 @@
77 80
           clearable
78 81
           required
79 82
           label="透析号"
83
+          :readonly="readonly"
80 84
         >
81 85
           <van-button
82 86
             slot="button"
@@ -91,9 +95,9 @@
91 95
           v-model="patientForm.patientsoure"
92 96
           right-icon="arrow"
93 97
           required
94
-          readonly
98
+          :readonly="readonly"
95 99
           placeholder="请选择"
96
-          @click="show3 = true"
100
+          @click="clickPatientSoure"
97 101
         />
98 102
         <van-popup v-model="show3" position="bottom" :style="{ height: '40%' }">
99 103
           <van-picker :columns="columns2" show-toolbar @change="onChange1" />
@@ -103,9 +107,9 @@
103 107
           v-model="patientForm.lapseto"
104 108
           right-icon="arrow"
105 109
           required
106
-          readonly
110
+          :readonly="readonly"
107 111
           placeholder="请选择"
108
-          @click="show4 = true"
112
+          @click="clickLapseto"
109 113
         />
110 114
         <van-popup v-model="show4" position="bottom" :style="{ height: '40%' }">
111 115
           <van-picker :columns="columns4" show-toolbar @change="onChange2" />
@@ -151,9 +155,9 @@
151 155
           label="首次透析日期"
152 156
           v-model="patientForm.fistDate"
153 157
           right-icon="arrow"
154
-          readonly
158
+          :readonly="readonly"
155 159
           placeholder="请选择"
156
-          @click="show2 = true"
160
+          @click="clickDate"
157 161
         />
158 162
         <van-popup v-model="show2" position="bottom" :style="{ height: '40%' }">
159 163
           <van-datetime-picker
@@ -172,6 +176,7 @@
172 176
           label="诊断"
173 177
           type="textarea"
174 178
           maxlength="50"
179
+          :readonly="readonly"
175 180
           placeholder="请输入主要诊断信息"
176 181
         />
177 182
       </div>
@@ -183,6 +188,7 @@
183 188
           v-model="patientForm.requipmentId"
184 189
           label="设备ID"
185 190
           placeholder="请输入"
191
+          :readonly="readonly"
186 192
         />
187 193
 
188 194
         <van-cell>
@@ -227,9 +233,9 @@
227 233
           label="首次透析日期"
228 234
           v-model="patientForm.memberFistDate"
229 235
           right-icon="arrow"
230
-          readonly
236
+          :readonly="readonly"
231 237
           placeholder="请选择"
232
-          @click="show12 = true"
238
+          @click="clickDateTwo"
233 239
         />
234 240
         <van-popup
235 241
           v-model="show12"
@@ -249,9 +255,9 @@
249 255
           label="病种"
250 256
           v-model="patientForm.patient_type"
251 257
           right-icon="arrow"
252
-          readonly
258
+          :readonly="readonly"
253 259
           placeholder="请选择"
254
-          @click="show14 = true"
260
+          @click="clickPatientType"
255 261
         />
256 262
         <van-popup
257 263
           v-model="show14"
@@ -268,9 +274,9 @@
268 274
           label="治疗方式"
269 275
           v-model="patientForm.treatmentMethod"
270 276
           right-icon="arrow"
271
-          readonly
277
+          :readonly="readonly"
272 278
           placeholder="请选择"
273
-          @click="show13 = true"
279
+          @click="clickTreatMethod"
274 280
         />
275 281
         <van-popup
276 282
           v-model="show13"
@@ -403,7 +409,8 @@ export default {
403 409
       ],
404 410
       illnesslist: [],
405 411
       radio: "1",
406
-      showOne: false
412
+      showOne: false,
413
+      readonly: true
407 414
     };
408 415
   },
409 416
   methods: {
@@ -763,6 +770,72 @@ export default {
763 770
         "-" +
764 771
         birth.substr(6, 2);
765 772
     },
773
+    spread() {
774
+      var spancontent = document.getElementById("copy").innerHTML;
775
+      if (spancontent == "修改") {
776
+        this.readonly = false;
777
+        document.getElementById("copy").innerHTML = "保存";
778
+      }
779
+      if (spancontent == "保存") {
780
+        this.updatedPatient();
781
+      }
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
+    },
766 839
     updatedPatient() {
767 840
       if (this.patientForm.name === "") {
768 841
         this.$toast("姓名不能为空");

+ 27 - 1
src/router/index.js Просмотреть файл

@@ -287,7 +287,7 @@ export default new Router({
287 287
       name: "longdialysis",
288 288
       component: () => import("@/pages/allLongDialysis/index")
289 289
     },
290
-    //,
290
+    //, 
291 291
     {
292 292
       path: "/alldoctoradvice",
293 293
       name: "/alldoctoradvice",
@@ -305,6 +305,19 @@ export default new Router({
305 305
       name: "/addpartition",
306 306
       component: () => import("@/pages/configureCenter/newPartition")
307 307
     },
308
+    // 编辑分区
309
+    {
310
+      path: '/editpartition',
311
+      name: 'editpartition',
312
+      component: () => import('@/pages/configureCenter/editPartion')
313
+
314
+    },
315
+    // 编辑分组
316
+    {
317
+      path: '/editgroup',
318
+      name: 'editgroup',
319
+      component: () => import('@/pages/configureCenter/editGrouping')
320
+    },
308 321
     // 新增分组
309 322
     {
310 323
       path: "/addgroup",
@@ -317,6 +330,19 @@ export default new Router({
317 330
       name: "/addbed",
318 331
       component: () => import("@/pages/configureCenter/newBed")
319 332
     },
333
+    // 编辑床位号
334
+    {
335
+      path: '/editbed',
336
+      name: 'editbed',
337
+      component: () => import('@/pages/configureCenter/editBed')
338
+
339
+    },
340
+    {
341
+      path: '/allinspection',
342
+      name: '/allinspection',
343
+      component: () => import('@/pages/patientCenter/allCheck/index')
344
+
345
+    },
320 346
     // 我的页面管理
321 347
     {
322 348
       path: "/editorg",