XMLWAN преди 4 години
родител
ревизия
9ca00ce7d9

+ 271 - 245
src/api/manage.js Целия файл

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

+ 70 - 70
src/xt_pages/management/components/MultipleForm.vue Целия файл

@@ -184,7 +184,7 @@
184 184
             width="100"
185 185
             align="center"
186 186
           >
187
-            <template slot-scope="scope">{{ scope.row.unit_type }}</template>
187
+            <template slot-scope="scope">{{ scope.row.device_mode }}</template>
188 188
           </el-table-column>
189 189
           <el-table-column
190 190
             prop="address"
@@ -287,10 +287,10 @@ import {
287 287
   getAllEquimentName,
288 288
   getComprehensive,
289 289
   getTotalCount
290
-} from "@/api/manage";
291
-import { uParseTime } from "@/utils/tools";
290
+} from '@/api/manage'
291
+import { uParseTime } from '@/utils/tools'
292 292
 export default {
293
-  name: "MultipleForm",
293
+  name: 'MultipleForm',
294 294
   props: {
295 295
     equimentid: Number
296 296
   },
@@ -300,77 +300,77 @@ export default {
300 300
       failure: 0,
301 301
       dialogVisible: false,
302 302
       form: {
303
-        zone: "",
304
-        device_number: "",
305
-        device_type: "",
306
-        device_model: "",
307
-        user_year: "",
308
-        start_time: "",
309
-        end_time: ""
303
+        zone: '',
304
+        device_number: '',
305
+        device_type: '',
306
+        device_model: '',
307
+        user_year: '',
308
+        start_time: '',
309
+        end_time: ''
310 310
       },
311 311
       userYear: [
312
-        { id: 0, name: "全部" },
313
-        { id: 1, name: "0~1" },
314
-        { id: 2, name: "1~3" },
315
-        { id: 3, name: "3~10" },
316
-        { id: 4, name: "10年以上" }
312
+        { id: 0, name: '全部' },
313
+        { id: 1, name: '0~1' },
314
+        { id: 2, name: '1~3' },
315
+        { id: 3, name: '3~10' },
316
+        { id: 4, name: '10年以上' }
317 317
       ],
318
-      value1: "",
319
-      value2: "",
318
+      value1: '',
319
+      value2: '',
320 320
       tableData: [],
321 321
       EquitmentType: [
322
-        { id: 0, name: "全部" },
323
-        { id: 1, name: "透析机" },
324
-        { id: 2, name: "水处理机" },
325
-        { id: 3, name: "报废机" },
326
-        { id: 4, name: "其他" }
322
+        { id: 0, name: '全部' },
323
+        { id: 1, name: '透析机' },
324
+        { id: 2, name: '水处理机' },
325
+        { id: 3, name: '报废机' },
326
+        { id: 4, name: '其他' }
327 327
       ],
328
-      DeviceType: [{ id: 0, name: "不限" }],
329
-      Numbers: [{ id: 0, number: "不限" }],
330
-      EquitmentName: [{ id: 0, equitment_name: "全部" }],
328
+      DeviceType: [{ id: 0, name: '不限' }],
329
+      Numbers: [{ id: 0, number: '不限' }],
330
+      EquitmentName: [{ id: 0, equitment_name: '全部' }],
331 331
       runOptions: [
332
-        { value: "1", label: "正常" },
333
-        { value: "2", label: "故障" }
332
+        { value: '1', label: '正常' },
333
+        { value: '2', label: '故障' }
334 334
       ]
335
-    };
335
+    }
336 336
   },
337 337
   methods: {
338 338
     open: function() {
339
-      this.dialogVisible = true;
339
+      this.dialogVisible = true
340 340
     },
341 341
     getAllSubregion() {
342 342
       getAllSubregion().then(response => {
343 343
         if (response.data.state === 1) {
344
-          var zone = response.data.data.zones;
345
-          var zones = [{ id: 0, name: "不限" }];
344
+          var zone = response.data.data.zones
345
+          var zones = [{ id: 0, name: '不限' }]
346 346
           for (let i = 0; i < zone.length; i++) {
347
-            const item = zone[i];
348
-            zones.push({ id: item.id, name: item.name });
347
+            const item = zone[i]
348
+            zones.push({ id: item.id, name: item.name })
349 349
           }
350
-          this.DeviceType = zones;
351
-          var number = response.data.data.numbers;
352
-          var numbers = [{ id: 0, number: "不限" }];
350
+          this.DeviceType = zones
351
+          var number = response.data.data.numbers
352
+          var numbers = [{ id: 0, number: '不限' }]
353 353
           for (let index = 0; index < number.length; index++) {
354
-            const item = number[index];
355
-            numbers.push({ id: item.id, number: item.number });
354
+            const item = number[index]
355
+            numbers.push({ id: item.id, number: item.number })
356 356
           }
357
-          this.Numbers = numbers;
357
+          this.Numbers = numbers
358 358
           // console.log('numbers', number)
359 359
         }
360
-      });
360
+      })
361 361
     },
362 362
     getAllEquimentName() {
363 363
       getAllEquimentName().then(response => {
364 364
         if (response.data.state == 1) {
365
-          var equit = response.data.data.equit;
366
-          var equits = [{ id: 0, equitment_name: "全部" }];
365
+          var equit = response.data.data.equit
366
+          var equits = [{ id: 0, equitment_name: '全部' }]
367 367
           for (let index = 0; index < equit.length; index++) {
368
-            const item = equit[index];
369
-            equits.push({ id: item.id, equitment_name: item.equitment_name });
368
+            const item = equit[index]
369
+            equits.push({ id: item.id, equitment_name: item.equitment_name })
370 370
           }
371
-          this.EquitmentName = equits;
371
+          this.EquitmentName = equits
372 372
         }
373
-      });
373
+      })
374 374
     },
375 375
     getComprehensive() {
376 376
       const params = {
@@ -380,66 +380,66 @@ export default {
380 380
         year: this.form.user_year,
381 381
         starttime: this.form.start_time,
382 382
         endtime: this.form.end_time
383
-      };
383
+      }
384 384
       getComprehensive(params).then(response => {
385 385
         if (response.data.state === 1) {
386
-          var macher = response.data.data.macher;
387
-          console.log("设备型号5555", macher);
386
+          var macher = response.data.data.macher
387
+          console.log('设备型号5555', macher)
388 388
           for (let index = 0; index < macher.length; index++) {
389 389
             if (macher[index].device_type === 1) {
390
-              macher[index].device_type = "透析机";
390
+              macher[index].device_type = '透析机'
391 391
             }
392 392
             if (macher[index].device_type === 2) {
393
-              macher[index].device_type = "水处理机";
393
+              macher[index].device_type = '水处理机'
394 394
             }
395 395
             if (macher[index].device_type === 3) {
396
-              macher[index].device_type = "其他";
396
+              macher[index].device_type = '其他'
397 397
             }
398 398
 
399 399
             if (macher[index].machine_status === 1) {
400
-              macher[index].machine_status = "使用机";
400
+              macher[index].machine_status = '使用机'
401 401
             }
402 402
             if (macher[index].machine_status === 2) {
403
-              macher[index].machine_status = "备用机";
403
+              macher[index].machine_status = '备用机'
404 404
             }
405 405
             if (macher[index].machine_status === 3) {
406
-              macher[index].machine_status = "急诊机";
406
+              macher[index].machine_status = '急诊机'
407 407
             }
408 408
             if (macher[index].machine_status === 4) {
409
-              macher[index].machine_status = "报废机";
409
+              macher[index].machine_status = '报废机'
410 410
             }
411 411
             if (macher[index].rubbish_reason === 0) {
412
-              macher[index].rubbish_reason = "";
412
+              macher[index].rubbish_reason = ''
413 413
             }
414 414
           }
415 415
           // console.log('macher', macher)
416
-          this.tableData = macher;
416
+          this.tableData = macher
417 417
         }
418
-      });
418
+      })
419 419
     },
420 420
     getTime(time) {
421 421
       if (time === 0) {
422
-        return "";
422
+        return ''
423 423
       } else {
424
-        return uParseTime(time, "{y}-{m}-{d}");
424
+        return uParseTime(time, '{y}-{m}-{d}')
425 425
       }
426 426
     },
427 427
     getTotalCount() {
428 428
       getTotalCount().then(response => {
429 429
         if (response.data.state === 1) {
430
-          var total = response.data.data.total;
431
-          // console.log('total ========', total)
432
-          this.failure_times = total;
430
+          var total = response.data.data.total
431
+          console.log('total声优', total)
432
+          this.failure_times = total
433 433
         }
434
-      });
434
+      })
435 435
     }
436 436
   },
437 437
   created() {
438
-    this.getAllSubregion();
439
-    this.getAllEquimentName();
440
-    this.getTotalCount();
438
+    this.getAllSubregion()
439
+    this.getAllEquimentName()
440
+    this.getTotalCount()
441 441
   }
442
-};
442
+}
443 443
 </script>
444 444
 
445 445
 <style scoped></style>

+ 111 - 86
src/xt_pages/management/components/PlanForm.vue Целия файл

@@ -6,10 +6,10 @@
6 6
       width="55%"
7 7
       center
8 8
     >
9
-      <el-form ref="form" :model="form">
9
+      <el-form ref="form" :model="form" :rules="rules">
10 10
         <el-row>
11 11
           <el-col :span="10">
12
-            <el-form-item label="设备型号:">
12
+            <el-form-item label="设备型号:" required prop="device_type">
13 13
               <el-select style="width:135px" v-model="form.device_type">
14 14
                 <el-option
15 15
                   v-for="item in this.DeviceType"
@@ -21,7 +21,7 @@
21 21
             </el-form-item>
22 22
           </el-col>
23 23
           <el-col :span="10">
24
-            <el-form-item label="消毒时长:">
24
+            <el-form-item label="消毒时长:" required prop="disinfec_time">
25 25
               <el-input
26 26
                 style="width:135px"
27 27
                 v-model="form.disinfec_time"
@@ -32,7 +32,7 @@
32 32
         </el-row>
33 33
         <el-row>
34 34
           <el-col :span="10">
35
-            <el-form-item label="时间:">
35
+            <el-form-item label="时间:" required prop="time">
36 36
               <el-select
37 37
                 v-model="form.time"
38 38
                 multiple
@@ -52,7 +52,7 @@
52 52
             </el-form-item>
53 53
           </el-col>
54 54
           <el-col :span="10">
55
-            <el-form-item label="班次:">
55
+            <el-form-item label="班次:" required prop="class_time">
56 56
               <el-select
57 57
                 v-model="form.class_time"
58 58
                 multiple
@@ -137,9 +137,9 @@
137 137
 </template>
138 138
 
139 139
 <script>
140
-import { getAllEquimentName, savePlan, getAllEquitType } from "@/api/manage";
140
+import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage'
141 141
 export default {
142
-  name: "PlanForm",
142
+  name: 'PlanForm',
143 143
   props: {
144 144
     equimentid: Number
145 145
   },
@@ -147,8 +147,8 @@ export default {
147 147
     return {
148 148
       dialogVisible: false,
149 149
       form: {
150
-        device_type: "",
151
-        disinfec_time: "",
150
+        device_type: '',
151
+        disinfec_time: '',
152 152
         time: [],
153 153
         class_time: [],
154 154
         way: 0,
@@ -158,127 +158,152 @@ export default {
158 158
       },
159 159
       value: [],
160 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 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 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 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 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 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 212
       DeviceType: [],
213 213
       planid: 0,
214
-      plandata: 0
215
-    };
214
+      plandata: 0,
215
+      rules: {
216
+        device_type: [{ required: true, message: '请输入设备型号' }],
217
+        disinfec_time: [{ required: true, message: '请输入消毒时长' }],
218
+        time: [{ required: true, message: '请输入时间' }],
219
+        class_time: [{ required: true, message: '请输入班次' }]
220
+      }
221
+    }
216 222
   },
217 223
   methods: {
218 224
     open: function() {
219
-      this.dialogVisible = true;
225
+      this.dialogVisible = true
220 226
     },
221 227
     getAllEquimentName() {
222 228
       getAllEquimentName().then(response => {
223 229
         if (response.data.state === 1) {
224
-          var equit = response.data.data.equit;
230
+          var equit = response.data.data.equit
225 231
           // console.log('equit', equit);
226 232
           // this.DeviceType = equit;
227 233
         }
228
-      });
234
+      })
229 235
     },
230 236
     savePlan(formName) {
231
-      var equimentid = this.equimentid;
237
+      var equimentid = this.equimentid
232 238
       // console.log('equimentid', equimentid);
233
-      var devicetype = this.form.device_type;
234
-      var devicetypes = parseInt(devicetype);
235
-      this.form.device_type = devicetypes;
239
+      var devicetype = this.form.device_type
240
+      var devicetypes = parseInt(devicetype)
241
+      this.form.device_type = devicetypes
236 242
 
237
-      var ways = this.form.way;
238
-      var way = parseInt(ways);
239
-      this.form.way = way;
243
+      var ways = this.form.way
244
+      var way = parseInt(ways)
245
+      this.form.way = way
240 246
 
241
-      var machinedisinfectant = this.form.machine_disinfectant;
242
-      var machinedisinfectants = parseInt(machinedisinfectant);
243
-      this.form.machine_disinfectant = machinedisinfectants;
247
+      var machinedisinfectant = this.form.machine_disinfectant
248
+      var machinedisinfectants = parseInt(machinedisinfectant)
249
+      this.form.machine_disinfectant = machinedisinfectants
244 250
 
245
-      var disinfectantways = this.form.disinfectant_way;
246
-      var disinfectantway = parseInt(disinfectantways);
247
-      this.form.disinfectant_way = disinfectantway;
251
+      var disinfectantways = this.form.disinfectant_way
252
+      var disinfectantway = parseInt(disinfectantways)
253
+      this.form.disinfectant_way = disinfectantway
248 254
 
249
-      var disinfectants = this.form.disinfectant;
250
-      var disinfectant = parseInt(disinfectants);
251
-      this.form.disinfectant = disinfectant;
252
-      savePlan(this.form, this.equimentid).then(response => {
253
-        if (response.data.state === 1) {
254
-          var msg = response.data.data.msg;
255
-          // console.log('msg', msg);
256
-          this.$message.success("保存成功");
257
-          this.dialogVisible = false;
258
-          this.$emit("getAllPlan");
259
-          this.$emit("getAllPlanDetail");
260
-          // 如果保存成功通过状态值改变父组键表格的值
261
-          this.plandata = 1;
262
-          this.$emit("func", this.plandata);
263
-        } else {
264
-          this.$message.error("该消毒计划已存在");
255
+      var disinfectants = this.form.disinfectant
256
+      var disinfectant = parseInt(disinfectants)
257
+      this.form.disinfectant = disinfectant
258
+      this.$refs[formName].validate(valid => {
259
+        if (valid) {
260
+          savePlan(this.form, this.equimentid).then(response => {
261
+            if (response.data.state === 1) {
262
+              var msg = response.data.data.msg
263
+              // console.log('msg', msg);
264
+              this.$message.success('保存成功')
265
+              this.form.device_type = ''
266
+              this.form.disinfec_time = []
267
+              this.form.time = []
268
+              this.form.class_time = ''
269
+              this.form.way = 0
270
+              this.form.machine_disinfectant = 0
271
+              this.form.disinfectant_way = 0
272
+              this.form.disinfectant = 0
273
+              this.dialogVisible = false
274
+              this.$emit('getAllPlan')
275
+              this.$emit('getAllPlanDetail')
276
+              // 如果保存成功通过状态值改变父组键表格的值
277
+              this.plandata = 1
278
+              this.$emit('func', this.plandata)
279
+            } else {
280
+              this.$message.error('该消毒计划已存在')
281
+              // this.form.disinfec_time = "";
282
+              // this.form.time = [];
283
+              // this.form.class_time = [];
284
+              // this.form.way = 0;
285
+              // this.form.machine_disinfectant = 0;
286
+              // this.form.disinfectant_way = 0;
287
+              // this.form.disinfectant = 0;
288
+            }
289
+          })
265 290
         }
266
-      });
291
+      })
267 292
     },
268 293
     getAllEquitType() {
269 294
       getAllEquitType().then(response => {
270 295
         if (response.data.state === 1) {
271
-          var equitname = response.data.data.mode;
272
-          this.DeviceType = equitname;
296
+          var equitname = response.data.data.mode
297
+          this.DeviceType = equitname
273 298
         }
274
-      });
299
+      })
275 300
     }
276 301
   },
277 302
   created() {
278
-    this.getAllEquimentName();
279
-    this.getAllEquitType();
303
+    this.getAllEquimentName()
304
+    this.getAllEquitType()
280 305
   }
281
-};
306
+}
282 307
 </script>
283 308
 
284 309
 <style lang="scss">

+ 24 - 4
src/xt_pages/management/components/RepairForm.vue Целия файл

@@ -370,8 +370,11 @@
370 370
               </el-upload>
371 371
             </el-form-item>
372 372
             <a class="el-upload-list__item-name">
373
-              <i>
374
-                <a @click="toLink()">{{ filename }}</a>
373
+              <i style="color:#0000EE">
374
+                <a @click="toLink()">{{ filename }}</a
375
+                ><span v-show="classShow" @click="hiddenShow"
376
+                  ><li class="el-icon-circle-close"></li
377
+                ></span>
375 378
               </i>
376 379
             </a>
377 380
           </el-col>
@@ -482,7 +485,8 @@ export default {
482 485
       limit: 10,
483 486
       page: 1,
484 487
       total: 0,
485
-      filename: ""
488
+      filename: "",
489
+      classShow: false
486 490
     };
487 491
   },
488 492
   methods: {
@@ -511,7 +515,7 @@ export default {
511 515
       getAllRepair(this.limit, this.page).then(response => {
512 516
         if (response.data.state === 1) {
513 517
           var repair = response.data.data.repair;
514
-          // console.log('repair是', repair)
518
+          console.log("repair是", repair);
515 519
           // eslint-disable-next-line no-unused-vars
516 520
           var total = response.data.data.total;
517 521
           this.total = total;
@@ -549,6 +553,16 @@ export default {
549 553
             if (repair[index].exclude === 3) {
550 554
               repair[index].exclude = "未解决";
551 555
             }
556
+
557
+            if (repair[index].start_time <= 0) {
558
+              repair[index].start_time = 0;
559
+            }
560
+            if (repair[index].arrive_time <= 0) {
561
+              repair[index].arrive_time = 0;
562
+            }
563
+            if (repair[index].finish_time <= 0) {
564
+              repair[index].finish_time = 0;
565
+            }
552 566
           }
553 567
           this.tableData = repair;
554 568
         }
@@ -571,6 +585,7 @@ export default {
571 585
       EditRepair(id).then(response => {
572 586
         if (response.data.state === 1) {
573 587
           var repair = response.data.data.repair;
588
+          this.classShow = true;
574 589
           console.log("repair", repair);
575 590
           this.guaForm.guarantee_date = uParseTime(
576 591
             repair.guarantee_date,
@@ -611,6 +626,7 @@ export default {
611 626
     },
612 627
     beforeUploadFile(file) {
613 628
       this.filename = file.name;
629
+      this.classShow = true;
614 630
       this.guaForm.image_name = file.name;
615 631
       const isLt2M = file.size / 1024 / 1024 <= 2048;
616 632
       console.log("filename", file);
@@ -767,6 +783,10 @@ export default {
767 783
           }
768 784
         });
769 785
       });
786
+    },
787
+    hiddenShow() {
788
+      this.filename = "";
789
+      this.classShow = false;
770 790
     }
771 791
   },
772 792
   created() {

+ 122 - 36
src/xt_pages/management/home.vue Целия файл

@@ -1306,8 +1306,8 @@
1306 1306
                                        <el-checkbox v-model="userform.germ_checked">更换</el-checkbox>
1307 1307
                                        <span class="warn" v-show="warnShowTwo">您已一个月未更换,请注意检测</span>
1308 1308
                                      </el-form-item>
1309
-                                      
1310
-                                     </el-col> 
1309
+
1310
+                                     </el-col>
1311 1311
                                    <el-col :span="8">
1312 1312
                                      <el-form-item class="newname" label="名称:">
1313 1313
                                        <el-select v-model="userform.germ_name" placeholder="请选择" style="width:150px">
@@ -1868,7 +1868,7 @@
1868 1868
                                         <el-button size="small" type="primary">上传图片</el-button>
1869 1869
                                       </el-upload>
1870 1870
                                      <a class="el-upload-list__item-name">
1871
-                                        <i><a @click="toLink()">{{filename}}</a></i>
1871
+                                        <i style="color:#0000EE"><a @click="toLink()">{{filename}}</a><span v-show="classShow" @click="hiddenShow"><li class="el-icon-circle-close"></li></span></i>
1872 1872
                                      </a>
1873 1873
                                   </el-form-item>
1874 1874
                                </el-col>
@@ -2074,7 +2074,7 @@
2074 2074
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2075 2075
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2076 2076
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2077
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed } from '@/api/manage'
2077
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed, getAllMachineTwo } from '@/api/manage'
2078 2078
   import { uParseTime } from '@/utils/tools'
2079 2079
   import { getToken } from '@/api/qiniu'
2080 2080
   import PlanForm from './components/PlanForm'
@@ -2206,7 +2206,7 @@ export default {
2206 2206
           device_type: 0, // 设备类型
2207 2207
           date: ''
2208 2208
         },
2209
-        currentRow: null,
2209
+        currentRow: {},
2210 2210
         cancelShow: false,
2211 2211
         confirmShow: false,
2212 2212
         isIndeterminate: true,
@@ -2247,7 +2247,9 @@ export default {
2247 2247
           fluid_path: [{ required: true, message: '请填写消毒方式' }],
2248 2248
           disinfectant: [{ required: true, message: '请填写消毒液' }],
2249 2249
           disinfection_status: [{ required: true, message: '消毒状态' }],
2250
-          sign_name: [{ required: true, message: '请填写签名' }]
2250
+          sign_name: [{ required: true, message: '请填写签名', trigger: ['change'] }],
2251
+          classtype: [{ required: true, message: '请填写班次' }]
2252
+
2251 2253
         },
2252 2254
         runOption: [
2253 2255
           { id: 1, name: '正常' },
@@ -2540,9 +2542,9 @@ export default {
2540 2542
         disableFour: true,
2541 2543
         disableFive: true,
2542 2544
         runDisable: true,
2543
-        warnShow: true,
2544
-        warnShowTwo: true,
2545
-        warnShowThree: true,
2545
+        warnShow: false,
2546
+        warnShowTwo: false,
2547
+        warnShowThree: false,
2546 2548
         bedZoneThree: [],
2547 2549
         bedNumberTwo: [],
2548 2550
         reverseMode: [
@@ -2554,7 +2556,8 @@ export default {
2554 2556
         deviceMode: [],
2555 2557
         zoneDisabled: false,
2556 2558
         bedid: '',
2557
-        unitType: ''
2559
+        unitType: '',
2560
+        classShow: false
2558 2561
       }
2559 2562
     },
2560 2563
     methods: {
@@ -2663,6 +2666,15 @@ export default {
2663 2666
           }
2664 2667
         })
2665 2668
       },
2669
+      getAllMachineTwo() {
2670
+        getAllMachineTwo(this.forms.zone_id, this.forms.device_type).then(response => {
2671
+          if (response.data.state === 1) {
2672
+            var addmahcer = response.data.data.addmahcer
2673
+            console.log('addmacher是', addmahcer)
2674
+            this.tableDatatwo = addmahcer
2675
+          }
2676
+        })
2677
+      },
2666 2678
       handleIndex(index) {
2667 2679
         this.tabIndex = index
2668 2680
       },
@@ -2681,7 +2693,8 @@ export default {
2681 2693
         // 病人下机后插入数据
2682 2694
         this.getAutoData(val.id)
2683 2695
         this.getTotalNumber(val.id)
2684
-        this.getTimeWarning(val.id)
2696
+        // this.getTimeWarning(val.id)
2697
+        this.getTimeBeteen(val.id)
2685 2698
         this.getData(val.bed_id)
2686 2699
       },
2687 2700
       getAutoData(id) {
@@ -2700,28 +2713,28 @@ export default {
2700 2713
             // console.log('warning', warning)
2701 2714
             var time = this.getTimestamp(this.userform.date) - warning.stime
2702 2715
             // console.log('时间', time)
2703
-            if (time < 2678400 && warning.dialysis_checked === 1) {
2704
-              this.warnShow = false
2705
-            } else {
2706
-              this.warnShow = true
2707
-            }
2716
+            // if (time < 2678400 && warning.dialysis_checked === 1) {
2717
+            //   this.warnShow = false
2718
+            // } else {
2719
+            //   this.warnShow = true
2720
+            // }
2708 2721
             var germ = response.data.data.germ
2709 2722
             // console.log('germ', germ)
2710 2723
             var timetwo = this.getTimestamp(this.userform.date) - germ.stime
2711 2724
             // console.log('时间', timetwo)
2712
-            if (timetwo < 2678400 && germ.germ_checked === 1) {
2713
-              this.warnShowTwo = false
2714
-            } else {
2715
-              this.warnShowTwo = true
2716
-            }
2725
+            // if (timetwo < 2678400 && germ.germ_checked === 1) {
2726
+            //   this.warnShowTwo = false
2727
+            // } else {
2728
+            //   this.warnShowTwo = true
2729
+            // }
2717 2730
             var clean = response.data.data.clean
2718 2731
             var timethree = this.getTimestamp(this.userform.date) - clean.stime
2719 2732
             // console.log('时间', timethree)
2720
-            if (timethree < 2678400 && clean.clean === 1) {
2721
-              this.warnShowThree = false
2722
-            } else {
2723
-              this.warnShowThree = true
2724
-            }
2733
+            // if (timethree < 2678400 && clean.clean === 1) {
2734
+            //   this.warnShowThree = false
2735
+            // } else {
2736
+            //   this.warnShowThree = true
2737
+            // }
2725 2738
             var number = response.data.data.number
2726 2739
             // console.log('number', number)
2727 2740
             this.Number = number
@@ -2833,7 +2846,7 @@ export default {
2833 2846
             this.form.service_manufacturer = addmacher.service_manufacturer
2834 2847
 
2835 2848
             // this.form.unit_type = addmacher.unit_type
2836
-  
2849
+
2837 2850
             this.form.unit_type = parseInt(addmacher.device_mode)
2838 2851
             this.form.use_section = addmacher.use_section
2839 2852
             this.form.section_number = addmacher.section_number
@@ -2965,10 +2978,17 @@ export default {
2965 2978
             if (response.data.state === 1) {
2966 2979
               var addmacher = response.data.data.addmacher
2967 2980
               this.$message.success('修改成功')
2981
+              for (let i = 0; i < this.tableDatatwo.length; i++) {
2982
+                // eslint-disable-next-line no-cond-assign
2983
+                if (this.tableDatatwo[i].id = addmacher.id) {
2984
+                  this.tableDatatwo = addmacher
2985
+                  this.$forceUpdate()
2986
+                }
2987
+              }
2968 2988
               // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
2969
-              this.getAllMachine()
2989
+              // this.getAllMachine()
2970 2990
               this.getAllSubregion()
2971
-              // this.$refs.singleTable.setCurrentRow(addmacher)
2991
+              this.$refs.singleTable.setCurrentRow(this.currentRow)
2972 2992
               this.$forceUpdate()
2973 2993
             }
2974 2994
           })
@@ -3448,7 +3468,6 @@ export default {
3448 3468
             }
3449 3469
 
3450 3470
             DeletePlans({ ids: ids }).then(response => {
3451
-              console.log('ids', ids)
3452 3471
               // eslint-disable-next-line eqeqeq
3453 3472
               if (response.data.state == 1) {
3454 3473
                 // eslint-disable-next-line no-unused-vars
@@ -3744,6 +3763,15 @@ export default {
3744 3763
                 this.userform.end_time = ''
3745 3764
                 this.userform.starttime = ''
3746 3765
                 this.userform.endtime = ''
3766
+                this.userform.date = ''
3767
+                this.userform.classtype = ''
3768
+                this.userform.zone = ''
3769
+                this.userform.patient_name = ''
3770
+                this.userform.sign_name = ''
3771
+                this.userform.bed_number = ''
3772
+                this.userform.hyperfiltratio = ''
3773
+                this.userform.weight_loss = ''
3774
+                this.userform.dialysis_time = ''
3747 3775
                 this.$message.success('添加成功')
3748 3776
                 // this.$refs.child.getInformationData()
3749 3777
               }
@@ -3788,7 +3816,7 @@ export default {
3788 3816
         getUserRegister(id).then(response => {
3789 3817
           if (response.data.state === 1) {
3790 3818
             var information = response.data.data.information
3791
-            console.log('使用登记', information)
3819
+            console.log('产讯使用登记', information)
3792 3820
             // eslint-disable-next-line no-unused-vars
3793 3821
             var role = response.data.data.role
3794 3822
             // console.log('role', role)
@@ -3816,9 +3844,25 @@ export default {
3816 3844
             // this.userform.dialysis_time = information.dialysis_hour
3817 3845
             // this.userform.hyperfiltratio = information.hyperfiltratio
3818 3846
             // this.userform.weight_loss = information.weight_loss
3819
-            this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
3820
-            this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3821
-            this.userform.weight_loss = dislysis.weight_loss
3847
+            if (information.hyperfiltratio === '') {
3848
+              this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3849
+            } else {
3850
+              this.userform.hyperfiltratio = information.hyperfiltratio
3851
+            }
3852
+            if (information.dialysis_hour === '') {
3853
+              this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
3854
+            } else {
3855
+              this.userform.dialysis_time = information.dialysis_hour
3856
+            }
3857
+            // this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
3858
+            // this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3859
+            if (information.weight_loss === '') {
3860
+              this.userform.weight_loss = dislysis.weight_loss
3861
+            } else {
3862
+              this.userform.weight_loss = information.weight_loss
3863
+            }
3864
+
3865
+            // this.userform.weight_loss = dislysis.weight_loss
3822 3866
             this.userform.warning_value = information.warning_value
3823 3867
             this.userform.user_total = information.user_total
3824 3868
             if (information.move === 0) {
@@ -3862,7 +3906,7 @@ export default {
3862 3906
               this.userform.germ_checked = false
3863 3907
             }
3864 3908
 
3865
-            if (information.germs_checked === 2) {
3909
+            if (information.germ_checked === 2) {
3866 3910
               this.userform.germ_checked = false
3867 3911
             }
3868 3912
 
@@ -4061,6 +4105,7 @@ export default {
4061 4105
       },
4062 4106
       beforeUploadFile(file) {
4063 4107
         this.filename = file.name
4108
+        this.classShow = true
4064 4109
         this.guaForm.imageName = file.name
4065 4110
         const isLt2M = file.size / 1024 / 1024 <= 2048
4066 4111
         var date = new Date()
@@ -4251,6 +4296,41 @@ export default {
4251 4296
           }
4252 4297
         })
4253 4298
       },
4299
+      getTimeBeteen(id) {
4300
+        var todayTime = moment(new Date()).format('YYYY-MM-DD')
4301
+        console.log('todayTime', todayTime)
4302
+        getTimeBeteen(id, todayTime).then(response => {
4303
+          if (response.data.state === 1) {
4304
+            // debugger
4305
+            var timedata = response.data.data.timeData
4306
+            console.log('timedata', timedata)
4307
+            console.log('timedata', timedata.length)
4308
+            if (timedata.length === 0) {
4309
+              this.warnShow = true
4310
+            }
4311
+            if (timedata.length !== 0) {
4312
+              this.warnShow = false
4313
+            }
4314
+            var todayTimeTwo = response.data.data.timeDataTwo
4315
+            console.log('todayTimeTwo', todayTimeTwo)
4316
+            if (todayTimeTwo.length === 0) {
4317
+              this.warnShowTwo = true
4318
+            }
4319
+            if (todayTimeTwo.length !== 0) {
4320
+              this.warnShowTwo = false
4321
+            }
4322
+
4323
+            var timeDataThree = response.data.data.timeDataThree
4324
+            console.log('timeDataThree', timeDataThree)
4325
+            if (timeDataThree.length === 0) {
4326
+              this.warnShowThree = true
4327
+            }
4328
+            if (timeDataThree.length !== 0) {
4329
+              this.warnShowThree = false
4330
+            }
4331
+          }
4332
+        })
4333
+      },
4254 4334
       getTimestamp(time) { // 把时间日期转成时间戳
4255 4335
         return (new Date(time)).getTime() / 1000
4256 4336
       },
@@ -4295,7 +4375,12 @@ export default {
4295 4375
             console.log('zone', zone)
4296 4376
           }
4297 4377
         })
4378
+      },
4379
+      hiddenShow() {
4380
+        this.filename = ''
4381
+        this.classShow = false
4298 4382
       }
4383
+  
4299 4384
     },
4300 4385
     created() {
4301 4386
       this.getAllSubregion()
@@ -4312,6 +4397,7 @@ export default {
4312 4397
       this.getAllEquitType()
4313 4398
       this.getAllpatient()
4314 4399
       this.getAllMode()
4400
+      this.getAllMachineTwo()
4315 4401
   }
4316 4402
   }
4317 4403
 </script>
@@ -4381,7 +4467,7 @@ export default {
4381 4467
    .a{
4382 4468
      margin-bottom: 10px;
4383 4469
       margin-top: 6px;
4384
-     
4470
+
4385 4471
    }
4386 4472
 
4387 4473
    .b{