区划优化

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

@ -46,10 +46,16 @@ export default {
dept: (state) => state.user.dept, dept: (state) => state.user.dept,
}), }),
}, },
props: {
none: {
type: Boolean,
default: false,
},
},
methods: { methods: {
xzList() { xzList() {
xzTree().then((res) => { 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) => { res.data.forEach((value, index) => {
this.compartment.push({ this.compartment.push({
value: value.county, value: value.county,
@ -66,10 +72,11 @@ export default {
} }
}); });
} }
this.$emit("quhuadizhi", this.compartment) this.$emit("quhuadizhi", this.compartment);
}); });
}, },
getData(e) { getData(e) {
if (!this.none) {
if (e.length == 1) { if (e.length == 1) {
this.$emit("quhua", e[0].slice(1, 8)); this.$emit("quhua", e[0].slice(1, 8));
} else if (e.length == 2 && e[0] == e[1]) { } else if (e.length == 2 && e[0] == e[1]) {
@ -77,6 +84,15 @@ export default {
} else { } else {
this.$emit("quhua", e[1].slice(1, 11)); this.$emit("quhua", e[1].slice(1, 11));
} }
} else {
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 { .el-input__inner {
height: 33px; 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: ""; content: "";
background: url(../../../assets/images/down2.png) center center no-repeat; background: url(../../../assets/images/down2.png) center center no-repeat;
background-size: cover; background-size: cover;

@ -23,7 +23,7 @@
</div> </div>
<div class="select-input"> <div class="select-input">
<div class="select-span">区划:</div> <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>
<div class="my-checkbox"> <div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect"> <el-checkbox-group v-model="checkList" @change="setmealSelect">

Loading…
Cancel
Save