Browse Source

修改样式

See999 4 years ago
parent
commit
1735ffea6d
4 changed files with 667 additions and 632 deletions
  1. 237 236
      src/api/manage.js
  2. 320 303
      src/xt_pages/management/components/ManageForm.vue
  3. 91 74
      src/xt_pages/management/index.vue
  4. 19 19
      src/xt_permission.js

+ 237 - 236
src/api/manage.js View File

1
-import request from '@/utils/request'
1
+import request from "@/utils/request";
2
 
2
 
3
 export function getAllSubregion(params) {
3
 export function getAllSubregion(params) {
4
+  console.log("params", params);
4
   return request({
5
   return request({
5
-    url: '/api/management/getallsubregion',
6
-    method: 'Get',
6
+    url: "/api/management/getallsubregion",
7
+    method: "Get",
7
     params: params
8
     params: params
8
-  })
9
+  });
9
 }
10
 }
10
 
11
 
11
 export function SaveManageInfo(data) {
12
 export function SaveManageInfo(data) {
12
   return request({
13
   return request({
13
-    url: '/api/management/savemanageinfo',
14
-    method: 'Post',
14
+    url: "/api/management/savemanageinfo",
15
+    method: "Post",
15
     data: data
16
     data: data
16
-  })
17
+  });
17
 }
18
 }
18
 
19
 
19
 export function getAllMachineInfo(
20
 export function getAllMachineInfo(
31
     zoneid: zoneid,
32
     zoneid: zoneid,
32
     equipmentid: equipmentid,
33
     equipmentid: equipmentid,
33
     statusid: statusid
34
     statusid: statusid
34
-  }
35
+  };
35
   return request({
36
   return request({
36
-    url: '/api/management/getallmachineinfo',
37
-    method: 'Get',
37
+    url: "/api/management/getallmachineinfo",
38
+    method: "Get",
38
     params: params
39
     params: params
39
-  })
40
+  });
40
 }
41
 }
41
 
42
 
42
 export function getAllMachine(zoneid, deviceid) {
43
 export function getAllMachine(zoneid, deviceid) {
43
   const params = {
44
   const params = {
44
     zoneid: zoneid,
45
     zoneid: zoneid,
45
     deviceid: deviceid
46
     deviceid: deviceid
46
-  }
47
+  };
47
   return request({
48
   return request({
48
-    url: '/api/management/getallmachine',
49
-    method: 'Get',
49
+    url: "/api/management/getallmachine",
50
+    method: "Get",
50
     params: params
51
     params: params
51
-  })
52
+  });
52
 }
53
 }
53
 
54
 
54
 export function getMachineDetailById(id, params) {
55
 export function getMachineDetailById(id, params) {
55
   return request({
56
   return request({
56
-    url: '/api/management/getmachinedetail?id=' + id,
57
-    method: 'Get',
57
+    url: "/api/management/getmachinedetail?id=" + id,
58
+    method: "Get",
58
     params: params
59
     params: params
59
-  })
60
+  });
60
 }
61
 }
61
 
62
 
62
 export function UpdateMachineInfo(data) {
63
 export function UpdateMachineInfo(data) {
63
-  console.log('data', data)
64
+  console.log("data", data);
64
   return request({
65
   return request({
65
-    url: '/api/management/updatemachineinfo',
66
-    method: 'Post',
66
+    url: "/api/management/updatemachineinfo",
67
+    method: "Post",
67
     data: data
68
     data: data
68
-  })
69
+  });
69
 }
70
 }
70
 
71
 
71
 export function UpdateMachineInfoTwo(data) {
72
 export function UpdateMachineInfoTwo(data) {
72
-  console.log('data', data)
73
+  console.log("data", data);
73
   return request({
74
   return request({
74
-    url: '/api/management/updatemachineinfotwo',
75
-    method: 'post',
75
+    url: "/api/management/updatemachineinfotwo",
76
+    method: "post",
76
     data: data
77
     data: data
77
-  })
78
+  });
78
 }
79
 }
79
 
80
 
80
 export function getAllEquimentName(params) {
81
 export function getAllEquimentName(params) {
81
   return request({
82
   return request({
82
-    url: '/api/management/getallequimentname',
83
-    method: 'Get',
83
+    url: "/api/management/getallequimentname",
84
+    method: "Get",
84
     params: params
85
     params: params
85
-  })
86
+  });
86
 }
87
 }
87
 
88
 
88
 export function savePlan(data, id) {
89
 export function savePlan(data, id) {
89
   return request({
90
   return request({
90
-    url: '/api/management/saveplan?id=' + id,
91
-    method: 'Post',
91
+    url: "/api/management/saveplan?id=" + id,
92
+    method: "Post",
92
     data: data
93
     data: data
93
-  })
94
+  });
94
 }
95
 }
95
 
96
 
96
 export function getAllPlan(params) {
97
 export function getAllPlan(params) {
97
   return request({
98
   return request({
98
-    url: '/api/management/getallplan',
99
-    method: 'Get',
99
+    url: "/api/management/getallplan",
100
+    method: "Get",
100
     params: params
101
     params: params
101
-  })
102
+  });
102
 }
103
 }
103
 
104
 
104
 export function getAllPlanDetail(unitype) {
105
 export function getAllPlanDetail(unitype) {
105
   // eslint-disable-next-line no-redeclare
106
   // eslint-disable-next-line no-redeclare
106
   const params = {
107
   const params = {
107
     unitype: unitype
108
     unitype: unitype
108
-  }
109
+  };
109
   return request({
110
   return request({
110
-    url: '/api/management/getallplandetail',
111
-    method: 'Get',
111
+    url: "/api/management/getallplandetail",
112
+    method: "Get",
112
     params: params
113
     params: params
113
-  })
114
+  });
114
 }
115
 }
115
 
116
 
116
 export function getEditMachine(id, params) {
117
 export function getEditMachine(id, params) {
117
   return request({
118
   return request({
118
-    url: '/api/management/geteditmachine?id=' + id,
119
-    method: 'Get',
119
+    url: "/api/management/geteditmachine?id=" + id,
120
+    method: "Get",
120
     params: params
121
     params: params
121
-  })
122
+  });
122
 }
123
 }
123
 
124
 
124
 export function DeletePlans(data) {
125
 export function DeletePlans(data) {
125
   return request({
126
   return request({
126
-    url: '/api/staff/deleteplans',
127
-    method: 'delete',
127
+    url: "/api/staff/deleteplans",
128
+    method: "delete",
128
     data: data
129
     data: data
129
-  })
130
+  });
130
 }
131
 }
131
 
132
 
132
 export function EditPlanDetail(id, params) {
133
 export function EditPlanDetail(id, params) {
133
   return request({
134
   return request({
134
-    url: '/api/manage/editplandetail?id=' + id,
135
-    method: 'get',
135
+    url: "/api/manage/editplandetail?id=" + id,
136
+    method: "get",
136
     params: params
137
     params: params
137
-  })
138
+  });
138
 }
139
 }
139
 
140
 
140
 export function UpdatePlanInfo(data) {
141
 export function UpdatePlanInfo(data) {
141
   return request({
142
   return request({
142
-    url: '/api/manage/updateplaninfo',
143
-    method: 'Post',
143
+    url: "/api/manage/updateplaninfo",
144
+    method: "Post",
144
     data: data
145
     data: data
145
-  })
146
+  });
146
 }
147
 }
147
 
148
 
148
 export function getComprehensive(params) {
149
 export function getComprehensive(params) {
149
   return request({
150
   return request({
150
-    url: '/api/manage/getcomprehensive',
151
-    method: 'Get',
151
+    url: "/api/manage/getcomprehensive",
152
+    method: "Get",
152
     params: params
153
     params: params
153
-  })
154
+  });
154
 }
155
 }
155
 
156
 
156
 export function SaveInformation(eid, data) {
157
 export function SaveInformation(eid, data) {
157
   return request({
158
   return request({
158
-    url: '/api/manage/saveinformation?eid=' + eid,
159
-    method: 'Post',
159
+    url: "/api/manage/saveinformation?eid=" + eid,
160
+    method: "Post",
160
     data: data
161
     data: data
161
-  })
162
+  });
162
 }
163
 }
163
 
164
 
164
 export function getPatientInfo(id, params) {
165
 export function getPatientInfo(id, params) {
165
   return request({
166
   return request({
166
-    url: '/api/manage/getpatientinfo?id=' + id,
167
-    method: 'Get',
167
+    url: "/api/manage/getpatientinfo?id=" + id,
168
+    method: "Get",
168
     params: params
169
     params: params
169
-  })
170
+  });
170
 }
171
 }
171
 
172
 
172
 export function ChangeClass(equitid, id) {
173
 export function ChangeClass(equitid, id) {
173
   const params = {
174
   const params = {
174
     equitid: equitid,
175
     equitid: equitid,
175
     id: id
176
     id: id
176
-  }
177
+  };
177
   return request({
178
   return request({
178
-    url: '/api/manage/changeclass',
179
-    method: 'Get',
179
+    url: "/api/manage/changeclass",
180
+    method: "Get",
180
     params: params
181
     params: params
181
-  })
182
+  });
182
 }
183
 }
183
 
184
 
184
 export function changePatient(equitid, id) {
185
 export function changePatient(equitid, id) {
185
   const params = {
186
   const params = {
186
     equitid: equitid,
187
     equitid: equitid,
187
     id: id
188
     id: id
188
-  }
189
+  };
189
   return request({
190
   return request({
190
-    url: '/api/manage/changepatient',
191
-    method: 'Get',
191
+    url: "/api/manage/changepatient",
192
+    method: "Get",
192
     params: params
193
     params: params
193
-  })
194
+  });
194
 }
195
 }
195
 
196
 
196
 export function getAllOrganization(params) {
197
 export function getAllOrganization(params) {
197
   return request({
198
   return request({
198
-    url: '/api/manage/getallorganization',
199
-    method: 'Get',
199
+    url: "/api/manage/getallorganization",
200
+    method: "Get",
200
     params: params
201
     params: params
201
-  })
202
+  });
202
 }
203
 }
203
 
204
 
204
 export function getUserRegister(id, params) {
205
 export function getUserRegister(id, params) {
205
   return request({
206
   return request({
206
-    url: '/api/manage/getregisterinfo?id=' + id,
207
-    method: 'Get',
207
+    url: "/api/manage/getregisterinfo?id=" + id,
208
+    method: "Get",
208
     params: params
209
     params: params
209
-  })
210
+  });
210
 }
211
 }
211
 
212
 
212
 export function getInformationData(limit, page) {
213
 export function getInformationData(limit, page) {
213
   const params = {
214
   const params = {
214
     limit: limit,
215
     limit: limit,
215
     page: page
216
     page: page
216
-  }
217
+  };
217
   return request({
218
   return request({
218
-    url: '/api/manage/getinformationdata',
219
-    method: 'Get',
219
+    url: "/api/manage/getinformationdata",
220
+    method: "Get",
220
     params: params
221
     params: params
221
-  })
222
+  });
222
 }
223
 }
223
 
224
 
224
 export function SaveBacteria(id, data) {
225
 export function SaveBacteria(id, data) {
225
   return request({
226
   return request({
226
-    url: '/api/manage/savebacteria?id=' + id,
227
-    method: 'Post',
227
+    url: "/api/manage/savebacteria?id=" + id,
228
+    method: "Post",
228
     data: data
229
     data: data
229
-  })
230
+  });
230
 }
231
 }
231
 
232
 
232
 export function SaveLincomycin(id, data) {
233
 export function SaveLincomycin(id, data) {
233
   return request({
234
   return request({
234
-    url: '/api/manage/savelincomycin?id=' + id,
235
-    method: 'Post',
235
+    url: "/api/manage/savelincomycin?id=" + id,
236
+    method: "Post",
236
     data: data
237
     data: data
237
-  })
238
+  });
238
 }
239
 }
239
 
240
 
240
 export function SaveQualityControl(id, data) {
241
 export function SaveQualityControl(id, data) {
241
   return request({
242
   return request({
242
-    url: '/api/manage/savequalitycontrol?id=' + id,
243
-    method: 'Post',
243
+    url: "/api/manage/savequalitycontrol?id=" + id,
244
+    method: "Post",
244
     data: data
245
     data: data
245
-  })
246
+  });
246
 }
247
 }
247
 
248
 
248
 export function getOrgName(params) {
249
 export function getOrgName(params) {
249
   return request({
250
   return request({
250
-    url: '/api/manage/getorgname',
251
-    method: 'Get',
251
+    url: "/api/manage/getorgname",
252
+    method: "Get",
252
     params: params
253
     params: params
253
-  })
254
+  });
254
 }
255
 }
255
 
256
 
256
 export function getAllQulityInfo(params) {
257
 export function getAllQulityInfo(params) {
257
   return request({
258
   return request({
258
-    url: '/api/manage/getallqulityinfo',
259
-    method: 'Get',
259
+    url: "/api/manage/getallqulityinfo",
260
+    method: "Get",
260
     params: params
261
     params: params
261
-  })
262
+  });
262
 }
263
 }
263
 
264
 
264
 export function EditCulture(id, userid) {
265
 export function EditCulture(id, userid) {
265
   const params = {
266
   const params = {
266
     id: id,
267
     id: id,
267
     userid: userid
268
     userid: userid
268
-  }
269
+  };
269
   return request({
270
   return request({
270
-    url: '/api/manage/editculture',
271
-    method: 'Get',
271
+    url: "/api/manage/editculture",
272
+    method: "Get",
272
     params: params
273
     params: params
273
-  })
274
+  });
274
 }
275
 }
275
 
276
 
276
 export function UpdateCulture(data) {
277
 export function UpdateCulture(data) {
277
   return request({
278
   return request({
278
-    url: '/api/manage/updateculture',
279
-    method: 'Post',
279
+    url: "/api/manage/updateculture",
280
+    method: "Post",
280
     data: data
281
     data: data
281
-  })
282
+  });
282
 }
283
 }
283
 
284
 
284
 export function DeleteCultrue(data) {
285
 export function DeleteCultrue(data) {
285
   return request({
286
   return request({
286
-    url: '/api/manage/deletecultrue',
287
-    method: 'delete',
287
+    url: "/api/manage/deletecultrue",
288
+    method: "delete",
288
     data: data
289
     data: data
289
-  })
290
+  });
290
 }
291
 }
291
 
292
 
292
 export function EditDialyState(id, params) {
293
 export function EditDialyState(id, params) {
293
   return request({
294
   return request({
294
-    url: '/api/manage/editdialystate?id=' + id,
295
-    method: 'Get',
295
+    url: "/api/manage/editdialystate?id=" + id,
296
+    method: "Get",
296
     params: params
297
     params: params
297
-  })
298
+  });
298
 }
299
 }
299
 
300
 
300
 export function UpdateDialyState(data) {
301
 export function UpdateDialyState(data) {
301
   return request({
302
   return request({
302
-    url: '/api/manage/updatedialystate',
303
-    method: 'post',
303
+    url: "/api/manage/updatedialystate",
304
+    method: "post",
304
     data: data
305
     data: data
305
-  })
306
+  });
306
 }
307
 }
307
 
308
 
308
 export function DeleteDialystate(data) {
309
 export function DeleteDialystate(data) {
309
   return request({
310
   return request({
310
-    url: '/api/manage/deletedialystate',
311
-    method: 'delete',
311
+    url: "/api/manage/deletedialystate",
312
+    method: "delete",
312
     data: data
313
     data: data
313
-  })
314
+  });
314
 }
315
 }
315
 
316
 
316
 export function EditIon(id, params) {
317
 export function EditIon(id, params) {
317
   return request({
318
   return request({
318
-    url: '/api/manage/edition?id=' + id,
319
-    method: 'Get',
319
+    url: "/api/manage/edition?id=" + id,
320
+    method: "Get",
320
     params: params
321
     params: params
321
-  })
322
+  });
322
 }
323
 }
323
 
324
 
324
 export function UpdateIon(data) {
325
 export function UpdateIon(data) {
325
   return request({
326
   return request({
326
-    url: '/api/manage/updateion',
327
-    method: 'Post',
327
+    url: "/api/manage/updateion",
328
+    method: "Post",
328
     data: data
329
     data: data
329
-  })
330
+  });
330
 }
331
 }
331
 
332
 
332
 export function DeleteIon(data) {
333
 export function DeleteIon(data) {
333
   return request({
334
   return request({
334
-    url: '/api/manage/deleteion',
335
-    method: 'delete',
335
+    url: "/api/manage/deleteion",
336
+    method: "delete",
336
     data: data
337
     data: data
337
-  })
338
+  });
338
 }
339
 }
339
 
340
 
340
 export function queryTable(bedid, startime, endtime) {
341
 export function queryTable(bedid, startime, endtime) {
342
     bedid: bedid,
343
     bedid: bedid,
343
     startime: startime,
344
     startime: startime,
344
     endtime: endtime
345
     endtime: endtime
345
-  }
346
+  };
346
   return request({
347
   return request({
347
-    url: '/api/manage/query',
348
-    method: 'Get',
348
+    url: "/api/manage/query",
349
+    method: "Get",
349
     params: params
350
     params: params
350
-  })
351
+  });
351
 }
352
 }
352
 
353
 
353
 export function SaveRepair(id, data) {
354
 export function SaveRepair(id, data) {
354
   return request({
355
   return request({
355
-    url: '/api/manage/saverepair?id=' + id,
356
-    method: 'post',
356
+    url: "/api/manage/saverepair?id=" + id,
357
+    method: "post",
357
     data: data
358
     data: data
358
-  })
359
+  });
359
 }
360
 }
360
 
361
 
361
 export function getAllRepair(limit, page) {
362
 export function getAllRepair(limit, page) {
362
   const params = {
363
   const params = {
363
     limit: limit,
364
     limit: limit,
364
     page: page
365
     page: page
365
-  }
366
+  };
366
   return request({
367
   return request({
367
-    url: '/api/manage/getallrepair',
368
-    method: 'Get',
368
+    url: "/api/manage/getallrepair",
369
+    method: "Get",
369
     params: params
370
     params: params
370
-  })
371
+  });
371
 }
372
 }
372
 
373
 
373
 export function EditRepair(id, params) {
374
 export function EditRepair(id, params) {
374
   return request({
375
   return request({
375
-    url: '/api/manage/editrepair?id=' + id,
376
-    method: 'Get',
376
+    url: "/api/manage/editrepair?id=" + id,
377
+    method: "Get",
377
     params: params
378
     params: params
378
-  })
379
+  });
379
 }
380
 }
380
 
381
 
381
 export function UpdateRepair(data) {
382
 export function UpdateRepair(data) {
382
   return request({
383
   return request({
383
-    url: '/api/manage/updaterepair',
384
-    method: 'Post',
384
+    url: "/api/manage/updaterepair",
385
+    method: "Post",
385
     data: data
386
     data: data
386
-  })
387
+  });
387
 }
388
 }
388
 
389
 
389
 export function DeleteRepair(data) {
390
 export function DeleteRepair(data) {
390
   return request({
391
   return request({
391
-    url: '/api/manage/deleterepair',
392
-    method: 'delete',
392
+    url: "/api/manage/deleterepair",
393
+    method: "delete",
393
     data: data
394
     data: data
394
-  })
395
+  });
395
 }
396
 }
396
 
397
 
397
 export function queryRepair(bedid, startime, endtime) {
398
 export function queryRepair(bedid, startime, endtime) {
399
     bedid: bedid,
400
     bedid: bedid,
400
     startime: startime,
401
     startime: startime,
401
     endtime: endtime
402
     endtime: endtime
402
-  }
403
+  };
403
 
404
 
404
   return request({
405
   return request({
405
-    url: '/api/manage/queryrepair',
406
-    method: 'Get',
406
+    url: "/api/manage/queryrepair",
407
+    method: "Get",
407
     params: params
408
     params: params
408
-  })
409
+  });
409
 }
410
 }
410
 
411
 
411
 export function EditUser(id, patientid) {
412
 export function EditUser(id, patientid) {
412
   const params = {
413
   const params = {
413
     id: id,
414
     id: id,
414
     patientid: patientid
415
     patientid: patientid
415
-  }
416
+  };
416
   return request({
417
   return request({
417
-    url: '/api/manage/edituser',
418
-    method: 'Get',
418
+    url: "/api/manage/edituser",
419
+    method: "Get",
419
     params: params
420
     params: params
420
-  })
421
+  });
421
 }
422
 }
422
 
423
 
423
 export function DeleteUserform(data) {
424
 export function DeleteUserform(data) {
424
   return request({
425
   return request({
425
-    url: '/api/manage/deleteform',
426
-    method: 'delete',
426
+    url: "/api/manage/deleteform",
427
+    method: "delete",
427
     data: data
428
     data: data
428
-  })
429
+  });
429
 }
430
 }
430
 
431
 
431
 export function UpdateForm(data) {
432
 export function UpdateForm(data) {
432
   return request({
433
   return request({
433
-    url: '/api/manage/updateform',
434
-    method: 'post',
434
+    url: "/api/manage/updateform",
435
+    method: "post",
435
     data: data
436
     data: data
436
-  })
437
+  });
437
 }
438
 }
438
 
439
 
439
 export function queryInfo(zone, bed, startime, endtime, limit, page) {
440
 export function queryInfo(zone, bed, startime, endtime, limit, page) {
444
     endtime: endtime,
445
     endtime: endtime,
445
     limit: limit,
446
     limit: limit,
446
     page: page
447
     page: page
447
-  }
448
+  };
448
   return request({
449
   return request({
449
-    url: '/api/manage/queryinfo',
450
-    method: 'Get',
450
+    url: "/api/manage/queryinfo",
451
+    method: "Get",
451
     params: params
452
     params: params
452
-  })
453
+  });
453
 }
454
 }
454
 
455
 
455
 export function getAutoData(id, params) {
456
 export function getAutoData(id, params) {
456
   return request({
457
   return request({
457
-    url: '/api/manage/insertautodata?id=' + id,
458
-    method: 'Get',
458
+    url: "/api/manage/insertautodata?id=" + id,
459
+    method: "Get",
459
     params: params
460
     params: params
460
-  })
461
+  });
461
 }
462
 }
462
 
463
 
463
 export function getAllEquitType(params) {
464
 export function getAllEquitType(params) {
464
   return request({
465
   return request({
465
-    url: '/api/manage/getallequittype',
466
-    method: 'Get',
466
+    url: "/api/manage/getallequittype",
467
+    method: "Get",
467
     params: params
468
     params: params
468
-  })
469
+  });
469
 }
470
 }
470
 
471
 
471
 export function getUserForm(id, limit, page) {
472
 export function getUserForm(id, limit, page) {
473
     id: id,
474
     id: id,
474
     limit: limit,
475
     limit: limit,
475
     page: page
476
     page: page
476
-  }
477
+  };
477
   return request({
478
   return request({
478
-    url: '/api/manage/getuserform',
479
-    method: 'Get',
479
+    url: "/api/manage/getuserform",
480
+    method: "Get",
480
     params: params
481
     params: params
481
-  })
482
+  });
482
 }
483
 }
483
 
484
 
484
 export function UpdateMacheineTwo(data) {
485
 export function UpdateMacheineTwo(data) {
485
   return request({
486
   return request({
486
-    url: '/api/manage/updatemacheinettwo',
487
-    method: 'post',
487
+    url: "/api/manage/updatemacheinettwo",
488
+    method: "post",
488
     data: data
489
     data: data
489
-  })
490
+  });
490
 }
491
 }
491
 
492
 
492
 export function getBedForm(id, params) {
493
 export function getBedForm(id, params) {
493
   return request({
494
   return request({
494
-    url: '/api/manage/getbedform?id=' + id,
495
-    method: 'get',
495
+    url: "/api/manage/getbedform?id=" + id,
496
+    method: "get",
496
     params: params
497
     params: params
497
-  })
498
+  });
498
 }
499
 }
499
 
500
 
500
 export function getTotalCount(params) {
501
 export function getTotalCount(params) {
501
   return request({
502
   return request({
502
-    url: '/api/manage/gettotalcount',
503
-    method: 'Get',
503
+    url: "/api/manage/gettotalcount",
504
+    method: "Get",
504
     params: params
505
     params: params
505
-  })
506
+  });
506
 }
507
 }
507
 
508
 
508
 export function getTotalNumber(id, params) {
509
 export function getTotalNumber(id, params) {
509
   return request({
510
   return request({
510
-    url: '/api/manage/getotalnumber?id=' + id,
511
-    method: 'Get',
511
+    url: "/api/manage/getotalnumber?id=" + id,
512
+    method: "Get",
512
     params: params
513
     params: params
513
-  })
514
+  });
514
 }
515
 }
515
 
516
 
516
 export function getTimeWarning(id, params) {
517
 export function getTimeWarning(id, params) {
517
   return request({
518
   return request({
518
-    url: '/api/manage/gettimewarning?id=' + id,
519
-    method: 'Get',
519
+    url: "/api/manage/gettimewarning?id=" + id,
520
+    method: "Get",
520
     params: params
521
     params: params
521
-  })
522
+  });
522
 }
523
 }
523
 
524
 
524
 export function SaveManageInfoTwo(data, beds) {
525
 export function SaveManageInfoTwo(data, beds) {
525
-  console.log('data', beds)
526
+  console.log("data", beds);
526
   return request({
527
   return request({
527
-    url: '/api/manage/savemanageinfotwo?beds=' + beds,
528
-    method: 'post',
528
+    url: "/api/manage/savemanageinfotwo?beds=" + beds,
529
+    method: "post",
529
     data: data
530
     data: data
530
-  })
531
+  });
531
 }
532
 }
532
 
533
 
533
 export function getAllpatient(params) {
534
 export function getAllpatient(params) {
534
   return request({
535
   return request({
535
-    url: '/api/manage/getallpatient',
536
-    method: 'get',
536
+    url: "/api/manage/getallpatient",
537
+    method: "get",
537
     params: params
538
     params: params
538
-  })
539
+  });
539
 }
540
 }
540
 
541
 
541
 export function changeBed(id, params) {
542
 export function changeBed(id, params) {
542
   return request({
543
   return request({
543
-    url: '/api/manage/changebed?id=' + id,
544
-    method: 'get',
544
+    url: "/api/manage/changebed?id=" + id,
545
+    method: "get",
545
     params: params
546
     params: params
546
-  })
547
+  });
547
 }
548
 }
548
 
549
 
549
 export function getPatientDetail(id, params) {
550
 export function getPatientDetail(id, params) {
550
   return request({
551
   return request({
551
-    url: '/api/manage/getpatientdetail?id=' + id,
552
-    method: 'get',
552
+    url: "/api/manage/getpatientdetail?id=" + id,
553
+    method: "get",
553
     params: params
554
     params: params
554
-  })
555
+  });
555
 }
556
 }
556
 
557
 
557
 export function changeRun(id, data) {
558
 export function changeRun(id, data) {
558
   return request({
559
   return request({
559
-    url: '/api/manage/changrun?id=' + id,
560
-    method: 'post',
560
+    url: "/api/manage/changrun?id=" + id,
561
+    method: "post",
561
     data: data
562
     data: data
562
-  })
563
+  });
563
 }
564
 }
564
 
565
 
565
 export function getRemanderData(params) {
566
 export function getRemanderData(params) {
566
   return request({
567
   return request({
567
-    url: '/api/manage/getremanderdata',
568
-    method: 'get',
568
+    url: "/api/manage/getremanderdata",
569
+    method: "get",
569
     params: params
570
     params: params
570
-  })
571
+  });
571
 }
572
 }
572
 
573
 
573
 export function openDelete(id, params) {
574
 export function openDelete(id, params) {
574
   return request({
575
   return request({
575
-    url: '/api/manage/opendelete?id=' + id,
576
-    method: 'delete',
576
+    url: "/api/manage/opendelete?id=" + id,
577
+    method: "delete",
577
     params: params
578
     params: params
578
-  })
579
+  });
579
 }
580
 }
580
 
581
 
581
 export function DeleteUserLogin(id, params) {
582
 export function DeleteUserLogin(id, params) {
582
   return request({
583
   return request({
583
-    url: '/api/manage/deleteuserlogin?id=' + id,
584
-    method: 'delete',
584
+    url: "/api/manage/deleteuserlogin?id=" + id,
585
+    method: "delete",
585
     params: params
586
     params: params
586
-  })
587
+  });
587
 }
588
 }
588
 
589
 
589
 export function DeleteCultrues(id, params) {
590
 export function DeleteCultrues(id, params) {
590
   return request({
591
   return request({
591
-    url: '/api/manage/deletecultrues?id=' + id,
592
-    method: 'delete',
592
+    url: "/api/manage/deletecultrues?id=" + id,
593
+    method: "delete",
593
     params: params
594
     params: params
594
-  })
595
+  });
595
 }
596
 }
596
 
597
 
597
 export function DeleteDialystates(id, params) {
598
 export function DeleteDialystates(id, params) {
598
   return request({
599
   return request({
599
-    url: '/api/manage/deletedialystates?id=' + id,
600
-    method: 'delete',
600
+    url: "/api/manage/deletedialystates?id=" + id,
601
+    method: "delete",
601
     params: params
602
     params: params
602
-  })
603
+  });
603
 }
604
 }
604
 
605
 
605
 export function DeleteIons(id, params) {
606
 export function DeleteIons(id, params) {
606
   return request({
607
   return request({
607
-    url: '/api/manage/deleteions?id=' + id,
608
-    method: 'delete',
608
+    url: "/api/manage/deleteions?id=" + id,
609
+    method: "delete",
609
     params: params
610
     params: params
610
-  })
611
+  });
611
 }
612
 }
612
 
613
 
613
 export function DeleteRepairs(id, params) {
614
 export function DeleteRepairs(id, params) {
614
   return request({
615
   return request({
615
-    url: '/api/manage/deleterepairs?id=' + id,
616
-    method: 'delete',
616
+    url: "/api/manage/deleterepairs?id=" + id,
617
+    method: "delete",
617
     params: params
618
     params: params
618
-  })
619
+  });
619
 }
620
 }
620
 
621
 
621
 export function SaveMode(data) {
622
 export function SaveMode(data) {
622
   return request({
623
   return request({
623
-    url: '/api/manage/savemode',
624
-    method: 'post',
624
+    url: "/api/manage/savemode",
625
+    method: "post",
625
     data: data
626
     data: data
626
-  })
627
+  });
627
 }
628
 }
628
 
629
 
629
 export function getAllMode(params) {
630
 export function getAllMode(params) {
630
   return request({
631
   return request({
631
-    url: '/api/manage/getallmode',
632
-    method: 'get',
632
+    url: "/api/manage/getallmode",
633
+    method: "get",
633
     params: params
634
     params: params
634
-  })
635
+  });
635
 }
636
 }
636
 
637
 
637
 export function EditMode(id, params) {
638
 export function EditMode(id, params) {
638
   return request({
639
   return request({
639
-    url: '/api/manage/editmode?id=' + id,
640
-    method: 'get',
640
+    url: "/api/manage/editmode?id=" + id,
641
+    method: "get",
641
     params: params
642
     params: params
642
-  })
643
+  });
643
 }
644
 }
644
 
645
 
645
 export function UpdateMode(id, data) {
646
 export function UpdateMode(id, data) {
646
   return request({
647
   return request({
647
-    url: '/api/manage/updatemode?id=' + id,
648
-    method: 'post',
648
+    url: "/api/manage/updatemode?id=" + id,
649
+    method: "post",
649
     data: data
650
     data: data
650
-  })
651
+  });
651
 }
652
 }
652
 
653
 
653
 export function DeleteMode(id, params) {
654
 export function DeleteMode(id, params) {
654
   return request({
655
   return request({
655
-    url: '/api/manage/deletemode?id=' + id,
656
-    method: 'delete',
656
+    url: "/api/manage/deletemode?id=" + id,
657
+    method: "delete",
657
     params: params
658
     params: params
658
-  })
659
+  });
659
 }
660
 }

+ 320 - 303
src/xt_pages/management/components/ManageForm.vue View File

3
     <el-dialog
3
     <el-dialog
4
       title="新增设备"
4
       title="新增设备"
5
       :visible.sync="dialogVisible"
5
       :visible.sync="dialogVisible"
6
-      width="52%"
6
+      width="70%"
7
       align="center"
7
       align="center"
8
     >
8
     >
9
       <el-form ref="form" :model="form" :rules="rules">
9
       <el-form ref="form" :model="form" :rules="rules">
122
                 placeholder="请选择"
122
                 placeholder="请选择"
123
                 format="yyyy-MM-dd"
123
                 format="yyyy-MM-dd"
124
                 value-format="yyyy-MM-dd"
124
                 value-format="yyyy-MM-dd"
125
-                style="width:140px"
125
+                style="width:135px"
126
               ></el-date-picker>
126
               ></el-date-picker>
127
             </el-form-item>
127
             </el-form-item>
128
           </el-col>
128
           </el-col>
338
   SaveManageInfo,
338
   SaveManageInfo,
339
   SaveManageInfoTwo,
339
   SaveManageInfoTwo,
340
   getAllMode
340
   getAllMode
341
-} from '@/api/manage'
341
+} from "@/api/manage";
342
 const treatmentmodes = [
342
 const treatmentmodes = [
343
-  'HD',
344
-  'HDF',
345
-  'HD+HP',
346
-  'HP',
347
-  'HF',
348
-  'SCUF',
349
-  'IUF',
350
-  'HFHD',
351
-  'HFHD+HP',
352
-  'PHF',
353
-  'HFR',
354
-  'HDF+HP',
355
-  'CRRT',
356
-  '腹水回输'
357
-]
343
+  "HD",
344
+  "HDF",
345
+  "HD+HP",
346
+  "HP",
347
+  "HF",
348
+  "SCUF",
349
+  "IUF",
350
+  "HFHD",
351
+  "HFHD+HP",
352
+  "PHF",
353
+  "HFR",
354
+  "HDF+HP",
355
+  "CRRT",
356
+  "腹水回输"
357
+];
358
 export default {
358
 export default {
359
-  name: 'ManageForm',
359
+  name: "ManageForm",
360
   data() {
360
   data() {
361
     return {
361
     return {
362
       dialogVisible: false,
362
       dialogVisible: false,
363
-      checked1: '',
363
+      checked1: "",
364
       form: {
364
       form: {
365
-        serial_number: '', // 序列号
365
+        serial_number: "", // 序列号
366
         device_type: 1, // 设备类型
366
         device_type: 1, // 设备类型
367
-        bed_number: '', // 床位号
368
-        device_name: '', // 设备名称
369
-        manufacture_factory: '', // 生产厂家
370
-        service_manufacturer: '', // 维修厂家
371
-        unit_type: '', // 设备型号
372
-        use_section: '', // 使用科室
373
-        section_number: '', // 科室编号
374
-        buy_date: '', // 购买日期
375
-        install_date: '', // 安装日期
376
-        start_date: '', // 启用日期
377
-        maintenance_engineer: '', // 维修工程师
378
-        telephone: '', // 联系电话
379
-        guarantee_date: '', // 保修日期
367
+        bed_number: "", // 床位号
368
+        device_name: "", // 设备名称
369
+        manufacture_factory: "", // 生产厂家
370
+        service_manufacturer: "", // 维修厂家
371
+        unit_type: "", // 设备型号
372
+        use_section: "", // 使用科室
373
+        section_number: "", // 科室编号
374
+        buy_date: "", // 购买日期
375
+        install_date: "", // 安装日期
376
+        start_date: "", // 启用日期
377
+        maintenance_engineer: "", // 维修工程师
378
+        telephone: "", // 联系电话
379
+        guarantee_date: "", // 保修日期
380
         machine_status: 1, // 机器状态
380
         machine_status: 1, // 机器状态
381
-        user_total: '', // 初次使用次数
382
-        Disinfection_mode: '', // 消毒方式
383
-        remarks: '', // 备注
384
-        rubbish_date: '', // 报废日期
385
-        rubbish_reason: '', // 报废原因
386
-        user_year: '', // 使用年限
387
-        work_time: '', // 工作时长
388
-        revers_mode: '', // 反渗模式
381
+        user_total: "", // 初次使用次数
382
+        Disinfection_mode: "", // 消毒方式
383
+        remarks: "", // 备注
384
+        rubbish_date: "", // 报废日期
385
+        rubbish_reason: "", // 报废原因
386
+        user_year: "", // 使用年限
387
+        work_time: "", // 工作时长
388
+        revers_mode: "", // 反渗模式
389
         treat_mode: [],
389
         treat_mode: [],
390
         treat_type: [], // 治疗模式
390
         treat_type: [], // 治疗模式
391
-        beds: ''
391
+        beds: ""
392
       },
392
       },
393
       forms: {
393
       forms: {
394
-        beds: ''
394
+        beds: ""
395
       },
395
       },
396
       deviceType: [],
396
       deviceType: [],
397
       bedNumber: [],
397
       bedNumber: [],
398
       machineStatus: [
398
       machineStatus: [
399
-        { id: 1, name: '使用机' },
400
-        { id: 2, name: '备用机' },
401
-        { id: 3, name: '急诊机' },
402
-        { id: 4, name: '报废机' }
399
+        { id: 1, name: "使用机" },
400
+        { id: 2, name: "备用机" },
401
+        { id: 3, name: "急诊机" },
402
+        { id: 4, name: "报废机" }
403
       ],
403
       ],
404
       DisinfectionMode: [
404
       DisinfectionMode: [
405
-        { id: 0, name: '请选择' },
406
-        { id: 1, name: '化学消毒' },
407
-        { id: 2, name: '热消毒' },
408
-        { id: 3, name: '化学消毒+热消毒' }
405
+        { id: 0, name: "请选择" },
406
+        { id: 1, name: "化学消毒" },
407
+        { id: 2, name: "热消毒" },
408
+        { id: 3, name: "化学消毒+热消毒" }
409
       ],
409
       ],
410
       DisCardResion: [
410
       DisCardResion: [
411
-        { id: 0, name: '请选择' },
412
-        { id: 1, name: '超期限报废' },
413
-        { id: 2, name: '故障报废' },
414
-        { id: 3, name: '核定报废' }
411
+        { id: 0, name: "请选择" },
412
+        { id: 1, name: "超期限报废" },
413
+        { id: 2, name: "故障报废" },
414
+        { id: 3, name: "核定报废" }
415
       ],
415
       ],
416
       checkAll: false,
416
       checkAll: false,
417
       isIndeterminate: true,
417
       isIndeterminate: true,
422
       //   { id: 3, name: 'ww' }
422
       //   { id: 3, name: 'ww' }
423
       // ],
423
       // ],
424
       DeviceType: [
424
       DeviceType: [
425
-        { id: 1, name: '透析机' },
426
-        { id: 2, name: '水处理机' },
427
-        { id: 3, name: '其他' }
425
+        { id: 1, name: "透析机" },
426
+        { id: 2, name: "水处理机" },
427
+        { id: 3, name: "其他" }
428
       ],
428
       ],
429
       reverseMode: [
429
       reverseMode: [
430
-        { id: 0, name: '请选择' },
431
-        { id: 1, name: '单级反渗' },
432
-        { id: 2, name: '双级反渗' }
430
+        { id: 0, name: "请选择" },
431
+        { id: 1, name: "单级反渗" },
432
+        { id: 2, name: "双级反渗" }
433
       ],
433
       ],
434
       rules: {
434
       rules: {
435
-        serial_number: [{ required: true, message: '请填写序列号' }],
436
-        device_name: [{ required: true, message: '请填写设备名称' }],
437
-        device_type: [{ required: true, message: '请填写设备类型' }],
438
-        unit_type: [{ required: true, message: '请填写设备型号' }],
439
-        bed_number: [{ required: true, message: '请填写机位号' }]
435
+        serial_number: [{ required: true, message: "请填写序列号" }],
436
+        device_name: [{ required: true, message: "请填写设备名称" }],
437
+        device_type: [{ required: true, message: "请填写设备类型" }],
438
+        unit_type: [{ required: true, message: "请填写设备型号" }],
439
+        bed_number: [{ required: true, message: "请填写机位号" }]
440
         // treat_mode: [{ required: true, message: "请选择至少一种治疗模式" }]
440
         // treat_mode: [{ required: true, message: "请选择至少一种治疗模式" }]
441
       },
441
       },
442
       DisinfectionShow: false,
442
       DisinfectionShow: false,
451
       buttonShowTwo: false,
451
       buttonShowTwo: false,
452
       buttonShowThree: false,
452
       buttonShowThree: false,
453
       deviceMode: []
453
       deviceMode: []
454
-    }
454
+    };
455
   },
455
   },
456
   methods: {
456
   methods: {
457
     open: function() {
457
     open: function() {
458
-      this.dialogVisible = true
458
+      this.dialogVisible = true;
459
       // this.resetForm("form");
459
       // this.resetForm("form");
460
     },
460
     },
461
     changetreatmentmode(val) {
461
     changetreatmentmode(val) {
462
-      const checkedCount = val.length
463
-      this.checkAll = checkedCount === 14
464
-      this.isIndeterminate = checkedCount > 0 && checkedCount < 14
462
+      const checkedCount = val.length;
463
+      this.checkAll = checkedCount === 14;
464
+      this.isIndeterminate = checkedCount > 0 && checkedCount < 14;
465
     },
465
     },
466
     handleCheckAllChange(val) {
466
     handleCheckAllChange(val) {
467
-      this.form.treat_mode = val ? this.treatmentmode : []
468
-      this.isIndeterminate = false
467
+      this.form.treat_mode = val ? this.treatmentmode : [];
468
+      this.isIndeterminate = false;
469
     },
469
     },
470
     getAllSubregion() {
470
     getAllSubregion() {
471
       getAllSubregion().then(response => {
471
       getAllSubregion().then(response => {
472
         if (response.data.state === 1) {
472
         if (response.data.state === 1) {
473
-          var zones = response.data.data.zones
474
-          this.deviceType = zones
475
-          var numbers = response.data.data.numbers
476
-          var devicenumber = response.data.data.devicenumber
473
+          var zones = response.data.data.zones;
474
+          this.deviceType = zones;
475
+          var numbers = response.data.data.numbers;
476
+          var devicenumber = response.data.data.devicenumber;
477
           // console.log('devicenumber$', devicenumber)
477
           // console.log('devicenumber$', devicenumber)
478
           // var device = [{ bed_id: 0, bed_number: '请选择' }]
478
           // var device = [{ bed_id: 0, bed_number: '请选择' }]
479
           // for (let index = 0; index < devicenumber.length; index++) {
479
           // for (let index = 0; index < devicenumber.length; index++) {
480
           // const item = devicenumber[index]
480
           // const item = devicenumber[index]
481
           // device.push({ bed_id: item.bed_id, bed_number: item.bed_number })
481
           // device.push({ bed_id: item.bed_id, bed_number: item.bed_number })
482
           // }
482
           // }
483
-          this.bedNumber = devicenumber
483
+          this.bedNumber = devicenumber;
484
         }
484
         }
485
-      })
485
+      });
486
     },
486
     },
487
 
487
 
488
     changeDeviceType(val) {
488
     changeDeviceType(val) {
489
       if (val === 1) {
489
       if (val === 1) {
490
-        this.bedShow = true
491
-        this.totalShow = true
492
-        this.treatShow = true
493
-        this.allShow = true
494
-        this.bedShowTwo = false
495
-        this.buttonShow = true
496
-        this.buttonShowTwo = false
497
-        this.buttonShowThree = false
490
+        this.bedShow = true;
491
+        this.totalShow = true;
492
+        this.treatShow = true;
493
+        this.allShow = true;
494
+        this.bedShowTwo = false;
495
+        this.buttonShow = true;
496
+        this.buttonShowTwo = false;
497
+        this.buttonShowThree = false;
498
       }
498
       }
499
 
499
 
500
       if (val === 2) {
500
       if (val === 2) {
501
-        this.totalShow = false
502
-        this.DisinfectionShow = true
503
-        this.allShow = false
504
-        this.treatShow = false
505
-        this.reverseShow = true
506
-        this.bedShow = false
507
-        this.bedShowTwo = true
508
-        this.buttonShow = false
509
-        this.buttonShowTwo = true
510
-        this.buttonShowThree = false
501
+        this.totalShow = false;
502
+        this.DisinfectionShow = true;
503
+        this.allShow = false;
504
+        this.treatShow = false;
505
+        this.reverseShow = true;
506
+        this.bedShow = false;
507
+        this.bedShowTwo = true;
508
+        this.buttonShow = false;
509
+        this.buttonShowTwo = true;
510
+        this.buttonShowThree = false;
511
       }
511
       }
512
 
512
 
513
       if (val === 3) {
513
       if (val === 3) {
514
-        this.bedShow = false
515
-        this.totalShow = false
516
-        this.reverseShow = false
517
-        this.allShow = false
518
-        this.treatShow = false
519
-        this.DisinfectionShow = false
520
-        this.bedShowTwo = false
521
-        this.buttonShow = false
522
-        this.buttonShowTwo = false
523
-        this.buttonShowThree = true
514
+        this.bedShow = false;
515
+        this.totalShow = false;
516
+        this.reverseShow = false;
517
+        this.allShow = false;
518
+        this.treatShow = false;
519
+        this.DisinfectionShow = false;
520
+        this.bedShowTwo = false;
521
+        this.buttonShow = false;
522
+        this.buttonShowTwo = false;
523
+        this.buttonShowThree = true;
524
       }
524
       }
525
     },
525
     },
526
     changeMachineStatus(val) {
526
     changeMachineStatus(val) {
527
       if (val === 4) {
527
       if (val === 4) {
528
-        this.disa = false
528
+        this.disa = false;
529
       } else {
529
       } else {
530
-        this.disa = true
531
-        this.form.rubbish_date = ''
532
-        this.form.rubbish_reason = ''
530
+        this.disa = true;
531
+        this.form.rubbish_date = "";
532
+        this.form.rubbish_reason = "";
533
       }
533
       }
534
     },
534
     },
535
     SaveManageInfoThree(formName) {
535
     SaveManageInfoThree(formName) {
536
-      if (this.form.bed_number === '') {
537
-        this.form.bed_number = 0
536
+      if (this.form.bed_number === "") {
537
+        this.form.bed_number = 0;
538
       }
538
       }
539
-      const arr1 = []
539
+      const arr1 = [];
540
       this.form.treat_mode.map((item, index) => {
540
       this.form.treat_mode.map((item, index) => {
541
-        const obj = {}
542
-        if (item === 'HD') {
543
-          obj.id = 1
541
+        const obj = {};
542
+        if (item === "HD") {
543
+          obj.id = 1;
544
         }
544
         }
545
-        if (item === 'HDF') {
546
-          obj.id = 2
545
+        if (item === "HDF") {
546
+          obj.id = 2;
547
         }
547
         }
548
-        if (item === 'HD+HP') {
549
-          obj.id = 3
548
+        if (item === "HD+HP") {
549
+          obj.id = 3;
550
         }
550
         }
551
-        if (item === 'HP') {
552
-          obj.id = 4
551
+        if (item === "HP") {
552
+          obj.id = 4;
553
         }
553
         }
554
-        if (item === 'HF') {
555
-          obj.id = 5
554
+        if (item === "HF") {
555
+          obj.id = 5;
556
         }
556
         }
557
-        if (item === 'SCUF') {
558
-          obj.id = 6
557
+        if (item === "SCUF") {
558
+          obj.id = 6;
559
         }
559
         }
560
-        if (item === 'IUF') {
561
-          obj.id = 7
560
+        if (item === "IUF") {
561
+          obj.id = 7;
562
         }
562
         }
563
-        if (item === 'HFHD') {
564
-          obj.id = 8
563
+        if (item === "HFHD") {
564
+          obj.id = 8;
565
         }
565
         }
566
-        if (item === 'HFHD+HP') {
567
-          obj.id = 9
566
+        if (item === "HFHD+HP") {
567
+          obj.id = 9;
568
         }
568
         }
569
-        if (item === 'PHF') {
570
-          obj.id = 10
569
+        if (item === "PHF") {
570
+          obj.id = 10;
571
         }
571
         }
572
-        if (item === 'HFR') {
573
-          obj.id = 11
572
+        if (item === "HFR") {
573
+          obj.id = 11;
574
         }
574
         }
575
-        if (item === 'HDF+HP') {
576
-          obj.id = 12
575
+        if (item === "HDF+HP") {
576
+          obj.id = 12;
577
         }
577
         }
578
-        if (item === 'CRRT') {
579
-          obj.id = 13
578
+        if (item === "CRRT") {
579
+          obj.id = 13;
580
         }
580
         }
581
-        if (item === '腹水回输') {
582
-          obj.id = 14
581
+        if (item === "腹水回输") {
582
+          obj.id = 14;
583
         }
583
         }
584
-        arr1.push(obj.id)
585
-      })
584
+        arr1.push(obj.id);
585
+      });
586
       // console.log('arrr1', arr1)
586
       // console.log('arrr1', arr1)
587
-      this.form.treat_type = arr1
587
+      this.form.treat_type = arr1;
588
 
588
 
589
-      var device_type = this.form.device_type
590
-      var device_types = parseInt(device_type)
591
-      this.form.device_type = device_types
589
+      var device_type = this.form.device_type;
590
+      var device_types = parseInt(device_type);
591
+      this.form.device_type = device_types;
592
 
592
 
593
-      if (this.form.rubbish_reason === '') {
594
-        this.form.rubbish_reason = 0
593
+      if (this.form.rubbish_reason === "") {
594
+        this.form.rubbish_reason = 0;
595
       }
595
       }
596
-      var rubbish_reason = this.form.rubbish_reason
597
-      var rubbish_reasons = parseInt(rubbish_reason)
598
-      this.form.rubbish_reason = rubbish_reasons
596
+      var rubbish_reason = this.form.rubbish_reason;
597
+      var rubbish_reasons = parseInt(rubbish_reason);
598
+      this.form.rubbish_reason = rubbish_reasons;
599
 
599
 
600
-      var machine_status = this.form.machine_status
601
-      var machine_statuss = parseInt(machine_status)
602
-      this.form.machine_status = machine_statuss
600
+      var machine_status = this.form.machine_status;
601
+      var machine_statuss = parseInt(machine_status);
602
+      this.form.machine_status = machine_statuss;
603
 
603
 
604
       // if (this.form.bed_number === '') {
604
       // if (this.form.bed_number === '') {
605
       //  this.form.bed_number = 0
605
       //  this.form.bed_number = 0
607
       // var bed_numbers = this.form.bed_number
607
       // var bed_numbers = this.form.bed_number
608
       // var bed_numberss = parseInt(bed_numbers)
608
       // var bed_numberss = parseInt(bed_numbers)
609
       // this.form.bed_number = bed_numberss
609
       // this.form.bed_number = bed_numberss
610
-      console.log('购买日期', this.form.buy_date)
610
+      console.log("购买日期", this.form.buy_date);
611
 
611
 
612
-      if (this.form.Disinfection_mode === '') {
613
-        this.form.Disinfection_mode = 0
612
+      if (this.form.Disinfection_mode === "") {
613
+        this.form.Disinfection_mode = 0;
614
       }
614
       }
615
-      var disinfecction_modes = this.form.Disinfection_mode
616
-      var disinfecction_modess = parseInt(disinfecction_modes)
617
-      this.form.Disinfection_mode = disinfecction_modess
615
+      var disinfecction_modes = this.form.Disinfection_mode;
616
+      var disinfecction_modess = parseInt(disinfecction_modes);
617
+      this.form.Disinfection_mode = disinfecction_modess;
618
 
618
 
619
-      if (this.form.revers_mode === '') {
620
-        this.form.revers_mode = 0
619
+      if (this.form.revers_mode === "") {
620
+        this.form.revers_mode = 0;
621
       }
621
       }
622
 
622
 
623
       this.$refs[formName].validate(valid => {
623
       this.$refs[formName].validate(valid => {
624
         if (valid) {
624
         if (valid) {
625
           SaveManageInfo(this.form).then(response => {
625
           SaveManageInfo(this.form).then(response => {
626
             if (response.data.state === 1) {
626
             if (response.data.state === 1) {
627
-              var addmacher = response.data.data.addmacher
628
-              this.dialogVisible = false
629
-              this.$message.success('保存成功')
630
-              this.form.bed_number = ''
631
-              this.form.serial_number = ''
632
-              this.form.device_name = ''
633
-              this.form.manufacture_factory = ''
634
-              this.form.service_manufacturer = ''
635
-              this.form.use_section = ''
636
-              this.form.section_number = ''
637
-              this.form.maintenance_engineer = ''
638
-              this.form.telephone = ''
639
-              this.form.user_total = ''
640
-              this.form.remarks = ''
641
-              this.form.user_year = ''
642
-              this.form.work_time = ''
643
-              this.form.unit_type = ''
644
-              this.getAllSubregion()
645
-              this.$emit('getAllMachineInfo')
646
-              this.$forceUpdate()
627
+              var addmacher = response.data.data.addmacher;
628
+              this.dialogVisible = false;
629
+              this.$message.success("保存成功");
630
+              this.form.bed_number = "";
631
+              this.form.serial_number = "";
632
+              this.form.device_name = "";
633
+              this.form.manufacture_factory = "";
634
+              this.form.service_manufacturer = "";
635
+              this.form.use_section = "";
636
+              this.form.section_number = "";
637
+              this.form.maintenance_engineer = "";
638
+              this.form.telephone = "";
639
+              this.form.user_total = "";
640
+              this.form.remarks = "";
641
+              this.form.user_year = "";
642
+              this.form.work_time = "";
643
+              this.form.unit_type = "";
644
+              this.getAllSubregion();
645
+              this.$emit("getAllMachineInfo");
646
+              this.$forceUpdate();
647
             } else {
647
             } else {
648
-              this.$message.error('添加失败')
648
+              this.$message.error("添加失败");
649
             }
649
             }
650
-          })
650
+          });
651
         }
651
         }
652
-      })
652
+      });
653
     },
653
     },
654
 
654
 
655
     SaveManageInfo(formName) {
655
     SaveManageInfo(formName) {
656
-      const arr1 = []
656
+      const arr1 = [];
657
       this.form.treat_mode.map((item, index) => {
657
       this.form.treat_mode.map((item, index) => {
658
-        const obj = {}
659
-        if (item === 'HD') {
660
-          obj.id = 1
658
+        const obj = {};
659
+        if (item === "HD") {
660
+          obj.id = 1;
661
         }
661
         }
662
-        if (item === 'HDF') {
663
-          obj.id = 2
662
+        if (item === "HDF") {
663
+          obj.id = 2;
664
         }
664
         }
665
-        if (item === 'HD+HP') {
666
-          obj.id = 3
665
+        if (item === "HD+HP") {
666
+          obj.id = 3;
667
         }
667
         }
668
-        if (item === 'HP') {
669
-          obj.id = 4
668
+        if (item === "HP") {
669
+          obj.id = 4;
670
         }
670
         }
671
-        if (item === 'HF') {
672
-          obj.id = 5
671
+        if (item === "HF") {
672
+          obj.id = 5;
673
         }
673
         }
674
-        if (item === 'SCUF') {
675
-          obj.id = 6
674
+        if (item === "SCUF") {
675
+          obj.id = 6;
676
         }
676
         }
677
-        if (item === 'IUF') {
678
-          obj.id = 7
677
+        if (item === "IUF") {
678
+          obj.id = 7;
679
         }
679
         }
680
-        if (item === 'HFHD') {
681
-          obj.id = 8
680
+        if (item === "HFHD") {
681
+          obj.id = 8;
682
         }
682
         }
683
-        if (item === 'HFHD+HP') {
684
-          obj.id = 9
683
+        if (item === "HFHD+HP") {
684
+          obj.id = 9;
685
         }
685
         }
686
-        if (item === 'PHF') {
687
-          obj.id = 10
686
+        if (item === "PHF") {
687
+          obj.id = 10;
688
         }
688
         }
689
-        if (item === 'HFR') {
690
-          obj.id = 11
689
+        if (item === "HFR") {
690
+          obj.id = 11;
691
         }
691
         }
692
-        if (item === 'HDF+HP') {
693
-          obj.id = 12
692
+        if (item === "HDF+HP") {
693
+          obj.id = 12;
694
         }
694
         }
695
-        if (item === 'CRRT') {
696
-          obj.id = 13
695
+        if (item === "CRRT") {
696
+          obj.id = 13;
697
         }
697
         }
698
-        if (item === '腹水回输') {
699
-          obj.id = 14
698
+        if (item === "腹水回输") {
699
+          obj.id = 14;
700
         }
700
         }
701
-        arr1.push(obj.id)
702
-      })
701
+        arr1.push(obj.id);
702
+      });
703
       // console.log('arrr1', arr1)
703
       // console.log('arrr1', arr1)
704
-      this.form.treat_type = arr1
704
+      this.form.treat_type = arr1;
705
 
705
 
706
-      var device_type = this.form.device_type
707
-      var device_types = parseInt(device_type)
708
-      this.form.device_type = device_types
706
+      var device_type = this.form.device_type;
707
+      var device_types = parseInt(device_type);
708
+      this.form.device_type = device_types;
709
 
709
 
710
-      if (this.form.rubbish_reason === '') {
711
-        this.form.rubbish_reason = 0
710
+      if (this.form.rubbish_reason === "") {
711
+        this.form.rubbish_reason = 0;
712
       }
712
       }
713
-      var rubbish_reason = this.form.rubbish_reason
714
-      var rubbish_reasons = parseInt(rubbish_reason)
715
-      this.form.rubbish_reason = rubbish_reasons
713
+      var rubbish_reason = this.form.rubbish_reason;
714
+      var rubbish_reasons = parseInt(rubbish_reason);
715
+      this.form.rubbish_reason = rubbish_reasons;
716
 
716
 
717
-      var machine_status = this.form.machine_status
718
-      var machine_statuss = parseInt(machine_status)
719
-      this.form.machine_status = machine_statuss
717
+      var machine_status = this.form.machine_status;
718
+      var machine_statuss = parseInt(machine_status);
719
+      this.form.machine_status = machine_statuss;
720
 
720
 
721
       // if (this.form.bed_number === '') {
721
       // if (this.form.bed_number === '') {
722
       //  this.form.bed_number = 0
722
       //  this.form.bed_number = 0
724
       // var bed_numbers = this.form.bed_number
724
       // var bed_numbers = this.form.bed_number
725
       // var bed_numberss = parseInt(bed_numbers)
725
       // var bed_numberss = parseInt(bed_numbers)
726
       // this.form.bed_number = bed_numberss
726
       // this.form.bed_number = bed_numberss
727
-      console.log('购买日期', this.form.buy_date)
727
+      console.log("购买日期", this.form.buy_date);
728
 
728
 
729
-      if (this.form.Disinfection_mode === '') {
730
-        this.form.Disinfection_mode = 0
729
+      if (this.form.Disinfection_mode === "") {
730
+        this.form.Disinfection_mode = 0;
731
       }
731
       }
732
-      var disinfecction_modes = this.form.Disinfection_mode
733
-      var disinfecction_modess = parseInt(disinfecction_modes)
734
-      this.form.Disinfection_mode = disinfecction_modess
732
+      var disinfecction_modes = this.form.Disinfection_mode;
733
+      var disinfecction_modess = parseInt(disinfecction_modes);
734
+      this.form.Disinfection_mode = disinfecction_modess;
735
 
735
 
736
-      if (this.form.revers_mode === '') {
737
-        this.form.revers_mode = 0
736
+      if (this.form.revers_mode === "") {
737
+        this.form.revers_mode = 0;
738
       }
738
       }
739
       this.$refs[formName].validate(valid => {
739
       this.$refs[formName].validate(valid => {
740
         if (valid) {
740
         if (valid) {
741
           SaveManageInfo(this.form).then(response => {
741
           SaveManageInfo(this.form).then(response => {
742
             if (response.data.state === 1) {
742
             if (response.data.state === 1) {
743
-              var addmacher = response.data.data.addmacher
744
-              this.dialogVisible = false
745
-              this.$message.success('保存成功')
746
-              this.form.bed_number = ''
747
-              this.form.serial_number = ''
748
-              this.form.device_name = ''
749
-              this.form.manufacture_factory = ''
750
-              this.form.service_manufacturer = ''
751
-              this.form.use_section = ''
752
-              this.form.section_number = ''
753
-              this.form.maintenance_engineer = ''
754
-              this.form.telephone = ''
755
-              this.form.user_total = ''
756
-              this.form.remarks = ''
757
-              this.form.user_year = ''
758
-              this.form.work_time = ''
759
-              this.form.unit_type = ''
760
-              this.getAllSubregion()
761
-              this.$emit('getAllMachineInfo')
762
-              this.$forceUpdate()
743
+              var addmacher = response.data.data.addmacher;
744
+              this.dialogVisible = false;
745
+              this.$message.success("保存成功");
746
+              this.form.bed_number = "";
747
+              this.form.serial_number = "";
748
+              this.form.device_name = "";
749
+              this.form.manufacture_factory = "";
750
+              this.form.service_manufacturer = "";
751
+              this.form.use_section = "";
752
+              this.form.section_number = "";
753
+              this.form.maintenance_engineer = "";
754
+              this.form.telephone = "";
755
+              this.form.user_total = "";
756
+              this.form.remarks = "";
757
+              this.form.user_year = "";
758
+              this.form.work_time = "";
759
+              this.form.unit_type = "";
760
+              this.getAllSubregion();
761
+              this.$emit("getAllMachineInfo");
762
+              this.$forceUpdate();
763
             } else {
763
             } else {
764
-              this.$message.error('添加失败')
764
+              this.$message.error("添加失败");
765
             }
765
             }
766
-          })
766
+          });
767
         }
767
         }
768
-      })
768
+      });
769
     },
769
     },
770
     SaveManageInfoTwo(formName) {
770
     SaveManageInfoTwo(formName) {
771
-      if (this.form.bed_number === '') {
772
-        this.form.bed_number = 0
771
+      if (this.form.bed_number === "") {
772
+        this.form.bed_number = 0;
773
       }
773
       }
774
 
774
 
775
-      var device_type = this.form.device_type
776
-      var device_types = parseInt(device_type)
777
-      this.form.device_type = device_types
775
+      var device_type = this.form.device_type;
776
+      var device_types = parseInt(device_type);
777
+      this.form.device_type = device_types;
778
 
778
 
779
-      if (this.form.rubbish_reason === '') {
780
-        this.form.rubbish_reason = 0
779
+      if (this.form.rubbish_reason === "") {
780
+        this.form.rubbish_reason = 0;
781
       }
781
       }
782
-      var rubbish_reason = this.form.rubbish_reason
783
-      var rubbish_reasons = parseInt(rubbish_reason)
784
-      this.form.rubbish_reason = rubbish_reasons
782
+      var rubbish_reason = this.form.rubbish_reason;
783
+      var rubbish_reasons = parseInt(rubbish_reason);
784
+      this.form.rubbish_reason = rubbish_reasons;
785
 
785
 
786
-      var machine_status = this.form.machine_status
787
-      var machine_statuss = parseInt(machine_status)
788
-      this.form.machine_status = machine_statuss
786
+      var machine_status = this.form.machine_status;
787
+      var machine_statuss = parseInt(machine_status);
788
+      this.form.machine_status = machine_statuss;
789
 
789
 
790
-      if (this.form.revers_mode === '') {
791
-        this.form.revers_mode = 0
790
+      if (this.form.revers_mode === "") {
791
+        this.form.revers_mode = 0;
792
       }
792
       }
793
 
793
 
794
-      var revers_mode = this.form.revers_mode
795
-      var revers_modes = parseInt(revers_mode)
796
-      this.form.revers_mode = revers_modes
794
+      var revers_mode = this.form.revers_mode;
795
+      var revers_modes = parseInt(revers_mode);
796
+      this.form.revers_mode = revers_modes;
797
 
797
 
798
-      if (this.form.Disinfection_mode === '') {
799
-        this.form.Disinfection_mode = 0
798
+      if (this.form.Disinfection_mode === "") {
799
+        this.form.Disinfection_mode = 0;
800
       }
800
       }
801
-      var disinfecction_modes = this.form.Disinfection_mode
802
-      var disinfecction_modess = parseInt(disinfecction_modes)
803
-      this.form.Disinfection_mode = disinfecction_modess
801
+      var disinfecction_modes = this.form.Disinfection_mode;
802
+      var disinfecction_modess = parseInt(disinfecction_modes);
803
+      this.form.Disinfection_mode = disinfecction_modess;
804
 
804
 
805
       this.$refs[formName].validate(valid => {
805
       this.$refs[formName].validate(valid => {
806
         if (valid) {
806
         if (valid) {
807
           SaveManageInfoTwo(this.form, this.forms.beds).then(response => {
807
           SaveManageInfoTwo(this.form, this.forms.beds).then(response => {
808
             if (response.data.state === 1) {
808
             if (response.data.state === 1) {
809
-              var add = response.data.data.addmacher
810
-              console.log('add', add)
811
-              this.dialogVisible = false
812
-              this.$message.success('保存成功')
813
-              this.getAllSubregion()
814
-              this.$emit('getAllMachineInfo')
815
-              this.$forceUpdate()
809
+              var add = response.data.data.addmacher;
810
+              console.log("add", add);
811
+              this.dialogVisible = false;
812
+              this.$message.success("保存成功");
813
+              this.getAllSubregion();
814
+              this.$emit("getAllMachineInfo");
815
+              this.$forceUpdate();
816
             }
816
             }
817
-          })
817
+          });
818
         }
818
         }
819
-      })
819
+      });
820
     },
820
     },
821
     getAllMode() {
821
     getAllMode() {
822
       getAllMode().then(response => {
822
       getAllMode().then(response => {
823
-        var mode = response.data.data.mode
824
-        this.deviceMode = mode
825
-        console.log('mode', mode)
826
-      })
823
+        var mode = response.data.data.mode;
824
+        this.deviceMode = mode;
825
+        console.log("mode", mode);
826
+      });
827
     }
827
     }
828
   },
828
   },
829
   created() {
829
   created() {
830
-    this.getAllSubregion()
831
-    this.getAllMode()
830
+    this.getAllSubregion();
831
+    this.getAllMode();
832
   }
832
   }
833
-}
833
+};
834
 </script>
834
 </script>
835
 
835
 
836
 <style lang="scss">
836
 <style lang="scss">
847
   line-height: 26px;
847
   line-height: 26px;
848
   height: 26px;
848
   height: 26px;
849
 }
849
 }
850
+#manage-form {
851
+  .el-form-item__label {
852
+    width: 100px;
853
+    padding: 0;
854
+  }
855
+}
856
+.el-checkbox {
857
+  color: #606266;
858
+  font-weight: 500;
859
+  font-size: 14px;
860
+  cursor: pointer;
861
+  -webkit-user-select: none;
862
+  -moz-user-select: none;
863
+  -ms-user-select: none;
864
+  user-select: none;
865
+  margin-right: 26px;
866
+}
850
 </style>
867
 </style>

+ 91 - 74
src/xt_pages/management/index.vue View File

9
         icon="el-icon-circle-plus-outline"
9
         icon="el-icon-circle-plus-outline"
10
         size="small"
10
         size="small"
11
         @click="AddManage()"
11
         @click="AddManage()"
12
-        >新增
13
-      </el-button>
12
+        >新增</el-button
13
+      >
14
     </div>
14
     </div>
15
     <div class="app-container">
15
     <div class="app-container">
16
       <div class="cell clearfix">
16
       <div class="cell clearfix">
27
           icon="el-icon-search"
27
           icon="el-icon-search"
28
           size="small"
28
           size="small"
29
           @click="seahcerMacherInfo()"
29
           @click="seahcerMacherInfo()"
30
-          >搜索
31
-        </el-button>
30
+          >搜索</el-button
31
+        >
32
       </div>
32
       </div>
33
 
33
 
34
       <div class="cell clearfix">
34
       <div class="cell clearfix">
85
         </div>
85
         </div>
86
       </div>
86
       </div>
87
 
87
 
88
-      <el-table :data="tableData" border style="width: 100%">
89
-        <el-table-column label="序号" width="180" align="center" type="index">
88
+      <el-table
89
+        :data="tableData"
90
+        border
91
+        style="width: 100%"
92
+        :row-style="{ color: '#303133' }"
93
+        :header-cell-style="{
94
+          backgroundColor: 'rgb(245, 247, 250)',
95
+          color: '#606266'
96
+        }"
97
+      >
98
+        <el-table-column label="序号" width="80" align="center" type="index">
90
           <!-- <template slot-scope="scope">{{ scope.row.id }}</template> -->
99
           <!-- <template slot-scope="scope">{{ scope.row.id }}</template> -->
91
         </el-table-column>
100
         </el-table-column>
92
 
101
 
93
-        <el-table-column label="序列号" width="180" align="center">
102
+        <el-table-column label="序列号" width="120" align="center">
94
           <template slot-scope="scope">{{ scope.row.serial_number }}</template>
103
           <template slot-scope="scope">{{ scope.row.serial_number }}</template>
95
         </el-table-column>
104
         </el-table-column>
96
 
105
 
97
-        <el-table-column label="设备类型" width="180" align="center">
106
+        <el-table-column label="设备类型" width="120" align="center">
98
           <template slot-scope="scope">{{ scope.row.device_type }}</template>
107
           <template slot-scope="scope">{{ scope.row.device_type }}</template>
99
         </el-table-column>
108
         </el-table-column>
100
-        <el-table-column label="设备名称" width="180" align="center">
109
+        <el-table-column label="设备名称" width="120" align="center">
101
           <template slot-scope="scope">{{ scope.row.device_name }}</template>
110
           <template slot-scope="scope">{{ scope.row.device_name }}</template>
102
         </el-table-column>
111
         </el-table-column>
103
-        <el-table-column label="设备型号" align="center">
112
+        <el-table-column label="设备型号" width="120" align="center">
104
           <template slot-scope="scope">{{ scope.row.device_mode }}</template>
113
           <template slot-scope="scope">{{ scope.row.device_mode }}</template>
105
         </el-table-column>
114
         </el-table-column>
106
 
115
 
120
           <template slot-scope="scope">{{ scope.row.user_total }}</template>
129
           <template slot-scope="scope">{{ scope.row.user_total }}</template>
121
         </el-table-column>
130
         </el-table-column>
122
 
131
 
123
-        <el-table-column label="操作" align="center">
132
+        <el-table-column label="操作" width="120" align="center">
124
           <template slot-scope="scope">
133
           <template slot-scope="scope">
125
             <el-button
134
             <el-button
126
               @click="handleClick(scope.row.id, scope.$index, scope.row.bed_id)"
135
               @click="handleClick(scope.row.id, scope.$index, scope.row.bed_id)"
127
-              type="text"
136
+              type="primary"
128
               size="small"
137
               size="small"
129
-              >查看
130
-            </el-button>
138
+              >查看</el-button
139
+            >
131
           </template>
140
           </template>
132
         </el-table-column>
141
         </el-table-column>
133
       </el-table>
142
       </el-table>
152
 </template>
161
 </template>
153
 
162
 
154
 <script>
163
 <script>
155
-import BreadCrumb from '../components/bread-crumb'
156
-import { getAllMachineInfo, getAllSubregion } from '@/api/manage'
157
-import ManageForm from './components/ManageForm'
164
+import BreadCrumb from "../components/bread-crumb";
165
+import { getAllMachineInfo, getAllSubregion } from "@/api/manage";
166
+import ManageForm from "./components/ManageForm";
158
 
167
 
159
 export default {
168
 export default {
160
-  name: 'index.vue',
169
+  name: "index.vue",
161
   components: {
170
   components: {
162
     BreadCrumb,
171
     BreadCrumb,
163
     ManageForm
172
     ManageForm
165
   data() {
174
   data() {
166
     return {
175
     return {
167
       crumbs: [
176
       crumbs: [
168
-        { path: false, name: '设备管理' },
169
-        { path: false, name: '设备管理' }
177
+        { path: false, name: "设备管理" },
178
+        { path: false, name: "设备管理" }
170
       ],
179
       ],
171
-      searchKey: '',
172
-      zones: [{ id: 0, name: '全部' }],
180
+      searchKey: "",
181
+      zones: [{ id: 0, name: "全部" }],
173
       schedulType: 0,
182
       schedulType: 0,
174
       schedulTypeone: 0,
183
       schedulTypeone: 0,
175
       schedulTypetwo: 0,
184
       schedulTypetwo: 0,
176
       DeviceType: [
185
       DeviceType: [
177
-        { id: 0, name: '全部' },
178
-        { id: 1, name: '透析机' },
179
-        { id: 2, name: '水处理机' },
180
-        { id: 3, name: '其他' }
186
+        { id: 0, name: "全部" },
187
+        { id: 1, name: "透析机" },
188
+        { id: 2, name: "水处理机" },
189
+        { id: 3, name: "其他" }
181
       ],
190
       ],
182
 
191
 
183
       AllStatus: [
192
       AllStatus: [
184
-        { id: 0, name: '全部' },
185
-        { id: 1, name: '使用机' },
186
-        { id: 2, name: '备用机' },
187
-        { id: 3, name: '急诊机' },
188
-        { id: 4, name: '报废机' }
193
+        { id: 0, name: "全部" },
194
+        { id: 1, name: "使用机" },
195
+        { id: 2, name: "备用机" },
196
+        { id: 3, name: "急诊机" },
197
+        { id: 4, name: "报废机" }
189
       ],
198
       ],
190
       tableData: [],
199
       tableData: [],
191
       listQuery: {
200
       listQuery: {
192
         page: 1,
201
         page: 1,
193
         limit: 10,
202
         limit: 10,
194
-        searchKey: '',
195
-        zoneid: '',
196
-        equipmentid: '',
197
-        statusid: ''
203
+        searchKey: "",
204
+        zoneid: "",
205
+        equipmentid: "",
206
+        statusid: ""
198
       },
207
       },
199
       total: 0
208
       total: 0
200
-    }
209
+    };
201
   },
210
   },
202
   methods: {
211
   methods: {
203
     getAllSubregion() {
212
     getAllSubregion() {
204
       getAllSubregion().then(response => {
213
       getAllSubregion().then(response => {
205
         if (response.data.state === 1) {
214
         if (response.data.state === 1) {
206
-          var zone = response.data.data.zones
207
-          var zones = [{ id: 0, name: '全部' }]
215
+          var zone = response.data.data.zones;
216
+          var zones = [{ id: 0, name: "全部" }];
208
           for (let i = 0; i < zone.length; i++) {
217
           for (let i = 0; i < zone.length; i++) {
209
-            const item = zone[i]
210
-            zones.push({ id: item.id, name: item.name })
218
+            const item = zone[i];
219
+            zones.push({ id: item.id, name: item.name });
211
           }
220
           }
212
           // console.log('zones', zones)
221
           // console.log('zones', zones)
213
-          this.zones = zones
222
+          this.zones = zones;
214
         }
223
         }
215
-      })
224
+      });
216
     },
225
     },
217
     selectSchedulType(scheduleType) {
226
     selectSchedulType(scheduleType) {
218
-      this.schedulType = scheduleType
219
-      this.listQuery.zoneid = scheduleType
220
-      this.getAllMachineInfo()
227
+      this.schedulType = scheduleType;
228
+      this.listQuery.zoneid = scheduleType;
229
+      this.getAllMachineInfo();
221
     },
230
     },
222
     selectSchedulTypeOne(scheduleType) {
231
     selectSchedulTypeOne(scheduleType) {
223
-      this.schedulTypeone = scheduleType
224
-      this.listQuery.equipmentid = scheduleType
225
-      this.getAllMachineInfo()
232
+      this.schedulTypeone = scheduleType;
233
+      this.listQuery.equipmentid = scheduleType;
234
+      this.getAllMachineInfo();
226
     },
235
     },
227
     selectSchedulTypeTwo(scheduleType) {
236
     selectSchedulTypeTwo(scheduleType) {
228
-      this.schedulTypetwo = scheduleType
229
-      this.listQuery.statusid = scheduleType
230
-      this.getAllMachineInfo()
237
+      this.schedulTypetwo = scheduleType;
238
+      this.listQuery.statusid = scheduleType;
239
+      this.getAllMachineInfo();
231
     },
240
     },
232
     seahcerMacherInfo() {
241
     seahcerMacherInfo() {
233
-      this.getAllMachineInfo()
242
+      this.getAllMachineInfo();
234
     },
243
     },
235
     AddManage() {
244
     AddManage() {
236
-      this.$refs.manageForm.open()
245
+      this.$refs.manageForm.open();
237
     },
246
     },
238
     getAllMachineInfo() {
247
     getAllMachineInfo() {
239
       getAllMachineInfo(
248
       getAllMachineInfo(
245
         this.listQuery.statusid
254
         this.listQuery.statusid
246
       ).then(response => {
255
       ).then(response => {
247
         if (response.data.state === 1) {
256
         if (response.data.state === 1) {
248
-          var addmahcer = response.data.data.addmahcer
257
+          var addmahcer = response.data.data.addmahcer;
249
           for (let index = 0; index < addmahcer.length; index++) {
258
           for (let index = 0; index < addmahcer.length; index++) {
250
             if (addmahcer[index].device_type === 1) {
259
             if (addmahcer[index].device_type === 1) {
251
-              addmahcer[index].device_type = '透析机'
260
+              addmahcer[index].device_type = "透析机";
252
             }
261
             }
253
             if (addmahcer[index].device_type === 2) {
262
             if (addmahcer[index].device_type === 2) {
254
-              addmahcer[index].device_type = '水处理机'
263
+              addmahcer[index].device_type = "水处理机";
255
             }
264
             }
256
 
265
 
257
             if (addmahcer[index].device_type === 3) {
266
             if (addmahcer[index].device_type === 3) {
258
-              addmahcer[index].device_type = '其他'
267
+              addmahcer[index].device_type = "其他";
259
             }
268
             }
260
 
269
 
261
             if (addmahcer[index].machine_status === 1) {
270
             if (addmahcer[index].machine_status === 1) {
262
-              addmahcer[index].machine_status = '使用机'
271
+              addmahcer[index].machine_status = "使用机";
263
             }
272
             }
264
             if (addmahcer[index].machine_status === 2) {
273
             if (addmahcer[index].machine_status === 2) {
265
-              addmahcer[index].machine_status = '备用机'
274
+              addmahcer[index].machine_status = "备用机";
266
             }
275
             }
267
             if (addmahcer[index].machine_status === 3) {
276
             if (addmahcer[index].machine_status === 3) {
268
-              addmahcer[index].machine_status = '急诊机'
277
+              addmahcer[index].machine_status = "急诊机";
269
             }
278
             }
270
             if (addmahcer[index].machine_status === 4) {
279
             if (addmahcer[index].machine_status === 4) {
271
-              addmahcer[index].machine_status = '报废机'
280
+              addmahcer[index].machine_status = "报废机";
272
             }
281
             }
273
           }
282
           }
274
-          this.tableData = addmahcer
283
+          this.tableData = addmahcer;
275
           // console.log('addmacher', addmahcer)
284
           // console.log('addmacher', addmahcer)
276
-          var total = response.data.data.total
285
+          var total = response.data.data.total;
277
           // console.log('total', total)
286
           // console.log('total', total)
278
-          this.total = total
287
+          this.total = total;
279
         }
288
         }
280
-      })
289
+      });
281
     },
290
     },
282
     handleSizeChange(limit) {
291
     handleSizeChange(limit) {
283
-      this.listQuery.limit = limit
284
-      this.getAllMachineInfo()
292
+      this.listQuery.limit = limit;
293
+      this.getAllMachineInfo();
285
     },
294
     },
286
     handleCurrentChange(page) {
295
     handleCurrentChange(page) {
287
-      this.listQuery.page = page
288
-      this.getAllMachineInfo()
296
+      this.listQuery.page = page;
297
+      this.getAllMachineInfo();
289
     },
298
     },
290
     handleClick(id, index, bedid) {
299
     handleClick(id, index, bedid) {
291
       this.$router.push({
300
       this.$router.push({
292
-        path: '/device/home?index=' + index + '&' + 'bedid=' + bedid + '&' + 'id=' + id
293
-      })
301
+        path:
302
+          "/device/home?index=" +
303
+          index +
304
+          "&" +
305
+          "bedid=" +
306
+          bedid +
307
+          "&" +
308
+          "id=" +
309
+          id
310
+      });
294
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
311
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
295
     }
312
     }
296
   },
313
   },
297
   created() {
314
   created() {
298
     // 获取所有的分区
315
     // 获取所有的分区
299
-    this.getAllSubregion()
300
-    this.getAllMachineInfo()
316
+    this.getAllSubregion();
317
+    this.getAllMachineInfo();
301
   }
318
   }
302
-}
319
+};
303
 </script>
320
 </script>
304
 
321
 
305
 <style scoped></style>
322
 <style scoped></style>

+ 19 - 19
src/xt_permission.js View File

1
-import router from './router'
2
-import store from './store'
3
-import NProgress from 'nprogress' // progress bar
4
-import 'nprogress/nprogress.css'// progress bar style
1
+import router from "./router";
2
+import store from "./store";
3
+import NProgress from "nprogress"; // progress bar
4
+import "nprogress/nprogress.css"; // progress bar style
5
 
5
 
6
-NProgress.configure({ showSpinner: false })// NProgress Configuration
6
+NProgress.configure({ showSpinner: false }); // NProgress Configuration
7
 
7
 
8
-const loginWhiteList = ['/token/verify', '/401', '/404'] // 登录验证白名单
9
-const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
8
+const loginWhiteList = ["/token/verify", "/401", "/404"]; // 登录验证白名单
9
+const permissionWhiteList = loginWhiteList.concat(["/"]); // 权限验证白名单
10
 
10
 
11
 router.beforeEach((to, from, next) => {
11
 router.beforeEach((to, from, next) => {
12
   // 线上注释
12
   // 线上注释
25
   // return
25
   // return
26
   // 线上注释
26
   // 线上注释
27
 
27
 
28
-  NProgress.start()
28
+  NProgress.start();
29
   // console.log(store.getters.current_role_urls.indexOf(to.path))
29
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30
   // alert('path:' + to.path)
30
   // alert('path:' + to.path)
31
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
31
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
32
   if (to.query.lt != null && to.query.lt.length > 0) {
32
   if (to.query.lt != null && to.query.lt.length > 0) {
33
     // alert('will go to verify token: ' + to.query.lt)
33
     // alert('will go to verify token: ' + to.query.lt)
34
-    next({ path: '/token/verify', query: { token: to.query.lt }})
34
+    next({ path: "/token/verify", query: { token: to.query.lt } });
35
 
35
 
36
     // 否则 如果没有 user 信息,则前往 sso 登录
36
     // 否则 如果没有 user 信息,则前往 sso 登录
37
   } else if (store.getters.xt_user.user.id === 0) {
37
   } else if (store.getters.xt_user.user.id === 0) {
38
     if (loginWhiteList.indexOf(to.path) !== -1) {
38
     if (loginWhiteList.indexOf(to.path) !== -1) {
39
       // alert('登录白名单内,跳过登录')
39
       // alert('登录白名单内,跳过登录')
40
-      next()
40
+      next();
41
     } else {
41
     } else {
42
       // alert('前往登录')
42
       // alert('前往登录')
43
-      window.location.href = process.env.BASE_API + '/login' // sso 地址
43
+      window.location.href = process.env.BASE_API + "/login"; // sso 地址
44
     }
44
     }
45
 
45
 
46
     // 否则 如果当前 url 不需要验证访问权限,则通过
46
     // 否则 如果当前 url 不需要验证访问权限,则通过
47
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
47
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
48
     // alert('权限验证白名单内,直接进入')
48
     // alert('权限验证白名单内,直接进入')
49
-    next()
49
+    next();
50
 
50
 
51
     // 否则 如果拥有当前 url 的权限,则通过
51
     // 否则 如果拥有当前 url 的权限,则通过
52
-  // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
53
-  //   // alert('权限验证通过')
54
-  //   next()
52
+    // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
53
+    //   // alert('权限验证通过')
54
+    //   next()
55
 
55
 
56
     // 否则 跳转401 (未经授权)
56
     // 否则 跳转401 (未经授权)
57
   } else {
57
   } else {
58
     // console.log(store.getters.current_role_urls)
58
     // console.log(store.getters.current_role_urls)
59
     // console.log(store.getters.current_role_urls.indexOf(to.path))
59
     // console.log(store.getters.current_role_urls.indexOf(to.path))
60
     // alert('401')
60
     // alert('401')
61
-    next()
61
+    next();
62
     // next({ path: '/404' })
62
     // next({ path: '/404' })
63
   }
63
   }
64
-})
64
+});
65
 
65
 
66
 router.afterEach(() => {
66
 router.afterEach(() => {
67
-  NProgress.done()
68
-})
67
+  NProgress.done();
68
+});