See999 пре 4 година
родитељ
комит
8433004cb0
66 измењених фајлова са 19621 додато и 12248 уклоњено
  1. 38 0
      src/api/admin_user.js
  2. 42 20
      src/api/advice.js
  3. 43 16
      src/api/dialysis.js
  4. 12 0
      src/api/home.js
  5. 9 24
      src/api/login.js
  6. 7 3
      src/api/patient.js
  7. 201 9
      src/api/patient/patient.js
  8. 2 1
      src/kya_pages/homeIndex/index.vue
  9. 1 1
      src/pages/allCourseManagement/index.vue
  10. 184 37
      src/pages/allDoctorAdvice/index.vue
  11. 106 10
      src/pages/configureCenter/components/Bed.vue
  12. 86 7
      src/pages/configureCenter/components/Grouping.vue
  13. 111 8
      src/pages/configureCenter/components/Partition.vue
  14. 17 7
      src/pages/configureCenter/index.vue
  15. 97 10
      src/pages/configureCenter/newBed.vue
  16. 30 6
      src/pages/configureCenter/newGrouping.vue
  17. 87 8
      src/pages/configureCenter/newPartition.vue
  18. 91 14
      src/pages/console/managementConsole/staff_role/editRole/index.vue
  19. 220 27
      src/pages/console/managementConsole/staff_role/functionPurview/index.vue
  20. 273 134
      src/pages/console/managementConsole/staff_role/otherPurview/index.vue
  21. 243 27
      src/pages/console/managementConsole/staff_role/subPurview/index.vue
  22. 273 167
      src/pages/doctorAdvice/components/DoctorManagement.vue
  23. 13 13
      src/pages/doctorAdvice/components/DryWeight.vue
  24. 115 2
      src/pages/doctorAdvice/index.vue
  25. 4275 4247
      src/pages/home/createOrg/index.vue
  26. 6 6
      src/pages/home/index.vue
  27. 1 1
      src/pages/home/noPassword/index.vue
  28. 5 0
      src/pages/home/verifyToken.vue
  29. 7 1
      src/pages/homeIndex/index.vue
  30. 2 1
      src/pages/main/DialysisArea.vue
  31. 13 1
      src/pages/main/dialog/AcceptsDialog.vue
  32. 12 4
      src/pages/main/dialog/AssessmentDialog.vue
  33. 82 101
      src/pages/main/dialog/ComputerDialog.vue
  34. 5 0
      src/pages/main/dialog/DoubleDialog.vue
  35. 474 454
      src/pages/main/dialog/MonitDialog.vue
  36. 63 62
      src/pages/main/dialog/OrdersDialog.vue
  37. 2 2
      src/pages/main/dialog/OrdersDialog_olddddd.vue
  38. 17 56
      src/pages/main/dialog/PlaneDialog.vue
  39. 1733 1424
      src/pages/main/dialog/PrescriptionDialog.vue
  40. 7 0
      src/pages/main/dialog/ThorougDialog.vue
  41. 9 0
      src/pages/main/dialog/TreatmentDialog.vue
  42. 10 1
      src/pages/main/dialog/modify_order/ModifyAdviceGroup.vue
  43. 4 1
      src/pages/main/dialog/modify_order/modify_order_form.vue
  44. 2 1
      src/pages/main/dialog/new_order/AddNewOrders.vue
  45. 9 3
      src/pages/main/dialog/subMenu/dryWeightMenu.vue
  46. 1 1
      src/pages/main/dialysis/AdviceTable.vue
  47. 2 5
      src/pages/main/today/dialysisMonitoring.vue
  48. 313 270
      src/pages/main/today/dialysisPrescription.vue
  49. 80 51
      src/pages/my/index.vue
  50. 451 0
      src/pages/my/modifyPassword.vue
  51. 46 4
      src/pages/my/modifyingName.vue
  52. 27 13
      src/pages/my/myInfo.vue
  53. 12 1
      src/pages/my/organizationInfo.vue
  54. 11 1
      src/pages/my/personalSign.vue
  55. 4250 4223
      src/pages/org/index.vue
  56. 4503 0
      src/pages/patientCenter/editOrg/index.vue
  57. 71 8
      src/pages/patientManagement/components/Blood.vue
  58. 40 29
      src/pages/patientManagement/components/Member.vue
  59. 38 33
      src/pages/patientManagement/components/Slow.vue
  60. 10 5
      src/pages/patientManagement/patientManagement.vue
  61. 1 2
      src/pages/search/index.vue
  62. 1 1
      src/pages/waitingRoom/components/dialog/addMonitor.vue
  63. 480 468
      src/pages/waitingRoom/components/dialog/medicalOrder.vue
  64. 10 9
      src/permission.js
  65. 231 205
      src/router/index.js
  66. 4 2
      src/utils/request.js

+ 38 - 0
src/api/admin_user.js Прегледај датотеку

@@ -139,3 +139,41 @@ export function GetAllFunctionPurview(){
139 139
 
140 140
 
141 141
 
142
+
143
+
144
+
145
+export function EditPurview(params){
146
+  return request({
147
+    url:'/m/api/permission/post',
148
+    method:'post',
149
+    params: params,
150
+  })
151
+}
152
+
153
+
154
+
155
+
156
+export function EditFuncPurview(params){
157
+  return request({
158
+    url:'/m/api/functionpermission/post',
159
+    method:'post',
160
+    params:params,
161
+  })
162
+}
163
+
164
+
165
+export function GetFunctionRoleInfo(params){
166
+  return request({
167
+    url:'/m/api/func_role/get',
168
+    method:'get',
169
+    params:params,
170
+  })
171
+}
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+

+ 42 - 20
src/api/advice.js Прегледај датотеку

@@ -7,27 +7,31 @@ export function getAdviceConfig () {
7 7
   })
8 8
 }
9 9
 
10
-export function CreateDoctorAdvice (id, advice) {
10
+export function CreateDoctorAdvice (id, advice, mode) {
11 11
   console.log('id', id)
12 12
   return request({
13
-    url: '/m/api/advice/create?id=' + id,
13
+    url: '/m/api/advice/create?id=' + id +"&mode="+mode,
14 14
     method: 'post',
15 15
     data: advice
16 16
   })
17 17
 }
18
-export function EditDoctorAdvice (id, advice) {
18
+export function EditDoctorAdvice (id, advice,mode) {
19 19
   return request({
20
-    url: '/m/api/advice/edit?id=' + id,
20
+    url: '/m/api/advice/edit?id=' + id+"&mode="+mode,
21 21
     method: 'put',
22
-    data: advice
22
+    data: advice,
23
+    headers:{"Permission":1},
24
+
23 25
   })
24 26
 }
25 27
 
26
-export function StopDoctorAdvice (id, advice) {
28
+export function StopDoctorAdvice (id, advice,mode) {
27 29
   return request({
28
-    url: '/m/api/advice/stop?id=' + id,
30
+    url: '/m/api/advice/stop?id=' + id+"&mode="+mode,
29 31
     method: 'Post',
30
-    data: advice
32
+    data: advice,
33
+    headers:{"Permission":1},
34
+
31 35
   })
32 36
 }
33 37
 
@@ -35,7 +39,9 @@ export function ExecDoctorAdvice (params) {
35 39
   return request({
36 40
     url: '/m/api/advice/exec',
37 41
     method: 'Post',
38
-    params: params
42
+    params: params,
43
+    headers:{"Permission":1},
44
+
39 45
   })
40 46
 }
41 47
 
@@ -43,24 +49,31 @@ export function CheckDoctorAdvice (params) {
43 49
   return request({
44 50
     url: '/m/api/advice/check',
45 51
     method: 'Post',
46
-    params: params
52
+    params: params,
53
+    headers:{"Permission":1},
54
+
47 55
   })
48 56
 }
49 57
 
50 58
 export function DeleteDoctorAdvice (id) {
51 59
   return request({
52
-    url: '/m/api/advice/delete?id=' + id,
53
-    method: 'Delete'
60
+    url: '/m/api/advice/delete?id=' + id+"&mode="+mode,
61
+    method: 'Delete',
62
+    headers:{"Permission":1},
63
+
54 64
   })
55 65
 }
56 66
 
57
-export function DeleteDoctorAdviceNew (group_no, advice_id) {
67
+export function DeleteDoctorAdviceNew (group_no, advice_id,mode,is_sub) {
58 68
   return request({
59 69
     url: '/m/api/newadvice/delete',
60 70
     method: 'Delete',
71
+    headers:{"Permission":1},
61 72
     params: {
62 73
       groupno: group_no,
63
-      advice_id: advice_id
74
+      advice_id: advice_id,
75
+      mode:mode,
76
+      is_sub:is_sub,
64 77
     }
65 78
   })
66 79
 }
@@ -73,25 +86,29 @@ export function getSchedualDoctors (params) {
73 86
   })
74 87
 }
75 88
 
76
-export function batchCreateAdvices (patient_id, group_no, data) {
89
+export function batchCreateAdvices (patient_id, group_no, data,mode) {
77 90
   return request({
78 91
     url: '/m/api/advice/creategroup',
79 92
     method: 'post',
93
+    headers:{"Permission":1},
80 94
     params: {
81 95
       id: patient_id,
82
-      group_no: group_no
96
+      group_no: group_no,
97
+      mode:mode,
83 98
     },
84 99
     data: data
85 100
   })
86 101
 }
87 102
 
88
-export function modifyAdviceGroupStartTime (group_no, start_time_str) {
103
+export function modifyAdviceGroupStartTime (group_no, start_time_str,mode) {
89 104
   return request({
90 105
     url: '/m/api/advice/group/modify_starttime',
91 106
     method: 'post',
107
+    headers:{"Permission":1},
92 108
     params: {
93 109
       group_no: group_no,
94
-      start_time: start_time_str
110
+      start_time: start_time_str,
111
+      mode:mode,
95 112
     }
96 113
   })
97 114
 }
@@ -100,6 +117,7 @@ export function ExecSingleDoctorAdvice (params) {
100 117
   return request({
101 118
     url: '/m/api/advice/exec/single',
102 119
     method: 'Post',
120
+    headers:{"Permission":1},
103 121
     params: params
104 122
   })
105 123
 }
@@ -107,7 +125,9 @@ export function ExecSingleDoctorAdvice (params) {
107 125
 export function DeleteSubDoctorAdvice (params) {
108 126
   return request({
109 127
     url: '/m/api/delete/subadvice?advice_id=' + params,
110
-    method: 'Delete'
128
+    method: 'Delete',
129
+    headers:{"Permission":1},
130
+
111 131
   })
112 132
 }
113 133
 
@@ -122,7 +142,9 @@ export function ModifyExecDoctorAdvice (params) {
122 142
   return request({
123 143
     url: '/m/api/advice/exec/modify',
124 144
     method: 'Post',
125
-    params: params
145
+    params: params,
146
+    headers:{"Permission":1},
147
+
126 148
   })
127 149
 }
128 150
 

+ 43 - 16
src/api/dialysis.js Прегледај датотеку

@@ -35,7 +35,9 @@ export function commitTreatmentSummary(params) {
35 35
   return request({
36 36
     url: '/m/api/dialysis/treatmentSummary',
37 37
     method: 'post',
38
-    params: params
38
+    params: params,
39
+    headers:{"Permission":1},
40
+
39 41
 
40 42
   })
41 43
 }
@@ -44,8 +46,8 @@ export function commitDoubleCheck(params) {
44 46
   return request({
45 47
     url: '/m/api/dialysis/doublecheck',
46 48
     method: 'post',
47
-    params: params
48
-
49
+    params: params,
50
+    headers:{"Permission":1},
49 51
   })
50 52
 }
51 53
 
@@ -53,7 +55,9 @@ export function commitAcceptsAssessment(params) {
53 55
   return request({
54 56
     url: '/m/api/dialysis/acceptsAssessment',
55 57
     method: 'post',
56
-    params: params
58
+    params: params,
59
+    headers:{"Permission":1},
60
+
57 61
 
58 62
   })
59 63
 }
@@ -62,7 +66,9 @@ export function finish(params) {
62 66
   return request({
63 67
     url: '/m/api/dialysis/finish',
64 68
     method: 'post',
65
-    params: params
69
+    params: params,
70
+    headers:{"Permission":1},
71
+
66 72
   })
67 73
 }
68 74
 
@@ -71,7 +77,9 @@ export function commitDialysisPrescription(params) {
71 77
   return request({
72 78
     url: '/m/api/dialysis/dialysisPrescription',
73 79
     method: 'post',
74
-    params: params
80
+    params: params,
81
+    headers:{"Permission":1},
82
+
75 83
   })
76 84
 }
77 85
 
@@ -79,7 +87,9 @@ export function commitAssessmentAfterDislysis(params) {
79 87
   return request({
80 88
     url: '/m/api/dialysis/assessmentAfterDislysis',
81 89
     method: 'post',
82
-    params: params
90
+    params: params,
91
+    headers:{"Permission":1},
92
+
83 93
   })
84 94
 }
85 95
 
@@ -87,7 +97,9 @@ export function addMonitorRecord(params) {
87 97
   return request({
88 98
     url: '/m/api/monitor/add',
89 99
     method: 'post',
90
-    params: params
100
+    params: params,
101
+    headers:{"Permission":1},
102
+
91 103
   })
92 104
 }
93 105
 
@@ -96,7 +108,9 @@ export function editMonitorRecord(params) {
96 108
   return request({
97 109
     url: '/m/api/monitor/edit',
98 110
     method: 'post',
99
-    params: params
111
+    params: params,
112
+    headers:{"Permission":1},
113
+
100 114
   })
101 115
 }
102 116
 
@@ -104,7 +118,9 @@ export function deleteMonitorRecord(params) {
104 118
   return request({
105 119
     url: '/m/api/monitor/delete',
106 120
     method: 'post',
107
-    params: params
121
+    params: params,
122
+    headers:{"Permission":1},
123
+
108 124
   })
109 125
 }
110 126
 
@@ -128,7 +144,10 @@ export function postSolution(params) {
128 144
   return request({
129 145
     url: '/m/api/solution',
130 146
     method: 'post',
131
-    params: params
147
+    params: params,
148
+    headers:{"Permission":1},
149
+
150
+
132 151
   })
133 152
 }
134 153
 
@@ -136,7 +155,9 @@ export function startDialysis(params) {
136 155
   return request({
137 156
     url: '/m/api/dialysis/start',
138 157
     method: 'post',
139
-    params: params
158
+    params: params,
159
+    headers:{"Permission":1},
160
+
140 161
   })
141 162
 }
142 163
 
@@ -209,7 +230,9 @@ export function PostModifyStartDialysis(params) {
209 230
   return request({
210 231
     url: '/m/api/startOrder/edit',
211 232
     method: 'post',
212
-    params: params
233
+    params: params,
234
+    headers:{"Permission":1},
235
+
213 236
   })
214 237
 }
215 238
 
@@ -217,7 +240,9 @@ export function PostModifyEndDialysis(params) {
217 240
   return request({
218 241
     url: '/m/api/finishOrder/edit',
219 242
     method: 'post',
220
-    params: params
243
+    params: params,
244
+    headers:{"Permission":1},
245
+
221 246
   })
222 247
 }
223 248
 
@@ -225,7 +250,7 @@ export function CreateGroupAdvice(id, groupno, advices) {
225 250
   return request({
226 251
     url: '/m/api/advice_remind/create?id=' + id + '&groupno=' + groupno,
227 252
     method: 'post',
228
-    data: advices
253
+    data: advices,
229 254
   })
230 255
 }
231 256
 
@@ -233,7 +258,9 @@ export function CreateDryWeight(params) {
233 258
   return request({
234 259
     url: '/m/api/dryweight/commit',
235 260
     method: 'post',
236
-    params: params
261
+    params: params,
262
+    headers:{"Permission":1},
263
+
237 264
   })
238 265
 }
239 266
 

+ 12 - 0
src/api/home.js Прегледај датотеку

@@ -28,4 +28,16 @@ export function createOrg(params) {
28 28
 }
29 29
 
30 30
 
31
+export function modifyPassword(params) {
32
+  return request({
33
+    url: '/m/api/modifypsw',
34
+    method: 'post',
35
+    params:params,
36
+  })
37
+}
38
+
39
+
40
+
41
+
42
+
31 43
 

+ 9 - 24
src/api/login.js Прегледај датотеку

@@ -15,53 +15,46 @@ export function loginByPwd(mobile, password) {
15 15
 export function isLogin() {
16 16
   return request({
17 17
     url: '/m/api/islogin',
18
-    method: 'get',
18
+    method: 'get'
19 19
   })
20 20
 }
21 21
 
22
-
23
-
24 22
 export function getCodeInit() {
25 23
   return request({
26 24
     url: '/m/api/code',
27
-    method: 'get',
25
+    method: 'get'
28 26
   })
29 27
 }
30 28
 
31
-
32 29
 export function getVerifyCode(params) {
33 30
   return request({
34 31
     url: '/m/api/getcode',
35 32
     method: 'get',
36
-    params:params,
33
+    params: params
37 34
   })
38 35
 }
39 36
 
40
-
41 37
 export function loginByCode(params) {
42 38
   return request({
43 39
     url: '/m/api/login/cs',
44 40
     method: 'post',
45
-    params:params,
41
+    params: params
46 42
   })
47 43
 }
48 44
 
49
-
50
-
51 45
 export function forgetPassWord(params) {
52 46
   return request({
53 47
     url: '/m/api/password/commit',
54 48
     method: 'post',
55
-    params:params,
49
+    params: params
56 50
   })
57 51
 }
58 52
 
59
-
60 53
 export function register(params) {
61 54
   return request({
62 55
     url: '/m/api/register/commit',
63 56
     method: 'post',
64
-    params:params,
57
+    params: params
65 58
   })
66 59
 }
67 60
 
@@ -69,29 +62,21 @@ export function setName(params) {
69 62
   return request({
70 63
     url: '/m/api/register/setname',
71 64
     method: 'post',
72
-    params:params,
65
+    params: params
73 66
   })
74 67
 }
75 68
 
76
-
77
-
78
-
79 69
 export function login() {
80 70
   return request({
81 71
     url: '/m/api/register/login',
82
-    method: 'post',
72
+    method: 'post'
83 73
   })
84 74
 }
85 75
 
86
-
87
-
88
-
89
-
90
-
91 76
 export function createOrg(params) {
92 77
   return request({
93 78
     url: '/m/api/org/create',
94 79
     method: 'post',
95
-    params:params,
80
+    params: params
96 81
   })
97 82
 }

+ 7 - 3
src/api/patient.js Прегледај датотеку

@@ -15,11 +15,15 @@ export function EditDialysisSolution(id, solution) {
15 15
   })
16 16
 }
17 17
 
18
-export function EditAssessmentBeforeDislysis(id, assessment_date, before) {
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,
20
+    url: '/m/api/assessmentbefore/commit?patient=' + id + '&assessment_date=' + assessment_date+"&mode="+mode,
21 21
     method: 'post',
22
-    data: before
22
+    data: before,
23
+    headers:{"Permission":1},
24
+
25
+
26
+
23 27
   })
24 28
 }
25 29
 export function GetPatientInfoWithDiseases(id) {

+ 201 - 9
src/api/patient/patient.js Прегледај датотеку

@@ -12,11 +12,14 @@ export function getBloodDialysisPatient(page, limit) {
12 12
   })
13 13
 }
14 14
 
15
-export function getAllBloodDialysisPatient(page, limit) {
15
+export function getAllBloodDialysisPatient(page, limit, status, source) {
16 16
   const params = {
17 17
     page: page,
18
-    limit: limit
18
+    limit: limit,
19
+    patientstatus: status,
20
+    source: source
19 21
   }
22
+
20 23
   return request({
21 24
     url: '/m/api/patient/getallblooddialysispatient',
22 25
     method: 'get',
@@ -123,9 +126,6 @@ export function getDryWeight(id, startime, endtime, limit, page) {
123 126
 }
124 127
 
125 128
 export function getBloodDialysisPatientTwo(page, limit) {
126
-  console.log('数据出发了没有')
127
-  console.log('page', page)
128
-  console.log('limit', limit)
129 129
   const params = {
130 130
     page: page,
131 131
     limit: limit
@@ -496,9 +496,9 @@ export function getInspection(id, limit, page, startime, endtime, projectid) {
496 496
   })
497 497
 }
498 498
 
499
-export function getMyInformation(params) {
499
+export function getMyInformation(id, params) {
500 500
   return request({
501
-    url: '/m/api/patient/getmyinformation',
501
+    url: '/m/api/patient/getmyinformation?id=' + id,
502 502
     method: 'get',
503 503
     params: params
504 504
   })
@@ -513,7 +513,6 @@ export function getPatientName(id, params) {
513 513
 }
514 514
 
515 515
 export function getInspectionDetail(patientid, date, projectid) {
516
-  console.log('projectid', projectid)
517 516
   const params = {
518 517
     patientid: patientid,
519 518
     date: date,
@@ -527,7 +526,6 @@ export function getInspectionDetail(patientid, date, projectid) {
527 526
 }
528 527
 
529 528
 export function submitFeed(params) {
530
-  console.log('params', params)
531 529
   return request({
532 530
     url: '/m/api/patient/savefeed',
533 531
     method: 'get',
@@ -601,3 +599,197 @@ export function getRoleName(id, params) {
601 599
     params: params
602 600
   })
603 601
 }
602
+
603
+export function SavePartition(params) {
604
+  return request({
605
+    url: '/m/api/patient/savepartition',
606
+    method: 'get',
607
+    params: params
608
+  })
609
+}
610
+
611
+export function GetAllZone(page, limit) {
612
+  const params = {
613
+    page: page,
614
+    limit: limit
615
+  }
616
+  return request({
617
+    url: '/m/api/patient/getallzone',
618
+    method: 'get',
619
+    params: params
620
+  })
621
+}
622
+
623
+export function DeleteZone(id, params) {
624
+  return request({
625
+    url: '/m/api/patient/deletezone?id=' + id,
626
+    method: 'delete',
627
+    params: params
628
+  })
629
+}
630
+
631
+export function saveGroup(params) {
632
+  return request({
633
+    url: '/m/api/patient/savegroup',
634
+    method: 'get',
635
+    params: params
636
+  })
637
+}
638
+
639
+export function getAllGroup(page, limit) {
640
+  const params = {
641
+    page: page,
642
+    limit: limit
643
+  }
644
+  return request({
645
+    url: '/m/api/patient/getallgroup',
646
+    method: 'get',
647
+    params: params
648
+  })
649
+}
650
+
651
+export function DeleteGroup(id, params) {
652
+  return request({
653
+    url: '/m/api/patient/deletegroup?id=' + id,
654
+    method: 'delete',
655
+    params: params
656
+  })
657
+}
658
+
659
+export function getAllGroupOne(params) {
660
+  return request({
661
+    url: '/m/api/patient/getallgroupone',
662
+    method: 'get',
663
+    params: params
664
+  })
665
+}
666
+
667
+export function SaveBed(params) {
668
+  return request({
669
+    url: '/m/api/patient/savebed',
670
+    method: 'get',
671
+    params: params
672
+  })
673
+}
674
+
675
+export function GetAllNumber(page, limit) {
676
+  const params = {
677
+    page: page,
678
+    limit: limit
679
+  }
680
+  return request({
681
+    url: '/m/api/patient/getallnumber',
682
+    method: 'get',
683
+    params: params
684
+  })
685
+}
686
+
687
+export function DeleteBed(id, params) {
688
+  return request({
689
+    url: '/m/api/patient/deletebed?id=' + id,
690
+    method: 'delete',
691
+    params: params
692
+  })
693
+}
694
+
695
+export function LoginOut(params) {
696
+  return request({
697
+    url: '/m/api/patient/loginout',
698
+    method: 'get',
699
+    params: params
700
+  })
701
+}
702
+
703
+export function getMemberPatient(params) {
704
+  return request({
705
+    url: '/m/api/patient/getmemberpatient',
706
+    method: 'get',
707
+    params: params
708
+  })
709
+}
710
+
711
+export function getSlowPatient(params) {
712
+  return request({
713
+    url: '/m/api/patient/getslowpatient',
714
+    method: 'get',
715
+    params: params
716
+  })
717
+}
718
+
719
+export function getBloodPatient(params) {
720
+  return request({
721
+    url: '/m/api/patient/getbloodpatient',
722
+    method: 'get',
723
+    params: params
724
+  })
725
+}
726
+
727
+export function DeletePatient(id, params) {
728
+  console.log('医嘱id', id)
729
+  return request({
730
+    url: '/m/api/patient/deletePatient?id=' + id,
731
+    method: 'delete',
732
+    params: params
733
+  })
734
+}
735
+
736
+export function saveName(id, name) {
737
+  const params = {
738
+    id: id,
739
+    name: name
740
+  }
741
+  console.log('params', params)
742
+  return request({
743
+    url: '/m/api/patient/savename',
744
+    method: 'get',
745
+    params: params
746
+  })
747
+}
748
+
749
+export function getAllOrganization(id, params) {
750
+  return request({
751
+    url: '/m/api/patient/getallorganization?id=' + id,
752
+    method: 'get',
753
+    params: params
754
+  })
755
+}
756
+
757
+export function getMyOrganazition(id, params) {
758
+  return request({
759
+    url: '/m/api/patient/getmyorganazition?id=' + id,
760
+    method: 'get',
761
+    params: params
762
+  })
763
+}
764
+
765
+export function getOrgInformation(params) {
766
+  return request({
767
+    url: '/m/api/org/getorginformation',
768
+    method: 'get',
769
+    params: params
770
+  })
771
+}
772
+
773
+export function getAllOrgType(params) {
774
+  return request({
775
+    url: '/m/api/patient/getallorgtype',
776
+    method: 'get',
777
+    params: params
778
+  })
779
+}
780
+
781
+export function updateOrg(params, id) {
782
+  return request({
783
+    url: '/m/api/patient/editorg?id=' + id,
784
+    method: 'get',
785
+    params: params
786
+  })
787
+}
788
+
789
+export function getMyInforName(id, params) {
790
+  return request({
791
+    url: '/m/api/patient/getmyinforname?id=' + id,
792
+    method: 'get',
793
+    params: params
794
+  })
795
+}

+ 2 - 1
src/kya_pages/homeIndex/index.vue Прегледај датотеку

@@ -258,4 +258,5 @@ export default {
258 258
   }
259 259
 }
260 260
 </style>
261
-<style lang="scss"></style>
261
+<style lang="scss">
262
+</style>

+ 1 - 1
src/pages/allCourseManagement/index.vue Прегледај датотеку

@@ -2,7 +2,7 @@
2 2
   <div class="page_allCourse">
3 3
     <van-sticky>
4 4
       <div class="allCourseTitle">
5
-        <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+        <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
6 6
         <span class="titleName">{{ couseDetail.name }}的病程记录</span>
7 7
       </div>
8 8
     </van-sticky>

+ 184 - 37
src/pages/allDoctorAdvice/index.vue Прегледај датотеку

@@ -13,9 +13,9 @@
13 13
         :key="index"
14 14
       >
15 15
         <div v-for="(it, i) in item.child" :key="i">
16
-          <p class="time">
17
-            {{ it.advice_date ? getTime(it.advice_date) : "" }}
18
-          </p>
16
+            <p class="time">
17
+              {{ it.advice_date ? getTime(it.advice_date) : "" }}
18
+            </p>
19 19
           <div class="statOrder">
20 20
             <div v-if="it.advice_type == 1 && it.parent_id == 0">
21 21
               <div class="statOrderTitle">
@@ -25,22 +25,36 @@
25 25
                 </span>
26 26
               </div>
27 27
               <div class="orderContent">
28
-                <p v-if="it.parent_id === 0">
29
-                  {{ it.advice_name }} {{ it.advice_desc
30
-                  }}{{ it.drug_spec_unit }} {{ it.prescribing_number
31
-                  }}{{ it.prescribing_number_unit }} {{ it.single_dose
32
-                  }}{{ it.single_dose_unit }} {{ it.delivery_way }}
33
-                  {{ it.execution_frequency }}
34
-                </p>
35
-                <div v-for="(i, index) in childList" :key="index">
36
-                  <p v-if="i.parent_id == it.id">
37
-                    ▲ {{ i.advice_name }} {{ i.advice_desc
38
-                    }}{{ i.drug_spec_unit }} {{ i.prescribing_number
39
-                    }}{{ i.prescribing_number_unit }} {{ i.single_dose
40
-                    }}{{ i.single_dose_unit }}
41
-                    {{ i.delivery_way }}
42
-                    {{ i.execution_frequency }}
28
+                <div style="display:flex;justify-content:space-between">
29
+                  <p v-if="it.parent_id === 0">
30
+                    {{ it.advice_name }} {{ it.advice_desc
31
+                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number
32
+                    }}{{ it.prescribing_number_unit }} {{ it.single_dose
33
+                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}
34
+                    {{ it.execution_frequency }}
43 35
                   </p>
36
+                   <van-icon
37
+                  class="ellipsis"
38
+                  name="ellipsis"
39
+                  @click="toDelete(it.id,it.execution_state,i)"
40
+                />
41
+                </div>
42
+                <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">
44
+                    <p>
45
+                      ▲ {{ i.advice_name }} {{ i.advice_desc
46
+                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number
47
+                      }}{{ i.prescribing_number_unit }} {{ i.single_dose
48
+                      }}{{ i.single_dose_unit }}
49
+                      {{ i.delivery_way }}
50
+                      {{ i.execution_frequency }}
51
+                    </p>
52
+                       <van-icon
53
+                        class="ellipsis"
54
+                        name="ellipsis"
55
+                        @click="Delete(i.id,i.execution_state,index)"
56
+                       />
57
+                  </div>
44 58
                 </div>
45 59
               </div>
46 60
               <div
@@ -64,23 +78,36 @@
64 78
                 </span>
65 79
               </div>
66 80
               <div class="orderContent">
67
-                <p>
68
-                  {{ it.advice_name }} {{ it.advice_desc
69
-                  }}{{ it.drug_spec_unit }} {{ it.prescribing_number
70
-                  }}{{ it.prescribing_number_unit }} {{ it.single_dose
71
-                  }}{{ it.single_dose_unit }} {{ it.delivery_way }}
72
-                  {{ it.execution_frequency }}
73
-                </p>
74
-
81
+                <div style="display:flex;justify-content:space-between">
82
+                    <p>
83
+                      {{ it.advice_name }} {{ it.advice_desc
84
+                      }}{{ it.drug_spec_unit }} {{ it.prescribing_number
85
+                      }}{{ it.prescribing_number_unit }} {{ it.single_dose
86
+                      }}{{ it.single_dose_unit }} {{ it.delivery_way }}
87
+                      {{ it.execution_frequency }}
88
+                    </p>
89
+                      <van-icon
90
+                        class="ellipsis"
91
+                        name="ellipsis"
92
+                        @click="newShowTwo=true"
93
+                       />
94
+                 </div>
75 95
                 <div v-for="(i, index) in childList" :key="index">
76
-                  <p v-if="i.parent_id == it.id">
77
-                    ▲ {{ i.advice_name }} {{ i.advice_desc
78
-                    }}{{ i.drug_spec_unit }} {{ i.prescribing_number
79
-                    }}{{ i.prescribing_number_unit }} {{ i.single_dose
80
-                    }}{{ i.single_dose_unit }}
81
-                    {{ i.delivery_way }}
82
-                    {{ i.execution_frequency }}
83
-                  </p>
96
+                  <div style="display:flex;justify-content:space-between">
97
+                    <p v-if="i.parent_id == it.id">
98
+                      ▲ {{ i.advice_name }} {{ i.advice_desc
99
+                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number
100
+                      }}{{ i.prescribing_number_unit }} {{ i.single_dose
101
+                      }}{{ i.single_dose_unit }}
102
+                      {{ i.delivery_way }}
103
+                      {{ i.execution_frequency }}
104
+                    </p>
105
+                     <van-icon
106
+                        class="ellipsis"
107
+                        name="ellipsis"
108
+                        @click="newShowThree=true"
109
+                       />
110
+                  </div>
84 111
                 </div>
85 112
               </div>
86 113
               <div
@@ -95,12 +122,49 @@
95 122
           </div>
96 123
         </div>
97 124
       </div>
125
+
126
+        <van-action-sheet
127
+          v-model="newShow"
128
+          :actions="actions1"
129
+          cancel-text="取消"
130
+          @cancel="onCancel"
131
+          @select="onSelect"
132
+        />
133
+
134
+         <van-action-sheet
135
+          v-model="newShowOne"
136
+          :actions="actions2"
137
+          cancel-text="取消"
138
+          @cancel="onCancelOne"
139
+          @select="onSelectOne"
140
+        />
141
+
142
+          <van-action-sheet
143
+          v-model="newShowTwo"
144
+          :actions="actions3"
145
+          cancel-text="取消"
146
+          @cancel="onCancelTwo"
147
+          @select="onSelectTwo"
148
+        />
149
+         <van-action-sheet
150
+          v-model="newShowThree"
151
+          :actions="actions3"
152
+          cancel-text="取消"
153
+          @cancel="onCancelThree"
154
+          @select="onSelectThree"
155
+        />
98 156
     </div>
99 157
   </div>
100 158
 </template>
101 159
 <script>
102 160
 import { setRem, setHeight } from "@/libs/functionRem";
103
-import { GetDoctorAdviceDetail, getAllDoctor } from "@/api/patient/patient";
161
+import {
162
+  GetDoctorAdviceDetail,
163
+  getAllDoctor,
164
+  DeleteChild,
165
+  DeletePatient
166
+} from "@/api/patient/patient";
167
+import { Dialog } from "vant";
104 168
 import { uParseTime } from "@/utils/tools";
105 169
 export default {
106 170
   data() {
@@ -112,7 +176,17 @@ export default {
112 176
       patient_name: "",
113 177
       patient_date: "",
114 178
       parentData: {},
115
-      doctor: []
179
+      doctor: [],
180
+      newShow: false,
181
+      actions1: [{ name: "删除" }],
182
+      actions2: [{ name: "删除" }],
183
+      actions3: [{ name: "删除" }],
184
+      newShowOne: false,
185
+      newShowTwo: false,
186
+      newShowThree: false,
187
+      id: 0,
188
+      index: 0,
189
+      state: 0
116 190
     };
117 191
   },
118 192
   methods: {
@@ -200,12 +274,85 @@ export default {
200 274
       });
201 275
     },
202 276
     getDoctor(id) {
203
-      console.log("id是", id);
204 277
       for (let i = 0; i < this.doctor.length; i++) {
205 278
         if ((this.doctor[i].admin_user_id = id)) {
206 279
           return this.doctor[i].user_name;
207 280
         }
208 281
       }
282
+    },
283
+    toDelete(id, state, index) {
284
+      console.log("id", id);
285
+      console.log("state", state);
286
+      this.id = id;
287
+      this.state = state;
288
+      this.index = index;
289
+      this.newShow = true;
290
+    },
291
+    Delete(id, state, index) {
292
+      console.log("id", id);
293
+      console.log("state", state);
294
+      this.id = id;
295
+      this.state = state;
296
+      this.index = index;
297
+      this.newShowOne = true;
298
+    },
299
+
300
+    onCancel() {
301
+      this.newShow = false;
302
+    },
303
+    onSelect(val) {
304
+      if (val.name === "删除") {
305
+        this.DeletePatient(this.id, this.state, this.index);
306
+      }
307
+    },
308
+    onCancelOne() {
309
+      this.newShowOne = false;
310
+    },
311
+    onSelectOne(val) {
312
+      if (val.name === "删除") {
313
+        this.DeleteChild(this.id, this.index, this.state);
314
+      }
315
+    },
316
+    onSelectTwo() {},
317
+    onCancelTwo() {},
318
+    onCancelThree() {},
319
+    onSelectThree() {},
320
+    DeletePatient(id, index, state) {
321
+      if (state == 1) {
322
+        this.$toast("医嘱已执行,无法删除");
323
+        return false;
324
+      }
325
+      Dialog.confirm({
326
+        title: "删除提示!",
327
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
328
+      }).then(() => {
329
+        DeletePatient(id).then(response => {
330
+          if (response.data.state === 1) {
331
+            var msg = response.data.data.msg;
332
+            this.GetDoctorAdviceDetail(this.id);
333
+            this.newShow = false;
334
+          }
335
+        });
336
+      });
337
+    },
338
+    DeleteChild(id, index, state) {
339
+      if (state == 1) {
340
+        this.$toast("医嘱已执行,无法删除");
341
+        return false;
342
+      }
343
+      Dialog.confirm({
344
+        title: "删除提示!",
345
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
346
+      }).then(() => {
347
+        DeleteChild(id).then(response => {
348
+          if (response.data.state === 1) {
349
+            var msg = response.data.data.msg;
350
+
351
+            this.childList.splice(index, 1);
352
+            this.newShowOne = false;
353
+          }
354
+        });
355
+      });
209 356
     }
210 357
   },
211 358
   created() {

+ 106 - 10
src/pages/configureCenter/components/Bed.vue Прегледај датотеку

@@ -2,22 +2,23 @@
2 2
   <div class="Bed">
3 3
     <van-list
4 4
       v-model="loading"
5
+      @load="onLoad"
5 6
       :finished="finished"
6 7
       finished-text="没有更多了"
7
-      @load="onLoad"
8
+      :immediate-check='show'
8 9
     >
9
-      <div class="BedOne">
10
+      <div class="BedOne" v-for="(item,index) in BedNumber" :key="index">
10 11
         <div class="BedLeft">
11
-          <p>分区名称:A区</p>
12
-          <p>分区类型:普通区</p>
13
-          <p>所属分组:护理1组</p>
12
+          <p>床位号:{{item.number}}</p>
13
+          <p>分区类型:{{getZone(item.zone_id)}}</p>
14
+          <p>所属分组:{{getGroup(item.group_id)}}</p>
14 15
         </div>
15
-        <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
16
+        <van-icon class="ellipsis" name="ellipsis" @click="Delete(item.id,index)" />
16 17
       </div>
17 18
     </van-list>
18 19
     <div class="add">
19 20
       <div style="display: flex;align-items: center;">
20
-        <van-icon class="addIcon" name="add" />新增
21
+        <van-icon class="addIcon" name="add" @click="addBed" />新增
21 22
       </div>
22 23
     </div>
23 24
     <van-action-sheet
@@ -25,29 +26,124 @@
25 26
       :actions="actions"
26 27
       cancel-text="取消"
27 28
       @cancel="onCancel"
29
+      @select="toDeleteBed"
28 30
     />
29 31
   </div>
30 32
 </template>
31 33
 
32 34
 <script>
35
+import { GetAllNumber, DeleteBed } from "@/api/patient/patient";
36
+import { Dialog } from "vant";
33 37
 export default {
38
+  props: {
39
+    active: Number
40
+  },
34 41
   data() {
35 42
     return {
36 43
       loading: false,
37 44
       finished: false,
38 45
       newShow: false,
39
-      actions: [{ name: "编辑" }, { name: "删除" }]
46
+      show: false,
47
+      actions: [{ name: "删除" }],
48
+      page: 1,
49
+      limit: 10,
50
+      total: 0,
51
+      BedNumber: [],
52
+      Zone: [],
53
+      Group: [],
54
+      id: 0,
55
+      index: 0
40 56
     };
41 57
   },
42 58
   methods: {
43
-    onLoad() {},
44
-    onCancel() {}
59
+    onCancel() {},
60
+    addBed() {
61
+      this.$router.push("/addbed?active=" + this.active);
62
+    },
63
+    GetAllNumber() {
64
+      GetAllNumber(this.page, this.limit).then(response => {
65
+        if (response.data.state === 1) {
66
+          var number = response.data.data.number;
67
+          console.log("number", number);
68
+          let arr = this.BedNumber;
69
+          arr.push(...number);
70
+          this.BedNumber = arr;
71
+          var total = response.data.data.total;
72
+          console.log("total", total);
73
+          this.total = total;
74
+          var zone = response.data.data.zone;
75
+          this.Zone = zone;
76
+          var group = response.data.data.group;
77
+          this.Group = group;
78
+          this.loading = false;
79
+        }
80
+      });
81
+    },
82
+    onLoad() {
83
+      setTimeout(() => {
84
+        this.page++;
85
+        if (this.page <= Math.ceil(this.total / 10)) {
86
+          this.GetAllNumber(this.page, this.limit);
87
+        } else {
88
+          this.loading = false;
89
+          this.finished = true;
90
+        }
91
+      }, 1000);
92
+    },
93
+    getZone(id) {
94
+      for (let i = 0; i < this.Zone.length; i++) {
95
+        if (id === this.Zone[i].id) {
96
+          return this.Zone[i].name;
97
+        }
98
+      }
99
+    },
100
+    getGroup(id) {
101
+      for (let i = 0; i < this.Group.length; i++) {
102
+        if (id === this.Group[i].id) {
103
+          return this.Group[i].name;
104
+        }
105
+      }
106
+    },
107
+
108
+    Delete(id, index) {
109
+      this.newShow = true;
110
+      this.id = id;
111
+      this.index = index;
112
+    },
113
+    toDeleteBed(val) {
114
+      if (val.name === "删除") {
115
+        this.DeleteBed(this.id, this.index);
116
+      }
117
+    },
118
+    onCancel() {
119
+      this.newShow = false;
120
+    },
121
+    DeleteBed(id, index) {
122
+      Dialog.confirm({
123
+        title: "删除提示!",
124
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
125
+      }).then(() => {
126
+        DeleteBed(id).then(response => {
127
+          if (response.data.state === 1) {
128
+            var msg = response.data.data.msg;
129
+            console.log("msg", msg);
130
+            this.BedNumber.splice(index, 1);
131
+            this.newShow = false;
132
+          }
133
+        });
134
+      });
135
+    }
136
+  },
137
+  created() {
138
+    console.log("active", this.active);
139
+    this.GetAllNumber();
45 140
   }
46 141
 };
47 142
 </script>
48 143
 
49 144
 <style lang="scss" scoped>
50 145
 .Bed {
146
+  margin-bottom: 3.125rem;
51 147
   .BedOne {
52 148
     padding: 1.375rem 1.125rem 0 1.5rem;
53 149
     display: flex;

+ 86 - 7
src/pages/configureCenter/components/Grouping.vue Прегледај датотеку

@@ -6,16 +6,16 @@
6 6
       finished-text="没有更多了"
7 7
       @load="onLoad"
8 8
     >
9
-      <div class="GroupingOne">
9
+      <div class="GroupingOne" v-for="(item,index) in this.group" :key="index">
10 10
         <div class="GroupingLeft">
11
-          <p>分组名称:护理1组</p>
11
+          <p>分组名称:{{item.name}}</p>
12 12
         </div>
13
-        <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
13
+        <van-icon class="ellipsis" name="ellipsis" @click="Delete(item.id,item.number,index)" />
14 14
       </div>
15 15
     </van-list>
16 16
     <div class="add">
17 17
       <div style="display: flex;align-items: center;">
18
-        <van-icon class="addIcon" name="add" />新增
18
+        <van-icon class="addIcon" name="add" @click="addGrouping" />新增
19 19
       </div>
20 20
     </div>
21 21
     <van-action-sheet
@@ -23,29 +23,108 @@
23 23
       :actions="actions"
24 24
       cancel-text="取消"
25 25
       @cancel="onCancel"
26
+      @select="OnSelect"
26 27
     />
27 28
   </div>
28 29
 </template>
29 30
 
30 31
 <script>
32
+import { getAllGroup, DeleteGroup } from "@/api/patient/patient";
33
+import { Dialog } from "vant";
31 34
 export default {
35
+  props: {
36
+    active: Number
37
+  },
32 38
   data() {
33 39
     return {
34 40
       loading: false,
35 41
       finished: false,
36 42
       newShow: false,
37
-      actions: [{ name: "编辑" }, { name: "删除" }]
43
+      actions: [{ name: "删除" }],
44
+      page: 1,
45
+      limit: 10,
46
+      group: [],
47
+      id: 0,
48
+      index: 0,
49
+      total: 0,
50
+      number: ""
38 51
     };
39 52
   },
40 53
   methods: {
41
-    onLoad() {},
42
-    onCancel() {}
54
+    onCancel() {},
55
+    addGrouping() {
56
+      this.$router.push("/addgroup?active=" + this.active);
57
+    },
58
+    getAllGroup() {
59
+      getAllGroup(this.page, this.limit).then(response => {
60
+        if (response.data.state === 1) {
61
+          var group = response.data.data.group;
62
+          let arr = this.group;
63
+          arr.push(...group);
64
+          this.group = arr;
65
+          console.log("group", group);
66
+          var total = response.data.data.total;
67
+          console.log("total", total);
68
+          this.total = total;
69
+          this.loading = false;
70
+        }
71
+      });
72
+    },
73
+    onLoad() {
74
+      setTimeout(() => {
75
+        this.page++;
76
+        if (this.page <= Math.ceil(this.total / 10)) {
77
+          this.getAllGroup(this.page, this.limit);
78
+        } else {
79
+          this.loading = false;
80
+          this.finished = true;
81
+        }
82
+      }, 1000);
83
+    },
84
+    onCancel() {
85
+      this.newShow = false;
86
+    },
87
+    Delete(id, number, index) {
88
+      this.newShow = true;
89
+      this.id = id;
90
+      this.index = index;
91
+      this.number = number;
92
+    },
93
+    OnSelect(val) {
94
+      if (val.name === "删除") {
95
+        this.DeleteGroup(this.id, this.number, this.index);
96
+      }
97
+    },
98
+    DeleteGroup(id, number, index) {
99
+      if (number !== "") {
100
+        this.$toast("该分组存在床位号,不能删除");
101
+        this.newShow = false;
102
+        return false;
103
+      }
104
+      Dialog.confirm({
105
+        title: "删除提示!",
106
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
107
+      }).then(() => {
108
+        DeleteGroup(id).then(response => {
109
+          if (response.data.state === 1) {
110
+            var msg = response.data.data.msg;
111
+            console.log("msg", msg);
112
+            this.group.splice(index, 1);
113
+            this.newShow = false;
114
+          }
115
+        });
116
+      });
117
+    }
118
+  },
119
+  created() {
120
+    this.getAllGroup();
43 121
   }
44 122
 };
45 123
 </script>
46 124
 
47 125
 <style lang="scss" scoped>
48 126
 .Grouping {
127
+  margin-bottom: 3.125rem;
49 128
   .GroupingOne {
50 129
     padding: 1.375rem 1.125rem 1.125rem 1.5rem;
51 130
     display: flex;

+ 111 - 8
src/pages/configureCenter/components/Partition.vue Прегледај датотеку

@@ -6,17 +6,21 @@
6 6
       finished-text="没有更多了"
7 7
       @load="onLoad"
8 8
     >
9
-      <div class="partitionOne">
9
+      <div class="partitionOne" v-for="(item, index) in this.zone" :key="index">
10 10
         <div class="partitionLeft">
11
-          <p>分区名称:A区</p>
12
-          <p>分区类型:普通区</p>
11
+          <p>分区名称:{{ item.name }}</p>
12
+          <p>分区类型:{{ item.type }}</p>
13 13
         </div>
14
-        <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
14
+        <van-icon
15
+          class="ellipsis"
16
+          name="ellipsis"
17
+          @click="Delete(item.id,item.number,index)"
18
+        />
15 19
       </div>
16 20
     </van-list>
17 21
     <div class="add">
18
-      <div style="display: flex;align-items: center;">
19
-        <van-icon class="addIcon" name="add" />新增
22
+      <div style="display: flex; align-items: center;">
23
+        <van-icon class="addIcon" name="add" @click="addPartition" />新增
20 24
       </div>
21 25
     </div>
22 26
     <van-action-sheet
@@ -24,29 +28,128 @@
24 28
       :actions="actions"
25 29
       cancel-text="取消"
26 30
       @cancel="onCancel"
31
+      @select="onSelect"
27 32
     />
28 33
   </div>
29 34
 </template>
30 35
 
31 36
 <script>
37
+import { GetAllZone, DeleteZone } from "@/api/patient/patient";
38
+import { Dialog } from "vant";
32 39
 export default {
40
+  props: {
41
+    active: Number
42
+  },
33 43
   data() {
34 44
     return {
35 45
       loading: false,
36 46
       finished: false,
37 47
       newShow: false,
38
-      actions: [{ name: "编辑" }, { name: "删除" }]
48
+      actions: [{ name: "删除" }],
49
+      page: 1,
50
+      limit: 10,
51
+      zone: [],
52
+      total: 0,
53
+      id: 0,
54
+      index: 0,
55
+      number: 0
39 56
     };
40 57
   },
41 58
   methods: {
42 59
     onLoad() {},
43
-    onCancel() {}
60
+    onCancel() {},
61
+    addPartition() {
62
+      this.$router.push("/addpartition?active=" + this.active);
63
+    },
64
+    GetAllZone() {
65
+      GetAllZone(this.page, this.limit).then(response => {
66
+        if (response.data.state === 1) {
67
+          var zone = response.data.data.zone;
68
+          console.log("分区", zone);
69
+          for (let i = 0; i < zone.length; i++) {
70
+            if (zone[i].type === 1) {
71
+              zone[i].type = "普通";
72
+            }
73
+            if (zone[i].type === 2) {
74
+              zone[i].type = "乙肝";
75
+            }
76
+            if (zone[i].type === 3) {
77
+              zone[i].type = "丙肝";
78
+            }
79
+            if (zone[i].type === 4) {
80
+              zone[i].type = "艾滋病";
81
+            }
82
+            if (zone[i].type === 5) {
83
+              zone[i].type = "肺结核";
84
+            }
85
+            if (zone[i].type === 6) {
86
+              zone[i].type = "梅毒";
87
+            }
88
+          }
89
+          let arr = this.zone;
90
+          arr.push(...zone);
91
+          this.zone = arr;
92
+          var total = response.data.data.total;
93
+          this.total = total;
94
+          this.loading = false;
95
+        }
96
+      });
97
+    },
98
+    onLoad() {
99
+      setTimeout(() => {
100
+        this.page++;
101
+        if (this.page <= Math.ceil(this.total / 10)) {
102
+          this.GetAllZone(this.page, this.limit);
103
+        } else {
104
+          this.loading = false;
105
+          this.finished = true;
106
+        }
107
+      }, 1000);
108
+    },
109
+    onCancel() {
110
+      this.show = false;
111
+    },
112
+    onSelect(val) {
113
+      if (val.name === "删除") {
114
+        this.DeleteZone(this.id, this.number, this.index);
115
+      }
116
+    },
117
+    Delete(id, number, index) {
118
+      this.id = id;
119
+      this.index = index;
120
+      this.number = number;
121
+      this.newShow = true;
122
+    },
123
+    DeleteZone(id, number, index) {
124
+      if (number !== "") {
125
+        this.$toast("该分区存在床位号,不能删除");
126
+        this.newShow = false;
127
+        return false;
128
+      }
129
+      Dialog.confirm({
130
+        title: "删除提示!",
131
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
132
+      }).then(() => {
133
+        DeleteZone(id).then(response => {
134
+          if (response.data.state === 1) {
135
+            var msg = response.data.data.msg;
136
+            console.log("msg", msg);
137
+            this.zone.splice(index, 1);
138
+            this.newShow = false;
139
+          }
140
+        });
141
+      });
142
+    }
143
+  },
144
+  created() {
145
+    this.GetAllZone();
44 146
   }
45 147
 };
46 148
 </script>
47 149
 
48 150
 <style lang="scss" scoped>
49 151
 .partition {
152
+  margin-bottom: 3.125rem;
50 153
   .partitionOne {
51 154
     padding: 1.375rem 1.125rem 0 1.5rem;
52 155
     display: flex;

+ 17 - 7
src/pages/configureCenter/index.vue Прегледај датотеку

@@ -1,19 +1,19 @@
1 1
 <template>
2 2
   <div class="page_configureCenter">
3 3
     <div class="configureCenterTitle">
4
-      <i class="iconfont icon-zuojiantou jiantou"></i>
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
5 5
       <span class="titleName">配置中心</span>
6 6
     </div>
7 7
     <div class="configureCenterMain">
8
-      <van-tabs v-model="active">
8
+      <van-tabs v-model="active" sticky>
9 9
         <van-tab title="分区">
10
-          <partition></partition>
10
+          <partition :active="active"></partition>
11 11
         </van-tab>
12 12
         <van-tab title="分组">
13
-          <grouping></grouping>
13
+          <grouping :active="active"></grouping>
14 14
         </van-tab>
15 15
         <van-tab title="床位">
16
-          <bed></bed>
16
+          <bed :active="active"></bed>
17 17
         </van-tab>
18 18
       </van-tabs>
19 19
     </div>
@@ -28,13 +28,23 @@ export default {
28 28
   components: {
29 29
     Partition,
30 30
     Grouping,
31
-    Bed,
31
+    Bed
32 32
   },
33 33
   data() {
34 34
     return {
35
-      active: 0,
35
+      active: 0
36 36
     };
37 37
   },
38
+  methods: {
39
+    toReturn() {
40
+      this.$router.push("/manageconsole");
41
+    }
42
+  },
43
+  created() {
44
+    if (this.$route.query.active) {
45
+      this.active = parseInt(this.$route.query.active);
46
+    }
47
+  }
38 48
 };
39 49
 </script>
40 50
 

+ 97 - 10
src/pages/configureCenter/newBed.vue Прегледај датотеку

@@ -1,14 +1,14 @@
1 1
 <template>
2 2
   <div class="page_newBed">
3 3
     <div class="newBedTitle">
4
-      <i class="iconfont icon-zuojiantou jiantou"></i>
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5 5
       <span class="titleName">新增床位</span>
6 6
     </div>
7 7
     <div class="infoBox">
8 8
       <van-field v-model="name" required label="床位号" placeholder="请输入" />
9 9
       <van-field
10 10
         label="所属分区"
11
-        v-model="sex"
11
+        v-model="zone"
12 12
         right-icon="arrow"
13 13
         placeholder="请选择"
14 14
         required
@@ -16,39 +16,126 @@
16 16
         @click="show = true"
17 17
       />
18 18
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
19
-        <van-picker :columns="columns" show-toolbar @change="onChange" />
19
+        <van-picker :columns="columns" show-toolbar @confirm="confirmZone" @cancel="cancelZone"/>
20 20
       </van-popup>
21
+
21 22
       <van-field
22 23
         label="所属分组"
23
-        v-model="sex"
24
+        v-model="group"
24 25
         right-icon="arrow"
25 26
         placeholder="请选择"
26 27
         required
27 28
         readonly
28
-        @click="show = true"
29
+        @click="show1 = true"
29 30
       />
30 31
       <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
31
-        <van-picker :columns="columns" show-toolbar @change="onChange" />
32
+        <van-picker :columns="columns1" show-toolbar @confirm="confirmGroup" @cancel="cancelGroup"/>
32 33
       </van-popup>
33 34
     </div>
34
-    <div class="save">保存</div>
35
+    <div class="save" @click="SaveBed">保存</div>
35 36
   </div>
36 37
 </template>
37 38
 
38
-
39 39
 <script>
40
+import { getAllGroupOne, SaveBed } from "@/api/patient/patient";
40 41
 export default {
41 42
   data() {
42 43
     return {
43 44
       show: false,
44 45
       show1: false,
45
-      columns: ["男", "女"]
46
+      columns: [],
47
+      columns1: [],
48
+      active: 0,
49
+      group: "",
50
+      name: "",
51
+      zone: "",
52
+      form: {
53
+        zone: "",
54
+        group: ""
55
+      },
56
+      data: [],
57
+      dataOne: []
46 58
     };
59
+  },
60
+  methods: {
61
+    toReturn() {
62
+      this.$router.push("/configurecenter?active=" + this.active);
63
+    },
64
+    getAllGroupOne() {
65
+      getAllGroupOne().then(response => {
66
+        if (response.data.state === 1) {
67
+          var group = response.data.data.group;
68
+          for (let i = 0; i < group.length; i++) {
69
+            this.columns1.push(group[i].name);
70
+          }
71
+          this.data = group;
72
+          var zone = response.data.data.zone;
73
+          for (let j = 0; j < zone.length; j++) {
74
+            this.columns.push(zone[j].name);
75
+          }
76
+          this.dataOne = zone;
77
+          console.log("zone", zone);
78
+        }
79
+      });
80
+    },
81
+    confirmZone(val) {
82
+      this.zone = val;
83
+      for (let i = 0; i < this.dataOne.length; i++) {
84
+        if (this.dataOne[i].name === val) {
85
+          this.form.zone = this.dataOne[i].id;
86
+        }
87
+      }
88
+      this.show = false;
89
+    },
90
+    cancelZone() {
91
+      this.show = false;
92
+    },
93
+    confirmGroup(val) {
94
+      this.group = val;
95
+      for (let i = 0; i < this.data.length; i++) {
96
+        if (val === this.data[i].name) {
97
+          this.form.group = this.data[i].id;
98
+        }
99
+      }
100
+      this.show1 = false;
101
+    },
102
+    cancelGroup() {
103
+      this.show1 = false;
104
+    },
105
+    SaveBed() {
106
+      if (this.name === "") {
107
+        this.$toast("床位号不能为空");
108
+        return false;
109
+      }
110
+      if (this.form.zone === "") {
111
+        this.$toast("所属分区不能为空");
112
+        return false;
113
+      }
114
+      if (this.form.group === "") {
115
+        this.$toast("所属分组不能为空");
116
+        return false;
117
+      }
118
+      const params = {
119
+        name: this.name,
120
+        zone: this.form.zone,
121
+        group: this.form.group
122
+      };
123
+      SaveBed(params).then(response => {
124
+        if (response.data.state === 1) {
125
+          var number = response.data.data.number;
126
+          this.$toast("保存成功");
127
+          this.$router.push("/configurecenter?active=" + this.active);
128
+        }
129
+      });
130
+    }
131
+  },
132
+  created() {
133
+    this.active = parseInt(this.$route.query.active);
134
+    this.getAllGroupOne();
47 135
   }
48 136
 };
49 137
 </script>
50 138
 
51
-
52 139
 <style lang="scss" scoped>
53 140
 .page_newBed {
54 141
   height: 100%;

+ 30 - 6
src/pages/configureCenter/newGrouping.vue Прегледај датотеку

@@ -1,29 +1,53 @@
1 1
 <template>
2 2
   <div class="page_newGrouping">
3 3
     <div class="newGroupingTitle">
4
-      <i class="iconfont icon-zuojiantou jiantou"></i>
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5 5
       <span class="titleName">新增分组</span>
6 6
     </div>
7 7
     <div class="infoBox">
8
-      <van-field v-model="name" required label="分名称" placeholder="请输入" />
8
+      <van-field v-model="name" required label="分名称" placeholder="请输入" />
9 9
     </div>
10
-    <div class="save">保存</div>
10
+    <div class="save" @click="saveGroup">保存</div>
11 11
   </div>
12 12
 </template>
13 13
 
14
-
15 14
 <script>
15
+import { saveGroup } from "@/api/patient/patient";
16 16
 export default {
17 17
   data() {
18 18
     return {
19 19
       show: false,
20
-      columns: ["男", "女"]
20
+      name: "",
21
+      active: 0
21 22
     };
23
+  },
24
+  methods: {
25
+    saveGroup() {
26
+      if (this.name === "") {
27
+        this.$toast("请输入分组名");
28
+        return false;
29
+      }
30
+      const params = {
31
+        name: this.name
32
+      };
33
+      saveGroup(params).then(response => {
34
+        if (response.data.state === 1) {
35
+          var group = response.data.data.group;
36
+          this.$toast("保存成功");
37
+          this.$router.push("/configurecenter?active=" + this.active);
38
+        }
39
+      });
40
+    },
41
+    toReturn() {
42
+      this.$router.push("/configurecenter?active=" + this.active);
43
+    }
44
+  },
45
+  created() {
46
+    this.active = parseInt(this.$route.query.active);
22 47
   }
23 48
 };
24 49
 </script>
25 50
 
26
-
27 51
 <style lang="scss" scoped>
28 52
 .page_newGrouping {
29 53
   height: 100%;

+ 87 - 8
src/pages/configureCenter/newPartition.vue Прегледај датотеку

@@ -1,14 +1,19 @@
1 1
 <template>
2 2
   <div class="page_newPartition">
3 3
     <div class="newPartitionTitle">
4
-      <i class="iconfont icon-zuojiantou jiantou"></i>
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5 5
       <span class="titleName">新增分区</span>
6 6
     </div>
7 7
     <div class="infoBox">
8
-      <van-field v-model="name" required label="分区名称" placeholder="请输入" />
8
+      <van-field
9
+        v-model="form.name"
10
+        required
11
+        label="分区名称"
12
+        placeholder="请输入"
13
+      />
9 14
       <van-field
10 15
         label="分区类型"
11
-        v-model="sex"
16
+        v-model="type"
12 17
         right-icon="arrow"
13 18
         placeholder="请选择"
14 19
         required
@@ -16,26 +21,100 @@
16 21
         @click="show = true"
17 22
       />
18 23
       <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
19
-        <van-picker :columns="columns" show-toolbar @change="onChange" />
24
+        <van-picker
25
+          :columns="columns"
26
+          show-toolbar
27
+          @confirm="onConfirm"
28
+          @cancel="oncancel"
29
+        />
20 30
       </van-popup>
21 31
     </div>
22
-    <div class="save">保存</div>
32
+    <div class="save" @click="SavePartition">保存</div>
23 33
   </div>
24 34
 </template>
25 35
 
26
-
27 36
 <script>
37
+import { SavePartition } from "@/api/patient/patient";
28 38
 export default {
29 39
   data() {
30 40
     return {
31 41
       show: false,
32
-      columns: ["男", "女"]
42
+      columns: ["普通", "乙肝", "丙肝", "艾滋病", "肺结核", "梅毒"],
43
+      form: {
44
+        name: "",
45
+        zoneType: ""
46
+      },
47
+      type: "",
48
+      active: 0
33 49
     };
50
+  },
51
+  methods: {
52
+    onConfirm(val) {
53
+      if (val === "普通") {
54
+        this.type = val;
55
+        this.form.zoneType = 1;
56
+        this.show = false;
57
+      }
58
+      if (val === "乙肝") {
59
+        this.type = val;
60
+        this.form.zoneType = 2;
61
+        this.show = false;
62
+      }
63
+      if (val === "丙肝") {
64
+        this.type = val;
65
+        this.form.zoneType = 3;
66
+        this.show = false;
67
+      }
68
+      if (val === "艾滋病") {
69
+        this.type = val;
70
+        this.form.zoneType = 4;
71
+        this.show = false;
72
+      }
73
+      if (val === "肺结核") {
74
+        this.type = val;
75
+        this.form.zoneType = 5;
76
+        this.show = false;
77
+      }
78
+      if (val === "梅毒") {
79
+        this.type = val;
80
+        this.form.zoneType = 6;
81
+        this.show = false;
82
+      }
83
+    },
84
+    oncancel() {
85
+      this.show = false;
86
+    },
87
+    SavePartition() {
88
+      if (this.form.name === "") {
89
+        this.$toast("请输入分区名");
90
+        return false;
91
+      }
92
+      if (this.form.zoneType === "") {
93
+        this.$toast("请选择分区类型");
94
+        return false;
95
+      }
96
+      const params = {
97
+        name: this.form.name,
98
+        type: this.form.zoneType
99
+      };
100
+      SavePartition(params).then(response => {
101
+        if (response.data.state === 1) {
102
+          var zone = response.data.data.zone;
103
+          this.$toast("保存成功");
104
+          this.$router.push("/configurecenter?active=" + this.active);
105
+        }
106
+      });
107
+    },
108
+    toReturn() {
109
+      this.$router.push("/configurecenter?active=" + this.active);
110
+    }
111
+  },
112
+  created() {
113
+    this.active = parseInt(this.$route.query.active);
34 114
   }
35 115
 };
36 116
 </script>
37 117
 
38
-
39 118
 <style lang="scss" scoped>
40 119
 .page_newPartition {
41 120
   height: 100%;

+ 91 - 14
src/pages/console/managementConsole/staff_role/editRole/index.vue Прегледај датотеку

@@ -7,7 +7,7 @@
7 7
     </div>
8 8
     <div class="roleDescription">
9 9
       <van-field v-model="name" class="input1" required label="角色名称" placeholder="请填写角色名称" readonly>
10
-        <van-button slot="button" size="small" @click="del()">删除角色</van-button>
10
+        <van-button slot="button" size="small" @click="del()" v-if="is_system == 0">删除角色</van-button>
11 11
       </van-field>
12 12
       <van-field v-model="desc" label="角色描述" placeholder="请填写角色描述"/>
13 13
     </div>
@@ -30,7 +30,7 @@
30 30
             <p class="disposeName">{{item.name}}</p>
31 31
             <p style="visibility: hidden;">1</p>
32 32
           </div>
33
-          <van-switch v-model="item.isCheck" size="24"/>
33
+          <van-switch @change="changePurviewStatus(item)" v-model="item.isCheck" size="24"/>
34 34
         </div>
35 35
       </div>
36 36
     </div>
@@ -40,7 +40,7 @@
40 40
 
41 41
 <script>
42 42
   import {setRem} from "@/libs/functionRem";
43
-  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo} from "@/api/admin_user";
43
+  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo,EditPurview} from "@/api/admin_user";
44 44
 
45 45
   export default {
46 46
     data() {
@@ -50,15 +50,63 @@
50 50
         checked: false,
51 51
         allPurview: [],
52 52
         rolePurview:null,
53
+        is_system:0,
53 54
         ids:[],
54 55
       };
55 56
     }, created() {
56 57
       setRem()
58
+
57 59
       this.GetAllPurview()
58
-      this.GetRoleInfo(this.$route.query.id)
59 60
 
60 61
 
61 62
     }, methods: {
63
+      changePurviewStatus(value){
64
+        let purview_ids  = ""
65
+        let type = 0
66
+        if (value.pid == 0){ //当前页面只存在pid为0的数据,而且会出现开关按钮的情况只会是拥有一个子节点
67
+          console.log(value.sub_purview)
68
+          if(value.sub_purview.length > 0) {
69
+
70
+            purview_ids = value.id + "," + value.sub_purview[0].id
71
+          }else{
72
+            purview_ids = value.id
73
+          }
74
+        }
75
+        if (value.isCheck){
76
+          type = 1 //打开
77
+        }else{
78
+          type = 2 //关闭
79
+        }
80
+
81
+
82
+        let params = {
83
+          id : this.$route.query.id,
84
+          purview_id:purview_ids,
85
+          type : type,
86
+        }
87
+
88
+        EditPurview(params).then(response => {
89
+          if (response.data.state === 1) {
90
+            if(type == 1){
91
+              value.isCheck = true
92
+            }else{
93
+              value.isCheck = false
94
+            }
95
+          } else {
96
+            if(type == 1){
97
+              value.isCheck = false
98
+            }else{
99
+              value.isCheck = true
100
+            }
101
+            this.$toast({
102
+              message: response.data.msg
103
+            });
104
+          }
105
+        });
106
+
107
+
108
+
109
+      },
62 110
       toSubPurview(purview){
63 111
         if(purview.module == 3) {
64 112
           this.$router.push({path: "/role/subpurview?id=" + this.$route.query.id + "&pid=" + purview.id + "&module=" + purview.module + "&title=" + purview.name})
@@ -116,8 +164,18 @@
116 164
             this.rolePurview = response.data.data.role_purview
117 165
             this.name =  response.data.data.role.name
118 166
             this.desc = response.data.data.role.intro
167
+            this.is_system = response.data.data.role.is_system
168
+
119 169
             this.ids = this.rolePurview.PurviewIds.split(',')
120 170
 
171
+            for(let a = 0; a < this.ids.length; a++ ){
172
+                for (let i = 0; i < this.allPurview.length; i++){
173
+                  if (parseInt(this.ids[a]) == this.allPurview[i].id){
174
+                      this.allPurview[i].isCheck = true
175
+                    }
176
+                }
177
+            }
178
+
121 179
           } else {
122 180
             this.$toast({
123 181
               message: response.data.msg
@@ -125,10 +183,26 @@
125 183
           }
126 184
         });
127 185
 
128
-      },
186
+      },GetOtherPurview(){
187
+        let params = {
188
+          module: 7,
189
+          id: 0,
190
+        }
191
+        GetAllPurview(params).then(response => {
192
+          if (response.data.state === 1) {
193
+            for (let i = 0; i < response.data.data.purviews.length; i++) {
194
+              response.data.data.purviews[i]["no_sub"] = true
195
+              this.allPurview.push(response.data.data.purviews[i])
196
+            }
129 197
 
198
+          } else {
199
+            this.$toast({
200
+              message: response.data.msg
201
+            });
202
+          }
203
+        });
130 204
 
131
-      GetAllPurview() {
205
+      } ,GetAllPurview() {
132 206
         let params = {
133 207
           module: 3,
134 208
           id: 0,
@@ -161,14 +235,17 @@
161 235
               desc: "品牌建设,营销工具",
162 236
               no_sub: false
163 237
             })
164
-            this.allPurview.push({
165
-              module: 0,
166
-              name: "分销商城",
167
-              id: 0,
168
-              icon_url: "https://kuyi.shengws.com/S10.png",
169
-              desc: "一键开店,分销商品",
170
-              no_sub: true
171
-            })
238
+            // this.allPurview.push({
239
+            //   module: 7,
240
+            //   name: "分销商城",
241
+            //   id: 0,
242
+            //   icon_url: "https://kuyi.shengws.com/S10.png",
243
+            //   desc: "一键开店,分销商品",
244
+            //   no_sub: true
245
+            // })
246
+            this.GetOtherPurview()
247
+            this.GetRoleInfo(this.$route.query.id)
248
+
172 249
 
173 250
           } else {
174 251
             this.$toast({

+ 220 - 27
src/pages/console/managementConsole/staff_role/functionPurview/index.vue Прегледај датотеку

@@ -6,15 +6,15 @@
6 6
     </div>
7 7
     <div class="allTitle">
8 8
       <van-cell center title="全部权限">
9
-        <van-switch v-model="checked" slot="right-icon" size="24" />
9
+        <van-switch v-model="checked"  @change="allChange" slot="right-icon" size="24" />
10 10
       </van-cell>
11 11
     </div>
12 12
     <div class="allTitle1">
13 13
       <van-cell center title="功能权限配置"></van-cell>
14 14
     </div>
15 15
     <div class="allBox">
16
-      <van-cell center :title="item.name" v-for="(item, index) in allPurview" :key="index" v-if="item.name != '透析记录'">
17
-        <van-switch v-model="item.isCheck" slot="right-icon" size="24" />
16
+      <van-cell center :title="item.name" v-for="(item, index) in allPurview" :key="index">
17
+        <van-switch v-model="item.isCheck" slot="right-icon" size="24"  @change="changeStatus(item)"/>
18 18
       </van-cell>
19 19
     </div>
20 20
   </div>
@@ -22,7 +22,7 @@
22 22
 
23 23
 <script>
24 24
   import {setRem} from "@/libs/functionRem";
25
-  import {GetAllFunctionPurview,GetRoleInfo} from "@/api/admin_user";
25
+  import {GetAllFunctionPurview,GetFunctionRoleInfo,EditFuncPurview} from "@/api/admin_user";
26 26
 
27 27
   export default {
28 28
     data() {
@@ -39,40 +39,234 @@
39 39
       };
40 40
     }, created() {
41 41
       setRem()
42
+      this.title = this.$route.query.title
43
+      this.pid = this.$route.query.pid
44
+      this.module = this.$route.query.module
42 45
       this.GetAllPurview()
43
-      this.GetRoleInfo(this.$route.query.id)
44
-
45 46
 
46 47
     }, methods: {
48
+      allChange(val){
49
+        if (val){
50
+          let purview_ids = ""
51
+
52
+          for (let i = 0; i < this.allPurview.length; i++){
53
+            this.allPurview[i].isCheck = true
54
+            if (purview_ids.length> 0) {
55
+              purview_ids = purview_ids +","+ this.allPurview[i].id.toString()
56
+            }else{
57
+              purview_ids = this.allPurview[i].id.toString()
58
+
59
+            }
60
+          }
61
+
62
+          let type = ""
63
+          if (val){
64
+            type = 1 //打开
65
+          }else{
66
+            type = 2 //关闭
67
+          }
68
+          let params = {
69
+            id : this.$route.query.id,
70
+            purview_id:purview_ids,
71
+            type : type,
72
+            is_all : 1,
73
+            pid: this.pid,
74
+          }
75
+          EditFuncPurview(params).then(response => {
76
+            if (response.data.state === 1) {
77
+              this.checked = true
78
+
79
+            } else {
80
+              if(type == 1){
81
+                this.checked = false
82
+              }else{
83
+                this.checked = true
84
+              }
85
+              this.$toast({
86
+                message: response.data.msg
87
+              });
88
+            }
89
+          });
90
+
91
+        }else {
92
+          let purview_ids = ""
93
+
94
+          for (let i = 0; i < this.allPurview.length; i++) {
95
+            this.allPurview[i].isCheck = false
96
+
97
+            if (purview_ids.length> 0) {
98
+              purview_ids = purview_ids +","+ this.allPurview[i].id.toString()
99
+            }else{
100
+              purview_ids = this.allPurview[i].id.toString()
101
+
102
+            }
103
+          }
104
+
105
+          let type = ""
106
+          if (val){
107
+            type = 1 //打开
108
+          }else{
109
+            type = 2 //关闭
110
+          }
111
+          let params = {
112
+            id : this.$route.query.id,
113
+            purview_id:purview_ids,
114
+            type : type,
115
+            is_all : 1,
116
+            pid: this.pid,
117
+          }
118
+          EditFuncPurview(params).then(response => {
119
+            if (response.data.state === 1) {
120
+              this.checked = false
121
+
122
+            } else {
123
+              if(type == 1){
124
+                val.isCheck = false
125
+              }else{
126
+                val.isCheck = true
127
+              }
128
+              this.$toast({
129
+                message: response.data.msg
130
+              });
131
+            }
132
+          });
133
+
134
+
47 135
 
48
-      editRole(){
49
-        let params = {
50
-          id: this.$route.query.id,
51
-          desc:this.desc,
52 136
         }
53
-        EditRoleInfo(params).then(response => {
54
-          if (response.data.state === 1) {
55
-            this.$toast({
56
-              message: "修改成功"
57
-            });
58
-          } else {
59
-            this.$toast({
60
-              message: response.data.msg
61
-            });
137
+      },
138
+
139
+      changeStatus(val){
140
+        //全选按钮相关逻辑
141
+        let tempPurview = []
142
+        for (let i = 0; i < this.allPurview.length; i++){
143
+          if(this.allPurview[i].isCheck){
144
+            tempPurview.push(this.allPurview[i])
62 145
           }
63
-        });
146
+        }
147
+
148
+        if (tempPurview.length == this.allPurview.length){
149
+          this.checked = true
150
+        }else{
151
+          this.checked = false
152
+        }
153
+
154
+
155
+        if(!val.isCheck){ //打开
156
+          let purview_ids = ""
157
+          let type = ""
158
+          purview_ids = val.id
159
+          if (val.isCheck){
160
+            type = 1 //打开
161
+          }else{
162
+            type = 2 //关闭
163
+          }
164
+          let params = {
165
+            id : this.$route.query.id,
166
+            purview_id:purview_ids,
167
+            type : type,
168
+            pid : this.pid
169
+          }
170
+          EditFuncPurview(params).then(response => {
171
+            if (response.data.state === 1) {
172
+              if(type == 1){
173
+                val.isCheck = true
174
+              }else{
175
+                val.isCheck = false
176
+              }
177
+            } else {
178
+              if(type == 1){
179
+                val.isCheck = false
180
+              }else{
181
+                val.isCheck = true
182
+              }
183
+              this.$toast({
184
+                message: response.data.msg
185
+              });
186
+            }
187
+          });
188
+
189
+
190
+        }else{//关闭
191
+          let purview_ids = ""
192
+          let type = ""
193
+          purview_ids = val.id
194
+          if (val.isCheck){
195
+            type = 1 //打开
196
+          }else{
197
+            type = 2 //关闭
198
+          }
199
+          let params = {
200
+            id : this.$route.query.id,
201
+            purview_id:purview_ids,
202
+            type : type,
203
+            pid : this.pid
204
+
205
+          }
206
+          EditFuncPurview(params).then(response => {
207
+            if (response.data.state === 1) {
208
+
209
+              var b = 0
210
+              for (let i =0; i < this.allPurview.length; i++){
211
+                if(this.allPurview[i].isCheck){
212
+                  b++
213
+                }
214
+              }
215
+              if (b == this.allPurview.length){
216
+                this.checked = true
217
+              }else{
218
+                this.checked = false
219
+              }
220
+
221
+              if(type == 1){
222
+                val.isCheck = true
223
+              }else{
224
+                val.isCheck = false
225
+              }
226
+            } else {
227
+              if(type == 1){
228
+                val.isCheck = false
229
+              }else{
230
+                val.isCheck = true
231
+              }
232
+              this.$toast({
233
+                message: response.data.msg
234
+              });
235
+            }
236
+          });
237
+
238
+
239
+        }
240
+
64 241
       },
65
-      GetRoleInfo(role_id) {
242
+
243
+      GetFunctionRoleInfo(role_id) {
66 244
         let params = {
67 245
           id: role_id,
68 246
         }
69
-        GetRoleInfo(params).then(response => {
247
+        GetFunctionRoleInfo(params).then(response => {
70 248
           if (response.data.state === 1) {
71 249
             this.rolePurview = response.data.data.role_purview
72
-            this.name =  response.data.data.role.name
73
-            this.desc = response.data.data.role.intro
74
-            this.ids = this.rolePurview.PurviewIds.split(',')
75 250
 
251
+            this.ids = this.rolePurview.purview_ids.split(',')
252
+            for(let a = 0; a < this.ids.length; a++ ){
253
+              for (let i = 0; i < this.allPurview.length; i++){
254
+                if (parseInt(this.ids[a]) == this.allPurview[i].id){
255
+                  this.allPurview[i].isCheck = true
256
+                }
257
+              }
258
+            }
259
+            var b = 0
260
+            for (let i =0; i < this.allPurview.length; i++){
261
+              if(this.allPurview[i].isCheck){
262
+                b++
263
+              }
264
+            }
265
+            if (b == this.allPurview.length){
266
+              this.checked = true
267
+            }else{
268
+              this.checked = false
269
+            }
76 270
           } else {
77 271
             this.$toast({
78 272
               message: response.data.msg
@@ -80,7 +274,6 @@
80 274
           }
81 275
         });
82 276
       },
83
-
84 277
       GetAllPurview() {
85 278
         GetAllFunctionPurview().then(response => {
86 279
           if (response.data.state === 1) {
@@ -88,7 +281,7 @@
88 281
               response.data.data.funtion_purview[i]['isCheck'] = false
89 282
               this.allPurview.push(response.data.data.funtion_purview[i])
90 283
             }
91
-
284
+            this.GetFunctionRoleInfo(this.$route.query.id)
92 285
           } else {
93 286
             this.$toast({
94 287
               message: response.data.msg

+ 273 - 134
src/pages/console/managementConsole/staff_role/otherPurview/index.vue Прегледај датотеку

@@ -6,7 +6,7 @@
6 6
     </div>
7 7
     <div class="allTitle">
8 8
       <van-cell center title="全部权限">
9
-        <van-switch v-model="checked" slot="right-icon" size="24" />
9
+        <van-switch v-model="checked" slot="right-icon" size="24" @change="allChange"/>
10 10
       </van-cell>
11 11
     </div>
12 12
     <div class="allTitle1">
@@ -20,7 +20,7 @@
20 20
         :title="item.name"
21 21
         v-for="(item, index) in allPurview"
22 22
         :key="index"
23
-        v-if="!item.no_sub"
23
+        v-if="!item.no_sub&&item.pid == 0"
24 24
         @click="toSubPurview(item)"
25 25
       >
26 26
       </van-cell>
@@ -32,143 +32,273 @@
32 32
         :key="index"
33 33
         v-if="item.no_sub"
34 34
       >
35
-        <van-switch v-model="item.isCheck" slot="right-icon" size="24" />
35
+        <van-switch v-model="item.isCheck" slot="right-icon" size="24"/>
36 36
       </van-cell>
37 37
     </div>
38 38
   </div>
39 39
 </template>
40 40
 
41 41
 <script>
42
-import { setRem } from "@/libs/functionRem";
43
-import {
44
-  GetAllPurview,
45
-  GetRoleInfo,
46
-  EditRoleInfo,
47
-  DeleteRoleInfo
48
-} from "@/api/admin_user";
49
-
50
-export default {
51
-  data() {
52
-    return {
53
-      title: "",
54
-      desc: "",
55
-      name: "",
56
-      checked: false,
57
-      allPurview: [],
58
-      ids: [],
59
-      pid: 0,
60
-      module: 0
61
-    };
62
-  },
63
-  created() {
64
-    this.title = this.$route.query.title;
65
-    this.pid = this.$route.query.pid;
66
-    this.module = this.$route.query.module;
67
-    setRem();
68
-    this.GetAllPurview();
69
-
70
-    this.GetRoleInfo(this.$route.query.id);
71
-  },
72
-  methods: {
73
-    toSubPurview(purview) {
74
-      this.$router.push({
75
-        path:
76
-          "/role/subpurview?id=" +
77
-          this.$route.query.id +
78
-          "&pid=" +
79
-          purview.id +
80
-          "&module=" +
81
-          purview.module +
82
-          "&title=" +
83
-          purview.name
84
-      });
85
-    },
86
-    del() {
87
-      let params = {
88
-        role_id: this.$route.query.id,
89
-        enable: false
90
-      };
91
-      DeleteRoleInfo(params).then(response => {
92
-        if (response.data.state === 1) {
93
-          this.$toast({
94
-            message: "删除成功"
95
-          });
96
-          this.$router.go(-1);
97
-        } else {
98
-          this.$toast({
99
-            message: response.data.msg
100
-          });
101
-        }
102
-      });
103
-    },
104
-    editRole() {
105
-      let params = {
106
-        id: this.$route.query.id,
107
-        desc: this.desc
42
+  import {setRem} from "@/libs/functionRem";
43
+  import {DeleteRoleInfo, EditPurview, EditRoleInfo, GetAllPurview, GetRoleInfo} from "@/api/admin_user";
44
+
45
+  export default {
46
+    data() {
47
+      return {
48
+        title: "",
49
+        desc: "",
50
+        name: "",
51
+        checked: false,
52
+        allPurview: [],
53
+        ids: [],
54
+        pid: 0,
55
+        module: 0,
56
+        subPurview: [],
108 57
       };
109
-      EditRoleInfo(params).then(response => {
110
-        if (response.data.state === 1) {
111
-          this.$toast({
112
-            message: "修改成功"
113
-          });
114
-        } else {
115
-          this.$toast({
116
-            message: response.data.msg
117
-          });
118
-        }
119
-      });
120 58
     },
121
-    GetRoleInfo(role_id) {
122
-      let params = {
123
-        id: role_id
124
-      };
125
-      GetRoleInfo(params).then(response => {
126
-        if (response.data.state === 1) {
127
-          this.rolePurview = response.data.data.role_purview;
128
-          this.name = response.data.data.role.name;
129
-          this.desc = response.data.data.role.intro;
130
-          this.ids = this.rolePurview.PurviewIds.split(",");
131
-        } else {
132
-          this.$toast({
133
-            message: response.data.msg
134
-          });
135
-        }
136
-      });
59
+    created() {
60
+      this.title = this.$route.query.title;
61
+      this.pid = this.$route.query.pid;
62
+      this.module = this.$route.query.module;
63
+      setRem();
64
+      this.GetAllPurview();
65
+
66
+      // this.GetRoleInfo(this.$route.query.id);
137 67
     },
68
+    methods: {
69
+      allChange(val) {
70
+        if (val) {
71
+          let purview_ids = ""
138 72
 
139
-    GetAllPurview() {
140
-      let params = {
141
-        module: this.module,
142
-        id: this.pid
143
-      };
144
-      GetAllPurview(params).then(response => {
145
-        if (response.data.state === 1) {
146
-          for (let i = 0; i < response.data.data.purviews.length; i++) {
147
-            var purview = response.data.data.purviews[i].sub_purview;
148
-            if (purview.length > 1) {
149
-              response.data.data.purviews[i]["no_sub"] = false;
73
+          for (let i = 0; i < this.subPurview.length; i++) {
74
+            if (purview_ids.length > 0) {
75
+              purview_ids = purview_ids + "," + this.subPurview[i].id.toString() + "," + this.subPurview[i].pid.toString()
150 76
             } else {
151
-              response.data.data.purviews[i]["no_sub"] = true;
77
+              purview_ids = this.subPurview[i].id.toString() + "," + this.subPurview[i].pid.toString()
78
+
152 79
             }
153
-            response.data.data.purviews[i]["isCheck"] = false;
154
-            this.allPurview.push(response.data.data.purviews[i]);
155 80
           }
81
+
82
+          const obj = {}
83
+          // 去重复
84
+          var purview_arr = purview_ids.split(",").reduce((cur, next) => {
85
+            obj[next] ? '' : obj[next] = true && cur.push(next)
86
+            return cur
87
+          }, [])
88
+
89
+          purview_ids = purview_arr.join(",")
90
+
91
+
92
+          let type = ""
93
+          if (val) {
94
+            type = 1 //打开
95
+          } else {
96
+            type = 2 //关闭
97
+          }
98
+          let params = {
99
+            id: this.$route.query.id,
100
+            purview_id: purview_ids,
101
+            type: type,
102
+          }
103
+          EditPurview(params).then(response => {
104
+            if (response.data.state === 1) {
105
+              this.checked = true
106
+
107
+            } else {
108
+              if(type == 1){
109
+                this.checked = false
110
+              }else{
111
+                this.checked = true
112
+              }
113
+              this.$toast({
114
+                message: response.data.msg
115
+              });
116
+            }
117
+          });
118
+
119
+
156 120
         } else {
157
-          this.$toast({
158
-            message: response.data.msg
121
+          let purview_ids = ""
122
+
123
+          for (let i = 0; i < this.subPurview.length; i++) {
124
+            if (purview_ids.length > 0) {
125
+              purview_ids = purview_ids + "," + this.subPurview[i].id.toString() + "," + this.subPurview[i].pid.toString()
126
+            } else {
127
+              purview_ids = this.subPurview[i].id.toString() + "," + this.subPurview[i].pid.toString()
128
+
129
+            }
130
+          }
131
+
132
+          const obj = {}
133
+          // 去重复
134
+          var purview_arr = purview_ids.split(",").reduce((cur, next) => {
135
+            obj[next] ? '' : obj[next] = true && cur.push(next)
136
+            return cur
137
+          }, [])
138
+
139
+          purview_ids = purview_arr.join(",")
140
+
141
+          let type = ""
142
+          if (val) {
143
+            type = 1 //打开
144
+          } else {
145
+            type = 2 //关闭
146
+          }
147
+          let params = {
148
+            id: this.$route.query.id,
149
+            purview_id: purview_ids,
150
+            type: type,
151
+          }
152
+
153
+          EditPurview(params).then(response => {
154
+            if (response.data.state === 1) {
155
+              this.checked = false
156
+
157
+            } else {
158
+              if(type == 1){
159
+                val.isCheck = false
160
+              }else{
161
+                val.isCheck = true
162
+              }
163
+              this.$toast({
164
+                message: response.data.msg
165
+              });
166
+            }
159 167
           });
168
+
169
+
160 170
         }
161
-      });
171
+      },
172
+
173
+      toSubPurview(purview) {
174
+        this.$router.push({
175
+          path:
176
+            "/role/subpurview?id=" +
177
+            this.$route.query.id +
178
+            "&pid=" +
179
+            purview.id +
180
+            "&module=" +
181
+            purview.module +
182
+            "&title=" +
183
+            purview.name
184
+        });
185
+      },
186
+      del() {
187
+        let params = {
188
+          role_id: this.$route.query.id,
189
+          enable: false
190
+        };
191
+        DeleteRoleInfo(params).then(response => {
192
+          if (response.data.state === 1) {
193
+            this.$toast({
194
+              message: "删除成功"
195
+            });
196
+            this.$router.go(-1);
197
+          } else {
198
+            this.$toast({
199
+              message: response.data.msg
200
+            });
201
+          }
202
+        });
203
+      },
204
+      editRole() {
205
+        let params = {
206
+          id: this.$route.query.id,
207
+          desc: this.desc
208
+        };
209
+        EditRoleInfo(params).then(response => {
210
+          if (response.data.state === 1) {
211
+            this.$toast({
212
+              message: "修改成功"
213
+            });
214
+          } else {
215
+            this.$toast({
216
+              message: response.data.msg
217
+            });
218
+          }
219
+        });
220
+      },
221
+      GetRoleInfo(role_id) {
222
+        let params = {
223
+          id: role_id
224
+        };
225
+        GetRoleInfo(params).then(response => {
226
+          if (response.data.state === 1) {
227
+            this.rolePurview = response.data.data.role_purview;
228
+            this.name = response.data.data.role.name;
229
+            this.desc = response.data.data.role.intro;
230
+            this.ids = this.rolePurview.PurviewIds.split(",");
231
+
232
+            console.log(this.subPurview)
233
+            for (let a = 0; a < this.ids.length; a++) {
234
+              for (let i = 0; i < this.subPurview.length; i++) {
235
+                if (parseInt(this.ids[a]) == this.subPurview[i].id) {
236
+                  this.subPurview[i]["isCheck"] = true
237
+                }
238
+              }
239
+            }
240
+
241
+            //设置全选按键
242
+            var b = 0
243
+            for (let i = 0; i < this.subPurview.length; i++) {
244
+              if (this.subPurview[i].isCheck) {
245
+                b++
246
+              }
247
+            }
248
+            if (b == this.subPurview.length) {
249
+              this.checked = true
250
+            } else {
251
+              this.checked = false
252
+            }
253
+
254
+
255
+          } else {
256
+            this.$toast({
257
+              message: response.data.msg
258
+            });
259
+          }
260
+        });
261
+      },
262
+
263
+      GetAllPurview() {
264
+        this.pid = 0;
265
+        let params = {
266
+          module: this.module,
267
+          id: this.pid
268
+        };
269
+        GetAllPurview(params).then(response => {
270
+          if (response.data.state === 1) {
271
+            for (let i = 0; i < response.data.data.purviews.length; i++) {
272
+              var purview = response.data.data.purviews[i].sub_purview;
273
+              for (let b = 0; b < purview.length; b++) {
274
+                this.subPurview.push(purview[b])
275
+              }
276
+              if (purview.length > 1) {
277
+                response.data.data.purviews[i]["no_sub"] = false;
278
+              } else {
279
+                response.data.data.purviews[i]["no_sub"] = true;
280
+              }
281
+              response.data.data.purviews[i]["isCheck"] = false;
282
+              this.allPurview.push(response.data.data.purviews[i]);
283
+              this.GetRoleInfo(this.$route.query.id)
284
+            }
285
+          } else {
286
+            this.$toast({
287
+              message: response.data.msg
288
+            });
289
+          }
290
+        });
291
+      }
162 292
     }
163
-  }
164
-};
293
+  };
165 294
 </script>
166 295
 
167 296
 <style lang="scss" scoped>
168
-.page_qualityControlManagement {
169
-  height: 100%;
170
-  overflow-y: auto;
171
-  background: #fafafa;
297
+  .page_qualityControlManagement {
298
+    height: 100%;
299
+    overflow-y: auto;
300
+    background: #fafafa;
301
+
172 302
   .qualityControlManagementTitle {
173 303
     background: #fff;
174 304
     padding: 0 1.125rem;
@@ -176,36 +306,45 @@ export default {
176 306
     display: flex;
177 307
     align-items: center;
178 308
   }
309
+
179 310
   .jiantou {
180 311
     font-size: 1.5rem;
181 312
     font-weight: 600;
182 313
     margin-right: 7rem;
183 314
   }
315
+
184 316
   .titleName {
185 317
     font-size: 1.125rem;
186 318
     font-weight: 600;
187 319
   }
320
+
188 321
   .allTitle {
189 322
     margin: 1rem 0;
190
-    .van-cell__title {
191
-      font-weight: bold;
192
-      font-size: 1rem;
193
-      color: #313234;
194
-    }
323
+
324
+  .van-cell__title {
325
+    font-weight: bold;
326
+    font-size: 1rem;
327
+    color: #313234;
328
+  }
329
+
195 330
   }
196 331
   .allTitle1 {
197
-    .van-cell__title {
198
-      font-weight: bold;
199
-      font-size: 1rem;
200
-      color: #313234;
201
-    }
332
+
333
+  .van-cell__title {
334
+    font-weight: bold;
335
+    font-size: 1rem;
336
+    color: #313234;
337
+  }
338
+
202 339
   }
203 340
   .allBox {
204 341
     margin-bottom: 1rem;
205
-    .van-cell__title {
206
-      font-size: 1rem;
207
-      color: #313234;
208
-    }
342
+
343
+  .van-cell__title {
344
+    font-size: 1rem;
345
+    color: #313234;
346
+  }
347
+
348
+  }
209 349
   }
210
-}
211 350
 </style>

+ 243 - 27
src/pages/console/managementConsole/staff_role/subPurview/index.vue Прегледај датотеку

@@ -5,18 +5,18 @@
5 5
       <span class="titleName">{{title}}</span>
6 6
     </div>
7 7
     <div class="allTitle">
8
-      <van-cell center title="全部权限">
9
-        <van-switch v-model="checked" slot="right-icon" size="24" />
8
+      <van-cell center title="全部权限" v-if="title != '透析管理'">
9
+        <van-switch v-model="checked" @change="allChange" slot="right-icon" size="24" />
10 10
       </van-cell>
11 11
     </div>
12 12
     <div class="allTitle1">
13 13
       <van-cell center title="功能权限配置"></van-cell>
14 14
     </div>
15 15
     <div class="allBox">
16
-      <van-cell center :title="item.name" v-for="(item, index) in allPurview" :key="index" v-if="item.name == '透析记录'" @click="toFunctonPurview()">
16
+      <van-cell center :title="item.name" v-for="(item, index) in allPurview" :key="index" v-if="item.name == '透析记录'" @click="toFunctonPurview(item)">
17 17
       </van-cell>
18 18
       <van-cell center :title="item.name" v-for="(item, index) in allPurview" :key="index" v-if="item.name != '透析记录'">
19
-        <van-switch v-model="item.isCheck" slot="right-icon" size="24" />
19
+        <van-switch v-model="item.isCheck" slot="right-icon" size="24"  @change="changeStatus(item)" />
20 20
       </van-cell>
21 21
     </div>
22 22
   </div>
@@ -24,7 +24,7 @@
24 24
 
25 25
 <script>
26 26
   import {setRem} from "@/libs/functionRem";
27
-  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo} from "@/api/admin_user";
27
+  import {GetAllPurview,GetRoleInfo,EditRoleInfo,DeleteRoleInfo,EditPurview,GetFunctionRoleInfo} from "@/api/admin_user";
28 28
 
29 29
   export default {
30 30
     data() {
@@ -45,45 +45,260 @@
45 45
       this.pid = this.$route.query.pid
46 46
       this.module = this.$route.query.module
47 47
       this.GetAllPurview()
48
-      this.GetRoleInfo(this.$route.query.id)
49
-
48
+      // this.GetRoleInfo(this.$route.query.id)
50 49
 
51 50
 
52 51
 
53 52
     }, methods: {
54
-      toFunctonPurview(){
55
-        this.$router.push({path:"/role/functionpurview?id="+this.$route.query.id})
53
+      isShow(){
54
+
55
+
56 56
 
57 57
       },
58
+      allChange(val){
59
+        if (val){
60
+          let purview_ids = ""
61
+
62
+          for (let i = 0; i < this.allPurview.length; i++){
63
+              this.allPurview[i].isCheck = true
64
+              if (purview_ids.length> 0) {
65
+                purview_ids = purview_ids +","+ this.allPurview[i].id.toString()
66
+              }else{
67
+                purview_ids = this.allPurview[i].id.toString()
68
+
69
+              }
70
+          }
71
+          purview_ids = purview_ids +","+ this.$route.query.pid
72
+
73
+
74
+          let type = ""
75
+          if (val){
76
+            type = 1 //打开
77
+          }else{
78
+            type = 2 //关闭
79
+          }
80
+          let params = {
81
+            id : this.$route.query.id,
82
+            purview_id:purview_ids,
83
+            type : type,
84
+          }
85
+          EditPurview(params).then(response => {
86
+            if (response.data.state === 1) {
87
+              this.checked = true
88
+
89
+            } else {
90
+              if(type == 1){
91
+                this.checked = false
92
+              }else{
93
+                this.checked = true
94
+              }
95
+              this.$toast({
96
+                message: response.data.msg
97
+              });
98
+            }
99
+          });
100
+
101
+
102
+
103
+
104
+        }else {
105
+          let purview_ids = ""
106
+
107
+          for (let i = 0; i < this.allPurview.length; i++) {
108
+            this.allPurview[i].isCheck = false
109
+            // purview_ids = purview_ids + this.allPurview[i].id.toString()
110
+
111
+            if (purview_ids.length> 0) {
112
+              purview_ids = purview_ids +","+ this.allPurview[i].id.toString()
113
+            }else{
114
+              purview_ids = this.allPurview[i].id.toString()
115
+
116
+            }
117
+          }
118
+          purview_ids = purview_ids +","+ this.$route.query.pid
119
+
120
+          let type = ""
121
+          if (val){
122
+            type = 1 //打开
123
+          }else{
124
+            type = 2 //关闭
125
+          }
126
+          let params = {
127
+            id : this.$route.query.id,
128
+            purview_id:purview_ids,
129
+            type : type,
130
+          }
131
+          EditPurview(params).then(response => {
132
+            if (response.data.state === 1) {
133
+              this.checked = false
134
+
135
+            } else {
136
+              if(type == 1){
137
+                val.isCheck = false
138
+              }else{
139
+                val.isCheck = true
140
+              }
141
+              this.$toast({
142
+                message: response.data.msg
143
+              });
144
+            }
145
+          });
146
+
147
+
58 148
 
59
-      editRole(){
60
-        let params = {
61
-          id: this.$route.query.id,
62
-          desc:this.desc,
63 149
         }
64
-        EditRoleInfo(params).then(response => {
65
-          if (response.data.state === 1) {
66
-            this.$toast({
67
-              message: "修改成功"
68
-            });
69
-          } else {
70
-            this.$toast({
71
-              message: response.data.msg
72
-            });
150
+      },
151
+      changeStatus(val){
152
+        let tempPurview = []
153
+        for (let i = 0; i < this.allPurview.length; i++){
154
+          if(this.allPurview[i].isCheck){
155
+            tempPurview.push(this.allPurview[i])
73 156
           }
74
-        });
157
+        }
158
+
159
+        if(!val.isCheck){ //打开
160
+          let purview_ids = ""
161
+          let type = ""
162
+
163
+          if(tempPurview.length <= 0){ //之前没分配过权限,需要将父节点的id上传
164
+            purview_ids = val.pid + ","+val.id
165
+          }else{ //分配过权限,说明父节点id已经上传过,则不需要上传
166
+            purview_ids = val.id
167
+          }
168
+
169
+          if (val.isCheck){
170
+            type = 1 //打开
171
+          }else{
172
+            type = 2 //关闭
173
+          }
174
+          let params = {
175
+            id : this.$route.query.id,
176
+            purview_id:purview_ids,
177
+            type : type,
178
+          }
179
+
180
+
181
+          EditPurview(params).then(response => {
182
+            if (response.data.state === 1) {
183
+              this.checked = false
184
+              if(type == 1){
185
+                val.isCheck = true
186
+              }else{
187
+                val.isCheck = false
188
+              }
189
+            } else {
190
+              if(type == 1){
191
+                val.isCheck = false
192
+              }else{
193
+                val.isCheck = true
194
+              }
195
+              this.$toast({
196
+                message: response.data.msg
197
+              });
198
+            }
199
+          });
200
+
201
+
202
+
203
+        }else{//关闭
204
+          let purview_ids = ""
205
+          let type = ""
206
+
207
+          if(tempPurview.length == 1){ //说明只剩当前操作的,则需要将父节点也上传,保证数据不重复
208
+            purview_ids = val.pid + ","+val.id
209
+          }else{ //分配过权限,说明父节点id已经上传过,则不需要上传
210
+            purview_ids = val.id
211
+          }
212
+
213
+          if (val.isCheck){
214
+            type = 1 //打开
215
+          }else{
216
+            type = 2 //关闭
217
+          }
218
+          let params = {
219
+            id : this.$route.query.id,
220
+            purview_id:purview_ids,
221
+            type : type,
222
+          }
223
+
224
+          EditPurview(params).then(response => {
225
+            if (response.data.state === 1) {
226
+
227
+              var b = 0
228
+              for (let i =0; i < this.allPurview.length; i++){
229
+                if(this.allPurview[i].isCheck){
230
+                  b++
231
+                }
232
+              }
233
+              if (b == this.allPurview.length){
234
+                this.checked = true
235
+              }
236
+
237
+              if(type == 1){
238
+                val.isCheck = true
239
+              }else{
240
+                val.isCheck = false
241
+              }
242
+
243
+            } else {
244
+              if(type == 1){
245
+                val.isCheck = false
246
+              }else{
247
+                val.isCheck = true
248
+              }
249
+
250
+              this.$toast({
251
+                message: response.data.msg
252
+              });
253
+            }
254
+          });
255
+
256
+
257
+        }
258
+
75 259
       },
76
-      GetRoleInfo(role_id) {
260
+      toFunctonPurview(item){
261
+        this.$router.push({path:"/role/functionpurview?id="+this.$route.query.id+"&pid="+item.id})
262
+      }, GetRoleInfo(role_id) {
77 263
         let params = {
78 264
           id: role_id,
79 265
         }
80 266
         GetRoleInfo(params).then(response => {
81 267
           if (response.data.state === 1) {
82 268
             this.rolePurview = response.data.data.role_purview
269
+
270
+            // this.rolePurview = response.data.data.role_purview
271
+
83 272
             this.name =  response.data.data.role.name
84 273
             this.desc = response.data.data.role.intro
85 274
             this.ids = this.rolePurview.PurviewIds.split(',')
86 275
 
276
+            for(let a = 0; a < this.ids.length; a++ ){
277
+              for (let i = 0; i < this.allPurview.length; i++){
278
+                if (parseInt(this.ids[a]) == this.allPurview[i].id){
279
+                  this.allPurview[i].isCheck = true
280
+                }
281
+              }
282
+            }
283
+
284
+
285
+
286
+            //设置全选按键
287
+            var b = 0
288
+            for (let i =0; i < this.allPurview.length; i++){
289
+              if(this.allPurview[i].isCheck){
290
+                b++
291
+              }
292
+            }
293
+
294
+            if (b == this.allPurview.length){
295
+              this.checked = true
296
+            }else{
297
+
298
+              this.checked = false
299
+
300
+            }
301
+
87 302
           } else {
88 303
             this.$toast({
89 304
               message: response.data.msg
@@ -109,6 +324,10 @@
109 324
               this.allPurview.push(response.data.data.purviews[i])
110 325
             }
111 326
 
327
+            this.GetRoleInfo(this.$route.query.id)
328
+            // this.GetFuncRoleInfo(this.$route.query.id)
329
+
330
+
112 331
 
113 332
 
114 333
 
@@ -120,9 +339,6 @@
120 339
         });
121 340
 
122 341
       },
123
-
124
-
125
-
126 342
     }
127 343
   };
128 344
 </script>

+ 273 - 167
src/pages/doctorAdvice/components/DoctorManagement.vue Прегледај датотеку

@@ -22,124 +22,195 @@
22 22
         </div>
23 23
       </div>
24 24
 
25
-      <div class="adviceBox" v-show="showOne">
25
+      <div class="adviceBox">
26 26
         <van-list
27
-          v-model="loading"
28
-          :finished="finished"
29
-          finished-text="没有更多了"
30
-          @load="onLoad"
31
-        >
32
-          <div
33
-            class="adviceOne"
34
-            v-for="(item, index) in doctorAdvice"
35
-            :key="index"
36
-          >
37
-            <div v-for="(it, i) in item.child" :key="i">
38
-              <div class="adviceTitle" v-if="it.advice_date">
39
-                <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>
40
-                <van-icon
41
-                  class="ellipsis"
42
-                  name="ellipsis"
43
-                  @click="Delete(item.groupno, index, it.execution_staff)"
44
-                />
45
-              </div>
27
+         v-model="loading"
28
+         :finished="finished"
29
+         @load="onLoad"
30
+         finished-text="没有更多了"
31
+         >
46 32
 
47
-              <div
48
-                class="statOrder"
49
-                v-if="it.advice_type == 1 && it.parent_id == 0"
50
-              >
51
-                <div class="statOrderTitle" v-if="i < 3">
52
-                  <span>长期医嘱</span>
53
-                  <span style="margin-left:1rem">
54
-                    {{ getTimes(it.start_time) }}
55
-                  </span>
56
-                </div>
57
-                <div class="orderContent" v-if="i < 3">
58
-                  <p v-if="it.parent_id === 0">
59
-                    {{ it.advice_name }} {{ it.advice_desc
60
-                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number
33
+          <div class="adviceOne" v-for="(item,index) in this.doctorAdvice" :key="index">
34
+            <div class="adviceTitle">
35
+              <p>{{getTime(item.child[0].start_time)}}</p>
36
+              <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
37
+            </div>
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" >
41
+              <div class="statOrderTitle">
42
+                <span v-if="i<1">长期医嘱</span>
43
+                <span  v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
44
+              </div>
45
+              <div class="orderContent" v-if="i<4">
46
+                <p> {{ it.advice_name }} {{ it.advice_desc
47
+                     }}{{ it.drug_spec_unit }} {{ it.prescribing_number
61 48
                     }}{{ it.prescribing_number_unit }} {{ it.single_dose
62 49
                     }}{{ it.single_dose_unit }} {{ it.delivery_way }}
63
-                    {{ it.execution_frequency }}
64
-                  </p>
65
-                  <div v-for="(i, index) in childList" :key="index">
66
-                    <p v-if="i.parent_id == it.id">
67
-                      ▲ {{ i.advice_name }} {{ i.advice_desc
50
+                    {{ it.execution_frequency }}</p>
51
+                <div v-for="(i, index) in childList" :key="index">
52
+                 <p v-if="i.parent_id == it.id">▲
53
+                   {{ i.advice_name }} {{ i.advice_desc
68 54
                       }}{{ i.drug_spec_unit }} {{ i.prescribing_number
69 55
                       }}{{ i.prescribing_number_unit }} {{ i.single_dose
70 56
                       }}{{ i.single_dose_unit }}
71
-                      {{ i.delivery_way }}
72
-                      {{ i.execution_frequency }}
73
-                    </p>
74
-                  </div>
75
-                </div>
76
-                <div
77
-                  class="doctorBox"
78
-                  v-if="
79
-                    it.user_name ||
80
-                      it.execution_staff ||
81
-                      (it.checker && i == item.child.length)
82
-                  "
83
-                >
84
-                  <p>开嘱医生:{{ it.user_name }}</p>
85
-                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
86
-                  <p>核对护士:{{ getDoctor(it.checker) }}</p>
57
+                     {{ i.delivery_way }}
58
+                    {{ i.execution_frequency }}
59
+                 </p>
87 60
                 </div>
88 61
               </div>
62
+            </div>
89 63
 
90
-              <div
91
-                class="statOrder"
92
-                v-if="it.advice_type == 3 && it.parent_id == 0"
93
-              >
94
-                <div class="longOrderTitle" v-if="i < 3">
95
-                  <span>临时医嘱</span>
96
-                  <span style="margin-left:1rem">
97
-                    {{ getTimes(item.child[0].start_time) }}
98
-                  </span>
99
-                </div>
100
-                <div class="orderContent" v-if="i < 3">
101
-                  <p>
102
-                    {{ it.advice_name }} {{ it.advice_desc
103
-                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number
64
+            <div class="statOrder" v-if="it.advice_type == 3 && it.parent_id == 0">
65
+              <div class="longOrderTitle">
66
+                <span v-if="i<1">临时医嘱</span>
67
+                <span v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
68
+              </div>
69
+              <div class="orderContent" v-if="i<4">
70
+                <p v-if="it.parent_id == 0">{{ it.advice_name }} {{ it.advice_desc
71
+                  }}{{ it.drug_spec_unit }} {{ it.prescribing_number
104 72
                     }}{{ it.prescribing_number_unit }} {{ it.single_dose
105 73
                     }}{{ it.single_dose_unit }} {{ it.delivery_way }}
106
-                    {{ it.execution_frequency }}
107
-                  </p>
108
-                  <div v-for="(i, index) in childList" :key="index">
109
-                    <p v-if="i.parent_id == it.id">
110
-                      ▲ {{ i.advice_name }} {{ i.advice_desc
74
+                   {{ it.execution_frequency }}</p>
75
+                <div v-for="(i, index) in childList" :key="index">
76
+                  <p v-if="i.parent_id == it.id">▲ {{ i.advice_name }} {{ i.advice_desc
111 77
                       }}{{ i.drug_spec_unit }} {{ i.prescribing_number
112 78
                       }}{{ i.prescribing_number_unit }} {{ i.single_dose
113 79
                       }}{{ i.single_dose_unit }}
114
-                      {{ i.delivery_way }}
115
-                      {{ i.execution_frequency }}
116
-                    </p>
117
-                  </div>
118
-                </div>
119
-                <div
120
-                  class="doctorBox"
121
-                  v-if="
122
-                    it.user_name ||
123
-                      it.execution_staff ||
124
-                      (it.checker && i == item.child.length)
125
-                  "
126
-                >
127
-                  <p>开嘱医生:{{ it.user_name }}</p>
128
-                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
129
-                  <p>核对护士:{{ getDoctor(it.checker) }}</p>
80
+                     {{ i.delivery_way }}
81
+                    {{ i.execution_frequency }}</p>
130 82
                 </div>
131 83
               </div>
132 84
             </div>
133
-            <div
134
-              class="all"
135
-              @click="toDoctorAdviceDetail(item.child[0].groupno)"
136
-            >
137
-              全部
138
-            </div>
85
+         </div>
86
+             <div class="doctorBox">
87
+                <p>开嘱医生:{{ item.child[0].user_name }}</p>
88
+                <p>执行护士:{{ getDoctor(item.child[0].execution_staff) }}</p>
89
+                <p>核对护士:{{ getDoctor(item.child[0].checker) }}</p>
90
+              </div>
91
+            <div class="all" @click="toDoctorAdviceDetail(item.groupno)">全部</div>
139 92
           </div>
140 93
         </van-list>
141 94
       </div>
142 95
 
96
+<!--      <div class="adviceBox" v-show="showOne">-->
97
+<!--        <van-list-->
98
+<!--          v-model="loading"-->
99
+<!--          :finished="finished"-->
100
+<!--          finished-text="没有更多了"-->
101
+<!--          @load="onLoad"-->
102
+<!--        >-->
103
+<!--          <div-->
104
+<!--            class="adviceOne"-->
105
+<!--            v-for="(item, index) in doctorAdvice"-->
106
+<!--            :key="index"-->
107
+<!--          >-->
108
+<!--            <div v-for="(it, i) in item.child" :key="i">-->
109
+<!--              <div class="adviceTitle" v-if="it.advice_date">-->
110
+<!--                <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>-->
111
+<!--                <van-icon-->
112
+<!--                  class="ellipsis"-->
113
+<!--                  name="ellipsis"-->
114
+<!--                  @click="Delete(item.groupno, index, it.execution_staff)"-->
115
+<!--                />-->
116
+<!--              </div>-->
117
+
118
+<!--              <div-->
119
+<!--                class="statOrder"-->
120
+<!--                v-if="it.advice_type == 1 && it.parent_id == 0"-->
121
+<!--              >-->
122
+<!--                <div class="statOrderTitle" v-if="i < 3">-->
123
+<!--                  <span>长期医嘱</span>-->
124
+<!--                  <span style="margin-left:1rem">-->
125
+<!--                    {{ getTimes(it.start_time) }}-->
126
+<!--                  </span>-->
127
+<!--                </div>-->
128
+<!--                <div class="orderContent" v-if="i < 3">-->
129
+<!--                  <p v-if="it.parent_id === 0">-->
130
+<!--                    {{ it.advice_name }} {{ it.advice_desc-->
131
+<!--                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
132
+<!--                    }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
133
+<!--                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
134
+<!--                    {{ it.execution_frequency }}-->
135
+<!--                  </p>-->
136
+<!--                  <div v-for="(i, index) in childList" :key="index">-->
137
+<!--                    <p v-if="i.parent_id == it.id">-->
138
+<!--                      ▲ {{ i.advice_name }} {{ i.advice_desc-->
139
+<!--                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
140
+<!--                      }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
141
+<!--                      }}{{ i.single_dose_unit }}-->
142
+<!--                      {{ i.delivery_way }}-->
143
+<!--                      {{ i.execution_frequency }}-->
144
+<!--                    </p>-->
145
+<!--                  </div>-->
146
+<!--                </div>-->
147
+<!--                <div-->
148
+<!--                  class="doctorBox"-->
149
+<!--                  v-if="-->
150
+<!--                    it.user_name ||-->
151
+<!--                      it.execution_staff ||-->
152
+<!--                      (it.checker && i == item.child.length)-->
153
+<!--                  "-->
154
+<!--                >-->
155
+<!--                  <p>开嘱医生:{{ it.user_name }}</p>-->
156
+<!--                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
157
+<!--                  <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
158
+<!--                </div>-->
159
+<!--              </div>-->
160
+
161
+<!--              <div-->
162
+<!--                class="statOrder"-->
163
+<!--                v-if="it.advice_type == 3 && it.parent_id == 0"-->
164
+<!--              >-->
165
+<!--                <div class="longOrderTitle" v-if="i < 3">-->
166
+<!--                  <span>临时医嘱</span>-->
167
+<!--                  <span style="margin-left:1rem">-->
168
+<!--                    {{ getTimes(item.child[0].start_time) }}-->
169
+<!--                  </span>-->
170
+<!--                </div>-->
171
+<!--                <div class="orderContent" v-if="i < 3">-->
172
+<!--                  <p>-->
173
+<!--                    {{ it.advice_name }} {{ it.advice_desc-->
174
+<!--                    }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
175
+<!--                    }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
176
+<!--                    }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
177
+<!--                    {{ it.execution_frequency }}-->
178
+<!--                  </p>-->
179
+<!--                  <div v-for="(i, index) in childList" :key="index">-->
180
+<!--                    <p v-if="i.parent_id == it.id">-->
181
+<!--                      ▲ {{ i.advice_name }} {{ i.advice_desc-->
182
+<!--                      }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
183
+<!--                      }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
184
+<!--                      }}{{ i.single_dose_unit }}-->
185
+<!--                      {{ i.delivery_way }}-->
186
+<!--                      {{ i.execution_frequency }}-->
187
+<!--                    </p>-->
188
+<!--                  </div>-->
189
+<!--                </div>-->
190
+<!--                <div-->
191
+<!--                  class="doctorBox"-->
192
+<!--                  v-if="-->
193
+<!--                    it.user_name ||-->
194
+<!--                      it.execution_staff ||-->
195
+<!--                      (it.checker && i == item.child.length)-->
196
+<!--                  "-->
197
+<!--                >-->
198
+<!--                  <p>开嘱医生:{{ it.user_name }}</p>-->
199
+<!--                  <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
200
+<!--                  <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
201
+<!--                </div>-->
202
+<!--              </div>-->
203
+<!--            </div>-->
204
+<!--            <div-->
205
+<!--              class="all"-->
206
+<!--              @click="toDoctorAdviceDetail(item.child[0].groupno)"-->
207
+<!--            >-->
208
+<!--              全部-->
209
+<!--            </div>-->
210
+<!--          </div>-->
211
+<!--        </van-list>-->
212
+<!--      </div>-->
213
+
143 214
       <div class="noimgBox" v-show="showTwo">
144 215
         <img src="../../../assets/images/none.png" alt />
145 216
       </div>
@@ -218,8 +289,7 @@
218 289
 import {
219 290
   getDoctorAdvices,
220 291
   getPatientDetail,
221
-  DeleteManagement,
222
-  DeleteChild
292
+  DeleteManagement
223 293
 } from "@/api/patient/patient";
224 294
 import { uParseTime } from "@/utils/tools";
225 295
 import { Dialog } from "vant";
@@ -230,6 +300,7 @@ export default {
230 300
   },
231 301
   data() {
232 302
     return {
303
+      docShow: false,
233 304
       loading: false,
234 305
       finished: false,
235 306
       newShow: false,
@@ -241,7 +312,6 @@ export default {
241 312
       columns: ["全部", "长期医嘱", "临时医嘱"],
242 313
       startTime: "请选择",
243 314
       endTime: "请选择",
244
-      endTimes: "",
245 315
       minDate: new Date(1970, 0, 1),
246 316
       maxDate: new Date(2025, 10, 1),
247 317
       currentDate: new Date(),
@@ -249,8 +319,8 @@ export default {
249 319
       actions1: [{ name: "删除" }],
250 320
       actions2: [{ name: "删除" }],
251 321
       form: {
252
-        type: "",
253
-        limit: 10,
322
+        type: 0,
323
+        limit: 5,
254 324
         page: 1
255 325
       },
256 326
       total: "",
@@ -280,7 +350,7 @@ export default {
280 350
         this.patient_id,
281 351
         this.type,
282 352
         this.startTime,
283
-        this.endTimes,
353
+        this.endTime,
284 354
         this.form.limit,
285 355
         this.form.page
286 356
       );
@@ -355,18 +425,10 @@ export default {
355 425
       ).then(response => {
356 426
         if (response.data.state === 1) {
357 427
           var advice = response.data.data.advice;
358
-          // this.doctorAdvice = advice;
359
-          let objarr = [];
360
-          for (let i = 0; i < advice.length; i++) {
361
-            if (advice[i].parent_id != 0) {
362
-              objarr.push(advice[i]);
363
-            }
364
-          }
365
-          this.childList = objarr;
366
-          var total = response.data.data.total;
367
-          this.total = total;
428
+          console.log("advice", advice);
429
+          var one = response.data.data.one;
368 430
           let dataInfo = {};
369
-          advice.forEach((item, index) => {
431
+          one.forEach((item, index) => {
370 432
             let { groupno } = item;
371 433
             if (!dataInfo[groupno]) {
372 434
               dataInfo[groupno] = {
@@ -374,46 +436,91 @@ export default {
374 436
                 child: []
375 437
               };
376 438
             }
377
-            dataInfo[groupno].child.push(item);
378 439
           });
379
-          let list = Object.values(dataInfo); // list 转换成功的数据
380
-          let arr = [];
381
-
440
+          let list = Object.values(dataInfo);
382 441
           list.map(item => {
383
-            // console.log(item.child);
384
-            let arr2 = [];
385
-            if (item.child.length > 1) {
386
-              item.child.map((it, index) => {
387
-                // console.log(it);
388
-                if (arr.indexOf(it.advice_date) == -1) {
389
-                  arr.push(it.advice_date);
390
-                } else {
391
-                  delete it["advice_date"];
392
-                }
393
-              });
394
-              for (var i = item.child.length - 1; i != -1; i--) {
395
-                let obj = {};
396
-                obj.checker = item.child[i].checker;
397
-                obj.execution_staff = item.child[i].execution_staff;
398
-                obj.user_name = item.child[i].user_name;
399
-                if (
400
-                  JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
401
-                ) {
402
-                  arr2.push(obj);
403
-                } else {
404
-                  delete item.child[i]["checker"];
405
-                  delete item.child[i]["execution_staff"];
406
-                  delete item.child[i]["user_name"];
407
-                }
442
+            for (let i = 0; i < advice.length; i++) {
443
+              if (item.groupno === advice[i].groupno) {
444
+                item.child.push(advice[i]);
408 445
               }
409 446
             }
410 447
           });
411
-
412
-          var doctor = response.data.data.doctor;
413
-          this.doctor = doctor;
414
-          this.doctorAdvice = list.reverse();
448
+          let objarr = [];
449
+          for (let i = 0; i < advice.length; i++) {
450
+            if (advice[i].parent_id != 0) {
451
+              objarr.push(advice[i]);
452
+            }
453
+          }
454
+          this.childList = objarr;
455
+          let arr = this.doctorAdvice;
456
+          arr.push(...list.reverse());
457
+          this.doctorAdvice = arr;
458
+          console.log("listtwo", this.doctorAdvice);
459
+          var total = response.data.data.total;
460
+          this.total = total;
461
+          console.log("total", total);
415 462
           this.loading = false;
416
-          this.finished = true;
463
+
464
+          // let objarr = []
465
+          // for (let i = 0; i < advice.length; i++) {
466
+          //   if (advice[i].parent_id != 0) {
467
+          //     objarr.push(advice[i])
468
+          //   }
469
+          // }
470
+          // this.childList = objarr
471
+          // var total = response.data.data.total
472
+          // this.total = total
473
+          //
474
+          // let dataInfo = {}
475
+          // advice.forEach((item, index) => {
476
+          //   let { groupno } = item
477
+          //   if (!dataInfo[groupno]) {
478
+          //     dataInfo[groupno] = {
479
+          //       groupno,
480
+          //       child: []
481
+          //     }
482
+          //   }
483
+          //   dataInfo[groupno].child.push(item)
484
+          // })
485
+          // let list = Object.values(dataInfo) // list 转换成功的数据
486
+          // console.log('list', list)
487
+          // let arr = []
488
+          //
489
+          // list.map(item => {
490
+          //   // console.log(item.child);
491
+          //   let arr2 = []
492
+          //   if (item.child.length > 1) {
493
+          //     item.child.map((it, index) => {
494
+          //       // console.log(it);
495
+          //       if (arr.indexOf(it.advice_date) == -1) {
496
+          //         arr.push(it.advice_date)
497
+          //       } else {
498
+          //         delete it['advice_date']
499
+          //       }
500
+          //     })
501
+          //     for (var i = item.child.length - 1; i != -1; i--) {
502
+          //       let obj = {}
503
+          //       obj.checker = item.child[i].checker
504
+          //       obj.execution_staff = item.child[i].execution_staff
505
+          //       obj.user_name = item.child[i].user_name
506
+          //       if (
507
+          //         JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
508
+          //       ) {
509
+          //         arr2.push(obj)
510
+          //       } else {
511
+          //         delete item.child[i]['checker']
512
+          //         delete item.child[i]['execution_staff']
513
+          //         delete item.child[i]['user_name']
514
+          //       }
515
+          //     }
516
+          //   }
517
+          // })
518
+          //
519
+          // var doctor = response.data.data.doctor
520
+          // this.doctor = doctor
521
+          // this.doctorAdvice = list.reverse()
522
+          // this.loading = false
523
+          // this.finished = true
417 524
         }
418 525
       });
419 526
     },
@@ -440,25 +547,25 @@ export default {
440 547
     getTimes(time) {
441 548
       return uParseTime(time, "{h}:{i}");
442 549
     },
443
-    // onLoad() {
444
-    //   setTimeout(() => {
445
-    //     this.page++;
446
-    //     if (this.page <= Math.ceil(this.total / 10)) {
447
-    //       this.getDoctorAdvices(
448
-    //         this.patient_id,
449
-    //         this.form.type,
450
-    //         this.startTime,
451
-    //         this.endTimes,
452
-    //         this.form.limit,
453
-    //         this.form.page
454
-    //       );
455
-    //     } else {
456
-    //       this.loading = false;
457
-    //       this.finished = true;
458
-    //     }
459
-    //   }, 1000);
460
-    // },
461
-    onLoad() {},
550
+    onLoad() {
551
+      setTimeout(() => {
552
+        this.form.page++;
553
+        console.log("page", this.form.page);
554
+        if (this.form.page <= Math.ceil(this.total / 5)) {
555
+          this.getDoctorAdvices(
556
+            this.patient_id,
557
+            this.form.type,
558
+            this.startTime,
559
+            this.endTime,
560
+            this.form.limit,
561
+            this.form.page
562
+          );
563
+        } else {
564
+          this.loading = false;
565
+          this.finished = true;
566
+        }
567
+      }, 5000);
568
+    },
462 569
     toDoctorAdviceDetail(id) {
463 570
       var patientid = this.$route.query.patientid;
464 571
       this.$router.push(
@@ -503,7 +610,6 @@ export default {
503 610
       }
504 611
     },
505 612
     toChildDelete(val) {
506
-      console.log(val);
507 613
       if (val.name == "删除") {
508 614
         this.DeleteChild(this.id, this.index, this.state);
509 615
       }

+ 13 - 13
src/pages/doctorAdvice/components/DryWeight.vue Прегледај датотеку

@@ -3,13 +3,13 @@
3 3
     <div>
4 4
       <div class="toolBox">
5 5
         <div class="toolOne" @click="startShow = true">
6
-          <div style="display: flex;align-items: center;">
6
+          <div style="display: flex; align-items: center;">
7 7
             {{ startTime }}
8 8
             <van-icon name="arrow-down" />
9 9
           </div>
10 10
         </div>
11 11
         <div class="toolOne" @click="endShow = true">
12
-          <div style="display: flex;align-items: center;">
12
+          <div style="display: flex; align-items: center;">
13 13
             {{ endTime }}
14 14
             <van-icon name="arrow-down" />
15 15
           </div>
@@ -97,7 +97,7 @@
97 97
 import {
98 98
   getDryWeight,
99 99
   DeleteDryWeight,
100
-  getPatientDetail
100
+  getPatientDetail,
101 101
 } from "@/api/patient/patient";
102 102
 import { uParseTime } from "@/utils/tools";
103 103
 import { Dialog } from "vant";
@@ -105,7 +105,7 @@ const moment = require("moment");
105 105
 export default {
106 106
   props: {
107 107
     active: Number,
108
-    dryId: String
108
+    dryId: String,
109 109
   },
110 110
   data() {
111 111
     return {
@@ -131,7 +131,7 @@ export default {
131 131
       dry_id: 0,
132 132
       dry_index: 0,
133 133
       showOne: true,
134
-      showTwo: false
134
+      showTwo: false,
135 135
     };
136 136
   },
137 137
   methods: {
@@ -196,7 +196,7 @@ export default {
196 196
         this.endTime,
197 197
         this.limit,
198 198
         this.page
199
-      ).then(response => {
199
+      ).then((response) => {
200 200
         if (response.data.state === 1) {
201 201
           var dryweight = response.data.data.dryweight;
202 202
           let arr = this.dryweight;
@@ -215,7 +215,7 @@ export default {
215 215
         this.endTimes,
216 216
         this.limit,
217 217
         this.page
218
-      ).then(response => {
218
+      ).then((response) => {
219 219
         if (response.data.state === 1) {
220 220
           var dryweight = response.data.data.dryweight;
221 221
           this.dryweight = dryweight;
@@ -242,7 +242,7 @@ export default {
242 242
           this.loading = false;
243 243
           this.finished = true;
244 244
         }
245
-      }, 3000);
245
+      }, 1000);
246 246
     },
247 247
     getTime(time) {
248 248
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
@@ -261,9 +261,9 @@ export default {
261 261
     DeleteDryWeight(id, index) {
262 262
       Dialog.confirm({
263 263
         title: "删除提示!",
264
-        message: "确认删除该条信息吗?,删除后将无法恢复!"
264
+        message: "确认删除该条信息吗?,删除后将无法恢复!",
265 265
       }).then(() => {
266
-        DeleteDryWeight(id).then(response => {
266
+        DeleteDryWeight(id).then((response) => {
267 267
           if (response.data.state === 1) {
268 268
             var msg = response.data.data.msg;
269 269
             console.log("msg", msg);
@@ -285,7 +285,7 @@ export default {
285 285
       );
286 286
     },
287 287
     getPatientDetail(patientid) {
288
-      getPatientDetail(patientid).then(response => {
288
+      getPatientDetail(patientid).then((response) => {
289 289
         if (response.data.state === 1) {
290 290
           var patientDetail = response.data.data.patientDetail;
291 291
           if (patientDetail.blood_patients == 0) {
@@ -300,7 +300,7 @@ export default {
300 300
           this.patientName = patientDetail.name;
301 301
         }
302 302
       });
303
-    }
303
+    },
304 304
   },
305 305
   created() {
306 306
     console.log("created");
@@ -310,7 +310,7 @@ export default {
310 310
     this.getDryWeight(patientid);
311 311
     this.patient_id = patientid;
312 312
     this.getPatientDetail(patientid);
313
-  }
313
+  },
314 314
 };
315 315
 </script>
316 316
 

+ 115 - 2
src/pages/doctorAdvice/index.vue Прегледај датотеку

@@ -143,7 +143,10 @@ import { uParseTime } from "@/utils/tools";
143 143
 import {
144 144
   getPatientDetail,
145 145
   getBloodDialysisPatientTwo,
146
-  ToSearch
146
+  ToSearch,
147
+  getMemberPatient,
148
+  getSlowPatient,
149
+  getBloodPatient
147 150
 } from "@/api/patient/patient";
148 151
 import { setRem } from "@/libs/functionRem";
149 152
 const moment = require("moment");
@@ -403,6 +406,104 @@ export default {
403 406
         });
404 407
       });
405 408
     },
409
+    // 获取血透病人
410
+    getBloodPatient() {
411
+      getBloodPatient().then(response => {
412
+        if (response.data.state === 1) {
413
+          var patient = response.data.data.patient;
414
+          // console.log("血透patient", patient);
415
+          this.patient = patient;
416
+          let cityNameList = [];
417
+          for (let p in patient) {
418
+            cityNameList.push(patient[p].name);
419
+          }
420
+          let firstName = {};
421
+          this.FirstPin.forEach(item => {
422
+            firstName[item] = [];
423
+            cityNameList.forEach(el => {
424
+              let first = pinyin.getFullChars(el).substring(0, 1);
425
+              if (first == item) {
426
+                firstName[item].push(el);
427
+              }
428
+            });
429
+            this.firstNameTwo = firstName;
430
+            // 判断非空
431
+            let newObj = {};
432
+            Object.keys(this.firstNameTwo).map((item, index) => {
433
+              if (this.firstNameTwo[item].length != 0) {
434
+                newObj[item] = this.firstNameTwo[item];
435
+              }
436
+            });
437
+            this.firstNameTwo = newObj;
438
+          });
439
+        }
440
+      });
441
+    },
442
+    // 获取慢病病人
443
+    getSlowPatient() {
444
+      getSlowPatient().then(response => {
445
+        if (response.data.state === 1) {
446
+          var patient = response.data.data.patient;
447
+          // console.log("慢病patient", patient);
448
+          this.patient = patient;
449
+          let cityNameList = [];
450
+          for (let p in patient) {
451
+            cityNameList.push(patient[p].name);
452
+          }
453
+          let firstName = {};
454
+          this.FirstPin.forEach(item => {
455
+            firstName[item] = [];
456
+            cityNameList.forEach(el => {
457
+              let first = pinyin.getFullChars(el).substring(0, 1);
458
+              if (first == item) {
459
+                firstName[item].push(el);
460
+              }
461
+            });
462
+            this.firstNameTwo = firstName;
463
+            // 判断非空
464
+            let newObj = {};
465
+            Object.keys(this.firstNameTwo).map((item, index) => {
466
+              if (this.firstNameTwo[item].length != 0) {
467
+                newObj[item] = this.firstNameTwo[item];
468
+              }
469
+            });
470
+            this.firstNameTwo = newObj;
471
+          });
472
+        }
473
+      });
474
+    },
475
+    getMemberPatient() {
476
+      getMemberPatient().then(response => {
477
+        if (response.data.state === 1) {
478
+          var patient = response.data.data.patient;
479
+          // console.log("会员patient", patient);
480
+          this.patient = patient;
481
+          let cityNameList = [];
482
+          for (let p in patient) {
483
+            cityNameList.push(patient[p].name);
484
+          }
485
+          let firstName = {};
486
+          this.FirstPin.forEach(item => {
487
+            firstName[item] = [];
488
+            cityNameList.forEach(el => {
489
+              let first = pinyin.getFullChars(el).substring(0, 1);
490
+              if (first == item) {
491
+                firstName[item].push(el);
492
+              }
493
+            });
494
+            this.firstNameTwo = firstName;
495
+            // 判断非空
496
+            let newObj = {};
497
+            Object.keys(this.firstNameTwo).map((item, index) => {
498
+              if (this.firstNameTwo[item].length != 0) {
499
+                newObj[item] = this.firstNameTwo[item];
500
+              }
501
+            });
502
+            this.firstNameTwo = newObj;
503
+          });
504
+        }
505
+      });
506
+    },
406 507
     onSearch(val) {
407 508
       ToSearch(val).then(response => {
408 509
         if (response.data.state === 1) {
@@ -460,7 +561,19 @@ export default {
460 561
     var patientid = this.$route.query.patientid;
461 562
     this.patient_id = patientid;
462 563
     this.getPatientDetail(patientid);
463
-    this.getBloodDialysisPatientTwo();
564
+    var seacherActive = this.$route.query.seacherActive;
565
+    if (seacherActive == 0) {
566
+      this.getBloodDialysisPatientTwo();
567
+    }
568
+    if (seacherActive == 1) {
569
+      this.getBloodPatient();
570
+    }
571
+    if (seacherActive == 2) {
572
+      this.getSlowPatient();
573
+    }
574
+    if (seacherActive == 3) {
575
+      this.getMemberPatient();
576
+    }
464 577
   },
465 578
   watch: {
466 579
     $route(newVal) {

Разлика између датотеке није приказан због своје велике величине
+ 4275 - 4247
src/pages/home/createOrg/index.vue


+ 6 - 6
src/pages/home/index.vue Прегледај датотеку

@@ -94,12 +94,12 @@
94 94
             <!--<div>服务</div>-->
95 95
           <!--</van-tabbar-item>-->
96 96
         <!--</router-link>-->
97
-        <router-link to="/shop" replace>
98
-          <van-tabbar-item>
99
-            <i class="iconfont icon-shangcheng iconOne"></i>
100
-            <div>商城</div>
101
-          </van-tabbar-item>
102
-        </router-link>
97
+<!--        <router-link to="/shop" replace>-->
98
+<!--          <van-tabbar-item>-->
99
+<!--            <i class="iconfont icon-shangcheng iconOne"></i>-->
100
+<!--            <div>商城</div>-->
101
+<!--          </van-tabbar-item>-->
102
+<!--        </router-link>-->
103 103
         <router-link to="/newMy" replace>
104 104
           <van-tabbar-item>
105 105
             <i class="iconfont icon-wode iconOne"></i>

+ 1 - 1
src/pages/home/noPassword/index.vue Прегледај датотеку

@@ -210,7 +210,7 @@ export default {
210 210
               this.$router.replace("/homeIndex");
211 211
             } else {
212 212
               this.$toast({
213
-                message: resp.data.msg
213
+                message: response.data.msg
214 214
               });
215 215
             }
216 216
           });

+ 5 - 0
src/pages/home/verifyToken.vue Прегледај датотеку

@@ -39,6 +39,11 @@ export default {
39 39
           //未登录
40 40
           this.$router.replace("/login");
41 41
         }
42
+      }else{
43
+        this.$toast({
44
+          message: "数据加载错误,请重新登录"
45
+        });
46
+        this.$router.replace("/login");
42 47
       }
43 48
     });
44 49
   },methods:{

+ 7 - 1
src/pages/homeIndex/index.vue Прегледај датотеку

@@ -170,6 +170,7 @@ export default {
170 170
     },
171 171
     toConfigCenter() {
172 172
       if (this.isCreateOrg) {
173
+        this.$router.push("/configurecenter");
173 174
       } else {
174 175
         this.$toast({
175 176
           message: "你尚未创建机构,请先创建机构"
@@ -178,6 +179,7 @@ export default {
178 179
     },
179 180
     toOrgSetting() {
180 181
       if (this.isCreateOrg) {
182
+        this.$router.push("/editorg");
181 183
       } else {
182 184
         this.$toast({
183 185
           message: "你尚未创建机构,请先创建机构"
@@ -191,6 +193,8 @@ export default {
191 193
       };
192 194
       ChangeOrg(params).then(response => {
193 195
         if (response.data.state === 1) {
196
+          // 清除之前的数据
197
+
194 198
           var user = response.data.data.user;
195 199
           var admin = response.data.data.admin;
196 200
           var org = response.data.data.org;
@@ -234,6 +238,7 @@ export default {
234 238
           this.$router.push({ path: "/main" });
235 239
           break;
236 240
         case 8:
241
+          this.$router.push({ path: "/shop" });
237 242
           break;
238 243
         case 9:
239 244
           break;
@@ -455,4 +460,5 @@ export default {
455 460
   }
456 461
 }
457 462
 </style>
458
-<style lang="scss"></style>
463
+<style lang="scss">
464
+</style>

+ 2 - 1
src/pages/main/DialysisArea.vue Прегледај датотеку

@@ -290,9 +290,10 @@ export default {
290 290
   },
291 291
 
292 292
   created () {
293
-    this.user_id = this.$store.getters.user.user.id
293
+    this.user_id = this.$store.getters.user.admin.id
294 294
 
295 295
     var storedata = this.$store.getters.scheduals
296
+    console.log(storedata)
296 297
     var scheduals = storedata.scheduals
297 298
     if (Object.keys(storedata).length > 0) {
298 299
       var zoneMap = {}

+ 13 - 1
src/pages/main/dialog/AcceptsDialog.vue Прегледај датотеку

@@ -333,6 +333,8 @@ export default {
333 333
         } else {
334 334
           for (const key in response.data.data.receiveTreatmentAsses) {
335 335
             this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
336
+            this.accepts['id'] = 0
337
+            this.accepts['creater'] = 0
336 338
             this.receiveTreatmentAsses.way = this.accepts.way;
337 339
             this.receiveTreatmentAsses.consciousness =
338 340
               this.accepts.consciousness;
@@ -391,6 +393,9 @@ export default {
391 393
           } else {
392 394
             for (const key in response.data.data.receiveTreatmentAsses) {
393 395
               this.accepts[key] = response.data.data.receiveTreatmentAsses[key];
396
+              this.accepts['id'] = 0
397
+              this.accepts['creater'] = 0
398
+
394 399
               this.receiveTreatmentAsses.way = this.accepts.way;
395 400
               this.receiveTreatmentAsses.consciousness =
396 401
                 this.accepts.consciousness;
@@ -481,12 +486,19 @@ export default {
481 486
       return false;
482 487
     },
483 488
     commitInfo: function() {
489
+      let mode = 1
484 490
       Toast.loading({ forbidClick: true, duration: 0 });
485 491
       let ParamsQuery = this.receiveTreatmentAsses;
486 492
       // ParamsQuery["patient"] =  this.patient.id
487 493
       ParamsQuery["patient"] = this.$route.query.patient_id;
488 494
       ParamsQuery["record_date"] = this.record_date;
489
-
495
+      if (this.accepts.id > 0){
496
+        mode = 2
497
+        if(this.accepts.creater  != this.$store.getters.user.admin.id){
498
+          mode = 3
499
+        }
500
+      }
501
+      ParamsQuery["mode"] = mode;
490 502
       commitAcceptsAssessment(ParamsQuery).then(response => {
491 503
         if (response.data.state == 0) {
492 504
           Toast.fail(response.data.msg);

+ 12 - 4
src/pages/main/dialog/AssessmentDialog.vue Прегледај датотеку

@@ -1453,6 +1453,7 @@ export default {
1453 1453
       return name
1454 1454
     },
1455 1455
     commitInfo: function () {
1456
+      let mode = 1
1456 1457
       Toast.loading({ forbidClick: true, duration: 0 })
1457 1458
       if (this.formValue.dry_weight == undefined) {
1458 1459
         this.formValue.dry_weight = '0'
@@ -1462,11 +1463,21 @@ export default {
1462 1463
       // if (this.formValue.dry_weight == ""){
1463 1464
       //   this.formValue.
1464 1465
       // }
1466
+      console.log(this.predialysis)
1467
+
1468
+      if(this.predialysis.id > 0){
1469
+        mode = 2
1470
+        if(this.predialysis.creater != this.$store.getters.user.admin.id){
1471
+          mode = 3
1472
+        }
1473
+      }
1474
+
1465 1475
 
1466 1476
       EditAssessmentBeforeDislysis(
1467 1477
         this.$route.query.patient_id,
1468 1478
         this.record_date,
1469
-        this.formValue
1479
+        this.formValue,
1480
+        mode
1470 1481
       ).then(response => {
1471 1482
         if (response.data.state == 0) {
1472 1483
           Toast(response.data.msg)
@@ -1480,9 +1491,6 @@ export default {
1480 1491
       });
1481 1492
     },
1482 1493
     showDryWeight: function () {
1483
-      if (this.$store.getters.user.user.user_type == 3) {
1484
-        return
1485
-      }
1486 1494
       this.isShowDialog = false
1487 1495
       this.$refs.dry.open()
1488 1496
       this.propDryForm.doctor = []

+ 82 - 101
src/pages/main/dialog/ComputerDialog.vue Прегледај датотеку

@@ -5,8 +5,8 @@
5 5
       <div class="DialogTit">
6 6
         <span @click="close()" class="iconfont">&#xe6e9;</span>
7 7
         <h1 class="name">透析上机</h1>
8
-        <span class="success" v-if="this.record.id == 0 || this.$store.getters.user.user.id != this.creator"></span>
9
-        <span class="success" @click="modify()" v-if="isPremission|| this.$store.getters.user.user.id == this.creator">修改</span>
8
+        <span class="success" v-if="this.record.id ==0"></span>
9
+        <span class="success" @click="modify()" v-else>修改</span>
10 10
       </div>
11 11
 
12 12
       <div class="DialogContent ">
@@ -43,7 +43,7 @@
43 43
         <div class="item" v-if="template_id == 6">
44 44
           <label class="name" for="xll">引血(ml/min)</label>
45 45
           <div class="content">
46
-            <input type="tel" @focus="inputFocus"  id="xll" v-model="blood_drawing"/>
46
+            <input type="tel" @focus="inputFocus" id="xll" v-model="blood_drawing"/>
47 47
           </div>
48 48
         </div>
49 49
 
@@ -56,8 +56,6 @@
56 56
         </div>
57 57
 
58 58
 
59
-
60
-
61 59
         <div class="perform">
62 60
           <button @click="commitInfo" v-if="(record == null || record.id == '')">执行上机</button>
63 61
           <button :disabled="true" style="background-color:lightgray;" v-else>已上机</button>
@@ -77,7 +75,7 @@
77 75
 
78 76
 
79 77
 <script>
80
-  import {startDialysis,PostModifyStartDialysis,GetSchedualNumber} from '@/api/dialysis'
78
+  import {GetSchedualNumber, PostModifyStartDialysis, startDialysis} from '@/api/dialysis'
81 79
   import {Toast} from 'vant'
82 80
   import {parseTime} from '@/utils'
83 81
 
@@ -88,25 +86,26 @@
88 86
     components: {
89 87
       TwoMenu
90 88
     },
91
-    data () {
89
+    data() {
92 90
       return {
93 91
         start_time: new Date(),
94 92
         selecting: false,
95 93
         start_time_str: '',
96 94
         bed_id: 0,
95
+        isShow:false,
97 96
         nurse_id: 0,
98 97
         puncture_nurse_id: 0,
99 98
         isPremission: false,
100 99
         zone_beds: [], // 该排班的区里的床位
101 100
         creator: 0,
102 101
         template_id: 0,
103
-        temp_device_numbers:[],
104
-        blood_drawing:100,
105
-        schedual_type:0,
102
+        temp_device_numbers: [],
103
+        blood_drawing: 100,
104
+        schedual_type: 0,
106 105
         schedules_type: [
107
-          {id: 1, name:"上午"},
108
-          {id: 2, name:"下午"},
109
-          {id: 3, name:"晚上"},
106
+          {id: 1, name: "上午"},
107
+          {id: 2, name: "下午"},
108
+          {id: 3, name: "晚上"},
110 109
         ], // 该排班的区里的床位
111 110
       }
112 111
     },
@@ -135,32 +134,34 @@
135 134
       special_premission: {
136 135
         type: Array,
137 136
       },
138
-    }, mounted () {
137
+    }, mounted() {
139 138
 
140 139
 
141 140
     },
142
-    created () {
141
+    created() {
143 142
       this.temp_device_numbers = this.device_numbers
144 143
 
145 144
 
146
-
147 145
       if (this.record.id == 0) {
146
+        this.isShow = false
148 147
         this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
149 148
         let now = new Date()
150 149
         let hour = now.getHours()
151 150
 
152
-        if (hour >= 6 && hour < 12){
151
+        if (hour >= 6 && hour < 12) {
153 152
           this.schedual_type = 1
154 153
 
155
-        }else if(hour >= 12 && hour < 18){
154
+        } else if (hour >= 12 && hour < 18) {
156 155
 
157 156
           this.schedual_type = 2
158 157
 
159 158
 
160
-        }else if(hour >= 18){
159
+        } else if (hour >= 18) {
161 160
           this.schedual_type = 3
162 161
         }
163 162
       } else {
163
+        this.isShow = true
164
+
164 165
         if (this.record.start_time == 0) {
165 166
           this.start_time_str = parseTime(this.start_time, '{y}-{m}-{d} {h}:{i}') + ':00'
166 167
           this.schedual_type = this.record.schedual_type
@@ -191,11 +192,11 @@
191 192
       this.record_date = y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
192 193
 
193 194
       this.bed_id = (this.record == null || this.record.id == '') ? this.schedule.bed_id : this.record.bed_id
194
-      this.nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.start_nurse
195
-      this.puncture_nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.puncture_nurse
195
+      this.nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.admin.id : this.record.start_nurse
196
+      this.puncture_nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.admin.id : this.record.puncture_nurse
196 197
 
197 198
       if (this.puncture_nurse_id == 0) {
198
-        this.puncture_nurse_id = this.$store.getters.user.user.id
199
+        this.puncture_nurse_id = this.$store.getters.user.admin.id
199 200
       }
200 201
 
201 202
       // var beds = []
@@ -209,13 +210,13 @@
209 210
 
210 211
       for (let index = 0; index < this.temp_device_numbers.length; index++) {
211 212
         const device_number = this.temp_device_numbers[index]
212
-        this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
213
+        this.temp_device_numbers[index]['number'] = device_number['zone_name'] + '-' + device_number['number']
213 214
       }
214 215
       this.zone_beds = this.temp_device_numbers
215 216
 
216 217
       if (this.record.id > 0) {
217 218
         for (let i = 0; i < this.special_premission.length; i++) {
218
-          if (this.$store.getters.user.user.id == this.special_premission[i].admin_user_id) {
219
+          if (this.$store.getters.user.admin.id == this.special_premission[i].admin_user_id) {
219 220
             this.isPremission = true
220 221
           }
221 222
         }
@@ -230,53 +231,43 @@
230 231
       }
231 232
 
232 233
 
233
-
234 234
     },
235 235
     methods: {
236
-      getSchedualType:function(type){
237
-        for (let i = 0; i < this.schedules_type.length; i++){
238
-          if(this.schedules_type[i].id == type){
239
-            return  this.schedules_type[i].name
236
+      getSchedualType: function (type) {
237
+        for (let i = 0; i < this.schedules_type.length; i++) {
238
+          if (this.schedules_type[i].id == type) {
239
+            return this.schedules_type[i].name
240 240
           }
241 241
         }
242 242
       },
243
-      select_type:function(){
243
+      select_type: function () {
244 244
         if (this.record.id != 0) {
245
-          var creator = 0
246
-          if (this.record.creator == 0) {
247
-            creator = this.record.start_nurse
248
-          } else {
249
-            creator = this.record.creator
250
-          }
251 245
 
252
-          if (this.$store.getters.user.user.id == creator || this.isPremission) {
253
-            this.selecting = true
254
-            var t = this
255
-            this.$refs.selector.showSingleSelect(this.schedules_type, this.schedual_type, '选择班次', 'name', 'id', function (select_id) {
256
-              t.schedual_type = select_id
257
-
258
-              let ParamsQuery = {}
259
-              ParamsQuery['schedual_type'] = select_id
260
-              GetSchedualNumber(ParamsQuery).then(response => {
261
-                if (response.data.state == 0) {
262
-                  Toast.fail(response.data.msg)
263
-                  return false
264
-                } else {
265
-                  t.temp_device_numbers = response.data.data.number
266
-                  for (let index = 0; index < t.temp_device_numbers.length; index++) {
267
-                    const device_number = t.temp_device_numbers[index]
268
-                    t.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
269
-                  }
270
-                  t.zone_beds = t.temp_device_numbers
271
-                  t.bed_id = t.zone_beds[0].id
246
+          this.selecting = true
247
+          var t = this
248
+          this.$refs.selector.showSingleSelect(this.schedules_type, this.schedual_type, '选择班次', 'name', 'id', function (select_id) {
249
+            t.schedual_type = select_id
250
+
251
+            let ParamsQuery = {}
252
+            ParamsQuery['schedual_type'] = select_id
253
+            GetSchedualNumber(ParamsQuery).then(response => {
254
+              if (response.data.state == 0) {
255
+                Toast.fail(response.data.msg)
256
+                return false
257
+              } else {
258
+                t.temp_device_numbers = response.data.data.number
259
+                for (let index = 0; index < t.temp_device_numbers.length; index++) {
260
+                  const device_number = t.temp_device_numbers[index]
261
+                  t.temp_device_numbers[index]['number'] = device_number['zone_name'] + '-' + device_number['number']
272 262
                 }
273
-              })
274
-            }, function () {
275
-              t.selecting = false
263
+                t.zone_beds = t.temp_device_numbers
264
+                t.bed_id = t.zone_beds[0].id
265
+              }
276 266
             })
277
-          } else {
278
-            return
279
-          }
267
+          }, function () {
268
+            t.selecting = false
269
+          })
270
+
280 271
         }
281 272
         this.selecting = true
282 273
         var t = this
@@ -293,7 +284,7 @@
293 284
               t.temp_device_numbers = response.data.data.number
294 285
               for (let index = 0; index < t.temp_device_numbers.length; index++) {
295 286
                 const device_number = t.temp_device_numbers[index]
296
-                t.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
287
+                t.temp_device_numbers[index]['number'] = device_number['zone_name'] + '-' + device_number['number']
297 288
               }
298 289
               t.zone_beds = t.temp_device_numbers
299 290
               t.bed_id = t.zone_beds[0].id
@@ -306,7 +297,7 @@
306 297
         })
307 298
 
308 299
       },
309
-      GetSchedualNumber:function(){
300
+      GetSchedualNumber: function () {
310 301
         let ParamsQuery = {}
311 302
         ParamsQuery['schedual_type'] = this.schedual_type
312 303
         GetSchedualNumber(ParamsQuery).then(response => {
@@ -317,7 +308,7 @@
317 308
             this.temp_device_numbers = response.data.data.number
318 309
             for (let index = 0; index < this.temp_device_numbers.length; index++) {
319 310
               const device_number = this.temp_device_numbers[index]
320
-              this.temp_device_numbers[index]['number'] = device_number['zone_name']+'-'+device_number['number']
311
+              this.temp_device_numbers[index]['number'] = device_number['zone_name'] + '-' + device_number['number']
321 312
             }
322 313
             this.zone_beds = this.temp_device_numbers
323 314
           }
@@ -340,8 +331,13 @@
340 331
           rng.select()
341 332
         }
342 333
       },
343
-      modify(){
334
+      modify() {
344 335
         let ParamsQuery = {}
336
+        if (this.$store.getters.user.admin.id == this.record.creator) {
337
+          ParamsQuery['mode'] = "2"
338
+        } else {
339
+          ParamsQuery['mode'] = "3"
340
+        }
345 341
         ParamsQuery['schedual_type'] = this.schedual_type
346 342
         ParamsQuery['id'] = this.record.id
347 343
         ParamsQuery['nurse'] = this.nurse_id
@@ -376,17 +372,15 @@
376 372
             creator = this.record.creator
377 373
           }
378 374
 
379
-          if (this.$store.getters.user.user.id == creator || this.isPremission) {
380
-            this.$refs.start_time_picker.open()
381
-          } else {
382
-            return
383
-          }
375
+          this.$refs.start_time_picker.open()
376
+
384 377
         }
385 378
         this.$refs.start_time_picker.open()
386 379
       },
387 380
       commitInfo: function () {
388 381
         Toast.loading({forbidClick: true, duration: 0})
389 382
         let ParamsQuery = {}
383
+        ParamsQuery['mode'] = "1"
390 384
         ParamsQuery['schedual_type'] = this.schedual_type
391 385
         ParamsQuery['patient_id'] = this.patient_prop.id
392 386
         ParamsQuery['record_date'] = this.record_date
@@ -426,8 +420,6 @@
426 420
           } else {
427 421
             creator = this.record.creator
428 422
           }
429
-
430
-          if (this.$store.getters.user.user.id == creator || this.isPremission) {
431 423
             this.selecting = true
432 424
             var t = this
433 425
             this.$refs.selector.showSingleSelect(this.zone_beds, this.bed_id, '选择床位号', 'number', 'id', function (select_id) {
@@ -435,9 +427,7 @@
435 427
             }, function () {
436 428
               t.selecting = false
437 429
             })
438
-          } else {
439
-            return
440
-          }
430
+
441 431
         }
442 432
 
443 433
         this.selecting = true
@@ -456,7 +446,7 @@
456 446
           } else {
457 447
             creator = this.record.creator
458 448
           }
459
-          if (this.$store.getters.user.user.id == creator || this.isPremission) {
449
+
460 450
             this.selecting = true
461 451
             var t = this
462 452
             this.$refs.selector.showSingleSelect(this.admins, this.nurse_id, '选择上机护士', 'name', 'id', function (select_id) {
@@ -464,9 +454,7 @@
464 454
             }, function () {
465 455
               t.selecting = false
466 456
             })
467
-          } else {
468
-            return
469
-          }
457
+
470 458
         }
471 459
         this.selecting = true
472 460
         var t = this
@@ -483,7 +471,7 @@
483 471
           } else {
484 472
             creator = this.record.creator
485 473
           }
486
-          if (this.$store.getters.user.user.id == creator || this.isPremission) {
474
+
487 475
             this.selecting = true
488 476
             var t = this
489 477
             this.$refs.selector.showSingleSelect(this.admins, this.puncture_nurse_id, '选择穿刺护士', 'name', 'id', function (select_id) {
@@ -491,9 +479,7 @@
491 479
             }, function () {
492 480
               t.selecting = false
493 481
             })
494
-          } else {
495
-            return
496
-          }
482
+
497 483
         }
498 484
         this.selecting = true
499 485
         var t = this
@@ -510,11 +496,6 @@
510 496
     }, watch: {
511 497
       'record.id': function (val) {
512 498
         if (val > 0) {
513
-          for (let i = 0; i < this.special_premission.length; i++) {
514
-            if (this.$store.getters.user.user.id == this.special_premission[i].admin_user_id) {
515
-              this.isPremission = true
516
-            }
517
-          }
518 499
           if (this.record.creator == 0) {
519 500
             this.creator = this.record.start_nurse
520 501
           } else {
@@ -531,23 +512,23 @@
531 512
 </script>
532 513
 
533 514
 <style style="stylesheet/scss" lang="scss" scoped>
534
-.perform {
515
+  .perform {
535 516
   text-align: center;
536 517
   font-size: 0.3rem;
537 518
   padding-top: 2rem;
538 519
   .crew {
539
-    color: $pgh-color;
520
+  color: $pgh-color;
540 521
   }
541 522
   button {
542
-    background: $main-color;
543
-    color: #fff;
544
-    font-size: 0.45rem;
545
-    text-align: center;
546
-    width: 3rem;
547
-    height: 1.2rem;
548
-    line-height: 1.2rem;
549
-    border-radius: 4px;
550
-    margin-top: 10px;
523
+  background: $main-color;
524
+  color: #fff;
525
+  font-size: 0.45rem;
526
+  text-align: center;
527
+  width: 3rem;
528
+  height: 1.2rem;
529
+  line-height: 1.2rem;
530
+  border-radius: 4px;
531
+  margin-top: 10px;
532
+  }
551 533
   }
552
-}
553 534
 </style>

+ 5 - 0
src/pages/main/dialog/DoubleDialog.vue Прегледај датотеку

@@ -277,9 +277,14 @@ export default {
277 277
       Toast.loading({ forbidClick: true, duration: 0 });
278 278
       let ParamsQuery = this.doubleReview;
279 279
       // ParamsQuery["patient"] = this.patient.id
280
+      ParamsQuery['mode'] = "1"
280 281
       ParamsQuery["patient"] = this.$route.query.patient_id;
281 282
       ParamsQuery["record_date"] = this.record_date;
282 283
       ParamsQuery["check_time"] = this.check_time_str;
284
+      console.log(this.record)
285
+     if(this.record.id > 0){
286
+       ParamsQuery['mode'] = "2"
287
+     }
283 288
       commitDoubleCheck(ParamsQuery).then(response => {
284 289
         if (response.data.state == 0) {
285 290
           // this.$toast({message: response.data.msg});

Разлика између датотеке није приказан због своје велике величине
+ 474 - 454
src/pages/main/dialog/MonitDialog.vue


+ 63 - 62
src/pages/main/dialog/OrdersDialog.vue Прегледај датотеку

@@ -9,12 +9,11 @@
9 9
        <div class="yzNav" style="width:100%;">
10 10
         <span
11 11
           @click="openNewAdvice"
12
-          :class="{ forbid: this.$store.getters.user.user.user_type == 3 }"
13 12
         >新增</span>
14 13
         <span
15 14
           v-if="isShowExce"
16 15
           @click="execAdvice"
17
-          :class="{ forbid: (current_advice&& current_advice.parent_id > 0)||(this.$store.getters.user.user.user_type == 2 && !isPremission) }"
16
+          :class="{ forbid: (current_advice&& current_advice.parent_id > 0) }"
18 17
         >执行</span>
19 18
 
20 19
         <span
@@ -28,12 +27,12 @@
28 27
         <span
29 28
           v-if="template_id != 6"
30 29
           @click="checkAdvice"
31
-          :class="{ forbid: (current_advice&& current_advice.parent_id > 0) || (this.$store.getters.user.user.user_type == 2 && !isPremission) }"
30
+          :class="{ forbid: (current_advice&& current_advice.parent_id > 0)  }"
32 31
         >核对</span>
33 32
         <span
34 33
         id="fontSize"
35 34
           @click="openNewChild"
36
-          :class="{ forbid: current_advice == null || current_advice.parent_id > 0 ||  currentAdvices.length != 1 || this.$store.getters.user.user.user_type == 3 }"
35
+          :class="{ forbid: current_advice == null || current_advice.parent_id > 0 ||  currentAdvices.length != 1  }"
37 36
         >添加子药</span>
38 37
         <span
39 38
           v-if="currentSubAdvices.length <= 0"
@@ -46,8 +45,8 @@
46 45
           :class="{ forbid: current_group_index < 0 || currentAdvices.length <= 0 }"
47 46
         >删除</span>
48 47
 
49
-        <span id="fontSize" :class="{ forbid:this.$store.getters.user.user.user_type == 3}" v-if="currentSubAdvices.length > 0" @click="modifySubdviceAction">修改子医嘱</span>
50
-        <span id="fontSize" :class="{ forbid:this.$store.getters.user.user.user_type == 3}" v-if="currentSubAdvices.length > 0" @click="deleteSubAdviceAction">删除子医嘱</span>
48
+        <span id="fontSize"  v-if="currentSubAdvices.length > 0" @click="modifySubdviceAction">修改子医嘱</span>
49
+        <span id="fontSize"  v-if="currentSubAdvices.length > 0" @click="deleteSubAdviceAction">删除子医嘱</span>
51 50
       </div>
52 51
       <div class="DialogContent choose" id="dialogTop" style="height:6.5rem;">
53 52
 
@@ -316,7 +315,6 @@
316 315
         currentAdviceIdsStr: '',
317 316
         currentAdvices: [],
318 317
         currentSubAdvices: [],
319
-        isPremission:false,
320 318
 
321 319
       }
322 320
     },
@@ -349,12 +347,6 @@
349 347
         this.unitsObj[this.unitsOption[index].id] = this.unitsOption[index]
350 348
       }
351 349
 
352
-      for (let i = 0; i < this.special_premission.length; i++) {
353
-        if (this.$store.getters.user.user.id == this.special_premission[i].admin_user_id) {
354
-          this.isPremission = true
355
-        }
356
-      }
357
-
358 350
 
359 351
     },
360 352
     watch: {
@@ -388,15 +380,9 @@
388 380
 
389 381
     methods: {
390 382
       modifyExecAdvice: function () {
391
-        // if(!this.isPremission){
392
-        //   Toast.fail('你没有权限修改医嘱!')
393
-        // }else{
394
-
395
-
396 383
         this.nowExecTime = new Date(this.currentAdvices[0].execution_time * 1000)
397 384
           this.$refs.mofify_exec_time.open()
398 385
 
399
-        // }
400 386
 
401 387
       },
402 388
       didCreateAdvices: function (advices) {
@@ -438,6 +424,14 @@
438 424
 
439 425
       },
440 426
       didModifyAdvice: function (advice) {
427
+        let mode = "2"
428
+        console.log(advice.doctor_advice)
429
+        console.log( this.$store.getters.user.admin.id )
430
+
431
+        if (advice.doctor_advice != this.$store.getters.user.admin.id && advice.doctor_advice > 0){
432
+          mode = "3"
433
+          console.log("1111111")
434
+        }
441 435
         Toast.loading({forbidClick: true, duration: 0})
442 436
         EditDoctorAdvice(advice.id, {
443 437
           advice_name: advice.title,
@@ -452,7 +446,7 @@
452 446
           single_dose_unit: advice.single_dose_unit,
453 447
           prescribing_number: String(advice.prescribing_number),
454 448
           prescribing_number_unit: advice.prescribing_number_unit
455
-        })
449
+        },mode)
456 450
           .then(rs => {
457 451
             if (rs.data.state == 1) {
458 452
               var resp_advice = rs.data.data.advice
@@ -550,7 +544,8 @@
550 544
       },
551 545
       didAddSubdrug: function (subdrug) {
552 546
         Toast.loading({forbidClick: true, duration: 0})
553
-        CreateDoctorAdvice(this.patient.id, {
547
+        let mode = "1"
548
+        CreateDoctorAdvice(this.patient.id,{
554 549
           parent_id: subdrug.parent_id,
555 550
           advice_type: 2,
556 551
           advice_date: subdrug.record_time,
@@ -565,7 +560,7 @@
565 560
           prescribing_number_unit: subdrug.prescribing_number_unit
566 561
           // delivery_way: subdrug.delivery_way,
567 562
           // execution_frequency: subdrug.execution_frequency
568
-        })
563
+        }, mode)
569 564
           .then(response => {
570 565
             if (response.data.state == 0) {
571 566
               Toast.fail(response.data.msg)
@@ -673,7 +668,7 @@
673 668
             execution_time: exceTime
674 669
           }
675 670
         }
676
-
671
+        exceParams['mode'] = 8
677 672
         ModifyExecDoctorAdvice(exceParams)
678 673
           .then(response => {
679 674
             if (response.data.state == 0) {
@@ -729,6 +724,7 @@
729 724
           }
730 725
         }
731 726
         Toast.loading({forbidClick: true, duration: 0})
727
+        exceParams['mode'] = "6"
732 728
         ExecDoctorAdvice(exceParams)
733 729
           .then(response => {
734 730
             if (response.data.state == 0) {
@@ -795,7 +791,14 @@
795 791
           message: '确认删除医嘱吗?'
796 792
         }).then(() => {
797 793
           Toast.loading({forbidClick: true, duration: 0})
798
-          DeleteSubDoctorAdvice(this.currentSubAdvices[0].id)
794
+          let is_sub = 1
795
+          let mode = "4"
796
+          console.log(this.currentSubAdvices)
797
+          if (this.currentSubAdvices[0].advice_doctor != this.$store.getters.user.admin.id&& this.currentSubAdvices[0].advice_doctor>0) {
798
+            mode = "5"
799
+          }
800
+
801
+          DeleteDoctorAdviceNew(0,this.currentSubAdvices[0].id,mode,is_sub)
799 802
             .then(rs => {
800 803
               if (rs.data.state == 1) {
801 804
                 Toast.success('删除成功')
@@ -815,7 +818,6 @@
815 818
                 }
816 819
 
817 820
               } else {
818
-
819 821
                 Toast.fail(rs.data.msg)
820 822
               }
821 823
             })
@@ -843,29 +845,33 @@
843 845
             }
844 846
             advice_id = ids.join(',')
845 847
 
846
-            DeleteDoctorAdviceNew(group_no, advice_id)
848
+            let mode = "4"
849
+            if (this.currentAdvices[0].advice_doctor != this.$store.getters.user.admin.id&& this.currentAdvices[0].advice_doctor>0) {
850
+              mode = "5"
851
+            }
852
+            let is_sub = 2
853
+            DeleteDoctorAdviceNew(group_no, advice_id,mode,is_sub)
847 854
               .then(rs => {
848 855
                 if (rs.data.state == 1) {
849
-                  Toast.success('删除成功')
850
-                  var adviceArr = this.advice_groups[this.current_group_index].advices
856
+                    Toast.success('删除成功')
857
+                    var adviceArr = this.advice_groups[this.current_group_index].advices
851 858
 
852
-                  for (let y = ids.length - 1; y >= 0; y--) {
853
-                    for (let i = adviceArr.length - 1; i >= 0; i--) {
854
-                      if (adviceArr[i].id == ids[y] || adviceArr[i].parent_id == ids[y]) {
855
-                        adviceArr.splice(i, 1)
859
+                    for (let y = ids.length - 1; y >= 0; y--) {
860
+                      for (let i = adviceArr.length - 1; i >= 0; i--) {
861
+                        if (adviceArr[i].id == ids[y] || adviceArr[i].parent_id == ids[y]) {
862
+                          adviceArr.splice(i, 1)
863
+                        }
856 864
                       }
857 865
                     }
858
-                  }
859
-                  this.currentSubAdvices = []
860
-                  this.currentAdvices = []
861
-                  for (let i = 0; i < this.advice_groups.length; i++) {
862
-                    for (let y = 0; y < this.advice_groups[i].advices.length; y++) {
863
-                      var advices = this.advice_groups[i].advices[y]
864
-                      advices.is_selected = 0
866
+                    this.currentSubAdvices = []
867
+                    this.currentAdvices = []
868
+                    for (let i = 0; i < this.advice_groups.length; i++) {
869
+                      for (let y = 0; y < this.advice_groups[i].advices.length; y++) {
870
+                        var advices = this.advice_groups[i].advices[y]
871
+                        advices.is_selected = 0
872
+                      }
865 873
                     }
866
-                  }
867
-
868
-                } else {
874
+                }else{
869 875
                   Toast.fail(rs.data.msg)
870 876
                 }
871 877
               })
@@ -893,7 +899,12 @@
893 899
               advice_id = this.current_advice.id
894 900
             }
895 901
 
896
-            DeleteDoctorAdviceNew(group_no, advice_id)
902
+            let mode = "4"
903
+            if (group.advices[0].advice_doctor != this.$store.getters.user.admin.id&&  group.advices[0].advice_doctor>0) {
904
+              mode = "5"
905
+            }
906
+            let is_sub = 2
907
+            DeleteDoctorAdviceNew(group_no, advice_id,mode,is_sub)
897 908
               .then(rs => {
898 909
                 if (rs.data.state == 1) {
899 910
                   Toast.success('删除成功')
@@ -944,9 +955,7 @@
944 955
         }
945 956
       },
946 957
       checkAdvice () {
947
-        if (this.$store.getters.user.user.user_type == 2 && !this.isPremission){
948
-          return
949
-        }
958
+
950 959
         if (this.currentAdvices.length <= 0) {
951 960
           return
952 961
         }
@@ -965,7 +974,7 @@
965 974
           }
966 975
 
967 976
           for (let i = 0; i < adviceArr.length; i++) {
968
-            if (adviceArr[i].is_selected == 1 && adviceArr[i].execution_staff > 0 && adviceArr[i].execution_staff == this.$store.getters.user.user.id) {
977
+            if (adviceArr[i].is_selected == 1 && adviceArr[i].execution_staff > 0 && adviceArr[i].execution_staff == this.$store.getters.user.admin.id) {
969 978
               Toast.fail('核对与执行不能是同一人')
970 979
               return false
971 980
             }
@@ -1001,7 +1010,7 @@
1001 1010
           }
1002 1011
 
1003 1012
           for (let i = 0; i < adviceArr.length; i++) {
1004
-            if (adviceArr[i].is_selected == 1 && adviceArr[i].execution_staff > 0 && adviceArr[i].execution_staff == this.$store.getters.user.user.id) {
1013
+            if (adviceArr[i].is_selected == 1 && adviceArr[i].execution_staff > 0 && adviceArr[i].execution_staff == this.$store.getters.user.admin.id) {
1005 1014
               Toast.fail('核对与执行不能是同一人')
1006 1015
               return false
1007 1016
             }
@@ -1035,6 +1044,7 @@
1035 1044
             }
1036 1045
           }
1037 1046
 
1047
+          params['mode'] = "7"
1038 1048
           CheckDoctorAdvice(params)
1039 1049
             .then(response => {
1040 1050
               if (response.data.state == 0) {
@@ -1077,9 +1087,6 @@
1077 1087
         // });
1078 1088
       },
1079 1089
       execAdvice () {
1080
-        if (this.$store.getters.user.user.user_type == 2 && !this.isPremission){
1081
-          return
1082
-        }
1083 1090
 
1084 1091
         if (this.currentAdvices.length <= 0) {
1085 1092
           return
@@ -1098,7 +1105,7 @@
1098 1105
           }
1099 1106
 
1100 1107
           for (let i = 0; i < adviceArr.length; i++) {
1101
-            if (adviceArr[i].is_selected == 1 && adviceArr[i].checker > 0 && adviceArr[i].checker == this.$store.getters.user.user.id) {
1108
+            if (adviceArr[i].is_selected == 1 && adviceArr[i].checker > 0 && adviceArr[i].checker == this.$store.getters.user.admin.id) {
1102 1109
               Toast.fail('核对与执行不能是同一人')
1103 1110
               return false
1104 1111
             }
@@ -1131,7 +1138,7 @@
1131 1138
           }
1132 1139
 
1133 1140
           for (let i = 0; i < adviceArr.length; i++) {
1134
-            if (adviceArr[i].is_selected == 1 && adviceArr[i].checker > 0 && adviceArr[i].checker == this.$store.getters.user.user.id) {
1141
+            if (adviceArr[i].is_selected == 1 && adviceArr[i].checker > 0 && adviceArr[i].checker == this.$store.getters.user.admin.id) {
1135 1142
               Toast.fail('核对与执行不能是同一人')
1136 1143
               return false
1137 1144
             }
@@ -1142,10 +1149,6 @@
1142 1149
         this.$refs.exec_time.open()
1143 1150
       },
1144 1151
       openNewChild () {
1145
-        if (this.$store.getters.user.user.user_type == 3) {
1146
-          Toast.fail('你没有权限添加子药!')
1147
-          return
1148
-        }
1149 1152
 
1150 1153
         if (this.current_advice == null){
1151 1154
           return
@@ -1181,11 +1184,6 @@
1181 1184
         return
1182 1185
       },
1183 1186
       openNewAdvice () {
1184
-        if (this.$store.getters.user.user.user_type == 3) {
1185
-          Toast.fail('你没有权限新增医嘱!')
1186
-          return
1187
-        }
1188
-
1189 1187
         this.currentAdvices = []
1190 1188
         this.currentSubAdvices = []
1191 1189
         for (let i = 0; i < this.advice_groups.length; i++) {
@@ -1207,11 +1205,13 @@
1207 1205
         if (this.current_advice_index >= 0) {
1208 1206
           this.index = 3
1209 1207
           var advice = this.currentSubAdvices[0]
1208
+          console.log(advice)
1210 1209
           this.$refs.modify_advice_form.showWithModify({
1211 1210
             id: advice.id,
1212 1211
             parent_id: advice.parent_id,
1213 1212
             title: advice.advice_name,
1214 1213
             advice_desc: advice.advice_desc,
1214
+            advice_doctor: advice.advice_doctor,
1215 1215
             remark: advice.remark,
1216 1216
             drug_spec: advice.drug_spec,
1217 1217
             drug_spec_unit: advice.drug_spec_unit,
@@ -1242,6 +1242,7 @@
1242 1242
             parent_id: advice.parent_id,
1243 1243
             title: advice.advice_name,
1244 1244
             advice_desc: advice.advice_desc,
1245
+            advice_doctor: advice.advice_doctor,
1245 1246
             remark: advice.remark,
1246 1247
             start_time: advice.start_time,
1247 1248
             drug_spec: advice.drug_spec,

+ 2 - 2
src/pages/main/dialog/OrdersDialog_olddddd.vue Прегледај датотеку

@@ -709,7 +709,7 @@ export default {
709 709
 
710 710
       if (
711 711
         this.currentRow.execution_staff > 0 &&
712
-        this.currentRow.execution_staff == this.$store.getters.user.user.id
712
+        this.currentRow.execution_staff == this.$store.getters.user.admin.id
713 713
       ) {
714 714
         Toast.fail('核对与执行不能是同一人')
715 715
         return false
@@ -777,7 +777,7 @@ export default {
777 777
 
778 778
       if (
779 779
         this.currentRow.checker > 0 &&
780
-        this.currentRow.checker == this.$store.getters.user.user.id
780
+        this.currentRow.checker == this.$store.getters.user.admin.id
781 781
       ) {
782 782
         Toast.fail('核对与执行不能是同一人')
783 783
         return false

+ 17 - 56
src/pages/main/dialog/PlaneDialog.vue Прегледај датотеку

@@ -7,17 +7,13 @@
7 7
 
8 8
         <span
9 9
           class="success"
10
-          v-if="
11
-            this.record.state == 1 ||
12
-              this.$store.getters.user.user.id != this.creator
13
-          "
10
+          v-if="this.record.stage == 1"
14 11
         ></span>
15 12
         <span
13
+          v-else
16 14
           class="success"
17 15
           @click="modify()"
18
-          v-if="isPremission || this.$store.getters.user.user.id == this.creator"
19
-          >修改</span
20
-        >
16
+          >修改</span>
21 17
       </div>
22 18
 
23 19
       <div class="DialogContent">
@@ -184,21 +180,12 @@ export default {
184 180
     if (this.record == null || this.record.id == "") {
185 181
       this.nurse_id = 0;
186 182
     } else if (this.record.stage == 1) {
187
-      this.nurse_id = this.$store.getters.user.user.id;
183
+      this.nurse_id = this.$store.getters.user.admin.id;
188 184
     } else {
189 185
       this.nurse_id = this.record.finish_nurse;
190 186
     }
191 187
 
192
-    if (this.record.id > 0) {
193
-      for (let i = 0; i < this.special_premission.length; i++) {
194
-        if (
195
-          this.$store.getters.user.user.id ==
196
-          this.special_premission[i].admin_user_id
197
-        ) {
198
-          this.isPremission = true;
199
-        }
200
-      }
201
-    }
188
+
202 189
 
203 190
     if (this.record.id > 0) {
204 191
       if (this.record.finish_creator == 0) {
@@ -222,6 +209,11 @@ export default {
222 209
       ParamsQuery["id"] = this.record.id;
223 210
       ParamsQuery["nurse"] = this.nurse_id;
224 211
       ParamsQuery["end_time"] = this.end_time_str;
212
+      ParamsQuery["mode"] = "2";
213
+      if(this.$store.getters.user.admin.id != this.record.finish_creator){
214
+        ParamsQuery["mode"] = "3";
215
+      }
216
+
225 217
       PostModifyEndDialysis(ParamsQuery).then(response => {
226 218
         if (response.data.state == 0) {
227 219
           Toast.fail(response.data.msg);
@@ -244,20 +236,9 @@ export default {
244 236
     selectStartTimeAction: function() {
245 237
       if (this.record.id != 0) {
246 238
         if (this.record.end_time > 0) {
247
-          var creator = 0;
248
-          if (this.record.finish_creator == 0) {
249
-            creator = this.record.finish_nurse;
250
-          } else {
251
-            creator = this.record.finish_creator;
252
-          }
253
-          if (
254
-            this.$store.getters.user.user.id == creator ||
255
-            this.isPremission
256
-          ) {
257
-            this.$refs.start_time_picker.open();
258
-          } else {
259
-            return;
260
-          }
239
+
240
+          this.$refs.start_time_picker.open();
241
+
261 242
         } else {
262 243
           this.$refs.start_time_picker.open();
263 244
         }
@@ -272,6 +253,8 @@ export default {
272 253
       ParamsQuery["record_date"] = this.record_date;
273 254
       ParamsQuery["nurse"] = this.nurse_id;
274 255
       ParamsQuery["end_time"] = this.end_time_str;
256
+      ParamsQuery["mode"] = "1";
257
+
275 258
 
276 259
       finish(ParamsQuery).then(response => {
277 260
         if (response.data.state == 0) {
@@ -314,16 +297,7 @@ export default {
314 297
             }
315 298
           );
316 299
         } else {
317
-          var creator = 0;
318
-          if (this.record.finish_creator == 0) {
319
-            creator = this.record.finish_nurse;
320
-          } else {
321
-            creator = this.record.finish_creator;
322
-          }
323
-          if (
324
-            this.$store.getters.user.user.id == creator ||
325
-            this.isPremission
326
-          ) {
300
+
327 301
             this.selecting = true;
328 302
             var t = this;
329 303
             this.$refs.selector.showSingleSelect(
@@ -340,9 +314,7 @@ export default {
340 314
                 t.selecting = false;
341 315
               }
342 316
             );
343
-          } else {
344
-            return;
345
-          }
317
+
346 318
         }
347 319
       }
348 320
     },
@@ -354,23 +326,12 @@ export default {
354 326
   watch: {
355 327
     "record.stage": function(val) {
356 328
       if (val == 2) {
357
-        for (let i = 0; i < this.special_premission.length; i++) {
358
-          if (
359
-            this.$store.getters.user.user.id ==
360
-            this.special_premission[i].admin_user_id
361
-          ) {
362
-            this.isPremission = true;
363
-          }
364
-        }
365 329
         if (this.record.finish_nurse == 0) {
366 330
           this.creator = this.record.finish_nurse;
367 331
         } else {
368 332
           this.creator = this.record.finish_creator;
369 333
         }
370 334
       }
371
-
372
-      console.log(this.creator);
373
-      console.log(this.$store.getters.user.user.id);
374 335
     }
375 336
   }
376 337
 };

Разлика између датотеке није приказан због своје велике величине
+ 1733 - 1424
src/pages/main/dialog/PrescriptionDialog.vue


+ 7 - 0
src/pages/main/dialog/ThorougDialog.vue Прегледај датотеку

@@ -1403,6 +1403,13 @@ export default {
1403 1403
       let ParamsQuery = this.formValue
1404 1404
       ParamsQuery['patient'] = this.$route.query.patient_id
1405 1405
       ParamsQuery['record_date'] = this.record_date
1406
+      ParamsQuery['mode'] = "1"
1407
+      if(this.record.creater > 0){
1408
+        ParamsQuery['mode'] = "2"
1409
+        if(this.$store.getters.user.admin.id != this.record.creater){
1410
+          ParamsQuery['mode'] = "3"
1411
+        }
1412
+      }
1406 1413
       commitAssessmentAfterDislysis(ParamsQuery).then(response => {
1407 1414
         if (response.data.state == 0) {
1408 1415
           Toast.fail(response.data.msg)

+ 9 - 0
src/pages/main/dialog/TreatmentDialog.vue Прегледај датотеку

@@ -287,6 +287,15 @@ export default {
287 287
       let ParamsQuery = this.dialysisSummary;
288 288
       ParamsQuery["patient"] = this.$route.query.patient_id;
289 289
       ParamsQuery["record_date"] = this.record_date;
290
+      ParamsQuery["mode"] = "1";
291
+
292
+      if (this.record.id > 0){
293
+        ParamsQuery["mode"] = "2";
294
+        if(this.record.creater != this.$store.getters.user.admin.id){
295
+          ParamsQuery["mode"] = "3";
296
+        }
297
+      }
298
+
290 299
       commitTreatmentSummary(ParamsQuery).then(response => {
291 300
         if (response.data.state == 0) {
292 301
           Toast.fail(response.data.msg);

+ 10 - 1
src/pages/main/dialog/modify_order/ModifyAdviceGroup.vue Прегледај датотеку

@@ -295,6 +295,15 @@ export default {
295 295
     },
296 296
     didModifyAdvice: function(advice) {
297 297
       this.loading = true;
298
+
299
+      let mode = "2"
300
+      console.log(advice.advice_doctor)
301
+      console.log(console.log(advice.advice_doctor))
302
+
303
+      if(advice.advice_doctor != this.$store.getters.user.admin.id && advice.advice_doctor>0){
304
+         mode = "3"
305
+      }
306
+
298 307
       EditDoctorAdvice(advice.id, {
299 308
         advice_name: advice.title,
300 309
         advice_desc: advice.advice_desc,
@@ -307,7 +316,7 @@ export default {
307 316
         prescribing_number: String(advice.prescribing_number),
308 317
         prescribing_number_unit: advice.prescribing_number_unit,
309 318
         drug_spec_unit: advice.drug_spec_unit
310
-      })
319
+      },mode)
311 320
         .then(rs => {
312 321
           if (rs.data.state == 1) {
313 322
             var resp_advice = rs.data.data.advice;

+ 4 - 1
src/pages/main/dialog/modify_order/modify_order_form.vue Прегледај датотеку

@@ -235,6 +235,7 @@ export default {
235 235
         parent_id: 0,
236 236
         // start_time: "",
237 237
         // record_time: "",
238
+        advice_doctor:0,
238 239
         title: "",
239 240
         advice_desc: "",
240 241
         drug_spec: "",
@@ -274,6 +275,7 @@ export default {
274 275
       this.order.title = order.title;
275 276
       this.order.advice_desc = order.advice_desc;
276 277
       this.order.remark = order.remark;
278
+      this.order.advice_doctor = order.advice_doctor
277 279
 
278 280
       this.start_time_str =
279 281
         parseTime(order.start_time, "{y}-{m}-{d} {h}:{i}") + ":00";
@@ -324,7 +326,8 @@ export default {
324 326
           prescribing_number_unit: this.order.prescribing_number_unit,
325 327
           start_time: this.start_time_str,
326 328
           drug_spec: this.order.drug_spec,
327
-          drug_spec_unit: this.order.drug_spec_unit
329
+          drug_spec_unit: this.order.drug_spec_unit,
330
+          doctor_advice: this.order.advice_doctor,
328 331
         });
329 332
       }
330 333
     },

+ 2 - 1
src/pages/main/dialog/new_order/AddNewOrders.vue Прегледај датотеку

@@ -347,7 +347,8 @@ export default {
347 347
       // console.log(adviceJSONs)
348 348
 
349 349
       this.loading = true;
350
-      batchCreateAdvices(this.patient_id, this.group_no, data)
350
+      let mode = "1"
351
+      batchCreateAdvices(this.patient_id, this.group_no, data,mode)
351 352
         .then(rs => {
352 353
           this.loading = false;
353 354
           var resp = rs.data;

+ 9 - 3
src/pages/main/dialog/subMenu/dryWeightMenu.vue Прегледај датотеку

@@ -50,6 +50,7 @@
50 50
 <script>
51 51
 import TwoMenu from "../TwoMenu";
52 52
 import { CreateDryWeight } from "@/api/dialysis";
53
+import { Toast } from 'vant'
53 54
 
54 55
 export default {
55 56
   name: "dryWeightMenu",
@@ -69,7 +70,7 @@ export default {
69 70
   },
70 71
   methods: {
71 72
     open() {
72
-      this.creator = this.$store.getters.user.user.id;
73
+      this.creator = this.$store.getters.user.admin.id;
73 74
       this.dry_weight = this.propsForm.weight;
74 75
       this.visibility = true;
75 76
     },
@@ -84,13 +85,18 @@ export default {
84 85
         id: this.$route.query.patient_id,
85 86
         dry_weight: this.dry_weight,
86 87
         remark: this.remark,
87
-        doctor_id: this.creator
88
+        doctor_id: this.creator,
89
+        mode: "1",
88 90
       };
89 91
       CreateDryWeight(params).then(rs => {
90 92
         var res = rs.data;
91 93
         if (res.state == 1) {
92
-          this.$message.success("提交成功");
94
+          Toast("提交成功");
93 95
           this.$emit("menu-comfirm-two", res.data.weight);
96
+        }else {
97
+          // this.$message.success("提交成功");
98
+
99
+          Toast(rs.data.msg)
94 100
         }
95 101
       });
96 102
     },

+ 1 - 1
src/pages/main/dialysis/AdviceTable.vue Прегледај датотеку

@@ -1508,7 +1508,7 @@ export default {
1508 1508
     // this.fetchAllAdminUsers();
1509 1509
     this.queryParams.id = this.$route.query.patient_id;
1510 1510
     this.doctor = this.$store.getters.user.user.user_name;
1511
-    this.doctor_id = this.$store.getters.user.user.id;
1511
+    this.doctor_id = this.$store.getters.user.admin.id;
1512 1512
     this.patient_id = this.$route.query.patient_id;
1513 1513
 
1514 1514
     var date = new Date();

+ 2 - 5
src/pages/main/today/dialysisMonitoring.vue Прегледај датотеку

@@ -29,8 +29,7 @@
29 29
           <th v-if="isShow('置换量')&& template_id == 6" width="50px">置换量(ml)</th>
30 30
           <th v-if="isShow('置换量')&& template_id != 6" width="50px">置换量(L)</th>
31 31
 
32
-
33
-          <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
32
+          <th v-if="isShow('电导度')" width="92px">电导度(mS/cm)</th>
34 33
           <th v-if="isShow('置换液流量')" width="92px">置换液流量(ml/h)</th>
35 34
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
36 35
           <th v-if="isShow('处理')" width="92px">处理</th>
@@ -54,8 +53,6 @@
54 53
             {{ item.pulse_frequency ? item.pulse_frequency : "" }}
55 54
           </td>
56 55
 
57
-
58
-
59 56
           <td v-if="isShow('呼吸频率')">
60 57
             {{ item.breathing_rate ? item.breathing_rate : "" }}
61 58
           </td>
@@ -195,7 +192,7 @@
195 192
       </span>
196 193
 
197 194
       <span v-if="isShow('电导度')">
198
-        <el-table-column prop="zip" label="电导度(mS/m)" width="200" align="center">
195
+        <el-table-column prop="zip" label="电导度(mS/cm)" width="200" align="center">
199 196
           <template slot-scope="scope">{{scope.row.conductivity?scope.row.conductivity:''}}</template>
200 197
         </el-table-column>
201 198
       </span>

+ 313 - 270
src/pages/main/today/dialysisPrescription.vue Прегледај датотеку

@@ -117,20 +117,17 @@
117 117
           <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_zongliang != '0'?"ml":""}}</span>
118 118
         </li>
119 119
 
120
-
121 120
         <li v-if="isShow('钙名称')&&this.prescription.anticoagulant == 5">
122 121
           <label>钙名称: </label>
123 122
           <span class="content">{{this.prescription.anticoagulant_gaimingcheng}}</span>
124 123
         </li>
125 124
 
126
-
127 125
         <li v-if="isShow('钙剂量')&&this.prescription.anticoagulant == 5">
128 126
           <label>钙剂量: </label>
129 127
           <span class="content">{{this.prescription.anticoagulant_gaijiliang}}</span>
130 128
           <span class="unit" v-if="this.prescription.anticoagulant == 5">{{'ml'}}</span>
131 129
         </li>
132 130
 
133
-
134 131
         <li v-if="isShow('钠')">
135 132
           <label>钠 : </label>
136 133
           <span class="content">{{sodium != '0'?sodium:""}}</span>
@@ -204,7 +201,7 @@
204 201
         <li v-if="isShow('电导度')">
205 202
           <label>电导度 : </label>
206 203
           <span class="content">{{conductivity != '0'?conductivity:""}}</span>
207
-          <span class="unit">{{conductivity != '0'?"mS/m":""}}</span>
204
+          <span class="unit">{{conductivity != '0'?"mS/cm":""}}</span>
208 205
         </li>
209 206
 
210 207
       </ul>
@@ -214,291 +211,337 @@
214 211
 </template>
215 212
 
216 213
 <script>
217
-  import {getDataConfig} from '@/utils/data'
218
-  export default {
219
-    name: 'DialysisPrescription',
220
-    data () {
221
-      return {
222
-        title: '透析处方',
223
-        perfusion_apparatus_map: {},
224
-        dialysateFormulationMap: {}
214
+import { getDataConfig } from "@/utils/data";
215
+export default {
216
+  name: "DialysisPrescription",
217
+  data() {
218
+    return {
219
+      title: "透析处方",
220
+      perfusion_apparatus_map: {},
221
+      dialysateFormulationMap: {}
222
+    };
223
+  },
224
+  props: {
225
+    prescription: {
226
+      type: Object
227
+    },
228
+    solution: {
229
+      type: Object
230
+    },
231
+    device_number_map: {
232
+      type: Object
233
+    }
234
+  },
235
+  computed: {
236
+    target_ultrafiltration: function() {
237
+      var v = this.getValueStr(
238
+        "target_ultrafiltration",
239
+        "target_ultrafiltration"
240
+      );
241
+      v = this.getFloat(v);
242
+      return v.length == 0 ? "0" : v;
243
+    },
244
+    dialysis_mode: function() {
245
+      var mode = this.getValueStr("mode_id", "mode_id");
246
+      if (mode.length == 0) {
247
+        return "";
225 248
       }
249
+      if (this.$store.getters.treatment_mode[mode] != undefined) {
250
+        return this.$store.getters.treatment_mode[mode].name;
251
+      }
252
+      return "";
226 253
     },
227
-    props: {
228
-      prescription: {
229
-        type: Object
230
-      },
231
-      solution: {
232
-        type: Object
233
-      },
234
-      device_number_map: {
235
-        type: Object
254
+    perfusion_apparatus: function() {
255
+      var v = this.getValueStr("perfusion_apparatus", "perfusion_apparatus");
256
+      if (v.length == 0) {
257
+        return "";
258
+      }
259
+      if (this.perfusion_apparatus_map[v] != undefined) {
260
+        return this.perfusion_apparatus_map[v].name;
236 261
       }
262
+      return "";
263
+    },
264
+    displace_liqui: function() {
265
+      var v = this.getValueStr("displace_liqui", "displace_liqui");
266
+      return v.length == 0 ? "0" : v;
267
+    },
268
+    anticoagulant_shouji: function() {
269
+      var v = this.getValueStr("anticoagulant_shouji", "anticoagulant_shouji");
270
+      return v.length == 0 ? "0" : v;
271
+    },
272
+    kalium: function() {
273
+      var v = this.getValueStr("kalium", "kalium");
274
+      v = this.getFloat(v);
275
+      return v == 0 ? "0" : v;
276
+    },
277
+    replacement_total: function() {
278
+      var v = this.getValueStr("replacement_total", "replacement_total");
279
+      return v.length == 0 ? "0" : v;
280
+    },
281
+    bicarbonate: function() {
282
+      var v = this.getValueStr("bicarbonate", "bicarbonate");
283
+      return v.length == 0 ? "0" : v;
284
+    },
285
+    dialysate_flow: function() {
286
+      var v = this.getValueStr("dialysate_flow", "dialysate_flow");
287
+      return v.length == 0 ? "0" : v;
288
+    },
289
+    dialysis_duration: function() {
290
+      var dialysis_duration_hour = this.getValueStr(
291
+        "dialysis_duration_hour",
292
+        "dialysis_duration_hour"
293
+      );
294
+      var dialysis_duration_minute = this.getValueStr(
295
+        "dialysis_duration_minute",
296
+        "dialysis_duration_minute"
297
+      );
298
+      if (
299
+        dialysis_duration_hour.length == 0 &&
300
+        dialysis_duration_minute.length == 0
301
+      ) {
302
+        return "0";
303
+      } else {
304
+        var time =
305
+          dialysis_duration_hour + "h" + dialysis_duration_minute + "min";
306
+        return time.length == 0 ? "0" : time;
307
+      }
308
+    },
309
+    blood_flow_volume: function() {
310
+      var v = this.getValueStr("blood_flow_volume", "blood_flow_volume");
311
+      return v.length == 0 ? "0" : v;
312
+    },
313
+    replacement_way: function() {
314
+      return this.getValueStr("replacement_way", "replacement_way");
315
+    },
316
+    anticoagulant_weichi: function() {
317
+      var v = this.getValueStr("anticoagulant_weichi", "anticoagulant_weichi");
318
+      return v.length == 0 ? "0" : v;
319
+    },
320
+    sodium: function() {
321
+      var v = this.getValueStr("sodium", "sodium");
322
+      console.log(v);
323
+      v = this.getFloat(v);
324
+      console.log(v);
325
+      return v == 0 ? "0" : v;
326
+    },
327
+    glucose: function() {
328
+      var v = this.getValueStr("glucose", "glucose");
329
+      return v.length == 0 ? "0" : v;
330
+    },
331
+    dialysate_temperature: function() {
332
+      var v = this.getValueStr(
333
+        "dialysate_temperature",
334
+        "dialysate_temperature"
335
+      );
336
+      return v.length == 0 ? "0" : v;
337
+    },
338
+    dialyzer: function() {
339
+      var v = this.getValueStr("dialyzer", "hemodialysis_machine");
340
+      if (v.length == 0) {
341
+        return "";
342
+      }
343
+      if (this.device_number_map[v] != undefined) {
344
+        return this.device_number_map[v].name;
345
+      }
346
+      return "";
347
+    },
348
+    dialysate_formulation: function() {
349
+      var v = this.getValueStr(
350
+        "dialysate_formulation",
351
+        "dialysate_formulation"
352
+      );
353
+      if (v.length == 0) {
354
+        return "";
355
+      }
356
+      if (v in this.dialysateFormulationMap) {
357
+        return this.dialysateFormulationMap[v].name;
358
+      }
359
+      return "";
360
+    },
361
+    prescription_dewatering: function() {
362
+      var v = this.getValueStr("prescription_dewatering", "dewater");
363
+      return v.length == 0 ? "0" : v;
364
+    },
365
+    anticoagulant: function() {
366
+      var v = this.getValueStr("anticoagulant", "anticoagulant");
367
+      if (v.length == 0) {
368
+        return "";
369
+      }
370
+      if (this.$store.getters.anticoagulants_confit[v] != undefined) {
371
+        return this.$store.getters.anticoagulants_confit[v].name;
372
+      }
373
+      return "";
374
+    },
375
+    anticoagulant_zongliang: function() {
376
+      var v = this.getValueStr(
377
+        "anticoagulant_zongliang",
378
+        "anticoagulant_zongliang"
379
+      );
380
+      return v.length == 0 ? "0" : v;
381
+    },
382
+    calcium: function() {
383
+      var v = this.getValueStr("calcium", "calcium");
384
+      v = this.getFloat(v);
385
+      return v == 0 ? "0" : v;
237 386
     },
238
-    computed: {
239
-      target_ultrafiltration: function () {
240
-        var v = this.getValueStr('target_ultrafiltration', 'target_ultrafiltration')
241
-        v = this.getFloat(v)
242
-        return v.length == 0 ? '0' : v
243
-      },
244
-      dialysis_mode: function () {
245
-        var mode = this.getValueStr('mode_id', 'mode_id')
246
-        if (mode.length == 0) {
247
-          return ''
248
-        }
249
-        if (this.$store.getters.treatment_mode[mode] != undefined) {
250
-          return this.$store.getters.treatment_mode[mode].name
251
-        }
252
-        return ''
253
-      },
254
-      perfusion_apparatus: function () {
255
-        var v = this.getValueStr('perfusion_apparatus', 'perfusion_apparatus')
256
-        if (v.length == 0) {
257
-          return ''
258
-        }
259
-        if (this.perfusion_apparatus_map[v] != undefined) {
260
-          return this.perfusion_apparatus_map[v].name
261
-        }
262
-        return ''
263
-      },
264
-      displace_liqui: function () {
265
-        var v = this.getValueStr('displace_liqui', 'displace_liqui')
266
-        return v.length == 0 ? '0' : v
267
-      },
268
-      anticoagulant_shouji: function () {
269
-        var v = this.getValueStr('anticoagulant_shouji', 'anticoagulant_shouji')
270
-        return v.length == 0 ? '0' : v
271
-      },
272
-      kalium: function () {
273
-        var v = this.getValueStr('kalium', 'kalium')
274
-        v = this.getFloat(v)
275
-        return v == 0 ? '0' : v
276
-      },
277
-      replacement_total: function () {
278
-        var v = this.getValueStr('replacement_total', 'replacement_total')
279
-        return v.length == 0 ? '0' : v
280
-      },
281
-      bicarbonate: function () {
282
-        var v = this.getValueStr('bicarbonate', 'bicarbonate')
283
-        return v.length == 0 ? '0' : v
284
-      },
285
-      dialysate_flow: function () {
286
-        var v = this.getValueStr('dialysate_flow', 'dialysate_flow')
287
-        return v.length == 0 ? '0' : v
288
-      },
289
-      dialysis_duration: function () {
290
-        var dialysis_duration_hour = (this.getValueStr('dialysis_duration_hour', 'dialysis_duration_hour'))
291
-        var dialysis_duration_minute = (this.getValueStr('dialysis_duration_minute', 'dialysis_duration_minute'))
292
-        if (dialysis_duration_hour.length == 0 && dialysis_duration_minute.length == 0) {
293
-          return '0'
294
-        } else {
295
-          var time = dialysis_duration_hour + 'h' + dialysis_duration_minute + 'min'
296
-          return time.length == 0 ? '0' : time
297
-        }
298
-      },
299
-      blood_flow_volume: function () {
300
-        var v = this.getValueStr('blood_flow_volume', 'blood_flow_volume')
301
-        return v.length == 0 ? '0' : v
302
-      },
303
-      replacement_way: function () {
304
-        return this.getValueStr('replacement_way', 'replacement_way')
305
-      },
306
-      anticoagulant_weichi: function () {
307
-        var v = this.getValueStr('anticoagulant_weichi', 'anticoagulant_weichi')
308
-        return v.length == 0 ? '0' : v
309
-      },
310
-      sodium: function () {
311
-        var v = this.getValueStr('sodium', 'sodium')
312
-        console.log(v)
313
-        v = this.getFloat(v)
314
-        console.log(v)
315
-        return v == 0 ? '0' : v
316
-      },
317
-      glucose: function () {
318
-        var v = this.getValueStr('glucose', 'glucose')
319
-        return v.length == 0 ? '0' : v
320
-      },
321
-      dialysate_temperature: function () {
322
-        var v = this.getValueStr('dialysate_temperature', 'dialysate_temperature')
323
-        return v.length == 0 ? '0' : v
324
-      },
325
-      dialyzer: function () {
326
-        var v = this.getValueStr('dialyzer', 'hemodialysis_machine')
327
-        if (v.length == 0) {
328
-          return ''
329
-        }
330
-        if (this.device_number_map[v] != undefined) {
331
-          return this.device_number_map[v].name
332
-        }
333
-        return ''
334
-      },
335
-      dialysate_formulation: function () {
336
-        var v = this.getValueStr('dialysate_formulation', 'dialysate_formulation')
337
-        if (v.length == 0) {
338
-          return ''
339
-        }
340
-        if (v in this.dialysateFormulationMap) {
341
-          return this.dialysateFormulationMap[v].name
342
-        }
343
-        return ''
344
-      },
345
-      prescription_dewatering: function () {
346
-        var v = this.getValueStr('prescription_dewatering', 'dewater')
347
-        return v.length == 0 ? '0' : v
348
-      },
349
-      anticoagulant: function () {
350
-        var v = this.getValueStr('anticoagulant', 'anticoagulant')
351
-        if (v.length == 0) {
352
-          return ''
353
-        }
354
-        if (this.$store.getters.anticoagulants_confit[v] != undefined) {
355
-          return this.$store.getters.anticoagulants_confit[v].name
356
-        }
357
-        return ''
358
-      },
359
-      anticoagulant_zongliang: function () {
360
-        var v = this.getValueStr('anticoagulant_zongliang', 'anticoagulant_zongliang')
361
-        return v.length == 0 ? '0' : v
362
-      },
363
-      calcium: function () {
364
-        var v = this.getValueStr('calcium', 'calcium')
365
-        v = this.getFloat(v)
366
-        return v == 0 ? '0' : v
367
-      },
368 387
 
369
-      conductivity: function () {
370
-        var v = this.getValueStr('conductivity', 'conductivity')
371
-        return v.length == 0 ? '0' : v
372
-      },
373
-      dialyzer_perfusion_apparatus: function () {
374
-        return this.getValueStr('dialyzer_perfusion_apparatus', 'dialyzer_perfusion_apparatus')
375
-      },
376
-      note: function () {
377
-        return this.getValueStr('remark', 'remark')
378
-      },
379
-      body_fluid: function () {
380
-        var id = this.getValueStr('body_fluid', 'body_fluid')
381
-        if (id == 0) {
382
-          return ''
383
-        }
384
-        var bodyFluidOptions = this.$store.getters.body_fluid
385
-        for (let i = 0; i < bodyFluidOptions.length; i++) {
386
-          if (bodyFluidOptions[i].id == id) {
387
-            return bodyFluidOptions[i].name
388
-          }
389
-        }
390
-      },
391
-      special_medicine: function () {
392
-        var id = this.getValueStr('special_medicine', 'special_medicine')
393
-        if (id == 0) {
394
-          return ''
395
-        }
396
-        var special_medicine = this.$store.getters.special_medicine
397
-        for (let i = 0; i < special_medicine.length; i++) {
398
-          if (special_medicine[i].id == id) {
399
-            return special_medicine[i].name
400
-          }
401
-        }
402
-      },
403
-      special_medicine_other: function () {
404
-        return this.getValueStr('special_medicine_other', 'special_medicine_other')
405
-      },
406
-      blood_access: function () {
407
-        var id = this.getValueStr('blood_access', 'blood_access')
408
-        if (id == 0) {
409
-          return ''
388
+    conductivity: function() {
389
+      var v = this.getValueStr("conductivity", "conductivity");
390
+      return v.length == 0 ? "0" : v;
391
+    },
392
+    dialyzer_perfusion_apparatus: function() {
393
+      return this.getValueStr(
394
+        "dialyzer_perfusion_apparatus",
395
+        "dialyzer_perfusion_apparatus"
396
+      );
397
+    },
398
+    note: function() {
399
+      return this.getValueStr("remark", "remark");
400
+    },
401
+    body_fluid: function() {
402
+      var id = this.getValueStr("body_fluid", "body_fluid");
403
+      if (id == 0) {
404
+        return "";
405
+      }
406
+      var bodyFluidOptions = this.$store.getters.body_fluid;
407
+      for (let i = 0; i < bodyFluidOptions.length; i++) {
408
+        if (bodyFluidOptions[i].id == id) {
409
+          return bodyFluidOptions[i].name;
410 410
         }
411
-        var blood_access = this.$store.getters.blood_access
412
-        console.log('blood_access', blood_access)
413
-        for (let i = 0; i < blood_access.length; i++) {
414
-          if (blood_access[i].id == id) {
415
-            return blood_access[i].name
416
-          }
411
+      }
412
+    },
413
+    special_medicine: function() {
414
+      var id = this.getValueStr("special_medicine", "special_medicine");
415
+      if (id == 0) {
416
+        return "";
417
+      }
418
+      var special_medicine = this.$store.getters.special_medicine;
419
+      for (let i = 0; i < special_medicine.length; i++) {
420
+        if (special_medicine[i].id == id) {
421
+          return special_medicine[i].name;
417 422
         }
418
-      },
419
-      displace_liqui: function () {
420
-        var id = this.getValueStr('displace_liqui_part', 'displace_liqui_part')
421
-        var displace_liqui_value = this.getValueStr('displace_liqui_value', 'displace_liqui_value')
422
-        var displace_liqui_part = ''
423
-        var displace_liqui = this.$store.getters.displace_liqui
424
-        for (let i = 0; i < displace_liqui.length; i++) {
425
-          if (displace_liqui[i].id == id) {
426
-            displace_liqui_part = displace_liqui[i].name
427
-          }
423
+      }
424
+    },
425
+    special_medicine_other: function() {
426
+      return this.getValueStr(
427
+        "special_medicine_other",
428
+        "special_medicine_other"
429
+      );
430
+    },
431
+    blood_access: function() {
432
+      var id = this.getValueStr("blood_access", "blood_access");
433
+      if (id == 0) {
434
+        return "";
435
+      }
436
+      var blood_access = this.$store.getters.blood_access;
437
+      console.log("blood_access", blood_access);
438
+      for (let i = 0; i < blood_access.length; i++) {
439
+        if (blood_access[i].id == id) {
440
+          return blood_access[i].name;
428 441
         }
429
-        return displace_liqui_part
430
-      },
431
-      ultrafiltration: function () {
432
-        var v = this.getValueStr('ultrafiltration', 'ultrafiltration')
433
-        v = this.getFloat(v)
434
-        return v.length == 0 ? '0' : v
435
-      },
436
-      target_ktv: function () {
437
-        var v = this.getValueStr('target_ktv', 'target_ktv')
438
-        return v.length == 0 ? '0' : v
439 442
       }
440 443
     },
441
-    created () {
442
-      var perfusion_apparatus = this.$store.getters.perfusion_apparatus
443
-      var map = {}
444
-      for (let index = 0; index < perfusion_apparatus.length; index++) {
445
-        const p = perfusion_apparatus[index]
446
-        map[p.id] = p
444
+    displace_liqui: function() {
445
+      var id = this.getValueStr("displace_liqui_part", "displace_liqui_part");
446
+      var displace_liqui_value = this.getValueStr(
447
+        "displace_liqui_value",
448
+        "displace_liqui_value"
449
+      );
450
+      var displace_liqui_part = "";
451
+      var displace_liqui = this.$store.getters.displace_liqui;
452
+      for (let i = 0; i < displace_liqui.length; i++) {
453
+        if (displace_liqui[i].id == id) {
454
+          displace_liqui_part = displace_liqui[i].name;
455
+        }
447 456
       }
448
-      this.perfusion_apparatus_map = map
457
+      return displace_liqui_part;
458
+    },
459
+    ultrafiltration: function() {
460
+      var v = this.getValueStr("ultrafiltration", "ultrafiltration");
461
+      v = this.getFloat(v);
462
+      return v.length == 0 ? "0" : v;
463
+    },
464
+    target_ktv: function() {
465
+      var v = this.getValueStr("target_ktv", "target_ktv");
466
+      return v.length == 0 ? "0" : v;
467
+    }
468
+  },
469
+  created() {
470
+    var perfusion_apparatus = this.$store.getters.perfusion_apparatus;
471
+    var map = {};
472
+    for (let index = 0; index < perfusion_apparatus.length; index++) {
473
+      const p = perfusion_apparatus[index];
474
+      map[p.id] = p;
475
+    }
476
+    this.perfusion_apparatus_map = map;
449 477
 
450
-      var dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
451
-      for (var index in dialysateFormulationOptions) {
452
-        this.dialysateFormulationMap[dialysateFormulationOptions[index].id] = dialysateFormulationOptions[index]
478
+    var dialysateFormulationOptions = getDataConfig(
479
+      "hemodialysis",
480
+      "dialysate_formulation"
481
+    );
482
+    for (var index in dialysateFormulationOptions) {
483
+      this.dialysateFormulationMap[dialysateFormulationOptions[index].id] =
484
+        dialysateFormulationOptions[index];
485
+    }
486
+  },
487
+  methods: {
488
+    getDisplaceLiquiValue: function() {
489
+      return this.getValueStr("displace_liqui_value", "displace_liqui_value");
490
+    },
491
+    isShow(name) {
492
+      var filedList = this.$store.getters.user.fileds;
493
+      for (let i = 0; i < filedList.length; i++) {
494
+        if (
495
+          filedList[i].module == 1 &&
496
+          filedList[i].filed_name_cn == name &&
497
+          filedList[i].is_show == 1
498
+        ) {
499
+          return true;
500
+        }
453 501
       }
502
+      return false;
454 503
     },
455
-    methods: {
456
-      getDisplaceLiquiValue:function(){
457
-        return this.getValueStr('displace_liqui_value', 'displace_liqui_value')
458
-      },
459
-      isShow (name) {
460
-        var filedList = this.$store.getters.user.fileds
461
-        for (let i = 0; i < filedList.length; i++) {
462
-          if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
463
-            return true
464
-          }
504
+    getValueStr(pkey, skey) {
505
+      if (
506
+        (this.prescription == null || this.prescription.id == "") &&
507
+        (this.solution == null || this.solution.id == "")
508
+      ) {
509
+        return "";
510
+      } else if (this.prescription != null && this.prescription.id != "") {
511
+        if (
512
+          this.prescription[pkey] == null ||
513
+          this.prescription[pkey] == undefined
514
+        ) {
515
+          return "";
516
+        }
517
+        return this.prescription[pkey] + "";
518
+      } else {
519
+        if (this.solution[skey] == null || this.solution[skey] == undefined) {
520
+          return "";
465 521
         }
466
-        return false
467
-      },
468
-      getValueStr (pkey, skey) {
469
-        if ((this.prescription == null || this.prescription.id == '') && (this.solution == null || this.solution.id == '')) {
470
-          return ''
471
-        } else if (this.prescription != null && this.prescription.id != '') {
472
-          if (this.prescription[pkey] == null || this.prescription[pkey] == undefined) {
473
-            return ''
474
-          }
475
-          return this.prescription[pkey] + ''
476
-        } else {
477
-          if (this.solution[skey] == null || this.solution[skey] == undefined) {
478
-            return ''
479
-          }
480
-          return this.solution[skey] + ''
522
+        return this.solution[skey] + "";
523
+      }
524
+    },
525
+    getFloat: function(x) {
526
+      if (x != ".") {
527
+        var f = Math.round(x * 100) / 100;
528
+        var s = f.toString();
529
+        var rs = s.indexOf(".");
530
+        if (rs <= 0) {
531
+          rs = s.length;
532
+          s += ".";
481 533
         }
482
-      },
483
-      getFloat: function (x) {
484
-        if (x != '.') {
485
-          var f = Math.round(x * 100) / 100
486
-          var s = f.toString()
487
-          var rs = s.indexOf('.')
488
-          if (rs <= 0) {
489
-            rs = s.length
490
-            s += '.'
491
-          }
492
-          while (s.length <= rs + 1) {
493
-            s += '0'
494
-          }
495
-          return s
496
-        } else {
497
-          return '0.0'
534
+        while (s.length <= rs + 1) {
535
+          s += "0";
498 536
         }
537
+        return s;
538
+      } else {
539
+        return "0.0";
499 540
       }
500 541
     }
501 542
   }
543
+};
502 544
 </script>
503 545
 
504
-<style rel="stylesheet/scss" lang="scss" scoped></style>
546
+<style rel="stylesheet/scss" lang="scss" scoped>
547
+</style>

+ 80 - 51
src/pages/my/index.vue Прегледај датотеку

@@ -2,7 +2,6 @@
2 2
   <div class="page_my">
3 3
     <div class="myTop">
4 4
       <img src="../../assets/images/myBanner.png" alt />
5
-      <router-link to="/myInfo">
6 5
         <div class="avatar">
7 6
           <img v-if="roleInfo.avatar != ''" :src="roleInfo.avatar" alt />
8 7
           <img
@@ -11,16 +10,16 @@
11 10
             alt
12 11
           />
13 12
         </div>
14
-        <div class="userMain">
13
+        <div class="userMain" @click="toMyIndex">
15 14
           <div class="userBox">
16 15
             <div class="userTxt">
17
-              <p class="userName">{{ roleInfo.user_name }}</p>
16
+              <span v-if="roleInfo.user_name!=''"><p class="userName">{{ roleInfo.user_name }}</p></span>
17
+                <span v-if="roleInfo.user_name==''"><p class="userName">{{ userName.name }}</p></span>
18 18
               <p class="signature">{{ roleInfo.message }}</p>
19 19
             </div>
20 20
             <van-icon name="arrow" />
21 21
           </div>
22 22
         </div>
23
-      </router-link>
24 23
       <div class="invitebox">
25 24
         <img src="../../assets/images/invite.png" alt />
26 25
       </div>
@@ -42,8 +41,8 @@
42 41
         </div>
43 42
       </router-link>
44 43
     </div>
44
+
45 45
     <div class="myBox">
46
-      <router-link to="/organizationInfo">
47 46
         <div class="myBoxOne">
48 47
           <div class="myInfoLeft">
49 48
             <img src="../../assets/images/myIcon2.png" alt />
@@ -51,29 +50,20 @@
51 50
           </div>
52 51
           <van-icon class="arrow" name="arrow" />
53 52
         </div>
54
-      </router-link>
55
-      <div class="myBoxTwo">
53
+      <div class="myBoxTwo noBorder" v-for="(item,index) in organaziton" :key="index">
56 54
         <div class="myInfoLeft">
57
-          <img src="../../assets/images/m01.png" alt />
58
-          <p>我的医院/组织/团队</p>
55
+          <span v-if="item.org_logo == ''"><img src="../../assets/images/m01.png" alt /></span>
56
+          <span v-if="item.org_logo !==''"><img :src="item.org_logo"></span>
57
+          <p>{{item.org_name}}</p>
59 58
         </div>
60
-        <div class="myInfoRight">
61
-          <van-icon class="arrow" name="arrow" />
62
-        </div>
63
-      </div>
64
-      <div class="myBoxTwo noBorder">
65
-        <div class="myInfoLeft">
66
-          <img src="../../assets/images/m01.png" alt />
67
-          <p>我的医院/组织/团队</p>
68
-        </div>
69
-        <div class="myInfoRight" @click="toManage">
70
-          <div class="myInfoRightBtn">管理</div>
71
-          <van-icon class="arrow" name="arrow" />
59
+        <div class="myInfoRight" v-if="item.is_super_admin == 1">
60
+          <div class="myInfoRightBtn" @click="toEditOrg()">管理</div>
61
+          <van-icon class="arrow" name="arrow"  @click="toManage"/>
72 62
         </div>
73 63
       </div>
74 64
     </div>
75 65
     <div class="myBox">
76
-      <router-link to="/createorg">
66
+      <router-link to="/perfectOrg">
77 67
         <div class="myBoxOne">
78 68
           <div class="myInfoLeft">
79 69
             <img src="../../assets/images/myIcon3.png" alt />
@@ -82,7 +72,7 @@
82 72
           <van-icon class="arrow" name="arrow" />
83 73
         </div>
84 74
       </router-link>
85
-      <router-link to="/forget">
75
+      <router-link to="/modifypsw">
86 76
         <div class="myBoxOne">
87 77
           <div class="myInfoLeft">
88 78
             <img src="../../assets/images/myIcon4.png" alt />
@@ -93,21 +83,21 @@
93 83
       </router-link>
94 84
     </div>
95 85
     <div class="myBox">
96
-      <div class="myBoxOne">
97
-        <div class="myInfoLeft">
98
-          <img src="../../assets/images/myIcon5.png" alt />
99
-          <p>常见问题</p>
100
-        </div>
101
-        <van-icon class="arrow" name="arrow" />
102
-      </div>
86
+<!--      <div class="myBoxOne">-->
87
+<!--        <div class="myInfoLeft">-->
88
+<!--          <img src="../../assets/images/myIcon5.png" alt />-->
89
+<!--          <p>常见问题</p>-->
90
+<!--        </div>-->
91
+<!--        <van-icon class="arrow" name="arrow" />-->
92
+<!--      </div>-->
103 93
 
104
-      <div class="myBoxOne" @click="toFeed">
105
-        <div class="myInfoLeft">
106
-          <img src="../../assets/images/myIcon6.png" alt />
107
-          <p>意见反馈</p>
108
-        </div>
109
-        <van-icon class="arrow" name="arrow" />
110
-      </div>
94
+<!--      <div class="myBoxOne" @click="toFeed">-->
95
+<!--        <div class="myInfoLeft">-->
96
+<!--          <img src="../../assets/images/myIcon6.png" alt />-->
97
+<!--          <p>意见反馈</p>-->
98
+<!--        </div>-->
99
+<!--        <van-icon class="arrow" name="arrow" />-->
100
+<!--      </div>-->
111 101
 
112 102
       <router-link to="/about">
113 103
         <div class="myBoxOne">
@@ -133,35 +123,65 @@
133 123
   </div>
134 124
 </template>
135 125
 <script>
136
-import { getMyInformation } from "@/api/patient/patient";
126
+import {
127
+  getMyInformation,
128
+  LoginOut,
129
+  getMyOrganazition,
130
+  getMyInforName
131
+} from "@/api/patient/patient";
137 132
 import { uParseTime } from "@/utils/tools";
138 133
 export default {
139 134
   data() {
140 135
     return {
141 136
       roleInfo: {},
142
-      admin_user_id: 0
137
+      admin_user_id: 0,
138
+      adminid: 0,
139
+      organaziton: [],
140
+      userName: {}
143 141
     };
144 142
   },
145 143
   methods: {
146 144
     LoginOut() {
147
-      this.isRouterAlive = false;
148
-      this.$nextTick(function() {
149
-        this.isRouterAlive = true;
145
+      LoginOut().then(response => {
146
+        if (response.data.state === 1) {
147
+          var msg = response.data.data.msg;
148
+          console.log("msg是", msg);
149
+          this.isRouterAlive = false;
150
+          this.$nextTick(function() {
151
+            this.isRouterAlive = true;
152
+          });
153
+          this.$router.replace("/login");
154
+        }
150 155
       });
151
-      this.$router.push("/login");
152 156
     },
153
-    getMyInformation() {
154
-      getMyInformation().then(response => {
157
+    getMyInformation(id) {
158
+      getMyInformation(id).then(response => {
155 159
         if (response.data.state === 1) {
156
-          var sinature = response.data.data.electronic_signature;
157
-          console.log("sinature", sinature);
158 160
           var roleInfo = response.data.data.roleInfo;
159
-          console.log("成功", roleInfo);
160
-          this.admin_user_id = roleInfo.admin_user_id;
161
+          console.log("roleInfo", roleInfo);
162
+          this.admin_user_id = roleInfo.id;
163
+          this.adminid = roleInfo.admin_user_id;
161 164
           this.roleInfo = roleInfo;
162 165
         }
163 166
       });
164 167
     },
168
+    getMyOrganazition(id) {
169
+      getMyOrganazition(id).then(response => {
170
+        if (response.data.state === 1) {
171
+          var organaziton = response.data.data.organaziton;
172
+          this.organaziton = organaziton;
173
+        }
174
+      });
175
+    },
176
+    getMyInforName(id) {
177
+      getMyInforName(id).then(response => {
178
+        if (response.data.state === 1) {
179
+          var Rolename = response.data.data.Rolename;
180
+          var username = response.data.data.Username;
181
+          this.userName = username;
182
+        }
183
+      });
184
+    },
165 185
     getTime(time) {
166 186
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
167 187
       return uParseTime(time, "{y}-{m}-{d}");
@@ -173,11 +193,20 @@ export default {
173 193
       this.$router.push("/myInfo?id=" + this.admin_user_id);
174 194
     },
175 195
     toManage() {
176
-      this.$router.push("/organizationinfo?id=" + this.admin_user_id);
196
+      this.$router.push("/organizationinfo?id=" + this.adminid);
197
+    },
198
+    toEditOrg() {
199
+      this.$router.push("/newMy");
200
+    },
201
+    toMyIndex() {
202
+      this.$router.push("/myInfo?id=" + this.admin_user_id);
177 203
     }
178 204
   },
179 205
   created() {
180
-    this.getMyInformation();
206
+    var adminid = this.$store.getters.user.user.id;
207
+    this.getMyInformation(adminid);
208
+    this.getMyOrganazition(adminid);
209
+    this.getMyInforName(adminid);
181 210
   }
182 211
 };
183 212
 </script>

+ 451 - 0
src/pages/my/modifyPassword.vue Прегледај датотеку

@@ -0,0 +1,451 @@
1
+<template>
2
+  <div class="page_noPassword">
3
+    <div class="nopasswordTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
5
+      <span class="titleName">修改密码</span>
6
+    </div>
7
+    <div class="forgetmyInput">
8
+      <el-form ref="forgetForm" :model="forgetForm" :rules="rules">
9
+        <el-form-item required prop="phone">
10
+          <div class="phoneLine">
11
+            <i class="el-icon-mobile mobile"></i>
12
+            <el-input
13
+              class="phoneInput"
14
+              placeholder="请填写手机号码"
15
+              v-model="forgetForm.phone"
16
+              v-on:input="watchNum"
17
+              maxlength="11"
18
+              @input="change(forgetForm.phone)"
19
+            ></el-input>
20
+          </div>
21
+        </el-form-item>
22
+        <el-form-item required prop="code">
23
+          <div class="code">
24
+            <i class="iconfont icon-dunpai dunpai"></i>
25
+            <el-input v-model="forgetForm.code" placeholder="请填写验证码" v-on:input="watchNum"></el-input>
26
+            <div class="getCode" @click="getVerifyCode()">{{ code_btn_title }}</div>
27
+          </div>
28
+        </el-form-item>
29
+        <el-form-item>
30
+          <div class="phoneLine">
31
+            <i class="el-icon-lock lock"></i>
32
+            <el-input
33
+              class="phoneInput"
34
+              v-model="psd"
35
+              placeholder="请填写新密码"
36
+              show-password
37
+              v-on:input="watchNum"
38
+              clearable
39
+            ></el-input>
40
+          </div>
41
+        </el-form-item>
42
+      </el-form>
43
+    </div>
44
+
45
+    <div class="login" @click="modifyAndLogin()" v-show="loginshow">登录</div>
46
+    <div class="logintwo" v-show="loginshowtwo">登录</div>
47
+    <div class="problem">
48
+      遇到问题?点击
49
+      <span @click="contact = true">联系客服</span>
50
+    </div>
51
+
52
+    <!-- 弹窗 联系客服 -->
53
+    <el-dialog
54
+      title="客服电话"
55
+      :visible.sync="contact"
56
+      width="19.1875rem"
57
+      top="12.5rem"
58
+      center
59
+      class="myDialog"
60
+    >
61
+      <span class="telephone">0755-86526342</span>
62
+      <span slot="footer" class="dialog-footer">
63
+        <span @click="contact = false">取消</span>
64
+        <span>|</span>
65
+        <span type="primary" @click="callPhone()">拨打</span>
66
+      </span>
67
+    </el-dialog>
68
+  </div>
69
+</template>
70
+
71
+<script>
72
+  // import { getCode, NextStep } from "@/api/login/login";
73
+  import "@/styles/newStyle.scss";
74
+  import { getCodeInit, getVerifyCode, forgetPassWord } from "@/api/login";
75
+  import { checkMobile } from "@/utils/tools";
76
+  import { hex_md5 } from "@/utils/md5";
77
+
78
+  export default {
79
+    data() {
80
+      var checkMobileRule = (rule, value, callback) => {
81
+        if (!checkMobile(value)) {
82
+          callback(new Error("请填写正确的手机号"));
83
+        } else {
84
+          callback();
85
+        }
86
+      };
87
+      return {
88
+        phone: "",
89
+        code: "",
90
+        psd: "",
91
+        contact: false,
92
+        count_downing: false,
93
+        count_down: 0,
94
+        aespass: "",
95
+        forgetForm: {
96
+          phone: "",
97
+          code: ""
98
+        },
99
+        rules: {
100
+          phone: [
101
+            { required: true, message: "手机号码不能为空" },
102
+            { validator: checkMobileRule }
103
+          ],
104
+          code: [{ required: true, message: "验证码不能为空" }]
105
+        },
106
+        loginshow: false,
107
+        loginshowtwo: true,
108
+        codeshow: false,
109
+        codeshowtwo: true
110
+      };
111
+    },
112
+    created() {
113
+      this.GetCodeInit();
114
+      this.forgetForm.phone = this.$store.getters.user.admin.mobile
115
+    },
116
+    methods: {
117
+      modifyAndLogin() {
118
+        if (this.forgetForm.phone.trim().length == 0) {
119
+          this.$toast({
120
+            message: "手机号码不能为空!"
121
+          });
122
+          return;
123
+        }
124
+        if (!checkMobile(this.forgetForm.phone)) {
125
+          this.$toast({
126
+            message: "请填写正确的手机号码!"
127
+          });
128
+          return;
129
+        }
130
+        if (this.forgetForm.code.trim().length == 0) {
131
+          this.$toast({
132
+            message: "验证码不能为空!"
133
+          });
134
+          return;
135
+        }
136
+
137
+        let params = {
138
+          mobile: this.forgetForm.phone,
139
+          code: this.forgetForm.code,
140
+          password: hex_md5(this.psd)
141
+        };
142
+        forgetPassWord(params).then(response => {
143
+          if (response.data.state === 1) {
144
+            this.$router.go(-1)
145
+          }else{
146
+
147
+            this.$toast({
148
+              message: response.data.msg
149
+            });
150
+          }
151
+        });
152
+      },
153
+      GetCodeInit() {
154
+        getCodeInit().then(response => {
155
+          if (response.data.state === 1) {
156
+            this.aespass = response.data.data.aespass;
157
+          }
158
+        });
159
+      },
160
+      getVerifyCode() {
161
+        if (this.forgetForm.phone.length == 0) {
162
+          this.$toast({
163
+            message: "手机号码不能为空!"
164
+          });
165
+          return;
166
+        }
167
+        if (!checkMobile(this.forgetForm.phone)) {
168
+          this.$toast({
169
+            message: "请填写正确的手机号码!"
170
+          });
171
+          return;
172
+        }
173
+
174
+        if (!this.count_downing) {
175
+          let parms = {
176
+            phone: this.forgetForm.phone,
177
+            aespass: this.aespass
178
+          };
179
+          getVerifyCode(parms).then(response => {
180
+            if (response.data.state === 1) {
181
+              this.count_downing = true;
182
+              this.count_down = 61;
183
+              this.countDown();
184
+            }
185
+          });
186
+        }
187
+      },
188
+
189
+      callPhone() {
190
+        window.location.href = "tel://075586526342";
191
+      },
192
+      countDown: function() {
193
+        this.count_down = this.count_down - 1;
194
+        if (this.count_down === 0) {
195
+          this.count_downing = false;
196
+          return;
197
+        }
198
+        var t = this;
199
+        setTimeout(() => {
200
+          this.countDown();
201
+        }, 1000);
202
+      },
203
+      watchNum() {
204
+        if (this.forgetForm.phone.length === 11) {
205
+          this.codeshow = true;
206
+          this.codeshowtwo = false;
207
+        } else {
208
+          this.codeshow = false;
209
+          this.codeshowtwo = true;
210
+        }
211
+
212
+        if (
213
+          this.forgetForm.phone === "" ||
214
+          this.forgetForm.code === "" ||
215
+          this.psd === ""
216
+        ) {
217
+          this.loginshow = false;
218
+          this.loginshowtwo = true;
219
+        } else {
220
+          this.loginshow = true;
221
+          this.loginshowtwo = false;
222
+        }
223
+      },
224
+      change(value) {
225
+        this.forgetForm.phone = value.replace(/[^0-9]+/g, "");
226
+      }
227
+    },
228
+    computed: {
229
+      code_btn_title: function() {
230
+        if (this.count_down == 0) {
231
+          return "获取验证码";
232
+        } else {
233
+          return "重新发送(" + this.count_down + ")";
234
+        }
235
+      }
236
+    }
237
+  };
238
+</script>
239
+
240
+<style lang="scss" scoped>
241
+  .page_noPassword {
242
+    overflow: hidden;
243
+    height: 100%;
244
+  .nopasswordTitle {
245
+    height: 3.125rem;
246
+    line-height: 3.125rem;
247
+    display: flex;
248
+    align-items: center;
249
+  }
250
+  .jiantou {
251
+    margin-left: 1.25rem;
252
+    font-size: 1.5rem;
253
+    font-weight: 600;
254
+    margin-right: 7rem;
255
+  }
256
+  .titleName {
257
+    font-size: 1.125rem;
258
+    font-weight: 600;
259
+  }
260
+  .forgetmyInput {
261
+    margin-top: 4rem;
262
+  .phoneLine {
263
+    width: 84%;
264
+    margin: 0 auto;
265
+    display: flex;
266
+    border-bottom: 1px solid #e6e6e6;
267
+  .mobile {
268
+    float: left;
269
+    color: #acacac;
270
+    font-size: 1.5rem;
271
+    margin-left: 0.375rem;
272
+    line-height: 3.375rem;
273
+    width: 1.5rem;
274
+  }
275
+  .phoneInput {
276
+    width: 95%;
277
+  }
278
+  }
279
+
280
+  .lock {
281
+    float: left;
282
+    color: #acacac;
283
+    font-size: 1.5rem;
284
+    margin-left: 0.375rem;
285
+    line-height: 3.375rem;
286
+    width: 1.5rem;
287
+  }
288
+  .code {
289
+    line-height: 3.375rem;
290
+    width: 84%;
291
+    height: 3.375rem;
292
+    margin: 0 auto;
293
+    border-bottom: 1px solid #e6e6e6;
294
+    display: flex;
295
+    align-items: center;
296
+
297
+  .dunpai {
298
+    float: left;
299
+    color: #acacac;
300
+    font-size: 1.5rem;
301
+    margin-left: 0.375rem;
302
+  }
303
+  .el-input {
304
+    float: left;
305
+    width: 10.6rem;
306
+    border: none;
307
+    padding: 0;
308
+  }
309
+  .el-input__inner {
310
+    padding: 0;
311
+    padding-left: 0.75rem;
312
+  }
313
+  .getCode {
314
+  // float: left;
315
+    width: 5.75rem;
316
+    height: 2rem;
317
+    line-height: 2rem;
318
+    text-align: center;
319
+    color: #fff;
320
+    background: #338afb;
321
+    border-radius: 1.4375rem;
322
+    font-size: 0.8125rem;
323
+  }
324
+  .getCodetwo {
325
+    width: 5.75rem;
326
+    height: 2rem;
327
+  // line-height: 2rem;
328
+    text-align: center;
329
+    color: #fff;
330
+    background: #e5e5e5;
331
+    border-radius: 1.4375rem;
332
+    font-size: 0.8125rem;
333
+  }
334
+
335
+  .el-button--primary {
336
+    border-color: transparent;
337
+  }
338
+  }
339
+  }
340
+  .login {
341
+    width: 19.25rem;
342
+    height: 2.875rem;
343
+    background: linear-gradient(
344
+      -90deg,
345
+      rgba(129, 159, 246, 1),
346
+      rgba(81, 119, 238, 1),
347
+      rgba(75, 102, 234, 1)
348
+    );
349
+    border-radius: 1.4375rem;
350
+    margin: 0 auto;
351
+    line-height: 2.875rem;
352
+    text-align: center;
353
+    color: #fff;
354
+    margin-top: 2.875rem;
355
+  }
356
+  .problem {
357
+    width: 84%;
358
+    font-size: 0.8125rem;
359
+    margin: 15rem auto 0;
360
+    text-align: center;
361
+  span {
362
+    color: #338afb;
363
+  }
364
+  }
365
+  }
366
+
367
+  .el-form-item__error {
368
+    margin-left: 2.5rem;
369
+  }
370
+
371
+  .logintwo {
372
+    width: 19.25rem;
373
+    height: 2.875rem;
374
+    background: #e5e5e5;
375
+    border-radius: 1.4375rem;
376
+    margin: 0 auto;
377
+    line-height: 2.875rem;
378
+    text-align: center;
379
+    color: #fff;
380
+    margin-top: 2.875rem;
381
+  }
382
+  .el-button--medium {
383
+    padding: 0;
384
+  }
385
+</style>
386
+<style lang="scss">
387
+  .forgetmyInput {
388
+  .el-form-item {
389
+    margin-bottom: 0;
390
+  }
391
+  .el-input {
392
+    display: flex;
393
+    align-items: center;
394
+    margin: 0 auto;
395
+    color: rgba(155, 155, 155, 1);
396
+    padding-left: 0.75rem;
397
+    box-sizing: border-box;
398
+    height: 3.375rem;
399
+    line-height: 3.375rem;
400
+  }
401
+  .el-input__inner {
402
+    border: none;
403
+    font-size: 1rem;
404
+    padding-left: 0;
405
+  }
406
+  .el-input__prefix {
407
+    font-size: 1.5rem;
408
+    color: #acacac;
409
+  }
410
+
411
+  .phoneLine {
412
+  .el-input__clear {
413
+    margin-right: 0.625rem;
414
+  }
415
+  .el-input__icon {
416
+    line-height: 3.375rem;
417
+    font-size: 1.5rem;
418
+  }
419
+  }
420
+  }
421
+  .myDialog {
422
+    line-height: 50%;
423
+    height: 100%;
424
+  .el-dialog {
425
+    border-radius: 10px;
426
+  }
427
+  .el-dialog__title {
428
+    color: #000000;
429
+  }
430
+  .telephone {
431
+    width: 12.5rem;
432
+    height: 1.125rem;
433
+    font-size: 1.5rem;
434
+    font-weight: 500;
435
+    color: #338afb;
436
+    margin-left: 2.5rem;
437
+  }
438
+  .dialog-footer {
439
+  > span:nth-of-type(1) {
440
+    color: #9b9b9b;
441
+  }
442
+  > span:nth-of-type(2) {
443
+    padding: 0 3.125rem;
444
+    color: #e6e6e6;
445
+  }
446
+  > span:nth-of-type(3) {
447
+    color: #000000;
448
+  }
449
+  }
450
+  }
451
+</style>

+ 46 - 4
src/pages/my/modifyingName.vue Прегледај датотеку

@@ -3,15 +3,57 @@
3 3
     <div class="modifyingNameTitle">
4 4
       <i class="iconfont icon-zuojiantou jiantou" @click="$router.go(-1)"></i>
5 5
       <span class="titleName">修改姓名</span>
6
-      <span>保存</span>
6
+      <span @click="saveName">保存</span>
7 7
     </div>
8 8
     <div class="nameBox">
9
-      <van-field v-model="value" placeholder="请填写姓名" />
9
+      <van-field v-model="name" placeholder="请填写姓名" />
10 10
     </div>
11 11
   </div>
12 12
 </template>
13
-
14
-
13
+<script>
14
+import { saveName, getMyInforName } from "@/api/patient/patient";
15
+export default {
16
+  data() {
17
+    return {
18
+      name: "",
19
+      admin_user_id: 0
20
+    };
21
+  },
22
+  methods: {
23
+    getMyInforName(id) {
24
+      getMyInforName(id).then(response => {
25
+        if (response.data.state === 1) {
26
+          var Rolename = response.data.data.Rolename;
27
+          var username = response.data.data.Username;
28
+          if (Rolename.user_name != "") {
29
+            this.name = Rolename.user_name;
30
+          }
31
+          if (Rolename.user_name == "") {
32
+            this.name = username.name;
33
+          }
34
+        }
35
+      });
36
+    },
37
+    saveName() {
38
+      if (this.name === "") {
39
+        this.$toast("姓名不能为空");
40
+        return false;
41
+      }
42
+      saveName(this.admin_user_id, this.name).then(response => {
43
+        if (response.data.state === 1) {
44
+          var role = response.data.data.role;
45
+          this.$router.push("/myInfo?id=" + this.admin_user_id);
46
+        }
47
+      });
48
+    }
49
+  },
50
+  created() {
51
+    var id = this.$route.query.id;
52
+    this.getMyInforName(id);
53
+    this.admin_user_id = id;
54
+  }
55
+};
56
+</script>
15 57
 <style lang="scss" scoped>
16 58
 .page_modifyingName {
17 59
   height: 100%;

+ 27 - 13
src/pages/my/myInfo.vue Прегледај датотеку

@@ -17,15 +17,13 @@
17 17
           <van-icon class="arrow" name="arrow" />
18 18
         </div>
19 19
       </div>
20
-      <router-link to="/editname">
21
-        <div class="infoBoxTwo">
20
+        <div class="infoBoxTwo" @click="editName">
22 21
           <p>姓名</p>
23 22
           <div class="infoBoxOneRight">
24 23
             <p>{{ roleInfo.user_name }}</p>
25 24
             <van-icon class="arrow" name="arrow" />
26 25
           </div>
27 26
         </div>
28
-      </router-link>
29 27
       <div class="infoBoxTwo" @click="show = true">
30 28
         <p>性别</p>
31 29
         <div class="infoBoxOneRight">
@@ -73,7 +71,7 @@
73 71
 </template>
74 72
 
75 73
 <script>
76
-import { getMyInformation, SaveSex, SaveBirthday } from "@/api/patient/patient";
74
+import { getMyInforName, SaveSex, SaveBirthday } from "@/api/patient/patient";
77 75
 import { uParseTime } from "@/utils/tools";
78 76
 export default {
79 77
   data() {
@@ -86,7 +84,11 @@ export default {
86 84
       minDate: new Date(1900, 0, 1),
87 85
       maxDate: new Date(2025, 10, 1),
88 86
       currentDate: new Date(),
89
-      roleInfo: {},
87
+      roleInfo: {
88
+        avatar: "",
89
+        user_name: "",
90
+        message: ""
91
+      },
90 92
       admin_user_id: "",
91 93
       form: {
92 94
         sex: ""
@@ -94,12 +96,11 @@ export default {
94 96
     };
95 97
   },
96 98
   methods: {
97
-    getMyInformation() {
98
-      getMyInformation().then(response => {
99
+    getMyInforName(id) {
100
+      getMyInforName(id).then(response => {
99 101
         if (response.data.state === 1) {
100
-          var sinature = response.data.data.electronic_signature;
101
-          console.log("sinature", sinature);
102
-          var roleInfo = response.data.data.roleInfo;
102
+          var roleInfo = response.data.data.Rolename;
103
+          var username = response.data.data.Username;
103 104
           if (roleInfo.sex === 1) {
104 105
             this.sex = "男";
105 106
           }
@@ -107,14 +108,22 @@ export default {
107 108
             this.sex = "女";
108 109
           }
109 110
           this.birthday = this.getTime(roleInfo.birthday);
110
-          console.log("roleInfo", roleInfo);
111
-          this.roleInfo = roleInfo;
111
+          this.roleInfo.user_name = roleInfo.user_name;
112
+          this.roleInfo.avatar = roleInfo.avatar;
113
+          this.roleInfo.message = roleInfo.message;
114
+          if (roleInfo.user_name == "") {
115
+            this.roleInfo.user_name = username.name;
116
+          }
117
+          this.userName = username;
112 118
         }
113 119
       });
114 120
     },
115 121
     toMyPersonalsign() {
116 122
       this.$router.push("/personalsign?id=" + this.admin_user_id);
117 123
     },
124
+    editName() {
125
+      this.$router.push("/editname?id=" + this.admin_user_id);
126
+    },
118 127
     onConfirm(value) {
119 128
       if (value === "男") {
120 129
         this.form.sex = 1;
@@ -127,6 +136,7 @@ export default {
127 136
         if (response.data.state === 1) {
128 137
           var role = response.data.data.role;
129 138
           this.sex = value;
139
+          this.getMyInformation(this.admin_user_id);
130 140
         }
131 141
       });
132 142
 
@@ -157,19 +167,23 @@ export default {
157 167
         if (response.data.state === 1) {
158 168
           var role = response.data.data.role;
159 169
           this.birthday = this.birthday;
170
+          this.getMyInformation(this.admin_user_id);
160 171
         }
161 172
       });
162 173
       this.show1 = false;
163 174
     },
164 175
     getTime(time) {
176
+      if (time == 0) {
177
+        return "";
178
+      }
165 179
       // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
166 180
       return uParseTime(time, "{y}-{m}-{d}");
167 181
     }
168 182
   },
169 183
   created() {
170
-    this.getMyInformation();
171 184
     var id = this.$route.query.id;
172 185
     this.admin_user_id = id;
186
+    this.getMyInforName(id);
173 187
   }
174 188
 };
175 189
 </script>

+ 12 - 1
src/pages/my/organizationInfo.vue Прегледај датотеку

@@ -39,7 +39,11 @@
39 39
   </div>
40 40
 </template>
41 41
 <script>
42
-import { getOrgName, getRoleName } from "@/api/patient/patient";
42
+import {
43
+  getOrgName,
44
+  getRoleName,
45
+  getAllOrganization
46
+} from "@/api/patient/patient";
43 47
 export default {
44 48
   data() {
45 49
     return {
@@ -110,6 +114,12 @@ export default {
110 114
           this.positionName = positionName.user_type;
111 115
         }
112 116
       });
117
+    },
118
+    getAllOrganization(id) {
119
+      getAllOrganization(id).then(response => {
120
+        if (response.data.state == 1) {
121
+        }
122
+      });
113 123
     }
114 124
   },
115 125
   created() {
@@ -119,6 +129,7 @@ export default {
119 129
     console.log("id", id);
120 130
     this.getOrgName();
121 131
     this.getRoleName(id);
132
+    this.getAllOrganization(id);
122 133
   }
123 134
 };
124 135
 </script>

+ 11 - 1
src/pages/my/personalSign.vue Прегледај датотеку

@@ -18,7 +18,7 @@
18 18
   </div>
19 19
 </template>
20 20
 <script>
21
-import { SaveMessage } from "@/api/patient/patient";
21
+import { getMyInformation, SaveMessage } from "@/api/patient/patient";
22 22
 export default {
23 23
   data() {
24 24
     return {
@@ -27,6 +27,15 @@ export default {
27 27
     };
28 28
   },
29 29
   methods: {
30
+    getMyInformation(id) {
31
+      getMyInformation(id).then(response => {
32
+        if (response.data.state === 1) {
33
+          var roleInfo = response.data.data.roleInfo;
34
+          console.log("roleInfo", roleInfo);
35
+          this.message = roleInfo.message;
36
+        }
37
+      });
38
+    },
30 39
     SaveMessage() {
31 40
       const params = {
32 41
         id: this.admin_user_id,
@@ -45,6 +54,7 @@ export default {
45 54
     var id = this.$route.query.id;
46 55
     this.admin_user_id = id;
47 56
     // console.log("id是什么", id);
57
+    this.getMyInformation(id);
48 58
   }
49 59
 };
50 60
 </script>

Разлика између датотеке није приказан због своје велике величине
+ 4250 - 4223
src/pages/org/index.vue


Разлика између датотеке није приказан због своје велике величине
+ 4503 - 0
src/pages/patientCenter/editOrg/index.vue


+ 71 - 8
src/pages/patientManagement/components/Blood.vue Прегледај датотеку

@@ -71,6 +71,9 @@ export default {
71 71
   props: {
72 72
     searchValue: String
73 73
   },
74
+  props: {
75
+    seacherActive: Number
76
+  },
74 77
   data() {
75 78
     return {
76 79
       value: "",
@@ -81,7 +84,7 @@ export default {
81 84
       type: "归转状态",
82 85
       typeOne: "患者来源",
83 86
       columns: ["留治", "转出"],
84
-      columnsOne: ["门诊", "院"],
87
+      columnsOne: ["门诊", "院"],
85 88
       searchVal: "",
86 89
       active: 0,
87 90
       list: [],
@@ -111,7 +114,11 @@ export default {
111 114
       list: [],
112 115
       loading: false,
113 116
       finished: false,
114
-      patients: []
117
+      patients: [],
118
+      form: {
119
+        transfer_status: 0,
120
+        patients_source: 0
121
+      }
115 122
     };
116 123
   },
117 124
   methods: {
@@ -119,19 +126,70 @@ export default {
119 126
       this.typeShow = false;
120 127
     },
121 128
     onConfirm(value) {
122
-      this.type = value;
123
-      this.typeShow = false;
129
+      this.page = 1;
130
+      if (value === "留治") {
131
+        this.form.transfer_status = 1;
132
+        this.type = value;
133
+        this.typeShow = false;
134
+        this.patients = [];
135
+        this.getAllBloodDialysisPatient(
136
+          this.page,
137
+          this.limit,
138
+          this.form.transfer_status,
139
+          this.form.patients_source
140
+        );
141
+      }
142
+      if (value === "转出") {
143
+        this.form.transfer_status = 2;
144
+        this.type = value;
145
+        this.typeShow = false;
146
+        this.patients = [];
147
+        this.getAllBloodDialysisPatient(
148
+          this.page,
149
+          this.limit,
150
+          this.form.transfer_status,
151
+          this.form.patients_source
152
+        );
153
+      }
124 154
     },
125 155
     onCancelOne(value) {
126 156
       this.typeOne = value;
127 157
       this.typeShowOne = false;
128 158
     },
129 159
     onConfirmOne(value) {
130
-      this.typeOne = value;
131
-      this.typeShowOne = false;
160
+      this.page = 1;
161
+      if (value === "门诊") {
162
+        this.form.patients_source = 1;
163
+        this.typeOne = value;
164
+        this.typeShowOne = false;
165
+        this.patients = [];
166
+        this.getAllBloodDialysisPatient(
167
+          this.page,
168
+          this.limit,
169
+          this.form.transfer_status,
170
+          this.form.patients_source
171
+        );
172
+      }
173
+      if (value === "住院") {
174
+        this.form.patients_source = 2;
175
+        this.typeOne = value;
176
+        this.typeShowOne = false;
177
+        this.patients = [];
178
+        this.getAllBloodDialysisPatient(
179
+          this.page,
180
+          this.limit,
181
+          this.form.transfer_status,
182
+          this.form.patients_source
183
+        );
184
+      }
132 185
     },
133 186
     getAllBloodDialysisPatient() {
134
-      getAllBloodDialysisPatient(this.page, this.limit).then(response => {
187
+      getAllBloodDialysisPatient(
188
+        this.page,
189
+        this.limit,
190
+        this.form.transfer_status,
191
+        this.form.patients_source
192
+      ).then(response => {
135 193
         if (response.data.state === 1) {
136 194
           var patient = response.data.data.bloodpatient;
137 195
           let arr = this.patients;
@@ -160,7 +218,12 @@ export default {
160 218
       }, 1000);
161 219
     },
162 220
     toPatientDetail(id) {
163
-      this.$router.push("/patientdetail?patientid=" + id);
221
+      this.$router.push(
222
+        "/patientdetail?patientid=" +
223
+          id +
224
+          "&seacherActive=" +
225
+          this.seacherActive
226
+      );
164 227
     },
165 228
     SearchAllBlood(val) {
166 229
       SearchAllBlood(val).then(response => {

+ 40 - 29
src/pages/patientManagement/components/Member.vue Прегледај датотеку

@@ -20,12 +20,18 @@
20 20
 </template>
21 21
 
22 22
 <script>
23
-import { getAllMemberPatient, getMemberSearchPatient } from '@/api/patient/patient'
23
+import {
24
+  getAllMemberPatient,
25
+  getMemberSearchPatient
26
+} from "@/api/patient/patient";
24 27
 export default {
25 28
   props: {
26 29
     searchValue: String
27 30
   },
28
-  data () {
31
+  props: {
32
+    seacherActive: Number
33
+  },
34
+  data() {
29 35
     return {
30 36
       loading: false,
31 37
       finished: false,
@@ -34,62 +40,67 @@ export default {
34 40
       total: 0,
35 41
       patients: [],
36 42
       list: []
37
-    }
43
+    };
38 44
   },
39 45
   methods: {
40
-    getAllMemberPatient () {
46
+    getAllMemberPatient() {
41 47
       getAllMemberPatient(this.page, this.limit).then(response => {
42 48
         if (response.data.state === 1) {
43
-          var patients = response.data.data.memberpatient
44
-          let arr = this.patients
45
-          arr.push(...patients)
46
-          this.patients = arr
47
-          var total = response.data.data.total
48
-          this.total = total
49
+          var patients = response.data.data.memberpatient;
50
+          let arr = this.patients;
51
+          arr.push(...patients);
52
+          this.patients = arr;
53
+          var total = response.data.data.total;
54
+          this.total = total;
49 55
         }
50
-      })
56
+      });
51 57
     },
52
-    onLoad () {
58
+    onLoad() {
53 59
       setTimeout(() => {
54 60
         for (let i = 0; i < this.limit; i++) {
55
-          this.list.push(this.list.length + 1)
61
+          this.list.push(this.list.length + 1);
56 62
         }
57 63
         // 加载状态结束
58
-        this.loading = false
64
+        this.loading = false;
59 65
         if (this.patients.length > 10) {
60
-          this.page++
66
+          this.page++;
61 67
         }
62
-        this.getAllSlowPatient(this.page, this.limit)
68
+        this.getAllSlowPatient(this.page, this.limit);
63 69
         // 数据全部加载完成
64 70
         if (this.list.length >= this.total) {
65
-          this.finished = true
71
+          this.finished = true;
66 72
         }
67
-      }, 1000)
73
+      }, 1000);
68 74
     },
69
-    toPatientDetail (id) {
70
-      this.$router.push('/patientdetail?patientid=' + id)
75
+    toPatientDetail(id) {
76
+      this.$router.push(
77
+        "/patientdetail?patientid=" +
78
+          id +
79
+          "&seacherActive=" +
80
+          this.seacherActive
81
+      );
71 82
     },
72
-    getMemberSearchPatient (value) {
83
+    getMemberSearchPatient(value) {
73 84
       getMemberSearchPatient(value).then(response => {
74 85
         if (response.data.state === 1) {
75
-          var memberpatient = response.data.data.memberPatient
86
+          var memberpatient = response.data.data.memberPatient;
76 87
         }
77
-      })
88
+      });
78 89
     }
79 90
   },
80
-  created () {
91
+  created() {
81 92
     if (this.searchValue) {
82
-      this.getMemberSearchPatient(this.searchValue)
93
+      this.getMemberSearchPatient(this.searchValue);
83 94
     } else {
84
-      this.getAllMemberPatient()
95
+      this.getAllMemberPatient();
85 96
     }
86 97
   },
87 98
   watch: {
88
-    searchValue (newVal) {
89
-      this.getMemberSearchPatient(newVal)
99
+    searchValue(newVal) {
100
+      this.getMemberSearchPatient(newVal);
90 101
     }
91 102
   }
92
-}
103
+};
93 104
 </script>
94 105
 
95 106
 <style lang="scss" scoped>

+ 38 - 33
src/pages/patientManagement/components/Slow.vue Прегледај датотеку

@@ -19,15 +19,15 @@
19 19
 </template>
20 20
 
21 21
 <script>
22
-import {
23
-  getAllSlowPatient,
24
-  getSlowSearchPatient
25
-} from '@/api/patient/patient'
22
+import { getAllSlowPatient, getSlowSearchPatient } from "@/api/patient/patient";
26 23
 export default {
27 24
   props: {
28 25
     searchValue: String
29 26
   },
30
-  data () {
27
+  props: {
28
+    seacherActive: Number
29
+  },
30
+  data() {
31 31
     return {
32 32
       loading: false,
33 33
       finished: false,
@@ -36,63 +36,68 @@ export default {
36 36
       total: 0,
37 37
       patients: [],
38 38
       list: []
39
-    }
39
+    };
40 40
   },
41 41
   methods: {
42
-    getAllSlowPatient () {
42
+    getAllSlowPatient() {
43 43
       getAllSlowPatient(this.page, this.limit).then(response => {
44 44
         if (response.data.state === 1) {
45
-          var patients = response.data.data.slowpatient
46
-          let arr = this.patients
47
-          arr.push(...patients)
48
-          this.patients = arr
49
-          var total = response.data.data.total
50
-          this.total = total
45
+          var patients = response.data.data.slowpatient;
46
+          let arr = this.patients;
47
+          arr.push(...patients);
48
+          this.patients = arr;
49
+          var total = response.data.data.total;
50
+          this.total = total;
51 51
         }
52
-      })
52
+      });
53 53
     },
54
-    onLoad () {
54
+    onLoad() {
55 55
       setTimeout(() => {
56 56
         for (let i = 0; i < this.limit; i++) {
57
-          this.list.push(this.list.length + 1)
57
+          this.list.push(this.list.length + 1);
58 58
         }
59 59
         // 加载状态结束
60
-        this.loading = false
60
+        this.loading = false;
61 61
         if (this.patients.length > 10) {
62
-          this.page++
62
+          this.page++;
63 63
         }
64
-        this.getAllSlowPatient(this.page, this.limit)
64
+        this.getAllSlowPatient(this.page, this.limit);
65 65
         // 数据全部加载完成
66 66
         if (this.list.length >= this.total) {
67
-          this.finished = true
67
+          this.finished = true;
68 68
         }
69
-      }, 1000)
69
+      }, 1000);
70 70
     },
71
-    toPatientDetail (id) {
72
-      this.$router.push('/patientdetail?patientid=' + id)
71
+    toPatientDetail(id) {
72
+      this.$router.push(
73
+        "/patientdetail?patientid=" +
74
+          id +
75
+          "&seacherActive=" +
76
+          this.seacherActive
77
+      );
73 78
     },
74
-    getSlowSearchPatient (val) {
79
+    getSlowSearchPatient(val) {
75 80
       getSlowSearchPatient(val).then(response => {
76 81
         if (response.data.state === 1) {
77
-          var slowpatient = response.data.data.slowPatient
78
-          this.patients = slowpatient
82
+          var slowpatient = response.data.data.slowPatient;
83
+          this.patients = slowpatient;
79 84
         }
80
-      })
85
+      });
81 86
     }
82 87
   },
83
-  created () {
88
+  created() {
84 89
     if (this.searchValue) {
85
-      this.getSlowSearchPatient(this.searchValue)
90
+      this.getSlowSearchPatient(this.searchValue);
86 91
     } else {
87
-      this.getAllSlowPatient()
92
+      this.getAllSlowPatient();
88 93
     }
89 94
   },
90 95
   watch: {
91
-    searchValue (newVal) {
92
-      this.getSlowSearchPatient(newVal)
96
+    searchValue(newVal) {
97
+      this.getSlowSearchPatient(newVal);
93 98
     }
94 99
   }
95
-}
100
+};
96 101
 </script>
97 102
 
98 103
 <style lang="scss" scoped>

+ 10 - 5
src/pages/patientManagement/patientManagement.vue Прегледај датотеку

@@ -14,7 +14,7 @@
14 14
       </div>
15 15
     </van-sticky>
16 16
     <div class="chooseBox">
17
-      <van-tabs v-model="active">
17
+      <van-tabs v-model="active" @change="changeActive">
18 18
         <van-tab title="全部患者">
19 19
           <div class="patientBox">
20 20
             <van-list v-model="loading" finished-text="没有更多了" @load="onLoad" :finished="finished">
@@ -31,13 +31,13 @@
31 31
           </div>
32 32
         </van-tab>
33 33
         <van-tab title="血透患者">
34
-          <Blood :searchValue="value"></Blood>
34
+          <Blood :searchValue="value" :seacherActive="active"></Blood>
35 35
         </van-tab>
36 36
         <van-tab title="慢病患者">
37
-          <Slow :searchValue="value"></Slow>
37
+          <Slow :searchValue="value" :seacherActive="active"></Slow>
38 38
         </van-tab>
39 39
         <van-tab title="会员患者">
40
-          <Member :searchValue="value"></Member>
40
+          <Member :searchValue="value" :seacherActive="active"></Member>
41 41
         </van-tab>
42 42
       </van-tabs>
43 43
     </div>
@@ -138,7 +138,9 @@ export default {
138 138
       this.$router.push("/addPatints");
139 139
     },
140 140
     toPatientDetail(id) {
141
-      this.$router.push("/patientdetail?patientid=" + id);
141
+      this.$router.push(
142
+        "/patientdetail?patientid=" + id + "&seacherActive=" + this.active
143
+      );
142 144
     },
143 145
     SearchAllPatient(val) {
144 146
       SearchAllPatient(val).then(response => {
@@ -147,6 +149,9 @@ export default {
147 149
           this.patients = patient;
148 150
         }
149 151
       });
152
+    },
153
+    changeActive(name, title) {
154
+      this.active = name;
150 155
     }
151 156
   },
152 157
   created() {

+ 1 - 2
src/pages/search/index.vue Прегледај датотеку

@@ -89,8 +89,7 @@ export default {
89 89
   },
90 90
   created() {
91 91
     this.historyWord = localStorage.getItem("searchWord");
92
-    this.historyWord = this.historyWord.split(","); //将字符串转成数组
93
-    console.log();
92
+    this.historyWord = this.historyWord.split(","); // 将字符串转成数组
94 93
   }
95 94
 };
96 95
 </script>

+ 1 - 1
src/pages/waitingRoom/components/dialog/addMonitor.vue Прегледај датотеку

@@ -194,7 +194,7 @@ export default {
194 194
         symptom: "", // 症状
195 195
         dispose: "", // 处理
196 196
         result: "", // 结果
197
-        monitoring_nurse: this.$store.getters.user.user.id // 监测人
197
+        monitoring_nurse: this.$store.getters.user.admin.id // 监测人
198 198
       },
199 199
       doctor: this.$store.getters.user.user.user_name
200 200
     };

Разлика између датотеке није приказан због своје велике величине
+ 480 - 468
src/pages/waitingRoom/components/dialog/medicalOrder.vue


+ 10 - 9
src/permission.js Прегледај датотеку

@@ -1,21 +1,22 @@
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","/myIndex","/patients","/addPatints","/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
   // 线上注释
9 9
   //   next()
10 10
   //   return
11
-  console.log(store.getters.user.admin)
12 11
   if (store.getters.user.admin == null) {
13 12
     if (loginWhiteList.indexOf(to.path) !== -1) {
14
-      next();
13
+      next()
15 14
     } else {
16
-      next({ path: "/" });
15
+      next({
16
+        path: '/'
17
+      })
17 18
     }
18 19
   } else {
19
-    next();
20
+    next()
20 21
   }
21
-});
22
+})

+ 231 - 205
src/router/index.js Прегледај датотеку

@@ -1,148 +1,140 @@
1
-import Vue from "vue";
2
-import Router from "vue-router";
1
+import Vue from 'vue'
2
+import Router from 'vue-router'
3 3
 
4
-Vue.use(Router);
4
+Vue.use(Router)
5 5
 
6 6
 export default new Router({
7
-  routes: [
8
-    {
9
-      path: "/",
10
-      name: "Home",
11
-      component: () => import("@/pages/home/verifyToken")
7
+  routes: [{
8
+      path: '/',
9
+      name: 'Home',
10
+      component: () => import('@/pages/home/verifyToken')
12 11
     },
13 12
     {
14
-      path: "/login",
15
-      name: "Home",
16
-      component: () => import("@/pages/home/login")
13
+      path: '/login',
14
+      name: 'Home',
15
+      component: () => import('@/pages/home/login')
17 16
     },
18 17
     {
19
-      path: "/nopassword",
20
-      name: "Home",
21
-      component: () => import("@/pages/home/noPassword")
18
+      path: '/nopassword',
19
+      name: 'Home',
20
+      component: () => import('@/pages/home/noPassword')
22 21
     },
23 22
     {
24
-      path: "/setname",
25
-      name: "Home",
26
-      component: () => import("@/pages/home/register/name")
23
+      path: '/setname',
24
+      name: 'Home',
25
+      component: () => import('@/pages/home/register/name')
27 26
     },
28 27
     {
29
-      path: "/register",
30
-      name: "Home",
31
-      component: () => import("@/pages/home/register/register")
28
+      path: '/register',
29
+      name: 'Home',
30
+      component: () => import('@/pages/home/register/register')
32 31
     },
33 32
     {
34
-      path: "/join",
35
-      name: "Home",
36
-      component: () => import("@/pages/home/noJoinedGroup")
33
+      path: '/join',
34
+      name: 'Home',
35
+      component: () => import('@/pages/home/noJoinedGroup')
37 36
     },
38 37
     {
39
-      path: "/forget",
40
-      name: "Home",
41
-      component: () => import("@/pages/home/forgetPassword")
38
+      path: '/forget',
39
+      name: 'Home',
40
+      component: () => import('@/pages/home/forgetPassword')
42 41
     },
43 42
     {
44
-      path: "/createorg",
45
-      name: "Home",
46
-      component: () => import("@/pages/home/createOrg")
43
+      path: '/createorg',
44
+      name: 'Home',
45
+      component: () => import('@/pages/home/createOrg')
47 46
     },
48 47
     // 首页
49 48
     {
50
-      path: "/myIndex",
51
-      name: "myIndex",
52
-      component: () => import("@/pages/home/index"),
53
-      children: [
54
-        {
55
-          path: "/homeIndex",
56
-          component: () => import("@/pages/homeIndex/index.vue"),
49
+      path: '/myIndex',
50
+      name: 'myIndex',
51
+      component: () => import('@/pages/home/index'),
52
+      children: [{
53
+          path: '/homeIndex',
54
+          component: () => import('@/pages/homeIndex/index.vue'),
57 55
           meta: {
58 56
             noCache: true // 不会被 <keep-alive> 缓存
59 57
           }
60 58
         },
61 59
         // 我的
62 60
         {
63
-          path: "/newMy",
64
-          name: "newMy",
65
-          component: () => import("@/pages/my/index")
61
+          path: '/newMy',
62
+          name: 'newMy',
63
+          component: () => import('@/pages/my/index')
66 64
         },
67 65
         // 商城
68 66
         {
69
-          path: "/shop",
70
-          name: "shop",
71
-          component: () => import("@/pages/shop/index")
67
+          path: '/shop',
68
+          name: 'shop',
69
+          component: () => import('@/pages/shop/index')
72 70
         }
73 71
       ]
74 72
     },
75 73
 
76 74
     {
77
-      path: "/perfectOrg",
78
-      component: () => import("@/pages/org"),
75
+      path: '/perfectOrg',
76
+      component: () => import('@/pages/org'),
79 77
       meta: {
80 78
         noCache: true // 不会被 <keep-alive> 缓存
81 79
       }
82 80
     },
83 81
     {
84
-      path: "/manageconsole",
85
-      name: "console",
86
-      component: () => import("@/pages/console/managementConsole")
82
+      path: '/manageconsole',
83
+      name: 'console',
84
+      component: () => import('@/pages/console/managementConsole')
87 85
     },
88 86
     {
89
-      path: "/manageconsole/staff",
90
-      name: "staff",
87
+      path: '/manageconsole/staff',
88
+      name: 'staff',
91 89
       component: () =>
92
-        import("@/pages/console/managementConsole/staff_role/staffManagement")
90
+        import('@/pages/console/managementConsole/staff_role/staffManagement')
93 91
     },
94 92
     {
95
-      path: "/staff/editstaff",
96
-      name: "editstaff",
93
+      path: '/staff/editstaff',
94
+      name: 'editstaff',
97 95
       component: () =>
98
-        import("@/pages/console/managementConsole/staff_role/editStaff")
99
-    },
100
-    {
101
-      path: "/staff/addstaff",
102
-      name: "addstaff",
96
+        import('@/pages/console/managementConsole/staff_role/editStaff')
97
+    }, {
98
+      path: '/staff/addstaff',
99
+      name: 'addstaff',
103 100
       component: () =>
104
-        import("@/pages/console/managementConsole/staff_role/addStaff")
101
+        import('@/pages/console/managementConsole/staff_role/addStaff')
105 102
     },
106 103
 
107 104
     {
108
-      path: "/manageconsole/role",
109
-      name: "role",
105
+      path: '/manageconsole/role',
106
+      name: 'role',
110 107
       component: () =>
111
-        import(
112
-          "@/pages/console/managementConsole/staff_role/privilegeManagement"
113
-        )
108
+        import('@/pages/console/managementConsole/staff_role/privilegeManagement')
114 109
     },
115 110
 
116 111
     {
117
-      path: "/role/user",
118
-      name: "user",
112
+      path: '/role/user',
113
+      name: 'user',
119 114
       component: () =>
120
-        import("@/pages/console/managementConsole/staff_role/newUser")
115
+        import('@/pages/console/managementConsole/staff_role/newUser')
121 116
     },
122 117
 
123 118
     {
124
-      path: "/role/addnewuser",
125
-      name: "user",
119
+      path: '/role/addnewuser',
120
+      name: 'user',
126 121
       component: () =>
127
-        import("@/pages/console/managementConsole/staff_role/newAddStaff")
128
-    },
129
-    {
130
-      path: "/role/stafflist",
131
-      name: "user",
122
+        import('@/pages/console/managementConsole/staff_role/newAddStaff')
123
+    }, {
124
+      path: '/role/stafflist',
125
+      name: 'user',
132 126
       component: () =>
133
-        import("@/pages/console/managementConsole/staff_role/employeeList")
134
-    },
135
-    {
136
-      path: "/role/usermanage",
137
-      name: "user",
127
+        import('@/pages/console/managementConsole/staff_role/employeeList')
128
+    }, {
129
+      path: '/role/usermanage',
130
+      name: 'user',
138 131
       component: () =>
139
-        import("@/pages/console/managementConsole/staff_role/userManage")
140
-    },
141
-    {
142
-      path: "/role/addrole",
143
-      name: "add_role",
132
+        import('@/pages/console/managementConsole/staff_role/userManage')
133
+    }, {
134
+      path: '/role/addrole',
135
+      name: 'add_role',
144 136
       component: () =>
145
-        import("@/pages/console/managementConsole/staff_role/newAddRole")
137
+        import('@/pages/console/managementConsole/staff_role/newAddRole')
146 138
     },
147 139
 
148 140
     //
@@ -154,225 +146,259 @@ export default new Router({
154 146
     // },
155 147
 
156 148
     {
157
-      path: "/role/editrole",
158
-      name: "editrole",
149
+      path: '/role/editrole',
150
+      name: 'editrole',
159 151
       component: () =>
160
-        import("@/pages/console/managementConsole/staff_role/editRole")
152
+        import('@/pages/console/managementConsole/staff_role/editRole')
161 153
     },
162 154
     {
163
-      path: "/role/subpurview",
164
-      name: "purview",
155
+      path: '/role/subpurview',
156
+      name: 'purview',
165 157
       component: () =>
166
-        import("@/pages/console/managementConsole/staff_role/subPurview")
158
+        import('@/pages/console/managementConsole/staff_role/subPurview')
167 159
     },
168 160
     {
169
-      path: "/role/otherpurview",
170
-      name: "purview",
161
+      path: '/role/otherpurview',
162
+      name: 'purview',
171 163
       component: () =>
172
-        import("@/pages/console/managementConsole/staff_role/otherPurview")
173
-    },
174
-    {
175
-      path: "/role/functionpurview",
176
-      name: "purview",
164
+        import('@/pages/console/managementConsole/staff_role/otherPurview')
165
+    }, {
166
+      path: '/role/functionpurview',
167
+      name: 'purview',
177 168
       component: () =>
178
-        import("@/pages/console/managementConsole/staff_role/functionPurview")
169
+        import('@/pages/console/managementConsole/staff_role/functionPurview')
179 170
     },
180 171
     // 患者中心
181 172
     {
182
-      path: "/patients",
183
-      name: "patients",
184
-      component: () => import("@/pages/patientManagement/patientManagement")
173
+      path: '/patients',
174
+      name: 'patients',
175
+      component: () => import('@/pages/patientManagement/patientManagement')
185 176
     },
186 177
     // 新增病人
187 178
     {
188
-      path: "/addPatints",
189
-      name: "addpatients",
190
-      component: () => import("@/pages/patients/addPatient")
179
+      path: '/addPatints',
180
+      name: 'addpatients',
181
+      component: () => import('@/pages/patients/addPatient')
191 182
     },
192 183
     // 全部病程
193 184
     {
194
-      path: "/coursedetail",
195
-      name: "coursedetail",
196
-      component: () => import("@/pages/allCourseManagement/index")
185
+      path: '/coursedetail',
186
+      name: 'coursedetail',
187
+      component: () => import('@/pages/allCourseManagement/index')
197 188
     },
198 189
     // 全部干体重
199 190
     {
200
-      path: "/dryweight",
201
-      name: "dryweight",
202
-      component: () => import("@/pages/allDryWeight/index")
191
+      path: '/dryweight',
192
+      name: 'dryweight',
193
+      component: () => import('@/pages/allDryWeight/index')
203 194
     },
204 195
     // 基本信息
205 196
     {
206
-      path: "/editPatient",
207
-      name: "editPatient",
208
-      component: () => import("@/pages/patients/editPatient")
197
+      path: '/editPatient',
198
+      name: 'editPatient',
199
+      component: () => import('@/pages/patients/editPatient')
209 200
     },
210 201
     // 全部排班
211 202
     {
212
-      path: "/editScheduling",
213
-      name: "editscheduling",
214
-      component: () => import("@/pages/allScheduling/index")
203
+      path: '/editScheduling',
204
+      name: 'editscheduling',
205
+      component: () => import('@/pages/allScheduling/index')
215 206
     },
216 207
     // 全部透后宣教
217 208
     {
218
-      path: "/editEducation",
219
-      name: "editeducation",
220
-      component: () => import("@/pages/allEducation/index")
209
+      path: '/editEducation',
210
+      name: 'editeducation',
211
+      component: () => import('@/pages/allEducation/index')
221 212
     },
222 213
     // 全部抢救记录
223 214
     {
224
-      path: "/rescuerecord",
225
-      name: "rescuerecord",
226
-      component: () => import("@/pages/allRescue/index")
215
+      path: '/rescuerecord',
216
+      name: 'rescuerecord',
217
+      component: () => import('@/pages/allRescue/index')
227 218
     },
228 219
     //
229 220
     {
230
-      path: "/patientdetail",
231
-      name: "patientdetail",
232
-      component: () => import("@/pages/doctorAdvice/index")
221
+      path: '/patientdetail',
222
+      name: 'patientdetail',
223
+      component: () => import('@/pages/doctorAdvice/index')
233 224
     },
234 225
     // 搜索
235 226
     {
236
-      path: "/search",
237
-      name: "search",
238
-      component: () => import("@/pages/search/index")
227
+      path: '/search',
228
+      name: 'search',
229
+      component: () => import('@/pages/search/index')
239 230
     },
240 231
     // 我的信息
241 232
     {
242
-      path: "/myInfo",
243
-      name: "myInfo",
244
-      component: () => import("@/pages/my/myInfo")
233
+      path: '/myInfo',
234
+      name: 'myInfo',
235
+      component: () => import('@/pages/my/myInfo')
245 236
     },
246 237
     // 意见反馈
247 238
     {
248
-      path: "/feedBack",
249
-      name: "feedBack",
250
-      component: () => import("@/pages/my/feedBack")
239
+      path: '/feedBack',
240
+      name: 'feedBack',
241
+      component: () => import('@/pages/my/feedBack')
251 242
     },
252 243
     // 关于我们
253 244
     {
254
-      path: "/about",
255
-      name: "about",
256
-      component: () => import("@/pages/my/aboutUs")
245
+      path: '/about',
246
+      name: 'about',
247
+      component: () => import('@/pages/my/aboutUs')
257 248
     },
258 249
     // 公司介绍
259 250
     {
260
-      path: "/introduce",
261
-      name: "introduce",
262
-      component: () => import("@/pages/my/companyIntroduction")
251
+      path: '/introduce',
252
+      name: 'introduce',
253
+      component: () => import('@/pages/my/companyIntroduction')
263 254
     },
264 255
     // 更改名字
265 256
     {
266
-      path: "/editname",
267
-      name: "editname",
268
-      component: () => import("@/pages/my/modifyingName")
257
+      path: '/editname',
258
+      name: 'editname',
259
+      component: () => import('@/pages/my/modifyingName')
269 260
     },
270 261
     // 更改名字
271 262
     {
272
-      path: "/personalsign",
273
-      name: "personalsign",
274
-      component: () => import("@/pages/my/personalSign")
263
+      path: '/personalsign',
264
+      name: 'personalsign',
265
+      component: () => import('@/pages/my/personalSign')
275 266
     },
276 267
 
277 268
     // 全部长期透析记录
278 269
 
279 270
     {
280
-      path: "/alllongdialysis",
281
-      name: "longdialysis",
282
-      component: () => import("@/pages/allLongDialysis/index")
271
+      path: '/alllongdialysis',
272
+      name: 'longdialysis',
273
+      component: () => import('@/pages/allLongDialysis/index')
283 274
     },
284 275
     //,
285 276
     {
286
-      path: "/alldoctoradvice",
287
-      name: "/alldoctoradvice",
288
-      component: () => import("@/pages/allDoctorAdvice/index")
277
+      path: '/alldoctoradvice',
278
+      name: '/alldoctoradvice',
279
+      component: () => import('@/pages/allDoctorAdvice/index')
289 280
     },
290 281
     // 配置中心
291 282
     {
292
-      path: "/configurecenter",
293
-      name: "configurecenter",
294
-      component: () => import("@/pages/configureCenter/index")
283
+      path: '/configurecenter',
284
+      name: 'configurecenter',
285
+      component: () => import('@/pages/configureCenter/index')
295 286
     },
296
-    //
287
+    // 新增分区
297 288
     {
298
-      path: "/organizationinfo",
299
-      name: "/organizationinfo",
300
-      component: () => import("@/pages/my/organizationInfo")
289
+      path: '/addpartition',
290
+      name: '/addpartition',
291
+      component: () => import('@/pages/configureCenter/newPartition')
292
+    },
293
+    // 新增分组
294
+    {
295
+      path: '/addgroup',
296
+      name: '/addgroup',
297
+      component: () => import('@/pages/configureCenter/newGrouping')
298
+    },
299
+    // 新增床位号
300
+    {
301
+      path: '/addbed',
302
+      name: '/addbed',
303
+      component: () => import('@/pages/configureCenter/newBed')
304
+    },
305
+    // 我的页面管理
306
+    {
307
+      path: '/editorg',
308
+      name: '/editorg',
309
+      component: () => import('@/pages/patientCenter/editOrg/index')
310
+    },
311
+    {
312
+      path: '/organizationinfo',
313
+      name: '/organizationinfo',
314
+      component: () => import('@/pages/my/organizationInfo')
315
+    },
316
+    {
317
+      path: '/main',
318
+      name: 'main',
319
+      component: () => import('@/pages/main/index'),
320
+      meta: {
321
+        noCache: true // 不会被 <keep-alive> 缓存
322
+      }
301 323
     },
302 324
     {
303
-      path: "/product",
304
-      name: "Product",
305
-      component: () => import("@/pages/product/index")
325
+      path: '/product',
326
+      name: 'Product',
327
+      component: () => import('@/pages/product/index')
306 328
     },
307 329
     {
308
-      path: "/main",
309
-      name: "main",
310
-      component: () => import("@/pages/main/index")
330
+      path: '/monitoring',
331
+      name: 'monitorPage',
332
+      component: () => import('@/pages/monitoring/index')
311 333
     },
312 334
     {
313
-      path: "/details",
314
-      name: "details",
315
-      component: () => import("@/pages/main/DetailsPage")
335
+      path: '/details',
336
+      name: 'details',
337
+      component: () => import('@/pages/main/DetailsPage')
316 338
     },
317 339
     {
318
-      path: "/monitoring",
319
-      name: "monitorPage",
320
-      component: () => import("@/pages/monitoring/index")
340
+      path: '/monitoring',
341
+      name: 'monitorPage',
342
+      component: () => import('@/pages/monitoring/index')
321 343
     },
322 344
     {
323
-      path: "/my",
324
-      name: "my",
325
-      component: () => import("@/pages/personal/index")
345
+      path: '/my',
346
+      name: 'my',
347
+      component: () => import('@/pages/personal/index')
326 348
     },
327 349
     {
328
-      path: "/advice",
329
-      name: "doctorAdvice",
330
-      component: () => import("@/pages/advice/index")
350
+      path: '/advice',
351
+      name: 'doctorAdvice',
352
+      component: () => import('@/pages/advice/index')
331 353
     },
332 354
     {
333
-      path: "/EditPersonal",
334
-      name: "EditPersonal",
335
-      component: () => import("@/pages/personal/EditPersonal")
355
+      path: '/EditPersonal',
356
+      name: 'EditPersonal',
357
+      component: () => import('@/pages/personal/EditPersonal')
336 358
     },
337 359
     {
338
-      path: "/ElectronicSignature",
339
-      name: "ElectronicSignature",
340
-      component: () => import("@/pages/personal/ElectronicSignature")
360
+      path: '/ElectronicSignature',
361
+      name: 'ElectronicSignature',
362
+      component: () => import('@/pages/personal/ElectronicSignature')
341 363
     },
342 364
     {
343
-      path: "/Print",
344
-      name: "Print",
345
-      component: () => import("@/pages/main/PrintIndex")
365
+      path: '/Print',
366
+      name: 'Print',
367
+      component: () => import('@/pages/main/PrintIndex')
346 368
     },
347 369
     {
348
-      path: "/add_urgent_schedule",
349
-      name: "AddUrgentSchedule",
350
-      component: () => import("@/pages/main/add_urgent_schedule")
370
+      path: '/add_urgent_schedule',
371
+      name: 'AddUrgentSchedule',
372
+      component: () => import('@/pages/main/add_urgent_schedule')
351 373
     },
352 374
     {
353
-      path: "/Prints",
354
-      name: "Prints",
355
-      component: () => import("@/pages/main/Print")
375
+      path: '/Prints',
376
+      name: 'Prints',
377
+      component: () => import('@/pages/main/Print')
356 378
     },
357 379
     {
358
-      path: "/forgetPassword",
359
-      name: "forgetPassword",
360
-      component: () => import("@/pages/personal/ForgetPassword")
380
+      path: '/forgetPassword',
381
+      name: 'forgetPassword',
382
+      component: () => import('@/pages/personal/ForgetPassword')
361 383
     },
362 384
     {
363
-      path: "/changePassword",
364
-      name: "changePassword",
365
-      component: () => import("@/pages/personal/ChangePassword")
385
+      path: '/changePassword',
386
+      name: 'changePassword',
387
+      component: () => import('@/pages/personal/ChangePassword')
366 388
     },
367 389
     {
368
-      path: "/privacy",
369
-      name: "privacy",
370
-      component: () => import("@/pages/privacy/index")
390
+      path: '/privacy',
391
+      name: 'privacy',
392
+      component: () => import('@/pages/privacy/index')
371 393
     },
372 394
     {
373
-      path: "/userAgreement",
374
-      name: "userAgreement",
375
-      component: () => import("@/pages/userAgreement/index")
395
+      path: '/userAgreement',
396
+      name: 'userAgreement',
397
+      component: () => import('@/pages/userAgreement/index')
398
+    }, {
399
+      path: '/modifypsw',
400
+      name: 'modifyPassword',
401
+      component: () => import('@/pages/my/modifyPassword')
376 402
     }
377 403
   ]
378
-});
404
+})

+ 4 - 2
src/utils/request.js Прегледај датотеку

@@ -1,5 +1,6 @@
1 1
 import axios from 'axios'
2
-import { Toast } from 'mint-ui'
2
+// import { Toast } from 'mint-ui'
3
+import { Toast } from "vant";
3 4
 
4 5
 // create an axios instance
5 6
 const service = axios.create({
@@ -26,7 +27,8 @@ service.interceptors.response.use(
26 27
         //     location.reload() // 为了重新实例化vue-router对象 避免bug
27 28
         //   })
28 29
         // })
29
-        // location.reload()
30
+        Toast("登录超时")
31
+        location.reload()
30 32
         return Promise.reject('error')
31 33
       } else {
32 34
         return response