区划优化

lijinlong^2
杜函宇 1 year ago
parent 75632c5988
commit 231c59b39a

@ -7,7 +7,7 @@
* @LastEditTime: 2023-09-28 17:03:02
-->
<template>
<div >
<div>
<el-cascader
size="small"
v-model="district"
@ -46,10 +46,16 @@ export default {
dept: (state) => state.user.dept,
}),
},
props: {
none: {
type: Boolean,
default: false,
},
},
methods: {
xzList() {
xzTree().then((res) => {
if (this.dept.parentId == 0 || this.dept.leader == 'admin') {
if (this.dept.parentId == 0 || this.dept.leader == "admin") {
res.data.forEach((value, index) => {
this.compartment.push({
value: value.county,
@ -66,16 +72,26 @@ export default {
}
});
}
this.$emit("quhuadizhi", this.compartment)
this.$emit("quhuadizhi", this.compartment);
});
},
getData(e) {
if (e.length == 1) {
this.$emit("quhua", e[0].slice(1, 8));
} else if (e.length == 2 && e[0] == e[1]) {
this.$emit("quhua", e[0].slice(1, 8));
if (!this.none) {
if (e.length == 1) {
this.$emit("quhua", e[0].slice(1, 8));
} else if (e.length == 2 && e[0] == e[1]) {
this.$emit("quhua", e[0].slice(1, 8));
} else {
this.$emit("quhua", e[1].slice(1, 11));
}
} else {
this.$emit("quhua", e[1].slice(1, 11));
if (e.length == 1) {
this.$emit("quhua", e[0]);
} else if (e.length == 2 && e[0] == e[1]) {
this.$emit("quhua", e[0]);
} else {
this.$emit("quhua", e[1]);
}
}
},
},
@ -88,7 +104,10 @@ export default {
.el-input__inner {
height: 33px;
}
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-down::before {
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-down::before {
content: "";
background: url(../../../assets/images/down2.png) center center no-repeat;
background-size: cover;

@ -23,7 +23,7 @@
</div>
<div class="select-input">
<div class="select-span">区划:</div>
<executive @quhua="quhua" @quhuadizhi="quhuadizhi" ref="executive"></executive>
<executive @quhua="quhua" @quhuadizhi="quhuadizhi" :none="true" ref="executive"></executive>
</div>
<div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect">

Loading…
Cancel
Save