Browse Source

拉取代码

xiaoming_global 5 years ago
parent
commit
faa71bda44
3 changed files with 113 additions and 99 deletions
  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 View File

464
     params: params
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 View File

1
 <template>
1
 <template>
2
   <div id="plan-form">
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
       <el-form ref="form" :model="form">
4
       <el-form ref="form" :model="form">
10
         <el-row>
5
         <el-row>
11
           <el-col :span="10">
6
           <el-col :span="10">
14
                 <el-option
9
                 <el-option
15
                   v-for="item in this.DeviceType"
10
                   v-for="item in this.DeviceType"
16
                   :key="item.id"
11
                   :key="item.id"
17
-                  :label="item.equitment_name"
12
+                  :label="item.unit_type"
18
                   :value="item.id"
13
                   :value="item.id"
19
                 ></el-option>
14
                 ></el-option>
20
               </el-select>
15
               </el-select>
22
           </el-col>
17
           </el-col>
23
           <el-col :span="10">
18
           <el-col :span="10">
24
             <el-form-item label="消毒时长:">
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
               <span>分钟</span>
21
               <span>分钟</span>
30
             </el-form-item>
22
             </el-form-item>
31
           </el-col>
23
           </el-col>
87
           </el-col>
79
           </el-col>
88
           <el-col :span="10">
80
           <el-col :span="10">
89
             <el-form-item label="机表消毒液:">
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
                 <el-option
83
                 <el-option
95
                   v-for="item in this.disinfectantType"
84
                   v-for="item in this.disinfectantType"
96
                   :key="item.id"
85
                   :key="item.id"
137
 </template>
126
 </template>
138
 
127
 
139
 <script>
128
 <script>
140
-import { getAllEquimentName, savePlan } from "@/api/manage";
129
+import { getAllEquimentName, savePlan, getAllEquitType } from '@/api/manage'
141
 export default {
130
 export default {
142
-  name: "PlanForm",
131
+  name: 'PlanForm',
143
   props: {
132
   props: {
144
     equimentid: Number
133
     equimentid: Number
145
   },
134
   },
147
     return {
136
     return {
148
       dialogVisible: false,
137
       dialogVisible: false,
149
       form: {
138
       form: {
150
-        device_type: "",
151
-        disinfec_time: "",
139
+        device_type: '',
140
+        disinfec_time: '',
152
         time: [],
141
         time: [],
153
         class_time: [],
142
         class_time: [],
154
         way: 0,
143
         way: 0,
158
       },
147
       },
159
       value: [],
148
       value: [],
160
       timeType: [
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
       classType: [
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
       disinfectType: [
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
       disinfectantType: [
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
       sterilizeType: [
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
       fluidPathType: [
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
       DeviceType: [],
201
       DeviceType: [],
213
       planid: 0
202
       planid: 0
214
-    };
203
+    }
215
   },
204
   },
216
   methods: {
205
   methods: {
217
     open: function() {
206
     open: function() {
218
-      this.dialogVisible = true;
207
+      this.dialogVisible = true
219
     },
208
     },
220
     getAllEquimentName() {
209
     getAllEquimentName() {
221
       getAllEquimentName().then(response => {
210
       getAllEquimentName().then(response => {
222
         if (response.data.state === 1) {
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
     savePlan(formName) {
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
       savePlan(this.form, this.equimentid).then(response => {
240
       savePlan(this.form, this.equimentid).then(response => {
252
         if (response.data.state == 1) {
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
   created() {
259
   created() {
264
-    this.getAllEquimentName();
260
+    this.getAllEquimentName()
261
+    this.getAllEquitType()
265
   }
262
   }
266
-};
263
+}
267
 </script>
264
 </script>
268
 
265
 
269
 <style scoped></style>
266
 <style scoped></style>

+ 21 - 12
src/xt_pages/management/home.vue View File

1847
                 <el-option
1847
                 <el-option
1848
                   v-for="item in this.DeviceType"
1848
                   v-for="item in this.DeviceType"
1849
                   :key="item.id"
1849
                   :key="item.id"
1850
-                  :label="item.equitment_name"
1850
+                  :label="item.unit_type"
1851
                   :value="item.id"
1851
                   :value="item.id"
1852
                 ></el-option>
1852
                 ></el-option>
1853
               </el-select>
1853
               </el-select>
1966
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1966
   import { getAllSubregion, getAllMachine, getMachineDetailById,
1967
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1967
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
1968
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
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
   import { uParseTime } from '@/utils/tools'
1970
   import { uParseTime } from '@/utils/tools'
1971
   import { getToken } from '@/api/qiniu'
1971
   import { getToken } from '@/api/qiniu'
1972
   import PlanForm from './components/PlanForm'
1972
   import PlanForm from './components/PlanForm'
3219
             return false
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
       clickQuery() {
3231
       clickQuery() {
3232
         this.$refs.multipleform.open()
3232
         this.$refs.multipleform.open()
3233
       },
3233
       },
3862
       },
3862
       },
3863
       handleSelect(id){
3863
       handleSelect(id){
3864
         console.log(id)
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
     created() {
3875
     created() {
3868
       this.getAllSubregion()
3876
       this.getAllSubregion()
3875
       this.getAllEquimentName()
3883
       this.getAllEquimentName()
3876
       this.getAllOrganization()
3884
       this.getAllOrganization()
3877
       this.getOrgName()
3885
       this.getOrgName()
3886
+      this.getAllEquitType()
3878
     },
3887
     },
3879
   }
3888
   }
3880
 </script>
3889
 </script>