Преглед изворни кода

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

csx пре 5 година
родитељ
комит
e75a5abcaf

+ 9 - 3
src/api/manage.js Прегледај датотеку

@@ -79,6 +79,7 @@ export function UpdateMachineInfo(data) {
79 79
 }
80 80
 
81 81
 export function UpdateMachineInfoTwo(data) {
82
+  console.log('data==================',data)
82 83
   return request({
83 84
     url: '/api/management/updatemachineinfotwo',
84 85
     method: 'post',
@@ -110,9 +111,13 @@ export function getAllPlan(params) {
110 111
   })
111 112
 }
112 113
 
113
-export function getAllPlanDetail(id, params) {
114
+export function getAllPlanDetail(unitype) {
115
+  // eslint-disable-next-line no-redeclare
116
+  const params = {
117
+    unitype: unitype
118
+  }
114 119
   return request({
115
-    url: '/api/management/getallplandetail?id=' + id,
120
+    url: '/api/management/getallplandetail',
116 121
     method: 'Get',
117 122
     params: params
118 123
   })
@@ -208,7 +213,7 @@ export function getAllOrganization(params) {
208 213
 }
209 214
 
210 215
 export function getUserRegister(id, params) {
211
-  console.log('id是什么================', id)
216
+
212 217
   return request({
213 218
     url: '/api/manage/getregisterinfo?id=' + id,
214 219
     method: 'Get',
@@ -486,6 +491,7 @@ export function getUserForm(id, limit, page) {
486 491
 }
487 492
 
488 493
 export function UpdateMacheineTwo(data) {
494
+  console.log("data",data)
489 495
   return request({
490 496
     url: '/api/manage/updatemacheinettwo',
491 497
     method: 'post',

+ 8 - 16
src/xt_pages/management/components/ManageForm.vue Прегледај датотеку

@@ -424,8 +424,8 @@ export default {
424 424
       bedShow: true,
425 425
       bedShowTwo: false,
426 426
       disa: true,
427
-      buttonShow:true,
428
-      buttonShowTwo:false,
427
+      buttonShow: true,
428
+      buttonShowTwo: false,
429 429
     }
430 430
   },
431 431
   methods: {
@@ -569,29 +569,21 @@ export default {
569 569
       var machine_statuss = parseInt(machine_status)
570 570
       this.form.machine_status = machine_statuss
571 571
 
572
-      if (this.form.revers_mode === '') {
573
-        this.form.revers_mode = 0
572
+      if (this.form.bed_number === '') {
573
+        this.form.bed_number = 0
574 574
       }
575
-      var revers_mode = this.form.revers_mode
576
-      var revers_modes = parseInt(revers_mode)
577
-      this.form.revers_mode = revers_modes
575
+      var bed_numbers = this.form.bed_number
576
+      var bed_numberss = parseInt(bed_numbers)
577
+      this.form.bed_number = bed_numberss
578
+      console.log('购买日期', this.form.buy_date)
578 579
 
579 580
       if (this.form.Disinfection_mode === '') {
580 581
         this.form.Disinfection_mode = 0
581 582
       }
582
-
583 583
       var disinfecction_modes = this.form.Disinfection_mode
584 584
       var disinfecction_modess = parseInt(disinfecction_modes)
585 585
       this.form.Disinfection_mode = disinfecction_modess
586 586
 
587
-      if (this.form.bed_number === '') {
588
-        this.form.bed_number = 0
589
-      }
590
-      var bed_numbers = this.form.bed_number
591
-      var bed_numberss = parseInt(bed_numbers)
592
-      this.form.bed_number = bed_numberss
593
-      console.log('购买日期', this.form.buy_date)
594
-
595 587
       if (this.form.revers_mode === '') {
596 588
         this.form.revers_mode = 0
597 589
       }

+ 53 - 52
src/xt_pages/management/components/PlanForm.vue Прегледај датотеку

@@ -14,7 +14,7 @@
14 14
                 <el-option
15 15
                   v-for="item in this.DeviceType"
16 16
                   :key="item.id"
17
-                  :label="item.unit_type"
17
+                  :label="item.equitment_name"
18 18
                   :value="item.id"
19 19
                 ></el-option>
20 20
               </el-select>
@@ -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,56 +158,56 @@ 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,
@@ -222,14 +222,14 @@ export default {
222 222
       getAllEquimentName().then(response => {
223 223
         if (response.data.state === 1) {
224 224
           var equit = response.data.data.equit;
225
-          console.log("equit", equit);
225
+          console.log('equit', equit);
226 226
           // this.DeviceType = equit;
227 227
         }
228 228
       });
229 229
     },
230 230
     savePlan(formName) {
231 231
       var equimentid = this.equimentid;
232
-      console.log("equimentid", equimentid);
232
+      console.log('equimentid', equimentid);
233 233
       var devicetype = this.form.device_type;
234 234
       var devicetypes = parseInt(devicetype);
235 235
       this.form.device_type = devicetypes;
@@ -252,26 +252,27 @@ export default {
252 252
       savePlan(this.form, this.equimentid).then(response => {
253 253
         if (response.data.state === 1) {
254 254
           var msg = response.data.data.msg;
255
-          console.log("msg", msg);
256
-          this.$message.success("保存成功");
255
+          console.log('msg', msg);
256
+          this.$message.success('保存成功');
257 257
           this.dialogVisible = false;
258
-          this.$emit("getAllPlan");
259
-          this.$emit("getAllPlanDetail");
258
+          this.$emit('getAllPlan');
259
+          this.$emit('getAllPlanDetail');
260 260
           // 如果保存成功通过状态值改变父组键表格的值
261 261
           this.plandata = 1;
262
-          this.$emit("func", this.plandata);
262
+          this.$emit('func', this.plandata);
263 263
         } else {
264
-          this.$message.error("该消毒计划已存在");
264
+          this.$message.error('该消毒计划已存在');
265 265
         }
266 266
       });
267 267
     },
268 268
     getAllEquitType() {
269 269
       getAllEquitType().then(response => {
270 270
         if (response.data.state === 1) {
271
-          var addmacher = response.data.data.addmacher;
272
-          this.DeviceType = addmacher;
271
+          var equitname = response.data.data.equitname
272
+          console.log('equitname=============', equitname)
273
+          this.DeviceType = equitname
273 274
         }
274
-      });
275
+      })
275 276
     }
276 277
   },
277 278
   created() {

+ 1 - 1
src/xt_pages/management/components/RepairForm.vue Прегледај датотеку

@@ -63,7 +63,7 @@
63 63
           width="55"
64 64
         ></el-table-column>
65 65
         <el-table-column prop="date" label="机号" width="80" align="center">
66
-          <template slot-scope="scope">{{ scope.row.bed_id }}</template>
66
+          <template slot-scope="scope">{{ scope.row.bed_number}}</template>
67 67
         </el-table-column>
68 68
         <el-table-column
69 69
           prop="name"

+ 8 - 5
src/xt_pages/management/components/UserForm.vue Прегледај датотеку

@@ -1621,9 +1621,10 @@ export default {
1621 1621
       getUserForm(id, this.limit, this.page).then(response => {
1622 1622
         if (response.data.state === 1) {
1623 1623
           var information = response.data.data.information
1624
-          console.log('洗濯', information)
1624
+          // eslint-disable-next-line no-unused-vars
1625 1625
           var addmacher = response.data.data.addmacher
1626
-          this.bed = addmacher.bed_number
1626
+          // console.log('addmacher', addmacher)
1627
+          // this.bed = addmacher.bed_number
1627 1628
 
1628 1629
           for (let index = 0; index < information.length; index++) {
1629 1630
             if (information[index].class === 1) {
@@ -1862,20 +1863,23 @@ export default {
1862 1863
       getBedForm(id).then(response => {
1863 1864
         if (response.data.state === 1) {
1864 1865
           var addmacher = response.data.data.addmacher
1866
+          console.log('addmacher=============', addmacher)
1865 1867
           var number = response.data.data.number
1866
-          console.log('number-------', number)
1868
+          console.log('number',number)
1867 1869
           this.form.zone = addmacher.zone_id
1868 1870
           this.form.bed = addmacher.bed_id
1869
-
1871
+           
1870 1872
           var bed = [{ id: 0, number: '全部' }]
1871 1873
           for (let i = 0; i < number.length; i++) {
1872 1874
             const item = number[i]
1873 1875
             bed.push({ id: item.id, number: item.number })
1874 1876
           }
1877
+          console.log('bed是什么点东西', bed)
1875 1878
           this.bedNumberTwo = bed
1876 1879
         }
1877 1880
       })
1878 1881
     },
1882
+    // eslint-disable-next-line no-dupe-keys
1879 1883
     querySearchAsync(keyword, cb) {
1880 1884
       let key = ''
1881 1885
       if (keyword != undefined) {
@@ -1899,7 +1903,6 @@ export default {
1899 1903
       };
1900 1904
     },
1901 1905
     handleSelect(item) {
1902
-      console.log('item====', item)
1903 1906
       this.userform.patient_id = item.id
1904 1907
       this.userform.patient_name = item.name
1905 1908
     },

+ 140 - 59
src/xt_pages/management/home.vue Прегледај датотеку

@@ -326,6 +326,11 @@
326 326
                                   </el-select>
327 327
                                  </el-form-item>
328 328
                               </el-col>
329
+                               <el-col :span="7">
330
+                                   <el-form-item label="机号">
331
+                                       <el-input style="width:150px" v-model="form.bed_number" :disabled="disableFour"></el-input>
332
+                                   </el-form-item>
333
+                               </el-col>
329 334
                              </el-row>
330 335
                              <el-row>
331 336
                                <el-col :span="7">
@@ -466,6 +471,32 @@
466 471
                                        <el-input style="width:150px" v-model="form.work_time" :disabled="disableFour"></el-input>
467 472
                                    </el-form-item>
468 473
                                 </el-col>
474
+                             </el-row>
475
+                             <el-row>
476
+                                <el-col :span="8">
477
+                                    <el-form-item label="消毒方式:">
478
+                                        <el-select style="width:135px" v-model="form.Disinfection_mode" :disabled="disableFour">
479
+                                          <el-option
480
+                                           v-for="item in this.DisinfectionMode"
481
+                                           :key="item.id"
482
+                                           :label="item.name"
483
+                                           :value="item.id"
484
+                                           ></el-option>
485
+                                         </el-select>
486
+                                     </el-form-item>
487
+                                  </el-col>
488
+                                 <el-col :span="8">
489
+                                  <el-form-item label="反渗模式:">
490
+                                      <el-select style="width:135px" v-model="form.revers_mode" :disabled="disableFour">
491
+                                        <el-option
492
+                                            v-for="item in this.reverseMode"
493
+                                            :key="item.id"
494
+                                            :label="item.name"
495
+                                             :value="item.id"
496
+                                       ></el-option>
497
+                                       </el-select>
498
+                                   </el-form-item>
499
+                                  </el-col>
469 500
                              </el-row>
470 501
                               <el-row>
471 502
                                <div class="but">
@@ -795,7 +826,7 @@
795 826
                                         <el-table-column align="center" type="selection" width="55"></el-table-column>
796 827
                                         <el-table-column label="型号" align="center" min-width="70px">
797 828
                                                 <template slot-scope="scope">
798
-                                                    {{scope.row.unit_type}}
829
+                                                    {{scope.row.equitment_name}}
799 830
                                                  </template>
800 831
                                         </el-table-column>
801 832
                                          <el-table-column label="时间" align="center" min-width="70px" >
@@ -1014,7 +1045,7 @@
1014 1045
                                   <el-col :span="8">
1015 1046
                                         <el-form-item label="运行:">
1016 1047
                                            <el-radio-group v-model="userform.run" @change="changeRun">
1017
-                                                <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in runOption" :key="index">{{gender.name}}</el-radio>
1048
+                                                <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in runOption" :key="gender.id">{{gender.name}}</el-radio>
1018 1049
                                             </el-radio-group>
1019 1050
                                         </el-form-item>
1020 1051
                                   </el-col>
@@ -1875,7 +1906,7 @@
1875 1906
                 <el-option
1876 1907
                   v-for="item in this.DeviceType"
1877 1908
                   :key="item.id"
1878
-                  :label="item.unit_type"
1909
+                  :label="item.equitment_name"
1879 1910
                   :value="item.id"
1880 1911
                 ></el-option>
1881 1912
               </el-select>
@@ -1994,7 +2025,7 @@
1994 2025
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1995 2026
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1996 2027
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
1997
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient } from '@/api/manage'
2028
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getAllpatient, UpdateMachineInfoTwo } from '@/api/manage'
1998 2029
   import { uParseTime } from '@/utils/tools'
1999 2030
   import { getToken } from '@/api/qiniu'
2000 2031
   import PlanForm from './components/PlanForm'
@@ -2062,7 +2093,9 @@ export default {
2062 2093
           work_time: '',
2063 2094
           treat_mode: [],
2064 2095
           treat_type: [],
2065
-          bed: '' // 治疗模式
2096
+          bed: '', // 治疗模式
2097
+          Disinfection_mode: '',
2098
+          revers_mode: ''
2066 2099
         },
2067 2100
         activeName: 'first',
2068 2101
         activeNameTwo: 'first',
@@ -2135,12 +2168,12 @@ export default {
2135 2168
         },
2136 2169
         qualitRules: {
2137 2170
           detection_unit: [{ required: true, message: '请填写检测单位' }],
2138
-          sampler: [{ required: true, message: '请填写取样者' }],
2171
+          sampler: [{ required: true, message: '请填写取样者' }]
2139 2172
 
2140 2173
         },
2141 2174
         diaRules: {
2142 2175
           detection_unit: [{ required: true, message: '请填写检测单位' }],
2143
-          samplerb: [{ required: true, message: '请填写取样者' }],
2176
+          samplerb: [{ required: true, message: '请填写取样者' }]
2144 2177
         },
2145 2178
         repirRules: {
2146 2179
           guarantee_date: [{ required: true, message: '请填写保修日期' }],
@@ -2361,7 +2394,7 @@ export default {
2361 2394
           detection_unit: '', // 检测单位
2362 2395
           sampler: '', // 取样者
2363 2396
           reporting_date: '', // 报告日期
2364
-          detection_result: '', // 检测结果
2397
+          detection_result: '' // 检测结果
2365 2398
         },
2366 2399
         qualityFormTwo: {
2367 2400
           // 内毒素检测
@@ -2373,7 +2406,7 @@ export default {
2373 2406
           sampling_locationb: '', // 采样部位
2374 2407
           samplerb: '', // 取样者
2375 2408
           reporting_dateb: '', // 出报告日期
2376
-          detection_resultb: '', // 检测结果
2409
+          detection_resultb: '' // 检测结果
2377 2410
         },
2378 2411
         qualityFormThree: {
2379 2412
           detection_unit: '', // 检测单位
@@ -2455,6 +2488,11 @@ export default {
2455 2488
         warnShowThree: false,
2456 2489
         bedZoneThree: [],
2457 2490
         bedNumberTwo: [],
2491
+        reverseMode: [
2492
+          { id: 0, name: '请选择' },
2493
+          { id: 1, name: '单级反渗' },
2494
+          { id: 2, name: '双级反渗' }
2495
+        ]
2458 2496
       }
2459 2497
     },
2460 2498
     methods: {
@@ -2463,7 +2501,7 @@ export default {
2463 2501
           this.runDisable = true
2464 2502
           this.userform.failure_stage = ''
2465 2503
         }
2466
-        if (val===2) {
2504
+        if (val === 2) {
2467 2505
           this.runDisable = false
2468 2506
         }
2469 2507
       },
@@ -2526,7 +2564,6 @@ export default {
2526 2564
             bed.push({ id: item.id, number: item.number })
2527 2565
           }
2528 2566
           this.bedNumberTwo = bed
2529
-          console.log('bed', bed)
2530 2567
           this.bedZoneTwo = zones
2531 2568
           this.bedZoneThree = zoness
2532 2569
           this.bedNumber = numbers
@@ -2558,22 +2595,23 @@ export default {
2558 2595
         })
2559 2596
       },
2560 2597
       handleCurrentChange(val) {
2598
+        console.log('val是什么', val)
2561 2599
         this.currentRow = val
2562 2600
         this.$forceUpdate()
2563 2601
         this.getMachineDetailById(val.id)
2564 2602
         this.equimentid = val.id
2565 2603
         this.userdata = val.id
2566
-        this.getAllPlanDetail(val.id)
2604
+        this.getAllPlanDetail(val.unit_type)
2567 2605
         this.getPatientInfo(val.id)
2568 2606
         // 获取基本信息
2569 2607
         this.getUserRegister(val.id)
2570
-        //病人下机后插入数据
2608
+        // 病人下机后插入数据
2571 2609
         this.getAutoData(val.id)
2572 2610
         this.getTotalNumber(val.id)
2573 2611
         this.getTimeWarning(val.id)
2574 2612
       },
2575 2613
       getAutoData(id) {
2576
-        getAutoData(id).then(response=>{
2614
+        getAutoData(id).then(response => {
2577 2615
           if (response.data.state === 1) {
2578 2616
             var dialysis = response.data.data.dialysis
2579 2617
           }
@@ -2583,14 +2621,15 @@ export default {
2583 2621
         getMachineDetailById(id).then(response => {
2584 2622
           if (response.data.state === 1) {
2585 2623
             var addmacher = response.data.data.addmacher
2624
+           // console.log('addmacher======', addmacher)
2586 2625
             if (addmacher.device_type === 1) {
2587
-              this.sShow = false;
2588
-              this.qShow = false;
2589
-              this.tShow = true;
2590
-              this.DisShow = true;
2591
-              this.DioShow = false;
2592
-              this.zhiShow = true;
2593
-              this.zhShow = false;
2626
+              this.sShow = false
2627
+              this.qShow = false
2628
+              this.tShow = true
2629
+              this.DisShow = true
2630
+              this.DioShow = false
2631
+              this.zhiShow = true
2632
+              this.zhShow = false
2594 2633
               this.UserShow = true
2595 2634
               this.Ushow = false
2596 2635
             }
@@ -2714,6 +2753,20 @@ export default {
2714 2753
             this.form.rubbish_reason = addmacher.rubbish_reason
2715 2754
             this.form.user_year = addmacher.user_year
2716 2755
             this.form.work_time = addmacher.work_time
2756
+  
2757
+            // eslint-disable-next-line eqeqeq
2758
+            if (addmacher.disinfection_mode == 0) {
2759
+              this.form.Disinfection_mode = 0
2760
+            } else {
2761
+              this.form.Disinfection_mode = addmacher.disinfection_mode
2762
+            }
2763
+
2764
+            // eslint-disable-next-line eqeqeq
2765
+            if (addmacher.revers_mode == 0) {
2766
+              this.form.revers_mode = 0
2767
+            } else {
2768
+              this.form.revers_mode = addmacher.revers_mode
2769
+            }
2717 2770
             this.getAllSubregion()
2718 2771
           }
2719 2772
         })
@@ -2814,6 +2867,7 @@ export default {
2814 2867
         })
2815 2868
       },
2816 2869
 
2870
+      // eslint-disable-next-line no-irregular-whitespace
2817 2871
       // 更新水处理机
2818 2872
       UpdateMachineInfoTwo(formName) {
2819 2873
         var device_type = this.form.devicetype
@@ -2830,10 +2884,20 @@ export default {
2830 2884
         var machine_status = this.form.machine_status
2831 2885
         var machine_statuss = parseInt(machine_status)
2832 2886
         this.form.machine_status = machine_statuss
2833
-        this.$refs[formName].validate(valid=>{
2887
+  
2888
+        var revers_mode = this.form.revers_mode
2889
+        var revers_modes = parseInt(revers_mode)
2890
+        this.form.revers_mode = revers_modes
2891
+
2892
+        var disinfecction_modes = this.form.Disinfection_mode
2893
+        var disinfecction_modess = parseInt(disinfecction_modes)
2894
+        this.form.Disinfection_mode = disinfecction_modess
2895
+       
2896
+        this.$refs[formName].validate(valid => {
2834 2897
           if (valid) {
2835
-            UpdateMacheineTwo(this.form).then(response=>{
2898
+            UpdateMachineInfoTwo(this.form).then(response => {
2836 2899
               if (response.data.state === 1) {
2900
+                // eslint-disable-next-line no-unused-vars
2837 2901
                 var addmacher = response.data.data.addmacher
2838 2902
                 this.$message.success('修改成功')
2839 2903
                 this.getAllMachine()
@@ -2858,8 +2922,9 @@ export default {
2858 2922
         var machine_status = this.form.machine_status
2859 2923
         var machine_statuss = parseInt(machine_status)
2860 2924
         this.form.machine_status = machine_statuss
2861
-        this.$refs[formName].validate(valid =>{
2862
-          UpdateMacheineTwo(this.form).then(response=>{
2925
+  
2926
+        this.$refs[formName].validate(valid => {
2927
+          UpdateMacheineTwo(this.form).then(response => {
2863 2928
             if (response.data.state === 1) {
2864 2929
               var add = response.data.data.addmacher
2865 2930
               this.$message.success('修改成功')
@@ -2910,17 +2975,18 @@ export default {
2910 2975
       },
2911 2976
       changeMachineStatus(val) {
2912 2977
         if (val === 4) {
2913
-          this.readisable = false;
2978
+          this.readisable = false
2914 2979
         } else {
2915
-          this.readisable = true;
2916
-          this.form.rubbish_date = '';
2917
-          this.form.rubbish_reason = '';
2980
+          this.readisable = true
2981
+          this.form.rubbish_date = ''
2982
+          this.form.rubbish_reason = ''
2918 2983
         }
2919 2984
       },
2920 2985
       getAllPlan() {
2921 2986
         getAllPlan().then(response => {
2922 2987
           if (response.data.state === 1) {
2923 2988
             var plan = response.data.data.plan
2989
+            
2924 2990
             for (let index = 0; index < plan.length; index++) {
2925 2991
               if (plan[index].time === 1) {
2926 2992
                 plan[index].time = '周一'
@@ -3050,10 +3116,11 @@ export default {
3050 3116
           }
3051 3117
         })
3052 3118
       },
3053
-      getAllPlanDetail(id) {
3054
-        getAllPlanDetail(id).then(response => {
3119
+      getAllPlanDetail(unit_type) {
3120
+        getAllPlanDetail(unit_type).then(response => {
3055 3121
           if (response.data.state === 1) {
3056 3122
             var plandetail = response.data.data.plandetail
3123
+            console.log('plandetail=====================', plandetail)
3057 3124
             for (let index = 0; index < plandetail.length; index++) {
3058 3125
               if (plandetail[index].time === 1) {
3059 3126
                 plandetail[index].time = '周一'
@@ -3372,7 +3439,7 @@ export default {
3372 3439
         ChangeClass(this.equimentid, id).then(response => {
3373 3440
           if (response.data.state === 1) {
3374 3441
             var patients = response.data.data.patients
3375
-            console.log('patients', patients)
3442
+           
3376 3443
             if (patients.is_infectious === 0) {
3377 3444
               this.userform.contagion = ''
3378 3445
             }
@@ -3387,10 +3454,10 @@ export default {
3387 3454
             this.userform.patient_id = patients.patient_id
3388 3455
             // this.userform.patient_name = patients.name
3389 3456
             var zone = response.data.data.zone
3390
-            console.log('zone==========', zone)
3457
+            // console.log('zone==========', zone)
3391 3458
             this.userform.zone = zone.id
3392 3459
             var number = response.data.data.number
3393
-            console.log('nubmer', number)
3460
+            // console.log('nubmer', number)
3394 3461
             this.userform.bed_number = number.id
3395 3462
             // this.userform.bed_number = number.number
3396 3463
             var order = response.data.data.order
@@ -3519,13 +3586,16 @@ export default {
3519 3586
         if (this.userform.end_time === '') {
3520 3587
           this.userform.end_time = '0'
3521 3588
         }
3589
+        if (this.userform.user_total === '0') {
3590
+          this.userform.user_total = 0
3591
+        }
3522 3592
         this.$refs[formName].validate((valid) => {
3523 3593
           if (valid) {
3524 3594
             SaveInformation(this.equimentid, this.userform).then(response => {
3525 3595
               if (response.data.state === 1) {
3526 3596
                 // eslint-disable-next-line no-unused-vars
3527 3597
                 var information = response.data.data.information
3528
-
3598
+                var infor = response.data.data.infor
3529 3599
                 this.$message.success('添加成功')
3530 3600
                 // this.$refs.child.getInformationData()
3531 3601
               }
@@ -3567,14 +3637,19 @@ export default {
3567 3637
         getUserRegister(id).then(response => {
3568 3638
           if (response.data.state === 1) {
3569 3639
             var information = response.data.data.information
3570
-            console.log('information========', information)
3571
-
3572 3640
             // eslint-disable-next-line no-unused-vars
3573 3641
             var role = response.data.data.role
3574 3642
             // console.log('role', role)
3575 3643
             // eslint-disable-next-line eqeqeq
3644
+            var dislysis = response.data.data.dislysis
3645
+           
3576 3646
             this.userform.id = information.id
3577
-            this.userform.date = information.date
3647
+            if (information.date == 0) {
3648
+              this.userform.date = moment(new Date()).format('YYYY-MM-DD')
3649
+            } else {
3650
+              this.userform.date = uParseTime(information.date, '{y}-{m}-{d}')
3651
+            }
3652
+
3578 3653
             this.userform.classtype = information.class
3579 3654
             this.userform.zone = information.zone
3580 3655
             this.userform.bed_number = information.bed_number
@@ -3583,15 +3658,22 @@ export default {
3583 3658
             this.userform.patient_id = information.patient_id
3584 3659
             this.userform.contagion = information.contagion
3585 3660
             this.userform.dialysis_mode = information.dialysis_mode
3586
-            this.userform.date = uParseTime(information.date, '{y}-{m}-{d} {h}:{i}')
3661
+
3587 3662
             this.userform.start_time = uParseTime(information.start_time, '{y}-{m}-{d} {h}:{i}')
3588 3663
             this.userform.end_time = uParseTime(information.end_time, '{y}-{m}-{d} {h}:{i}')
3589
-            this.userform.dialysis_time = information.dialysis_hour
3590
-            this.userform.hyperfiltratio = information.hyperfiltratio
3591
-            this.userform.weight_loss = information.weight_loss
3664
+            // this.userform.dialysis_time = information.dialysis_hour
3665
+            // this.userform.hyperfiltratio = information.hyperfiltratio
3666
+            // this.userform.weight_loss = information.weight_loss
3667
+            this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
3668
+            this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3669
+            this.userform.weight_loss = dislysis.weight_loss
3592 3670
             this.userform.warning_value = information.warning_value
3593 3671
             this.userform.user_total = information.user_total
3594
-            this.userform.run = information.move
3672
+            if (information.move == 0) {
3673
+              this.userform.run = 1
3674
+            } else {
3675
+              this.userform.run = information.move
3676
+            }
3595 3677
             this.userform.failure_stage = information.failure_stage
3596 3678
             this.userform.fault_description = information.fault_description
3597 3679
             this.userform.code_information = information.code_information
@@ -3637,7 +3719,6 @@ export default {
3637 3719
             } else {
3638 3720
               this.userform.sign_name = information.admin_user_id
3639 3721
             }
3640
-
3641 3722
             this.$forceUpdate()
3642 3723
           }
3643 3724
         })
@@ -3742,7 +3823,7 @@ export default {
3742 3823
             SaveQualityControl(this.equimentid, this.qualityFormThree).then(response => {
3743 3824
               if (response.data.state === 1) {
3744 3825
                 var ion = response.data.data.ion
3745
-                //console.log('ion', ion)
3826
+                // console.log('ion', ion)
3746 3827
                 this.$message.success('保存成功')
3747 3828
                 this.$refs.child.getAllQulityInfo()
3748 3829
                 this.qualityFormThree.samplerc = ''
@@ -3859,7 +3940,7 @@ export default {
3859 3940
           this.guaForm.finish_time = '0'
3860 3941
         }
3861 3942
 
3862
-        if ( this.guaForm.failure_stage === '') {
3943
+        if (this.guaForm.failure_stage === '') {
3863 3944
           this.guaForm.failure_stage = '0'
3864 3945
         }
3865 3946
 
@@ -3881,8 +3962,8 @@ export default {
3881 3962
                 console.log('reqair', repair)
3882 3963
                 this.$message.success('保存成功')
3883 3964
                 this.$refs.child.getAllRepair()
3884
-                this.guaForm.start_time = '';
3885
-                this.guaForm.arrive_time = '';
3965
+                this.guaForm.start_time = ''
3966
+                this.guaForm.arrive_time = ''
3886 3967
                 this.guaForm.finish_time = ''
3887 3968
                 this.guaForm.total_distance = ''
3888 3969
                 this.guaForm.code_information = ''
@@ -3918,24 +3999,24 @@ export default {
3918 3999
       },
3919 4000
       createFilter(queryString) {
3920 4001
         return (searchArray) => {
3921
-          return (searchArray.id.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
3922
-        };
4002
+          return (searchArray.id.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
4003
+        }
3923 4004
       },
3924 4005
       handleSelect(item) {
3925
-        console.log('item====', item)
3926 4006
         this.userform.patient_id = item.id
3927 4007
         this.userform.patient_name = item.name
3928 4008
       },
3929 4009
       getAllEquitType() {
3930 4010
         getAllEquitType().then(response => {
3931 4011
           if (response.data.state === 1) {
3932
-            var addmacher = response.data.data.addmacher
3933
-            this.DeviceType = addmacher
4012
+            var equitname = response.data.data.equitname
4013
+            console.log('区号================', equitname)
4014
+            this.DeviceType = equitname
3934 4015
           }
3935 4016
         })
3936 4017
       },
3937 4018
       getTotalNumber() {
3938
-        getTotalNumber(this.equimentid).then(response=>{
4019
+        getTotalNumber(this.equimentid).then(response => {
3939 4020
           if (response.data.state === 1) {
3940 4021
             var total = response.data.data.total
3941 4022
             if (total === '') {
@@ -3948,16 +4029,16 @@ export default {
3948 4029
         })
3949 4030
       },
3950 4031
       getAllpatient() {
3951
-        getAllpatient().then(response=>{
4032
+        getAllpatient().then(response => {
3952 4033
           if (response.data.state === 1) {
3953 4034
             var allpatient = response.data.data.allpatient
3954
-            console.log('all', allpatient)
4035
+          
3955 4036
             this.patientName = allpatient
3956 4037
           }
3957 4038
         })
3958 4039
       },
3959 4040
       getTimeWarning(id) {
3960
-        getTimeWarning(id).then(response=>{
4041
+        getTimeWarning(id).then(response => {
3961 4042
           if (response.data.state === 1) {
3962 4043
             var information = response.data.data.information
3963 4044
             var time = this.userform.date - information.date
@@ -3983,7 +4064,7 @@ export default {
3983 4064
         if (data === 1) {
3984 4065
           this.getAllPlanDetail(this.equimentid)
3985 4066
         }
3986
-      },
4067
+      }
3987 4068
     },
3988 4069
     created() {
3989 4070
       this.getAllSubregion()
@@ -3997,7 +4078,7 @@ export default {
3997 4078
       this.getOrgName()
3998 4079
       this.getAllEquitType()
3999 4080
       this.getAllpatient()
4000
-    },
4081
+    }
4001 4082
   }
4002 4083
 </script>
4003 4084
 <style lang="scss" scoped>