修改设备下拉框

This commit is contained in:
xusd 2024-09-13 17:13:36 +08:00
parent a03f1a8c97
commit fed966910a
9 changed files with 46 additions and 1 deletions

View File

@ -79,6 +79,11 @@ export default {
}, },
created() { created() {
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}) })
}, },

View File

@ -127,6 +127,11 @@ export default {
created() { created() {
this.getList(); this.getList();
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}) })
}, },

View File

@ -93,6 +93,11 @@ export default {
}, },
created() { created() {
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}) })
}, },

View File

@ -131,6 +131,11 @@ export default {
created() { created() {
this.getList(); this.getList();
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}) })
}, },

View File

@ -153,6 +153,11 @@ export default {
}, },
initSelection(){ initSelection(){
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}); });
getComponentSelection().then(res=>{ getComponentSelection().then(res=>{

View File

@ -8,7 +8,7 @@
<el-cascader <el-cascader
v-model="cascaderValue" v-model="cascaderValue"
:options="equipCascader" :options="equipCascader"
:props="{ value: 'id',label: 'name',children: 'children'}" :props="{ value: 'id',label: 'name',children: 'children',emitPath:false}"
clearable clearable
@change="cascaderChange"></el-cascader> @change="cascaderChange"></el-cascader>
</el-form-item> </el-form-item>
@ -174,6 +174,11 @@ export default {
}, },
initSelection(){ initSelection(){
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}); });
getComponentSelection().then(res=>{ getComponentSelection().then(res=>{

View File

@ -253,6 +253,11 @@ export default {
}, },
initSelection(){ initSelection(){
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}); });
getComponentSelection().then(res=>{ getComponentSelection().then(res=>{

View File

@ -202,6 +202,11 @@ export default {
}, },
initSelection(){ initSelection(){
getEquipCascader().then(res=>{ getEquipCascader().then(res=>{
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}); });
getComponentSelection().then(res=>{ getComponentSelection().then(res=>{

View File

@ -289,6 +289,11 @@ export default {
}, },
initSelection() { initSelection() {
getEquipCascader().then(res => { getEquipCascader().then(res => {
res.forEach(item=>{
if (item.children == null){
item.disabled = true;
}
})
this.equipCascader = res; this.equipCascader = res;
}); });
getComponentSelection().then(res => { getComponentSelection().then(res => {