设备管理-类型名称规格型号联动

This commit is contained in:
bb_pan 2025-08-28 18:28:30 +08:00
parent a89a400c45
commit 309be71670
1 changed files with 27 additions and 1 deletions

View File

@ -30,7 +30,13 @@
</el-form-item>
<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
v-for="dict in materialNameList"
: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({ isAll: 1 }).then(response => {