Explorar el Código

设备管理上正式

XMLWAN hace 4 años
padre
commit
48fc7dc633

+ 1 - 0
src/xt_pages/management/components/UserForm.vue Ver fichero

@@ -336,6 +336,7 @@
336 336
               <el-input
337 337
                 style="width:180px"
338 338
                 v-model="userform.contagion"
339
+                :disabled="true"
339 340
               ></el-input>
340 341
             </el-form-item>
341 342
           </el-col>

+ 16 - 5
src/xt_pages/management/home.vue Ver fichero

@@ -945,7 +945,7 @@
945 945
                                   </el-col>
946 946
                                   <el-col :span="8">
947 947
                                      <el-form-item label="班次:" required prop="classtype" class="st">
948
-                                       <el-select v-model="userform.classtype" placeholder="请选择" class="a" @change="ChangeClass">
948
+                                       <el-select v-model="userform.classtype" placeholder="请选择" class="a">
949 949
                                            <el-option
950 950
                                             v-for="item in classType"
951 951
                                            :key="item.id"
@@ -957,8 +957,8 @@
957 957
                                      </el-form-item>
958 958
                                   </el-col>
959 959
                                   <el-col :span="8">
960
-                                     <el-form-item label="分区:" required prop="zone">
961
-                                         <el-select v-model="userform.zone" placeholder="请选择" class="a"  @change="selectChange">
960
+                                     <el-form-item label="分区:" required prop="zone" >
961
+                                         <el-select v-model="userform.zone" placeholder="请选择" class="a" :disabled="true">
962 962
                                            <el-option
963 963
                                             v-for="item in bedZoneThree"
964 964
                                            :key="item.id"
@@ -973,7 +973,7 @@
973 973
                                 <el-row>
974 974
                                     <el-col :span="8">
975 975
                                         <el-form-item label="机位号:" required prop="bed_number">
976
-                                        <el-select style="width:150px" v-model="userform.bed_number" @change="selectBed">
976
+                                        <el-select style="width:150px" v-model="userform.bed_number" :disabled="true">
977 977
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
978 978
                                         </el-select>
979 979
                                      </el-form-item>
@@ -2646,7 +2646,7 @@ export default {
2646 2646
       },
2647 2647
       handleCurrentChange(val) {
2648 2648
         this.unitType = val.unit_type
2649
-        // console.log('val是什么', val)
2649
+        console.log('val是什么', val)
2650 2650
         this.currentRow = val
2651 2651
         this.$forceUpdate()
2652 2652
         this.getMachineDetailById(val.id)
@@ -2660,6 +2660,7 @@ export default {
2660 2660
         this.getAutoData(val.id)
2661 2661
         this.getTotalNumber(val.id)
2662 2662
         this.getTimeWarning(val.id)
2663
+        this.getData(val.bed_id)
2663 2664
       },
2664 2665
       getAutoData(id) {
2665 2666
         getAutoData(id).then(response => {
@@ -4261,6 +4262,16 @@ export default {
4261 4262
             var zone = response.data.data.zone
4262 4263
           }
4263 4264
         })
4265
+      },
4266
+      getData(id) {
4267
+        selectBed(id).then(response => {
4268
+          if (response.data.state === 1) {
4269
+            var zone = response.data.data.zone
4270
+            this.userform.bed_number = zone.id
4271
+            this.userform.zone = zone.zone_id
4272
+            console.log('zone', zone)
4273
+          }
4274
+        })
4264 4275
       }
4265 4276
     },
4266 4277
     created() {