幼儿园管理

This commit is contained in:
曹辉 2022-07-29 14:23:24 +08:00
parent 6c83b87e0c
commit efba12cb14

View File

@ -26,11 +26,13 @@
</el-form-item> </el-form-item>
<el-form-item label="幼儿园类型" prop="kindergartenType"> <el-form-item label="幼儿园类型" prop="kindergartenType">
<el-cascader <treeselect
v-model="queryParams.kindergartenType" :normalizer="normalizer"
:options="types" :options="types"
@change="handleChange" placeholder="请选择幼儿园类型"
></el-cascader> v-model="queryParams.kindergartenType"
style="width: 208px"
/>
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="contacts"> <el-form-item label="联系人" prop="contacts">
@ -269,12 +271,14 @@ export default {
type: "", type: "",
types: [ types: [
{ {
value: "", id: "",
label: "公办", label: "公办",
children: [],
}, },
{ {
value: "", id: "",
label: "私有", label: "私有",
children: [],
}, },
], ],
type2: "", type2: "",
@ -322,14 +326,16 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
handleChange(value) { normalizer(node) {
console.log(value); if (node.children && !node.children.length) {
value.forEach((e) => { delete node.children;
this.queryParams.kindergartenType = e; }
}); return {
console.log(this.queryParams); kindergartenType: node.id,
label: node.label,
children: node.children,
};
}, },
normalizer(node) {},
normalizer2(node) { normalizer2(node) {
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children;
@ -358,10 +364,10 @@ export default {
tKindergartenInfo(this.kindergartenType).then((res) => { tKindergartenInfo(this.kindergartenType).then((res) => {
this.type = res.data[0].dictValue; this.type = res.data[0].dictValue;
this.type2 = res.data[1].dictValue; this.type2 = res.data[1].dictValue;
this.types[0].value = res.data[0].dictValue; this.types[0].id = res.data[0].dictValue;
this.types[1].value = res.data[1].dictValue; this.types[1].id = res.data[1].dictValue;
console.log(this.type, this.type2, this.types); console.log(this.types);
}); });
}, },
// //