修复社区具备两个及以上的账号登录问题

master
许宏杰 6 months ago
parent 745deb4b0e
commit 615165f276

@ -39,7 +39,7 @@ export default {
};
},
mounted() {
this.getPie("house");
// this.getPie("house");
},
watch: {
queryParamsIndex: {
@ -48,6 +48,7 @@ export default {
this.getPie();
},
deep: true,
// immediate: true,
},
},
methods: {

@ -19,10 +19,18 @@ export default {
return;
}
if (this.$auth.hasRole("xiaoqu")) {
this.$router.replace({
path: "/xiaoqu",
query: { xiaoquId: this.dept.deptId },
});
if (this.dept.parentId == 238) {
this.$router.replace({
path: "/shequ",
query: { deptId: this.dept.parentId },
});
} else {
this.$router.replace({
path: "/xiaoqu",
query: { xiaoquId: this.dept.deptId },
});
}
return;
}
},

@ -21,6 +21,9 @@
:key="dict.dept_id"
:label="dict.dept_name"
:value="dict.dept_id"
v-show="
$route.query.deptId ? dict.dept_id == $route.query.deptId : true
"
>
</el-option>
</el-select>
@ -126,20 +129,19 @@ export default {
};
},
created() {
this.getCommunity();
this.getData();
},
created() {},
methods: {
getData() {
this.$store.commit("SET_QUERY_PARAMS", {
shequId: "",
xiaoquId: undefined,
});
this.$store.dispatch("GetYjtotal");
this.$store.dispatch("GetXiaoquInfo", this.dept.deptId);
this.$store.dispatch("getThreeCell");
this.$store.dispatch("GetcolorList");
this.$store.commit("SET_QUERY_PARAMS", { shequId: "", xiaoquId: "1" });
if (this.$route.query.deptId) {
this.community = parseInt(this.$route.query.deptId);
this.handleChange(this.community);
} else {
this.$store.dispatch("GetYjtotal");
this.$store.dispatch("GetXiaoquInfo", this.dept.deptId);
this.$store.dispatch("getThreeCell");
this.$store.dispatch("GetcolorList");
}
},
clickReset() {
this.community = 100;
@ -186,6 +188,10 @@ export default {
this.addXiaoqu();
this.addRoad();
this.addRiver();
setTimeout(() => {
this.getCommunity();
}, 1000);
},
zoomChange() {
let level = this.map.level;
@ -311,6 +317,13 @@ export default {
const arr = mars3d.Util.geoJsonToGraphics(res);
arr.map((item, index) => {
let id = item.attr.Id;
if (
this.$route.query.deptId &&
this.$route.query.deptId != item.attr.FID
)
return;
if (
id == 245 ||
id == 251 ||
@ -473,7 +486,7 @@ export default {
shequItem.centerPoint._lat
),
{
radius: 2776.4,
radius: 5500,
duration: 1,
complete: function () {
if (_this.xiaoquList.length == 0) {
@ -503,10 +516,14 @@ export default {
getCommunity() {
let community = new Promise((resolve, reject) => {
getCommunitylist().then((res) => {
res.data["社区list集合"].unshift({
dept_name: "全部社区",
dept_id: this.dept.deptId,
});
if (this.$route.query.deptId) {
} else {
res.data["社区list集合"].unshift({
dept_name: "全部社区",
dept_id: this.dept.deptId,
});
}
resolve(res.data["社区list集合"]);
});
});
@ -525,6 +542,7 @@ export default {
});
return item;
});
this.getData();
});
},
},

Loading…
Cancel
Save