Browse Source

更新页面样式

XMLWAN 4 years ago
parent
commit
4bd582fc6f
4 changed files with 1948 additions and 1683 deletions
  1. 188 208
      src/api/advice.js
  2. 1 1
      src/xt_pages/management/home.vue
  3. 819 790
      src/xt_pages/user/doctorAdvice.vue
  4. 940 684
      src/xt_pages/user/patients.vue

+ 188 - 208
src/api/advice.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
-export function getAdviceConfig(type){
4
-    return request({
5
-        url:'/api/getadviceconfigs?type='+type,
6
-        method:'get',
7
-    })
3
+export function getAdviceConfig(type) {
4
+  return request({
5
+    url: '/api/getadviceconfigs?type=' + type,
6
+    method: 'get'
7
+  })
8
 }
8
 }
9
 
9
 
10
-export function getAllAdviceConfig(){
10
+export function getAllAdviceConfig() {
11
   return request({
11
   return request({
12
-    url:'/api/getalladviceconfig',
13
-    method:'get',
12
+    url: '/api/getalladviceconfig',
13
+    method: 'get'
14
   })
14
   })
15
 }
15
 }
16
 
16
 
17
-
18
-
19
-
20
-
21
-export function CreateDoctorAdvice(id, advice){
22
-    return request({
23
-        url:'/api/patients/advice/create?id='+id,
24
-        method:'post',
25
-        data:advice,
26
-    })
17
+export function CreateDoctorAdvice(id, advice) {
18
+  return request({
19
+    url: '/api/patients/advice/create?id=' + id,
20
+    method: 'post',
21
+    data: advice
22
+  })
27
 }
23
 }
28
 
24
 
29
-
30
-export function EditDoctorAdvice(patient, id, advice){
31
-    return request({
32
-        url:'/api/patients/advice/edit?id='+id + "&patient=" + patient,
33
-        method:'Put',
34
-        data:advice,
35
-    })
25
+export function EditDoctorAdvice(patient, id, advice) {
26
+  return request({
27
+    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient,
28
+    method: 'Put',
29
+    data: advice
30
+  })
36
 }
31
 }
37
 
32
 
38
-
39
-export function ExecDoctorAdvice(patient, id, time){
40
-    var params = {
41
-        id:id,
42
-        patient:patient,
43
-        execution_time: time,
44
-    }
45
-    return request({
46
-        url:'/api/patients/advice/exec',
47
-        method:'Post',
48
-        params:params,
49
-    })
33
+export function ExecDoctorAdvice(patient, id, time) {
34
+  var params = {
35
+    id: id,
36
+    patient: patient,
37
+    execution_time: time
38
+  }
39
+  return request({
40
+    url: '/api/patients/advice/exec',
41
+    method: 'Post',
42
+    params: params
43
+  })
50
 }
44
 }
51
-export function CheckDoctorAdvice(patient, id){
52
-    var params = {
53
-        id:id,
54
-        patient:patient,
55
-        // execution_time: time,
56
-    }
57
-    return request({
58
-        url:'/api/patients/advice/check',
59
-        method:'Post',
60
-        params:params,
61
-    })
45
+export function CheckDoctorAdvice(patient, id) {
46
+  var params = {
47
+    id: id,
48
+    patient: patient
49
+    // execution_time: time,
50
+  }
51
+  return request({
52
+    url: '/api/patients/advice/check',
53
+    method: 'Post',
54
+    params: params
55
+  })
62
 }
56
 }
63
-export function CheckGroupAdvice(groupno){
64
-    var params = {
65
-        groupno:groupno,
66
-    }
67
-    return request({
68
-        url:'/api/patients/advice/checkgroup',
69
-        method:'Post',
70
-        params:params,
71
-    })
57
+export function CheckGroupAdvice(groupno) {
58
+  var params = {
59
+    groupno: groupno
60
+  }
61
+  return request({
62
+    url: '/api/patients/advice/checkgroup',
63
+    method: 'Post',
64
+    params: params
65
+  })
72
 }
66
 }
73
 
67
 
74
-
75
-export function getDoctorAdviceList(params){
76
-    return request({
77
-        url:'/api/patients/advices',
78
-        method:'Get',
79
-        params:params,
80
-    })
68
+export function getDoctorAdviceList(params) {
69
+  return request({
70
+    url: '/api/patients/advices',
71
+    method: 'Get',
72
+    params: params
73
+  })
81
 }
74
 }
82
 
75
 
83
-
84
-export function StopDoctorAdvice(id, reason){
85
-    return request({
86
-        url:'/api/patients/advice/stop?id='+id,
87
-        method:'Post',
88
-        data:reason,
89
-    })
76
+export function StopDoctorAdvice(id, reason) {
77
+  return request({
78
+    url: '/api/patients/advice/stop?id=' + id,
79
+    method: 'Post',
80
+    data: reason
81
+  })
90
 }
82
 }
91
 
83
 
92
-export function StopGroupAdvice(groupno, reason){
93
-    return request({
94
-        url:'/api/patients/advice/stopgroup?groupno='+groupno,
95
-        method:'Post',
96
-        data:reason,
97
-    })
84
+export function StopGroupAdvice(groupno, reason) {
85
+  return request({
86
+    url: '/api/patients/advice/stopgroup?groupno=' + groupno,
87
+    method: 'Post',
88
+    data: reason
89
+  })
98
 }
90
 }
99
 
91
 
100
-export function ExecGroupAdvice(groupno, time){
101
-    return request({
102
-        url:'/api/patients/advice/execgroup?groupno='+groupno +'&execution_time='+time,
103
-        method:'Post',
104
-    })
92
+export function ExecGroupAdvice(groupno, time) {
93
+  return request({
94
+    url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time,
95
+    method: 'Post'
96
+  })
105
 }
97
 }
106
 
98
 
107
-export function DeleteDoctorAdvice(id){
108
-    return request({
109
-        url:'/api/patients/advice/delete?id='+id,
110
-        method:'Delete',
111
-    })
99
+export function DeleteDoctorAdvice(id) {
100
+  return request({
101
+    url: '/api/patients/advice/delete?id=' + id,
102
+    method: 'Delete'
103
+  })
112
 }
104
 }
113
 
105
 
114
-export function CreateDrugDic(data){
115
-    return request({
116
-        url:'/api/drugdic/create',
117
-        method:'post',
118
-        data:data,
119
-    })
106
+export function CreateDrugDic(data) {
107
+  return request({
108
+    url: '/api/drugdic/create',
109
+    method: 'post',
110
+    data: data
111
+  })
120
 }
112
 }
121
-export function UpdateDrugDic(id, data){
122
-    return request({
123
-        url:'/api/drugdic/update?id=' + id,
124
-        method:'put',
125
-        data:data,
126
-    })
113
+export function UpdateDrugDic(id, data) {
114
+  return request({
115
+    url: '/api/drugdic/update?id=' + id,
116
+    method: 'put',
117
+    data: data
118
+  })
127
 }
119
 }
128
-export function DeleteDrugDic(id){
129
-    return request({
130
-        url:'/api/drugdic/delete?id=' + id,
131
-        method:'delete',
132
-    })
120
+export function DeleteDrugDic(id) {
121
+  return request({
122
+    url: '/api/drugdic/delete?id=' + id,
123
+    method: 'delete'
124
+  })
133
 }
125
 }
134
 
126
 
135
-export function CreateDrugWay(data){
136
-    return request({
137
-        url:'/api/drugway/create',
138
-        method:'post',
139
-        data:data,
140
-    })
127
+export function CreateDrugWay(data) {
128
+  return request({
129
+    url: '/api/drugway/create',
130
+    method: 'post',
131
+    data: data
132
+  })
141
 }
133
 }
142
 
134
 
143
-export function UpdateDrugWay(id, data){
144
-    return request({
145
-        url:'/api/drugway/update?id=' + id,
146
-        method:'put',
147
-        data:data,
148
-    })
135
+export function UpdateDrugWay(id, data) {
136
+  return request({
137
+    url: '/api/drugway/update?id=' + id,
138
+    method: 'put',
139
+    data: data
140
+  })
149
 }
141
 }
150
-export function DeleteDrugWay(id){
151
-    return request({
152
-        url:'/api/drugway/delete?id=' + id,
153
-        method:'delete',
154
-    })
142
+export function DeleteDrugWay(id) {
143
+  return request({
144
+    url: '/api/drugway/delete?id=' + id,
145
+    method: 'delete'
146
+  })
155
 }
147
 }
156
 
148
 
157
-export function CreateExecutionFrequency(data){
158
-    return request({
159
-        url:'/api/executionfrequency/create',
160
-        method:'post',
161
-        data:data,
162
-    })
149
+export function CreateExecutionFrequency(data) {
150
+  return request({
151
+    url: '/api/executionfrequency/create',
152
+    method: 'post',
153
+    data: data
154
+  })
163
 }
155
 }
164
 
156
 
165
-export function UpdateExecutionFrequency(id, data){
166
-    return request({
167
-        url:'/api/executionfrequency/update?id=' + id,
168
-        method:'put',
169
-        data:data,
170
-    })
157
+export function UpdateExecutionFrequency(id, data) {
158
+  return request({
159
+    url: '/api/executionfrequency/update?id=' + id,
160
+    method: 'put',
161
+    data: data
162
+  })
171
 }
163
 }
172
-export function DeleteExecutionFrequency(id){
173
-    return request({
174
-        url:'/api/executionfrequency/delete?id=' + id,
175
-        method:'delete',
176
-    })
164
+export function DeleteExecutionFrequency(id) {
165
+  return request({
166
+    url: '/api/executionfrequency/delete?id=' + id,
167
+    method: 'delete'
168
+  })
177
 }
169
 }
178
-export function CreateAdviceTemplate(data){
179
-    return request({
180
-        url:'/api/advicetemplate/create',
181
-        method:'post',
182
-        data:data,
183
-    })
170
+export function CreateAdviceTemplate(data) {
171
+  return request({
172
+    url: '/api/advicetemplate/create',
173
+    method: 'post',
174
+    data: data
175
+  })
184
 }
176
 }
185
 
177
 
186
-export function UpdateAdviceTemplate(id, data){
187
-    return request({
188
-        url:'/api/advicetemplate/update?id=' + id,
189
-        method:'put',
190
-        data:data,
191
-    })
178
+export function UpdateAdviceTemplate(id, data) {
179
+  return request({
180
+    url: '/api/advicetemplate/update?id=' + id,
181
+    method: 'put',
182
+    data: data
183
+  })
192
 }
184
 }
193
-export function DeleteAdviceTemplate(id,template_id,parent_id){
194
-    return request({
195
-        url:'/api/advicetemplate/delete?id=' + id+"&template_id="+template_id+"&parent_id="+parent_id,
196
-        method:'delete',
197
-    })
185
+export function DeleteAdviceTemplate(id, template_id, parent_id) {
186
+  return request({
187
+    url: '/api/advicetemplate/delete?id=' + id + '&template_id=' + template_id + '&parent_id=' + parent_id,
188
+    method: 'delete'
189
+  })
198
 }
190
 }
199
 
191
 
200
-
201
-export function postAdviceTemplate(params,name,advice_type){
192
+export function postAdviceTemplate(params, name, advice_type) {
202
   return request({
193
   return request({
203
-    url:'/api/advicetemplate/create?template_name='+name+"&advice_type="+advice_type,
204
-    method:'post',
205
-    data:params
194
+    url: '/api/advicetemplate/create?template_name=' + name + '&advice_type=' + advice_type,
195
+    method: 'post',
196
+    data: params
206
   })
197
   })
207
 }
198
 }
208
 
199
 
209
-export function CreateGroupAdvice(id, groupno, advices){
210
-  if(advices.remind > 0){
200
+export function CreateGroupAdvice(id, groupno, advices) {
201
+  if (advices.remind > 0) {
211
     return request({
202
     return request({
212
-      url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
213
-      method:'post',
214
-      data:advices,
203
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
204
+      method: 'post',
205
+      data: advices
215
     })
206
     })
216
-
217
-  }else{
207
+  } else {
218
     return request({
208
     return request({
219
-      url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
220
-      method:'post',
221
-      data:advices,
209
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
210
+      method: 'post',
211
+      data: advices
222
     })
212
     })
223
-
224
   }
213
   }
225
-
226
 }
214
 }
227
-export function DeleteGroupAdvice(groupno){
215
+export function DeleteGroupAdvice(groupno) {
228
   return request({
216
   return request({
229
-      url:'/api/patients/advice/deletegroup?groupno='+groupno,
230
-      method:'delete',
217
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno,
218
+    method: 'delete'
231
   })
219
   })
232
 }
220
 }
233
 
221
 
234
-
235
-
236
-export function getAllAdviceTemplate(){
222
+export function getAllAdviceTemplate() {
237
   return request({
223
   return request({
238
-    url:'/api/advicetemplate/list',
239
-    method:'get',
224
+    url: '/api/advicetemplate/list',
225
+    method: 'get'
240
   })
226
   })
241
 }
227
 }
242
 
228
 
243
-
244
-export function CreateSingleAdviceTemplate(advices){
229
+export function CreateSingleAdviceTemplate(advices) {
245
   return request({
230
   return request({
246
-    url:'/api/advicetemplate/add',
247
-    method:'post',
248
-    params:advices,
231
+    url: '/api/advicetemplate/add',
232
+    method: 'post',
233
+    params: advices
249
 
234
 
250
   })
235
   })
251
 }
236
 }
252
-export function DeleteParentAdviceTemplate(id){
237
+export function DeleteParentAdviceTemplate(id) {
253
   return request({
238
   return request({
254
-    url:'/api/adviceparenttemplate/delete?template_id='+id,
255
-    method:'delete',
239
+    url: '/api/adviceparenttemplate/delete?template_id=' + id,
240
+    method: 'delete'
256
 
241
 
257
   })
242
   })
258
 }
243
 }
259
 
244
 
260
-export function CreateSubAdvice(params){
245
+export function CreateSubAdvice(params) {
261
   return request({
246
   return request({
262
-    url:'/api/subadvice/create',
263
-    method:'post',
264
-    params:params,
247
+    url: '/api/subadvice/create',
248
+    method: 'post',
249
+    params: params
265
   })
250
   })
266
 }
251
 }
267
 
252
 
268
-
269
 export function updateTemplateName(params) {
253
 export function updateTemplateName(params) {
270
   return request({
254
   return request({
271
     url: '/api/template/modify',
255
     url: '/api/template/modify',
277
 export function getDoctorAdviceConfig() {
261
 export function getDoctorAdviceConfig() {
278
   return request({
262
   return request({
279
     url: '/api/adviceconfig/get',
263
     url: '/api/adviceconfig/get',
280
-    method: 'get',
264
+    method: 'get'
281
   })
265
   })
282
 }
266
 }
283
 
267
 
284
-
285
 export function postDoctorAdviceConfig(params) {
268
 export function postDoctorAdviceConfig(params) {
286
   return request({
269
   return request({
287
     url: '/api/adviceconfig/isopen',
270
     url: '/api/adviceconfig/isopen',
288
     method: 'post',
271
     method: 'post',
289
-    params:params,
272
+    params: params
290
   })
273
   })
291
 }
274
 }
292
 
275
 
293
-
294
-
295
-
296
-
297
-
298
-
299
 export function getDoctorInitConfig() {
276
 export function getDoctorInitConfig() {
300
   return request({
277
   return request({
301
     url: '/api/advicetemplate/init/get',
278
     url: '/api/advicetemplate/init/get',
302
-    method: 'get',
279
+    method: 'get'
303
   })
280
   })
304
 }
281
 }
305
 
282
 
306
-
307
 export function PostInitAdviceTemplate(params) {
283
 export function PostInitAdviceTemplate(params) {
308
   return request({
284
   return request({
309
     url: '/api/advicetemplate/init/commit',
285
     url: '/api/advicetemplate/init/commit',
310
     method: 'post',
286
     method: 'post',
311
-    params:params
287
+    params: params
312
 
288
 
313
   })
289
   })
314
 }
290
 }
315
 
291
 
316
-
317
-
318
-
292
+export function getPrintInfo(id, params) {
293
+  return request({
294
+    url: '/api/advicetemplate/getprintinfo?id=' + id,
295
+    method: 'get',
296
+    params: params
297
+  })
298
+}

+ 1 - 1
src/xt_pages/management/home.vue View File

2646
       },
2646
       },
2647
       handleCurrentChange(val) {
2647
       handleCurrentChange(val) {
2648
         this.unitType = val.unit_type
2648
         this.unitType = val.unit_type
2649
-        console.log('val是什么', val)
2649
+        // console.log('val是什么', val)
2650
         this.currentRow = val
2650
         this.currentRow = val
2651
         this.$forceUpdate()
2651
         this.$forceUpdate()
2652
         this.getMachineDetailById(val.id)
2652
         this.getMachineDetailById(val.id)

File diff suppressed because it is too large
+ 819 - 790
src/xt_pages/user/doctorAdvice.vue


File diff suppressed because it is too large
+ 940 - 684
src/xt_pages/user/patients.vue