新增计划管理字典获取

lijinlong
吕天方 1 year ago
parent bad3189273
commit e4009cfeb3

@ -33,9 +33,9 @@
<div class="select-span">行政区划:</div>
<el-cascader
v-model="form.compartment"
v-model="form.subdistrict"
placeholder="请选择"
:options="optionstwo"
:options="listOne"
:props="props"
@change="handleChange">
</el-cascader>
@ -56,22 +56,22 @@
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in listTwo"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.industryType" placeholder="请选择">
<el-select v-model="form.indusTypeClass" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in listThree"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
@ -94,10 +94,10 @@
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in listFour"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
@ -106,10 +106,10 @@
<div class="select-span">企业分色:</div>
<el-select v-model="form.entprColor" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in listFive"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
@ -343,10 +343,13 @@ export default {
address: "上海市普陀区金沙江路 1518 弄",
},
],
options: [],
optionstwo:[],
listOne:[],
listTwo:[],
listThree:[],
listFour:[],
listFive:[],
props:{
value:'institutionName',
value:'county',
label:'institutionName'
},
multipleSelection: [],
@ -354,9 +357,9 @@ export default {
nextStep: false,
nextText: "下一步",
form: {
compartment: "",
subdistrict: "",
frimType: "",
economicsType: "",
indusTypeClass: "",
isPoint: "",
majorHazardLevel: "",
entprColor: "",
@ -524,20 +527,37 @@ export default {
if(item.children instanceof Array && item.children.length == 0){
delete item.children;
} else {
this.props.value = 'subdistrict'
this.commentData(item.children)
}
})
}
this.optionstwo = item
}
this.listOne = item
},
changeProps(props,arr){
arr.map((item)=>{
let obj = {};
obj.value = item.dictValue
obj.label = item.dictLabel
props.push(obj)
})
},
},
async mounted(){
let data = await this.$api.yingji.tree(); //
let listOne = await this.$api.yingji.dictdata({list:'economic_categories'}); //
let listTwo = await this.$api.yingji.dictdata({list:'category'}); //
let listThree = await this.$api.yingji.dictdata({list:'major_hazard_level'}); //
let listFour = await this.$api.yingji.dictdata({list:'entpr_color'}); //
this.commentData(data.data)
let listTwo = await this.$api.yingji.dictdata({list:'economic_categories'}); //
let listThree = await this.$api.yingji.dictdata({list:'category'}); //
let listFour = await this.$api.yingji.dictdata({list:'major_hazard_level'}); //
let listFive = await this.$api.yingji.dictdata({list:'entpr_color'}); //
// this.changeProps(this.listTwo,listTwo.data.economic_categories);
// this.changeProps(this.listThree,listThree.data.category);
// this.changeProps(this.listFour,listFour.data.major_hazard_level);
// this.changeProps(this.listFive,listFive.data.entpr_color);
this.listTwo = listTwo.data.economic_categories;
this.listThree = listThree.data.category;
this.listFour = listFour.data.major_hazard_level;
this.listFive = listFive.data.entpr_color;
}
};
</script>

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-13 16:13:34
* @LastEditTime: 2023-09-13 17:22:51
-->
<template>
<div class="plan-management">
@ -160,7 +160,7 @@
plannedYear:''
},
props:{
value:'institutionName',
value:'county',
label:'institutionName'
},
value:'2022',
@ -262,6 +262,7 @@
if(item.children instanceof Array && item.children.length == 0){
delete item.children;
} else {
this.props.value = 'subdistrict'
this.commentData(item.children)
}
})

Loading…
Cancel
Save