新增计划管理字典获取

lijinlong
吕天方 1 year ago
parent bad3189273
commit e4009cfeb3

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

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

Loading…
Cancel
Save