Pārlūkot izejas kodu

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

张保健 5 gadus atpakaļ
vecāks
revīzija
c502e66b2a

+ 26 - 40
package-lock.json Parādīt failu

@@ -516,9 +516,9 @@
516 516
       "dev": true
517 517
     },
518 518
     "aws4": {
519
-      "version": "1.8.0",
520
-      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
521
-      "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
519
+      "version": "1.9.1",
520
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
521
+      "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==",
522 522
       "dev": true
523 523
     },
524 524
     "axios": {
@@ -2373,9 +2373,9 @@
2373 2373
       "dev": true
2374 2374
     },
2375 2375
     "combined-stream": {
2376
-      "version": "1.0.7",
2377
-      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
2378
-      "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
2376
+      "version": "1.0.8",
2377
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
2378
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
2379 2379
       "dev": true,
2380 2380
       "requires": {
2381 2381
         "delayed-stream": "~1.0.0"
@@ -5540,9 +5540,9 @@
5540 5540
       }
5541 5541
     },
5542 5542
     "globule": {
5543
-      "version": "1.2.1",
5544
-      "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
5545
-      "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
5543
+      "version": "1.3.0",
5544
+      "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.0.tgz",
5545
+      "integrity": "sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg==",
5546 5546
       "dev": true,
5547 5547
       "requires": {
5548 5548
         "glob": "~7.1.1",
@@ -7165,36 +7165,18 @@
7165 7165
       "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
7166 7166
       "dev": true
7167 7167
     },
7168
-    "lodash.assign": {
7169
-      "version": "4.2.0",
7170
-      "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
7171
-      "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=",
7172
-      "dev": true
7173
-    },
7174 7168
     "lodash.camelcase": {
7175 7169
       "version": "4.3.0",
7176 7170
       "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
7177 7171
       "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
7178 7172
       "dev": true
7179 7173
     },
7180
-    "lodash.clonedeep": {
7181
-      "version": "4.5.0",
7182
-      "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
7183
-      "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
7184
-      "dev": true
7185
-    },
7186 7174
     "lodash.memoize": {
7187 7175
       "version": "4.1.2",
7188 7176
       "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
7189 7177
       "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
7190 7178
       "dev": true
7191 7179
     },
7192
-    "lodash.mergewith": {
7193
-      "version": "4.6.1",
7194
-      "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
7195
-      "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
7196
-      "dev": true
7197
-    },
7198 7180
     "lodash.tail": {
7199 7181
       "version": "4.1.1",
7200 7182
       "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
@@ -7817,9 +7799,9 @@
7817 7799
       }
7818 7800
     },
7819 7801
     "node-sass": {
7820
-      "version": "4.11.0",
7821
-      "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz",
7822
-      "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==",
7802
+      "version": "4.13.1",
7803
+      "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz",
7804
+      "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==",
7823 7805
       "dev": true,
7824 7806
       "requires": {
7825 7807
         "async-foreach": "^0.1.3",
@@ -7829,12 +7811,10 @@
7829 7811
         "get-stdin": "^4.0.1",
7830 7812
         "glob": "^7.0.3",
7831 7813
         "in-publish": "^2.0.0",
7832
-        "lodash.assign": "^4.2.0",
7833
-        "lodash.clonedeep": "^4.3.2",
7834
-        "lodash.mergewith": "^4.6.0",
7814
+        "lodash": "^4.17.15",
7835 7815
         "meow": "^3.7.0",
7836 7816
         "mkdirp": "^0.5.1",
7837
-        "nan": "^2.10.0",
7817
+        "nan": "^2.13.2",
7838 7818
         "node-gyp": "^3.8.0",
7839 7819
         "npmlog": "^4.0.0",
7840 7820
         "request": "^2.88.0",
@@ -7878,6 +7858,12 @@
7878 7858
             "which": "^1.2.9"
7879 7859
           }
7880 7860
         },
7861
+        "lodash": {
7862
+          "version": "4.17.15",
7863
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
7864
+          "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
7865
+          "dev": true
7866
+        },
7881 7867
         "strip-ansi": {
7882 7868
           "version": "3.0.1",
7883 7869
           "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@@ -11337,9 +11323,9 @@
11337 11323
       "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
11338 11324
     },
11339 11325
     "psl": {
11340
-      "version": "1.1.31",
11341
-      "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
11342
-      "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==",
11326
+      "version": "1.7.0",
11327
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
11328
+      "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==",
11343 11329
       "dev": true
11344 11330
     },
11345 11331
     "public-encrypt": {
@@ -14128,9 +14114,9 @@
14128 14114
       "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
14129 14115
     },
14130 14116
     "uuid": {
14131
-      "version": "3.3.2",
14132
-      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
14133
-      "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
14117
+      "version": "3.4.0",
14118
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
14119
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
14134 14120
       "dev": true
14135 14121
     },
14136 14122
     "validate-npm-package-license": {

+ 3 - 3
package.json Parādīt failu

@@ -101,13 +101,14 @@
101 101
     "html-webpack-plugin": "2.30.1",
102 102
     "lint-staged": "7.2.0",
103 103
     "node-notifier": "5.1.2",
104
-    "node-sass": "^4.7.2",
104
+    "node-sass": "^4.13.1",
105 105
     "optimize-css-assets-webpack-plugin": "3.2.0",
106 106
     "ora": "1.3.0",
107 107
     "portfinder": "1.0.13",
108 108
     "postcss-import": "11.0.0",
109 109
     "postcss-loader": "2.0.9",
110 110
     "postcss-url": "7.3.0",
111
+    "qiniu-webpack-plugin": "^0.4.2",
111 112
     "rimraf": "2.6.2",
112 113
     "sass-loader": "^6.0.7",
113 114
     "sass-resources-loader": "^1.3.4",
@@ -124,8 +125,7 @@
124 125
     "webpack-bundle-analyzer": "2.9.1",
125 126
     "webpack-dev-server": "2.9.7",
126 127
     "webpack-merge": "4.1.1",
127
-    "write-json": "^3.0.1",
128
-    "qiniu-webpack-plugin": "^0.4.2"
128
+    "write-json": "^3.0.1"
129 129
   },
130 130
   "engines": {
131 131
     "node": ">= 4.0.0",

+ 35 - 5
src/api/manage.js Parādīt failu

@@ -79,7 +79,6 @@ export function UpdateMachineInfo(data) {
79 79
 }
80 80
 
81 81
 export function UpdateMachineInfoTwo(data) {
82
-  console.log('data==================',data)
83 82
   return request({
84 83
     url: '/api/management/updatemachineinfotwo',
85 84
     method: 'post',
@@ -163,7 +162,7 @@ export function getComprehensive(params) {
163 162
   })
164 163
 }
165 164
 
166
-export function SaveInformation(eid,data) {
165
+export function SaveInformation(eid, data) {
167 166
   console.log('data', data)
168 167
   return request({
169 168
     url: '/api/manage/saveinformation?eid=' + eid,
@@ -213,7 +212,6 @@ export function getAllOrganization(params) {
213 212
 }
214 213
 
215 214
 export function getUserRegister(id, params) {
216
-
217 215
   return request({
218 216
     url: '/api/manage/getregisterinfo?id=' + id,
219 217
     method: 'Get',
@@ -453,7 +451,7 @@ export function queryInfo(zone, bed, startime, endtime, limit, page) {
453 451
     limit: limit,
454 452
     page: page
455 453
   }
456
-  console.log("params",params)
454
+  console.log('params', params)
457 455
   return request({
458 456
     url: '/api/manage/queryinfo',
459 457
     method: 'Get',
@@ -491,7 +489,7 @@ export function getUserForm(id, limit, page) {
491 489
 }
492 490
 
493 491
 export function UpdateMacheineTwo(data) {
494
-  console.log("data",data)
492
+  console.log('data', data)
495 493
   return request({
496 494
     url: '/api/manage/updatemacheinettwo',
497 495
     method: 'post',
@@ -546,3 +544,35 @@ export function getAllpatient(params) {
546 544
     params: params
547 545
   })
548 546
 }
547
+
548
+export function changeBed(id, params) {
549
+  return request({
550
+    url: '/api/manage/changebed?id=' + id,
551
+    method: 'get',
552
+    params: params
553
+  })
554
+}
555
+
556
+export function getPatientDetail(id, params) {
557
+  return request({
558
+    url: '/api/manage/getpatientdetail?id=' + id,
559
+    method: 'get',
560
+    params: params
561
+  })
562
+}
563
+
564
+export function changeRun(id,data) {
565
+  return request({
566
+    url: '/api/manage/changrun?id=' + id,
567
+    method: 'post',
568
+    data: data
569
+  })
570
+}
571
+
572
+export function getRemanderData(params) {
573
+  return request({
574
+    url:'/api/manage/getremanderdata',
575
+    method:'get',
576
+    params:params
577
+  })
578
+}

+ 6 - 2
src/xt_pages/management/components/RepairForm.vue Parādīt failu

@@ -353,8 +353,9 @@
353 353
                 :on-exceed="handleExceed"
354 354
               >
355 355
                 <el-button size="small" type="primary">上传图片</el-button>
356
-              </el-upload>
356
+              </el-upload>            
357 357
             </el-form-item>
358
+            <a>{{this.guaForm.images}}</a>
358 359
           </el-col>
359 360
         </el-row>
360 361
         <el-row>
@@ -456,7 +457,8 @@ export default {
456 457
       repirRules: {
457 458
         guarantee_date: [{ required: true, message: '请填写保修日期' }],
458 459
         fault_description: [{ required: true, message: '请填写故障描述' }]
459
-      }
460
+      },
461
+      filename: ''
460 462
     }
461 463
   },
462 464
   methods: {
@@ -577,8 +579,10 @@ export default {
577 579
     },
578 580
     beforeUploadFile(file) {
579 581
       const isLt2M = file.size / 1024 / 1024 <= 2048
582
+      console.log('filename', file)
580 583
       console.log('视频大小', file.size / 1024 / 1024)
581 584
       console.log('isLt2M是什么', isLt2M)
585
+
582 586
       if (!isLt2M) {
583 587
         this.$message.error('上传视频大小不能超过 2G!')
584 588
         return false

+ 130 - 42
src/xt_pages/management/components/UserForm.vue Parādīt failu

@@ -13,7 +13,7 @@
13 13
       </el-col>
14 14
       <el-col :span="3" class="a">
15 15
         <span class="machineClass">分区:</span>
16
-        <el-select style="width:80px" v-model="form.zone">
16
+        <el-select style="width:80px" v-model="form.zone" @change="changeBed">
17 17
           <el-option v-for="item in this.zones" :key="item.id" :label="item.name" :value="item.id"></el-option>
18 18
         </el-select>
19 19
       </el-col>
@@ -366,7 +366,7 @@
366 366
           </el-col>
367 367
           <el-col :span="8">
368 368
             <el-form-item label="运行:">
369
-              <el-radio-group v-model="userform.run">
369
+              <el-radio-group v-model="userform.run" @change="changeRun">
370 370
                 <el-radio
371 371
                   :label="gender.id"
372 372
                   :value="gender.id"
@@ -380,7 +380,7 @@
380 380
         <el-row>
381 381
           <el-col>
382 382
             <el-form-item label="故障发生阶段:">
383
-              <el-radio-group v-model="userform.failure_stage">
383
+              <el-radio-group v-model="userform.failure_stage" :disabled="four">
384 384
                 <el-radio
385 385
                   :label="gender.id"
386 386
                   :value="gender.id"
@@ -394,14 +394,14 @@
394 394
         <el-row>
395 395
           <el-col :span="24">
396 396
             <el-form-item label="故障描述:">
397
-              <el-input style="width:800px" v-model="userform.fault_description"></el-input>
397
+              <el-input style="width:600px" v-model="userform.fault_description"></el-input>
398 398
             </el-form-item>
399 399
           </el-col>
400 400
         </el-row>
401 401
         <el-row>
402 402
           <el-col :span="24">
403 403
             <el-form-item class="stoppage" label="故障提示信息及代码:">
404
-              <el-input style="width:700px" v-model="userform.code_information"></el-input>
404
+              <el-input style="width:600px" v-model="userform.code_information"></el-input>
405 405
             </el-form-item>
406 406
           </el-col>
407 407
         </el-row>
@@ -592,7 +592,7 @@
592 592
                   :key="index"
593 593
                 >{{gender.name}}</el-radio>
594 594
               </el-radio-group>
595
-              <span style="color:red">您已一个月未更换,请注意检测</span>
595
+              <span style="color:red" v-show="showone">您已一个月未更换,请注意检测</span>
596 596
             </el-form-item>
597 597
           </el-col>
598 598
         </el-row>
@@ -600,8 +600,9 @@
600 600
           <el-col :span="3">
601 601
             <el-form-item label="细菌过滤器:"></el-form-item>
602 602
           </el-col>
603
-          <el-col :span="2">
603
+          <el-col :span="7">
604 604
             <el-checkbox v-model="userform.germ_checked">更换</el-checkbox>
605
+            <span style="color:red" v-show="showone">您已一个月未更换,请注意检测</span>
605 606
           </el-col>
606 607
           <el-col :span="8">
607 608
             <el-form-item label="名称:">
@@ -628,7 +629,7 @@
628 629
           </el-col>
629 630
           <el-col :span="10">
630 631
             <el-checkbox v-model="userform.clean">清洁:</el-checkbox>
631
-            <span style="color:red">您已一个月未清洁,请检查</span>
632
+            <span style="color:red" v-show="showone">您已一个月未清洁,请检查</span>
632 633
           </el-col>
633 634
           <el-col :span="10">
634 635
             <el-form-item label="签名:">
@@ -726,10 +727,13 @@ import {
726 727
   UpdateForm,
727 728
   queryInfo,
728 729
   getUserForm,
729
-  getBedForm
730
+  getBedForm,
731
+  getPatientDetail
730 732
 } from '@/api/manage'
731 733
 import { uParseTime } from '@/utils/tools'
732 734
 import { PostSearch } from '@/api/patient'
735
+import { changeBed } from '@/api/manage'
736
+// eslint-disable-next-line no-unused-vars
733 737
 import print from 'print-js'
734 738
 const moment = require('moment')
735 739
 export default {
@@ -896,12 +900,14 @@ export default {
896 900
         germ_number: '', // 数量
897 901
         clean: '', // 清洁
898 902
         sign_name: '', // 签名
899
-        patient_id:''
903
+        patient_id: ''
900 904
       },
901 905
       hiddenShow: false,
902 906
       searchArray: [],
903 907
       bed: '',
904
-      bedNumberTwo: []
908
+      bedNumberTwo: [],
909
+      four: true,
910
+      showone: false
905 911
     }
906 912
   },
907 913
   methods: {
@@ -1167,6 +1173,9 @@ export default {
1167 1173
       return uParseTime(time, '{y}-{m}-{d}')
1168 1174
     },
1169 1175
     getTimes(time) {
1176
+      if (time < 0) {
1177
+        return ''
1178
+      }
1170 1179
       if (time === 0) {
1171 1180
         return ''
1172 1181
       } else {
@@ -1187,15 +1196,15 @@ export default {
1187 1196
       EditUser(id, patientid).then(response => {
1188 1197
         if (response.data.state === 1) {
1189 1198
           var device = response.data.data.device
1190
-          console.log("device=======",device)
1191
-
1199
+          console.log('device', device)
1192 1200
           var patients = response.data.data.patients
1193
-          console.log('patients', patients);
1194
-          (this.userform.id = device.id),
1195
-          (this.userform.spling_date = uParseTime(
1201
+          console.log('patients', patients)
1202
+          // eslint-disable-next-line no-sequences
1203
+          this.userform.id = device.id,
1204
+          this.userform.spling_date = uParseTime(
1196 1205
             device.date,
1197 1206
             '{y}-{m}-{d}'
1198
-          ))
1207
+          )
1199 1208
           this.userform.patient_id = device.patient_id
1200 1209
           this.userform.classtype = device.class
1201 1210
           this.userform.zone = device.zone
@@ -1203,14 +1212,18 @@ export default {
1203 1212
           this.userform.contagion = device.contagion
1204 1213
           this.userform.patient_name = patients.name
1205 1214
           this.userform.dialysis_mode = device.dialysis_mode
1206
-          this.userform.start_time = uParseTime(
1207
-            device.start_time,
1208
-            '{y}-{m}-{d} {h}:{i}'
1209
-          )
1210
-          this.userform.end_time = uParseTime(
1211
-            device.end_time,
1212
-            '{y}-{m}-{d} {h}:{i}'
1213
-          )
1215
+          // this.userform.start_time = uParseTime(
1216
+          // device.start_time,
1217
+          //  '{y}-{m}-{d} {h}:{i}'
1218
+          // )
1219
+          this.userform.start_time = this.updateTimes(device.start_time)
1220
+          this.userform.end_time = this.updateTimes(device.end_time)
1221
+          // this.userform.end_time = uParseTime(
1222
+          // device.end_time,
1223
+          // '{y}-{m}-{d} {h}:{i}'
1224
+          // )
1225
+
1226
+
1214 1227
           this.userform.dialysis_hour = device.dialysis_hour
1215 1228
           this.userform.hyperfiltratio = device.hyperfiltratio
1216 1229
           this.userform.weight_loss = device.weight_loss
@@ -1230,14 +1243,16 @@ export default {
1230 1243
           this.userform.disinfection_residue = device.disinfection_residue
1231 1244
           this.userform.longtime = device.long_time
1232 1245
           this.userform.dialysis_time = device.dialysis_hour
1233
-          this.userform.starttime = uParseTime(
1234
-            device.disinfec_startime,
1235
-            '{y}-{m}-{d} {h}:{i}'
1236
-          )
1237
-          this.userform.endtime = uParseTime(
1238
-            device.disinfec_endtime,
1239
-            '{y}-{m}-{d} {h}:{i}'
1240
-          )
1246
+          // this.userform.starttime = uParseTime(
1247
+          //   device.disinfec_startime,
1248
+          //  '{y}-{m}-{d} {h}:{i}'
1249
+          // )
1250
+          // this.userform.endtime = uParseTime(
1251
+          //  device.disinfec_endtime,
1252
+          // '{y}-{m}-{d} {h}:{i}'
1253
+          // )
1254
+          this.userform.starttime = this.updateTimes(device.disinfec_startime)
1255
+          this.userform.endtime = this.updateTimes(device.disinfec_endtime)
1241 1256
           if (device.dialysis_checked === 1) {
1242 1257
             this.userform.dialysis_checked = true
1243 1258
           }
@@ -1262,9 +1277,13 @@ export default {
1262 1277
             this.userform.clean = false
1263 1278
           }
1264 1279
           this.userform.sign_name = device.sign_name
1280
+           
1265 1281
         }
1266 1282
       })
1267 1283
     },
1284
+    getTimestamp(time) { // 把时间日期转成时间戳
1285
+      return (new Date(time)).getTime() / 1000
1286
+    },
1268 1287
     BatchDelete() {
1269 1288
       if (this.selectCulture.length == 0) {
1270 1289
         this.$message.error('请选择要删除的信息')
@@ -1300,6 +1319,13 @@ export default {
1300 1319
         })
1301 1320
       })
1302 1321
     },
1322
+    updateTimes(time) {
1323
+      if (time < 0) {
1324
+        return ''
1325
+      } else {
1326
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
1327
+      }
1328
+    },
1303 1329
     UpdateForm(formName) {
1304 1330
       if (this.userform.dialysis_checked === true) {
1305 1331
         this.userform.dialysis_checked = 1
@@ -1321,10 +1347,28 @@ export default {
1321 1347
       if (this.userform.clean === false) {
1322 1348
         this.userform.clean = 0
1323 1349
       }
1324
-      this.userform.start_time = this.getTimes(this.userform.start_time)
1325
-      this.userform.end_time = this.getTimes(this.userform.end_time)
1326
-      this.userform.starttime = this.getTimes(this.userform.starttime)
1327
-      this.userform.endtime = this.getTimes(this.userform.endtime)
1350
+      // this.userform.start_time = this.getTimes(this.userform.start_time)
1351
+      // this.userform.end_time = this.getTimes(this.userform.end_time)
1352
+      // this.userform.starttime = this.getTimes(this.userform.starttime)
1353
+      // this.userform.endtime = this.getTimes(this.userform.endtime)
1354
+      // eslint-disable-next-line eqeqeq
1355
+      if (this.userform.start_time == '') {
1356
+        this.userform.start_time = '0'
1357
+      }
1358
+      // eslint-disable-next-line eqeqeq
1359
+      if (this.userform.end_time == '') {
1360
+        this.userform.end_time = '0'
1361
+      }
1362
+
1363
+      // eslint-disable-next-line eqeqeq
1364
+      if (this.userform.starttime == '') {
1365
+        this.userform.starttime = '0'
1366
+      }
1367
+      // eslint-disable-next-line eqeqeq
1368
+      if (this.userform.endtime == '') {
1369
+        this.userform.endtime = '0'
1370
+      }
1371
+
1328 1372
       this.$refs[formName].validate(valid => {
1329 1373
         if (valid) {
1330 1374
           UpdateForm(this.userform).then(response => {
@@ -1577,6 +1621,7 @@ export default {
1577 1621
               information[index].clean = ''
1578 1622
             }
1579 1623
           }
1624
+          console.log('消毒时间', information)
1580 1625
           this.tableData = information
1581 1626
           var total = response.data.data.total
1582 1627
           this.total = total
@@ -1865,16 +1910,15 @@ export default {
1865 1910
           var addmacher = response.data.data.addmacher
1866 1911
           console.log('addmacher=============', addmacher)
1867 1912
           var number = response.data.data.number
1868
-          console.log('number',number)
1913
+          console.log('number', number)
1869 1914
           this.form.zone = addmacher.zone_id
1870 1915
           this.form.bed = addmacher.bed_id
1871
-           
1916
+
1872 1917
           var bed = [{ id: 0, number: '全部' }]
1873 1918
           for (let i = 0; i < number.length; i++) {
1874 1919
             const item = number[i]
1875 1920
             bed.push({ id: item.id, number: item.number })
1876 1921
           }
1877
-          console.log('bed是什么点东西', bed)
1878 1922
           this.bedNumberTwo = bed
1879 1923
         }
1880 1924
       })
@@ -1899,13 +1943,57 @@ export default {
1899 1943
     },
1900 1944
     createFilter(queryString) {
1901 1945
       return (searchArray) => {
1902
-        return (searchArray.id.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
1903
-      };
1946
+        return (searchArray.id.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
1947
+      }
1904 1948
     },
1905 1949
     handleSelect(item) {
1906 1950
       this.userform.patient_id = item.id
1907 1951
       this.userform.patient_name = item.name
1952
+      // eslint-disable-next-line no-undef
1953
+      this.userform.contagion = ''
1954
+      getPatientDetail(item.id).then(response => {
1955
+        // eslint-disable-next-line eqeqeq
1956
+        if (response.data.state == 1) {
1957
+          var patient = response.data.data.patient
1958
+          console.log('patient', patient)
1959
+          // eslint-disable-next-line no-undef
1960
+          if (patient.is_infectious === 0) {
1961
+            this.userform.contagion = ''
1962
+          }
1963
+          // eslint-disable-next-line no-undef
1964
+          if (patient.is_infectious === 1) {
1965
+            this.userform.contagion = '无'
1966
+          }
1967
+          // eslint-disable-next-line no-undef
1968
+          if (patient.is_infectious === 2) {
1969
+            this.userform.contagion = '有'
1970
+          }
1971
+        }
1972
+      })
1973
+    },
1974
+    changeBed(id) {
1975
+      // eslint-disable-next-line no-undef
1976
+      changeBed(id).then(response => {
1977
+        if (response.data.state === 1) {
1978
+          var bed = response.data.data.bed
1979
+          console.log('bed', bed)
1980
+          // eslint-disable-next-line no-sequences
1981
+          this.form.bed = '',
1982
+          this.bedNumberTwo = bed
1983
+        }
1984
+      })
1908 1985
     },
1986
+    changeRun(val) {
1987
+      // eslint-disable-next-line eqeqeq
1988
+      if (val == 1) {
1989
+        this.four = true
1990
+        this.userform.failure_stage = ''
1991
+      }
1992
+      // eslint-disable-next-line eqeqeq
1993
+      if (val == 2) {
1994
+        this.four = false
1995
+      }
1996
+    }
1909 1997
   },
1910 1998
   created() {
1911 1999
     this.getAllSubregion()

+ 91 - 31
src/xt_pages/management/home.vue Parādīt failu

@@ -899,6 +899,9 @@
899 899
 
900 900
 
901 901
                    <el-tab-pane label="使用登记" name="third">
902
+                       <div class="userbutton">
903
+                          <el-button @click="ToReminders">使用登记提醒配置</el-button>
904
+                       </div>
902 905
                      <div v-show="UserShow">
903 906
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
904 907
                           <el-tab-pane label="新增使用登记" name="first">
@@ -1896,6 +1899,8 @@
1896 1899
         <!-- <edit-machine-form ref="editmachineform"  :planid="planid" ></edit-machine-form> -->
1897 1900
         <!-- 综合查询 -->
1898 1901
         <multiple-form ref="multipleform" :equimentid="equimentid"></multiple-form>
1902
+         <!-- 使用登记提醒配置 -->
1903
+         <remander-form ref="remanderform"> </remander-form>
1899 1904
     <!-- 编辑消毒计划 -->
1900 1905
      <el-dialog title="编辑消毒计划" :visible.sync="dialogVisible" width="50%" center>
1901 1906
        <el-form :model="machineform" ref="machineform">
@@ -2025,7 +2030,7 @@
2025 2030
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2026 2031
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2027 2032
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2028
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo } from '@/api/manage'
2033
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo, getPatientDetail } from '@/api/manage'
2029 2034
   import { uParseTime } from '@/utils/tools'
2030 2035
   import { getToken } from '@/api/qiniu'
2031 2036
   import PlanForm from './components/PlanForm'
@@ -2034,6 +2039,7 @@
2034 2039
   import UserForm from './components/UserForm'
2035 2040
   import QualityForm from './components/QualityForm'
2036 2041
   import RepairForm from './components/RepairForm'
2042
+  import RemanderForm from './components/RemanderForm'
2037 2043
   import { parseTime } from '@/utils'
2038 2044
   import { getFileExtension } from '@/utils/tools'
2039 2045
   import { PostSearch } from '@/api/patient'
@@ -2048,7 +2054,8 @@ export default {
2048 2054
       MultipleForm,
2049 2055
       UserForm,
2050 2056
       QualityForm,
2051
-      RepairForm
2057
+      RepairForm,
2058
+      RemanderForm
2052 2059
     },
2053 2060
     data() {
2054 2061
       return {
@@ -2621,7 +2628,7 @@ export default {
2621 2628
         getMachineDetailById(id).then(response => {
2622 2629
           if (response.data.state === 1) {
2623 2630
             var addmacher = response.data.data.addmacher
2624
-           // console.log('addmacher======', addmacher)
2631
+            // console.log('addmacher======', addmacher)
2625 2632
             if (addmacher.device_type === 1) {
2626 2633
               this.sShow = false
2627 2634
               this.qShow = false
@@ -2892,7 +2899,7 @@ export default {
2892 2899
         var disinfecction_modes = this.form.Disinfection_mode
2893 2900
         var disinfecction_modess = parseInt(disinfecction_modes)
2894 2901
         this.form.Disinfection_mode = disinfecction_modess
2895
-       
2902
+  
2896 2903
         this.$refs[formName].validate(valid => {
2897 2904
           if (valid) {
2898 2905
             UpdateMachineInfoTwo(this.form).then(response => {
@@ -2955,6 +2962,9 @@ export default {
2955 2962
       addPlan() {
2956 2963
         this.$refs.planForm.open()
2957 2964
       },
2965
+      ToReminders() {
2966
+        this.$refs.remanderform.open()
2967
+      },
2958 2968
       changeCheck() {
2959 2969
         this.$refs.multipleTableOne.clearSelection()
2960 2970
         if (this.checkAllStatusOne) {
@@ -2986,7 +2996,7 @@ export default {
2986 2996
         getAllPlan().then(response => {
2987 2997
           if (response.data.state === 1) {
2988 2998
             var plan = response.data.data.plan
2989
-            
2999
+  
2990 3000
             for (let index = 0; index < plan.length; index++) {
2991 3001
               if (plan[index].time === 1) {
2992 3002
                 plan[index].time = '周一'
@@ -3439,7 +3449,7 @@ export default {
3439 3449
         ChangeClass(this.equimentid, id).then(response => {
3440 3450
           if (response.data.state === 1) {
3441 3451
             var patients = response.data.data.patients
3442
-           
3452
+  
3443 3453
             if (patients.is_infectious === 0) {
3444 3454
               this.userform.contagion = ''
3445 3455
             }
@@ -3472,7 +3482,13 @@ export default {
3472 3482
           }
3473 3483
         })
3474 3484
       },
3475
-
3485
+      updateTimes(time) {
3486
+        if (time < 0) {
3487
+          return ''
3488
+        } else {
3489
+          return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
3490
+        }
3491
+      },
3476 3492
       getTimes(time) {
3477 3493
         return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
3478 3494
       },
@@ -3557,11 +3573,22 @@ export default {
3557 3573
           this.userform.clean = 0
3558 3574
         }
3559 3575
 
3560
-        if (this.userform.starttime === '') {
3561
-          this.userform.starttime = 0
3576
+        // eslint-disable-next-line eqeqeq
3577
+        if (this.userform.start_time == '') {
3578
+          this.userform.start_time = '0'
3579
+        }
3580
+        // eslint-disable-next-line eqeqeq
3581
+        if (this.userform.end_time == '') {
3582
+          this.userform.end_time = '0'
3583
+        }
3584
+
3585
+        // eslint-disable-next-line eqeqeq
3586
+        if (this.userform.starttime == '') {
3587
+          this.userform.starttime = '0'
3562 3588
         }
3563
-        if (this.userform.endtime === '') {
3564
-          this.userform.endtime = 0
3589
+        // eslint-disable-next-line eqeqeq
3590
+        if (this.userform.endtime == '') {
3591
+          this.userform.endtime = '0'
3565 3592
         }
3566 3593
 
3567 3594
         if (this.userform.hyperfiltratio === '') {
@@ -3570,25 +3597,19 @@ export default {
3570 3597
         var hyperfiltratio = this.userform.hyperfiltratio
3571 3598
         var hyperfiltratios = parseInt(hyperfiltratio)
3572 3599
         this.userform.hyperfiltratio = hyperfiltratios
3573
-        // this.userform.starttime = this.getTimes(this.userform.starttime)
3574
-        // this.userform.endtime = this.getTimes(this.userform.endtime)
3575
-
3600
+  
3576 3601
         if (this.userform.weight_loss === '') {
3577 3602
           this.userform.weight_loss = 0
3578 3603
         }
3579 3604
         var weightloss = this.userform.weight_loss
3580 3605
         var weidht = parseInt(weightloss)
3581 3606
         this.userform.weight_loss = weidht
3582
-
3583
-        if (this.userform.start_time === '') {
3584
-          this.userform.start_time = '0'
3585
-        }
3586
-        if (this.userform.end_time === '') {
3587
-          this.userform.end_time = '0'
3588
-        }
3607
+  
3589 3608
         if (this.userform.user_total === '0') {
3590 3609
           this.userform.user_total = 0
3591 3610
         }
3611
+        console.log('上机时间', this.userform.start_time)
3612
+        console.log('下机时间', this.userform.end_time)
3592 3613
         this.$refs[formName].validate((valid) => {
3593 3614
           if (valid) {
3594 3615
             SaveInformation(this.equimentid, this.userform).then(response => {
@@ -3596,6 +3617,10 @@ export default {
3596 3617
                 // eslint-disable-next-line no-unused-vars
3597 3618
                 var information = response.data.data.information
3598 3619
                 var infor = response.data.data.infor
3620
+                this.userform.start_time = ''
3621
+                this.userform.end_time = ''
3622
+                this.userform.starttime = ''
3623
+                this.userform.endtime = ''
3599 3624
                 this.$message.success('添加成功')
3600 3625
                 // this.$refs.child.getInformationData()
3601 3626
               }
@@ -3642,7 +3667,7 @@ export default {
3642 3667
             // console.log('role', role)
3643 3668
             // eslint-disable-next-line eqeqeq
3644 3669
             var dislysis = response.data.data.dislysis
3645
-           
3670
+  
3646 3671
             this.userform.id = information.id
3647 3672
             if (information.date == 0) {
3648 3673
               this.userform.date = moment(new Date()).format('YYYY-MM-DD')
@@ -3658,9 +3683,10 @@ export default {
3658 3683
             this.userform.patient_id = information.patient_id
3659 3684
             this.userform.contagion = information.contagion
3660 3685
             this.userform.dialysis_mode = information.dialysis_mode
3661
-
3662
-            this.userform.start_time = uParseTime(information.start_time, '{y}-{m}-{d} {h}:{i}')
3663
-            this.userform.end_time = uParseTime(information.end_time, '{y}-{m}-{d} {h}:{i}')
3686
+            this.userform.start_time = this.updateTimes(information.start_time)
3687
+            // this.userform.start_time = uParseTime(information.start_time, '{y}-{m}-{d} {h}:{i}')
3688
+            this.userform.end_time = this.updateTimes(information.end_time)
3689
+            // this.userform.end_time = uParseTime(information.end_time, '{y}-{m}-{d} {h}:{i}')
3664 3690
             // this.userform.dialysis_time = information.dialysis_hour
3665 3691
             // this.userform.hyperfiltratio = information.hyperfiltratio
3666 3692
             // this.userform.weight_loss = information.weight_loss
@@ -3685,8 +3711,10 @@ export default {
3685 3711
             this.userform.disinfectant = information.disinfection_status
3686 3712
             this.userform.disinfection_residue = information.disinfection_residue
3687 3713
             this.userform.longtime = information.long_time
3688
-            this.userform.starttime = uParseTime(information.disinfec_startime, '{y}-{m}-{d} {h}:{i}')
3689
-            this.userform.endtime = uParseTime(information.disinfec_endtime, '{y}-{m}-{d} {h}:{i}')
3714
+            this.userform.starttime = this.updateTimes(information.disinfec_startime)
3715
+            this.userform.endtime = this.updateTimes(information.disinfec_endtime)
3716
+            // this.userform.starttime = uParseTime(information.disinfec_startime, '{y}-{m}-{d} {h}:{i}')
3717
+            // this.userform.endtime = uParseTime(information.disinfec_endtime, '{y}-{m}-{d} {h}:{i}')
3690 3718
 
3691 3719
             if (information.dialysis_checked === 1) {
3692 3720
               this.userform.dialysis_checked = true
@@ -4005,6 +4033,26 @@ export default {
4005 4033
       handleSelect(item) {
4006 4034
         this.userform.patient_id = item.id
4007 4035
         this.userform.patient_name = item.name
4036
+        // eslint-disable-next-line no-undef
4037
+        getPatientDetail(item.id).then(response => {
4038
+          // eslint-disable-next-line eqeqeq
4039
+          if (response.data.state == 1) {
4040
+            var patient = response.data.data.patient
4041
+            console.log('patient', patient)
4042
+            // eslint-disable-next-line no-undef
4043
+            if (patient.is_infectious === 0) {
4044
+              this.userform.contagion = ''
4045
+            }
4046
+            // eslint-disable-next-line no-undef
4047
+            if (patient.is_infectious === 1) {
4048
+              this.userform.contagion = '无'
4049
+            }
4050
+            // eslint-disable-next-line no-undef
4051
+            if (patient.is_infectious === 2) {
4052
+              this.userform.contagion = '有'
4053
+            }
4054
+          }
4055
+        })
4008 4056
       },
4009 4057
       getAllEquitType() {
4010 4058
         getAllEquitType().then(response => {
@@ -4032,7 +4080,7 @@ export default {
4032 4080
         getAllpatient().then(response => {
4033 4081
           if (response.data.state === 1) {
4034 4082
             var allpatient = response.data.data.allpatient
4035
-          
4083
+  
4036 4084
             this.patientName = allpatient
4037 4085
           }
4038 4086
         })
@@ -4041,24 +4089,32 @@ export default {
4041 4089
         getTimeWarning(id).then(response => {
4042 4090
           if (response.data.state === 1) {
4043 4091
             var information = response.data.data.information
4044
-            var time = this.userform.date - information.date
4092
+            console.log(this.getTimestamp(this.userform.date))
4093
+            console.log(information.stime)
4094
+            var time = this.getTimestamp(this.userform.date) - information.stime
4095
+            console.log('时间', time)
4045 4096
             if (time >= 2678400) {
4046 4097
               this.warnShow = true
4047 4098
             }
4048 4099
             var deviceInformation = response.data.data.deviceInformation
4049
-            var timetwo = this.userform.date - deviceInformation.date
4100
+
4101
+            var timetwo = this.getTimestamp(this.userform.date) - deviceInformation.stime
4050 4102
             if (timetwo >= 2678400) {
4051 4103
               this.warnShowTwo = true
4052 4104
             }
4053 4105
             var clean = response.data.data.clean
4054
-            var timethree = this.userform.date - clean.date
4106
+            var timethree = this.getTimestamp(this.userform.date) - clean.stime
4055 4107
             if (timethree >= 2678400) {
4056 4108
               this.warnShowThree = true
4057 4109
             }
4058 4110
           }
4059 4111
         })
4060 4112
       },
4113
+      getTimestamp(time) { // 把时间日期转成时间戳
4114
+        return (new Date(time)).getTime() / 1000
4115
+      },
4061 4116
 
4117
+      // eslint-disable-next-line no-irregular-whitespace
4062 4118
       // 通过自组建传值改变表格数据
4063 4119
       getPlanData(data) {
4064 4120
         if (data === 1) {
@@ -4129,6 +4185,10 @@ export default {
4129 4185
     font-size: 14px;
4130 4186
   }
4131 4187
 
4188
+  .userbutton{
4189
+    margin-left:985px;
4190
+  }
4191
+
4132 4192
 </style>
4133 4193
 <style lang="scss">
4134 4194