设备管理-类型名称规格型号联动
This commit is contained in:
		
							parent
							
								
									a89a400c45
								
							
						
					
					
						commit
						309be71670
					
				| 
						 | 
					@ -30,7 +30,13 @@
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-form-item prop="materialName">
 | 
					      <el-form-item prop="materialName">
 | 
				
			||||||
        <el-select v-model="queryParams.materialName" placeholder="请选择设备类型" clearable filterable>
 | 
					        <el-select
 | 
				
			||||||
 | 
					          v-model="queryParams.materialName"
 | 
				
			||||||
 | 
					          placeholder="请选择设备类型"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
					          filterable
 | 
				
			||||||
 | 
					          @change="handleMaModel"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          <el-option
 | 
					          <el-option
 | 
				
			||||||
            v-for="dict in materialNameList"
 | 
					            v-for="dict in materialNameList"
 | 
				
			||||||
            :key="dict.value"
 | 
					            :key="dict.value"
 | 
				
			||||||
| 
						 | 
					@ -677,6 +683,26 @@ export default {
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // change设备类型
 | 
				
			||||||
 | 
					    handleMaModel(e) {
 | 
				
			||||||
 | 
					      let typeId = null
 | 
				
			||||||
 | 
					      if (!e) {
 | 
				
			||||||
 | 
					        typeId = null
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        typeId = this.materialNameList.find(item => item.label == e).value
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      console.log('🚀 ~ handleMaModel ~ typeId:', typeId)
 | 
				
			||||||
 | 
					      getDeviceType({ level: 4, skipPermission: 1, typeId }).then(response => {
 | 
				
			||||||
 | 
					        let matModelRes = response.data
 | 
				
			||||||
 | 
					        this.materialModelList = matModelRes.map((item) => {
 | 
				
			||||||
 | 
					          return {
 | 
				
			||||||
 | 
					            label: item.typeName,
 | 
				
			||||||
 | 
					            value: item.typeId
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //查询资产属性下拉框
 | 
					    //查询资产属性下拉框
 | 
				
			||||||
    getZichanType() {
 | 
					    getZichanType() {
 | 
				
			||||||
      getZichanType({ isAll: 1 }).then(response => {
 | 
					      getZichanType({ isAll: 1 }).then(response => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue