瀏覽代碼

拉取代码

xiaoming_global 5 年之前
父節點
當前提交
faa71bda44
共有 3 個文件被更改,包括 113 次插入99 次删除
  1. 8 0
      src/api/manage.js
  2. 84 87
      src/xt_pages/management/components/PlanForm.vue
  3. 21 12
      src/xt_pages/management/home.vue

+ 8 - 0
src/api/manage.js 查看文件

@@ -464,3 +464,11 @@ export function getAutoData(id, params) {
464 464
     params: params
465 465
   });
466 466
 }
467
+
468
+export function getAllEquitType(params) {
469
+  return request({
470
+    url: "/api/manage/getallequittype",
471
+    method: "Get",
472
+    params: params
473
+  });
474
+}

+ 84 - 87
src/xt_pages/management/components/PlanForm.vue 查看文件

@@ -1,11 +1,6 @@
1 1
 <template>
2 2
   <div id="plan-form">
3
-    <el-dialog
4
-      title="新增计划"
5
-      :visible.sync="dialogVisible"
6
-      width="55%"
7
-      center
8
-    >
3
+    <el-dialog title="新增计划" :visible.sync="dialogVisible" width="55%" center>
9 4
       <el-form ref="form" :model="form">
10 5
         <el-row>
11 6
           <el-col :span="10">
@@ -14,7 +9,7 @@
14 9
                 <el-option
15 10
                   v-for="item in this.DeviceType"
16 11
                   :key="item.id"
17
-                  :label="item.equitment_name"
12
+                  :label="item.unit_type"
18 13
                   :value="item.id"
19 14
                 ></el-option>
20 15
               </el-select>
@@ -22,10 +17,7 @@
22 17
           </el-col>
23 18
           <el-col :span="10">
24 19
             <el-form-item label="消毒时长:">
25
-              <el-input
26
-                style="width:135px"
27
-                v-model="form.disinfec_time"
28
-              ></el-input>
20
+              <el-input style="width:135px" v-model="form.disinfec_time"></el-input>
29 21
               <span>分钟</span>
30 22
             </el-form-item>
31 23
           </el-col>
@@ -87,10 +79,7 @@
87 79
           </el-col>
88 80
           <el-col :span="10">
89 81
             <el-form-item label="机表消毒液:">
90
-              <el-select
91
-                style="width:135px"
92
-                v-model="form.machine_disinfectant"
93
-              >
82
+              <el-select style="width:135px" v-model="form.machine_disinfectant">
94 83
                 <el-option
95 84
                   v-for="item in this.disinfectantType"
96 85
                   :key="item.id"
@@ -137,9 +126,9 @@
137 126
 </template>
138 127
 
139 128
 <script>
140
-import { getAllEquimentName, savePlan } from "@/api/manage";
129
+import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage'
141 130
 export default {
142
-  name: "PlanForm",
131
+  name: 'PlanForm',
143 132
   props: {
144 133
     equimentid: Number
145 134
   },
@@ -147,8 +136,8 @@ export default {
147 136
     return {
148 137
       dialogVisible: false,
149 138
       form: {
150
-        device_type: "",
151
-        disinfec_time: "",
139
+        device_type: '',
140
+        disinfec_time: '',
152 141
         time: [],
153 142
         class_time: [],
154 143
         way: 0,
@@ -158,112 +147,120 @@ export default {
158 147
       },
159 148
       value: [],
160 149
       timeType: [
161
-        { id: 1, name: "周一" },
162
-        { id: 2, name: "周二" },
163
-        { id: 3, name: "周三" },
164
-        { id: 4, name: "周四" },
165
-        { id: 5, name: "周五" },
166
-        { id: 6, name: "周六" },
167
-        { id: 7, name: "周日" }
150
+        { id: 1, name: '周一' },
151
+        { id: 2, name: '周二' },
152
+        { id: 3, name: '周三' },
153
+        { id: 4, name: '周四' },
154
+        { id: 5, name: '周五' },
155
+        { id: 6, name: '周六' },
156
+        { id: 7, name: '周日' }
168 157
       ],
169 158
       classType: [
170
-        { id: 1, name: "上午" },
171
-        { id: 2, name: "下午" },
172
-        { id: 3, name: "晚上" }
159
+        { id: 1, name: '上午' },
160
+        { id: 2, name: '下午' },
161
+        { id: 3, name: '晚上' }
173 162
       ],
174 163
       // 机表消毒方式
175 164
       disinfectType: [
176
-        { id: 0, name: "/" },
177
-        { id: 1, name: "擦拭" },
178
-        { id: 2, name: "化学消毒" }
165
+        { id: 0, name: '/' },
166
+        { id: 1, name: '擦拭' },
167
+        { id: 2, name: '化学消毒' }
179 168
       ],
180 169
       // 基表消毒液
181 170
       disinfectantType: [
182
-        { id: 0, name: "/" },
183
-        { id: 1, name: "0.22%季铵盐" },
184
-        { id: 2, name: "500mg/l含氯消毒剂" },
185
-        { id: 3, name: "1000mg/l含氯消毒剂" },
186
-        { id: 4, name: "1500mg/l含氯消毒剂" }
171
+        { id: 0, name: '/' },
172
+        { id: 1, name: '0.22%季铵盐' },
173
+        { id: 2, name: '500mg/l含氯消毒剂' },
174
+        { id: 3, name: '1000mg/l含氯消毒剂' },
175
+        { id: 4, name: '1500mg/l含氯消毒剂' }
187 176
       ],
188 177
       // 夜路消毒方式
189 178
       sterilizeType: [
190
-        { id: 0, name: "/" },
191
-        { id: 1, name: "热化学消毒" },
192
-        { id: 2, name: "化学消毒 + 除钙" },
193
-        { id: 3, name: "热化学消毒 + 除钙" },
194
-        { id: 4, name: "热消毒" },
195
-        { id: 5, name: "化学消毒" },
196
-        { id: 6, name: "除钙" },
197
-        { id: 7, name: "清洗" }
179
+        { id: 0, name: '/' },
180
+        { id: 1, name: '热化学消毒' },
181
+        { id: 2, name: '化学消毒 + 除钙' },
182
+        { id: 3, name: '热化学消毒 + 除钙' },
183
+        { id: 4, name: '热消毒' },
184
+        { id: 5, name: '化学消毒' },
185
+        { id: 6, name: '除钙' },
186
+        { id: 7, name: '清洗' }
198 187
       ],
199 188
       // 夜路消毒液
200 189
       fluidPathType: [
201
-        { id: 0, name: "/" },
202
-        { id: 1, name: "20%柠檬酸" },
203
-        { id: 2, name: "25%柠檬酸" },
204
-        { id: 3, name: "50%柠檬酸" },
205
-        { id: 4, name: "50%柠檬酸 + 5%次氯酸钠" },
206
-        { id: 5, name: "20%柠檬酸 + 10%冰醋酸" },
207
-        { id: 6, name: "0.2%过氧化乙酸" },
208
-        { id: 7, name: "10%冰醋酸" },
209
-        { id: 8, name: "50%冰醋酸" },
210
-        { id: 9, name: "5%次氯酸钠" }
190
+        { id: 0, name: '/' },
191
+        { id: 1, name: '20%柠檬酸' },
192
+        { id: 2, name: '25%柠檬酸' },
193
+        { id: 3, name: '50%柠檬酸' },
194
+        { id: 4, name: '50%柠檬酸 + 5%次氯酸钠' },
195
+        { id: 5, name: '20%柠檬酸 + 10%冰醋酸' },
196
+        { id: 6, name: '0.2%过氧化乙酸' },
197
+        { id: 7, name: '10%冰醋酸' },
198
+        { id: 8, name: '50%冰醋酸' },
199
+        { id: 9, name: '5%次氯酸钠' }
211 200
       ],
212 201
       DeviceType: [],
213 202
       planid: 0
214
-    };
203
+    }
215 204
   },
216 205
   methods: {
217 206
     open: function() {
218
-      this.dialogVisible = true;
207
+      this.dialogVisible = true
219 208
     },
220 209
     getAllEquimentName() {
221 210
       getAllEquimentName().then(response => {
222 211
         if (response.data.state === 1) {
223
-          var equit = response.data.data.equit;
224
-          console.log("equit", equit);
225
-          this.DeviceType = equit;
212
+          var equit = response.data.data.equit
213
+          console.log('equit', equit)
214
+          // this.DeviceType = equit;
226 215
         }
227
-      });
216
+      })
228 217
     },
229 218
     savePlan(formName) {
230
-      var equimentid = this.equimentid;
231
-      console.log("equimentid", equimentid);
232
-      var devicetype = this.form.device_type;
233
-      var devicetypes = parseInt(devicetype);
234
-      this.form.device_type = devicetypes;
219
+      var equimentid = this.equimentid
220
+      console.log('equimentid', equimentid)
221
+      var devicetype = this.form.device_type
222
+      var devicetypes = parseInt(devicetype)
223
+      this.form.device_type = devicetypes
235 224
 
236
-      var ways = this.form.way;
237
-      var way = parseInt(ways);
238
-      this.form.way = way;
225
+      var ways = this.form.way
226
+      var way = parseInt(ways)
227
+      this.form.way = way
239 228
 
240
-      var machinedisinfectant = this.form.machine_disinfectant;
241
-      var machinedisinfectants = parseInt(machinedisinfectant);
242
-      this.form.machine_disinfectant = machinedisinfectants;
229
+      var machinedisinfectant = this.form.machine_disinfectant
230
+      var machinedisinfectants = parseInt(machinedisinfectant)
231
+      this.form.machine_disinfectant = machinedisinfectants
243 232
 
244
-      var disinfectantways = this.form.disinfectant_way;
245
-      var disinfectantway = parseInt(disinfectantways);
246
-      this.form.disinfectant_way = disinfectantway;
233
+      var disinfectantways = this.form.disinfectant_way
234
+      var disinfectantway = parseInt(disinfectantways)
235
+      this.form.disinfectant_way = disinfectantway
247 236
 
248
-      var disinfectants = this.form.disinfectant;
249
-      var disinfectant = parseInt(disinfectants);
250
-      this.form.disinfectant = disinfectant;
237
+      var disinfectants = this.form.disinfectant
238
+      var disinfectant = parseInt(disinfectants)
239
+      this.form.disinfectant = disinfectant
251 240
       savePlan(this.form, this.equimentid).then(response => {
252 241
         if (response.data.state == 1) {
253
-          var msg = response.data.data.msg;
254
-          console.log("msg", msg);
255
-          this.$message.success("保存成功");
256
-          this.dialogVisible = false;
257
-          this.$emit("getAllPlan");
258
-          this.$emit("getAllPlanDetail");
242
+          var msg = response.data.data.msg
243
+          this.$message.success('保存成功')
244
+          this.dialogVisible = false
245
+          this.$emit('getAllPlan')
246
+          this.$emit('getAllPlanDetail')
247
+        }
248
+      })
249
+    },
250
+    getAllEquitType() {
251
+      getAllEquitType().then(response => {
252
+        if (response.data.state === 1) {
253
+          var addmacher = response.data.data.addmacher
254
+          this.DeviceType = addmacher
259 255
         }
260
-      });
256
+      })
261 257
     }
262 258
   },
263 259
   created() {
264
-    this.getAllEquimentName();
260
+    this.getAllEquimentName()
261
+    this.getAllEquitType()
265 262
   }
266
-};
263
+}
267 264
 </script>
268 265
 
269 266
 <style scoped></style>

+ 21 - 12
src/xt_pages/management/home.vue 查看文件

@@ -1847,7 +1847,7 @@
1847 1847
                 <el-option
1848 1848
                   v-for="item in this.DeviceType"
1849 1849
                   :key="item.id"
1850
-                  :label="item.equitment_name"
1850
+                  :label="item.unit_type"
1851 1851
                   :value="item.id"
1852 1852
                 ></el-option>
1853 1853
               </el-select>
@@ -1966,7 +1966,7 @@
1966 1966
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1967 1967
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1968 1968
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
1969
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin,getAutoData } from '@/api/manage'
1969
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin,getAutoData,getAllEquitType } from '@/api/manage'
1970 1970
   import { uParseTime } from '@/utils/tools'
1971 1971
   import { getToken } from '@/api/qiniu'
1972 1972
   import PlanForm from './components/PlanForm'
@@ -3219,15 +3219,15 @@ export default {
3219 3219
             return false
3220 3220
           })
3221 3221
       },
3222
-      getAllEquimentName() {
3223
-        getAllEquimentName().then(response => {
3224
-          if (response.data.state === 1) {
3225
-            var equit = response.data.data.equit
3226
-            console.log('equit', equit)
3227
-            this.DeviceType = equit
3228
-          }
3229
-        })
3230
-      },
3222
+      // getAllEquimentName() {
3223
+      //   getAllEquimentName().then(response => {
3224
+      //     if (response.data.state === 1) {
3225
+      //       var equit = response.data.data.equit
3226
+      //       console.log('equit', equit)
3227
+      //       this.DeviceType = equit
3228
+      //     }
3229
+      //   })
3230
+      // },
3231 3231
       clickQuery() {
3232 3232
         this.$refs.multipleform.open()
3233 3233
       },
@@ -3862,7 +3862,15 @@ export default {
3862 3862
       },
3863 3863
       handleSelect(id){
3864 3864
         console.log(id)
3865
-      }
3865
+      },
3866
+     getAllEquitType() {
3867
+      getAllEquitType().then(response => {
3868
+        if (response.data.state === 1) {
3869
+          var addmacher = response.data.data.addmacher;
3870
+          this.DeviceType = addmacher;
3871
+        }
3872
+      });
3873
+    }
3866 3874
     },
3867 3875
     created() {
3868 3876
       this.getAllSubregion()
@@ -3875,6 +3883,7 @@ export default {
3875 3883
       this.getAllEquimentName()
3876 3884
       this.getAllOrganization()
3877 3885
       this.getOrgName()
3886
+      this.getAllEquitType()
3878 3887
     },
3879 3888
   }
3880 3889
 </script>