Browse Source

设备管理上正式

XMLWAN 4 years ago
parent
commit
48fc7dc633

+ 1 - 0
src/xt_pages/management/components/UserForm.vue View File

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

+ 16 - 5
src/xt_pages/management/home.vue View File

945
                                   </el-col>
945
                                   </el-col>
946
                                   <el-col :span="8">
946
                                   <el-col :span="8">
947
                                      <el-form-item label="班次:" required prop="classtype" class="st">
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
                                            <el-option
949
                                            <el-option
950
                                             v-for="item in classType"
950
                                             v-for="item in classType"
951
                                            :key="item.id"
951
                                            :key="item.id"
957
                                      </el-form-item>
957
                                      </el-form-item>
958
                                   </el-col>
958
                                   </el-col>
959
                                   <el-col :span="8">
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
                                            <el-option
962
                                            <el-option
963
                                             v-for="item in bedZoneThree"
963
                                             v-for="item in bedZoneThree"
964
                                            :key="item.id"
964
                                            :key="item.id"
973
                                 <el-row>
973
                                 <el-row>
974
                                     <el-col :span="8">
974
                                     <el-col :span="8">
975
                                         <el-form-item label="机位号:" required prop="bed_number">
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
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
977
                                           <el-option v-for="item in this.bedNumberTwo" :key="item.id" :label="item.number" :value="item.id"></el-option>
978
                                         </el-select>
978
                                         </el-select>
979
                                      </el-form-item>
979
                                      </el-form-item>
2646
       },
2646
       },
2647
       handleCurrentChange(val) {
2647
       handleCurrentChange(val) {
2648
         this.unitType = val.unit_type
2648
         this.unitType = val.unit_type
2649
-        // console.log('val是什么', val)
2649
+        console.log('val是什么', val)
2650
         this.currentRow = val
2650
         this.currentRow = val
2651
         this.$forceUpdate()
2651
         this.$forceUpdate()
2652
         this.getMachineDetailById(val.id)
2652
         this.getMachineDetailById(val.id)
2660
         this.getAutoData(val.id)
2660
         this.getAutoData(val.id)
2661
         this.getTotalNumber(val.id)
2661
         this.getTotalNumber(val.id)
2662
         this.getTimeWarning(val.id)
2662
         this.getTimeWarning(val.id)
2663
+        this.getData(val.bed_id)
2663
       },
2664
       },
2664
       getAutoData(id) {
2665
       getAutoData(id) {
2665
         getAutoData(id).then(response => {
2666
         getAutoData(id).then(response => {
4261
             var zone = response.data.data.zone
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
     created() {
4277
     created() {