XMLWAN 4 jaren geleden
bovenliggende
commit
0c653de112
1 gewijzigde bestanden met toevoegingen van 16 en 27 verwijderingen
  1. 16 27
      src/xt_pages/management/home.vue

+ 16 - 27
src/xt_pages/management/home.vue Bestand weergeven

@@ -1947,10 +1947,10 @@
1947 1947
          <remander-form ref="remanderform"> </remander-form>
1948 1948
     <!-- 编辑消毒计划 -->
1949 1949
      <el-dialog title="编辑消毒计划" :visible.sync="dialogVisible" width="50%" center>
1950
-       <el-form :model="machineform" ref="machineform">
1950
+       <el-form :model="machineform" ref="machineform" :rules="planRules">
1951 1951
         <el-row>
1952 1952
           <el-col :span="10">
1953
-            <el-form-item label="设备型号:">
1953
+            <el-form-item label="设备型号:" required prop = "device_type">
1954 1954
               <el-select style="width:135px" v-model="machineform.device_type">
1955 1955
                 <el-option
1956 1956
                   v-for="item in this.DeviceType"
@@ -1962,7 +1962,7 @@
1962 1962
             </el-form-item>
1963 1963
           </el-col>
1964 1964
           <el-col :span="10">
1965
-            <el-form-item label="消毒时长:">
1965
+            <el-form-item label="消毒时长:" required prop="disinfec_time">
1966 1966
               <el-input style="width:135px" v-model="machineform.disinfec_time"></el-input>
1967 1967
               <span>分钟</span>
1968 1968
             </el-form-item>
@@ -1970,7 +1970,7 @@
1970 1970
         </el-row>
1971 1971
         <el-row>
1972 1972
           <el-col :span="10">
1973
-            <el-form-item label="时间:">
1973
+            <el-form-item label="时间:" required prop="time">
1974 1974
               <el-select
1975 1975
                 v-model="machineform.time"
1976 1976
                 placeholder="请选择时间"
@@ -1986,7 +1986,7 @@
1986 1986
             </el-form-item>
1987 1987
           </el-col>
1988 1988
           <el-col :span="10">
1989
-            <el-form-item label="班次:">
1989
+            <el-form-item label="班次:" required prop="class_time">
1990 1990
               <el-select
1991 1991
                 v-model="machineform.class_time"
1992 1992
                 placeholder="请选择时间"
@@ -2074,7 +2074,7 @@
2074 2074
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2075 2075
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2076 2076
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2077
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed, getAllMachineTwo } from '@/api/manage'
2077
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed } from '@/api/manage'
2078 2078
   import { uParseTime } from '@/utils/tools'
2079 2079
   import { getToken } from '@/api/qiniu'
2080 2080
   import PlanForm from './components/PlanForm'
@@ -2206,7 +2206,7 @@ export default {
2206 2206
           device_type: 0, // 设备类型
2207 2207
           date: ''
2208 2208
         },
2209
-        currentRow: {},
2209
+        currentRow: null,
2210 2210
         cancelShow: false,
2211 2211
         confirmShow: false,
2212 2212
         isIndeterminate: true,
@@ -2249,7 +2249,12 @@ export default {
2249 2249
           disinfection_status: [{ required: true, message: '消毒状态' }],
2250 2250
           sign_name: [{ required: true, message: '请填写签名', trigger: ['change'] }],
2251 2251
           classtype: [{ required: true, message: '请填写班次' }]
2252
-
2252
+        },
2253
+        planRules: {
2254
+          device_type: [{ required: true, message: '请输入设备型号' }],
2255
+          disinfec_time: [{ required: true, message: '请输入消毒时长' }],
2256
+          time: [{ required: true, message: '请输入时间' }],
2257
+          class_time: [{ required: true, message: '请输入班次' }]
2253 2258
         },
2254 2259
         runOption: [
2255 2260
           { id: 1, name: '正常' },
@@ -2666,15 +2671,6 @@ export default {
2666 2671
           }
2667 2672
         })
2668 2673
       },
2669
-      getAllMachineTwo() {
2670
-        getAllMachineTwo(this.forms.zone_id, this.forms.device_type).then(response => {
2671
-          if (response.data.state === 1) {
2672
-            var addmahcer = response.data.data.addmahcer
2673
-            console.log('addmacher是', addmahcer)
2674
-            this.tableDatatwo = addmahcer
2675
-          }
2676
-        })
2677
-      },
2678 2674
       handleIndex(index) {
2679 2675
         this.tabIndex = index
2680 2676
       },
@@ -2977,18 +2973,13 @@ export default {
2977 2973
             // console.log('form', this.form)
2978 2974
             if (response.data.state === 1) {
2979 2975
               var addmacher = response.data.data.addmacher
2976
+              console.log('addmacher----', addmacher)
2977
+  
2980 2978
               this.$message.success('修改成功')
2981
-              for (let i = 0; i < this.tableDatatwo.length; i++) {
2982
-                // eslint-disable-next-line no-cond-assign
2983
-                if (this.tableDatatwo[i].id = addmacher.id) {
2984
-                  this.tableDatatwo = addmacher
2985
-                  this.$forceUpdate()
2986
-                }
2987
-              }
2988 2979
               // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
2989 2980
               // this.getAllMachine()
2990 2981
               this.getAllSubregion()
2991
-              this.$refs.singleTable.setCurrentRow(this.currentRow)
2982
+              // this.$refs.singleTable.setCurrentRow(addmacher)
2992 2983
               this.$forceUpdate()
2993 2984
             }
2994 2985
           })
@@ -4380,7 +4371,6 @@ export default {
4380 4371
         this.filename = ''
4381 4372
         this.classShow = false
4382 4373
       }
4383
-  
4384 4374
     },
4385 4375
     created() {
4386 4376
       this.getAllSubregion()
@@ -4397,7 +4387,6 @@ export default {
4397 4387
       this.getAllEquitType()
4398 4388
       this.getAllpatient()
4399 4389
       this.getAllMode()
4400
-      this.getAllMachineTwo()
4401 4390
   }
4402 4391
   }
4403 4392
 </script>