Browse Source

设备型号更新

XMLWAN 4 years ago
parent
commit
47489ce2aa

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

+ 1 - 0
src/lang/zh.js View File

94
     dryWeight: '干体重',
94
     dryWeight: '干体重',
95
     device: '设备',
95
     device: '设备',
96
     deviceManage: '设备管理',
96
     deviceManage: '设备管理',
97
+    modemanagement:'型号管理',
97
     dialysisMachineManage: '设备管理',
98
     dialysisMachineManage: '设备管理',
98
     workforce: '排班管理',
99
     workforce: '排班管理',
99
     appointment: '排班管理',
100
     appointment: '排班管理',

+ 39 - 29
src/router/modules/device.js View File

1
-import Layout from "@/views/layout/Layout";
2
-import { S_IFMT } from "constants";
1
+import Layout from '@/views/layout/Layout'
2
+import {
3
+  S_IFMT
4
+} from 'constants'
3
 
5
 
4
 export default {
6
 export default {
5
-  path: "/device",
7
+  path: '/device',
6
   component: Layout,
8
   component: Layout,
7
-  redirect: "/device/main",
8
-  name: "device",
9
+  redirect: '/device/main',
10
+  name: 'device',
9
   alwaysShow: true,
11
   alwaysShow: true,
10
   meta: {
12
   meta: {
11
-    title: "deviceManage",
12
-    icon: "shebei"
13
+    title: 'deviceManage',
14
+    icon: 'shebei'
13
   },
15
   },
14
-  children: [
16
+  children: [{
17
+      path: '/device/zones',
18
+      component: () => import('@/xt_pages/device/zone_main'),
19
+      name: 'deviceZoneManage',
20
+      meta: {
21
+        title: 'deviceZoneManage'
22
+      }
23
+    },
15
     {
24
     {
16
-      path: "/device/zones",
17
-      component: () => import("@/xt_pages/device/zone_main"),
18
-      name: "deviceZoneManage",
25
+      path: '/device/groups',
26
+      component: () => import('@/xt_pages/device/group_main'),
27
+      name: 'deviceGroupManage',
19
       meta: {
28
       meta: {
20
-        title: "deviceZoneManage"
29
+        title: 'deviceGroupManage'
21
       }
30
       }
22
     },
31
     },
23
     {
32
     {
24
-      path: "/device/groups",
25
-      component: () => import("@/xt_pages/device/group_main"),
26
-      name: "deviceGroupManage",
33
+      path: '/device/numbers',
34
+      component: () => import('@/xt_pages/device/number_main'),
35
+      name: 'deviceNumberManage',
27
       meta: {
36
       meta: {
28
-        title: "deviceGroupManage"
37
+        title: 'deviceNumberManage'
29
       }
38
       }
30
     },
39
     },
31
     {
40
     {
32
-      path: "/device/numbers",
33
-      component: () => import("@/xt_pages/device/number_main"),
34
-      name: "deviceNumberManage",
41
+      path: '/device/mode',
42
+      component: () => import('@/xt_pages/mode/index'),
43
+      name: 'modemanagement',
35
       meta: {
44
       meta: {
36
-        title: "deviceNumberManage"
45
+        title: 'modemanagement'
37
       }
46
       }
38
     },
47
     },
39
     {
48
     {
40
-      path: "/device/main",
41
-      component: () => import("@/xt_pages/management/index"),
49
+      path: '/device/main',
50
+      component: () => import('@/xt_pages/management/index'),
42
       // component: () => import("@/xt_pages/device/main"),
51
       // component: () => import("@/xt_pages/device/main"),
43
-      name: "dialysisMachineManage",
52
+      name: 'dialysisMachineManage',
44
       meta: {
53
       meta: {
45
-        title: "dialysisMachineManage"
54
+        title: 'dialysisMachineManage'
46
       }
55
       }
47
     },
56
     },
48
     {
57
     {
49
-      path: "/device/home",
50
-      component: () => import("@/xt_pages/management/home"),
51
-      name: "managementHome",
58
+      path: '/device/home',
59
+      component: () => import('@/xt_pages/management/home'),
60
+      name: 'managementHome',
52
       is_menu: false,
61
       is_menu: false,
53
       hidden: true,
62
       hidden: true,
54
       meta: {
63
       meta: {
55
-        title: "设备管理详情页"
64
+        title: '设备管理详情页'
56
       }
65
       }
57
     }
66
     }
67
+
58
   ]
68
   ]
59
-};
69
+}

+ 37 - 12
src/xt_pages/management/components/ManageForm.vue View File

38
             <el-form-item
38
             <el-form-item
39
               label="机位号:"
39
               label="机位号:"
40
               v-show="bedShow"
40
               v-show="bedShow"
41
-              required 
41
+              required
42
               prop="bed_number"
42
               prop="bed_number"
43
             >
43
             >
44
               <el-select style="width:135px" v-model="form.bed_number">
44
               <el-select style="width:135px" v-model="form.bed_number">
52
             </el-form-item>
52
             </el-form-item>
53
 
53
 
54
             <el-form-item label="机位号:" v-show="bedShowTwo">
54
             <el-form-item label="机位号:" v-show="bedShowTwo">
55
-              <el-input
56
-                v-model="forms.beds"
57
-                style="width:135px"
58
-              ></el-input>
55
+              <el-input v-model="forms.beds" style="width:135px"></el-input>
59
             </el-form-item>
56
             </el-form-item>
60
           </el-col>
57
           </el-col>
61
         </el-row>
58
         </el-row>
88
         <el-row>
85
         <el-row>
89
           <el-col :span="8">
86
           <el-col :span="8">
90
             <el-form-item label="设备型号:" required prop="unit_type">
87
             <el-form-item label="设备型号:" required prop="unit_type">
91
-              <el-input style="width:135px" v-model="form.unit_type"></el-input>
88
+              <el-select style="width:135px" v-model="form.unit_type">
89
+                <el-option
90
+                  v-for="item in this.deviceMode"
91
+                  :key="item.id"
92
+                  :label="item.device_mode"
93
+                  :value="item.id"
94
+                ></el-option>
95
+              </el-select>
92
             </el-form-item>
96
             </el-form-item>
93
           </el-col>
97
           </el-col>
94
           <el-col :span="8">
98
           <el-col :span="8">
308
       </el-form>
312
       </el-form>
309
       <span slot="footer" class="dialog-footer">
313
       <span slot="footer" class="dialog-footer">
310
         <el-button @click="dialogVisible = false">取 消</el-button>
314
         <el-button @click="dialogVisible = false">取 消</el-button>
311
-        <el-button type="primary" @click="SaveManageInfo('form')" v-show="buttonShow"
315
+        <el-button
316
+          type="primary"
317
+          @click="SaveManageInfo('form')"
318
+          v-show="buttonShow"
319
+          >保存</el-button
320
+        >
321
+        <el-button
322
+          type="primary"
323
+          @click="SaveManageInfoTwo('form')"
324
+          v-show="buttonShowTwo"
312
           >保存</el-button
325
           >保存</el-button
313
         >
326
         >
314
-         <el-button type="primary" @click="SaveManageInfoTwo('form')" v-show="buttonShowTwo"
327
+        <el-button @click="SaveManageInfoThree('form')" v-show="buttonShowThree"
315
           >保存</el-button
328
           >保存</el-button
316
         >
329
         >
317
-        <el-button @click="SaveManageInfoThree('form')" v-show="buttonShowThree">保存</el-button>
318
       </span>
330
       </span>
319
     </el-dialog>
331
     </el-dialog>
320
   </div>
332
   </div>
321
 </template>
333
 </template>
322
 
334
 
323
 <script>
335
 <script>
324
-import { getAllSubregion, SaveManageInfo, SaveManageInfoTwo } from '@/api/manage'
336
+import {
337
+  getAllSubregion,
338
+  SaveManageInfo,
339
+  SaveManageInfoTwo,
340
+  getAllMode
341
+} from '@/api/manage'
325
 const treatmentmodes = [
342
 const treatmentmodes = [
326
   'HD',
343
   'HD',
327
   'HDF',
344
   'HDF',
432
       disa: true,
449
       disa: true,
433
       buttonShow: true,
450
       buttonShow: true,
434
       buttonShowTwo: false,
451
       buttonShowTwo: false,
435
-      buttonShowThree: false
452
+      buttonShowThree: false,
453
+      deviceMode: []
436
     }
454
     }
437
   },
455
   },
438
   methods: {
456
   methods: {
799
           })
817
           })
800
         }
818
         }
801
       })
819
       })
820
+    },
821
+    getAllMode() {
822
+      getAllMode().then(response => {
823
+        var mode = response.data.data.mode
824
+        this.deviceMode = mode
825
+        console.log('mode', mode)
826
+      })
802
     }
827
     }
803
   },
828
   },
804
   created() {
829
   created() {
805
     this.getAllSubregion()
830
     this.getAllSubregion()
831
+    this.getAllMode()
806
   }
832
   }
807
 }
833
 }
808
 </script>
834
 </script>
809
 
835
 
810
 <style lang="scss">
836
 <style lang="scss">
811
 .el-form-item__label {
837
 .el-form-item__label {
812
-  width: 100px;
813
   font-size: 14px;
838
   font-size: 14px;
814
 }
839
 }
815
 // .el-form-item {
840
 // .el-form-item {

+ 76 - 79
src/xt_pages/management/components/PlanForm.vue View File

14
                 <el-option
14
                 <el-option
15
                   v-for="item in this.DeviceType"
15
                   v-for="item in this.DeviceType"
16
                   :key="item.id"
16
                   :key="item.id"
17
-                  :label="item.equitment_name"
17
+                  :label="item.device_mode"
18
                   :value="item.id"
18
                   :value="item.id"
19
                 ></el-option>
19
                 ></el-option>
20
               </el-select>
20
               </el-select>
137
 </template>
137
 </template>
138
 
138
 
139
 <script>
139
 <script>
140
-import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage'
140
+import { getAllEquimentName, savePlan, getAllEquitType } from "@/api/manage";
141
 export default {
141
 export default {
142
-  name: 'PlanForm',
142
+  name: "PlanForm",
143
   props: {
143
   props: {
144
     equimentid: Number
144
     equimentid: Number
145
   },
145
   },
147
     return {
147
     return {
148
       dialogVisible: false,
148
       dialogVisible: false,
149
       form: {
149
       form: {
150
-        device_type: '',
151
-        disinfec_time: '',
150
+        device_type: "",
151
+        disinfec_time: "",
152
         time: [],
152
         time: [],
153
         class_time: [],
153
         class_time: [],
154
         way: 0,
154
         way: 0,
158
       },
158
       },
159
       value: [],
159
       value: [],
160
       timeType: [
160
       timeType: [
161
-        { id: 1, name: '周一' },
162
-        { id: 2, name: '周二' },
163
-        { id: 3, name: '周三' },
164
-        { id: 4, name: '周四' },
165
-        { id: 5, name: '周五' },
166
-        { id: 6, name: '周六' },
167
-        { id: 7, name: '周日' }
161
+        { id: 1, name: "周一" },
162
+        { id: 2, name: "周二" },
163
+        { id: 3, name: "周三" },
164
+        { id: 4, name: "周四" },
165
+        { id: 5, name: "周五" },
166
+        { id: 6, name: "周六" },
167
+        { id: 7, name: "周日" }
168
       ],
168
       ],
169
       classType: [
169
       classType: [
170
-        { id: 1, name: '上午' },
171
-        { id: 2, name: '下午' },
172
-        { id: 3, name: '晚上' }
170
+        { id: 1, name: "上午" },
171
+        { id: 2, name: "下午" },
172
+        { id: 3, name: "晚上" }
173
       ],
173
       ],
174
       // 机表消毒方式
174
       // 机表消毒方式
175
       disinfectType: [
175
       disinfectType: [
176
-        { id: 0, name: '/' },
177
-        { id: 1, name: '擦拭' },
178
-        { id: 2, name: '化学消毒' }
176
+        { id: 0, name: "/" },
177
+        { id: 1, name: "擦拭" },
178
+        { id: 2, name: "化学消毒" }
179
       ],
179
       ],
180
       // 基表消毒液
180
       // 基表消毒液
181
       disinfectantType: [
181
       disinfectantType: [
182
-        { id: 0, name: '/' },
183
-        { id: 1, name: '0.22%季铵盐' },
184
-        { id: 2, name: '500mg/l含氯消毒剂' },
185
-        { id: 3, name: '1000mg/l含氯消毒剂' },
186
-        { id: 4, name: '1500mg/l含氯消毒剂' }
182
+        { id: 0, name: "/" },
183
+        { id: 1, name: "0.22%季铵盐" },
184
+        { id: 2, name: "500mg/l含氯消毒剂" },
185
+        { id: 3, name: "1000mg/l含氯消毒剂" },
186
+        { id: 4, name: "1500mg/l含氯消毒剂" }
187
       ],
187
       ],
188
       // 夜路消毒方式
188
       // 夜路消毒方式
189
       sterilizeType: [
189
       sterilizeType: [
190
-        { id: 0, name: '/' },
191
-        { id: 1, name: '热化学消毒' },
192
-        { id: 2, name: '化学消毒 + 除钙' },
193
-        { id: 3, name: '热化学消毒 + 除钙' },
194
-        { id: 4, name: '热消毒' },
195
-        { id: 5, name: '化学消毒' },
196
-        { id: 6, name: '除钙' },
197
-        { id: 7, name: '清洗' }
190
+        { id: 0, name: "/" },
191
+        { id: 1, name: "热化学消毒" },
192
+        { id: 2, name: "化学消毒 + 除钙" },
193
+        { id: 3, name: "热化学消毒 + 除钙" },
194
+        { id: 4, name: "热消毒" },
195
+        { id: 5, name: "化学消毒" },
196
+        { id: 6, name: "除钙" },
197
+        { id: 7, name: "清洗" }
198
       ],
198
       ],
199
       // 夜路消毒液
199
       // 夜路消毒液
200
       fluidPathType: [
200
       fluidPathType: [
201
-        { id: 0, name: '/' },
202
-        { id: 1, name: '20%柠檬酸' },
203
-        { id: 2, name: '25%柠檬酸' },
204
-        { id: 3, name: '50%柠檬酸' },
205
-        { id: 4, name: '50%柠檬酸 + 5%次氯酸钠' },
206
-        { id: 5, name: '20%柠檬酸 + 10%冰醋酸' },
207
-        { id: 6, name: '0.2%过氧化乙酸' },
208
-        { id: 7, name: '10%冰醋酸' },
209
-        { id: 8, name: '50%冰醋酸' },
210
-        { id: 9, name: '5%次氯酸钠' }
201
+        { id: 0, name: "/" },
202
+        { id: 1, name: "20%柠檬酸" },
203
+        { id: 2, name: "25%柠檬酸" },
204
+        { id: 3, name: "50%柠檬酸" },
205
+        { id: 4, name: "50%柠檬酸 + 5%次氯酸钠" },
206
+        { id: 5, name: "20%柠檬酸 + 10%冰醋酸" },
207
+        { id: 6, name: "0.2%过氧化乙酸" },
208
+        { id: 7, name: "10%冰醋酸" },
209
+        { id: 8, name: "50%冰醋酸" },
210
+        { id: 9, name: "5%次氯酸钠" }
211
       ],
211
       ],
212
       DeviceType: [],
212
       DeviceType: [],
213
       planid: 0,
213
       planid: 0,
214
       plandata: 0
214
       plandata: 0
215
-    }
215
+    };
216
   },
216
   },
217
   methods: {
217
   methods: {
218
     open: function() {
218
     open: function() {
219
-      this.dialogVisible = true
219
+      this.dialogVisible = true;
220
     },
220
     },
221
     getAllEquimentName() {
221
     getAllEquimentName() {
222
       getAllEquimentName().then(response => {
222
       getAllEquimentName().then(response => {
223
         if (response.data.state === 1) {
223
         if (response.data.state === 1) {
224
-          var equit = response.data.data.equit
224
+          var equit = response.data.data.equit;
225
           // console.log('equit', equit);
225
           // console.log('equit', equit);
226
           // this.DeviceType = equit;
226
           // this.DeviceType = equit;
227
         }
227
         }
228
-      })
228
+      });
229
     },
229
     },
230
     savePlan(formName) {
230
     savePlan(formName) {
231
-      var equimentid = this.equimentid
231
+      var equimentid = this.equimentid;
232
       // console.log('equimentid', equimentid);
232
       // console.log('equimentid', equimentid);
233
-      var devicetype = this.form.device_type
234
-      var devicetypes = parseInt(devicetype)
235
-      this.form.device_type = devicetypes
233
+      var devicetype = this.form.device_type;
234
+      var devicetypes = parseInt(devicetype);
235
+      this.form.device_type = devicetypes;
236
 
236
 
237
-      var ways = this.form.way
238
-      var way = parseInt(ways)
239
-      this.form.way = way
237
+      var ways = this.form.way;
238
+      var way = parseInt(ways);
239
+      this.form.way = way;
240
 
240
 
241
-      var machinedisinfectant = this.form.machine_disinfectant
242
-      var machinedisinfectants = parseInt(machinedisinfectant)
243
-      this.form.machine_disinfectant = machinedisinfectants
241
+      var machinedisinfectant = this.form.machine_disinfectant;
242
+      var machinedisinfectants = parseInt(machinedisinfectant);
243
+      this.form.machine_disinfectant = machinedisinfectants;
244
 
244
 
245
-      var disinfectantways = this.form.disinfectant_way
246
-      var disinfectantway = parseInt(disinfectantways)
247
-      this.form.disinfectant_way = disinfectantway
245
+      var disinfectantways = this.form.disinfectant_way;
246
+      var disinfectantway = parseInt(disinfectantways);
247
+      this.form.disinfectant_way = disinfectantway;
248
 
248
 
249
-      var disinfectants = this.form.disinfectant
250
-      var disinfectant = parseInt(disinfectants)
251
-      this.form.disinfectant = disinfectant
249
+      var disinfectants = this.form.disinfectant;
250
+      var disinfectant = parseInt(disinfectants);
251
+      this.form.disinfectant = disinfectant;
252
       savePlan(this.form, this.equimentid).then(response => {
252
       savePlan(this.form, this.equimentid).then(response => {
253
         if (response.data.state === 1) {
253
         if (response.data.state === 1) {
254
-          var msg = response.data.data.msg
254
+          var msg = response.data.data.msg;
255
           // console.log('msg', msg);
255
           // console.log('msg', msg);
256
-          this.$message.success('保存成功')
257
-          this.dialogVisible = false
258
-          this.$emit('getAllPlan')
259
-          this.$emit('getAllPlanDetail')
256
+          this.$message.success("保存成功");
257
+          this.dialogVisible = false;
258
+          this.$emit("getAllPlan");
259
+          this.$emit("getAllPlanDetail");
260
           // 如果保存成功通过状态值改变父组键表格的值
260
           // 如果保存成功通过状态值改变父组键表格的值
261
-          this.plandata = 1
262
-          this.$emit('func', this.plandata)
261
+          this.plandata = 1;
262
+          this.$emit("func", this.plandata);
263
         } else {
263
         } else {
264
-          this.$message.error('该消毒计划已存在')
264
+          this.$message.error("该消毒计划已存在");
265
         }
265
         }
266
-      })
266
+      });
267
     },
267
     },
268
     getAllEquitType() {
268
     getAllEquitType() {
269
       getAllEquitType().then(response => {
269
       getAllEquitType().then(response => {
270
         if (response.data.state === 1) {
270
         if (response.data.state === 1) {
271
-          var equitname = response.data.data.equitname
272
-          var name = response.data.data.name
273
-          console.log('name', name)
274
-          // console.log('equitname', equitname)
275
-          this.DeviceType = equitname
271
+          var equitname = response.data.data.mode;
272
+          this.DeviceType = equitname;
276
         }
273
         }
277
-      })
274
+      });
278
     }
275
     }
279
   },
276
   },
280
   created() {
277
   created() {
281
-    this.getAllEquimentName()
282
-    this.getAllEquitType()
278
+    this.getAllEquimentName();
279
+    this.getAllEquitType();
283
   }
280
   }
284
-}
281
+};
285
 </script>
282
 </script>
286
 
283
 
287
 <style scoped></style>
284
 <style scoped></style>

File diff suppressed because it is too large
+ 816 - 480
src/xt_pages/management/components/QualityForm.vue


+ 188 - 182
src/xt_pages/management/components/RepairForm.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <el-row>
4
-      <el-col :span="2">
5
-        <el-checkbox v-model="checkAllStatus" @change="changeCheck"
6
-          >全选</el-checkbox
7
-        >
8
-      </el-col>
9
-      <el-col :span="2" class="a">
10
-        <el-button size="small" @click="BatchDelete">批量删除</el-button>
11
-      </el-col>
12
-      <el-col :span="4" class="a">
3
+    <el-row class="row">
4
+      <el-col :span="4">
13
         <span class="machineClass">机号:</span>
5
         <span class="machineClass">机号:</span>
14
         <el-select style="width:100px" v-model="forms.bed">
6
         <el-select style="width:100px" v-model="forms.bed">
15
           <el-option
7
           <el-option
20
           ></el-option>
12
           ></el-option>
21
         </el-select>
13
         </el-select>
22
       </el-col>
14
       </el-col>
23
-      <el-col :span="10" class="a">
15
+      <el-col :span="11">
24
         <span class="machineClass">日期查询:</span>
16
         <span class="machineClass">日期查询:</span>
25
         <el-date-picker
17
         <el-date-picker
26
           v-model="forms.start_time"
18
           v-model="forms.start_time"
46
         <el-button @click="queryRepair()">查询</el-button>
38
         <el-button @click="queryRepair()">查询</el-button>
47
       </el-col>
39
       </el-col>
48
     </el-row>
40
     </el-row>
41
+    <el-row>
42
+        <el-col :span="2">
43
+        <el-checkbox v-model="checkAllStatus" @change="changeCheck"
44
+          >全选</el-checkbox
45
+        >
46
+      </el-col>
47
+      <el-col :span="2" class="a">
48
+        <el-button size="small" @click="BatchDelete">批量删除</el-button>
49
+      </el-col>
50
+    </el-row>
49
     <el-row>
51
     <el-row>
50
       <el-table
52
       <el-table
51
         ref="multipleTable"
53
         ref="multipleTable"
418
   DeleteRepair,
420
   DeleteRepair,
419
   queryRepair,
421
   queryRepair,
420
   DeleteRepairs
422
   DeleteRepairs
421
-} from "@/api/manage";
422
-import { uParseTime } from "@/utils/tools";
423
-import { getFileExtension } from "@/utils/tools";
423
+} from '@/api/manage'
424
+import { uParseTime } from '@/utils/tools'
425
+import { getFileExtension } from '@/utils/tools'
424
 export default {
426
 export default {
425
-  name: "RepairForm",
427
+  name: 'RepairForm',
426
   data() {
428
   data() {
427
     return {
429
     return {
428
       dialogVisible: false,
430
       dialogVisible: false,
429
       selectCulture: [],
431
       selectCulture: [],
430
       forms: {
432
       forms: {
431
-        bed: "",
433
+        bed: '',
432
         sename: 1,
434
         sename: 1,
433
-        start_time: "",
434
-        end_time: ""
435
+        start_time: '',
436
+        end_time: ''
435
       },
437
       },
436
       guaForm: {
438
       guaForm: {
437
-        id: "",
438
-        guarantee_date: "",
439
-        start_time: "",
440
-        arrive_time: "",
441
-        finish_time: "",
442
-        total_distance: "",
443
-        failure_stage: "",
444
-        fault_description: "",
445
-        cause_analysis: "",
446
-        treatment_process: "",
447
-        images: "",
448
-        exclude: "",
449
-        reason: "",
450
-        code_information: "",
451
-        image_name: ""
439
+        id: '',
440
+        guarantee_date: '',
441
+        start_time: '',
442
+        arrive_time: '',
443
+        finish_time: '',
444
+        total_distance: '',
445
+        failure_stage: '',
446
+        fault_description: '',
447
+        cause_analysis: '',
448
+        treatment_process: '',
449
+        images: '',
450
+        exclude: '',
451
+        reason: '',
452
+        code_information: '',
453
+        image_name: ''
452
       },
454
       },
453
       isIndeterminate: false,
455
       isIndeterminate: false,
454
       checkAllStatus: false,
456
       checkAllStatus: false,
455
       bedNumber: [],
457
       bedNumber: [],
456
       tableData: [],
458
       tableData: [],
457
-      qiniuDomain: "https://images.shengws.com/",
458
-      uploadFileData: { token: "", key: "" },
459
+      qiniuDomain: 'https://images.shengws.com/',
460
+      uploadFileData: { token: '', key: '' },
459
       faultPhase: [
461
       faultPhase: [
460
-        { id: 1, name: "开机启动" },
461
-        { id: 2, name: "自检" },
462
-        { id: 3, name: "准备" },
463
-        { id: 4, name: "治疗" },
464
-        { id: 5, name: "消毒" }
462
+        { id: 1, name: '开机启动' },
463
+        { id: 2, name: '自检' },
464
+        { id: 3, name: '准备' },
465
+        { id: 4, name: '治疗' },
466
+        { id: 5, name: '消毒' }
465
       ],
467
       ],
466
       breakDown: [
468
       breakDown: [
467
-        { id: 1, name: "是" },
468
-        { id: 2, name: "待观察" },
469
-        { id: 3, name: "未解决" }
469
+        { id: 1, name: '是' },
470
+        { id: 2, name: '待观察' },
471
+        { id: 3, name: '未解决' }
470
       ],
472
       ],
471
       repirRules: {
473
       repirRules: {
472
-        guarantee_date: [{ required: true, message: "请填写保修日期" }],
473
-        fault_description: [{ required: true, message: "请填写故障描述" }]
474
+        guarantee_date: [{ required: true, message: '请填写保修日期' }],
475
+        fault_description: [{ required: true, message: '请填写故障描述' }]
474
       },
476
       },
475
-      filename: "",
477
+      filename: '',
476
       limit: 10,
478
       limit: 10,
477
       page: 1,
479
       page: 1,
478
       total: 0,
480
       total: 0,
479
-      filename: ""
480
-    };
481
+      filename: ''
482
+    }
481
   },
483
   },
482
   methods: {
484
   methods: {
483
     changeCheck() {
485
     changeCheck() {
484
-      this.$refs.multipleTable.clearSelection();
486
+      this.$refs.multipleTable.clearSelection()
485
       if (this.checkAllStatus) {
487
       if (this.checkAllStatus) {
486
-        this.$refs.multipleTable.toggleAllSelection();
488
+        this.$refs.multipleTable.toggleAllSelection()
487
       }
489
       }
488
     },
490
     },
489
     getAllSubregion() {
491
     getAllSubregion() {
490
       getAllSubregion().then(response => {
492
       getAllSubregion().then(response => {
491
-        var zones = response.data.data.zones;
492
-        var numbers = response.data.data.numbers;
493
-        var number = [{ id: 0, number: "全部" }];
493
+        var zones = response.data.data.zones
494
+        var numbers = response.data.data.numbers
495
+        var number = [{ id: 0, number: '全部' }]
494
         for (let index = 0; index < numbers.length; index++) {
496
         for (let index = 0; index < numbers.length; index++) {
495
-          const item = numbers[index];
496
-          number.push({ id: item.id, number: item.number });
497
+          const item = numbers[index]
498
+          number.push({ id: item.id, number: item.number })
497
         }
499
         }
498
-        this.bedNumber = number;
499
-      });
500
+        this.bedNumber = number
501
+      })
500
     },
502
     },
501
     handleSelectionChange(val) {
503
     handleSelectionChange(val) {
502
-      this.selectCulture = val;
504
+      this.selectCulture = val
503
     },
505
     },
504
     getAllRepair() {
506
     getAllRepair() {
505
       getAllRepair(this.limit, this.page).then(response => {
507
       getAllRepair(this.limit, this.page).then(response => {
506
         if (response.data.state === 1) {
508
         if (response.data.state === 1) {
507
-          var repair = response.data.data.repair;
509
+          var repair = response.data.data.repair
508
           // console.log('repair是', repair)
510
           // console.log('repair是', repair)
509
           // eslint-disable-next-line no-unused-vars
511
           // eslint-disable-next-line no-unused-vars
510
-          var total = response.data.data.total;
511
-          this.total = total;
512
+          var total = response.data.data.total
513
+          this.total = total
512
           for (let index = 0; index < repair.length; index++) {
514
           for (let index = 0; index < repair.length; index++) {
513
             if (repair[index].failure_stage === 0) {
515
             if (repair[index].failure_stage === 0) {
514
-              repair[index].failure_stage = "";
516
+              repair[index].failure_stage = ''
515
             }
517
             }
516
 
518
 
517
             if (repair[index].failure_stage === 1) {
519
             if (repair[index].failure_stage === 1) {
518
-              repair[index].failure_stage = "开机启动";
520
+              repair[index].failure_stage = '开机启动'
519
             }
521
             }
520
             if (repair[index].failure_stage === 2) {
522
             if (repair[index].failure_stage === 2) {
521
-              repair[index].failure_stage = "自检";
523
+              repair[index].failure_stage = '自检'
522
             }
524
             }
523
             if (repair[index].failure_stage === 3) {
525
             if (repair[index].failure_stage === 3) {
524
-              repair[index].failure_stage = "准备";
526
+              repair[index].failure_stage = '准备'
525
             }
527
             }
526
             if (repair[index].failure_stage === 4) {
528
             if (repair[index].failure_stage === 4) {
527
-              repair[index].failure_stage = "治疗";
529
+              repair[index].failure_stage = '治疗'
528
             }
530
             }
529
             if (repair[index].failure_stage === 5) {
531
             if (repair[index].failure_stage === 5) {
530
-              repair[index].failure_stage = "消毒";
532
+              repair[index].failure_stage = '消毒'
531
             }
533
             }
532
 
534
 
533
             if (repair[index].exclude === 0) {
535
             if (repair[index].exclude === 0) {
534
-              repair[index].exclude = "";
536
+              repair[index].exclude = ''
535
             }
537
             }
536
 
538
 
537
             if (repair[index].exclude === 1) {
539
             if (repair[index].exclude === 1) {
538
-              repair[index].exclude = "是";
540
+              repair[index].exclude = '是'
539
             }
541
             }
540
             if (repair[index].exclude === 2) {
542
             if (repair[index].exclude === 2) {
541
-              repair[index].exclude = "待观察";
543
+              repair[index].exclude = '待观察'
542
             }
544
             }
543
             if (repair[index].exclude === 3) {
545
             if (repair[index].exclude === 3) {
544
-              repair[index].exclude = "未解决";
546
+              repair[index].exclude = '未解决'
545
             }
547
             }
546
           }
548
           }
547
-          this.tableData = repair;
549
+          this.tableData = repair
548
         }
550
         }
549
-      });
551
+      })
550
     },
552
     },
551
     getTime(time) {
553
     getTime(time) {
552
-      return uParseTime(time, "{y}-{m}-{d}");
554
+      return uParseTime(time, '{y}-{m}-{d}')
553
     },
555
     },
554
     getTimes(time) {
556
     getTimes(time) {
555
-      return uParseTime(time, "{y}-{m}-{d} {h}:{i}");
557
+      return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
556
     },
558
     },
557
     handleExceed(file) {
559
     handleExceed(file) {
558
       // console.log(file)
560
       // console.log(file)
561
       // console.log(file)
563
       // console.log(file)
562
     },
564
     },
563
     EditRepair(id) {
565
     EditRepair(id) {
564
-      this.dialogVisible = true;
566
+      this.dialogVisible = true
565
       EditRepair(id).then(response => {
567
       EditRepair(id).then(response => {
566
         if (response.data.state === 1) {
568
         if (response.data.state === 1) {
567
-          var repair = response.data.data.repair;
568
-          console.log("repair", repair);
569
+          var repair = response.data.data.repair
570
+          console.log('repair', repair)
569
           this.guaForm.guarantee_date = uParseTime(
571
           this.guaForm.guarantee_date = uParseTime(
570
             repair.guarantee_date,
572
             repair.guarantee_date,
571
-            "{y}-{m}-{d}"
572
-          );
573
+            '{y}-{m}-{d}'
574
+          )
573
           this.guaForm.start_time = uParseTime(
575
           this.guaForm.start_time = uParseTime(
574
             repair.start_time,
576
             repair.start_time,
575
-            "{y}-{m}-{d} {h}:{i}"
576
-          );
577
+            '{y}-{m}-{d} {h}:{i}'
578
+          )
577
           this.guaForm.arrive_time = uParseTime(
579
           this.guaForm.arrive_time = uParseTime(
578
             repair.arrive_time,
580
             repair.arrive_time,
579
-            "{y}-{m}-{d} {h}:{i}"
580
-          );
581
+            '{y}-{m}-{d} {h}:{i}'
582
+          )
581
           this.guaForm.finish_time = uParseTime(
583
           this.guaForm.finish_time = uParseTime(
582
             repair.finish_time,
584
             repair.finish_time,
583
-            "{y}-{m}-{d} {h}:{i}"
584
-          );
585
-          this.guaForm.total_distance = repair.total_distance;
586
-          this.guaForm.failure_stage = repair.failure_stage;
587
-          this.guaForm.fault_description = repair.fault_description;
588
-          this.guaForm.cause_analysis = repair.cause_analysis;
589
-          this.guaForm.treatment_process = repair.treatment_process;
590
-          this.guaForm.images = repair.images;
591
-          this.guaForm.exclude = repair.exclude;
592
-          this.guaForm.reason = repair.reason;
593
-          this.guaForm.code_information = repair.code_information;
594
-          this.guaForm.id = repair.id;
595
-          this.filename = repair.image_name;
585
+            '{y}-{m}-{d} {h}:{i}'
586
+          )
587
+          this.guaForm.total_distance = repair.total_distance
588
+          this.guaForm.failure_stage = repair.failure_stage
589
+          this.guaForm.fault_description = repair.fault_description
590
+          this.guaForm.cause_analysis = repair.cause_analysis
591
+          this.guaForm.treatment_process = repair.treatment_process
592
+          this.guaForm.images = repair.images
593
+          this.guaForm.exclude = repair.exclude
594
+          this.guaForm.reason = repair.reason
595
+          this.guaForm.code_information = repair.code_information
596
+          this.guaForm.id = repair.id
597
+          this.filename = repair.image_name
596
         }
598
         }
597
-      });
599
+      })
598
     },
600
     },
599
     handleSuccess(res, file, fileList) {
601
     handleSuccess(res, file, fileList) {
600
-      this.guaForm.images = this.qiniuDomain + res.url;
601
-      console.log("图片上传", this.guaForm.images);
602
-      this.$refs.upload.clearFiles();
603
-      this.filename = file.name;
604
-      this.guaForm.image_name = file.name;
602
+      this.guaForm.images = this.qiniuDomain + res.url
603
+      console.log('图片上传', this.guaForm.images)
604
+      this.$refs.upload.clearFiles()
605
+      this.filename = file.name
606
+      this.guaForm.image_name = file.name
605
     },
607
     },
606
     beforeUploadFile(file) {
608
     beforeUploadFile(file) {
607
-      this.filename = file.name;
608
-      this.guaForm.image_name = file.name;
609
-      const isLt2M = file.size / 1024 / 1024 <= 2048;
610
-      console.log("filename", file);
609
+      this.filename = file.name
610
+      this.guaForm.image_name = file.name
611
+      const isLt2M = file.size / 1024 / 1024 <= 2048
612
+      console.log('filename', file)
611
       // console.log('视频大小', file.size / 1024 / 1024)
613
       // console.log('视频大小', file.size / 1024 / 1024)
612
       // console.log('isLt2M是什么', isLt2M)
614
       // console.log('isLt2M是什么', isLt2M)
613
 
615
 
614
       if (!isLt2M) {
616
       if (!isLt2M) {
615
-        this.$message.error("上传视频大小不能超过 2G!");
616
-        return false;
617
+        this.$message.error('上传视频大小不能超过 2G!')
618
+        return false
617
       }
619
       }
618
-      var date = new Date();
619
-      var ext = getFileExtension(file.name);
620
+      var date = new Date()
621
+      var ext = getFileExtension(file.name)
620
       var key =
622
       var key =
621
         date.getFullYear() +
623
         date.getFullYear() +
622
         (date.getMonth() + 1) +
624
         (date.getMonth() + 1) +
624
         date.getHours() +
626
         date.getHours() +
625
         date.getMinutes() +
627
         date.getMinutes() +
626
         date.getSeconds() +
628
         date.getSeconds() +
627
-        "_o_" +
629
+        '_o_' +
628
         file.uid +
630
         file.uid +
629
-        "." +
630
-        ext;
631
-      const _self = this;
631
+        '.' +
632
+        ext
633
+      const _self = this
632
       return new Promise((resolve, reject) => {
634
       return new Promise((resolve, reject) => {
633
         // eslint-disable-next-line no-undef
635
         // eslint-disable-next-line no-undef
634
         getToken()
636
         getToken()
635
           .then(response => {
637
           .then(response => {
636
-            const token = response.data.data.uptoken;
637
-            console.log("token2是什么?", token);
638
-            _self._data.uploadFileData.token = token;
639
-            _self._data.uploadFileData.key = key;
640
-            resolve(true);
638
+            const token = response.data.data.uptoken
639
+            console.log('token2是什么?', token)
640
+            _self._data.uploadFileData.token = token
641
+            _self._data.uploadFileData.key = key
642
+            resolve(true)
641
           })
643
           })
642
           // eslint-disable-next-line handle-callback-err
644
           // eslint-disable-next-line handle-callback-err
643
           .catch(err => {
645
           .catch(err => {
644
-            reject(false);
645
-          });
646
-      });
646
+            reject(false)
647
+          })
648
+      })
647
     },
649
     },
648
     toLink() {
650
     toLink() {
649
-      window.location.href = this.guaForm.images;
651
+      window.location.href = this.guaForm.images
650
     },
652
     },
651
     UpdateRepair(formName) {
653
     UpdateRepair(formName) {
652
       this.$refs[formName].validate(valid => {
654
       this.$refs[formName].validate(valid => {
653
         this.guaForm.start_time = uParseTime(
655
         this.guaForm.start_time = uParseTime(
654
           this.guaForm.start_time,
656
           this.guaForm.start_time,
655
-          "{y}-{m}-{d} {h}:{i}"
656
-        );
657
+          '{y}-{m}-{d} {h}:{i}'
658
+        )
657
         this.guaForm.arrive_time = uParseTime(
659
         this.guaForm.arrive_time = uParseTime(
658
           this.guaForm.arrive_time,
660
           this.guaForm.arrive_time,
659
-          "{y}-{m}-{d} {h}:{i}"
660
-        );
661
+          '{y}-{m}-{d} {h}:{i}'
662
+        )
661
         this.guaForm.finish_time = uParseTime(
663
         this.guaForm.finish_time = uParseTime(
662
           this.guaForm.finish_time,
664
           this.guaForm.finish_time,
663
-          "{y}-{m}-{d} {h}:{i}"
664
-        );
665
+          '{y}-{m}-{d} {h}:{i}'
666
+        )
665
 
667
 
666
-        if (this.guaForm.failure_stage === "") {
667
-          this.guaForm.failure_stage = 0;
668
+        if (this.guaForm.failure_stage === '') {
669
+          this.guaForm.failure_stage = 0
668
         }
670
         }
669
 
671
 
670
-        var failurestages = this.guaForm.failure_stage;
671
-        var falur = parseInt(failurestages);
672
-        this.guaForm.failure_stage = falur;
672
+        var failurestages = this.guaForm.failure_stage
673
+        var falur = parseInt(failurestages)
674
+        this.guaForm.failure_stage = falur
673
 
675
 
674
-        if (this.guaForm.exclude === "") {
675
-          this.guaForm.exclude = 0;
676
+        if (this.guaForm.exclude === '') {
677
+          this.guaForm.exclude = 0
676
         }
678
         }
677
-        var excludes = this.guaForm.exclude;
678
-        var exclude = parseInt(excludes);
679
-        this.guaForm.exclude = exclude;
679
+        var excludes = this.guaForm.exclude
680
+        var exclude = parseInt(excludes)
681
+        this.guaForm.exclude = exclude
680
         if (valid) {
682
         if (valid) {
681
           UpdateRepair(this.guaForm).then(response => {
683
           UpdateRepair(this.guaForm).then(response => {
682
             if (response.data.state === 1) {
684
             if (response.data.state === 1) {
683
-              var repair = response.data.data.repair;
684
-              this.dialogVisible = false;
685
-              this.$message.success("修改成功");
685
+              var repair = response.data.data.repair
686
+              this.dialogVisible = false
687
+              this.$message.success('修改成功')
686
             }
688
             }
687
-          });
689
+          })
688
         }
690
         }
689
-      });
691
+      })
690
     },
692
     },
691
     BatchDelete() {
693
     BatchDelete() {
692
       if (this.selectCulture.length == 0) {
694
       if (this.selectCulture.length == 0) {
693
-        this.$message.error("请选择要删除的信息");
694
-        return false;
695
+        this.$message.error('请选择要删除的信息')
696
+        return false
695
       }
697
       }
696
       this.$confirm(
698
       this.$confirm(
697
-        "确认要删除所选记录吗? <br>删除后,信息将无法恢复",
698
-        "删除提示",
699
+        '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
700
+        '删除提示',
699
         {
701
         {
700
           dangerouslyUseHTMLString: true,
702
           dangerouslyUseHTMLString: true,
701
-          confirmButtonText: "确定",
702
-          cancelButtonText: "取消",
703
-          type: "warning"
703
+          confirmButtonText: '确定',
704
+          cancelButtonText: '取消',
705
+          type: 'warning'
704
         }
706
         }
705
       ).then(() => {
707
       ).then(() => {
706
-        var ids = [];
707
-        var idMap = {};
708
+        var ids = []
709
+        var idMap = {}
708
         for (const index in this.selectCulture) {
710
         for (const index in this.selectCulture) {
709
-          ids.push(this.selectCulture[index].id);
710
-          idMap[this.selectCulture[index].id] = this.selectCulture[index].id;
711
+          ids.push(this.selectCulture[index].id)
712
+          idMap[this.selectCulture[index].id] = this.selectCulture[index].id
711
         }
713
         }
712
         DeleteRepair({ ids: ids }).then(response => {
714
         DeleteRepair({ ids: ids }).then(response => {
713
           if (response.data.state === 1) {
715
           if (response.data.state === 1) {
714
-            var msg = response.data.data.msg;
715
-            var planDataLength = this.tableData.length;
716
+            var msg = response.data.data.msg
717
+            var planDataLength = this.tableData.length
716
             for (let index = planDataLength - 1; index >= 0; index--) {
718
             for (let index = planDataLength - 1; index >= 0; index--) {
717
               if (this.tableData[index].id in idMap) {
719
               if (this.tableData[index].id in idMap) {
718
-                this.tableData.splice(index, 1);
720
+                this.tableData.splice(index, 1)
719
               }
721
               }
720
             }
722
             }
721
-            this.$message.success("删除成功");
723
+            this.$message.success('删除成功')
722
           }
724
           }
723
-        });
724
-      });
725
+        })
726
+      })
725
     },
727
     },
726
     queryRepair() {
728
     queryRepair() {
727
       queryRepair(
729
       queryRepair(
730
         this.forms.end_time
732
         this.forms.end_time
731
       ).then(response => {
733
       ).then(response => {
732
         if (response.data.state === 1) {
734
         if (response.data.state === 1) {
733
-          var repair = response.data.data.repair;
734
-          this.tableData = repair;
735
+          var repair = response.data.data.repair
736
+          this.tableData = repair
735
         }
737
         }
736
-      });
738
+      })
737
     },
739
     },
738
     handleSizeChange(limit) {
740
     handleSizeChange(limit) {
739
-      this.limit = limit;
740
-      this.getAllRepair();
741
+      this.limit = limit
742
+      this.getAllRepair()
741
     },
743
     },
742
     handleCurrentChange(page) {
744
     handleCurrentChange(page) {
743
-      this.page = page;
744
-      this.getAllRepair();
745
+      this.page = page
746
+      this.getAllRepair()
745
     },
747
     },
746
     DeleteRepairs(id, index) {
748
     DeleteRepairs(id, index) {
747
       this.$confirm(
749
       this.$confirm(
748
-        "确认要删除所选记录吗? <br>删除后,信息将无法恢复",
749
-        "删除提示",
750
+        '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
751
+        '删除提示',
750
         {
752
         {
751
           dangerouslyUseHTMLString: true,
753
           dangerouslyUseHTMLString: true,
752
-          confirmButtonText: "确定",
753
-          cancelButtonText: "取消",
754
-          type: "warning"
754
+          confirmButtonText: '确定',
755
+          cancelButtonText: '取消',
756
+          type: 'warning'
755
         }
757
         }
756
       ).then(() => {
758
       ).then(() => {
757
         DeleteRepairs(id, index).then(response => {
759
         DeleteRepairs(id, index).then(response => {
758
           if (response.data.state === 1) {
760
           if (response.data.state === 1) {
759
-            var msg = response.data.data.msg;
760
-            this.tableData.splice(index, 1);
761
+            var msg = response.data.data.msg
762
+            this.tableData.splice(index, 1)
761
           }
763
           }
762
-        });
763
-      });
764
+        })
765
+      })
764
     }
766
     }
765
   },
767
   },
766
   created() {
768
   created() {
767
-    this.getAllSubregion();
768
-    this.getAllRepair();
769
+    this.getAllSubregion()
770
+    this.getAllRepair()
769
   }
771
   }
770
-};
772
+}
771
 </script>
773
 </script>
772
 
774
 
773
-<style scoped></style>
775
+<style scoped>
776
+  .row{
777
+    margin-bottom:10px;
778
+  }
779
+</style>

+ 43 - 38
src/xt_pages/management/components/UserForm.vue View File

1
 <template>
1
 <template>
2
   <div id="user-form">
2
   <div id="user-form">
3
-    <el-row>
4
-      <el-col :span="2" class="a">
5
-        <el-checkbox
6
-          :indeterminate="isIndeterminate"
7
-          v-model="checkAllStatus"
8
-          @change="changeCheck"
9
-          >全选</el-checkbox
10
-        >
11
-      </el-col>
12
-      <el-col :span="2" class="a">
13
-        <el-button size="small" @click="BatchDelete">批量删除</el-button>
3
+    <el-row class="c">
4
+      <el-col :span="11">
5
+        <span class="machineClass">日期查询:</span>
6
+        <el-date-picker
7
+          v-model="form.start_time"
8
+          prefix-icon="none"
9
+          type="date"
10
+          placeholder="请选择"
11
+          format="yyyy-MM-dd"
12
+          value-format="yyyy-MM-dd"
13
+          style="width:145px"
14
+        ></el-date-picker
15
+        >-
16
+        <el-date-picker
17
+          v-model="form.end_time"
18
+          prefix-icon="none"
19
+          type="date"
20
+          placeholder="请选择"
21
+          format="yyyy-MM-dd"
22
+          value-format="yyyy-MM-dd"
23
+          style="width:145px"
24
+        ></el-date-picker>
14
       </el-col>
25
       </el-col>
15
-      <el-col :span="3" class="a">
26
+       <el-col :span="4">
16
         <span class="machineClass">分区:</span>
27
         <span class="machineClass">分区:</span>
17
-        <el-select style="width:80px" v-model="form.zone" @change="changeBed">
28
+        <el-select style="width:90px" v-model="form.zone" @change="changeBed">
18
           <el-option
29
           <el-option
19
             v-for="item in this.zones"
30
             v-for="item in this.zones"
20
             :key="item.id"
31
             :key="item.id"
23
           ></el-option>
34
           ></el-option>
24
         </el-select>
35
         </el-select>
25
       </el-col>
36
       </el-col>
26
-      <el-col :span="4" class="a">
37
+      <el-col :span="4">
27
         <span class="machineClass">机位号:</span>
38
         <span class="machineClass">机位号:</span>
28
         <el-select style="width:80px" v-model="form.bed">
39
         <el-select style="width:80px" v-model="form.bed">
29
           <el-option
40
           <el-option
34
           ></el-option>
45
           ></el-option>
35
         </el-select>
46
         </el-select>
36
       </el-col>
47
       </el-col>
37
-      <el-col :span="8" class="a">
38
-        <span class="machineClass">日期查询:</span>
39
-        <el-date-picker
40
-          v-model="form.start_time"
41
-          prefix-icon="none"
42
-          type="date"
43
-          placeholder="请选择"
44
-          format="yyyy-MM-dd"
45
-          value-format="yyyy-MM-dd"
46
-          style="width:120px"
47
-        ></el-date-picker
48
-        >-
49
-        <el-date-picker
50
-          v-model="form.end_time"
51
-          prefix-icon="none"
52
-          type="date"
53
-          placeholder="请选择"
54
-          format="yyyy-MM-dd"
55
-          value-format="yyyy-MM-dd"
56
-          style="width:120px"
57
-        ></el-date-picker>
58
-      </el-col>
59
-      <el-col :span="2" class="a">
48
+      <el-col :span="5">
60
         <el-button @click="queryInfo()">查询</el-button>
49
         <el-button @click="queryInfo()">查询</el-button>
61
       </el-col>
50
       </el-col>
62
-      <el-col :span="2" class="a">
51
+    </el-row>
52
+    <el-row :span="24">
53
+      <el-col :span="2">
54
+        <el-checkbox
55
+          :indeterminate="isIndeterminate"
56
+          v-model="checkAllStatus"
57
+          @change="changeCheck"
58
+          >全选</el-checkbox
59
+        >
60
+      </el-col>
61
+      <el-col :span="3">
62
+        <el-button size="small" @click="BatchDelete">批量删除</el-button>
63
+      </el-col>
64
+       <el-col :span="6" class="a">
63
         <el-button @click="printCard">打印</el-button>
65
         <el-button @click="printCard">打印</el-button>
64
       </el-col>
66
       </el-col>
65
     </el-row>
67
     </el-row>
2238
 .machineClass {
2240
 .machineClass {
2239
   font-size: 14px;
2241
   font-size: 14px;
2240
 }
2242
 }
2243
+.c{
2244
+  margin-bottom:10px;
2245
+}
2241
 </style>
2246
 </style>

+ 122 - 71
src/xt_pages/management/home.vue View File

9
                  <el-row>
9
                  <el-row>
10
                    <el-col :span="24">
10
                    <el-col :span="24">
11
                      <span class="zone">分&nbsp;&nbsp;&nbsp;&nbsp;区:</span>
11
                      <span class="zone">分&nbsp;&nbsp;&nbsp;&nbsp;区:</span>
12
-                      <el-select v-model="forms.zone_id" placeholder="请选择" class="a" @change="changeBedNumber" style="width:125px">
12
+                      <el-select v-model="forms.zone_id" placeholder="请选择" class="a" @change="changeBedNumber" style="width:125px" :disabled="zoneDisabled">
13
                         <el-option
13
                         <el-option
14
                          v-for="item in bedZone"
14
                          v-for="item in bedZone"
15
                          :key="item.id"
15
                          :key="item.id"
20
                       </el-select>
20
                       </el-select>
21
                      </el-col>
21
                      </el-col>
22
                   </el-row>
22
                   </el-row>
23
-                  <el-row>
24
-                   <el-col>
25
-                    <span class="zone">班&nbsp;&nbsp;&nbsp;&nbsp;次:</span>
26
-                      <el-select v-model="forms.class_id" placeholder="请选择" class="a" @change="changeClassId" style="width:125px">
27
-                        <el-option
28
-                         v-for="item in Classes"
29
-                         :key="item.id"
30
-                         :label="item.name"
31
-                         :value="item.id">
32
-                        </el-option>
33
-                      </el-select>
34
-                     </el-col>
35
-                  </el-row>
23
+<!--                  <el-row>-->
24
+<!--                   <el-col>-->
25
+<!--                    <span class="zone">班&nbsp;&nbsp;&nbsp;&nbsp;次:</span>-->
26
+<!--                      <el-select v-model="forms.class_id" placeholder="请选择" class="a" @change="changeClassId" style="width:125px">-->
27
+<!--                        <el-option-->
28
+<!--                         v-for="item in Classes"-->
29
+<!--                         :key="item.id"-->
30
+<!--                         :label="item.name"-->
31
+<!--                         :value="item.id">-->
32
+<!--                        </el-option>-->
33
+<!--                      </el-select>-->
34
+<!--                     </el-col>-->
35
+<!--                  </el-row>-->
36
                   <el-row>
36
                   <el-row>
37
                      <el-col>
37
                      <el-col>
38
                      <span>设备类型:</span>
38
                      <span>设备类型:</span>
62
                       align="center"
62
                       align="center"
63
                       >
63
                       >
64
                       <template slot-scope="scope">
64
                       <template slot-scope="scope">
65
-                         <div @click="handleIndex(scope.$index)">{{scope.row.device_name}}</div> 
65
+                         <div @click="handleIndex(scope.$index)">{{scope.row.device_name}}</div>
66
                       </template>
66
                       </template>
67
                     </el-table-column>
67
                     </el-table-column>
68
                      <el-table-column
68
                      <el-table-column
71
                       width="90"
71
                       width="90"
72
                       align="center">
72
                       align="center">
73
                       <template slot-scope="scope">
73
                       <template slot-scope="scope">
74
-                        <div @click="handleIndex(scope.$index)">{{scope.row.unit_type}}</div> 
74
+                        <div @click="handleIndex(scope.$index)">{{scope.row.device_mode}}</div>
75
                       </template>
75
                       </template>
76
                      </el-table-column>
76
                      </el-table-column>
77
                       <el-table-column
77
                       <el-table-column
152
                              <el-row>
152
                              <el-row>
153
                                <el-col :span="7">
153
                                <el-col :span="7">
154
                                    <el-form-item label="设备型号:" required prop="unit_type">
154
                                    <el-form-item label="设备型号:" required prop="unit_type">
155
-                                       <el-input style="width:150px" v-model="form.unit_type" :disabled="disableThree"></el-input>
155
+                                        <el-select style="width:135px" v-model="form.unit_type" :disabled="disableThree">
156
+                                           <el-option
157
+                                             v-for="item in this.deviceMode"
158
+                                             :key="item.id"
159
+                                             :label="item.device_mode"
160
+                                             :value="item.id"
161
+                                           ></el-option>
162
+                                          </el-select>
156
                                    </el-form-item>
163
                                    </el-form-item>
157
                                </el-col>
164
                                </el-col>
158
                                <el-col :span="7">
165
                                <el-col :span="7">
353
                              <el-row>
360
                              <el-row>
354
                                <el-col :span="7">
361
                                <el-col :span="7">
355
                                    <el-form-item label="设备型号:" required prop="unit_type">
362
                                    <el-form-item label="设备型号:" required prop="unit_type">
356
-                                       <el-input style="width:150px" v-model="form.unit_type" :disabled="disableFour"></el-input>
363
+                                       <el-select style="width:135px" v-model="form.unit_type" :disabled="disableFour">
364
+                                        <el-option
365
+                                            v-for="item in this.deviceMode"
366
+                                            :key="item.id"
367
+                                            :label="item.device_mode"
368
+                                            :value="item.id"
369
+                                             ></el-option>
370
+                                           </el-select>
357
                                    </el-form-item>
371
                                    </el-form-item>
358
                                </el-col>
372
                                </el-col>
359
                                <el-col :span="7">
373
                                <el-col :span="7">
563
                               <el-row>
577
                               <el-row>
564
                                <el-col :span="7">
578
                                <el-col :span="7">
565
                                    <el-form-item label="设备型号:" required prop="unit_type">
579
                                    <el-form-item label="设备型号:" required prop="unit_type">
566
-                                       <el-input style="width:150px" v-model="form.unit_type" :disabled="disableFive"></el-input>
567
-                                   </el-form-item>
568
-                               </el-col>
580
+                                       <el-select style="width:135px" v-model="form.unit_type" :disabled="disableFive">
581
+                                        <el-option
582
+                                            v-for="item in this.deviceMode"
583
+                                            :key="item.id"
584
+                                            :label="item.device_mode"
585
+                                            :value="item.id"
586
+                                             ></el-option>
587
+                                           </el-select>
588
+                                       </el-form-item>
589
+                                    </el-col>
569
                                <el-col :span="7">
590
                                <el-col :span="7">
570
                                   <el-form-item label="使用科室:">
591
                                   <el-form-item label="使用科室:">
571
                                        <el-input style="width:150px" v-model="form.use_section" :disabled="disableFive"></el-input>
592
                                        <el-input style="width:150px" v-model="form.use_section" :disabled="disableFive"></el-input>
779
                                                     {{scope.row.disinfec_time}}
800
                                                     {{scope.row.disinfec_time}}
780
                                                  </template>
801
                                                  </template>
781
                                         </el-table-column>
802
                                         </el-table-column>
782
-                                         <el-table-column label="操作" align="center" min-width="120px">
803
+                                         <el-table-column label="操作" align="center" min-width="130px">
783
                                              <template slot-scope="scope">
804
                                              <template slot-scope="scope">
784
                                                  <el-tooltip class="item" effect="dark" content="编辑" placement="top">
805
                                                  <el-tooltip class="item" effect="dark" content="编辑" placement="top">
785
                                                   <el-button
806
                                                   <el-button
827
                                         <el-table-column align="center" type="selection" width="55"></el-table-column>
848
                                         <el-table-column align="center" type="selection" width="55"></el-table-column>
828
                                         <el-table-column label="型号" align="center" min-width="70px">
849
                                         <el-table-column label="型号" align="center" min-width="70px">
829
                                                 <template slot-scope="scope">
850
                                                 <template slot-scope="scope">
830
-                                                    {{scope.row.equitment_name}}
851
+                                                    {{scope.row.device_mode}}
831
                                                  </template>
852
                                                  </template>
832
                                         </el-table-column>
853
                                         </el-table-column>
833
                                          <el-table-column label="时间" align="center" min-width="70px" >
854
                                          <el-table-column label="时间" align="center" min-width="70px" >
865
                                                     {{scope.row.disinfec_time}}
886
                                                     {{scope.row.disinfec_time}}
866
                                                  </template>
887
                                                  </template>
867
                                         </el-table-column>
888
                                         </el-table-column>
868
-                                         <el-table-column label="操作" align="center" min-width="130px">
889
+                                         <el-table-column label="操作" align="center" width="130px">
869
                                              <template slot-scope="scope">
890
                                              <template slot-scope="scope">
870
                                                  <el-tooltip class="item" effect="dark" content="编辑" placement="top">
891
                                                  <el-tooltip class="item" effect="dark" content="编辑" placement="top">
871
                                                   <el-button
892
                                                   <el-button
910
                              <el-form :model="userform" ref="userform" :rules="userRules">
931
                              <el-form :model="userform" ref="userform" :rules="userRules">
911
                                 <el-row>
932
                                 <el-row>
912
                                   <el-col :span="8">
933
                                   <el-col :span="8">
913
-                                     <el-form-item label="日期:" required prop="date">
934
+                                     <el-form-item label="日期:" required prop="date" class="st">
914
                                          <el-date-picker
935
                                          <el-date-picker
915
                                            v-model="userform.date"
936
                                            v-model="userform.date"
916
                                            prefix-icon="none"
937
                                            prefix-icon="none"
923
                                      </el-form-item>
944
                                      </el-form-item>
924
                                   </el-col>
945
                                   </el-col>
925
                                   <el-col :span="8">
946
                                   <el-col :span="8">
926
-                                     <el-form-item label="班次:" required prop="classtype">
947
+                                     <el-form-item label="班次:" required prop="classtype" class="st">
927
                                        <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
948
                                        <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
928
                                            <el-option
949
                                            <el-option
929
                                             v-for="item in classType"
950
                                             v-for="item in classType"
1251
                                          <el-radio-group v-model="userform.dialysis_concentration">
1272
                                          <el-radio-group v-model="userform.dialysis_concentration">
1252
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
1273
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
1253
                                          </el-radio-group>
1274
                                          </el-radio-group>
1254
-                                      
1275
+
1255
                                       </el-form-item>
1276
                                       </el-form-item>
1256
                                    </el-col>
1277
                                    </el-col>
1257
                                 </el-row>
1278
                                 </el-row>
1315
                                   </div>
1336
                                   </div>
1316
                                 </el-row>
1337
                                 </el-row>
1317
                              </el-form>
1338
                              </el-form>
1318
-                             
1339
+
1319
                           </el-tab-pane>
1340
                           </el-tab-pane>
1320
                            <el-tab-pane label="使用登记列表" name="second">
1341
                            <el-tab-pane label="使用登记列表" name="second">
1321
                              <user-form ref="userForm" :userdata="userdata"></user-form>
1342
                              <user-form ref="userForm" :userdata="userdata"></user-form>
1911
                 <el-option
1932
                 <el-option
1912
                   v-for="item in this.DeviceType"
1933
                   v-for="item in this.DeviceType"
1913
                   :key="item.id"
1934
                   :key="item.id"
1914
-                  :label="item.equitment_name"
1935
+                  :label="item.device_mode"
1915
                   :value="item.id"
1936
                   :value="item.id"
1916
                 ></el-option>
1937
                 ></el-option>
1917
               </el-select>
1938
               </el-select>
2030
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2051
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2031
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2052
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2032
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2053
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2033
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete } from '@/api/manage'
2054
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode } from '@/api/manage'
2034
   import { uParseTime } from '@/utils/tools'
2055
   import { uParseTime } from '@/utils/tools'
2035
   import { getToken } from '@/api/qiniu'
2056
   import { getToken } from '@/api/qiniu'
2036
   import PlanForm from './components/PlanForm'
2057
   import PlanForm from './components/PlanForm'
2157
         bedZone: [],
2178
         bedZone: [],
2158
         bedZoneTwo: [],
2179
         bedZoneTwo: [],
2159
         forms: {
2180
         forms: {
2160
-          zone_id: '', // 分区号
2181
+          zone_id: 0, // 分区号
2161
           class_id: '', // 班次
2182
           class_id: '', // 班次
2162
-          device_type: '', // 设备类型
2183
+          device_type: 0, // 设备类型
2163
           date: ''
2184
           date: ''
2164
         },
2185
         },
2165
         currentRow: null,
2186
         currentRow: null,
2474
           code_information: '',
2495
           code_information: '',
2475
           imageName: ''
2496
           imageName: ''
2476
         },
2497
         },
2498
+
2477
         filename: '',
2499
         filename: '',
2478
         qiniuDomain: 'https://images.shengws.com/',
2500
         qiniuDomain: 'https://images.shengws.com/',
2479
         uploadFileData: { token: '', key: '' },
2501
         uploadFileData: { token: '', key: '' },
2505
           { id: 1, name: '单级反渗' },
2527
           { id: 1, name: '单级反渗' },
2506
           { id: 2, name: '双级反渗' }
2528
           { id: 2, name: '双级反渗' }
2507
         ],
2529
         ],
2508
-        tabIndex: ''
2530
+        tabIndex: '',
2531
+        deviceMode: [],
2532
+        zoneDisabled: false,
2533
+        bedid: '',
2534
+        unitType: ''
2509
       }
2535
       }
2510
     },
2536
     },
2511
     methods: {
2537
     methods: {
2581
           this.bedZoneTwo = zones
2607
           this.bedZoneTwo = zones
2582
           this.bedZoneThree = zoness
2608
           this.bedZoneThree = zoness
2583
           this.bedNumber = numbers
2609
           this.bedNumber = numbers
2584
-  
2610
+
2585
           // this.Number = devicenumber
2611
           // this.Number = devicenumber
2586
         })
2612
         })
2587
       },
2613
       },
2595
         this.getAllMachine()
2621
         this.getAllMachine()
2596
       },
2622
       },
2597
       changeDeviceId(val) {
2623
       changeDeviceId(val) {
2624
+        if (val === 1) {
2625
+          this.zoneDisabled = false
2626
+        } else {
2627
+          this.zoneDisabled = true
2628
+        }
2598
         this.forms.device_type = val
2629
         this.forms.device_type = val
2599
         this.getAllMachine()
2630
         this.getAllMachine()
2600
       },
2631
       },
2601
       getAllMachine() {
2632
       getAllMachine() {
2602
-        getAllMachine(this.forms.zone_id, this.forms.class_id, this.forms.device_type).then(response => {
2633
+        getAllMachine(this.forms.zone_id, this.forms.device_type).then(response => {
2603
           if (response.data.state === 1) {
2634
           if (response.data.state === 1) {
2604
             var addmahcer = response.data.data.addmahcer
2635
             var addmahcer = response.data.data.addmahcer
2636
+            console.log('addmacher是', addmahcer)
2605
             this.tableDatatwo = addmahcer
2637
             this.tableDatatwo = addmahcer
2606
             this.tabIndex = this.$route.query.index
2638
             this.tabIndex = this.$route.query.index
2607
             this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2639
             this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2612
         this.tabIndex = index
2644
         this.tabIndex = index
2613
       },
2645
       },
2614
       handleCurrentChange(val) {
2646
       handleCurrentChange(val) {
2647
+        this.unitType = val.unit_type
2615
         // console.log('val是什么', val)
2648
         // console.log('val是什么', val)
2616
         this.currentRow = val
2649
         this.currentRow = val
2617
         this.$forceUpdate()
2650
         this.$forceUpdate()
2618
         this.getMachineDetailById(val.id)
2651
         this.getMachineDetailById(val.id)
2619
         this.equimentid = val.id
2652
         this.equimentid = val.id
2620
         this.userdata = val.id
2653
         this.userdata = val.id
2621
-        this.getAllPlanDetail(val.unit_type)
2654
+        this.getAllPlanDetail(val.unit_type, val.bed_id)
2622
         this.getPatientInfo(val.id)
2655
         this.getPatientInfo(val.id)
2623
         // 获取基本信息
2656
         // 获取基本信息
2624
         this.getUserRegister(val.id)
2657
         this.getUserRegister(val.id)
2638
         getMachineDetailById(id).then(response => {
2671
         getMachineDetailById(id).then(response => {
2639
           if (response.data.state === 1) {
2672
           if (response.data.state === 1) {
2640
             var addmacher = response.data.data.addmacher
2673
             var addmacher = response.data.data.addmacher
2641
-            // console.log('addmacher', addmacher)
2674
+            console.log('设备详情', addmacher)
2642
             var warning = response.data.data.warning
2675
             var warning = response.data.data.warning
2643
             // console.log('warning', warning)
2676
             // console.log('warning', warning)
2644
             var time = this.getTimestamp(this.userform.date) - warning.stime
2677
             var time = this.getTimestamp(this.userform.date) - warning.stime
2774
             this.form.device_name = addmacher.device_name
2807
             this.form.device_name = addmacher.device_name
2775
             this.form.manufacture_factory = addmacher.manufacture_factory
2808
             this.form.manufacture_factory = addmacher.manufacture_factory
2776
             this.form.service_manufacturer = addmacher.service_manufacturer
2809
             this.form.service_manufacturer = addmacher.service_manufacturer
2777
-            this.form.unit_type = addmacher.unit_type
2810
+
2811
+            // this.form.unit_type = addmacher.unit_type
2812
+  
2813
+            this.form.unit_type = parseInt(addmacher.device_mode)
2778
             this.form.use_section = addmacher.use_section
2814
             this.form.use_section = addmacher.use_section
2779
             this.form.section_number = addmacher.section_number
2815
             this.form.section_number = addmacher.section_number
2780
             if (addmacher.buy_date !== 0) {
2816
             if (addmacher.buy_date !== 0) {
2801
             this.form.rubbish_reason = addmacher.rubbish_reason
2837
             this.form.rubbish_reason = addmacher.rubbish_reason
2802
             this.form.user_year = addmacher.user_year
2838
             this.form.user_year = addmacher.user_year
2803
             this.form.work_time = addmacher.work_time
2839
             this.form.work_time = addmacher.work_time
2804
-  
2840
+
2805
             // eslint-disable-next-line eqeqeq
2841
             // eslint-disable-next-line eqeqeq
2806
             if (addmacher.disinfection_mode == 0) {
2842
             if (addmacher.disinfection_mode == 0) {
2807
               this.form.Disinfection_mode = 0
2843
               this.form.Disinfection_mode = 0
2932
         var machine_status = this.form.machine_status
2968
         var machine_status = this.form.machine_status
2933
         var machine_statuss = parseInt(machine_status)
2969
         var machine_statuss = parseInt(machine_status)
2934
         this.form.machine_status = machine_statuss
2970
         this.form.machine_status = machine_statuss
2935
-  
2971
+
2936
         var revers_mode = this.form.revers_mode
2972
         var revers_mode = this.form.revers_mode
2937
         var revers_modes = parseInt(revers_mode)
2973
         var revers_modes = parseInt(revers_mode)
2938
         this.form.revers_mode = revers_modes
2974
         this.form.revers_mode = revers_modes
2940
         var disinfecction_modes = this.form.Disinfection_mode
2976
         var disinfecction_modes = this.form.Disinfection_mode
2941
         var disinfecction_modess = parseInt(disinfecction_modes)
2977
         var disinfecction_modess = parseInt(disinfecction_modes)
2942
         this.form.Disinfection_mode = disinfecction_modess
2978
         this.form.Disinfection_mode = disinfecction_modess
2943
-  
2979
+
2944
         this.$refs[formName].validate(valid => {
2980
         this.$refs[formName].validate(valid => {
2945
           if (valid) {
2981
           if (valid) {
2946
             UpdateMachineInfoTwo(this.form).then(response => {
2982
             UpdateMachineInfoTwo(this.form).then(response => {
2971
         var machine_status = this.form.machine_status
3007
         var machine_status = this.form.machine_status
2972
         var machine_statuss = parseInt(machine_status)
3008
         var machine_statuss = parseInt(machine_status)
2973
         this.form.machine_status = machine_statuss
3009
         this.form.machine_status = machine_statuss
2974
-  
3010
+
2975
         this.$refs[formName].validate(valid => {
3011
         this.$refs[formName].validate(valid => {
2976
           UpdateMacheineTwo(this.form).then(response => {
3012
           UpdateMacheineTwo(this.form).then(response => {
2977
             if (response.data.state === 1) {
3013
             if (response.data.state === 1) {
3034
           this.form.rubbish_reason = ''
3070
           this.form.rubbish_reason = ''
3035
         }
3071
         }
3036
       },
3072
       },
3037
-      getAllPlan() {
3038
-        getAllPlan().then(response => {
3073
+      getAllPlan(bedid) {
3074
+        getAllPlan(bedid).then(response => {
3039
           if (response.data.state === 1) {
3075
           if (response.data.state === 1) {
3040
             var plan = response.data.data.plan
3076
             var plan = response.data.data.plan
3041
-  
3077
+
3042
             for (let index = 0; index < plan.length; index++) {
3078
             for (let index = 0; index < plan.length; index++) {
3043
               if (plan[index].time === 1) {
3079
               if (plan[index].time === 1) {
3044
                 plan[index].time = '周一'
3080
                 plan[index].time = '周一'
3168
           }
3204
           }
3169
         })
3205
         })
3170
       },
3206
       },
3171
-      getAllPlanDetail(unit_type) {
3172
-        getAllPlanDetail(unit_type).then(response => {
3207
+      getAllPlanDetail(unit_type, bedid) {
3208
+        getAllPlanDetail(unit_type, bedid).then(response => {
3173
           if (response.data.state === 1) {
3209
           if (response.data.state === 1) {
3174
             var plandetail = response.data.data.plandetail
3210
             var plandetail = response.data.data.plandetail
3175
-            // console.log('plandetail=====================', plandetail)
3211
+            console.log('plandetail', plandetail)
3176
             for (let index = 0; index < plandetail.length; index++) {
3212
             for (let index = 0; index < plandetail.length; index++) {
3177
               if (plandetail[index].time === 1) {
3213
               if (plandetail[index].time === 1) {
3178
                 plandetail[index].time = '周一'
3214
                 plandetail[index].time = '周一'
3316
             this.machineform.machine_disinfectant = plan.machine_disinfectant
3352
             this.machineform.machine_disinfectant = plan.machine_disinfectant
3317
             this.machineform.disinfectant_way = plan.disinfectan_way
3353
             this.machineform.disinfectant_way = plan.disinfectan_way
3318
             this.machineform.disinfectant = plan.disinfectant
3354
             this.machineform.disinfectant = plan.disinfectant
3355
+            this.getPatientDetail(this.unitType, this.$route.query.bedid)
3319
           }
3356
           }
3320
         })
3357
         })
3321
       },
3358
       },
3352
         var disinfectant = parseInt(disinfectants)
3389
         var disinfectant = parseInt(disinfectants)
3353
         this.machineform.disinfectant = disinfectant
3390
         this.machineform.disinfectant = disinfectant
3354
         UpdatePlanInfo(this.machineform).then(response => {
3391
         UpdatePlanInfo(this.machineform).then(response => {
3355
-          if (response.data.state == 1) {
3392
+          if (response.data.state === 1) {
3356
             var plan = response.data.data.plan
3393
             var plan = response.data.data.plan
3357
             this.dialogVisible = false
3394
             this.dialogVisible = false
3358
             this.$message.success('修改成功')
3395
             this.$message.success('修改成功')
3359
-            this.getAllPlanDetail(this.equimentid)
3360
-            this.getAllPlan()
3396
+            this.getAllPlanDetail(this.unitType, this.$route.query.bedid)
3397
+            this.getAllPlan(this.$route.query.bedid)
3361
           }
3398
           }
3362
         })
3399
         })
3363
       },
3400
       },
3512
         ChangeClass(this.equimentid, id).then(response => {
3549
         ChangeClass(this.equimentid, id).then(response => {
3513
           if (response.data.state === 1) {
3550
           if (response.data.state === 1) {
3514
             var patients = response.data.data.patients
3551
             var patients = response.data.data.patients
3515
-  
3552
+
3516
             if (patients.is_infectious === 0) {
3553
             if (patients.is_infectious === 0) {
3517
               this.userform.contagion = ''
3554
               this.userform.contagion = ''
3518
             }
3555
             }
3659
         var hyperfiltratio = this.userform.hyperfiltratio
3696
         var hyperfiltratio = this.userform.hyperfiltratio
3660
         var hyperfiltratios = parseInt(hyperfiltratio)
3697
         var hyperfiltratios = parseInt(hyperfiltratio)
3661
         this.userform.hyperfiltratio = hyperfiltratios
3698
         this.userform.hyperfiltratio = hyperfiltratios
3662
-  
3699
+
3663
         if (this.userform.weight_loss === '') {
3700
         if (this.userform.weight_loss === '') {
3664
           this.userform.weight_loss = 0
3701
           this.userform.weight_loss = 0
3665
         }
3702
         }
3666
         var weightloss = this.userform.weight_loss
3703
         var weightloss = this.userform.weight_loss
3667
         var weidht = parseInt(weightloss)
3704
         var weidht = parseInt(weightloss)
3668
         this.userform.weight_loss = weidht
3705
         this.userform.weight_loss = weidht
3669
-  
3706
+
3670
         if (this.userform.user_total === '0') {
3707
         if (this.userform.user_total === '0') {
3671
           this.userform.user_total = 0
3708
           this.userform.user_total = 0
3672
         }
3709
         }
3727
         getUserRegister(id).then(response => {
3764
         getUserRegister(id).then(response => {
3728
           if (response.data.state === 1) {
3765
           if (response.data.state === 1) {
3729
             var information = response.data.data.information
3766
             var information = response.data.data.information
3730
-            // console.log('使用登记', information)
3767
+            console.log('使用登记', information)
3731
             // eslint-disable-next-line no-unused-vars
3768
             // eslint-disable-next-line no-unused-vars
3732
             var role = response.data.data.role
3769
             var role = response.data.data.role
3733
             // console.log('role', role)
3770
             // console.log('role', role)
3734
             // eslint-disable-next-line eqeqeq
3771
             // eslint-disable-next-line eqeqeq
3735
             var dislysis = response.data.data.dislysis
3772
             var dislysis = response.data.data.dislysis
3736
-  
3773
+
3737
             this.userform.id = information.id
3774
             this.userform.id = information.id
3738
-            if (information.date == 0) {
3775
+            if (information.date === 0) {
3739
               this.userform.date = moment(new Date()).format('YYYY-MM-DD')
3776
               this.userform.date = moment(new Date()).format('YYYY-MM-DD')
3740
             } else {
3777
             } else {
3741
               this.userform.date = uParseTime(information.date, '{y}-{m}-{d}')
3778
               this.userform.date = uParseTime(information.date, '{y}-{m}-{d}')
3796
             this.userform.dialysis_name = information.dialysis_name
3833
             this.userform.dialysis_name = information.dialysis_name
3797
             this.userform.norms = information.norms
3834
             this.userform.norms = information.norms
3798
             this.userform.dialysis_concentration = information.dialysis_concentration
3835
             this.userform.dialysis_concentration = information.dialysis_concentration
3799
-  
3836
+
3800
             if (information.germ_checked === 0) {
3837
             if (information.germ_checked === 0) {
3801
               this.userform.germ_checked = false
3838
               this.userform.germ_checked = false
3802
             }
3839
             }
3808
             if (information.germ_checked === 1) {
3845
             if (information.germ_checked === 1) {
3809
               this.userform.germ_checked = true
3846
               this.userform.germ_checked = true
3810
             }
3847
             }
3811
-  
3848
+
3812
             this.userform.germ_name = information.germ_name
3849
             this.userform.germ_name = information.germ_name
3813
             this.userform.germ_number = information.germ_number
3850
             this.userform.germ_number = information.germ_number
3814
             if (information.clean === 1) {
3851
             if (information.clean === 1) {
4136
       getAllEquitType() {
4173
       getAllEquitType() {
4137
         getAllEquitType().then(response => {
4174
         getAllEquitType().then(response => {
4138
           if (response.data.state === 1) {
4175
           if (response.data.state === 1) {
4139
-            var equitname = response.data.data.equitname
4176
+            var equitname = response.data.data.mode
4140
             this.DeviceType = equitname
4177
             this.DeviceType = equitname
4141
           }
4178
           }
4142
         })
4179
         })
4158
         getAllpatient().then(response => {
4195
         getAllpatient().then(response => {
4159
           if (response.data.state === 1) {
4196
           if (response.data.state === 1) {
4160
             var allpatient = response.data.data.allpatient
4197
             var allpatient = response.data.data.allpatient
4161
-  
4198
+
4162
             this.patientName = allpatient
4199
             this.patientName = allpatient
4163
           }
4200
           }
4164
         })
4201
         })
4167
         getTimeWarning(id).then(response => {
4204
         getTimeWarning(id).then(response => {
4168
           if (response.data.state === 1) {
4205
           if (response.data.state === 1) {
4169
             var information = response.data.data.informations
4206
             var information = response.data.data.informations
4170
-            console.log('码字', information)
4171
-            console.log('当前时间', this.getTimestamp(this.userform.date))
4172
-            console.log('存入时间', information.stime)
4207
+            // console.log('码字', information)
4208
+            // console.log('当前时间', this.getTimestamp(this.userform.date))
4209
+            // console.log('存入时间', information.stime)
4173
             var time = this.getTimestamp(this.userform.date) - information.stime
4210
             var time = this.getTimestamp(this.userform.date) - information.stime
4174
             console.log('时间', time)
4211
             console.log('时间', time)
4175
             // if (time < 2678400) {
4212
             // if (time < 2678400) {
4181
             // if (timetwo < 2678400) {
4218
             // if (timetwo < 2678400) {
4182
             //  this.warnShowTwo = false
4219
             //  this.warnShowTwo = false
4183
             // }
4220
             // }
4184
-  
4221
+
4185
             var clean = response.data.data.clean
4222
             var clean = response.data.data.clean
4186
             // var timethree = this.getTimestamp(this.userform.date) - clean.stime
4223
             // var timethree = this.getTimestamp(this.userform.date) - clean.stime
4187
             // if (timethree < 2678400) {
4224
             // if (timethree < 2678400) {
4198
       // 通过自组建传值改变表格数据
4235
       // 通过自组建传值改变表格数据
4199
       getPlanData(data) {
4236
       getPlanData(data) {
4200
         if (data === 1) {
4237
         if (data === 1) {
4201
-          this.getAllPlanDetail(this.equimentid)
4238
+          this.getAllPlanDetail(this.unitType, this.$route.query.bedid)
4202
         }
4239
         }
4240
+      },
4241
+      getAllMode() {
4242
+        getAllMode().then(response => {
4243
+          var mode = response.data.data.mode
4244
+          this.deviceMode = mode
4245
+        })
4203
       }
4246
       }
4204
     },
4247
     },
4205
     created() {
4248
     created() {
4206
       this.getAllSubregion()
4249
       this.getAllSubregion()
4207
       this.getAllMachine()
4250
       this.getAllMachine()
4208
       var index = this.$route.query.index
4251
       var index = this.$route.query.index
4252
+      var bedid = this.$route.query.bedid
4209
       // var id = this.$route.query.id
4253
       // var id = this.$route.query.id
4210
       // this.equimentid = id
4254
       // this.equimentid = id
4211
-      this.getAllPlan()
4255
+      this.bedid = bedid
4256
+      this.getAllPlan(bedid)
4212
       this.getAllEquimentName()
4257
       this.getAllEquimentName()
4213
       this.getAllOrganization()
4258
       this.getAllOrganization()
4214
       this.getOrgName()
4259
       this.getOrgName()
4215
       this.getAllEquitType()
4260
       this.getAllEquitType()
4216
       this.getAllpatient()
4261
       this.getAllpatient()
4217
-    }
4262
+      this.getAllMode()
4263
+  }
4218
   }
4264
   }
4219
 </script>
4265
 </script>
4220
 <style lang="scss" scoped>
4266
 <style lang="scss" scoped>
4250
       width: 460px;
4296
       width: 460px;
4251
       height: 50px;
4297
       height: 50px;
4252
       // border:solid 1px red;
4298
       // border:solid 1px red;
4253
-      margin-left:780px;
4299
+      margin-left:650px;
4254
     }
4300
     }
4255
 
4301
 
4256
   .zClass{
4302
   .zClass{
4280
 
4326
 
4281
    .b{
4327
    .b{
4282
     .el-button{
4328
     .el-button{
4283
-      margin-left: 850px;
4329
+      margin-left: 820px;
4284
       margin-bottom: 10px;
4330
       margin-bottom: 10px;
4285
     }
4331
     }
4286
    }
4332
    }
4290
        width:190px;
4336
        width:190px;
4291
      }
4337
      }
4292
    }
4338
    }
4339
+   .st{
4340
+     .el-form-item__label{
4341
+       width:-10px;
4342
+     }
4343
+   }
4293
    .main{
4344
    .main{
4294
      position: relative;
4345
      position: relative;
4295
      .newButtonOne{
4346
      .newButtonOne{
4303
       // border: solid 1px red;
4354
       // border: solid 1px red;
4304
       height: 50px;
4355
       height: 50px;
4305
       width: 400px;
4356
       width: 400px;
4306
-      margin-left: 750px;
4357
+      margin-left: 650px;
4307
     }
4358
     }
4308
   // .el-form-item__label {
4359
   // .el-form-item__label {
4309
   //   width: 130px;
4360
   //   width: 130px;

+ 64 - 62
src/xt_pages/management/index.vue View File

101
           <template slot-scope="scope">{{ scope.row.device_name }}</template>
101
           <template slot-scope="scope">{{ scope.row.device_name }}</template>
102
         </el-table-column>
102
         </el-table-column>
103
         <el-table-column label="设备型号" align="center">
103
         <el-table-column label="设备型号" align="center">
104
-          <template slot-scope="scope">{{ scope.row.unit_type }}</template>
104
+          <template slot-scope="scope">{{ scope.row.device_mode }}</template>
105
         </el-table-column>
105
         </el-table-column>
106
 
106
 
107
         <el-table-column label="分区" align="center">
107
         <el-table-column label="分区" align="center">
123
         <el-table-column label="操作" align="center">
123
         <el-table-column label="操作" align="center">
124
           <template slot-scope="scope">
124
           <template slot-scope="scope">
125
             <el-button
125
             <el-button
126
-              @click="handleClick(scope.row.id, scope.$index)"
126
+              @click="handleClick(scope.row.id, scope.$index, scope.row.bed_id)"
127
               type="text"
127
               type="text"
128
               size="small"
128
               size="small"
129
               >查看
129
               >查看
152
 </template>
152
 </template>
153
 
153
 
154
 <script>
154
 <script>
155
-import BreadCrumb from "../components/bread-crumb";
156
-import { getAllMachineInfo, getAllSubregion } from "@/api/manage";
157
-import ManageForm from "./components/ManageForm";
155
+import BreadCrumb from '../components/bread-crumb'
156
+import { getAllMachineInfo, getAllSubregion } from '@/api/manage'
157
+import ManageForm from './components/ManageForm'
158
 
158
 
159
 export default {
159
 export default {
160
-  name: "index.vue",
160
+  name: 'index.vue',
161
   components: {
161
   components: {
162
     BreadCrumb,
162
     BreadCrumb,
163
     ManageForm
163
     ManageForm
165
   data() {
165
   data() {
166
     return {
166
     return {
167
       crumbs: [
167
       crumbs: [
168
-        { path: false, name: "设备管理" },
169
-        { path: false, name: "设备管理" }
168
+        { path: false, name: '设备管理' },
169
+        { path: false, name: '设备管理' }
170
       ],
170
       ],
171
-      searchKey: "",
172
-      zones: [{ id: 0, name: "全部" }],
171
+      searchKey: '',
172
+      zones: [{ id: 0, name: '全部' }],
173
       schedulType: 0,
173
       schedulType: 0,
174
       schedulTypeone: 0,
174
       schedulTypeone: 0,
175
       schedulTypetwo: 0,
175
       schedulTypetwo: 0,
176
       DeviceType: [
176
       DeviceType: [
177
-        { id: 0, name: "全部" },
178
-        { id: 1, name: "透析机" },
179
-        { id: 2, name: "水处理机" },
180
-        { id: 3, name: "其他" }
177
+        { id: 0, name: '全部' },
178
+        { id: 1, name: '透析机' },
179
+        { id: 2, name: '水处理机' },
180
+        { id: 3, name: '其他' }
181
       ],
181
       ],
182
 
182
 
183
       AllStatus: [
183
       AllStatus: [
184
-        { id: 0, name: "全部" },
185
-        { id: 1, name: "使用机" },
186
-        { id: 2, name: "备用机" },
187
-        { id: 3, name: "急诊机" },
188
-        { id: 4, name: "报废机" }
184
+        { id: 0, name: '全部' },
185
+        { id: 1, name: '使用机' },
186
+        { id: 2, name: '备用机' },
187
+        { id: 3, name: '急诊机' },
188
+        { id: 4, name: '报废机' }
189
       ],
189
       ],
190
       tableData: [],
190
       tableData: [],
191
       listQuery: {
191
       listQuery: {
192
         page: 1,
192
         page: 1,
193
         limit: 10,
193
         limit: 10,
194
-        searchKey: "",
195
-        zoneid: "",
196
-        equipmentid: "",
197
-        statusid: ""
194
+        searchKey: '',
195
+        zoneid: '',
196
+        equipmentid: '',
197
+        statusid: ''
198
       },
198
       },
199
       total: 0
199
       total: 0
200
-    };
200
+    }
201
   },
201
   },
202
   methods: {
202
   methods: {
203
     getAllSubregion() {
203
     getAllSubregion() {
204
       getAllSubregion().then(response => {
204
       getAllSubregion().then(response => {
205
         if (response.data.state === 1) {
205
         if (response.data.state === 1) {
206
-          var zone = response.data.data.zones;
207
-          var zones = [{ id: 0, name: "全部" }];
206
+          var zone = response.data.data.zones
207
+          var zones = [{ id: 0, name: '全部' }]
208
           for (let i = 0; i < zone.length; i++) {
208
           for (let i = 0; i < zone.length; i++) {
209
-            const item = zone[i];
210
-            zones.push({ id: item.id, name: item.name });
209
+            const item = zone[i]
210
+            zones.push({ id: item.id, name: item.name })
211
           }
211
           }
212
           // console.log('zones', zones)
212
           // console.log('zones', zones)
213
-          this.zones = zones;
213
+          this.zones = zones
214
         }
214
         }
215
-      });
215
+      })
216
     },
216
     },
217
     selectSchedulType(scheduleType) {
217
     selectSchedulType(scheduleType) {
218
-      this.schedulType = scheduleType;
219
-      this.listQuery.zoneid = scheduleType;
220
-      this.getAllMachineInfo();
218
+      this.schedulType = scheduleType
219
+      this.listQuery.zoneid = scheduleType
220
+      this.getAllMachineInfo()
221
     },
221
     },
222
     selectSchedulTypeOne(scheduleType) {
222
     selectSchedulTypeOne(scheduleType) {
223
-      this.schedulTypeone = scheduleType;
224
-      this.listQuery.equipmentid = scheduleType;
225
-      this.getAllMachineInfo();
223
+      this.schedulTypeone = scheduleType
224
+      this.listQuery.equipmentid = scheduleType
225
+      this.getAllMachineInfo()
226
     },
226
     },
227
     selectSchedulTypeTwo(scheduleType) {
227
     selectSchedulTypeTwo(scheduleType) {
228
-      this.schedulTypetwo = scheduleType;
229
-      this.listQuery.statusid = scheduleType;
230
-      this.getAllMachineInfo();
228
+      this.schedulTypetwo = scheduleType
229
+      this.listQuery.statusid = scheduleType
230
+      this.getAllMachineInfo()
231
     },
231
     },
232
     seahcerMacherInfo() {
232
     seahcerMacherInfo() {
233
-      this.getAllMachineInfo();
233
+      this.getAllMachineInfo()
234
     },
234
     },
235
     AddManage() {
235
     AddManage() {
236
-      this.$refs.manageForm.open();
236
+      this.$refs.manageForm.open()
237
     },
237
     },
238
     getAllMachineInfo() {
238
     getAllMachineInfo() {
239
       getAllMachineInfo(
239
       getAllMachineInfo(
245
         this.listQuery.statusid
245
         this.listQuery.statusid
246
       ).then(response => {
246
       ).then(response => {
247
         if (response.data.state === 1) {
247
         if (response.data.state === 1) {
248
-          var addmahcer = response.data.data.addmahcer;
248
+          var addmahcer = response.data.data.addmahcer
249
           for (let index = 0; index < addmahcer.length; index++) {
249
           for (let index = 0; index < addmahcer.length; index++) {
250
             if (addmahcer[index].device_type === 1) {
250
             if (addmahcer[index].device_type === 1) {
251
-              addmahcer[index].device_type = "透析机";
251
+              addmahcer[index].device_type = '透析机'
252
             }
252
             }
253
             if (addmahcer[index].device_type === 2) {
253
             if (addmahcer[index].device_type === 2) {
254
-              addmahcer[index].device_type = "水处理机";
254
+              addmahcer[index].device_type = '水处理机'
255
             }
255
             }
256
 
256
 
257
             if (addmahcer[index].device_type === 3) {
257
             if (addmahcer[index].device_type === 3) {
258
-              addmahcer[index].device_type = "其他";
258
+              addmahcer[index].device_type = '其他'
259
             }
259
             }
260
 
260
 
261
             if (addmahcer[index].machine_status === 1) {
261
             if (addmahcer[index].machine_status === 1) {
262
-              addmahcer[index].machine_status = "使用机";
262
+              addmahcer[index].machine_status = '使用机'
263
             }
263
             }
264
             if (addmahcer[index].machine_status === 2) {
264
             if (addmahcer[index].machine_status === 2) {
265
-              addmahcer[index].machine_status = "备用机";
265
+              addmahcer[index].machine_status = '备用机'
266
             }
266
             }
267
             if (addmahcer[index].machine_status === 3) {
267
             if (addmahcer[index].machine_status === 3) {
268
-              addmahcer[index].machine_status = "急诊机";
268
+              addmahcer[index].machine_status = '急诊机'
269
             }
269
             }
270
             if (addmahcer[index].machine_status === 4) {
270
             if (addmahcer[index].machine_status === 4) {
271
-              addmahcer[index].machine_status = "报废机";
271
+              addmahcer[index].machine_status = '报废机'
272
             }
272
             }
273
           }
273
           }
274
-          this.tableData = addmahcer;
274
+          this.tableData = addmahcer
275
           // console.log('addmacher', addmahcer)
275
           // console.log('addmacher', addmahcer)
276
-          var total = response.data.data.total;
276
+          var total = response.data.data.total
277
           // console.log('total', total)
277
           // console.log('total', total)
278
-          this.total = total;
278
+          this.total = total
279
         }
279
         }
280
-      });
280
+      })
281
     },
281
     },
282
     handleSizeChange(limit) {
282
     handleSizeChange(limit) {
283
-      this.listQuery.limit = limit;
284
-      this.getAllMachineInfo();
283
+      this.listQuery.limit = limit
284
+      this.getAllMachineInfo()
285
     },
285
     },
286
     handleCurrentChange(page) {
286
     handleCurrentChange(page) {
287
-      this.listQuery.page = page;
288
-      this.getAllMachineInfo();
287
+      this.listQuery.page = page
288
+      this.getAllMachineInfo()
289
     },
289
     },
290
-    handleClick(id, index) {
291
-      this.$router.push({ path: '/device/home?index=' + index })
290
+    handleClick(id, index, bedid) {
291
+      this.$router.push({
292
+        path: '/device/home?index=' + index + '&' + 'bedid=' + bedid + '&' + 'id=' + id
293
+      })
292
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
294
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
293
     }
295
     }
294
   },
296
   },
295
   created() {
297
   created() {
296
     // 获取所有的分区
298
     // 获取所有的分区
297
-    this.getAllSubregion();
298
-    this.getAllMachineInfo();
299
+    this.getAllSubregion()
300
+    this.getAllMachineInfo()
299
   }
301
   }
300
-};
302
+}
301
 </script>
303
 </script>
302
 
304
 
303
 <style scoped></style>
305
 <style scoped></style>

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


File diff suppressed because it is too large
+ 1551 - 1095
src/xt_pages/workforce/components/tableData.vue