See999 4 anos atrás
pai
commit
bde6be5158
29 arquivos alterados com 1723 adições e 511 exclusões
  1. 14 0
      src/api/admin_user.js
  2. 5 5
      src/api/patient.js
  3. 55 8
      src/api/patient/patient.js
  4. 128 66
      src/pages/allDoctorAdvice/index.vue
  5. 7 1
      src/pages/configureCenter/components/Bed.vue
  6. 6 1
      src/pages/configureCenter/components/Grouping.vue
  7. 6 2
      src/pages/configureCenter/components/Partition.vue
  8. 253 0
      src/pages/configureCenter/editBed.vue
  9. 128 0
      src/pages/configureCenter/editGrouping.vue
  10. 240 0
      src/pages/configureCenter/editPartion.vue
  11. 215 105
      src/pages/console/managementConsole/staff_role/addStaff/index.vue
  12. 22 18
      src/pages/console/managementConsole/staff_role/editRole/index.vue
  13. 160 6
      src/pages/console/managementConsole/staff_role/editStaff/index.vue
  14. 16 8
      src/pages/console/managementConsole/staff_role/employeeList/index.vue
  15. 1 0
      src/pages/console/managementConsole/staff_role/newAddRole/index.vue
  16. 109 2
      src/pages/console/managementConsole/staff_role/newAddStaff/index.vue
  17. 2 2
      src/pages/console/managementConsole/staff_role/privilegeManagement/index.vue
  18. 43 3
      src/pages/console/managementConsole/staff_role/staffManagement/index.vue
  19. 12 5
      src/pages/console/managementConsole/staff_role/userManage/index.vue
  20. 30 146
      src/pages/doctorAdvice/components/DoctorManagement.vue
  21. 34 44
      src/pages/homeIndex/index.vue
  22. 49 29
      src/pages/my/index.vue
  23. 1 0
      src/pages/my/modifyPassword.vue
  24. 14 9
      src/pages/my/organizationInfo.vue
  25. 42 22
      src/pages/patientCenter/editOrg/index.vue
  26. 90 17
      src/pages/patients/editPatient.vue
  27. 8 10
      src/permission.js
  28. 27 1
      src/router/index.js
  29. 6 1
      src/utils/request.js

+ 14 - 0
src/api/admin_user.js Ver arquivo

@@ -173,6 +173,20 @@ export function GetFunctionRoleInfo(params){
173 173
 
174 174
 
175 175
 
176
+export function GetAllRole(){
177
+  return request({
178
+    url:'/m/api/role',
179
+    method:'get',
180
+  })
181
+}
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
176 190
 
177 191
 
178 192
 

+ 5 - 5
src/api/patient.js Ver arquivo

@@ -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 - 8
src/api/patient/patient.js Ver arquivo

@@ -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',
@@ -738,7 +737,6 @@ export function saveName(id, name) {
738 737
     id: id,
739 738
     name: name
740 739
   }
741
-  console.log('params', params)
742 740
   return request({
743 741
     url: '/m/api/patient/savename',
744 742
     method: 'get',
@@ -762,9 +760,9 @@ export function getMyOrganazition(id, params) {
762 760
   })
763 761
 }
764 762
 
765
-export function getOrgInformation(params) {
763
+export function getOrgInformation(id, params) {
766 764
   return request({
767
-    url: '/m/api/org/getorginformation',
765
+    url: '/m/api/org/getorginformation?id=' + id,
768 766
     method: 'get',
769 767
     params: params
770 768
   })
@@ -793,3 +791,52 @@ export function getMyInforName(id, params) {
793 791
     params: params
794 792
   })
795 793
 }
794
+
795
+export function getPartionDetail(id, params) {
796
+  return request({
797
+    url: '/m/api/patient/getpartiondetail?id=' + id,
798
+    method: 'get',
799
+    params: params
800
+  })
801
+}
802
+
803
+export function UpdatePartition(params) {
804
+  return request({
805
+    url: '/m/api/patient/updatepartition',
806
+    method: 'get',
807
+    params: params
808
+  })
809
+}
810
+
811
+export function getGroupDetail(id, params) {
812
+  return request({
813
+    url: '/m/api/patient/getgroupdetail?id=' + id,
814
+    method: 'get',
815
+    params: params
816
+  })
817
+}
818
+
819
+export function updateGroup(params) {
820
+  return request({
821
+    url: '/m/api/patient/updategroup',
822
+    method: 'get',
823
+    params: params
824
+  })
825
+}
826
+
827
+export function getBedDetail(id, params) {
828
+  return request({
829
+    url: '/m/api/patient/getbeddetail?id=' + id,
830
+    method: 'get',
831
+    params: params
832
+  })
833
+}
834
+
835
+export function updateBed(params) {
836
+  console.log('params', params)
837
+  return request({
838
+    url: '/m/api/patient/updatebed',
839
+    method: 'get',
840
+    params: params
841
+  })
842
+}

+ 128 - 66
src/pages/allDoctorAdvice/index.vue Ver arquivo

@@ -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
+            <span v-if="i<1"><van-icon class="ellipsis" name="ellipsis" @click="DeleteFive(item.start_time,item.child[0].execution_staff,index)" /></span>
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 Ver arquivo

@@ -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 Ver arquivo

@@ -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 Ver arquivo

@@ -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 !== "") {

+ 253 - 0
src/pages/configureCenter/editBed.vue Ver arquivo

@@ -0,0 +1,253 @@
1
+<template>
2
+  <div class="page_newBed">
3
+    <div class="newBedTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑床位</span>
6
+        <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field v-model="name" required label="床位号" placeholder="请输入" :readonly="readonly"/>
12
+      <van-field
13
+        label="所属分区"
14
+        v-model="zone"
15
+        right-icon="arrow"
16
+        placeholder="请选择"
17
+        required
18
+        readonly
19
+        @click="clickType"
20
+      />
21
+      <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
22
+        <van-picker :columns="columns" show-toolbar @confirm="confirmZone" @cancel="cancelZone"/>
23
+      </van-popup>
24
+
25
+      <van-field
26
+        label="所属分组"
27
+        v-model="group"
28
+        right-icon="arrow"
29
+        placeholder="请选择"
30
+        required
31
+        readonly
32
+        @click="clickTypeOne"
33
+      />
34
+      <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
35
+        <van-picker :columns="columns1" show-toolbar @confirm="confirmGroup" @cancel="cancelGroup"/>
36
+      </van-popup>
37
+    </div>
38
+  </div>
39
+</template>
40
+
41
+<script>
42
+import { getAllGroupOne, getBedDetail, updateBed } from "@/api/patient/patient";
43
+export default {
44
+  data() {
45
+    return {
46
+      show: false,
47
+      show1: false,
48
+      columns: [],
49
+      columns1: [],
50
+      active: 0,
51
+      group: "",
52
+      name: "",
53
+      zone: "",
54
+      form: {
55
+        id: 0,
56
+        zone: "",
57
+        group: ""
58
+      },
59
+      data: [],
60
+      dataOne: [],
61
+      zoneData: [],
62
+      groupData: [],
63
+      readonly: true
64
+    };
65
+  },
66
+  methods: {
67
+    toReturn() {
68
+      this.$router.push("/configurecenter?active=" + this.active);
69
+    },
70
+    getAllGroupOne() {
71
+      getAllGroupOne().then(response => {
72
+        if (response.data.state === 1) {
73
+          var group = response.data.data.group;
74
+          for (let i = 0; i < group.length; i++) {
75
+            this.columns1.push(group[i].name);
76
+          }
77
+          this.data = group;
78
+          var zone = response.data.data.zone;
79
+
80
+          for (let j = 0; j < zone.length; j++) {
81
+            this.columns.push(zone[j].name);
82
+          }
83
+          this.dataOne = zone;
84
+        }
85
+      });
86
+    },
87
+    confirmZone(val) {
88
+      this.zone = val;
89
+      for (let i = 0; i < this.dataOne.length; i++) {
90
+        if (this.dataOne[i].name === val) {
91
+          this.form.zone = this.dataOne[i].id;
92
+        }
93
+      }
94
+      this.show = false;
95
+    },
96
+    cancelZone() {
97
+      this.show = false;
98
+    },
99
+    confirmGroup(val) {
100
+      this.group = val;
101
+      for (let i = 0; i < this.data.length; i++) {
102
+        if (val === this.data[i].name) {
103
+          this.form.group = this.data[i].id;
104
+        }
105
+      }
106
+      this.show1 = false;
107
+    },
108
+    cancelGroup() {
109
+      this.show1 = false;
110
+    },
111
+    getBedDetail(id) {
112
+      getBedDetail(id).then(response => {
113
+        if (response.data.state === 1) {
114
+          var bedDetail = response.data.data.bedDetail;
115
+          this.form.id = bedDetail.id;
116
+          var zone = response.data.data.zone;
117
+          console.log(zone);
118
+          var group = response.data.data.group;
119
+          console.log("bedDetail", bedDetail);
120
+          // this.zone = bedDetail.zone_id;
121
+          this.name = bedDetail.number;
122
+          for (let i = 0; i < zone.length; i++) {
123
+            if (bedDetail.zone_id === zone[i].id) {
124
+              this.zone = zone[i].name;
125
+            }
126
+          }
127
+          for (let j = 0; j < group.length; j++) {
128
+            if (bedDetail.group_id === group[j].id) {
129
+              this.group = group[j].name;
130
+            }
131
+          }
132
+        }
133
+      });
134
+    },
135
+    spread() {
136
+      var spancontent = document.getElementById("copy").innerHTML;
137
+      if (spancontent == "修改") {
138
+        this.readonly = false;
139
+        document.getElementById("copy").innerHTML = "保存";
140
+      }
141
+      if (spancontent == "保存") {
142
+        this.updateBed();
143
+      }
144
+    },
145
+    clickType() {
146
+      if (this.readonly == true) {
147
+        this.show = false;
148
+      }
149
+      if (this.readonly == false) {
150
+        this.show = true;
151
+      }
152
+    },
153
+    clickTypeOne() {
154
+      if (this.readonly == true) {
155
+        this.show1 = false;
156
+      }
157
+      if (this.readonly == false) {
158
+        this.show1 = true;
159
+      }
160
+    },
161
+    updateBed() {
162
+      if (this.name === "") {
163
+        this.$toast("床位号不能为空");
164
+        return false;
165
+      }
166
+      if (this.form.zone === "") {
167
+        for (let i = 0; i < this.dataOne.length; i++) {
168
+          if (this.zone === this.dataOne[i].name) {
169
+            this.form.zone = this.dataOne[i].id;
170
+          }
171
+        }
172
+      }
173
+      if (this.form.group === "") {
174
+        for (let i = 0; i < this.data.length; i++) {
175
+          if ((this.group = this.data[i].name)) {
176
+            this.form.group = this.data[i].id;
177
+          }
178
+        }
179
+      }
180
+      const params = {
181
+        id: this.form.id,
182
+        name: this.name,
183
+        zone: this.form.zone,
184
+        group: this.form.group
185
+      };
186
+      updateBed(params).then(response => {
187
+        if (response.data.state === 1) {
188
+          var number = response.data.data.number;
189
+          console.log("number", number);
190
+          this.$router.push("/configurecenter?active=" + this.active);
191
+        }
192
+      });
193
+    }
194
+  },
195
+  created() {
196
+    this.active = parseInt(this.$route.query.active);
197
+    this.getAllGroupOne();
198
+    var id = this.$route.query.id;
199
+    this.getBedDetail(id);
200
+  }
201
+};
202
+</script>
203
+
204
+<style lang="scss" scoped>
205
+.page_newBed {
206
+  height: 100%;
207
+  overflow: hidden;
208
+  overflow-y: auto;
209
+  background: #fafafa;
210
+  .newBedTitle {
211
+    background: #fff;
212
+    padding: 0 1.125rem;
213
+    height: 3.125rem;
214
+    display: flex;
215
+    align-items: center;
216
+  }
217
+  .jiantou {
218
+    font-size: 1.5rem;
219
+    font-weight: 600;
220
+    margin-right: 7rem;
221
+  }
222
+  .titleName {
223
+    font-size: 1.125rem;
224
+    font-weight: 600;
225
+  }
226
+  .infoBox {
227
+    margin-top: 1rem;
228
+  }
229
+  .save {
230
+    width: 19.25rem;
231
+    height: 2.875rem;
232
+    margin: 0 auto;
233
+    background: rgba(51, 138, 251, 1);
234
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
235
+    border-radius: 1.4375rem;
236
+    text-align: center;
237
+    line-height: 2.875rem;
238
+    color: #fff;
239
+    margin-top: 2.875rem;
240
+  }
241
+}
242
+</style>
243
+<style lang="scss">
244
+.infoBox {
245
+  .van-field__body {
246
+    width: 100%;
247
+  }
248
+  .van-cell__value {
249
+    display: flex;
250
+    align-items: center;
251
+  }
252
+}
253
+</style>

+ 128 - 0
src/pages/configureCenter/editGrouping.vue Ver arquivo

@@ -0,0 +1,128 @@
1
+<template>
2
+  <div class="page_newGrouping">
3
+    <div class="newGroupingTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑分组</span>
6
+       <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field v-model="name" required label="分组名称" placeholder="请输入" :readonly="readonly" />
12
+    </div>
13
+  </div>
14
+</template>
15
+
16
+<script>
17
+import { getGroupDetail, updateGroup } from "@/api/patient/patient";
18
+export default {
19
+  data() {
20
+    return {
21
+      show: false,
22
+      id: 0,
23
+      name: "",
24
+      active: 0,
25
+      readonly: true
26
+    };
27
+  },
28
+  methods: {
29
+    getGroupDetail(id) {
30
+      getGroupDetail(id).then(response => {
31
+        if (response.data.state == 1) {
32
+          var groupdetail = response.data.data.groupDetail;
33
+          console.log("groupdetail", groupdetail);
34
+          this.name = groupdetail.name;
35
+          this.id = groupdetail.id;
36
+        }
37
+      });
38
+    },
39
+    updateGroup() {
40
+      if (this.name === "") {
41
+        this.$toast("请输入分组名");
42
+        return false;
43
+      }
44
+      const params = {
45
+        name: this.name,
46
+        id: this.id
47
+      };
48
+      updateGroup(params).then(response => {
49
+        if (response.data.state === 1) {
50
+          var group = response.data.data.group;
51
+          this.$router.push("/configurecenter?active=" + this.active);
52
+        }
53
+      });
54
+    },
55
+    toReturn() {
56
+      this.$router.push("/configurecenter?active=" + this.active);
57
+    },
58
+    spread() {
59
+      var spancontent = document.getElementById("copy").innerHTML;
60
+      if (spancontent == "修改") {
61
+        this.readonly = false;
62
+        document.getElementById("copy").innerHTML = "保存";
63
+      }
64
+      if (spancontent == "保存") {
65
+        this.updateGroup();
66
+      }
67
+    }
68
+  },
69
+  created() {
70
+    this.active = parseInt(this.$route.query.active);
71
+    var id = this.$route.query.id;
72
+    this.getGroupDetail(id);
73
+  }
74
+};
75
+</script>
76
+
77
+<style lang="scss" scoped>
78
+.page_newGrouping {
79
+  height: 100%;
80
+  overflow: hidden;
81
+  overflow-y: auto;
82
+  background: #fafafa;
83
+  .newGroupingTitle {
84
+    background: #fff;
85
+    padding: 0 1.125rem;
86
+    height: 3.125rem;
87
+    display: flex;
88
+    align-items: center;
89
+  }
90
+  .jiantou {
91
+    font-size: 1.5rem;
92
+    font-weight: 600;
93
+    margin-right: 7rem;
94
+  }
95
+  .titleName {
96
+    font-size: 1.125rem;
97
+    font-weight: 600;
98
+  }
99
+  .infoBox {
100
+    margin-top: 1rem;
101
+
102
+    .van-cell__value {
103
+      display: flex;
104
+      align-items: center;
105
+    }
106
+  }
107
+  .save {
108
+    width: 19.25rem;
109
+    height: 2.875rem;
110
+    margin: 0 auto;
111
+    background: rgba(51, 138, 251, 1);
112
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
113
+    border-radius: 1.4375rem;
114
+    text-align: center;
115
+    line-height: 2.875rem;
116
+    color: #fff;
117
+    margin-top: 2.875rem;
118
+  }
119
+}
120
+</style>
121
+<style lang="scss">
122
+.infoBox {
123
+  .van-cell__value {
124
+    display: flex;
125
+    align-items: center;
126
+  }
127
+}
128
+</style>

+ 240 - 0
src/pages/configureCenter/editPartion.vue Ver arquivo

@@ -0,0 +1,240 @@
1
+<template>
2
+  <div class="page_newPartition">
3
+    <div class="newPartitionTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑分区</span>
6
+      <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field
12
+        v-model="form.name"
13
+        required
14
+        label="分区名称"
15
+        placeholder="请输入"
16
+        :readonly="readonly"
17
+      />
18
+      <van-field
19
+        label="分区类型"
20
+        v-model="type"
21
+        right-icon="arrow"
22
+        placeholder="请选择"
23
+        required
24
+        :readonly="readonly"
25
+        @click="clickType"
26
+      />
27
+      <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
28
+        <van-picker
29
+          :columns="columns"
30
+          show-toolbar
31
+          @confirm="onConfirm"
32
+          @cancel="oncancel"
33
+        />
34
+      </van-popup>
35
+    </div>
36
+  </div>
37
+</template>
38
+
39
+<script>
40
+import { getPartionDetail, UpdatePartition } from "@/api/patient/patient";
41
+export default {
42
+  data() {
43
+    return {
44
+      show: false,
45
+      columns: ["普通", "乙肝", "丙肝", "艾滋病", "肺结核", "梅毒"],
46
+      form: {
47
+        id: "",
48
+        name: "",
49
+        zoneType: ""
50
+      },
51
+      type: "",
52
+      active: 0,
53
+      showOne: true,
54
+      shoTwo: false,
55
+      readonly: true
56
+    };
57
+  },
58
+  methods: {
59
+    onConfirm(val) {
60
+      if (val === "普通") {
61
+        this.type = val;
62
+        this.form.zoneType = 1;
63
+        this.show = false;
64
+      }
65
+      if (val === "乙肝") {
66
+        this.type = val;
67
+        this.form.zoneType = 2;
68
+        this.show = false;
69
+      }
70
+      if (val === "丙肝") {
71
+        this.type = val;
72
+        this.form.zoneType = 3;
73
+        this.show = false;
74
+      }
75
+      if (val === "艾滋病") {
76
+        this.type = val;
77
+        this.form.zoneType = 4;
78
+        this.show = false;
79
+      }
80
+      if (val === "肺结核") {
81
+        this.type = val;
82
+        this.form.zoneType = 5;
83
+        this.show = false;
84
+      }
85
+      if (val === "梅毒") {
86
+        this.type = val;
87
+        this.form.zoneType = 6;
88
+        this.show = false;
89
+      }
90
+    },
91
+    oncancel() {
92
+      this.show = false;
93
+    },
94
+    getPartionDetail(id) {
95
+      getPartionDetail(id).then(response => {
96
+        if (response.data.state === 1) {
97
+          var partionDetail = response.data.data.partionDetail;
98
+          this.form.name = partionDetail.name;
99
+          this.form.id = partionDetail.id;
100
+          if (partionDetail.type === 1) {
101
+            this.type = "普通";
102
+          }
103
+          if (partionDetail.type === 2) {
104
+            this.type = "乙肝";
105
+          }
106
+          if (partionDetail.type === 3) {
107
+            this.type = "丙肝";
108
+          }
109
+          if (partionDetail.type === 4) {
110
+            this.type = "艾滋病";
111
+          }
112
+          if (partionDetail.type === 5) {
113
+            this.type = "肺结核";
114
+          }
115
+          if (partionDetail.type === 6) {
116
+            this.type = "梅毒";
117
+          }
118
+          console.log("partionDetail", partionDetail);
119
+        }
120
+      });
121
+    },
122
+    UpdatePartition() {
123
+      if (this.form.name === "") {
124
+        this.$toast("请输入分区名");
125
+        return false;
126
+      }
127
+      if (this.form.zoneType === "") {
128
+        if (this.type == "普通") {
129
+          this.form.zoneType = 1;
130
+        }
131
+        if (this.type == "乙肝") {
132
+          this.form.zoneType = 2;
133
+        }
134
+        if (this.type == "丙肝") {
135
+          this.form.zoneType = 3;
136
+        }
137
+        if (this.type == "艾滋病") {
138
+          this.form.zoneType = 4;
139
+        }
140
+        if (this.type == "肺结核") {
141
+          this.form.zoneType = 5;
142
+        }
143
+        if (this.type == "梅毒") {
144
+          this.form.zoneType = 6;
145
+        }
146
+      }
147
+      const params = {
148
+        id: this.form.id,
149
+        name: this.form.name,
150
+        type: this.form.zoneType
151
+      };
152
+      UpdatePartition(params).then(response => {
153
+        if (response.data.state === 1) {
154
+          var zone = response.data.data.zone;
155
+          console.log("zone", zone);
156
+          this.$router.push("/configurecenter");
157
+        }
158
+      });
159
+    },
160
+    toReturn() {
161
+      this.$router.push("/configurecenter?active=" + this.active);
162
+    },
163
+    spread() {
164
+      var spancontent = document.getElementById("copy").innerHTML;
165
+      if (spancontent == "修改") {
166
+        this.readonly = false;
167
+        document.getElementById("copy").innerHTML = "保存";
168
+      }
169
+      if (spancontent == "保存") {
170
+        this.UpdatePartition();
171
+      }
172
+    },
173
+    clickType() {
174
+      if (this.readonly == true) {
175
+        this.show = false;
176
+      }
177
+      if (this.readonly == false) {
178
+        this.show = true;
179
+      }
180
+    }
181
+  },
182
+  created() {
183
+    this.active = parseInt(this.$route.query.active);
184
+    var id = this.$route.query.id;
185
+    console.log("id", id);
186
+    this.getPartionDetail(id);
187
+  }
188
+};
189
+</script>
190
+
191
+<style lang="scss" scoped>
192
+.page_newPartition {
193
+  height: 100%;
194
+  overflow: hidden;
195
+  overflow-y: auto;
196
+  background: #fafafa;
197
+  .newPartitionTitle {
198
+    background: #fff;
199
+    padding: 0 1.125rem;
200
+    height: 3.125rem;
201
+    display: flex;
202
+    align-items: center;
203
+  }
204
+  .jiantou {
205
+    font-size: 1.5rem;
206
+    font-weight: 600;
207
+    margin-right: 7rem;
208
+  }
209
+  .titleName {
210
+    font-size: 1.125rem;
211
+    font-weight: 600;
212
+  }
213
+  .infoBox {
214
+    margin-top: 1rem;
215
+  }
216
+  .save {
217
+    width: 19.25rem;
218
+    height: 2.875rem;
219
+    margin: 0 auto;
220
+    background: rgba(51, 138, 251, 1);
221
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
222
+    border-radius: 1.4375rem;
223
+    text-align: center;
224
+    line-height: 2.875rem;
225
+    color: #fff;
226
+    margin-top: 2.875rem;
227
+  }
228
+}
229
+</style>
230
+<style lang="scss">
231
+.infoBox {
232
+  .van-field__body {
233
+    width: 100%;
234
+  }
235
+  .van-cell__value {
236
+    display: flex;
237
+    align-items: center;
238
+  }
239
+}
240
+</style>

+ 215 - 105
src/pages/console/managementConsole/staff_role/addStaff/index.vue Ver arquivo

@@ -7,7 +7,7 @@
7 7
     </div>
8 8
     <div class="editStaffTip">必填</div>
9 9
     <div class="staffBox">
10
-      <van-field v-model="name" label="姓名" clearable placeholder="请输入姓名" />
10
+      <van-field v-model="name" label="姓名" clearable placeholder="请输入姓名"/>
11 11
       <van-field
12 12
         v-model="tel"
13 13
         type="tel"
@@ -28,7 +28,8 @@
28 28
                 shape="square"
29 29
                 v-for="(item, index) in roles"
30 30
                 :key="index"
31
-              >{{item.name}}</van-checkbox>
31
+              >{{item.name}}
32
+              </van-checkbox>
32 33
             </van-checkbox-group>
33 34
           </div>
34 35
         </template>
@@ -39,12 +40,12 @@
39 40
           <span class="custom-title" style="width:90px">职称</span>
40 41
           <div style="display:flex;">
41 42
             <div style="margin-right:2rem;display: flex;align-items: center;" @click="show1 = true">
42
-              <span>请选择</span>
43
-              <van-icon name="arrow-down" />
43
+              <span>{{type_name}}</span>
44
+              <van-icon name="arrow-down"/>
44 45
             </div>
45
-            <div style="margin-right:2rem;display: flex;align-items: center;">
46
-              <span>请选择</span>
47
-              <van-icon name="arrow-down" />
46
+            <div style="margin-right:2rem;display: flex;align-items: center;" @click="show2 = true">
47
+              <span>{{titles_name}}</span>
48
+              <van-icon name="arrow-down"/>
48 49
             </div>
49 50
           </div>
50 51
         </template>
@@ -52,114 +53,209 @@
52 53
     </div>
53 54
     <div class="editStaffTip">选填</div>
54 55
     <div class="staffBox">
55
-      <van-field v-model="title" label="职位" placeholder="请填写" />
56
+      <van-field v-model="title" label="职位" placeholder="请填写"/>
56 57
     </div>
57 58
     <div class="addnewStaff" @click="save(2)">
58
-      <van-icon class="addIcon" name="add" />
59
+      <van-icon class="addIcon" name="add"/>
59 60
       <p>保存并继续新增员工</p>
60 61
     </div>
61 62
     <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
62
-      <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
63
+      <van-picker show-toolbar :columns="user_type_name" @cancel="onCancel" @confirm="onUserTypeConfirm"/>
63 64
     </van-popup>
64 65
     <van-popup v-model="show2" position="bottom" :style="{ height: '40%' }">
65
-      <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
66
+      <van-picker show-toolbar :columns="user_titles_name" @cancel="onCancel" @confirm="onUserTitleConfirm"/>
66 67
     </van-popup>
68
+
67 69
   </div>
68 70
 </template>
69 71
 
70 72
 <script>
71
-import { AdminInitData, CreateAdminUser } from "@/api/admin_user";
72
-import { checkMobile } from "@/utils/tools";
73
-import { setRem } from "@/libs/functionRem";
74
-
75
-export default {
76
-  data() {
77
-    return {
78
-      name: "",
79
-      tel: "",
80
-      role_ids: [],
81
-      title: "",
82
-      value1: "",
83
-      roles: [],
84
-      show1: false,
85
-      show2: false,
86
-      columns: ["杭州", "宁波", "温州", "嘉兴", "湖州"]
87
-    };
88
-  },
89
-  methods: {
90
-    GetAdminUserInitData() {
91
-      AdminInitData().then(response => {
92
-        if (response.data.state === 1) {
93
-          for (let i = 0; i < response.data.data.roles.length; i++) {
94
-            if (!response.data.data.roles[i].is_super_admin) {
95
-              this.roles.push(response.data.data.roles[i]);
96
-            }
73
+  import {AdminInitData, CreateAdminUser} from "@/api/admin_user";
74
+  import {checkMobile} from "@/utils/tools";
75
+  import {setRem} from "@/libs/functionRem";
76
+
77
+  export default {
78
+    data() {
79
+      return {
80
+        name: "",
81
+        tel: "",
82
+        role_ids: [],
83
+        title: "",
84
+        value1: "",
85
+        roles: [],
86
+        show1: false,
87
+        show2: false,
88
+        type_name:"",
89
+        titles_name:"",
90
+        user_type:2,
91
+        user_title:1,
92
+
93
+        user_types: [
94
+          {index: 2, name: '医生'},
95
+          {index: 3, name: '护士'}
96
+        ],
97
+        user_titles: [
98
+          {index: 1, name: '医士'},
99
+          {index: 2, name: '医师'},
100
+          {index: 3, name: '住院医师'},
101
+          {index: 4, name: '主治医师'},
102
+          {index: 5, name: '副主任医师'},
103
+          {index: 6, name: '主任医师'},
104
+          {index: 7, name: '护士'},
105
+          {index: 8, name: '护师'},
106
+          {index: 9, name: '主管护师'},
107
+          {index: 10, name: '副主任护师'},
108
+          {index: 11, name: '主任护师'},
109
+          {index: 12, name: '运营专员'},
110
+          {index: 13, name: '运营主管'}
111
+        ],
112
+
113
+        user_type_name: [
114
+          '医生',
115
+          '护士'
116
+        ],
117
+
118
+        user_titles_name: [
119
+          '医士',
120
+          '医师',
121
+          '住院医师',
122
+          '主治医师',
123
+          '副主任医师',
124
+          '主任医师',
125
+          '护士',
126
+          '护师',
127
+          '主管护师',
128
+          '副主任护师',
129
+          '主任护师',
130
+          '运营专员',
131
+          '运营主管'
132
+        ],
133
+
134
+      };
135
+    },
136
+    methods: {
137
+      onUserTypeConfirm(value, index){
138
+        this.show1 = false
139
+        for (let i = 0; i < this.user_types.length; i++){
140
+          if (this.user_types[i].name == value){
141
+            this.user_type = this.user_types[i].index
142
+            this.type_name= this.user_types[i].name
143
+
97 144
           }
98
-        } else {
99
-          this.$toast({
100
-            message: response.data.msg
101
-          });
145
+
102 146
         }
103
-      });
104
-    },
105
-    save(type) {
106
-      if (this.name.trim().length == 0) {
107
-        this.$toast({
108
-          message: "姓名不能为空!"
109
-        });
110
-        return;
111
-      }
112
-      if (!checkMobile(this.tel)) {
113
-        this.$toast({
114
-          message: "请填写正确的手机号码!"
115
-        });
116
-        return;
117
-      }
118
-      if (this.role_ids.length <= 0) {
119
-        this.$toast({
120
-          message: "至少选择一种角色"
121
-        });
122
-        return;
123
-      }
124 147
 
125
-      let params = {
126
-        name: this.name,
127
-        mobile: this.tel,
128
-        role_ids: this.role_ids.join(","),
129
-        title: this.title
130
-      };
131
-      console.log(params);
132
-      CreateAdminUser(params).then(response => {
133
-        if (response.data.state === 1) {
134
-          this.$toast({ message: "新增成功" });
135
-          if (type == 1) {
136
-            this.$router.go(-1);
148
+      },
149
+      onUserTitleConfirm(value, index){
150
+        this.show2 = false
151
+
152
+        for (let i = 0; i < this.user_titles.length; i++){
153
+          if (this.user_titles[i].name == value){
154
+            this.user_title = this.user_titles[i].index
155
+            this.titles_name= this.user_titles[i].name
156
+
157
+          }
158
+        }
159
+
160
+
161
+      },
162
+      onCancel() {
163
+        this.show1 = false
164
+        this.show2 = false
165
+
166
+
167
+      },
168
+
169
+      GetAdminUserInitData() {
170
+        AdminInitData().then(response => {
171
+          if (response.data.state === 1) {
172
+            for (let i = 0; i < response.data.data.roles.length; i++) {
173
+              if (!response.data.data.roles[i].is_super_admin) {
174
+                if(this.$store.getters.user.admin.is_super_admin){
175
+                  this.roles.push(response.data.data.roles[i]);
176
+                }else{
177
+                  if(response.data.data.roles[i].is_system != 1 && response.data.data.roles[i].name != "子管理员"){
178
+                    this.roles.push(response.data.data.roles[i]);
179
+                  }
180
+
181
+                }
182
+              }
183
+            }
137 184
           } else {
138
-            this.name = "";
139
-            this.mobile = "";
140
-            this.role_ids = [];
141
-            this.title = "";
185
+            this.$toast({
186
+              message: response.data.msg
187
+            });
142 188
           }
143
-        } else {
189
+        });
190
+      },
191
+      save(type) {
192
+        if (this.name.trim().length == 0) {
144 193
           this.$toast({
145
-            message: response.data.msg
194
+            message: "姓名不能为空!"
146 195
           });
196
+          return;
147 197
         }
148
-      });
198
+        if (!checkMobile(this.tel)) {
199
+          this.$toast({
200
+            message: "请填写正确的手机号码!"
201
+          });
202
+          return;
203
+        }
204
+        if (this.role_ids.length <= 0) {
205
+          this.$toast({
206
+            message: "至少选择一种角色"
207
+          });
208
+          return;
209
+        }
210
+
211
+        let params = {
212
+          name: this.name,
213
+          mobile: this.tel,
214
+          role_ids: this.role_ids.join(","),
215
+          title: this.title,
216
+          user_type: this.user_type,
217
+          user_title: this.user_title
218
+        };
219
+        CreateAdminUser(params).then(response => {
220
+          if (response.data.state === 1) {
221
+            this.$toast({message: "新增成功"});
222
+            if (type == 1) {
223
+              this.$router.go(-1);
224
+            } else {
225
+              this.name = "";
226
+              this.tel = "";
227
+              this.role_ids = [];
228
+              this.title = "";
229
+              this.user_type = 2
230
+              this.user_title = 1
231
+              this.titles_name = this.user_titles_name[0]
232
+              this.type_name = this.user_type_name[0]
233
+
234
+            }
235
+          } else {
236
+            this.$toast({
237
+              message: response.data.msg
238
+            });
239
+          }
240
+        });
241
+      }
242
+    },
243
+    created() {
244
+      this.GetAdminUserInitData();
245
+      this.titles_name = this.user_titles_name[0]
246
+      this.type_name = this.user_type_name[0]
247
+
248
+      setRem();
149 249
     }
150
-  },
151
-  created() {
152
-    this.GetAdminUserInitData();
153
-    setRem();
154
-  }
155
-};
250
+  };
156 251
 </script>
157 252
 
158 253
 <style lang="scss" scoped>
159
-.page_addStaff {
160
-  height: 100%;
161
-  overflow: hidden;
162
-  background: #fafafa;
254
+  .page_addStaff {
255
+    height: 100%;
256
+    overflow: hidden;
257
+    background: #fafafa;
258
+
163 259
   .editStaffTitle {
164 260
     height: 3.125rem;
165 261
     display: flex;
@@ -169,15 +265,18 @@ export default {
169 265
     padding: 0 1.125rem;
170 266
     background: #fff;
171 267
   }
268
+
172 269
   .jiantou {
173 270
     font-size: 1.5rem;
174 271
     font-weight: 600;
175 272
     margin-right: 1.25rem;
176 273
   }
274
+
177 275
   .titleName {
178 276
     font-size: 1.125rem;
179 277
     font-weight: 600;
180 278
   }
279
+
181 280
   .editStaffTip {
182 281
     height: 1.875rem;
183 282
     line-height: 1.875rem;
@@ -185,24 +284,31 @@ export default {
185 284
     padding-left: 0.875rem;
186 285
     color: #989898;
187 286
   }
287
+
188 288
   .staffBox {
189
-    .van-cell {
190
-      font-size: 1rem;
191
-    }
192
-    .newCell {
193
-      padding-right: 0;
194
-    }
289
+
290
+  .van-cell {
291
+    font-size: 1rem;
292
+  }
293
+
294
+  .newCell {
295
+    padding-right: 0;
296
+  }
297
+
195 298
   }
196 299
   .van-cell__title {
197 300
     display: flex;
198 301
   }
302
+
199 303
   .van-checkbox-group {
200 304
     display: flex;
201 305
     flex-wrap: wrap;
202 306
   }
307
+
203 308
   .van-checkbox {
204 309
     margin-bottom: 0.625rem;
205 310
   }
311
+
206 312
   .addnewStaff {
207 313
     height: 2.8125rem;
208 314
     line-height: 2.8125rem;
@@ -212,19 +318,23 @@ export default {
212 318
     display: flex;
213 319
     align-items: center;
214 320
     padding-left: 1rem;
215
-    .addIcon {
216
-      color: #338afb;
217
-      font-size: 1.5rem;
218
-      margin-right: 0.625rem;
219
-    }
321
+
322
+  .addIcon {
323
+    color: #338afb;
324
+    font-size: 1.5rem;
325
+    margin-right: 0.625rem;
326
+  }
327
+
328
+  }
220 329
   }
221
-}
222 330
 </style>
223 331
 <style lang="scss">
224
-.page_editStaff {
332
+  .page_editStaff {
333
+
225 334
   .van-cell__value {
226 335
     display: flex;
227 336
     align-items: center;
228 337
   }
229
-}
338
+
339
+  }
230 340
 </style>

+ 22 - 18
src/pages/console/managementConsole/staff_role/editRole/index.vue Ver arquivo

@@ -40,7 +40,8 @@
40 40
 
41 41
 <script>
42 42
   import {setRem} from "@/libs/functionRem";
43
-  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo,EditPurview} from "@/api/admin_user";
43
+  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo,EditPurview,GetAllRole} from "@/api/admin_user";
44
+  import {Dialog} from "vant";
44 45
 
45 46
   export default {
46 47
     data() {
@@ -64,7 +65,7 @@
64 65
         let purview_ids  = ""
65 66
         let type = 0
66 67
         if (value.pid == 0){ //当前页面只存在pid为0的数据,而且会出现开关按钮的情况只会是拥有一个子节点
67
-          console.log(value.sub_purview)
68
+
68 69
           if(value.sub_purview.length > 0) {
69 70
 
70 71
             purview_ids = value.id + "," + value.sub_purview[0].id
@@ -117,24 +118,27 @@
117 118
 
118 119
       },
119 120
       del(){
120
-        let params = {
121
-          role_id: this.$route.query.id,
122
-          enable:false,
123
-        }
124
-        DeleteRoleInfo(params).then(response => {
125
-          if (response.data.state === 1) {
126
-            this.$toast({
127
-              message: "删除成功"
128
-            });
129
-            this.$router.go(-1)
130
-          } else {
131
-            this.$toast({
132
-              message: response.data.msg
133
-            });
121
+        Dialog.confirm({
122
+          message: "是否删除该角色?"
123
+        }).then(() => {
124
+          let params = {
125
+            role_id: this.$route.query.id,
126
+            enable:false,
134 127
           }
135
-        });
136
-
128
+          DeleteRoleInfo(params).then(response => {
129
+            if (response.data.state === 1) {
130
+              this.$toast({
131
+                message: "删除成功"
132
+              });
133
+              this.$router.go(-1)
134
+            } else {
135
+              this.$toast({
136
+                message: response.data.msg
137
+              });
138
+            }
139
+          });
137 140
 
141
+        });
138 142
       },
139 143
       editRole(){
140 144
         let params = {

+ 160 - 6
src/pages/console/managementConsole/staff_role/editStaff/index.vue Ver arquivo

@@ -26,13 +26,39 @@
26 26
           </div>
27 27
         </template>
28 28
       </van-cell>
29
+
30
+
31
+      <van-cell class="newCell">
32
+        <!-- 使用 title 插槽来自定义标题 -->
33
+        <template slot="title">
34
+          <span class="custom-title" style="width:90px">职称</span>
35
+          <div style="display:flex;">
36
+            <div style="margin-right:2rem;display: flex;align-items: center;" @click="show1 = true">
37
+              <span>{{type_name}}</span>
38
+              <van-icon name="arrow-down"/>
39
+            </div>
40
+            <div style="margin-right:2rem;display: flex;align-items: center;" @click="show2 = true">
41
+              <span>{{titles_name}}</span>
42
+              <van-icon name="arrow-down"/>
43
+            </div>
44
+          </div>
45
+        </template>
46
+      </van-cell>
47
+
29 48
     </div>
30 49
     <div class="editStaffTip">选填</div>
31 50
     <div class="staffBox">
32 51
       <van-field v-model="title" label="职位" placeholder="请填写"/>
33 52
     </div>
34
-    <div v-if="adminInfo.status == 1" class="stop" @click="onClick(2)">禁用该员工账号</div>
35
-    <div v-if="adminInfo.status != 1" class="stop1" @click="onClick(1)">恢复该员工账号</div>
53
+    <div v-if="adminInfo.status == 1 && !adminInfo.admin.is_super_admin  &&  !adminInfo.is_sub_super_admin" class="stop" @click="onClick(2)">禁用该员工账号</div>
54
+    <div v-if="adminInfo.status != 1 && !adminInfo.admin.is_super_admin  &&  !adminInfo.is_sub_super_admin " class="stop1" @click="onClick(1)">恢复该员工账号</div>
55
+
56
+    <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
57
+      <van-picker show-toolbar :columns="user_type_name" @cancel="onCancel" @confirm="onUserTypeConfirm"/>
58
+    </van-popup>
59
+    <van-popup v-model="show2" position="bottom" :style="{ height: '40%' }">
60
+      <van-picker show-toolbar :columns="user_titles_name" @cancel="onCancel" @confirm="onUserTitleConfirm"/>
61
+    </van-popup>
36 62
   </div>
37 63
 </template>
38 64
 
@@ -53,10 +79,97 @@
53 79
         name: "",
54 80
         tel: "",
55 81
         title: "",
56
-        adminInfo: {},
82
+        adminInfo: {
83
+          admin:{},
84
+
85
+        },
86
+        show1: false,
87
+        show2: false,
88
+        type_name:"",
89
+        titles_name:"",
90
+        user_type:2,
91
+        user_title:1,
92
+        user_types: [
93
+          {index: 2, name: '医生'},
94
+          {index: 3, name: '护士'}
95
+        ],
96
+        user_titles: [
97
+          {index: 1, name: '医士'},
98
+          {index: 2, name: '医师'},
99
+          {index: 3, name: '住院医师'},
100
+          {index: 4, name: '主治医师'},
101
+          {index: 5, name: '副主任医师'},
102
+          {index: 6, name: '主任医师'},
103
+          {index: 7, name: '护士'},
104
+          {index: 8, name: '护师'},
105
+          {index: 9, name: '主管护师'},
106
+          {index: 10, name: '副主任护师'},
107
+          {index: 11, name: '主任护师'},
108
+          {index: 12, name: '运营专员'},
109
+          {index: 13, name: '运营主管'}
110
+        ],
111
+
112
+        user_type_name: [
113
+          '医生',
114
+          '护士'
115
+        ],
116
+
117
+        user_titles_name: [
118
+          '医士',
119
+          '医师',
120
+          '住院医师',
121
+          '主治医师',
122
+          '副主任医师',
123
+          '主任医师',
124
+          '护士',
125
+          '护师',
126
+          '主管护师',
127
+          '副主任护师',
128
+          '主任护师',
129
+          '运营专员',
130
+          '运营主管'
131
+        ],
57 132
       };
58 133
     },
59 134
     methods: {
135
+      onUserTypeConfirm(value, index){
136
+        this.type_name = value
137
+        this.show1 = false
138
+
139
+        for (let i = 0; i < this.user_types.length; i++){
140
+          if (this.user_types[i].name == value){
141
+            this.user_type = this.user_types[i].index
142
+            this.type_name= this.user_types[i].name
143
+
144
+          }
145
+
146
+        }
147
+
148
+
149
+
150
+      },
151
+      onUserTitleConfirm(value, index){
152
+        this.titles_name = value
153
+        this.show2 = false
154
+
155
+        for (let i = 0; i < this.user_titles.length; i++){
156
+          if (this.user_titles[i].name == value){
157
+            this.user_title = this.user_titles[i].index
158
+            this.titles_name= this.user_titles[i].name
159
+
160
+          }
161
+        }
162
+
163
+
164
+
165
+
166
+      },
167
+      onCancel() {
168
+        this.show1 = false
169
+        this.show2 = false
170
+
171
+
172
+      },
60 173
       save() {
61 174
         if (this.name.trim().length == 0) {
62 175
           this.$toast({
@@ -76,6 +189,8 @@
76 189
           mobile: this.tel,
77 190
           role_ids: this.role_ids.join(","),
78 191
           title: this.title,
192
+          user_type: this.user_type,
193
+          user_title: this.user_title
79 194
         }
80 195
         EditAdmin(params).then(response => {
81 196
           if (response.data.state === 1) {
@@ -95,6 +210,7 @@
95 210
         GetAdminUserInfo(params).then(response => {
96 211
           if (response.data.state === 1) {
97 212
             this.adminInfo = response.data.data.user_info
213
+            console.log(this.adminInfo)
98 214
             // this.name = this.adminInfo.
99 215
             this.name = this.adminInfo.user_name
100 216
             this.tel = this.adminInfo.admin.mobile
@@ -103,6 +219,31 @@
103 219
             for (let i = 0; i < roles.length; i++) {
104 220
               this.role_ids.push(parseInt(roles[i]))
105 221
             }
222
+
223
+            for (let i = 0; i < this.user_types.length; i++){
224
+              if (this.user_types[i].index == this.adminInfo.user_type){
225
+                  this.user_type = this.adminInfo.user_type
226
+                  this.type_name= this.user_types[i].name
227
+
228
+              }
229
+
230
+            }
231
+            for (let i = 0; i < this.user_titles.length; i++){
232
+              if (this.user_titles[i].index == this.adminInfo.user_title){
233
+                this.user_title = this.adminInfo.user_title
234
+                this.titles_name= this.user_titles[i].name
235
+              }
236
+            }
237
+
238
+            //如果当前用户是超级管理员,而且是在编辑自己的信息的时候,将子管理员角色去除
239
+            for (let i = 0; i < this.roles.length; i++){
240
+              if(this.adminInfo.admin.id == this.$store.getters.user.admin.id && this.$store.getters.user.admin.is_super_admin && this.roles[i].is_system == 1 && this.roles[i].name == "子管理员"){
241
+                this.roles.splice(i,1)
242
+                i = i - 1;
243
+              }
244
+            }
245
+
246
+
106 247
           } else {
107 248
             this.$toast({
108 249
               message: response.data.msg
@@ -129,20 +270,34 @@
129 270
           }
130 271
         });
131 272
       },
273
+
132 274
       GetAdminUserInitData() {
133 275
         AdminInitData().then(response => {
134 276
           if (response.data.state === 1) {
135 277
             for (let i = 0; i < response.data.data.roles.length; i++) {
136 278
               if (!response.data.data.roles[i].is_super_admin) {
137
-                this.roles.push(response.data.data.roles[i])
279
+                if(this.$store.getters.user.admin.is_super_admin){
280
+                  this.roles.push(response.data.data.roles[i]);
281
+                }else{
282
+                  if(response.data.data.roles[i].is_system != 1 && response.data.data.roles[i].name != "子管理员"){
283
+                    this.roles.push(response.data.data.roles[i]);
284
+                  }
285
+
286
+                }
138 287
               }
139 288
             }
289
+
290
+            this.GetAdminUserInfo(this.$route.query.id)
291
+
292
+
293
+
140 294
           } else {
141 295
             this.$toast({
142 296
               message: response.data.msg
143 297
             });
144 298
           }
145 299
         });
300
+
146 301
       },
147 302
       onClick(id) {
148 303
         if (id == 2) {
@@ -165,8 +320,7 @@
165 320
       }
166 321
     }, created() {
167 322
       this.GetAdminUserInitData()
168
-      var id = this.$route.query.id
169
-      this.GetAdminUserInfo(id)
323
+
170 324
       setRem()
171 325
 
172 326
     }

+ 16 - 8
src/pages/console/managementConsole/staff_role/employeeList/index.vue Ver arquivo

@@ -16,7 +16,7 @@
16 16
         @change="onChange"
17 17
       >
18 18
         <div class="checkOne" v-for="(item, index) in admin_user" :key="index">
19
-          <van-checkbox :name="item.id"></van-checkbox>
19
+          <van-checkbox :name="item.id" @change="onChange"></van-checkbox>
20 20
           <div class="checkUserBox">
21 21
             <img v-if="item.avatar.length > 0" :src="item.avatar" alt="" />
22 22
             <img
@@ -45,6 +45,13 @@ export default {
45 45
   },
46 46
   methods: {
47 47
     save() {
48
+      if(this.result.length == 0){
49
+        this.$toast({
50
+          message: "至少选择一个用户"
51
+        });
52
+        return
53
+      }
54
+
48 55
       let params = {
49 56
         id: this.$route.query.id,
50 57
         ids: this.result.join(",")
@@ -68,16 +75,19 @@ export default {
68 75
             if (this.admin_user[i].role_ids.length > 0) {
69 76
               let isExist = -1;
70 77
               let ids = this.admin_user[i].role_ids.split(",");
71
-              console.log(ids);
72 78
               isExist = ids.indexOf(this.$route.query.id.toString());
73
-              console.log(isExist);
74
-
75 79
               if (isExist >= 0) {
76 80
                 this.admin_user.splice(i, 1);
77 81
                 i = i - 1;
78 82
               }
79 83
             }
80 84
           }
85
+          for (let i = 0; i < this.admin_user.length; i++) {
86
+              if(this.admin_user[i].user_id == this.$store.getters.user.org.creator){
87
+                this.admin_user.splice(i, 1);
88
+                i = i - 1;
89
+              }
90
+          }
81 91
         } else {
82 92
           this.$toast({
83 93
             message: response.data.msg
@@ -89,7 +99,7 @@ export default {
89 99
     checkAll() {
90 100
       if (this.allChecked == false) {
91 101
         for (let i = 0; i < this.admin_user.length; i++) {
92
-          this.result.push(this.admin_user[i].user_id);
102
+          this.result.push(this.admin_user[i].id);
93 103
         }
94 104
         this.allChecked = true;
95 105
       } else {
@@ -97,12 +107,10 @@ export default {
97 107
       }
98 108
     },
99 109
     onChange() {
100
-      if (this.result.length == this.list.length) {
110
+      if (this.result.length == this.admin_user.length) {
101 111
         this.allChecked = true;
102
-        this.$refs.checkboxes.toggle();
103 112
       } else {
104 113
         this.allChecked = false;
105
-        this.$refs.checkboxes.toggle();
106 114
       }
107 115
     }
108 116
   },

+ 1 - 0
src/pages/console/managementConsole/staff_role/newAddRole/index.vue Ver arquivo

@@ -8,6 +8,7 @@
8 8
       <van-field
9 9
         v-model="name"
10 10
         required
11
+        maxlength="30"
11 12
         label="角色名称"
12 13
         placeholder="请填写角色名称"
13 14
       />

+ 109 - 2
src/pages/console/managementConsole/staff_role/newAddStaff/index.vue Ver arquivo

@@ -21,6 +21,23 @@
21 21
         placeholder="请输入手机号"
22 22
         clearable
23 23
       />
24
+      <van-cell class="newCell">
25
+        <!-- 使用 title 插槽来自定义标题 -->
26
+        <template slot="title">
27
+          <span class="custom-title" style="width:90px">职称</span>
28
+          <div style="display:flex;">
29
+            <div style="margin-right:2rem;display: flex;align-items: center;" @click="show1 = true">
30
+              <span>{{type_name}}</span>
31
+              <van-icon name="arrow-down"/>
32
+            </div>
33
+            <div style="margin-right:2rem;display: flex;align-items: center;" @click="show2 = true">
34
+              <span>{{titles_name}}</span>
35
+              <van-icon name="arrow-down"/>
36
+            </div>
37
+          </div>
38
+        </template>
39
+      </van-cell>
40
+
24 41
     </div>
25 42
     <div class="editStaffTip">选填</div>
26 43
     <div class="staffBox">
@@ -30,6 +47,13 @@
30 47
       <van-icon class="addIcon" name="add" />
31 48
       <p>保存并继续新增员工</p>
32 49
     </div>
50
+    <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
51
+      <van-picker show-toolbar :columns="user_type_name" @cancel="onCancel" @confirm="onUserTypeConfirm"/>
52
+    </van-popup>
53
+    <van-popup v-model="show2" position="bottom" :style="{ height: '40%' }">
54
+      <van-picker show-toolbar :columns="user_titles_name" @cancel="onCancel" @confirm="onUserTitleConfirm"/>
55
+    </van-popup>
56
+
33 57
   </div>
34 58
 </template>
35 59
 
@@ -46,10 +70,89 @@ export default {
46 70
       role_ids: [],
47 71
       title: "",
48 72
       value1: "",
49
-      roles: []
73
+      roles: [],
74
+      show1: false,
75
+      show2: false,
76
+      type_name:"",
77
+      titles_name:"",
78
+      user_type:2,
79
+      user_title:1,
80
+
81
+      user_types: [
82
+        {index: 2, name: '医生'},
83
+        {index: 3, name: '护士'}
84
+      ],
85
+      user_titles: [
86
+        {index: 1, name: '医士'},
87
+        {index: 2, name: '医师'},
88
+        {index: 3, name: '住院医师'},
89
+        {index: 4, name: '主治医师'},
90
+        {index: 5, name: '副主任医师'},
91
+        {index: 6, name: '主任医师'},
92
+        {index: 7, name: '护士'},
93
+        {index: 8, name: '护师'},
94
+        {index: 9, name: '主管护师'},
95
+        {index: 10, name: '副主任护师'},
96
+        {index: 11, name: '主任护师'},
97
+        {index: 12, name: '运营专员'},
98
+        {index: 13, name: '运营主管'}
99
+      ],
100
+
101
+      user_type_name: [
102
+        '医生',
103
+        '护士'
104
+      ],
105
+
106
+      user_titles_name: [
107
+        '医士',
108
+        '医师',
109
+        '住院医师',
110
+        '主治医师',
111
+        '副主任医师',
112
+        '主任医师',
113
+        '护士',
114
+        '护师',
115
+        '主管护师',
116
+        '副主任护师',
117
+        '主任护师',
118
+        '运营专员',
119
+        '运营主管'
120
+      ],
121
+
50 122
     };
51 123
   },
52 124
   methods: {
125
+    onUserTypeConfirm(value, index){
126
+      this.show1 = false
127
+      for (let i = 0; i < this.user_types.length; i++){
128
+        if (this.user_types[i].name == value){
129
+          this.user_type = this.user_types[i].index
130
+          this.type_name= this.user_types[i].name
131
+
132
+        }
133
+
134
+      }
135
+
136
+    },
137
+    onUserTitleConfirm(value, index){
138
+      this.show2 = false
139
+
140
+      for (let i = 0; i < this.user_titles.length; i++){
141
+        if (this.user_titles[i].name == value){
142
+          this.user_title = this.user_titles[i].index
143
+          this.titles_name= this.user_titles[i].name
144
+
145
+        }
146
+      }
147
+
148
+
149
+    },
150
+    onCancel() {
151
+      this.show1 = false
152
+      this.show2 = false
153
+
154
+
155
+    },
53 156
     GetAdminUserInitData() {
54 157
       AdminInitData().then(response => {
55 158
         if (response.data.state === 1) {
@@ -89,7 +192,9 @@ export default {
89 192
         name: this.name,
90 193
         mobile: this.tel,
91 194
         role_ids: this.role_ids.join(","),
92
-        title: this.title
195
+        title: this.title,
196
+        user_type: this.user_type,
197
+        user_title: this.user_title
93 198
       };
94 199
       CreateAdminUser(params).then(response => {
95 200
         if (response.data.state === 1) {
@@ -112,6 +217,8 @@ export default {
112 217
   },
113 218
   created() {
114 219
     this.GetAdminUserInitData();
220
+    this.titles_name = this.user_titles_name[0]
221
+    this.type_name = this.user_type_name[0]
115 222
     this.role_ids.push(this.$route.query.id);
116 223
     setRem();
117 224
   }

+ 2 - 2
src/pages/console/managementConsole/staff_role/privilegeManagement/index.vue Ver arquivo

@@ -52,7 +52,7 @@
52 52
 
53 53
 <script>
54 54
   // import "../libs/rem.js";
55
-  import {AdminInitData} from "@/api/admin_user";
55
+  import {GetAllRole} from "@/api/admin_user";
56 56
   import {setRem} from "@/libs/functionRem";
57 57
 
58 58
   export default {
@@ -63,7 +63,7 @@
63 63
     },
64 64
     methods: {
65 65
       GetInitRoles() {
66
-        AdminInitData().then(response => {
66
+        GetAllRole().then(response => {
67 67
           if (response.data.state === 1) {
68 68
             console.log(response.data.data.roles.length)
69 69
             for (let i = 0; i < response.data.data.roles.length; i++) {

+ 43 - 3
src/pages/console/managementConsole/staff_role/staffManagement/index.vue Ver arquivo

@@ -83,15 +83,55 @@ export default {
83 83
         if (response.data.state === 1) {
84 84
           for(let i = 0; i < response.data.data.admins.length; i++){
85 85
             if(response.data.data.admins[i].status == 1){
86
-              this.admin_user.push(response.data.data.admins[i])
86
+              if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示管理员信息
87
+                  if(response.data.data.admins[i].user_id != response.data.data.org_creator){
88
+                    this.admin_user.push(response.data.data.admins[i])
89
+                  }
90
+              }else{
91
+                this.admin_user.push(response.data.data.admins[i])
92
+
93
+              }
87 94
             }else{
88
-              this.del_admin_user.push(response.data.data.admins[i])
95
+              if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示管理员信息
96
+                if(response.data.data.admins[i].user_id != response.data.data.org_creator){
97
+                  // this.admin_user.push(response.data.data.admins[i])
98
+                  this.del_admin_user.push(response.data.data.admins[i])
99
+
100
+                }
101
+              }else{
102
+                // this.admin_user.push(response.data.data.admins[i])
103
+                this.del_admin_user.push(response.data.data.admins[i])
104
+
105
+
106
+              }
107
+
108
+
109
+            }
110
+          }
111
+
112
+
113
+          for(let i = 0; i < this.admin_user.length; i++) {
114
+            if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示管理员和其他子管理信息
115
+              if(this.admin_user[i].is_sub_admin && this.admin_user[i].user_id != this.$store.getters.user.admin.id){
116
+                this.admin_user.splice(i,1)
117
+                i = i - 1;
118
+              }
119
+            }
120
+          }
121
+
122
+
123
+          for(let i = 0; i < this.del_admin_user.length; i++) {
124
+            if(response.data.data.isSubSuperAdmin){ //当前用户为子管理员,不展示管理员和其他子管理信息
125
+              if(this.del_admin_user[i].is_sub_admin && this.del_admin_user[i].user_id != this.$store.getters.user.admin.id){
126
+                this.del_admin_user.splice(i,1)
127
+                i = i - 1;
128
+              }
89 129
             }
90 130
           }
91 131
 
92 132
 
93 133
 
94
-        } else {
134
+          } else {
95 135
           this.$toast({
96 136
             message: response.data.msg
97 137
           });

+ 12 - 5
src/pages/console/managementConsole/staff_role/userManage/index.vue Ver arquivo

@@ -12,6 +12,8 @@
12 12
         v-for="(item, index) in admin_user"
13 13
         :key="index"
14 14
         v-if="admin_user.length > 0"
15
+        @click="goEditStaff(item.user_id,item.is_sub_admin)"
16
+
15 17
       >
16 18
         <img v-if="item.avatar.length > 0" :src="item.avatar" alt />
17 19
         <img
@@ -19,10 +21,10 @@
19 21
           src="../../../../../assets/images/default_avatar.jpg"
20 22
           alt
21 23
         />
22
-        <p>
24
+        <p >
23 25
           <span>{{ item.user_name }}</span>
24 26
           <i
25
-            @click="goEditStaff(item.user_id)"
27
+            v-if="!item.is_sub_admin && org_creator != item.user_id"
26 28
             class="iconfont icon-bianji bianji"
27 29
           ></i>
28 30
         </p>
@@ -39,7 +41,8 @@ export default {
39 41
   data() {
40 42
     return {
41 43
       active: 0,
42
-      admin_user: []
44
+      admin_user: [],
45
+      org_creator:0,
43 46
     };
44 47
   },
45 48
   methods: {
@@ -65,8 +68,10 @@ export default {
65 68
         }
66 69
       });
67 70
     },
68
-    goEditStaff: function(id) {
69
-      this.$router.push({ path: "/staff/editstaff?id=" + id });
71
+    goEditStaff: function(id,is_sub_admin) {
72
+      if (!is_sub_admin && org_creator != id){
73
+        this.$router.push({ path: "/staff/editstaff?id=" + id });
74
+      }
70 75
     },
71 76
     goAddStaff: function() {
72 77
       this.$router.push({ path: "/staff/addstaff" });
@@ -75,6 +80,8 @@ export default {
75 80
   created() {
76 81
     setRem();
77 82
     //获取没被禁用的用户
83
+    this.org_creator  = this.$store.getters.user.org.creator
84
+    console.log(this.org_creator)
78 85
     this.GetAllStaff();
79 86
   }
80 87
 };

+ 30 - 146
src/pages/doctorAdvice/components/DoctorManagement.vue Ver arquivo

@@ -30,17 +30,17 @@
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">
40
-            <div class="statOrder"  v-if="it.advice_type == 1 && it.parent_id == 0" >
39
+         <div v-for="(it,i) in item.child.slice(0,3)" :key="i">
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>
43
-                <span  v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
43
+                <span v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
44 44
               </div>
45 45
               <div class="orderContent" v-if="i<4">
46 46
                 <p> {{ it.advice_name }} {{ it.advice_desc
@@ -94,134 +94,12 @@
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
+
98
+            <div class="all" @click="toDoctorAdviceDetail(item.start_time)">全部</div>
103 99
           </div>
104 100
         </van-list>
105 101
       </div>
106 102
 
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 103
       <div class="noimgBox" v-show="showTwo">
226 104
         <img src="../../../assets/images/none.png" alt />
227 105
       </div>
@@ -345,7 +223,8 @@ export default {
345 223
       index: 0,
346 224
       staff: 0,
347 225
       childId: 0,
348
-      state: 0
226
+      state: 0,
227
+      list: []
349 228
     };
350 229
   },
351 230
   methods: {
@@ -353,7 +232,7 @@ export default {
353 232
       this.typeShow = false;
354 233
     },
355 234
     onConfirm(value) {
356
-      this.page = 1;
235
+      this.form.page = 1;
357 236
       this.type = value;
358 237
       this.typeShow = false;
359 238
       this.doctorAdvice = [];
@@ -365,9 +244,10 @@ export default {
365 244
         this.form.limit,
366 245
         this.form.page
367 246
       );
247
+      this.onLoad();
368 248
     },
369 249
     getstartTime(value) {
370
-      this.page = 1;
250
+      this.form.page = 1;
371 251
       let year = value.getFullYear();
372 252
       let month = value.getMonth() + 1;
373 253
       let day = value.getDate();
@@ -389,9 +269,10 @@ export default {
389 269
         this.form.page
390 270
       );
391 271
       this.startShow = false;
272
+      this.onLoad();
392 273
     },
393 274
     getstartTime2(value) {
394
-      this.page = 1;
275
+      this.form.page = 1;
395 276
       let year = value.getFullYear();
396 277
       let month = value.getMonth() + 1;
397 278
       let day = value.getDate();
@@ -414,8 +295,8 @@ export default {
414 295
         this.form.page
415 296
       );
416 297
       this.endShow = false;
298
+      this.onLoad();
417 299
     },
418
-    changeData(val) {},
419 300
     getDoctorAdvices(patientid) {
420 301
       if (this.type === "全部") {
421 302
         this.form.type = 0;
@@ -438,20 +319,25 @@ export default {
438 319
           var advice = response.data.data.advice;
439 320
           console.log("advice", advice);
440 321
           var one = response.data.data.one;
322
+          console.log("one", one);
323
+          var total = response.data.data.total;
324
+          this.total = total;
325
+          console.log("total", total);
441 326
           let dataInfo = {};
442 327
           one.forEach((item, index) => {
443
-            let { groupno } = item;
444
-            if (!dataInfo[groupno]) {
445
-              dataInfo[groupno] = {
446
-                groupno,
328
+            let { start_time } = item;
329
+            if (!dataInfo[start_time]) {
330
+              dataInfo[start_time] = {
331
+                start_time,
447 332
                 child: []
448 333
               };
449 334
             }
450 335
           });
451 336
           let list = Object.values(dataInfo);
337
+          console.log("list", list);
452 338
           list.map(item => {
453 339
             for (let i = 0; i < advice.length; i++) {
454
-              if (item.groupno === advice[i].groupno) {
340
+              if (item.start_time === advice[i].start_time) {
455 341
                 item.child.push(advice[i]);
456 342
               }
457 343
             }
@@ -463,14 +349,11 @@ export default {
463 349
             }
464 350
           }
465 351
           this.childList = objarr;
466
-          console.log("list", list);
467 352
           let arr = this.doctorAdvice;
468 353
           arr.push(...list.reverse());
354
+          console.log("arr", arr);
469 355
           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);
356
+
474 357
           this.loading = false;
475 358
         }
476 359
       });
@@ -515,8 +398,9 @@ export default {
515 398
           this.loading = false;
516 399
           this.finished = true;
517 400
         }
518
-      }, 1000);
401
+      }, 5000);
519 402
     },
403
+
520 404
     toDoctorAdviceDetail(id) {
521 405
       var patientid = this.$route.query.patientid;
522 406
       this.$router.push(

+ 34 - 44
src/pages/homeIndex/index.vue Ver arquivo

@@ -42,15 +42,7 @@
42 42
         </van-swipe-item>
43 43
       </van-swipe>
44 44
     </div>
45
-    <van-overlay :show="show" @click="show = false">
46
-      <div class="arrowBox">
47
-        <img src="../../assets/images/toparrow.png" alt />
48
-      </div>
49
-      <div class="signBox">
50
-        <p>请点击右上角“+”图标</p>
51
-        <p style="color:#1989fa">创建自己的医院/组织/团队</p>
52
-      </div>
53
-    </van-overlay>
45
+    <van-overlay :show="show" @click="show = false" />
54 46
     <!--<div class="noticeBox">-->
55 47
     <!--<i class="iconfont icon-public-notice notice"></i>-->
56 48
     <!--<div class="noticeNews">-->
@@ -73,8 +65,10 @@
73 65
     <div
74 66
       class="management"
75 67
       v-if="
76
-        this.$store.getters.user.admin.id ==
77
-          this.$store.getters.user.org.creator && this.isCreateOrg
68
+        (this.$store.getters.user.admin.id ==
69
+          this.$store.getters.user.org.creator &&
70
+          this.isCreateOrg) ||
71
+          this.isSubSuperAdmin
78 72
       "
79 73
     >
80 74
       <div class="managementTitle">
@@ -83,7 +77,8 @@
83 77
           <span>(仅管理员可见)</span>
84 78
         </div>
85 79
         <div class="setting" @click="toConsole()">
86
-          <van-icon name="setting-o" />管理
80
+          <van-icon name="setting-o" />
81
+          管理
87 82
         </div>
88 83
       </div>
89 84
       <div class="managementBox">
@@ -105,23 +100,22 @@
105 100
     <div class="management" v-if="!this.isCreateOrg">
106 101
       <div class="managementTitle">
107 102
         <div class="managementName">
108
-          管理控制台
109
-          <span>(仅管理员可见)</span>
103
+          管理控制台<span>(仅管理员可见)</span>
110 104
         </div>
111 105
         <div class="setting"><van-icon name="setting-o" />管理</div>
112 106
       </div>
113 107
       <div class="managementBox">
114 108
         <div class="managementOne" @click="toStaffManage()">
115
-          <img src="../../assets/images/M1.png" alt />员工管理
109
+          <img src="../../assets/images/M1.png" alt="" />员工管理
116 110
         </div>
117 111
         <div class="managementOne" @click="toRoleManage()">
118
-          <img src="../../assets/images/M2.png" alt />权限管理
112
+          <img src="../../assets/images/M2.png" alt="" />权限管理
119 113
         </div>
120 114
         <div class="managementOne" @click="toConfigCenter()">
121
-          <img src="../../assets/images/M3.png" alt />配置中心
115
+          <img src="../../assets/images/M3.png" alt="" />配置中心
122 116
         </div>
123 117
         <div class="managementOne" @click="toOrgSetting()">
124
-          <img src="../../assets/images/M4.png" alt />机构设置
118
+          <img src="../../assets/images/M4.png" alt="" />机构设置
125 119
         </div>
126 120
       </div>
127 121
     </div>
@@ -140,8 +134,7 @@
140 134
           "
141 135
           @click="jumpApp(item)"
142 136
         >
143
-          <img :src="item.url" alt />
144
-          {{ item.name }}
137
+          <img :src="item.url" alt />{{ item.name }}
145 138
         </div>
146 139
       </div>
147 140
     </div>
@@ -202,7 +195,7 @@ export default {
202 195
     },
203 196
     toOrgSetting() {
204 197
       if (this.isCreateOrg) {
205
-        this.$router.push("/editorg");
198
+        this.$router.push("/editorg?id=" + this.value1);
206 199
       } else {
207 200
         this.$toast({
208 201
           message: "你尚未创建机构,请先创建机构"
@@ -236,23 +229,30 @@ export default {
236 229
           this.$store.dispatch("SetConfigList", config_list);
237 230
           this.GetHomeData();
238 231
           Toast.success("切换机构成功");
232
+          // this.$toast({
233
+          //   message: "切换机构成功"
234
+          // });
239 235
         } else {
240
-          Toast.fail(response.data.msg);
236
+          Toast(response.data.msg);
241 237
         }
242 238
       });
243 239
     },
244 240
     jump(url) {
245
-      window.location.href = url;
241
+      if (url.length != 0) {
242
+        window.location.href = url;
243
+      }
246 244
     },
247 245
     jumpApp(app) {
248 246
       if (!this.isCreateOrg) {
249
-        Toast.fail("你尚未创建机构,无法使用该功能");
247
+        Toast("你尚未创建机构,请先创建机构");
250 248
         return;
251 249
       }
252 250
       if (app.open_status == 0) {
253
-        Toast.success("敬请期待");
251
+        Toast("敬请期待");
252
+
254 253
         return;
255 254
       }
255
+      console.log(app.name);
256 256
       switch (app.app_type) {
257 257
         case 6:
258 258
           this.toPatients();
@@ -262,6 +262,7 @@ export default {
262 262
           break;
263 263
         case 8:
264 264
           this.$router.push({ path: "/shop" });
265
+
265 266
           break;
266 267
         case 9:
267 268
           break;
@@ -284,12 +285,18 @@ export default {
284 285
       this.$router.push({ path: "/patients" });
285 286
     },
286 287
     toSearch() {
288
+      if (!this.isCreateOrg) {
289
+        Toast("你尚未创建机构,请先创建机构");
290
+        return;
291
+      }
287 292
       this.$router.push({ path: "/search" });
288 293
     },
289 294
     GetHomeData() {
290 295
       GetHomeData().then(response => {
291 296
         if (response.data.state === 1) {
292 297
           this.isCreateOrg = response.data.data.isCreateOrg;
298
+          this.isSubSuperAdmin = response.data.data.isSubSuperAdmin;
299
+
293 300
           if (this.isCreateOrg) {
294 301
             this.orgs = response.data.data.orgs;
295 302
             this.apps = response.data.data.apps;
@@ -303,9 +310,11 @@ export default {
303 310
               this.org_arr.push(obj);
304 311
             }
305 312
             this.value1 = this.$store.getters.user.org.id;
313
+            this.show = false;
306 314
           } else {
307 315
             this.apps = response.data.data.apps;
308 316
             this.banners = response.data.data.banners;
317
+            this.show = true;
309 318
           }
310 319
         } else {
311 320
           this.$toast({
@@ -481,25 +490,6 @@ export default {
481 490
     top: 3.125rem;
482 491
     z-index: 9;
483 492
   }
484
-  .arrowBox {
485
-    text-align: right;
486
-    img {
487
-      width: 2.5rem;
488
-      margin-right: 1.625rem;
489
-    }
490
-  }
491
-  .signBox {
492
-    width: 18.75rem;
493
-    height: 5.625rem;
494
-    margin: 0 auto;
495
-    background: #fff;
496
-    border-radius: 0.25rem;
497
-    text-align: center;
498
-    padding-top: 1.25rem;
499
-    p {
500
-      line-height: 1.5rem;
501
-    }
502
-  }
503 493
 }
504 494
 </style>
505 495
 <style lang="scss"></style>

+ 49 - 29
src/pages/my/index.vue Ver arquivo

@@ -13,22 +13,20 @@
13 13
       <div class="userMain" @click="toMyIndex">
14 14
         <div class="userBox">
15 15
           <div class="userTxt">
16
-            <span v-if="roleInfo.user_name != ''">
17
-              <p class="userName">{{ roleInfo.user_name }}</p>
18
-            </span>
19
-            <span v-if="roleInfo.user_name == ''">
20
-              <p class="userName">{{ userName.name }}</p>
21
-            </span>
16
+            <span v-if="roleInfo.user_name != ''"
17
+              ><p class="userName">{{ roleInfo.user_name }}</p></span
18
+            >
19
+            <span v-if="roleInfo.user_name == ''"
20
+              ><p class="userName">{{ userName.name }}</p></span
21
+            >
22 22
             <p class="signature">{{ roleInfo.message }}</p>
23 23
           </div>
24 24
           <van-icon name="arrow" />
25 25
         </div>
26 26
       </div>
27
-      <router-link to="/invite">
28
-        <div class="invitebox">
29
-          <img src="../../assets/images/invite.png" alt />
30
-        </div>
31
-      </router-link>
27
+      <div class="invitebox">
28
+        <img src="../../assets/images/invite.png" alt />
29
+      </div>
32 30
 
33 31
       <div class="myInfo" @click="toMyInfo">
34 32
         <div class="myInfoLeft">
@@ -62,17 +60,25 @@
62 60
         :key="index"
63 61
       >
64 62
         <div class="myInfoLeft">
65
-          <span v-if="item.org_logo == ''">
66
-            <img src="../../assets/images/m01.png" alt />
67
-          </span>
68
-          <span v-if="item.org_logo !== ''">
69
-            <img :src="item.org_logo" />
70
-          </span>
63
+          <span v-if="item.org_logo == ''"
64
+            ><img src="../../assets/images/m01.png" alt
65
+          /></span>
66
+          <span v-if="item.org_logo !== ''"><img :src="item.org_logo"/></span>
71 67
           <p>{{ item.org_name }}</p>
72 68
         </div>
73
-        <div class="myInfoRight" v-if="item.is_super_admin == 1">
74
-          <div class="myInfoRightBtn" @click="toEditOrg()">管理</div>
75
-          <van-icon class="arrow" name="arrow" @click="toManage" />
69
+        <div class="myInfoRight">
70
+          <div
71
+            v-if="item.creator == $store.getters.user.org.creator"
72
+            class="myInfoRightBtn"
73
+            @click="toEditOrg(item.id)"
74
+          >
75
+            管理
76
+          </div>
77
+          <van-icon
78
+            class="arrow"
79
+            name="arrow"
80
+            @click="toManage(item.creator, item.id)"
81
+          />
76 82
         </div>
77 83
       </div>
78 84
     </div>
@@ -144,6 +150,7 @@ import {
144 150
   getMyInforName
145 151
 } from "@/api/patient/patient";
146 152
 import { uParseTime } from "@/utils/tools";
153
+import { GetHomeData } from "@/api/home";
147 154
 export default {
148 155
   data() {
149 156
     return {
@@ -151,15 +158,16 @@ export default {
151 158
       admin_user_id: 0,
152 159
       adminid: 0,
153 160
       organaziton: [],
154
-      userName: {}
161
+      userName: {},
162
+      creator: 0
155 163
     };
156 164
   },
157 165
   methods: {
158 166
     LoginOut() {
159
-      LoginOut().then(response => {
167
+      LoginOut(this.adminid).then(response => {
160 168
         if (response.data.state === 1) {
161 169
           var msg = response.data.data.msg;
162
-          console.log("msg是", msg);
170
+          // console.log("msg是", msg);
163 171
           this.isRouterAlive = false;
164 172
           this.$nextTick(function() {
165 173
             this.isRouterAlive = true;
@@ -168,22 +176,32 @@ export default {
168 176
         }
169 177
       });
170 178
     },
179
+    GetHomeData() {
180
+      GetHomeData().then(response => {
181
+        if (response.data.state === 1) {
182
+          var orgs = response.data.data.orgs;
183
+          // console.log("orgs", orgs);
184
+          this.organaziton = orgs;
185
+        }
186
+      });
187
+    },
171 188
     getMyInformation(id) {
172 189
       getMyInformation(id).then(response => {
173 190
         if (response.data.state === 1) {
174 191
           var roleInfo = response.data.data.roleInfo;
175
-          console.log("roleInfo", roleInfo);
192
+          // console.log("roleInfo", roleInfo);
176 193
           this.admin_user_id = roleInfo.id;
177 194
           this.adminid = roleInfo.admin_user_id;
178 195
           this.roleInfo = roleInfo;
179 196
         }
180 197
       });
181 198
     },
199
+
182 200
     getMyOrganazition(id) {
183 201
       getMyOrganazition(id).then(response => {
184 202
         if (response.data.state === 1) {
185 203
           var organaziton = response.data.data.organaziton;
186
-          this.organaziton = organaziton;
204
+          // this.organaziton = organaziton;
187 205
         }
188 206
       });
189 207
     },
@@ -206,11 +224,11 @@ export default {
206 224
     toMyInfo() {
207 225
       this.$router.push("/myInfo?id=" + this.admin_user_id);
208 226
     },
209
-    toManage() {
210
-      this.$router.push("/organizationinfo?id=" + this.adminid);
227
+    toManage(id, orgid) {
228
+      this.$router.push("/organizationinfo?id=" + id + "&orgid=" + orgid);
211 229
     },
212
-    toEditOrg() {
213
-      this.$router.push("/newMy");
230
+    toEditOrg(id) {
231
+      this.$router.push("/editorg?id=" + id);
214 232
     },
215 233
     toMyIndex() {
216 234
       this.$router.push("/myInfo?id=" + this.admin_user_id);
@@ -221,6 +239,8 @@ export default {
221 239
     this.getMyInformation(adminid);
222 240
     this.getMyOrganazition(adminid);
223 241
     this.getMyInforName(adminid);
242
+    this.GetHomeData();
243
+    this.creator = this.$store.getters.user.org.creator;
224 244
   }
225 245
 };
226 246
 </script>

+ 1 - 0
src/pages/my/modifyPassword.vue Ver arquivo

@@ -15,6 +15,7 @@
15 15
               v-model="forgetForm.phone"
16 16
               v-on:input="watchNum"
17 17
               maxlength="11"
18
+              readonly
18 19
               @input="change(forgetForm.phone)"
19 20
             ></el-input>
20 21
           </div>

+ 14 - 9
src/pages/my/organizationInfo.vue Ver arquivo

@@ -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 Ver arquivo

@@ -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 Ver arquivo

@@ -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("姓名不能为空");

+ 8 - 10
src/permission.js Ver arquivo

@@ -1,8 +1,8 @@
1
-import router from './router'
2
-import store from './store'
3
-import isLogin from '@/api/login'
1
+import router from "./router";
2
+import store from "./store";
3
+import  isLogin  from "@/api/login";
4 4
 
5
-const loginWhiteList = ['/', '/login', '/privacy', '/forgetPassword', '/userAgreement', '/nopassword', '/forget', '/register', '/setname', '/join', '/createorg'] // 登录验证白名单
5
+const loginWhiteList = ["/", "/login", "/privacy", "/forgetPassword", "/userAgreement","/nopassword","/forget","/register","/setname",'/join','/createorg']; // 登录验证白名单
6 6
 
7 7
 router.beforeEach((to, from, next) => {
8 8
   // 线上注释
@@ -10,13 +10,11 @@ router.beforeEach((to, from, next) => {
10 10
   //   return
11 11
   if (store.getters.user.admin == null) {
12 12
     if (loginWhiteList.indexOf(to.path) !== -1) {
13
-      next()
13
+      next();
14 14
     } else {
15
-      next({
16
-        path: '/'
17
-      })
15
+      next({ path: "/" });
18 16
     }
19 17
   } else {
20
-    next()
18
+    next();
21 19
   }
22
-})
20
+});

+ 27 - 1
src/router/index.js Ver arquivo

@@ -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",

+ 6 - 1
src/utils/request.js Ver arquivo

@@ -28,7 +28,12 @@ service.interceptors.response.use(
28 28
         Toast("登录超时");
29 29
         location.reload();
30 30
         return Promise.reject("error");
31
-      } else {
31
+      } else if (res.code == 20035){
32
+        Toast("你已经被管理员禁用,无法使用该系统");
33
+        location.reload();
34
+        return Promise.reject("error");
35
+
36
+      }else {
32 37
         return response;
33 38
       }
34 39
     } else {