xiaoming_global преди 5 години
родител
ревизия
677062c885

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

@@ -71,6 +71,7 @@ export function getMachineDetailById(id, params) {
71 71
 }
72 72
 
73 73
 export function UpdateMachineInfo(data) {
74
+  console.log("data..", data);
74 75
   return request({
75 76
     url: "/api/management/updatemachineinfo",
76 77
     method: "Post",
@@ -153,8 +154,7 @@ export function getComprehensive(params) {
153 154
 }
154 155
 
155 156
 export function SaveInformation(id, data) {
156
-  console.log("id", id);
157
-  console.log("data", data);
157
+  console.log("data是什么东西", data);
158 158
   return request({
159 159
     url: "/api/manage/saveinformation?id=" + id,
160 160
     method: "Post",
@@ -455,3 +455,11 @@ export function queryInfo(zone, bed, startime, endtime, limit, page) {
455 455
     params: params
456 456
   });
457 457
 }
458
+
459
+export function getAutoData(id, params) {
460
+  return request({
461
+    url: "/api/manage/insertautodata?id=" + id,
462
+    method: "Get",
463
+    params: params
464
+  });
465
+}

+ 1 - 1
src/router/modules/device.js Целия файл

@@ -39,7 +39,7 @@ export default {
39 39
     {
40 40
       path: "/device/main",
41 41
       component: () => import("@/xt_pages/management/index"),
42
-      // component: () => import('@/xt_pages/device/main'),
42
+      // component: () => import("@/xt_pages/device/main"),
43 43
       name: "dialysisMachineManage",
44 44
       meta: {
45 45
         title: "dialysisMachineManage"

+ 143 - 146
src/utils/tools.js Целия файл

@@ -1,171 +1,168 @@
1
-export function getFileExtension (filename) {
2
-    var tempArr = filename.split(".");
3
-    var ext;
4
-    if (tempArr.length === 1 || (tempArr[0] === "" && tempArr.length === 2)) {
5
-        ext = "";
6
-    } else {
7
-        ext = tempArr.pop().toLowerCase(); //get the extension and make it lower-case
8
-    }
9
-    return ext;
1
+export function getFileExtension(filename) {
2
+  var tempArr = filename.split(".");
3
+  var ext;
4
+  if (tempArr.length === 1 || (tempArr[0] === "" && tempArr.length === 2)) {
5
+    ext = "";
6
+  } else {
7
+    ext = tempArr.pop().toLowerCase(); // get the extension and make it lower-case
8
+  }
9
+  return ext;
10 10
 }
11 11
 
12
-export function isCardNo(card) 
13
-{ 
14
-    // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X 
15
-    var reg_18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
16
-    var reg_15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
12
+export function isCardNo(card) {
13
+  // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
14
+  var reg_18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
15
+  var reg_15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
17 16
 
18
-    return reg_18.test(card) || reg_15.test(card)
17
+  return reg_18.test(card) || reg_15.test(card);
19 18
 }
20 19
 
21 20
 export function jsGetAge(strBirthday, splitstr) {
22
-    var returnAge;
23
-    var strBirthdayArr = strBirthday.split(splitstr);
24
-    var birthYear = strBirthdayArr[0];
25
-    var birthMonth = strBirthdayArr[1];
26
-    var birthDay = strBirthdayArr[2];
27
-    var d = new Date();
28
-    var nowYear = d.getFullYear();
29
-    var nowMonth = d.getMonth() + 1;
30
-    var nowDay = d.getDate();
31
-    if (nowYear == birthYear) {
32
-        returnAge = 0;//同年 则为0岁
33
-    }
34
-    else {
35
-        var ageDiff = nowYear - birthYear; //年之差
36
-        if (ageDiff > 0) {
37
-            if (nowMonth == birthMonth) {
38
-                var dayDiff = nowDay - birthDay;//日之差
39
-                if (dayDiff < 0) {
40
-                    returnAge = ageDiff - 1;
41
-                }
42
-                else {
43
-                    returnAge = ageDiff;
44
-                }
45
-            }
46
-            else {
47
-                var monthDiff = nowMonth - birthMonth;//月之差
48
-                if (monthDiff < 0) {
49
-                    returnAge = ageDiff - 1;
50
-                }
51
-                else {
52
-                    returnAge = ageDiff;
53
-                }
54
-            }
21
+  var returnAge;
22
+  var strBirthdayArr = strBirthday.split(splitstr);
23
+  var birthYear = strBirthdayArr[0];
24
+  var birthMonth = strBirthdayArr[1];
25
+  var birthDay = strBirthdayArr[2];
26
+  var d = new Date();
27
+  var nowYear = d.getFullYear();
28
+  var nowMonth = d.getMonth() + 1;
29
+  var nowDay = d.getDate();
30
+  if (nowYear == birthYear) {
31
+    returnAge = 0; // 同年 则为0岁
32
+  } else {
33
+    var ageDiff = nowYear - birthYear; // 年之差
34
+    if (ageDiff > 0) {
35
+      if (nowMonth == birthMonth) {
36
+        var dayDiff = nowDay - birthDay; // 日之差
37
+        if (dayDiff < 0) {
38
+          returnAge = ageDiff - 1;
39
+        } else {
40
+          returnAge = ageDiff;
55 41
         }
56
-        else {
57
-            returnAge = -1;//返回-1 表示出生日期输入错误 晚于今天
42
+      } else {
43
+        var monthDiff = nowMonth - birthMonth; // 月之差
44
+        if (monthDiff < 0) {
45
+          returnAge = ageDiff - 1;
46
+        } else {
47
+          returnAge = ageDiff;
58 48
         }
49
+      }
50
+    } else {
51
+      returnAge = -1; // 返回-1 表示出生日期输入错误 晚于今天
59 52
     }
53
+  }
60 54
 
61
-    return returnAge;//返回周岁年龄
62
-
55
+  return returnAge; // 返回周岁年龄
63 56
 }
64 57
 
65
-export function isPositiveInteger(s){//是否为正整数
66
-    var re = /^[0-9]+$/ ;
67
-    return re.test(s)
68
-} 
58
+export function isPositiveInteger(s) {
59
+  // 是否为正整数
60
+  var re = /^[0-9]+$/;
61
+  return re.test(s);
62
+}
69 63
 
70 64
 export function isPositiveNumber(s) {
71
-    var re = /^\d+(\.\d+)?$/ ;
72
-    return re.test(s)
65
+  var re = /^\d+(\.\d+)?$/;
66
+  return re.test(s);
73 67
 }
74 68
 
75 69
 export function dialysisAge(firstDialysisDate) {
76
-    var dialysisAge;
77
-    var startDate = firstDialysisDate.split('-');
78
-    var startYear = startDate[0];
79
-    var startMonth = startDate[1];
80
-    var startDay = startDate[2];
81
-    var d = new Date();
82
-    var nowYear = d.getFullYear();
83
-    var nowMonth = d.getMonth() + 1;
84
-    var nowDay = d.getDate();
70
+  var dialysisAge;
71
+  var startDate = firstDialysisDate.split("-");
72
+  var startYear = startDate[0];
73
+  var startMonth = startDate[1];
74
+  var startDay = startDate[2];
75
+  var d = new Date();
76
+  var nowYear = d.getFullYear();
77
+  var nowMonth = d.getMonth() + 1;
78
+  var nowDay = d.getDate();
85 79
 
86
-    var diffYear = nowYear-startYear;
87
-    var diffMonth = nowMonth-startMonth;
88
-    var diffDay = nowDay-startDay;
89
-    if (diffYear<0) {
90
-        dialysisAge = "";
91
-    }else if (diffYear==0) {
92
-        if (diffMonth<0){
93
-            dialysisAge = "";
94
-        }else if (diffMonth==0 && diffDay<0){
95
-            dialysisAge = "";
96
-        } else {
97
-            if (diffDay<0) {
98
-                diffMonth -=1;
99
-            }
100
-            dialysisAge = diffMonth+"个月";
101
-        }
102
-    }else {
103
-        if (diffDay<0) {
104
-            diffMonth -=1;
105
-        }
106
-        if (diffMonth<0) {
107
-            diffYear -=1;
108
-            diffMonth += 12;
109
-        }
110
-        if (diffYear>0&&diffMonth>0) {
111
-            dialysisAge = diffYear+"年零"+diffMonth+"个月";
112
-        }else if (diffYear>0) {
113
-            dialysisAge = diffYear+"年";
114
-        }else {
115
-            dialysisAge = diffMonth+"个月";
116
-        }
80
+  var diffYear = nowYear - startYear;
81
+  var diffMonth = nowMonth - startMonth;
82
+  var diffDay = nowDay - startDay;
83
+  if (diffYear < 0) {
84
+    dialysisAge = "";
85
+  } else if (diffYear == 0) {
86
+    if (diffMonth < 0) {
87
+      dialysisAge = "";
88
+    } else if (diffMonth == 0 && diffDay < 0) {
89
+      dialysisAge = "";
90
+    } else {
91
+      if (diffDay < 0) {
92
+        diffMonth -= 1;
93
+      }
94
+      dialysisAge = diffMonth + "个月";
95
+    }
96
+  } else {
97
+    if (diffDay < 0) {
98
+      diffMonth -= 1;
117 99
     }
100
+    if (diffMonth < 0) {
101
+      diffYear -= 1;
102
+      diffMonth += 12;
103
+    }
104
+    if (diffYear > 0 && diffMonth > 0) {
105
+      dialysisAge = diffYear + "年零" + diffMonth + "个月";
106
+    } else if (diffYear > 0) {
107
+      dialysisAge = diffYear + "年";
108
+    } else {
109
+      dialysisAge = diffMonth + "个月";
110
+    }
111
+  }
118 112
 
119
-    return dialysisAge;//返回周岁年龄
113
+  return dialysisAge; // 返回周岁年龄
120 114
 }
121 115
 
122
-
123 116
 export function uParseTime(time, cFormat) {
124
-    if (arguments.length === 0) {
125
-      return null
126
-    }
127
-    const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
128
-    let date
129
-    if (typeof time === 'object') {
130
-      date = time
131
-    } else {
132
-      if (('' + time).length !== 13) time = parseInt(time) * 1000
133
-      date = new Date(time)
134
-    }
135
-    const formatObj = {
136
-      y: date.getFullYear(),
137
-      m: date.getMonth() + 1,
138
-      d: date.getDate(),
139
-      h: date.getHours(),
140
-      i: date.getMinutes(),
141
-      s: date.getSeconds(),
142
-      a: date.getDay()
143
-    }
144
-    const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
145
-      let value = formatObj[key]
146
-      if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
147
-      if (result.length > 0 && value < 10) {
148
-        value = '0' + value
149
-      }
150
-      return value || 0
151
-    })
152
-    return time_str
117
+  if (time === 0) {
118
+    return "";
153 119
   }
120
+  if (arguments.length === 0) {
121
+    return null;
122
+  }
123
+  const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}";
124
+  let date;
125
+  if (typeof time === "object") {
126
+    date = time;
127
+  } else {
128
+    if (("" + time).length !== 13) time = parseInt(time) * 1000;
129
+    date = new Date(time);
130
+  }
131
+  const formatObj = {
132
+    y: date.getFullYear(),
133
+    m: date.getMonth() + 1,
134
+    d: date.getDate(),
135
+    h: date.getHours(),
136
+    i: date.getMinutes(),
137
+    s: date.getSeconds(),
138
+    a: date.getDay()
139
+  };
140
+  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
141
+    let value = formatObj[key];
142
+    if (key === "a")
143
+      return ["一", "二", "三", "四", "五", "六", "日"][value - 1];
144
+    if (result.length > 0 && value < 10) {
145
+      value = "0" + value;
146
+    }
147
+    return value || 0;
148
+  });
149
+  return time_str;
150
+}
154 151
 
155
-  export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
156
-      var t = 0.5;
157
-      if (type==1) {
158
-          t = 0.5;
159
-      }else if (type == 2){
160
-          t = 1;
161
-      }else {
162
-          return 0;
163
-      }
164
-      shouji = parseFloat(shouji);
165
-      shichang = parseFloat(shichang);
166
-      weichi = parseFloat(weichi);
167
-      if (isNaN(shouji) ||isNaN(shichang) ||isNaN(weichi)) {
168
-          return 0
169
-      }
170
-      return (shouji + (shichang-t) * weichi).toFixed(1);
171
-  }
152
+export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
153
+  var t = 0.5;
154
+  if (type == 1) {
155
+    t = 0.5;
156
+  } else if (type == 2) {
157
+    t = 1;
158
+  } else {
159
+    return 0;
160
+  }
161
+  shouji = parseFloat(shouji);
162
+  shichang = parseFloat(shichang);
163
+  weichi = parseFloat(weichi);
164
+  if (isNaN(shouji) || isNaN(shichang) || isNaN(weichi)) {
165
+    return 0;
166
+  }
167
+  return (shouji + (shichang - t) * weichi).toFixed(1);
168
+}

+ 294 - 174
src/xt_pages/management/components/ManageForm.vue Целия файл

@@ -1,17 +1,29 @@
1 1
 <template>
2 2
   <div id="manage-form">
3
-    <el-dialog title="新增设备" :visible.sync="dialogVisible" width="50%" align="center">
3
+    <el-dialog
4
+      title="新增设备"
5
+      :visible.sync="dialogVisible"
6
+      width="52%"
7
+      align="center"
8
+    >
4 9
       <el-form ref="form" :model="form" :rules="rules">
5 10
         <el-row>
6 11
           <el-col :span="8">
7 12
             <el-form-item label="序列号:" required prop="serial_number">
8
-              <el-input style="width:135px" v-model="form.serial_number"></el-input>
13
+              <el-input
14
+                style="width:135px"
15
+                v-model="form.serial_number"
16
+              ></el-input>
9 17
             </el-form-item>
10 18
           </el-col>
11 19
 
12 20
           <el-col :span="8">
13 21
             <el-form-item label="设备类型:" required prop="device_type">
14
-              <el-select style="width:135px" v-model="form.device_type" @change="changeDeviceType">
22
+              <el-select
23
+                style="width:135px"
24
+                v-model="form.device_type"
25
+                @change="changeDeviceType"
26
+              >
15 27
                 <el-option
16 28
                   v-for="item in this.DeviceType"
17 29
                   :key="item.id"
@@ -23,12 +35,17 @@
23 35
           </el-col>
24 36
 
25 37
           <el-col :span="8">
26
-            <el-form-item label="机位号:" required prop="bed_number" v-show="bedShow">
38
+            <el-form-item
39
+              label="机位号:"
40
+              required
41
+              prop="bed_number"
42
+              v-show="bedShow"
43
+            >
27 44
               <el-select style="width:135px" v-model="form.bed_number">
28 45
                 <el-option
29 46
                   v-for="item in this.bedNumber"
30 47
                   :key="item.id"
31
-                  :label="item.zone_name + item.number"
48
+                  :label="item.number"
32 49
                   :value="item.id"
33 50
                 ></el-option>
34 51
               </el-select>
@@ -38,17 +55,26 @@
38 55
         <el-row>
39 56
           <el-col :span="8">
40 57
             <el-form-item label="设备名称:" required prop="device_name">
41
-              <el-input style="width:135px" v-model="form.device_name"></el-input>
58
+              <el-input
59
+                style="width:135px"
60
+                v-model="form.device_name"
61
+              ></el-input>
42 62
             </el-form-item>
43 63
           </el-col>
44 64
           <el-col :span="8">
45 65
             <el-form-item label="生产厂家:" prop="manufacture_factory">
46
-              <el-input style="width:135px" v-model="form.manufacture_factory"></el-input>
66
+              <el-input
67
+                style="width:135px"
68
+                v-model="form.manufacture_factory"
69
+              ></el-input>
47 70
             </el-form-item>
48 71
           </el-col>
49 72
           <el-col :span="8">
50 73
             <el-form-item label="维修厂家:" prop="service_manufacturer">
51
-              <el-input style="width:135px" v-model="form.service_manufacturer"></el-input>
74
+              <el-input
75
+                style="width:135px"
76
+                v-model="form.service_manufacturer"
77
+              ></el-input>
52 78
             </el-form-item>
53 79
           </el-col>
54 80
         </el-row>
@@ -60,12 +86,18 @@
60 86
           </el-col>
61 87
           <el-col :span="8">
62 88
             <el-form-item label="使用科室:" prop="use_section">
63
-              <el-input style="width:135px" v-model="form.use_section"></el-input>
89
+              <el-input
90
+                style="width:135px"
91
+                v-model="form.use_section"
92
+              ></el-input>
64 93
             </el-form-item>
65 94
           </el-col>
66 95
           <el-col :span="8">
67 96
             <el-form-item label="科室编号:" prop="section_number">
68
-              <el-input style="width:135px" v-model="form.section_number"></el-input>
97
+              <el-input
98
+                style="width:135px"
99
+                v-model="form.section_number"
100
+              ></el-input>
69 101
             </el-form-item>
70 102
           </el-col>
71 103
         </el-row>
@@ -79,7 +111,7 @@
79 111
                 placeholder="请选择"
80 112
                 format="yyyy-MM-dd"
81 113
                 value-format="yyyy-MM-dd"
82
-                style="width:135px"
114
+                style="width:140px"
83 115
               ></el-date-picker>
84 116
             </el-form-item>
85 117
           </el-col>
@@ -92,7 +124,7 @@
92 124
                 placeholder="请选择"
93 125
                 format="yyyy-MM-dd"
94 126
                 value-format="yyyy-MM-dd"
95
-                style="width:135px"
127
+                style="width:140px"
96 128
               ></el-date-picker>
97 129
             </el-form-item>
98 130
           </el-col>
@@ -105,7 +137,7 @@
105 137
                 placeholder="请选择"
106 138
                 format="yyyy-MM-dd"
107 139
                 value-format="yyyy-MM-dd"
108
-                style="width:135px"
140
+                style="width:140px"
109 141
               ></el-date-picker>
110 142
             </el-form-item>
111 143
           </el-col>
@@ -113,7 +145,10 @@
113 145
         <el-row>
114 146
           <el-col :span="8">
115 147
             <el-form-item label="维修工程师:" prop="maintenance_engineer">
116
-              <el-input style="width:135px" v-model="form.maintenance_engineer"></el-input>
148
+              <el-input
149
+                style="width:135px"
150
+                v-model="form.maintenance_engineer"
151
+              ></el-input>
117 152
             </el-form-item>
118 153
           </el-col>
119 154
           <el-col :span="8">
@@ -123,7 +158,10 @@
123 158
           </el-col>
124 159
           <el-col :span="8">
125 160
             <el-form-item label="保修期限:" prop="guarantee_date">
126
-              <el-input style="width:135px" v-model="form.guarantee_date"></el-input>
161
+              <el-input
162
+                style="width:135px"
163
+                v-model="form.guarantee_date"
164
+              ></el-input>
127 165
             </el-form-item>
128 166
           </el-col>
129 167
         </el-row>
@@ -145,8 +183,15 @@
145 183
             </el-form-item>
146 184
           </el-col>
147 185
           <el-col :span="8">
148
-            <el-form-item label="初次使用次数:" prop="user_total" v-show="totalShow">
149
-              <el-input v-model="form.user_total" style="width:135px"></el-input>
186
+            <el-form-item
187
+              label="初次使用次数:"
188
+              prop="user_total"
189
+              v-show="totalShow"
190
+            >
191
+              <el-input
192
+                v-model="form.user_total"
193
+                style="width:135px"
194
+              ></el-input>
150 195
             </el-form-item>
151 196
           </el-col>
152 197
           <el-col :span="8" v-show="DisinfectionShow">
@@ -223,8 +268,22 @@
223 268
         </el-row>
224 269
         <el-row>
225 270
           <el-col :span="24">
226
-            <el-form-item label="治疗模式:" prop="treat_mode" v-show="treatShow">
227
-              <el-checkbox-group v-model="form.treat_mode" @change="changetreatmentmode">
271
+            <el-form-item
272
+              label="治疗模式:"
273
+              prop="treat_mode"
274
+              v-show="treatShow"
275
+            >
276
+              <el-checkbox-group
277
+                v-model="form.treat_mode"
278
+                @change="changetreatmentmode"
279
+              >
280
+                <!-- <el-checkbox
281
+                  style="min-width:50px"
282
+                  v-for="item in treatmentmode"
283
+                  :key="item.id"
284
+                  :label="item.name"
285
+                  :value="item.id"
286
+                ></el-checkbox> -->
228 287
                 <el-checkbox
229 288
                   style="min-width:50px"
230 289
                   v-for="item in treatmentmode"
@@ -242,115 +301,121 @@
242 301
               :indeterminate="isIndeterminate"
243 302
               v-model="checkAll"
244 303
               @change="handleCheckAllChange"
245
-            >全选</el-checkbox>
304
+              >全选</el-checkbox
305
+            >
246 306
           </el-col>
247 307
         </el-row>
248 308
       </el-form>
249 309
       <span slot="footer" class="dialog-footer">
250 310
         <el-button @click="dialogVisible = false">取 消</el-button>
251
-        <el-button type="primary" @click="SaveManageInfo('form')">保存</el-button>
311
+        <el-button type="primary" @click="SaveManageInfo('form')"
312
+          >保存</el-button
313
+        >
252 314
       </span>
253 315
     </el-dialog>
254 316
   </div>
255 317
 </template>
256 318
 
257 319
 <script>
258
-import { getAllSubregion, SaveManageInfo } from "@/api/manage";
320
+import { getAllSubregion, SaveManageInfo } from '@/api/manage'
259 321
 const treatmentmodes = [
260
-  "HD",
261
-  "HDF",
262
-  "HD+HP",
263
-  "HP",
264
-  "HF",
265
-  "SCUF",
266
-  "IUF",
267
-  "HFHD+HP",
268
-  "HFR",
269
-  "HDF+HP",
270
-  "GRRT",
271
-  "腹水回收"
272
-];
322
+  'HD',
323
+  'HDF',
324
+  'HD+HP',
325
+  'HP',
326
+  'HF',
327
+  'SCUF',
328
+  'IUF',
329
+  'HFHD',
330
+  'HFHD+HP',
331
+  'PHF',
332
+  'HFR',
333
+  'HDF+HP',
334
+  'CRRT',
335
+  '腹水回输'
336
+]
273 337
 export default {
274
-  name: "ManageForm",
338
+  name: 'ManageForm',
275 339
   data() {
276 340
     return {
277 341
       dialogVisible: false,
278
-      // treatmentmode: [
279
-      //   { id: 1, name: 'HD' },
280
-      //   { id: 2, name: 'HDF' },
281
-      //   { id: 3, name: 'HD+HP' },
282
-      //   { id: 4, name: 'HP' },
283
-      //   { id: 5, name: 'HF' },
284
-      //   { id: 6, name: 'SCUF' },
285
-      //   { id: 7, name: 'IUF' },
286
-      //   { id: 8, name: 'HFHD+HP' },
287
-      //   { id: 9, name: 'HFR' },
288
-      //   { id: 10, name: 'HDF+HP' },
289
-      //   { id: 11, name: 'GRRT' },
290
-      //   { id: 12, name: '腹水回收' }
291
-      // ],
292
-      checked1: "",
342
+      checked1: '',
293 343
       form: {
294
-        serial_number: "", // 序列号
344
+        serial_number: '', // 序列号
295 345
         device_type: 1, // 设备类型
296
-        bed_number: "", // 床位号
297
-        device_name: "", // 设备名称
298
-        manufacture_factory: "", // 生产厂家
299
-        service_manufacturer: "", // 维修厂家
300
-        unit_type: "", // 设备型号
301
-        use_section: "", // 使用科室
302
-        section_number: "", // 科室编号
303
-        buy_date: "", // 购买日期
304
-        install_date: "", // 安装日期
305
-        start_date: "", // 启用日期
306
-        maintenance_engineer: "", // 维修工程师
307
-        telephone: "", // 联系电话
308
-        guarantee_date: "", // 保修日期
346
+        bed_number: '', // 床位号
347
+        device_name: '', // 设备名称
348
+        manufacture_factory: '', // 生产厂家
349
+        service_manufacturer: '', // 维修厂家
350
+        unit_type: '', // 设备型号
351
+        use_section: '', // 使用科室
352
+        section_number: '', // 科室编号
353
+        buy_date: '', // 购买日期
354
+        install_date: '', // 安装日期
355
+        start_date: '', // 启用日期
356
+        maintenance_engineer: '', // 维修工程师
357
+        telephone: '', // 联系电话
358
+        guarantee_date: '', // 保修日期
309 359
         machine_status: 1, // 机器状态
310
-        user_total: "", // 初次使用次数
311
-        Disinfection_mode: "", // 消毒方式
312
-        remarks: "", // 备注
313
-        rubbish_date: "", // 报废日期
314
-        rubbish_reason: "", // 报废原因
315
-        user_year: "", // 使用年限
316
-        work_time: "", // 工作时长
317
-        revers_mode: "", // 反渗模式
360
+        user_total: '', // 初次使用次数
361
+        Disinfection_mode: '', // 消毒方式
362
+        remarks: '', // 备注
363
+        rubbish_date: '', // 报废日期
364
+        rubbish_reason: '', // 报废原因
365
+        user_year: '', // 使用年限
366
+        work_time: '', // 工作时长
367
+        revers_mode: '', // 反渗模式
318 368
         treat_mode: [],
319 369
         treat_type: [] // 治疗模式
320 370
       },
371
+      fucks: [
372
+        { id: 1, name: 'zs' },
373
+        { id: 2, name: 'ls' },
374
+        { id: 3, name: 'ww' }
375
+      ],
321 376
       deviceType: [],
322 377
       bedNumber: [],
323 378
       machineStatus: [
324
-        { id: 1, name: "使用机" },
325
-        { id: 2, name: "备用机" },
326
-        { id: 3, name: "急诊机" },
327
-        { id: 4, name: "报废机" }
379
+        { id: 1, name: '使用机' },
380
+        { id: 2, name: '备用机' },
381
+        { id: 3, name: '急诊机' },
382
+        { id: 4, name: '报废机' }
328 383
       ],
329 384
       DisinfectionMode: [
330
-        { id: 1, name: "化学消毒" },
331
-        { id: 2, name: "热消毒" },
332
-        { id: 3, name: "化学消毒+热消毒" }
385
+        { id: 1, name: '化学消毒' },
386
+        { id: 2, name: '热消毒' },
387
+        { id: 3, name: '化学消毒+热消毒' }
333 388
       ],
334 389
       DisCardResion: [
335
-        { id: 1, name: "超期限报废" },
336
-        { id: 2, name: "故障报废" },
337
-        { id: 3, name: "核定报废" }
390
+        { id: 0, name: '请选择' },
391
+        { id: 1, name: '超期限报废' },
392
+        { id: 2, name: '故障报废' },
393
+        { id: 3, name: '核定报废' }
338 394
       ],
339 395
       checkAll: false,
340 396
       isIndeterminate: true,
341 397
       treatmentmode: treatmentmodes,
398
+      // treatmentmode: [
399
+      //   { id: 1, name: 'zs' },
400
+      //   { id: 2, name: 'ls' },
401
+      //   { id: 3, name: 'ww' }
402
+      // ],
342 403
       DeviceType: [
343
-        { id: 1, name: "透析机" },
344
-        { id: 2, name: "水处理机" },
345
-        { id: 3, name: "其他" }
404
+        { id: 1, name: '透析机' },
405
+        { id: 2, name: '水处理机' },
406
+        { id: 3, name: '其他' }
407
+      ],
408
+      reverseMode: [
409
+        { id: 1, name: '单级反渗' },
410
+        { id: 2, name: '双级反渗' }
346 411
       ],
347
-      reverseMode: [{ id: 1, name: "单级反渗" }, { id: 2, name: "双级反渗" }],
348 412
       rules: {
349
-        serial_number: [{ required: true, message: "请填写序列号" }],
350
-        device_name: [{ required: true, message: "请填写序列号" }],
351
-        device_type: [{ required: true, message: "请填写设备类型" }],
352
-        unit_type: [{ required: true, message: "请填写设备型号" }],
353
-        bed_number: [{ required: true, message: "请填写机位号" }]
413
+        serial_number: [{ required: true, message: '请填写序列号' }],
414
+        device_name: [{ required: true, message: '请填写设备名称' }],
415
+        device_type: [{ required: true, message: '请填写设备类型' }],
416
+        unit_type: [{ required: true, message: '请填写设备型号' }],
417
+        bed_number: [{ required: true, message: '请填写机位号' }]
418
+        // treat_mode: [{ required: true, message: "请选择至少一种治疗模式" }]
354 419
       },
355 420
       DisinfectionShow: false,
356 421
       reverseShow: false,
@@ -359,141 +424,196 @@ export default {
359 424
       totalShow: true,
360 425
       bedShow: true,
361 426
       disa: true
362
-    };
427
+    }
363 428
   },
364 429
   methods: {
365 430
     open: function() {
366
-      this.dialogVisible = true;
431
+      this.dialogVisible = true
367 432
       // this.resetForm("form");
368 433
     },
369 434
     changetreatmentmode(val) {
370
-      const checkedCount = val.length;
371
-      this.checkAll = checkedCount === this.treatmentmode.length;
372
-      this.isIndeterminate =
373
-        checkedCount > 0 && checkedCount < this.treatmentmode.length;
435
+      // console.log('val是什么-------------------', val)
436
+      const checkedCount = val.length
437
+      this.checkAll = checkedCount === 14
438
+      this.isIndeterminate = checkedCount > 0 && checkedCount < 14
374 439
     },
375 440
     handleCheckAllChange(val) {
376
-      this.form.treat_mode = val ? this.treatmentmode : [];
377
-      this.isIndeterminate = false;
441
+      console.log('val=================', val)
442
+      console.log('是什么', this.form.treat_mode)
443
+      console.log('hh', this.treatmentmode)
444
+      this.form.treat_mode = val ? this.treatmentmode : []
445
+      this.isIndeterminate = false
378 446
     },
379 447
     getAllSubregion() {
380 448
       getAllSubregion().then(response => {
381 449
         if (response.data.state === 1) {
382
-          var zones = response.data.data.zones;
383
-          this.deviceType = zones;
384
-          var numbers = response.data.data.numbers;
385
-          this.bedNumber = numbers;
450
+          var zones = response.data.data.zones
451
+          this.deviceType = zones
452
+          var numbers = response.data.data.numbers
453
+          var devicenumber = response.data.data.devicenumber
454
+          var device = [{ id: 0, number: '请选择' }]
455
+          for (let index = 0; index < devicenumber.length; index++) {
456
+            const item = devicenumber[index]
457
+            device.push({ id: item.id, number: item.number })
458
+          }
459
+          this.bedNumber = device
386 460
         }
387
-      });
461
+      })
388 462
     },
463
+
389 464
     changeDeviceType(val) {
390 465
       if (val === 1) {
391
-        this.bedShow = true;
392
-        this.totalShow = true;
393
-        this.treatShow = true;
394
-        this.allShow = true;
466
+        this.bedShow = true
467
+        this.totalShow = true
468
+        this.treatShow = true
469
+        this.allShow = true
395 470
       }
396 471
 
397 472
       if (val === 2) {
398
-        this.totalShow = false;
399
-        this.DisinfectionShow = true;
400
-        this.allShow = false;
401
-        this.treatShow = false;
402
-        this.reverseShow = true;
403
-        this.bedShow = true;
473
+        this.totalShow = false
474
+        this.DisinfectionShow = true
475
+        this.allShow = false
476
+        this.treatShow = false
477
+        this.reverseShow = true
478
+        this.bedShow = true
404 479
       }
405 480
 
406 481
       if (val === 3) {
407
-        this.bedShow = false;
408
-        this.totalShow = false;
409
-        this.reverseShow = false;
410
-        this.allShow = false;
411
-        this.treatShow = false;
412
-        this.DisinfectionShow = false;
482
+        this.bedShow = false
483
+        this.totalShow = false
484
+        this.reverseShow = false
485
+        this.allShow = false
486
+        this.treatShow = false
487
+        this.DisinfectionShow = false
413 488
       }
414 489
     },
415 490
     changeMachineStatus(val) {
416 491
       if (val === 4) {
417
-        this.disa = false;
492
+        this.disa = false
418 493
       } else {
419
-        this.disa = true;
420
-        this.form.rubbish_date = "";
421
-        this.form.rubbish_reason = "";
494
+        this.disa = true
495
+        this.form.rubbish_date = ''
496
+        this.form.rubbish_reason = ''
422 497
       }
423 498
     },
424 499
     SaveManageInfo(formName) {
425
-      const arr1 = [];
500
+      console.log('====', this.form.treat_mode)
501
+      const arr1 = []
426 502
       this.form.treat_mode.map((item, index) => {
427
-        const obj = {};
428
-        obj.id = index + 1;
429
-        // obj.name = item
430
-        arr1.push(obj.id);
431
-      });
432
-      this.form.treat_type = arr1;
433
-
434
-      var serial_number = this.form.serial_number;
435
-      var serial_numbers = parseInt(serial_number);
436
-      this.form.serial_number = serial_numbers;
503
+        const obj = {}
504
+        if (item === 'HD') {
505
+          obj.id = 1
506
+        }
507
+        if (item === 'HDF') {
508
+          obj.id = 2
509
+        }
510
+        if (item === 'HD+HP') {
511
+          obj.id = 3
512
+        }
513
+        if (item === 'HP') {
514
+          obj.id = 4
515
+        }
516
+        if (item === 'HF') {
517
+          obj.id = 5
518
+        }
519
+        if (item === 'SCUF') {
520
+          obj.id = 6
521
+        }
522
+        if (item === 'IUF') {
523
+          obj.id = 7
524
+        }
525
+        if (item === 'HFHD') {
526
+          obj.id = 8
527
+        }
528
+        if (item === 'HFHD+HP') {
529
+          obj.id = 9
530
+        }
531
+        if (item === 'PHF') {
532
+          obj.id = 10
533
+        }
534
+        if (item === 'HFR') {
535
+          obj.id = 11
536
+        }
537
+        if (item === 'HDF+HP') {
538
+          obj.id = 12
539
+        }
540
+        if (item === 'CRRT') {
541
+          obj.id = 13
542
+        }
543
+        if (item === '腹水回输') {
544
+          obj.id = 14
545
+        }
546
+        arr1.push(obj.id)
547
+      })
548
+      // this.form.treat_mode.map((item, index) => {
549
+      //   const obj = {};
550
+      //   obj.id = index + 1;
551
+      //   // obj.name = item
552
+      //   arr1.push(obj.id);
553
+      // });
554
+      console.log('arrr1', arr1)
555
+      this.form.treat_type = arr1
437 556
 
438
-      var device_type = this.form.device_type;
439
-      var device_types = parseInt(device_type);
440
-      this.form.device_type = device_types;
557
+      var device_type = this.form.device_type
558
+      var device_types = parseInt(device_type)
559
+      this.form.device_type = device_types
441 560
 
442
-      console.log("机号是什么东西", this.form.bed_number);
561
+      console.log('机号是什么东西', this.form.bed_number)
443 562
 
444
-      if (this.form.rubbish_reason === "") {
445
-        this.form.rubbish_reason = 0;
563
+      if (this.form.rubbish_reason === '') {
564
+        this.form.rubbish_reason = 0
446 565
       }
447
-      var rubbish_reason = this.form.rubbish_reason;
448
-      var rubbish_reasons = parseInt(rubbish_reason);
449
-      this.form.rubbish_reason = rubbish_reasons;
566
+      var rubbish_reason = this.form.rubbish_reason
567
+      var rubbish_reasons = parseInt(rubbish_reason)
568
+      this.form.rubbish_reason = rubbish_reasons
450 569
 
451
-      var machine_status = this.form.machine_status;
452
-      var machine_statuss = parseInt(machine_status);
453
-      this.form.machine_status = machine_statuss;
570
+      var machine_status = this.form.machine_status
571
+      var machine_statuss = parseInt(machine_status)
572
+      this.form.machine_status = machine_statuss
454 573
 
455
-      if (this.form.revers_mode === "") {
456
-        this.form.revers_mode = 0;
574
+      if (this.form.revers_mode === '') {
575
+        this.form.revers_mode = 0
457 576
       }
458
-      var revers_mode = this.form.revers_mode;
459
-      var revers_modes = parseInt(revers_mode);
460
-      this.form.revers_mode = revers_modes;
577
+      var revers_mode = this.form.revers_mode
578
+      var revers_modes = parseInt(revers_mode)
579
+      this.form.revers_mode = revers_modes
461 580
 
462
-      if (this.form.Disinfection_mode === "") {
463
-        this.form.Disinfection_mode = 0;
581
+      if (this.form.Disinfection_mode === '') {
582
+        this.form.Disinfection_mode = 0
464 583
       }
465
-      var disinfecction_modes = this.form.Disinfection_mode;
466
-      var disinfecction_modess = parseInt(disinfecction_modes);
467
-      this.form.Disinfection_mode = disinfecction_modess;
468 584
 
469
-      if (this.form.bed_number === "") {
470
-        this.form.bed_number = 0;
471
-      }
472
-      var bed_numbers = this.form.bed_number;
473
-      var bed_numberss = parseInt(bed_numbers);
474
-      this.form.bed_number = bed_numberss;
585
+      var disinfecction_modes = this.form.Disinfection_mode
586
+      var disinfecction_modess = parseInt(disinfecction_modes)
587
+      this.form.Disinfection_mode = disinfecction_modess
475 588
 
476
-      console.log("购买日期", this.form.buy_date);
589
+      if (this.form.bed_number === '') {
590
+        this.form.bed_number = 0
591
+      }
592
+      var bed_numbers = this.form.bed_number
593
+      var bed_numberss = parseInt(bed_numbers)
594
+      this.form.bed_number = bed_numberss
595
+      console.log('购买日期', this.form.buy_date)
477 596
       this.$refs[formName].validate(valid => {
478 597
         if (valid) {
479 598
           SaveManageInfo(this.form).then(response => {
480 599
             if (response.data.state === 1) {
481
-              var addmacher = response.data.data.addmacher;
482
-              console.log("addmacher", addmacher);
483
-              this.dialogVisible = false;
484
-              this.$emit("getAllMachineInfo");
600
+              var addmacher = response.data.data.addmacher
601
+              this.dialogVisible = false
602
+              this.$message.success('保存成功')
603
+              this.getAllSubregion()
604
+              this.$emit('getAllMachineInfo')
485 605
             } else {
486
-              this.$message.error("添加失败");
606
+              this.$message.error('添加失败')
487 607
             }
488
-          });
608
+          })
489 609
         }
490
-      });
610
+      })
491 611
     }
492 612
   },
493 613
   created() {
494
-    this.getAllSubregion();
614
+    this.getAllSubregion()
495 615
   }
496
-};
616
+}
497 617
 </script>
498 618
 
499 619
 <style lang="scss">

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

@@ -58,9 +58,9 @@
58 58
           </el-col>
59 59
         </el-row>
60 60
         <el-row>
61
-          <el-col :span="6">
61
+          <el-col :span="7">
62 62
             <el-form-item label="使用年限:">
63
-              <el-select style="width:90px" v-model="form.user_year">
63
+              <el-select style="width:120px" v-model="form.user_year">
64 64
                 <el-option
65 65
                   v-for="item in this.userYear"
66 66
                   :key="item.id"
@@ -70,7 +70,7 @@
70 70
               </el-select>
71 71
             </el-form-item>
72 72
           </el-col>
73
-          <el-col :span="10">
73
+          <el-col :span="7">
74 74
             <div class="cell clearfix">
75 75
               <label class="title"><span class="name">日期查询</span> : </label>
76 76
               <el-date-picker
@@ -79,7 +79,7 @@
79 79
                 v-model="form.start_time"
80 80
                 prefix-icon="el-icon-date"
81 81
                 :editable="false"
82
-                style="width: 196px;"
82
+                style="width: 140px;"
83 83
                 type="date"
84 84
                 placeholder="选择日期时间"
85 85
                 align="right"
@@ -94,7 +94,7 @@
94 94
                 v-model="form.end_time"
95 95
                 prefix-icon="el-icon-date"
96 96
                 :editable="false"
97
-                style="width: 196px;"
97
+                style="width: 140px;"
98 98
                 type="date"
99 99
                 placeholder="选择日期时间"
100 100
                 align="right"
@@ -104,7 +104,7 @@
104 104
               </el-date-picker>
105 105
             </div>
106 106
           </el-col>
107
-          <el-col :span="4">
107
+          <el-col :span="5">
108 108
             <el-form-item label="合计:">
109 109
               故障次数
110 110
               <span>{{ failure_times }}</span
@@ -120,12 +120,18 @@
120 120
         </el-row>
121 121
         <el-row>
122 122
           <el-table :data="tableData" border style="width: 100%">
123
-            <el-table-column prop="date" label="序号" width="80" align="center">
124
-              <template slot-scope="scope">
123
+            <el-table-column
124
+              prop="date"
125
+              label="序号"
126
+              width="60"
127
+              align="center"
128
+              type="index"
129
+            >
130
+              <!-- <template slot-scope="scope">
125 131
                 {{ scope.row.id }}
126
-              </template>
132
+              </template> -->
127 133
             </el-table-column>
128
-            <el-table-column prop="name" label="分区" width="80" align="center">
134
+            <el-table-column prop="name" label="分区" width="60" align="center">
129 135
               <template slot-scope="scope">
130 136
                 {{ scope.row.name }}
131 137
               </template>
@@ -405,12 +411,8 @@ export default {
405 411
             if (macher[index].machine_status === 4) {
406 412
               macher[index].machine_status = "报废机";
407 413
             }
408
-
409
-            if (macher[index].start_date === 0) {
410
-              macher[index].start_date = "";
411
-            }
412
-            if (macher[index].rubbish_date === 0) {
413
-              macher[index].rubbish_date = "";
414
+            if (macher[index].rubbish_reason === 0) {
415
+              macher[index].rubbish_reason = "";
414 416
             }
415 417
           }
416 418
           console.log("macher", macher);
@@ -419,7 +421,11 @@ export default {
419 421
       });
420 422
     },
421 423
     getTime(time) {
422
-      return uParseTime(time, "{y}-{m}-{d}");
424
+      if (time === 0) {
425
+        return "";
426
+      } else {
427
+        return uParseTime(time, "{y}-{m}-{d}");
428
+      }
423 429
     }
424 430
   },
425 431
   created() {

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

@@ -3,7 +3,7 @@
3 3
     <el-dialog
4 4
       title="新增计划"
5 5
       :visible.sync="dialogVisible"
6
-      width="50%"
6
+      width="55%"
7 7
       center
8 8
     >
9 9
       <el-form ref="form" :model="form">
@@ -40,6 +40,7 @@
40 40
                 allow-create
41 41
                 default-first-option
42 42
                 placeholder="请选择时间"
43
+                style="width: 140px;"
43 44
               >
44 45
                 <el-option
45 46
                   v-for="item in this.timeType"
@@ -59,6 +60,7 @@
59 60
                 allow-create
60 61
                 default-first-option
61 62
                 placeholder="请选择时间"
63
+                style="width: 140px;"
62 64
               >
63 65
                 <el-option
64 66
                   v-for="item in this.classType"
@@ -149,10 +151,10 @@ export default {
149 151
         disinfec_time: "",
150 152
         time: [],
151 153
         class_time: [],
152
-        way: "",
153
-        machine_disinfectant: "",
154
-        disinfectant_way: "",
155
-        disinfectant: ""
154
+        way: 0,
155
+        machine_disinfectant: 0,
156
+        disinfectant_way: 0,
157
+        disinfectant: 0
156 158
       },
157 159
       value: [],
158 160
       timeType: [
@@ -169,13 +171,15 @@ export default {
169 171
         { id: 2, name: "下午" },
170 172
         { id: 3, name: "晚上" }
171 173
       ],
172
-      // 表消毒方式
174
+      // 表消毒方式
173 175
       disinfectType: [
176
+        { id: 0, name: "/" },
174 177
         { id: 1, name: "擦拭" },
175 178
         { id: 2, name: "化学消毒" }
176 179
       ],
177 180
       // 基表消毒液
178 181
       disinfectantType: [
182
+        { id: 0, name: "/" },
179 183
         { id: 1, name: "0.22%季铵盐" },
180 184
         { id: 2, name: "500mg/l含氯消毒剂" },
181 185
         { id: 3, name: "1000mg/l含氯消毒剂" },
@@ -183,6 +187,7 @@ export default {
183 187
       ],
184 188
       // 夜路消毒方式
185 189
       sterilizeType: [
190
+        { id: 0, name: "/" },
186 191
         { id: 1, name: "热化学消毒" },
187 192
         { id: 2, name: "化学消毒 + 除钙" },
188 193
         { id: 3, name: "热化学消毒 + 除钙" },
@@ -193,6 +198,7 @@ export default {
193 198
       ],
194 199
       // 夜路消毒液
195 200
       fluidPathType: [
201
+        { id: 0, name: "/" },
196 202
         { id: 1, name: "20%柠檬酸" },
197 203
         { id: 2, name: "25%柠檬酸" },
198 204
         { id: 3, name: "50%柠檬酸" },

+ 12 - 8
src/xt_pages/management/components/QualityForm.vue Целия файл

@@ -344,9 +344,9 @@
344 344
               <el-select style="width:130px" v-model="form.sampler">
345 345
                 <el-option
346 346
                   v-for="item in sampling"
347
-                  :key="item.id"
347
+                  :key="item.admin_user_id"
348 348
                   :label="item.user_name"
349
-                  :value="item.id"
349
+                  :value="item.admin_user_id"
350 350
                 ></el-option>
351 351
               </el-select>
352 352
             </el-form-item>
@@ -454,9 +454,9 @@
454 454
               <el-select style="width:130px" v-model="diaForm.samplerb">
455 455
                 <el-option
456 456
                   v-for="item in sampling"
457
-                  :key="item.id"
457
+                  :key="item.admin_user_id"
458 458
                   :label="item.user_name"
459
-                  :value="item.id"
459
+                  :value="item.admin_user_id"
460 460
                 ></el-option>
461 461
               </el-select>
462 462
             </el-form-item>
@@ -518,9 +518,9 @@
518 518
                 <el-select style="width:130px" v-model="ionForm.samplerc">
519 519
                   <el-option
520 520
                     v-for="item in sampling"
521
-                    :key="item.id"
521
+                    :key="item.admin_user_id"
522 522
                     :label="item.user_name"
523
-                    :value="item.id"
523
+                    :value="item.admin_user_id"
524 524
                   ></el-option>
525 525
                 </el-select>
526 526
               </el-form-item>
@@ -872,10 +872,14 @@ export default {
872 872
         this.diableTwo = false
873 873
       }
874 874
       if (val === 1) {
875
+        this.form.concentrate_nob = ''
876
+        this.form.concentrateb_nod = ''
877
+        this.diableTwo = true
875 878
         this.disable = false
876
-        this.diableTwo = false
877 879
       }
878 880
       if (val === 2) {
881
+        this.form.concentrate_noa = ''
882
+        this.form.concentrate_noc = ''
879 883
         this.diableTwo = true
880 884
         this.disable = false
881 885
       }
@@ -1006,7 +1010,7 @@ export default {
1006 1010
         return false
1007 1011
       }
1008 1012
       this.$confirm(
1009
-        '确认要删除所选吗? <br>删除后,人员信息将无法恢复',
1013
+        '确认要删除所选记录吗? <br>删除后,人员信息将无法恢复',
1010 1014
         '删除提示',
1011 1015
         {
1012 1016
           dangerouslyUseHTMLString: true,

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

@@ -617,7 +617,7 @@ export default {
617 617
         return false
618 618
       }
619 619
       this.$confirm(
620
-        '确认要删除所选的吗? <br>删除后,人员信息将无法恢复',
620
+        '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
621 621
         '删除提示',
622 622
         {
623 623
           dangerouslyUseHTMLString: true,

+ 41 - 5
src/xt_pages/management/components/UserForm.vue Целия файл

@@ -644,9 +644,9 @@
644 644
               <el-select v-model="userform.sign_name" placeholder="请选择">
645 645
                 <el-option
646 646
                   v-for="item in autograph"
647
-                  :key="item.id"
647
+                  :key="item.admin_user_id"
648 648
                   :label="item.user_name"
649
-                  :value="item.id"
649
+                  :value="item.admin_user_id"
650 650
                   style="width:100px"
651 651
                 ></el-option>
652 652
               </el-select>
@@ -752,6 +752,9 @@ import print from 'print-js'
752 752
 const moment = require('moment')
753 753
 export default {
754 754
   name: 'UserForm',
755
+  props: {
756
+    equimentid: Number
757
+  },
755 758
   data() {
756 759
     return {
757 760
       nowTime: moment(new Date()).format('YYYY-MM-DD HH:MM:SS'),
@@ -800,11 +803,13 @@ export default {
800 803
       ],
801 804
       // 基表消毒方式
802 805
       disinfectType: [
806
+        { id: 0, name: '请选择' },
803 807
         { id: 1, name: '擦拭' },
804 808
         { id: 2, name: '化学消毒' }
805 809
       ],
806 810
       // 基表消毒液
807 811
       disinfectantType: [
812
+        { id: 0, name: '请选择' },
808 813
         { id: 1, name: '0.22%季铵盐' },
809 814
         { id: 2, name: '500mg/l含氯消毒剂' },
810 815
         { id: 3, name: '1000mg/l含氯消毒剂' },
@@ -812,6 +817,7 @@ export default {
812 817
       ],
813 818
       // 夜路消毒方式
814 819
       sterilizeType: [
820
+        { id: 0, name: '请选择' },
815 821
         { id: 1, name: '热化学消毒' },
816 822
         { id: 2, name: '化学消毒 + 除钙' },
817 823
         { id: 3, name: '热化学消毒 + 除钙' },
@@ -822,6 +828,7 @@ export default {
822 828
       ],
823 829
       // 夜路消毒液
824 830
       fluidPathType: [
831
+        { id: 0, name: '请选择' },
825 832
         { id: 1, name: '20%柠檬酸' },
826 833
         { id: 2, name: '25%柠檬酸' },
827 834
         { id: 3, name: '50%柠檬酸' },
@@ -861,11 +868,13 @@ export default {
861 868
         { id: 3, name: '消毒未完成' }
862 869
       ],
863 870
       names: [
871
+        { id: 0, name: '请选择' },
864 872
         { id: 1, name: '20%柠檬酸' },
865 873
         { id: 2, name: '50%柠檬酸' },
866 874
         { id: 3, name: '次氯酸钠' }
867 875
       ],
868 876
       germs: [
877
+        { id: 0, name: '请选择' },
869 878
         { id: 1, name: '费森细菌过滤器' },
870 879
         { id: 2, name: '日机装细菌过滤器' },
871 880
         { id: 3, name: '贝朗机细菌过滤器' },
@@ -1016,12 +1025,22 @@ export default {
1016 1025
             if (information[index].move === 2) {
1017 1026
               information[index].move = '故障'
1018 1027
             }
1028
+
1029
+            if (information[index].disinfect_type === 0) {
1030
+              information[index].disinfect_type = '/'
1031
+            }
1032
+
1019 1033
             if (information[index].disinfect_type === 1) {
1020 1034
               information[index].disinfect_type = '擦拭'
1021 1035
             }
1022 1036
             if (information[index].disinfect_type === 2) {
1023 1037
               information[index].disinfect_type = '化学消毒'
1024 1038
             }
1039
+
1040
+            if (information[index].disinfectant_type === 0) {
1041
+              information[index].disinfectant_type = '/'
1042
+            }
1043
+
1025 1044
             if (information[index].disinfectant_type === 1) {
1026 1045
               information[index].disinfectant_type = '0.22%季铵盐'
1027 1046
             }
@@ -1034,6 +1053,7 @@ export default {
1034 1053
             if (information[index].disinfectant_type === 4) {
1035 1054
               information[index].disinfectant_type = '1500mg/l含氯消毒剂'
1036 1055
             }
1056
+
1037 1057
             if (information[index].disinfection === 1) {
1038 1058
               information[index].disinfection = '已消毒'
1039 1059
             }
@@ -1049,6 +1069,10 @@ export default {
1049 1069
             if (information[index].dialysis_concentration === 2) {
1050 1070
               information[index].dialysis_concentration = '未达标'
1051 1071
             }
1072
+
1073
+            if (information[index].fluid_path === 0) {
1074
+              information[index].fluid_path = '/'
1075
+            }
1052 1076
             if (information[index].fluid_path === 1) {
1053 1077
               information[index].fluid_path = '热化学消毒'
1054 1078
             }
@@ -1070,6 +1094,11 @@ export default {
1070 1094
             if (information[index].fluid_path === 7) {
1071 1095
               information[index].fluid_path = '清洗'
1072 1096
             }
1097
+
1098
+            if (information[index].disinfectant === 0) {
1099
+              information[index].disinfectant = '/'
1100
+            }
1101
+
1073 1102
             if (information[index].disinfectant === 1) {
1074 1103
               information[index].disinfectant = '20%柠檬酸'
1075 1104
             }
@@ -1144,7 +1173,11 @@ export default {
1144 1173
       return uParseTime(time, '{y}-{m}-{d}')
1145 1174
     },
1146 1175
     getTimes(time) {
1147
-      return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
1176
+      if (time === 0) {
1177
+        return ''
1178
+      } else {
1179
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
1180
+      }
1148 1181
     },
1149 1182
     // 获取签名
1150 1183
     getAllOrganization() {
@@ -1227,7 +1260,7 @@ export default {
1227 1260
         return false
1228 1261
       }
1229 1262
       this.$confirm(
1230
-        '确认要删除所选吗? <br>删除后,人员信息将无法恢复',
1263
+        '确认要删除所选记录吗? <br>删除后,人员信息将无法恢复',
1231 1264
         '删除提示',
1232 1265
         {
1233 1266
           dangerouslyUseHTMLString: true,
@@ -1277,7 +1310,10 @@ export default {
1277 1310
       if (this.userform.clean === false) {
1278 1311
         this.userform.clean = 0
1279 1312
       }
1280
-
1313
+      this.userform.start_time = this.getTimes(this.userform.start_time)
1314
+      this.userform.end_time = this.getTimes(this.userform.end_time)
1315
+      this.userform.starttime = this.getTimes(this.userform.starttime)
1316
+      this.userform.endtime = this.getTimes(this.userform.endtime)
1281 1317
       this.$refs[formName].validate((valid) => {
1282 1318
         if (valid) {
1283 1319
           UpdateForm(this.userform).then(response => {

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

@@ -8,8 +8,8 @@
8 8
                <div style="width:24%">
9 9
                  <el-row>
10 10
                    <el-col :span="24">
11
-                     <span class="zone">分区:</span>
12
-                      <el-select v-model="forms.zone_id" placeholder="请选择" class="a" @change="changeBedNumber">
11
+                     <span class="zone">分&nbsp;&nbsp;&nbsp;&nbsp;区:</span>
12
+                      <el-select v-model="forms.zone_id" placeholder="请选择" class="a" @change="changeBedNumber" style="width:125px">
13 13
                         <el-option
14 14
                          v-for="item in bedZone"
15 15
                          :key="item.id"
@@ -22,8 +22,8 @@
22 22
                   </el-row>
23 23
                   <el-row>
24 24
                    <el-col>
25
-                    <span class="zone">班次:</span>
26
-                      <el-select v-model="forms.class_id" placeholder="请选择" class="a" @change="changeClassId">
25
+                    <span class="zone">班&nbsp;&nbsp;&nbsp;&nbsp;次:</span>
26
+                      <el-select v-model="forms.class_id" placeholder="请选择" class="a" @change="changeClassId" style="width:125px">
27 27
                         <el-option
28 28
                          v-for="item in Classes"
29 29
                          :key="item.id"
@@ -36,7 +36,7 @@
36 36
                   <el-row>
37 37
                      <el-col>
38 38
                      <span>设备类型:</span>
39
-                      <el-select v-model="forms.device_type" placeholder="请选择" class="a" @change="changeDeviceId">
39
+                      <el-select v-model="forms.device_type" placeholder="请选择" class="a" @change="changeDeviceId" style="width:110px">
40 40
                         <el-option
41 41
                          v-for="item in DeviceTypeType"
42 42
                          :key="item.id"
@@ -116,15 +116,15 @@
116 116
                                </el-col>
117 117
                               <el-col :span="7">
118 118
                                  <el-form-item label="设备类型:" required prop="devicetype">
119
-                                   <el-select style="width:150px" v-model="form.devicetype">
119
+                                   <el-select style="width:150px" v-model="form.devicetype" :disabled="true">
120 120
                                        <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" ></el-option>
121 121
                                   </el-select>
122 122
                                  </el-form-item>
123 123
                               </el-col>
124 124
                               <el-col :span="7">
125 125
                                   <el-form-item label="机位号:">
126
-                                       <el-select style="width:150px" v-model="form.bed_number">
127
-                                          <el-option v-for="item in this.Number" :key="item.id" :label="item.zone_name + item.number" :value="item.id"></el-option>
126
+                                       <el-select style="width:150px" v-model="form.bed_number" :disabled="true">
127
+                                          <el-option v-for="item in this.Number" :key="item.id" :label="item.number" :value="item.id"></el-option>
128 128
                                        </el-select>
129 129
                                   </el-form-item>
130 130
                               </el-col>
@@ -287,7 +287,7 @@
287 287
                              <el-row>
288 288
                                <div class="but">
289 289
                                  <el-col :span="12">
290
-                                   <el-button size="medium" v-show="cancelShow">取消</el-button>
290
+                                   <el-button size="medium" v-show="cancelShow" @click="cleanMainchine">取消</el-button>
291 291
                                  </el-col>  
292 292
                                  <el-col :span="8">
293 293
                                   <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMachineInfo('form')">保存</el-button>
@@ -486,7 +486,7 @@
486 486
                    <el-tab-pane label="使用登记" name="third">
487 487
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
488 488
                           <el-tab-pane label="新增使用登记" name="first">
489
-                             <el-form :model="userform" ref="userform">
489
+                             <el-form :model="userform" ref="userform" :rules="userRules">
490 490
                                 <el-row>
491 491
                                   <el-col :span="8">
492 492
                                      <el-form-item label="日期:">
@@ -502,7 +502,7 @@
502 502
                                      </el-form-item>
503 503
                                   </el-col>
504 504
                                   <el-col :span="8">
505
-                                     <el-form-item label="班次:">
505
+                                     <el-form-item label="班次:" required prop="classtype">
506 506
                                        <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
507 507
                                            <el-option
508 508
                                             v-for="item in classType"
@@ -515,7 +515,7 @@
515 515
                                      </el-form-item>
516 516
                                   </el-col>
517 517
                                   <el-col :span="8">
518
-                                     <el-form-item label="分区:">
518
+                                     <el-form-item label="分区:" required prop="zone">
519 519
                                          <el-select v-model="userform.zone" placeholder="请选择" class="a">
520 520
                                            <el-option
521 521
                                             v-for="item in bedNumber"
@@ -529,15 +529,15 @@
529 529
                                 </el-row>
530 530
                                 <el-row>
531 531
                                     <el-col :span="8">
532
-                                        <el-form-item label="床位号:">
532
+                                        <el-form-item label="床位号:" required prop="bed_number">
533 533
                                         <el-select style="width:150px" v-model="userform.bed_number">
534 534
                                           <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.number" :value="item.id"></el-option>
535 535
                                         </el-select>
536 536
                                      </el-form-item>
537 537
                                     </el-col>
538 538
                                     <el-col :span="8">
539
-                                       <el-form-item label="患者:">
540
-                                           <el-select style="width:150px" v-model="userform.patient_name">
539
+                                       <el-form-item label="患者:" required prop ="patient_name">
540
+                                           <el-select style="width:150px" v-model="userform.patient_name" >
541 541
                                              <el-option v-for="item in this.patientName" :key="item.patient_id" :label="item.name" :value="item.patient_id"></el-option>
542 542
                                            </el-select>
543 543
                                        </el-form-item>
@@ -656,7 +656,7 @@
656 656
                                       <el-form-item label="①机表"></el-form-item>
657 657
                                   </el-col>
658 658
                                   <el-col :span="8">
659
-                                     <el-form-item label="消毒方式:">
659
+                                     <el-form-item label="消毒方式:" required prop="disinfect_type">
660 660
                                          <el-select v-model="userform.disinfect_type" placeholder="请选择" >
661 661
                                            <el-option
662 662
                                             v-for="item in disinfectType"
@@ -669,7 +669,7 @@
669 669
                                      </el-form-item>    
670 670
                                   </el-col>
671 671
                                   <el-col :span="8">
672
-                                     <el-form-item label="消毒液:">
672
+                                     <el-form-item label="消毒液:" required prop="disinfectant_type">
673 673
                                         <el-select v-model="userform.disinfectant_type" placeholder="请选择" >
674 674
                                            <el-option
675 675
                                             v-for="item in disinfectantType"
@@ -684,7 +684,7 @@
684 684
                                 </el-row>
685 685
                                 <el-row>
686 686
                                   <el-col :span="8">      
687
-                                     <el-form-item label="消毒状态:">
687
+                                     <el-form-item label="消毒状态:" required prop="disinfection">
688 688
                                         <el-select v-model="userform.disinfection" placeholder="请选择" >
689 689
                                            <el-option
690 690
                                             v-for="item in disinfection"
@@ -709,7 +709,7 @@
709 709
                                        <el-form-item label="②液路"></el-form-item>
710 710
                                    </el-col>
711 711
                                    <el-col :span="8">
712
-                                       <el-form-item label="消毒方式:">
712
+                                       <el-form-item label="消毒方式:" required prop="fluid_path">
713 713
                                          <el-select v-model="userform.fluid_path" placeholder="请选择" >
714 714
                                            <el-option
715 715
                                             v-for="item in sterilizeType"
@@ -722,7 +722,7 @@
722 722
                                        </el-form-item>
723 723
                                    </el-col>
724 724
                                    <el-col :span="8">
725
-                                       <el-form-item label="消毒液:">
725
+                                       <el-form-item label="消毒液:" required prop="disinfectant">
726 726
                                         <el-select v-model="userform.disinfectant" placeholder="请选择" >
727 727
                                            <el-option
728 728
                                             v-for="item in fluidPathType"
@@ -737,7 +737,7 @@
737 737
                                 </el-row>
738 738
                                 <el-row>
739 739
                                    <el-col :span="8">      
740
-                                     <el-form-item label="消毒状态:">
740
+                                     <el-form-item label="消毒状态:" required prop="disinfection_status">
741 741
                                         <el-select v-model="userform.disinfection_status" placeholder="请选择" >
742 742
                                            <el-option
743 743
                                             v-for="item in disinfection"
@@ -771,10 +771,9 @@
771 771
                                               value-format="yyyy-MM-dd HH:mm"
772 772
                                                placeholder="选择时间"
773 773
                                                v-model="userform.starttime"
774
-                                               style="width:200px;"
775
-                                                @change="changStartTime"
774
+                                               style="width:200px;"                                          
776 775
                                           ></el-date-picker>                                                                       
777
-                                       </el-form-item>
776
+                                       </el-form-item>                 
778 777
                                     </el-col>
779 778
                                     <el-col :span="8">
780 779
                                        <el-form-item label="结束消毒时间:">                                                                          
@@ -784,8 +783,7 @@
784 783
                                               value-format="yyyy-MM-dd HH:mm"
785 784
                                                placeholder="选择时间"
786 785
                                                v-model="userform.endtime"
787
-                                               style="width:200px;"
788
-                                                @change="changeEndTime"
786
+                                               style="width:200px;"                                          
789 787
                                           ></el-date-picker>              
790 788
                                        </el-form-item>
791 789
                                     </el-col>
@@ -822,7 +820,7 @@
822 820
                                          <el-radio-group v-model="userform.dialysis_concentration">
823 821
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
824 822
                                          </el-radio-group>
825
-                                        <span style="color:red">您已一个月未更换,请注意检测</span>
823
+                                        <!-- <span style="color:red">您已一个月未更换,请注意检测</span> -->
826 824
                                       </el-form-item>
827 825
                                    </el-col>
828 826
                                 </el-row>
@@ -858,10 +856,10 @@
858 856
                                   </el-col>
859 857
                                    <el-col :span="10">
860 858
                                       <el-checkbox v-model="userform.clean">清洁:</el-checkbox>
861
-                                      <span style="color:red">您已一个月未清洁,请检查</span>
859
+                                      <!-- <span style="color:red">您已一个月未清洁,请检查</span> -->
862 860
                                    </el-col>
863 861
                                    <el-col :span="10">
864
-                                       <el-form-item label="签名:">
862
+                                       <el-form-item label="签名:" required prop="sign_name">
865 863
                                           <el-select v-model="userform.sign_name" placeholder="请选择" >
866 864
                                            <el-option
867 865
                                             v-for="item in autograph"
@@ -947,7 +945,7 @@
947 945
                                 <el-col :span="8">
948 946
                                   <el-form-item label="取样者:" required prop="sampler">
949 947
                                      <el-select style="width:130px"  v-model="qualityForm.sampler">
950
-                                       <el-option v-for="item in sampling" :key="item.id" :label="item.user_name" :value="item.id"></el-option>
948
+                                       <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
951 949
                                       </el-select>
952 950
                                   </el-form-item>
953 951
                                 </el-col>
@@ -1051,7 +1049,7 @@
1051 1049
                                 <el-col :span="8">
1052 1050
                                    <el-form-item label="取样者:" required prop="samplerb">
1053 1051
                                       <el-select style="width:130px"  v-model="qualityFormTwo.samplerb">
1054
-                                        <el-option v-for="item in sampling" :key="item.id" :label="item.user_name" :value="item.id"></el-option>
1052
+                                        <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
1055 1053
                                       </el-select>
1056 1054
                                    </el-form-item>
1057 1055
                                 </el-col>
@@ -1122,7 +1120,7 @@
1122 1120
                                 <el-col :span="8">
1123 1121
                                     <el-form-item label="取样者:" required prop="samplerc">
1124 1122
                                       <el-select style="width:130px"  v-model="qualityFormThree.samplerc">
1125
-                                        <el-option v-for="item in sampling" :key="item.id" :label="item.user_name" :value="item.id"></el-option>
1123
+                                        <el-option v-for="item in sampling" :key="item.addmin_user_id" :label="item.user_name" :value="item.admin_user_id"></el-option>
1126 1124
                                       </el-select>
1127 1125
                                    </el-form-item>   
1128 1126
                                 </el-col>
@@ -1446,7 +1444,7 @@
1446 1444
         <!-- 综合查询 -->
1447 1445
         <multiple-form ref="multipleform"></multiple-form>
1448 1446
     <!-- 编辑消毒计划 -->
1449
-     <el-dialog title="编辑消毒计划" :visible.sync="dialogVisible" width="44%" center>
1447
+     <el-dialog title="编辑消毒计划" :visible.sync="dialogVisible" width="50%" center>
1450 1448
        <el-form :model="machineform" ref="machineform">
1451 1449
         <el-row>
1452 1450
           <el-col :span="10">
@@ -1474,6 +1472,7 @@
1474 1472
               <el-select
1475 1473
                 v-model="machineform.time"
1476 1474
                 placeholder="请选择时间"
1475
+                 style="width: 140px;"
1477 1476
               >
1478 1477
                 <el-option
1479 1478
                   v-for="item in this.timeType"
@@ -1489,6 +1488,7 @@
1489 1488
               <el-select
1490 1489
                 v-model="machineform.class_time"
1491 1490
                 placeholder="请选择时间"
1491
+                 style="width: 140px;"
1492 1492
               >
1493 1493
                 <el-option
1494 1494
                   v-for="item in this.classType"
@@ -1572,7 +1572,7 @@
1572 1572
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1573 1573
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1574 1574
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
1575
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin } from '@/api/manage'
1575
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin,getAutoData } from '@/api/manage'
1576 1576
   import { uParseTime } from '@/utils/tools'
1577 1577
   import { getToken } from '@/api/qiniu'
1578 1578
   import PlanForm from './components/PlanForm'
@@ -1583,7 +1583,7 @@
1583 1583
   import RepairForm from './components/RepairForm'
1584 1584
   import { parseTime } from '@/utils'
1585 1585
   import { getFileExtension } from '@/utils/tools'
1586
-const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
1586
+const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF','HFHD', 'HFHD+HP', 'PHF', 'HFR', 'HDF+HP', 'CRRT', '腹水回收']
1587 1587
 const moment = require('moment')
1588 1588
 export default {
1589 1589
     name: 'home',
@@ -1651,6 +1651,7 @@ export default {
1651 1651
           { id: 4, name: '报废机' }
1652 1652
         ],
1653 1653
         DisCardResion: [
1654
+          { id: 0,  name: "请选择" },
1654 1655
           { id: 1, name: '超期限报废' },
1655 1656
           { id: 2, name: '故障报废' },
1656 1657
           { id: 3, name: '核定报废' }
@@ -1661,6 +1662,7 @@ export default {
1661 1662
           { id: 3, name: '其他' }
1662 1663
         ],
1663 1664
         Classes: [
1665
+          { id: 0, name: '全部' },
1664 1666
           { id: 1, name: '上午' },
1665 1667
           { id: 2, name: '下午' },
1666 1668
           { id: 3, name: '晚上' }
@@ -1672,6 +1674,7 @@ export default {
1672 1674
           { id: 3, name: '次氯酸钠' }
1673 1675
         ],
1674 1676
         germs: [
1677
+          { id: 0, name:"请选择" },
1675 1678
           { id: 1, name: '费森细菌过滤器' },
1676 1679
           { id: 2, name: '日机装细菌过滤器' },
1677 1680
           { id: 3, name: '贝朗机细菌过滤器' },
@@ -1714,6 +1717,18 @@ export default {
1714 1717
             detection_unit: [{ required: true, message: '请填写检测单位' }],
1715 1718
             samplerc: [{ required: true, message: '请填写取样者' }]
1716 1719
         },
1720
+        userRules:{
1721
+          zone: [{required:true,message:"请填写分区"}],
1722
+          bed_number: [{required:true,message:"请填写床位号"}],
1723
+          patient_name: [{required:true,message:"请填写患者"}],
1724
+          disinfect_type: [{required:true,message:"请填写消毒方式"}],
1725
+          disinfectant_type: [{required:true,message:"请填写消毒液"}],
1726
+          disinfection:[{required:true,message:"请填写消毒状态"}],
1727
+         fluid_path:[{required:true,message:"请填写消毒方式"}],
1728
+         disinfectant:[{required:true,message:"请填写消毒液"}],
1729
+         disinfection_status:[{required:true,message:"消毒状态"}],
1730
+          sign_name:[{required:true,message:"请填写签名"}]
1731
+        },
1717 1732
         runOption: [
1718 1733
           { id: 1, name: '正常' },
1719 1734
           { id: 2, name: '故障' }
@@ -1774,9 +1789,15 @@ export default {
1774 1789
           { id: 3, name: '晚上' }
1775 1790
         ],
1776 1791
         // 基表消毒方式
1777
-        disinfectType: [{ id: 1, name: '擦拭' }, { id: 2, name: '化学消毒' }],
1792
+        disinfectType: 
1793
+        [
1794
+          { id: 0, name: '/' },
1795
+          { id: 1, name: '擦拭' }, 
1796
+          { id: 2, name: '化学消毒' }
1797
+        ],
1778 1798
         // 基表消毒液
1779 1799
         disinfectantType: [
1800
+          { id: 0, name: '/' },
1780 1801
           { id: 1, name: '0.22%季铵盐' },
1781 1802
           { id: 2, name: '500mg/l含氯消毒剂' },
1782 1803
           { id: 3, name: '1000mg/l含氯消毒剂' },
@@ -1784,6 +1805,7 @@ export default {
1784 1805
         ],
1785 1806
         // 夜路消毒方式
1786 1807
         sterilizeType: [
1808
+          { id: 0, name: '/' },
1787 1809
           { id: 1, name: '热化学消毒' },
1788 1810
           { id: 2, name: '化学消毒 + 除钙' },
1789 1811
           { id: 3, name: '热化学消毒 + 除钙' },
@@ -1794,6 +1816,7 @@ export default {
1794 1816
         ],
1795 1817
         // 夜路消毒液
1796 1818
         fluidPathType: [
1819
+          { id: 0, name: '/' },
1797 1820
           { id: 1, name: '20%柠檬酸' },
1798 1821
           { id: 2, name: '25%柠檬酸' },
1799 1822
           { id: 3, name: '50%柠檬酸' },
@@ -2007,9 +2030,15 @@ export default {
2007 2030
           this.deviceType = zones
2008 2031
           var numbers = response.data.data.numbers
2009 2032
           console.log('分区号是设么', zones)
2010
-          this.bedZone = zones
2033
+          var zone = [{ id: 0, name: "全部" }];
2034
+          for (let i = 0; i < zones.length; i++) {
2035
+            const item = zones[i];
2036
+            zone.push({ id: item.id, name: item.name });
2037
+          }
2038
+          var devicenumber = response.data.data.devicenumber;
2039
+          this.bedZone = zone
2011 2040
           this.bedNumber = numbers
2012
-          this.Number = numbers
2041
+          this.Number = devicenumber
2013 2042
         })
2014 2043
       },
2015 2044
 
@@ -2037,6 +2066,7 @@ export default {
2037 2066
         })
2038 2067
       },
2039 2068
       handleCurrentChange(val) {
2069
+      
2040 2070
         this.currentRow = val
2041 2071
         this.$forceUpdate()
2042 2072
         this.getMachineDetailById(val.id)
@@ -2045,6 +2075,16 @@ export default {
2045 2075
         this.getPatientInfo(val.id)
2046 2076
         // 获取基本信息
2047 2077
         this.getUserRegister(val.id)
2078
+        //病人下机后插入数据
2079
+        this.getAutoData(val.id)
2080
+      },
2081
+      getAutoData(id){
2082
+         getAutoData(id).then(response=>{
2083
+            if(response.data.state === 1){
2084
+              var dialysis = response.data.data.dialysis
2085
+              console.log("dialysis",dialysis)
2086
+            }
2087
+         })
2048 2088
       },
2049 2089
       getMachineDetailById(id) {
2050 2090
         getMachineDetailById(id).then(response => {
@@ -2085,23 +2125,30 @@ export default {
2085 2125
               if (mode[index].treate_mode === 7) {
2086 2126
                 mode[index] = 'IUF'
2087 2127
               }
2088
-
2128
+              
2089 2129
               if (mode[index].treate_mode === 8) {
2130
+                mode[index] = 'HFHD'
2131
+              }
2132
+             
2133
+              if (mode[index].treate_mode === 9) {
2090 2134
                 mode[index] = 'HFHD+HP'
2091 2135
               }
2136
+              if (mode[index].treate_mode === 10) {
2137
+                mode[index] = 'PHF'
2138
+              }
2092 2139
 
2093
-              if (mode[index].treate_mode === 9) {
2140
+              if (mode[index].treate_mode === 11) {
2094 2141
                 mode[index] = 'HFR'
2095 2142
               }
2096
-              if (mode[index].treate_mode === 10) {
2143
+              if (mode[index].treate_mode === 12) {
2097 2144
                 mode[index] = 'HDF+HP'
2098 2145
               }
2099 2146
   
2100
-              if (mode[index].treate_mode === 11) {
2101
-                mode[index] = 'GRRT'
2147
+              if (mode[index].treate_mode === 13) {
2148
+                mode[index] = 'CRRT'
2102 2149
               }
2103 2150
 
2104
-              if (mode[index].treate_mode === 12) {
2151
+              if (mode[index].treate_mode === 14) {
2105 2152
                 mode[index] = '腹水回收'
2106 2153
               }
2107 2154
               arr1.push(mode[index])
@@ -2110,7 +2157,7 @@ export default {
2110 2157
             this.form.id = addmacher.id
2111 2158
             this.form.serial_number = addmacher.serial_number
2112 2159
             this.form.devicetype = addmacher.device_type
2113
-            this.form.bed_number = zone.name + addmacher.bed_number
2160
+            this.form.bed_number = addmacher.bed_number
2114 2161
             this.form.device_name = addmacher.device_name
2115 2162
             this.form.manufacture_factory = addmacher.manufacture_factory
2116 2163
             this.form.service_manufacturer = addmacher.service_manufacturer
@@ -2153,15 +2200,11 @@ export default {
2153 2200
         this.form.treat_mode.map((item, index) => {
2154 2201
           const obj = {}
2155 2202
           obj.id = index + 1
2156
-          // obj.name = item
2157 2203
           arr2.push(obj.id)
2158 2204
         })
2205
+        console.log("arr2是什么",arr2)
2159 2206
         this.form.treat_type = arr2
2160 2207
 
2161
-        var serial_number = this.form.serial_number
2162
-        var serial_numbers = parseInt(serial_number)
2163
-        this.form.serial_number = serial_numbers
2164
-
2165 2208
         var device_type = this.form.devicetype
2166 2209
         var device_types = parseInt(device_type)
2167 2210
         this.form.devicetype = device_types
@@ -2197,6 +2240,22 @@ export default {
2197 2240
           })
2198 2241
         })
2199 2242
       },
2243
+      cleanMainchine(){
2244
+        this.form.manufacture_factory = ""
2245
+        this.form.service_manufacturer= ""
2246
+        this.form.use_section= ""
2247
+        this.form.buy_date= ""
2248
+        this.form.install_date= ""
2249
+        this.form.start_date= ""
2250
+        this.form.maintenance_engineer= ""
2251
+        this.form.telephone= ""
2252
+        this.form.guarantee_date= ""
2253
+        this.form.user_total= ""
2254
+        this.form.rubbish_date= ""
2255
+        this.form.user_year = ""
2256
+        this.form.work_time = ""
2257
+        this.form.treat_mode = ""
2258
+      },
2200 2259
       addPlan() {
2201 2260
         this.$refs.planForm.open()
2202 2261
       },
@@ -2261,6 +2320,10 @@ export default {
2261 2320
               if (plan[index].classtime === 3) {
2262 2321
                 plan[index].classtime = '晚上'
2263 2322
               }
2323
+                
2324
+              if(plan[index].way === 0){
2325
+                plan[index].way = "/"
2326
+              }
2264 2327
 
2265 2328
               if (plan[index].way === 1) {
2266 2329
                 plan[index].way = '擦拭'
@@ -2268,7 +2331,11 @@ export default {
2268 2331
               if (plan[index].way === 2) {
2269 2332
                 plan[index].way = '化学消毒'
2270 2333
               }
2271
-
2334
+               
2335
+                if (plan[index].machine_disinfectant === 0) {
2336
+                plan[index].machine_disinfectant = '/'
2337
+              }
2338
+ 
2272 2339
               if (plan[index].machine_disinfectant === 1) {
2273 2340
                 plan[index].machine_disinfectant = '0.22%季铵盐'
2274 2341
               }
@@ -2282,7 +2349,11 @@ export default {
2282 2349
               if (plan[index].machine_disinfectant === 4) {
2283 2350
                 plan[index].machine_disinfectant = '1500mg/l含氯消毒剂'
2284 2351
               }
2285
-
2352
+   
2353
+               if (plan[index].disinfectan_way === 0) {
2354
+                plan[index].disinfectan_way = '/'
2355
+              }
2356
+      
2286 2357
               if (plan[index].disinfectan_way === 1) {
2287 2358
                 plan[index].disinfectan_way = '热化学消毒'
2288 2359
               }
@@ -2306,6 +2377,11 @@ export default {
2306 2377
               if (plan[index].disinfectan_way === 7) {
2307 2378
                 plan[index].disinfectan_way = '清洗'
2308 2379
               }
2380
+
2381
+              if (plan[index].disinfectant === 0) {
2382
+                plan[index].disinfectant = '/'
2383
+              }
2384
+
2309 2385
               if (plan[index].disinfectant === 1) {
2310 2386
                 plan[index].disinfectant = '20%柠檬酸'
2311 2387
               }
@@ -2378,6 +2454,11 @@ export default {
2378 2454
               if (plandetail[index].classtime === 3) {
2379 2455
                 plandetail[index].classtime = '晚上'
2380 2456
               }
2457
+              
2458
+              
2459
+              if (plandetail[index].way === 0) {
2460
+                plandetail[index].way = '/'
2461
+              }
2381 2462
 
2382 2463
               if (plandetail[index].way === 1) {
2383 2464
                 plandetail[index].way = '擦拭'
@@ -2385,6 +2466,10 @@ export default {
2385 2466
               if (plandetail[index].way === 2) {
2386 2467
                 plandetail[index].way = '化学消毒'
2387 2468
               }
2469
+             
2470
+              if (plandetail[index].machine_disinfectant === 0) {
2471
+                plandetail[index].machine_disinfectant = '/'
2472
+              }
2388 2473
 
2389 2474
               if (plandetail[index].machine_disinfectant === 1) {
2390 2475
                 plandetail[index].machine_disinfectant = '0.22%季铵盐'
@@ -2399,6 +2484,10 @@ export default {
2399 2484
               if (plandetail[index].machine_disinfectant === 4) {
2400 2485
                 plandetail[index].machine_disinfectant = '1500mg/l含氯消毒剂'
2401 2486
               }
2487
+              
2488
+               if (plandetail[index].disinfectan_way === 0) {
2489
+                plandetail[index].disinfectan_way = '/'
2490
+              }
2402 2491
 
2403 2492
               if (plandetail[index].disinfectan_way === 1) {
2404 2493
                 plandetail[index].disinfectan_way = '热化学消毒'
@@ -2423,6 +2512,11 @@ export default {
2423 2512
               if (plandetail[index].disinfectan_way === 7) {
2424 2513
                 plandetail[index].disinfectan_way = '清洗'
2425 2514
               }
2515
+             
2516
+               if (plandetail[index].disinfectant === 0) {
2517
+                plandetail[index].disinfectant = '/'
2518
+              }
2519
+
2426 2520
               if (plandetail[index].disinfectant === 1) {
2427 2521
                 plandetail[index].disinfectant = '20%柠檬酸'
2428 2522
               }
@@ -2522,7 +2616,7 @@ export default {
2522 2616
           return false
2523 2617
         }
2524 2618
         this.$confirm(
2525
-          '确认要删除所选的信息吗? <br>删除后,信息将无法恢复',
2619
+          '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
2526 2620
           '删除提示',
2527 2621
           {
2528 2622
             dangerouslyUseHTMLString: true,
@@ -2575,7 +2669,7 @@ export default {
2575 2669
           return false
2576 2670
         }
2577 2671
         this.$confirm(
2578
-          '确认要删除所选吗? <br>删除后,信息将无法恢复',
2672
+          '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
2579 2673
           '删除提示',
2580 2674
           {
2581 2675
             dangerouslyUseHTMLString: true,
@@ -2657,10 +2751,10 @@ export default {
2657 2751
             if (patients.is_infectious === 2) {
2658 2752
               this.userform.contagion = '有'
2659 2753
             }
2660
-            this.userform.patient_name = patients.name
2754
+            this.userform.patient_name = patients.patient_id
2661 2755
             var zone = response.data.data.zone
2662
-            console.log('zone', zone)
2663
-            this.userform.zone = zone.name
2756
+            console.log('zone==========', zone)
2757
+            this.userform.zone = zone.id
2664 2758
             var number = response.data.data.number
2665 2759
             console.log('nubmer', number)
2666 2760
             this.userform.bed_number = number.number
@@ -2670,60 +2764,7 @@ export default {
2670 2764
             this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
2671 2765
             var prescription = response.data.data.prescription
2672 2766
             console.log('prescription', prescription)
2673
-            if (prescription.mode_id === 1) {
2674
-              this.userform.dialysis_mode = 'HD'
2675
-            }
2676
-            if (prescription.mode_id === 2) {
2677
-              this.userform.dialysis_mode = 'HDF'
2678
-            }
2679
-            if (prescription.mode_id === 3) {
2680
-              this.userform.dialysis_mode = 'HD+HP'
2681
-            }
2682
-            if (prescription.mode_id === 4) {
2683
-              this.userform.dialysis_mode = 'HP'
2684
-            }
2685
-            if (prescription.mode_id === 5) {
2686
-              this.userform.dialysis_mode = 'HF'
2687
-            }
2688
-            if (prescription.mode_id === 6) {
2689
-              this.userform.dialysis_mode = 'SCUF'
2690
-            }
2691
-            if (prescription.mode_id === 7) {
2692
-              this.userform.dialysis_mode = 'IUF'
2693
-            }
2694
-            if (prescription.mode_id === 8) {
2695
-              this.userform.dialysis_mode = 'HFHD'
2696
-            }
2697
-            if (prescription.mode_id === 9) {
2698
-              this.userform.dialysis_mode = 'HFHD+HP'
2699
-            }
2700
-            if (prescription.mode_id === 10) {
2701
-              this.userform.dialysis_mode = 'PHF'
2702
-            }
2703
-            if (prescription.mode_id === 11) {
2704
-              this.userform.dialysis_mode = 'HFR'
2705
-            }
2706
-            if (prescription.mode_id === 12) {
2707
-              this.userform.dialysis_mode = 'HDF+HP'
2708
-            }
2709
-            if (prescription.mode_id === 13) {
2710
-              this.userform.dialysis_mode = 'CRRT'
2711
-            }
2712
-            if (prescription.mode_id === 14) {
2713
-              this.userform.dialysis_mode = '腹水回输'
2714
-            }
2715
-            if (prescription.mode_id === 15) {
2716
-              this.userform.dialysis_mode = 'HD前置换'
2717
-            }
2718
-            if (prescription.mode_id === 16) {
2719
-              this.userform.dialysis_mode = 'HD后置换'
2720
-            }
2721
-            if (prescription.mode_id === 17) {
2722
-              this.userform.dialysis_mode = 'HDF前置换'
2723
-            }
2724
-            if (prescription.mode_id === 18) {
2725
-              this.userform.dialysis_mode = 'HDF后置换'
2726
-            }
2767
+            this.userform.dialysis_mode = prescription.mode_id
2727 2768
             var dislysis = response.data.data.dislysis
2728 2769
             console.log('dislysis', dislysis)
2729 2770
             this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
@@ -2732,10 +2773,13 @@ export default {
2732 2773
           }
2733 2774
         })
2734 2775
       },
2776
+      
2777
+     getTimes(time) {
2778
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
2779
+      },
2780
+
2735 2781
       SaveInformation(formName) {
2736
-        if (this.userform.classtype === '') {
2737
-          this.userform.classtype = 0
2738
-        }
2782
+      
2739 2783
         var classtypes = this.userform.classtype
2740 2784
         var classtype = parseInt(classtypes)
2741 2785
         this.userform.classtype = classtype
@@ -2752,17 +2796,20 @@ export default {
2752 2796
         var patient_name = parseInt(patientName)
2753 2797
         this.userform.patient_name = patient_name
2754 2798
   
2755
-        if (this.userform.dialysis_mode === '') {
2756
-          this.userform.dialysis_mode = 0
2757
-        }
2799
+    
2758 2800
         var dialysismode = this.userform.dialysis_mode
2759 2801
         var dialysis_mode = parseInt(dialysismode)
2760 2802
         this.userform.dialysis_mode = dialysis_mode
2803
+        
2761 2804
 
2762 2805
         if (this.userform.failure_stage === '') {
2763 2806
           this.userform.failure_stage = 0
2764 2807
         }
2765
-
2808
+         
2809
+        if(this.userform.dialysis_checked === ''){
2810
+             this.userform.dialysis_checked = 0  
2811
+        } 
2812
+        
2766 2813
         if (this.userform.dialysis_checked === true) {
2767 2814
           this.userform.dialysis_checked = 1
2768 2815
         }
@@ -2771,6 +2818,10 @@ export default {
2771 2818
           this.userform.dialysis_checked = 0
2772 2819
         }
2773 2820
 
2821
+        if(this.userform.germ_checked === ""){
2822
+           this.userform.germ_checked = 0
2823
+        }
2824
+
2774 2825
         if (this.userform.germ_checked === true) {
2775 2826
           this.userform.germ_checked = 1
2776 2827
         }
@@ -2784,15 +2835,18 @@ export default {
2784 2835
         var dialysis_name = this.userform.dialysis_name
2785 2836
         var dialysis = parseInt(dialysis_name)
2786 2837
         this.userform.dialysis_name = dialysis
2787
-  
2788
-        // var signame = this.userform.sign_name
2789
-        // var signames = parseInt(signame)
2790
-        // this.userform.sign_name = signames
2838
+        
2839
+        if (this.userform.germ_name === ''){
2840
+           this.userform.germ_name = 0
2841
+        }
2842
+        var germname =  this.userform.germ_name
2843
+        var germames =  parseInt(germname)
2844
+        this.userform.germ_name = germames
2845
+      
2846
+        if(this.userform.clean === ""){
2847
+           this.userform.clean = 0
2848
+        }
2791 2849
 
2792
-        // var germ_number = this.userform.germ_number
2793
-        // var germnumber = parseInt(germ_number)
2794
-        // this.userform.germ_number = germnumber
2795
-  
2796 2850
         if (this.userform.clean === true) {
2797 2851
           this.userform.clean = 1
2798 2852
         }
@@ -2800,6 +2854,11 @@ export default {
2800 2854
         if (this.userform.clean === false) {
2801 2855
           this.userform.clean = 0
2802 2856
         }
2857
+
2858
+        this.userform.starttime = this.getTimes(this.userform.starttime)
2859
+        this.userform.endtime = this.getTimes(this.userform.endtime)
2860
+        
2861
+          
2803 2862
         this.$refs[formName].validate((valid) => {
2804 2863
           if (valid) {
2805 2864
             SaveInformation(this.equimentid, this.userform).then(response => {
@@ -2807,30 +2866,31 @@ export default {
2807 2866
                 var information = response.data.data.information
2808 2867
                 console.log('information', information)
2809 2868
                 this.$message.success('添加成功')
2869
+                // this.$refs.child.getInformationData()
2810 2870
               }
2811 2871
             })
2812 2872
           }
2813 2873
         })
2814 2874
       },
2815
-      changStartTime(val) {
2816
-        this.userform.starttime = val
2817
-      },
2818
-      changeEndTime(val) {
2819
-        this.userform.endtime = val
2820
-        console.log('val', val)
2821
-        console.log('开始时间', this.userform.starttime)
2822
-        console.log('呵呵', this.formatDuring(val))
2823
-      },
2824
-      formatDuring(mss) {
2825
-        const days = parseInt(mss / (1000 * 60 * 60 * 24)) // 得到天数
2826
-        const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时
2827
-        const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数
2828
-        const seconds = (mss % (1000 * 60)) / 1000 // 得到秒数
2829
-        const str1 = hours < 10 ? ('0' + hours) : hours
2830
-        console.log('str1', str1)
2831
-        const str2 = minutes < 10 ? ('0' + minutes) : minutes
2832
-        return str1 + ':' + str2
2833
-      },
2875
+      // changStartTime(val) {
2876
+      //   this.userform.starttime = val
2877
+      // },
2878
+      // changeEndTime(val) {
2879
+      //   this.userform.endtime = val
2880
+      //   console.log('val', val)
2881
+      //   console.log('开始时间', this.userform.starttime)
2882
+      //   console.log('呵呵', this.formatDuring(val))
2883
+      // },
2884
+      // formatDuring(mss) {
2885
+      //   const days = parseInt(mss / (1000 * 60 * 60 * 24)) // 得到天数
2886
+      //   const hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) // 得到小时
2887
+      //   const minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)) // 得到分钟数
2888
+      //   const seconds = (mss % (1000 * 60)) / 1000 // 得到秒数
2889
+      //   const str1 = hours < 10 ? ('0' + hours) : hours
2890
+      //   console.log('str1', str1)
2891
+      //   const str2 = minutes < 10 ? ('0' + minutes) : minutes
2892
+      //   return str1 + ':' + str2
2893
+      // },
2834 2894
       // 获取签名
2835 2895
       getAllOrganization() {
2836 2896
         getAllOrganization().then(response => {
@@ -3236,7 +3296,8 @@ export default {
3236 3296
 </script>
3237 3297
 <style lang="scss" scoped>
3238 3298
     .zone{
3239
-       margin-left: 30px
3299
+      //  margin-left: 30px;
3300
+       text-align: left;
3240 3301
     }
3241 3302
     .disinfect{
3242 3303
       position: relative;

+ 1 - 1
src/xt_pages/management/index.vue Целия файл

@@ -108,7 +108,7 @@
108 108
           <template slot-scope="scope">{{ scope.row.name }}</template>
109 109
         </el-table-column>
110 110
 
111
-        <el-table-column label="位号" align="center">
111
+        <el-table-column label="位号" align="center">
112 112
           <template slot-scope="scope">{{ scope.row.bed_number }}</template>
113 113
         </el-table-column>
114 114