xiaoming_global 5 lat temu
rodzic
commit
677062c885

+ 10 - 2
src/api/manage.js Wyświetl plik

71
 }
71
 }
72
 
72
 
73
 export function UpdateMachineInfo(data) {
73
 export function UpdateMachineInfo(data) {
74
+  console.log("data..", data);
74
   return request({
75
   return request({
75
     url: "/api/management/updatemachineinfo",
76
     url: "/api/management/updatemachineinfo",
76
     method: "Post",
77
     method: "Post",
153
 }
154
 }
154
 
155
 
155
 export function SaveInformation(id, data) {
156
 export function SaveInformation(id, data) {
156
-  console.log("id", id);
157
-  console.log("data", data);
157
+  console.log("data是什么东西", data);
158
   return request({
158
   return request({
159
     url: "/api/manage/saveinformation?id=" + id,
159
     url: "/api/manage/saveinformation?id=" + id,
160
     method: "Post",
160
     method: "Post",
455
     params: params
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 Wyświetl plik

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

+ 143 - 146
src/utils/tools.js Wyświetl plik

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
 export function jsGetAge(strBirthday, splitstr) {
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
 export function isPositiveNumber(s) {
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
 export function dialysisAge(firstDialysisDate) {
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
 export function uParseTime(time, cFormat) {
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 Wyświetl plik

1
 <template>
1
 <template>
2
   <div id="manage-form">
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
       <el-form ref="form" :model="form" :rules="rules">
9
       <el-form ref="form" :model="form" :rules="rules">
5
         <el-row>
10
         <el-row>
6
           <el-col :span="8">
11
           <el-col :span="8">
7
             <el-form-item label="序列号:" required prop="serial_number">
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
             </el-form-item>
17
             </el-form-item>
10
           </el-col>
18
           </el-col>
11
 
19
 
12
           <el-col :span="8">
20
           <el-col :span="8">
13
             <el-form-item label="设备类型:" required prop="device_type">
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
                 <el-option
27
                 <el-option
16
                   v-for="item in this.DeviceType"
28
                   v-for="item in this.DeviceType"
17
                   :key="item.id"
29
                   :key="item.id"
23
           </el-col>
35
           </el-col>
24
 
36
 
25
           <el-col :span="8">
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
               <el-select style="width:135px" v-model="form.bed_number">
44
               <el-select style="width:135px" v-model="form.bed_number">
28
                 <el-option
45
                 <el-option
29
                   v-for="item in this.bedNumber"
46
                   v-for="item in this.bedNumber"
30
                   :key="item.id"
47
                   :key="item.id"
31
-                  :label="item.zone_name + item.number"
48
+                  :label="item.number"
32
                   :value="item.id"
49
                   :value="item.id"
33
                 ></el-option>
50
                 ></el-option>
34
               </el-select>
51
               </el-select>
38
         <el-row>
55
         <el-row>
39
           <el-col :span="8">
56
           <el-col :span="8">
40
             <el-form-item label="设备名称:" required prop="device_name">
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
             </el-form-item>
62
             </el-form-item>
43
           </el-col>
63
           </el-col>
44
           <el-col :span="8">
64
           <el-col :span="8">
45
             <el-form-item label="生产厂家:" prop="manufacture_factory">
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
             </el-form-item>
70
             </el-form-item>
48
           </el-col>
71
           </el-col>
49
           <el-col :span="8">
72
           <el-col :span="8">
50
             <el-form-item label="维修厂家:" prop="service_manufacturer">
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
             </el-form-item>
78
             </el-form-item>
53
           </el-col>
79
           </el-col>
54
         </el-row>
80
         </el-row>
60
           </el-col>
86
           </el-col>
61
           <el-col :span="8">
87
           <el-col :span="8">
62
             <el-form-item label="使用科室:" prop="use_section">
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
             </el-form-item>
93
             </el-form-item>
65
           </el-col>
94
           </el-col>
66
           <el-col :span="8">
95
           <el-col :span="8">
67
             <el-form-item label="科室编号:" prop="section_number">
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
             </el-form-item>
101
             </el-form-item>
70
           </el-col>
102
           </el-col>
71
         </el-row>
103
         </el-row>
79
                 placeholder="请选择"
111
                 placeholder="请选择"
80
                 format="yyyy-MM-dd"
112
                 format="yyyy-MM-dd"
81
                 value-format="yyyy-MM-dd"
113
                 value-format="yyyy-MM-dd"
82
-                style="width:135px"
114
+                style="width:140px"
83
               ></el-date-picker>
115
               ></el-date-picker>
84
             </el-form-item>
116
             </el-form-item>
85
           </el-col>
117
           </el-col>
92
                 placeholder="请选择"
124
                 placeholder="请选择"
93
                 format="yyyy-MM-dd"
125
                 format="yyyy-MM-dd"
94
                 value-format="yyyy-MM-dd"
126
                 value-format="yyyy-MM-dd"
95
-                style="width:135px"
127
+                style="width:140px"
96
               ></el-date-picker>
128
               ></el-date-picker>
97
             </el-form-item>
129
             </el-form-item>
98
           </el-col>
130
           </el-col>
105
                 placeholder="请选择"
137
                 placeholder="请选择"
106
                 format="yyyy-MM-dd"
138
                 format="yyyy-MM-dd"
107
                 value-format="yyyy-MM-dd"
139
                 value-format="yyyy-MM-dd"
108
-                style="width:135px"
140
+                style="width:140px"
109
               ></el-date-picker>
141
               ></el-date-picker>
110
             </el-form-item>
142
             </el-form-item>
111
           </el-col>
143
           </el-col>
113
         <el-row>
145
         <el-row>
114
           <el-col :span="8">
146
           <el-col :span="8">
115
             <el-form-item label="维修工程师:" prop="maintenance_engineer">
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
             </el-form-item>
152
             </el-form-item>
118
           </el-col>
153
           </el-col>
119
           <el-col :span="8">
154
           <el-col :span="8">
123
           </el-col>
158
           </el-col>
124
           <el-col :span="8">
159
           <el-col :span="8">
125
             <el-form-item label="保修期限:" prop="guarantee_date">
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
             </el-form-item>
165
             </el-form-item>
128
           </el-col>
166
           </el-col>
129
         </el-row>
167
         </el-row>
145
             </el-form-item>
183
             </el-form-item>
146
           </el-col>
184
           </el-col>
147
           <el-col :span="8">
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
             </el-form-item>
195
             </el-form-item>
151
           </el-col>
196
           </el-col>
152
           <el-col :span="8" v-show="DisinfectionShow">
197
           <el-col :span="8" v-show="DisinfectionShow">
223
         </el-row>
268
         </el-row>
224
         <el-row>
269
         <el-row>
225
           <el-col :span="24">
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
                 <el-checkbox
287
                 <el-checkbox
229
                   style="min-width:50px"
288
                   style="min-width:50px"
230
                   v-for="item in treatmentmode"
289
                   v-for="item in treatmentmode"
242
               :indeterminate="isIndeterminate"
301
               :indeterminate="isIndeterminate"
243
               v-model="checkAll"
302
               v-model="checkAll"
244
               @change="handleCheckAllChange"
303
               @change="handleCheckAllChange"
245
-            >全选</el-checkbox>
304
+              >全选</el-checkbox
305
+            >
246
           </el-col>
306
           </el-col>
247
         </el-row>
307
         </el-row>
248
       </el-form>
308
       </el-form>
249
       <span slot="footer" class="dialog-footer">
309
       <span slot="footer" class="dialog-footer">
250
         <el-button @click="dialogVisible = false">取 消</el-button>
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
       </span>
314
       </span>
253
     </el-dialog>
315
     </el-dialog>
254
   </div>
316
   </div>
255
 </template>
317
 </template>
256
 
318
 
257
 <script>
319
 <script>
258
-import { getAllSubregion, SaveManageInfo } from "@/api/manage";
320
+import { getAllSubregion, SaveManageInfo } from '@/api/manage'
259
 const treatmentmodes = [
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
 export default {
337
 export default {
274
-  name: "ManageForm",
338
+  name: 'ManageForm',
275
   data() {
339
   data() {
276
     return {
340
     return {
277
       dialogVisible: false,
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
       form: {
343
       form: {
294
-        serial_number: "", // 序列号
344
+        serial_number: '', // 序列号
295
         device_type: 1, // 设备类型
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
         machine_status: 1, // 机器状态
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
         treat_mode: [],
368
         treat_mode: [],
319
         treat_type: [] // 治疗模式
369
         treat_type: [] // 治疗模式
320
       },
370
       },
371
+      fucks: [
372
+        { id: 1, name: 'zs' },
373
+        { id: 2, name: 'ls' },
374
+        { id: 3, name: 'ww' }
375
+      ],
321
       deviceType: [],
376
       deviceType: [],
322
       bedNumber: [],
377
       bedNumber: [],
323
       machineStatus: [
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
       DisinfectionMode: [
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
       DisCardResion: [
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
       checkAll: false,
395
       checkAll: false,
340
       isIndeterminate: true,
396
       isIndeterminate: true,
341
       treatmentmode: treatmentmodes,
397
       treatmentmode: treatmentmodes,
398
+      // treatmentmode: [
399
+      //   { id: 1, name: 'zs' },
400
+      //   { id: 2, name: 'ls' },
401
+      //   { id: 3, name: 'ww' }
402
+      // ],
342
       DeviceType: [
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
       rules: {
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
       DisinfectionShow: false,
420
       DisinfectionShow: false,
356
       reverseShow: false,
421
       reverseShow: false,
359
       totalShow: true,
424
       totalShow: true,
360
       bedShow: true,
425
       bedShow: true,
361
       disa: true
426
       disa: true
362
-    };
427
+    }
363
   },
428
   },
364
   methods: {
429
   methods: {
365
     open: function() {
430
     open: function() {
366
-      this.dialogVisible = true;
431
+      this.dialogVisible = true
367
       // this.resetForm("form");
432
       // this.resetForm("form");
368
     },
433
     },
369
     changetreatmentmode(val) {
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
     handleCheckAllChange(val) {
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
     getAllSubregion() {
447
     getAllSubregion() {
380
       getAllSubregion().then(response => {
448
       getAllSubregion().then(response => {
381
         if (response.data.state === 1) {
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
     changeDeviceType(val) {
464
     changeDeviceType(val) {
390
       if (val === 1) {
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
       if (val === 2) {
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
       if (val === 3) {
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
     changeMachineStatus(val) {
490
     changeMachineStatus(val) {
416
       if (val === 4) {
491
       if (val === 4) {
417
-        this.disa = false;
492
+        this.disa = false
418
       } else {
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
     SaveManageInfo(formName) {
499
     SaveManageInfo(formName) {
425
-      const arr1 = [];
500
+      console.log('====', this.form.treat_mode)
501
+      const arr1 = []
426
       this.form.treat_mode.map((item, index) => {
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
       this.$refs[formName].validate(valid => {
596
       this.$refs[formName].validate(valid => {
478
         if (valid) {
597
         if (valid) {
479
           SaveManageInfo(this.form).then(response => {
598
           SaveManageInfo(this.form).then(response => {
480
             if (response.data.state === 1) {
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
             } else {
605
             } else {
486
-              this.$message.error("添加失败");
606
+              this.$message.error('添加失败')
487
             }
607
             }
488
-          });
608
+          })
489
         }
609
         }
490
-      });
610
+      })
491
     }
611
     }
492
   },
612
   },
493
   created() {
613
   created() {
494
-    this.getAllSubregion();
614
+    this.getAllSubregion()
495
   }
615
   }
496
-};
616
+}
497
 </script>
617
 </script>
498
 
618
 
499
 <style lang="scss">
619
 <style lang="scss">

+ 23 - 17
src/xt_pages/management/components/MultipleForm.vue Wyświetl plik

58
           </el-col>
58
           </el-col>
59
         </el-row>
59
         </el-row>
60
         <el-row>
60
         <el-row>
61
-          <el-col :span="6">
61
+          <el-col :span="7">
62
             <el-form-item label="使用年限:">
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
                 <el-option
64
                 <el-option
65
                   v-for="item in this.userYear"
65
                   v-for="item in this.userYear"
66
                   :key="item.id"
66
                   :key="item.id"
70
               </el-select>
70
               </el-select>
71
             </el-form-item>
71
             </el-form-item>
72
           </el-col>
72
           </el-col>
73
-          <el-col :span="10">
73
+          <el-col :span="7">
74
             <div class="cell clearfix">
74
             <div class="cell clearfix">
75
               <label class="title"><span class="name">日期查询</span> : </label>
75
               <label class="title"><span class="name">日期查询</span> : </label>
76
               <el-date-picker
76
               <el-date-picker
79
                 v-model="form.start_time"
79
                 v-model="form.start_time"
80
                 prefix-icon="el-icon-date"
80
                 prefix-icon="el-icon-date"
81
                 :editable="false"
81
                 :editable="false"
82
-                style="width: 196px;"
82
+                style="width: 140px;"
83
                 type="date"
83
                 type="date"
84
                 placeholder="选择日期时间"
84
                 placeholder="选择日期时间"
85
                 align="right"
85
                 align="right"
94
                 v-model="form.end_time"
94
                 v-model="form.end_time"
95
                 prefix-icon="el-icon-date"
95
                 prefix-icon="el-icon-date"
96
                 :editable="false"
96
                 :editable="false"
97
-                style="width: 196px;"
97
+                style="width: 140px;"
98
                 type="date"
98
                 type="date"
99
                 placeholder="选择日期时间"
99
                 placeholder="选择日期时间"
100
                 align="right"
100
                 align="right"
104
               </el-date-picker>
104
               </el-date-picker>
105
             </div>
105
             </div>
106
           </el-col>
106
           </el-col>
107
-          <el-col :span="4">
107
+          <el-col :span="5">
108
             <el-form-item label="合计:">
108
             <el-form-item label="合计:">
109
               故障次数
109
               故障次数
110
               <span>{{ failure_times }}</span
110
               <span>{{ failure_times }}</span
120
         </el-row>
120
         </el-row>
121
         <el-row>
121
         <el-row>
122
           <el-table :data="tableData" border style="width: 100%">
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
                 {{ scope.row.id }}
131
                 {{ scope.row.id }}
126
-              </template>
132
+              </template> -->
127
             </el-table-column>
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
               <template slot-scope="scope">
135
               <template slot-scope="scope">
130
                 {{ scope.row.name }}
136
                 {{ scope.row.name }}
131
               </template>
137
               </template>
405
             if (macher[index].machine_status === 4) {
411
             if (macher[index].machine_status === 4) {
406
               macher[index].machine_status = "报废机";
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
           console.log("macher", macher);
418
           console.log("macher", macher);
419
       });
421
       });
420
     },
422
     },
421
     getTime(time) {
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
   created() {
431
   created() {

+ 12 - 6
src/xt_pages/management/components/PlanForm.vue Wyświetl plik

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

+ 12 - 8
src/xt_pages/management/components/QualityForm.vue Wyświetl plik

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

+ 1 - 1
src/xt_pages/management/components/RepairForm.vue Wyświetl plik

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

+ 41 - 5
src/xt_pages/management/components/UserForm.vue Wyświetl plik

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

+ 207 - 146
src/xt_pages/management/home.vue Wyświetl plik

8
                <div style="width:24%">
8
                <div style="width:24%">
9
                  <el-row>
9
                  <el-row>
10
                    <el-col :span="24">
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
                         <el-option
13
                         <el-option
14
                          v-for="item in bedZone"
14
                          v-for="item in bedZone"
15
                          :key="item.id"
15
                          :key="item.id"
22
                   </el-row>
22
                   </el-row>
23
                   <el-row>
23
                   <el-row>
24
                    <el-col>
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
                         <el-option
27
                         <el-option
28
                          v-for="item in Classes"
28
                          v-for="item in Classes"
29
                          :key="item.id"
29
                          :key="item.id"
36
                   <el-row>
36
                   <el-row>
37
                      <el-col>
37
                      <el-col>
38
                      <span>设备类型:</span>
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
                         <el-option
40
                         <el-option
41
                          v-for="item in DeviceTypeType"
41
                          v-for="item in DeviceTypeType"
42
                          :key="item.id"
42
                          :key="item.id"
116
                                </el-col>
116
                                </el-col>
117
                               <el-col :span="7">
117
                               <el-col :span="7">
118
                                  <el-form-item label="设备类型:" required prop="devicetype">
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
                                        <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" ></el-option>
120
                                        <el-option v-for="item in this.DeviceTypes" :key="item.id" :label="item.name" :value="item.id" ></el-option>
121
                                   </el-select>
121
                                   </el-select>
122
                                  </el-form-item>
122
                                  </el-form-item>
123
                               </el-col>
123
                               </el-col>
124
                               <el-col :span="7">
124
                               <el-col :span="7">
125
                                   <el-form-item label="机位号:">
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
                                        </el-select>
128
                                        </el-select>
129
                                   </el-form-item>
129
                                   </el-form-item>
130
                               </el-col>
130
                               </el-col>
287
                              <el-row>
287
                              <el-row>
288
                                <div class="but">
288
                                <div class="but">
289
                                  <el-col :span="12">
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
                                  </el-col>  
291
                                  </el-col>  
292
                                  <el-col :span="8">
292
                                  <el-col :span="8">
293
                                   <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMachineInfo('form')">保存</el-button>
293
                                   <el-button type="primary" size="medium" v-show="confirmShow" @click="UpdateMachineInfo('form')">保存</el-button>
486
                    <el-tab-pane label="使用登记" name="third">
486
                    <el-tab-pane label="使用登记" name="third">
487
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
487
                         <el-tabs v-model="activeNameThree" @tab-click="handleClick">
488
                           <el-tab-pane label="新增使用登记" name="first">
488
                           <el-tab-pane label="新增使用登记" name="first">
489
-                             <el-form :model="userform" ref="userform">
489
+                             <el-form :model="userform" ref="userform" :rules="userRules">
490
                                 <el-row>
490
                                 <el-row>
491
                                   <el-col :span="8">
491
                                   <el-col :span="8">
492
                                      <el-form-item label="日期:">
492
                                      <el-form-item label="日期:">
502
                                      </el-form-item>
502
                                      </el-form-item>
503
                                   </el-col>
503
                                   </el-col>
504
                                   <el-col :span="8">
504
                                   <el-col :span="8">
505
-                                     <el-form-item label="班次:">
505
+                                     <el-form-item label="班次:" required prop="classtype">
506
                                        <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
506
                                        <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
507
                                            <el-option
507
                                            <el-option
508
                                             v-for="item in classType"
508
                                             v-for="item in classType"
515
                                      </el-form-item>
515
                                      </el-form-item>
516
                                   </el-col>
516
                                   </el-col>
517
                                   <el-col :span="8">
517
                                   <el-col :span="8">
518
-                                     <el-form-item label="分区:">
518
+                                     <el-form-item label="分区:" required prop="zone">
519
                                          <el-select v-model="userform.zone" placeholder="请选择" class="a">
519
                                          <el-select v-model="userform.zone" placeholder="请选择" class="a">
520
                                            <el-option
520
                                            <el-option
521
                                             v-for="item in bedNumber"
521
                                             v-for="item in bedNumber"
529
                                 </el-row>
529
                                 </el-row>
530
                                 <el-row>
530
                                 <el-row>
531
                                     <el-col :span="8">
531
                                     <el-col :span="8">
532
-                                        <el-form-item label="床位号:">
532
+                                        <el-form-item label="床位号:" required prop="bed_number">
533
                                         <el-select style="width:150px" v-model="userform.bed_number">
533
                                         <el-select style="width:150px" v-model="userform.bed_number">
534
                                           <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.number" :value="item.id"></el-option>
534
                                           <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.number" :value="item.id"></el-option>
535
                                         </el-select>
535
                                         </el-select>
536
                                      </el-form-item>
536
                                      </el-form-item>
537
                                     </el-col>
537
                                     </el-col>
538
                                     <el-col :span="8">
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
                                              <el-option v-for="item in this.patientName" :key="item.patient_id" :label="item.name" :value="item.patient_id"></el-option>
541
                                              <el-option v-for="item in this.patientName" :key="item.patient_id" :label="item.name" :value="item.patient_id"></el-option>
542
                                            </el-select>
542
                                            </el-select>
543
                                        </el-form-item>
543
                                        </el-form-item>
656
                                       <el-form-item label="①机表"></el-form-item>
656
                                       <el-form-item label="①机表"></el-form-item>
657
                                   </el-col>
657
                                   </el-col>
658
                                   <el-col :span="8">
658
                                   <el-col :span="8">
659
-                                     <el-form-item label="消毒方式:">
659
+                                     <el-form-item label="消毒方式:" required prop="disinfect_type">
660
                                          <el-select v-model="userform.disinfect_type" placeholder="请选择" >
660
                                          <el-select v-model="userform.disinfect_type" placeholder="请选择" >
661
                                            <el-option
661
                                            <el-option
662
                                             v-for="item in disinfectType"
662
                                             v-for="item in disinfectType"
669
                                      </el-form-item>    
669
                                      </el-form-item>    
670
                                   </el-col>
670
                                   </el-col>
671
                                   <el-col :span="8">
671
                                   <el-col :span="8">
672
-                                     <el-form-item label="消毒液:">
672
+                                     <el-form-item label="消毒液:" required prop="disinfectant_type">
673
                                         <el-select v-model="userform.disinfectant_type" placeholder="请选择" >
673
                                         <el-select v-model="userform.disinfectant_type" placeholder="请选择" >
674
                                            <el-option
674
                                            <el-option
675
                                             v-for="item in disinfectantType"
675
                                             v-for="item in disinfectantType"
684
                                 </el-row>
684
                                 </el-row>
685
                                 <el-row>
685
                                 <el-row>
686
                                   <el-col :span="8">      
686
                                   <el-col :span="8">      
687
-                                     <el-form-item label="消毒状态:">
687
+                                     <el-form-item label="消毒状态:" required prop="disinfection">
688
                                         <el-select v-model="userform.disinfection" placeholder="请选择" >
688
                                         <el-select v-model="userform.disinfection" placeholder="请选择" >
689
                                            <el-option
689
                                            <el-option
690
                                             v-for="item in disinfection"
690
                                             v-for="item in disinfection"
709
                                        <el-form-item label="②液路"></el-form-item>
709
                                        <el-form-item label="②液路"></el-form-item>
710
                                    </el-col>
710
                                    </el-col>
711
                                    <el-col :span="8">
711
                                    <el-col :span="8">
712
-                                       <el-form-item label="消毒方式:">
712
+                                       <el-form-item label="消毒方式:" required prop="fluid_path">
713
                                          <el-select v-model="userform.fluid_path" placeholder="请选择" >
713
                                          <el-select v-model="userform.fluid_path" placeholder="请选择" >
714
                                            <el-option
714
                                            <el-option
715
                                             v-for="item in sterilizeType"
715
                                             v-for="item in sterilizeType"
722
                                        </el-form-item>
722
                                        </el-form-item>
723
                                    </el-col>
723
                                    </el-col>
724
                                    <el-col :span="8">
724
                                    <el-col :span="8">
725
-                                       <el-form-item label="消毒液:">
725
+                                       <el-form-item label="消毒液:" required prop="disinfectant">
726
                                         <el-select v-model="userform.disinfectant" placeholder="请选择" >
726
                                         <el-select v-model="userform.disinfectant" placeholder="请选择" >
727
                                            <el-option
727
                                            <el-option
728
                                             v-for="item in fluidPathType"
728
                                             v-for="item in fluidPathType"
737
                                 </el-row>
737
                                 </el-row>
738
                                 <el-row>
738
                                 <el-row>
739
                                    <el-col :span="8">      
739
                                    <el-col :span="8">      
740
-                                     <el-form-item label="消毒状态:">
740
+                                     <el-form-item label="消毒状态:" required prop="disinfection_status">
741
                                         <el-select v-model="userform.disinfection_status" placeholder="请选择" >
741
                                         <el-select v-model="userform.disinfection_status" placeholder="请选择" >
742
                                            <el-option
742
                                            <el-option
743
                                             v-for="item in disinfection"
743
                                             v-for="item in disinfection"
771
                                               value-format="yyyy-MM-dd HH:mm"
771
                                               value-format="yyyy-MM-dd HH:mm"
772
                                                placeholder="选择时间"
772
                                                placeholder="选择时间"
773
                                                v-model="userform.starttime"
773
                                                v-model="userform.starttime"
774
-                                               style="width:200px;"
775
-                                                @change="changStartTime"
774
+                                               style="width:200px;"                                          
776
                                           ></el-date-picker>                                                                       
775
                                           ></el-date-picker>                                                                       
777
-                                       </el-form-item>
776
+                                       </el-form-item>                 
778
                                     </el-col>
777
                                     </el-col>
779
                                     <el-col :span="8">
778
                                     <el-col :span="8">
780
                                        <el-form-item label="结束消毒时间:">                                                                          
779
                                        <el-form-item label="结束消毒时间:">                                                                          
784
                                               value-format="yyyy-MM-dd HH:mm"
783
                                               value-format="yyyy-MM-dd HH:mm"
785
                                                placeholder="选择时间"
784
                                                placeholder="选择时间"
786
                                                v-model="userform.endtime"
785
                                                v-model="userform.endtime"
787
-                                               style="width:200px;"
788
-                                                @change="changeEndTime"
786
+                                               style="width:200px;"                                          
789
                                           ></el-date-picker>              
787
                                           ></el-date-picker>              
790
                                        </el-form-item>
788
                                        </el-form-item>
791
                                     </el-col>
789
                                     </el-col>
822
                                          <el-radio-group v-model="userform.dialysis_concentration">
820
                                          <el-radio-group v-model="userform.dialysis_concentration">
823
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
821
                                                 <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in potency" :key="index">{{gender.name}}</el-radio>
824
                                          </el-radio-group>
822
                                          </el-radio-group>
825
-                                        <span style="color:red">您已一个月未更换,请注意检测</span>
823
+                                        <!-- <span style="color:red">您已一个月未更换,请注意检测</span> -->
826
                                       </el-form-item>
824
                                       </el-form-item>
827
                                    </el-col>
825
                                    </el-col>
828
                                 </el-row>
826
                                 </el-row>
858
                                   </el-col>
856
                                   </el-col>
859
                                    <el-col :span="10">
857
                                    <el-col :span="10">
860
                                       <el-checkbox v-model="userform.clean">清洁:</el-checkbox>
858
                                       <el-checkbox v-model="userform.clean">清洁:</el-checkbox>
861
-                                      <span style="color:red">您已一个月未清洁,请检查</span>
859
+                                      <!-- <span style="color:red">您已一个月未清洁,请检查</span> -->
862
                                    </el-col>
860
                                    </el-col>
863
                                    <el-col :span="10">
861
                                    <el-col :span="10">
864
-                                       <el-form-item label="签名:">
862
+                                       <el-form-item label="签名:" required prop="sign_name">
865
                                           <el-select v-model="userform.sign_name" placeholder="请选择" >
863
                                           <el-select v-model="userform.sign_name" placeholder="请选择" >
866
                                            <el-option
864
                                            <el-option
867
                                             v-for="item in autograph"
865
                                             v-for="item in autograph"
947
                                 <el-col :span="8">
945
                                 <el-col :span="8">
948
                                   <el-form-item label="取样者:" required prop="sampler">
946
                                   <el-form-item label="取样者:" required prop="sampler">
949
                                      <el-select style="width:130px"  v-model="qualityForm.sampler">
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
                                       </el-select>
949
                                       </el-select>
952
                                   </el-form-item>
950
                                   </el-form-item>
953
                                 </el-col>
951
                                 </el-col>
1051
                                 <el-col :span="8">
1049
                                 <el-col :span="8">
1052
                                    <el-form-item label="取样者:" required prop="samplerb">
1050
                                    <el-form-item label="取样者:" required prop="samplerb">
1053
                                       <el-select style="width:130px"  v-model="qualityFormTwo.samplerb">
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
                                       </el-select>
1053
                                       </el-select>
1056
                                    </el-form-item>
1054
                                    </el-form-item>
1057
                                 </el-col>
1055
                                 </el-col>
1122
                                 <el-col :span="8">
1120
                                 <el-col :span="8">
1123
                                     <el-form-item label="取样者:" required prop="samplerc">
1121
                                     <el-form-item label="取样者:" required prop="samplerc">
1124
                                       <el-select style="width:130px"  v-model="qualityFormThree.samplerc">
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
                                       </el-select>
1124
                                       </el-select>
1127
                                    </el-form-item>   
1125
                                    </el-form-item>   
1128
                                 </el-col>
1126
                                 </el-col>
1446
         <!-- 综合查询 -->
1444
         <!-- 综合查询 -->
1447
         <multiple-form ref="multipleform"></multiple-form>
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
        <el-form :model="machineform" ref="machineform">
1448
        <el-form :model="machineform" ref="machineform">
1451
         <el-row>
1449
         <el-row>
1452
           <el-col :span="10">
1450
           <el-col :span="10">
1474
               <el-select
1472
               <el-select
1475
                 v-model="machineform.time"
1473
                 v-model="machineform.time"
1476
                 placeholder="请选择时间"
1474
                 placeholder="请选择时间"
1475
+                 style="width: 140px;"
1477
               >
1476
               >
1478
                 <el-option
1477
                 <el-option
1479
                   v-for="item in this.timeType"
1478
                   v-for="item in this.timeType"
1489
               <el-select
1488
               <el-select
1490
                 v-model="machineform.class_time"
1489
                 v-model="machineform.class_time"
1491
                 placeholder="请选择时间"
1490
                 placeholder="请选择时间"
1491
+                 style="width: 140px;"
1492
               >
1492
               >
1493
                 <el-option
1493
                 <el-option
1494
                   v-for="item in this.classType"
1494
                   v-for="item in this.classType"
1572
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1572
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1573
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1573
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1574
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
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
   import { uParseTime } from '@/utils/tools'
1576
   import { uParseTime } from '@/utils/tools'
1577
   import { getToken } from '@/api/qiniu'
1577
   import { getToken } from '@/api/qiniu'
1578
   import PlanForm from './components/PlanForm'
1578
   import PlanForm from './components/PlanForm'
1583
   import RepairForm from './components/RepairForm'
1583
   import RepairForm from './components/RepairForm'
1584
   import { parseTime } from '@/utils'
1584
   import { parseTime } from '@/utils'
1585
   import { getFileExtension } from '@/utils/tools'
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
 const moment = require('moment')
1587
 const moment = require('moment')
1588
 export default {
1588
 export default {
1589
     name: 'home',
1589
     name: 'home',
1651
           { id: 4, name: '报废机' }
1651
           { id: 4, name: '报废机' }
1652
         ],
1652
         ],
1653
         DisCardResion: [
1653
         DisCardResion: [
1654
+          { id: 0,  name: "请选择" },
1654
           { id: 1, name: '超期限报废' },
1655
           { id: 1, name: '超期限报废' },
1655
           { id: 2, name: '故障报废' },
1656
           { id: 2, name: '故障报废' },
1656
           { id: 3, name: '核定报废' }
1657
           { id: 3, name: '核定报废' }
1661
           { id: 3, name: '其他' }
1662
           { id: 3, name: '其他' }
1662
         ],
1663
         ],
1663
         Classes: [
1664
         Classes: [
1665
+          { id: 0, name: '全部' },
1664
           { id: 1, name: '上午' },
1666
           { id: 1, name: '上午' },
1665
           { id: 2, name: '下午' },
1667
           { id: 2, name: '下午' },
1666
           { id: 3, name: '晚上' }
1668
           { id: 3, name: '晚上' }
1672
           { id: 3, name: '次氯酸钠' }
1674
           { id: 3, name: '次氯酸钠' }
1673
         ],
1675
         ],
1674
         germs: [
1676
         germs: [
1677
+          { id: 0, name:"请选择" },
1675
           { id: 1, name: '费森细菌过滤器' },
1678
           { id: 1, name: '费森细菌过滤器' },
1676
           { id: 2, name: '日机装细菌过滤器' },
1679
           { id: 2, name: '日机装细菌过滤器' },
1677
           { id: 3, name: '贝朗机细菌过滤器' },
1680
           { id: 3, name: '贝朗机细菌过滤器' },
1714
             detection_unit: [{ required: true, message: '请填写检测单位' }],
1717
             detection_unit: [{ required: true, message: '请填写检测单位' }],
1715
             samplerc: [{ required: true, message: '请填写取样者' }]
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
         runOption: [
1732
         runOption: [
1718
           { id: 1, name: '正常' },
1733
           { id: 1, name: '正常' },
1719
           { id: 2, name: '故障' }
1734
           { id: 2, name: '故障' }
1774
           { id: 3, name: '晚上' }
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
         disinfectantType: [
1799
         disinfectantType: [
1800
+          { id: 0, name: '/' },
1780
           { id: 1, name: '0.22%季铵盐' },
1801
           { id: 1, name: '0.22%季铵盐' },
1781
           { id: 2, name: '500mg/l含氯消毒剂' },
1802
           { id: 2, name: '500mg/l含氯消毒剂' },
1782
           { id: 3, name: '1000mg/l含氯消毒剂' },
1803
           { id: 3, name: '1000mg/l含氯消毒剂' },
1784
         ],
1805
         ],
1785
         // 夜路消毒方式
1806
         // 夜路消毒方式
1786
         sterilizeType: [
1807
         sterilizeType: [
1808
+          { id: 0, name: '/' },
1787
           { id: 1, name: '热化学消毒' },
1809
           { id: 1, name: '热化学消毒' },
1788
           { id: 2, name: '化学消毒 + 除钙' },
1810
           { id: 2, name: '化学消毒 + 除钙' },
1789
           { id: 3, name: '热化学消毒 + 除钙' },
1811
           { id: 3, name: '热化学消毒 + 除钙' },
1794
         ],
1816
         ],
1795
         // 夜路消毒液
1817
         // 夜路消毒液
1796
         fluidPathType: [
1818
         fluidPathType: [
1819
+          { id: 0, name: '/' },
1797
           { id: 1, name: '20%柠檬酸' },
1820
           { id: 1, name: '20%柠檬酸' },
1798
           { id: 2, name: '25%柠檬酸' },
1821
           { id: 2, name: '25%柠檬酸' },
1799
           { id: 3, name: '50%柠檬酸' },
1822
           { id: 3, name: '50%柠檬酸' },
2007
           this.deviceType = zones
2030
           this.deviceType = zones
2008
           var numbers = response.data.data.numbers
2031
           var numbers = response.data.data.numbers
2009
           console.log('分区号是设么', zones)
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
           this.bedNumber = numbers
2040
           this.bedNumber = numbers
2012
-          this.Number = numbers
2041
+          this.Number = devicenumber
2013
         })
2042
         })
2014
       },
2043
       },
2015
 
2044
 
2037
         })
2066
         })
2038
       },
2067
       },
2039
       handleCurrentChange(val) {
2068
       handleCurrentChange(val) {
2069
+      
2040
         this.currentRow = val
2070
         this.currentRow = val
2041
         this.$forceUpdate()
2071
         this.$forceUpdate()
2042
         this.getMachineDetailById(val.id)
2072
         this.getMachineDetailById(val.id)
2045
         this.getPatientInfo(val.id)
2075
         this.getPatientInfo(val.id)
2046
         // 获取基本信息
2076
         // 获取基本信息
2047
         this.getUserRegister(val.id)
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
       getMachineDetailById(id) {
2089
       getMachineDetailById(id) {
2050
         getMachineDetailById(id).then(response => {
2090
         getMachineDetailById(id).then(response => {
2085
               if (mode[index].treate_mode === 7) {
2125
               if (mode[index].treate_mode === 7) {
2086
                 mode[index] = 'IUF'
2126
                 mode[index] = 'IUF'
2087
               }
2127
               }
2088
-
2128
+              
2089
               if (mode[index].treate_mode === 8) {
2129
               if (mode[index].treate_mode === 8) {
2130
+                mode[index] = 'HFHD'
2131
+              }
2132
+             
2133
+              if (mode[index].treate_mode === 9) {
2090
                 mode[index] = 'HFHD+HP'
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
                 mode[index] = 'HFR'
2141
                 mode[index] = 'HFR'
2095
               }
2142
               }
2096
-              if (mode[index].treate_mode === 10) {
2143
+              if (mode[index].treate_mode === 12) {
2097
                 mode[index] = 'HDF+HP'
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
                 mode[index] = '腹水回收'
2152
                 mode[index] = '腹水回收'
2106
               }
2153
               }
2107
               arr1.push(mode[index])
2154
               arr1.push(mode[index])
2110
             this.form.id = addmacher.id
2157
             this.form.id = addmacher.id
2111
             this.form.serial_number = addmacher.serial_number
2158
             this.form.serial_number = addmacher.serial_number
2112
             this.form.devicetype = addmacher.device_type
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
             this.form.device_name = addmacher.device_name
2161
             this.form.device_name = addmacher.device_name
2115
             this.form.manufacture_factory = addmacher.manufacture_factory
2162
             this.form.manufacture_factory = addmacher.manufacture_factory
2116
             this.form.service_manufacturer = addmacher.service_manufacturer
2163
             this.form.service_manufacturer = addmacher.service_manufacturer
2153
         this.form.treat_mode.map((item, index) => {
2200
         this.form.treat_mode.map((item, index) => {
2154
           const obj = {}
2201
           const obj = {}
2155
           obj.id = index + 1
2202
           obj.id = index + 1
2156
-          // obj.name = item
2157
           arr2.push(obj.id)
2203
           arr2.push(obj.id)
2158
         })
2204
         })
2205
+        console.log("arr2是什么",arr2)
2159
         this.form.treat_type = arr2
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
         var device_type = this.form.devicetype
2208
         var device_type = this.form.devicetype
2166
         var device_types = parseInt(device_type)
2209
         var device_types = parseInt(device_type)
2167
         this.form.devicetype = device_types
2210
         this.form.devicetype = device_types
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
       addPlan() {
2259
       addPlan() {
2201
         this.$refs.planForm.open()
2260
         this.$refs.planForm.open()
2202
       },
2261
       },
2261
               if (plan[index].classtime === 3) {
2320
               if (plan[index].classtime === 3) {
2262
                 plan[index].classtime = '晚上'
2321
                 plan[index].classtime = '晚上'
2263
               }
2322
               }
2323
+                
2324
+              if(plan[index].way === 0){
2325
+                plan[index].way = "/"
2326
+              }
2264
 
2327
 
2265
               if (plan[index].way === 1) {
2328
               if (plan[index].way === 1) {
2266
                 plan[index].way = '擦拭'
2329
                 plan[index].way = '擦拭'
2268
               if (plan[index].way === 2) {
2331
               if (plan[index].way === 2) {
2269
                 plan[index].way = '化学消毒'
2332
                 plan[index].way = '化学消毒'
2270
               }
2333
               }
2271
-
2334
+               
2335
+                if (plan[index].machine_disinfectant === 0) {
2336
+                plan[index].machine_disinfectant = '/'
2337
+              }
2338
+ 
2272
               if (plan[index].machine_disinfectant === 1) {
2339
               if (plan[index].machine_disinfectant === 1) {
2273
                 plan[index].machine_disinfectant = '0.22%季铵盐'
2340
                 plan[index].machine_disinfectant = '0.22%季铵盐'
2274
               }
2341
               }
2282
               if (plan[index].machine_disinfectant === 4) {
2349
               if (plan[index].machine_disinfectant === 4) {
2283
                 plan[index].machine_disinfectant = '1500mg/l含氯消毒剂'
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
               if (plan[index].disinfectan_way === 1) {
2357
               if (plan[index].disinfectan_way === 1) {
2287
                 plan[index].disinfectan_way = '热化学消毒'
2358
                 plan[index].disinfectan_way = '热化学消毒'
2288
               }
2359
               }
2306
               if (plan[index].disinfectan_way === 7) {
2377
               if (plan[index].disinfectan_way === 7) {
2307
                 plan[index].disinfectan_way = '清洗'
2378
                 plan[index].disinfectan_way = '清洗'
2308
               }
2379
               }
2380
+
2381
+              if (plan[index].disinfectant === 0) {
2382
+                plan[index].disinfectant = '/'
2383
+              }
2384
+
2309
               if (plan[index].disinfectant === 1) {
2385
               if (plan[index].disinfectant === 1) {
2310
                 plan[index].disinfectant = '20%柠檬酸'
2386
                 plan[index].disinfectant = '20%柠檬酸'
2311
               }
2387
               }
2378
               if (plandetail[index].classtime === 3) {
2454
               if (plandetail[index].classtime === 3) {
2379
                 plandetail[index].classtime = '晚上'
2455
                 plandetail[index].classtime = '晚上'
2380
               }
2456
               }
2457
+              
2458
+              
2459
+              if (plandetail[index].way === 0) {
2460
+                plandetail[index].way = '/'
2461
+              }
2381
 
2462
 
2382
               if (plandetail[index].way === 1) {
2463
               if (plandetail[index].way === 1) {
2383
                 plandetail[index].way = '擦拭'
2464
                 plandetail[index].way = '擦拭'
2385
               if (plandetail[index].way === 2) {
2466
               if (plandetail[index].way === 2) {
2386
                 plandetail[index].way = '化学消毒'
2467
                 plandetail[index].way = '化学消毒'
2387
               }
2468
               }
2469
+             
2470
+              if (plandetail[index].machine_disinfectant === 0) {
2471
+                plandetail[index].machine_disinfectant = '/'
2472
+              }
2388
 
2473
 
2389
               if (plandetail[index].machine_disinfectant === 1) {
2474
               if (plandetail[index].machine_disinfectant === 1) {
2390
                 plandetail[index].machine_disinfectant = '0.22%季铵盐'
2475
                 plandetail[index].machine_disinfectant = '0.22%季铵盐'
2399
               if (plandetail[index].machine_disinfectant === 4) {
2484
               if (plandetail[index].machine_disinfectant === 4) {
2400
                 plandetail[index].machine_disinfectant = '1500mg/l含氯消毒剂'
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
               if (plandetail[index].disinfectan_way === 1) {
2492
               if (plandetail[index].disinfectan_way === 1) {
2404
                 plandetail[index].disinfectan_way = '热化学消毒'
2493
                 plandetail[index].disinfectan_way = '热化学消毒'
2423
               if (plandetail[index].disinfectan_way === 7) {
2512
               if (plandetail[index].disinfectan_way === 7) {
2424
                 plandetail[index].disinfectan_way = '清洗'
2513
                 plandetail[index].disinfectan_way = '清洗'
2425
               }
2514
               }
2515
+             
2516
+               if (plandetail[index].disinfectant === 0) {
2517
+                plandetail[index].disinfectant = '/'
2518
+              }
2519
+
2426
               if (plandetail[index].disinfectant === 1) {
2520
               if (plandetail[index].disinfectant === 1) {
2427
                 plandetail[index].disinfectant = '20%柠檬酸'
2521
                 plandetail[index].disinfectant = '20%柠檬酸'
2428
               }
2522
               }
2522
           return false
2616
           return false
2523
         }
2617
         }
2524
         this.$confirm(
2618
         this.$confirm(
2525
-          '确认要删除所选的信息吗? <br>删除后,信息将无法恢复',
2619
+          '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
2526
           '删除提示',
2620
           '删除提示',
2527
           {
2621
           {
2528
             dangerouslyUseHTMLString: true,
2622
             dangerouslyUseHTMLString: true,
2575
           return false
2669
           return false
2576
         }
2670
         }
2577
         this.$confirm(
2671
         this.$confirm(
2578
-          '确认要删除所选吗? <br>删除后,信息将无法恢复',
2672
+          '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
2579
           '删除提示',
2673
           '删除提示',
2580
           {
2674
           {
2581
             dangerouslyUseHTMLString: true,
2675
             dangerouslyUseHTMLString: true,
2657
             if (patients.is_infectious === 2) {
2751
             if (patients.is_infectious === 2) {
2658
               this.userform.contagion = '有'
2752
               this.userform.contagion = '有'
2659
             }
2753
             }
2660
-            this.userform.patient_name = patients.name
2754
+            this.userform.patient_name = patients.patient_id
2661
             var zone = response.data.data.zone
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
             var number = response.data.data.number
2758
             var number = response.data.data.number
2665
             console.log('nubmer', number)
2759
             console.log('nubmer', number)
2666
             this.userform.bed_number = number.number
2760
             this.userform.bed_number = number.number
2670
             this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
2764
             this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
2671
             var prescription = response.data.data.prescription
2765
             var prescription = response.data.data.prescription
2672
             console.log('prescription', prescription)
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
             var dislysis = response.data.data.dislysis
2768
             var dislysis = response.data.data.dislysis
2728
             console.log('dislysis', dislysis)
2769
             console.log('dislysis', dislysis)
2729
             this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
2770
             this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
2732
           }
2773
           }
2733
         })
2774
         })
2734
       },
2775
       },
2776
+      
2777
+     getTimes(time) {
2778
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
2779
+      },
2780
+
2735
       SaveInformation(formName) {
2781
       SaveInformation(formName) {
2736
-        if (this.userform.classtype === '') {
2737
-          this.userform.classtype = 0
2738
-        }
2782
+      
2739
         var classtypes = this.userform.classtype
2783
         var classtypes = this.userform.classtype
2740
         var classtype = parseInt(classtypes)
2784
         var classtype = parseInt(classtypes)
2741
         this.userform.classtype = classtype
2785
         this.userform.classtype = classtype
2752
         var patient_name = parseInt(patientName)
2796
         var patient_name = parseInt(patientName)
2753
         this.userform.patient_name = patient_name
2797
         this.userform.patient_name = patient_name
2754
   
2798
   
2755
-        if (this.userform.dialysis_mode === '') {
2756
-          this.userform.dialysis_mode = 0
2757
-        }
2799
+    
2758
         var dialysismode = this.userform.dialysis_mode
2800
         var dialysismode = this.userform.dialysis_mode
2759
         var dialysis_mode = parseInt(dialysismode)
2801
         var dialysis_mode = parseInt(dialysismode)
2760
         this.userform.dialysis_mode = dialysis_mode
2802
         this.userform.dialysis_mode = dialysis_mode
2803
+        
2761
 
2804
 
2762
         if (this.userform.failure_stage === '') {
2805
         if (this.userform.failure_stage === '') {
2763
           this.userform.failure_stage = 0
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
         if (this.userform.dialysis_checked === true) {
2813
         if (this.userform.dialysis_checked === true) {
2767
           this.userform.dialysis_checked = 1
2814
           this.userform.dialysis_checked = 1
2768
         }
2815
         }
2771
           this.userform.dialysis_checked = 0
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
         if (this.userform.germ_checked === true) {
2825
         if (this.userform.germ_checked === true) {
2775
           this.userform.germ_checked = 1
2826
           this.userform.germ_checked = 1
2776
         }
2827
         }
2784
         var dialysis_name = this.userform.dialysis_name
2835
         var dialysis_name = this.userform.dialysis_name
2785
         var dialysis = parseInt(dialysis_name)
2836
         var dialysis = parseInt(dialysis_name)
2786
         this.userform.dialysis_name = dialysis
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
         if (this.userform.clean === true) {
2850
         if (this.userform.clean === true) {
2797
           this.userform.clean = 1
2851
           this.userform.clean = 1
2798
         }
2852
         }
2800
         if (this.userform.clean === false) {
2854
         if (this.userform.clean === false) {
2801
           this.userform.clean = 0
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
         this.$refs[formName].validate((valid) => {
2862
         this.$refs[formName].validate((valid) => {
2804
           if (valid) {
2863
           if (valid) {
2805
             SaveInformation(this.equimentid, this.userform).then(response => {
2864
             SaveInformation(this.equimentid, this.userform).then(response => {
2807
                 var information = response.data.data.information
2866
                 var information = response.data.data.information
2808
                 console.log('information', information)
2867
                 console.log('information', information)
2809
                 this.$message.success('添加成功')
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
       getAllOrganization() {
2895
       getAllOrganization() {
2836
         getAllOrganization().then(response => {
2896
         getAllOrganization().then(response => {
3236
 </script>
3296
 </script>
3237
 <style lang="scss" scoped>
3297
 <style lang="scss" scoped>
3238
     .zone{
3298
     .zone{
3239
-       margin-left: 30px
3299
+      //  margin-left: 30px;
3300
+       text-align: left;
3240
     }
3301
     }
3241
     .disinfect{
3302
     .disinfect{
3242
       position: relative;
3303
       position: relative;

+ 1 - 1
src/xt_pages/management/index.vue Wyświetl plik

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