This commit is contained in:
duanxiaohai 2024-09-02 17:22:44 +08:00
parent 442ef4a995
commit b40e8e9fb4
2 changed files with 34 additions and 25 deletions

View File

@ -461,7 +461,7 @@ const addPd = computed(() => {
//
const input1 = ref("");
const input2 = ref([]);
const input3=ref("")
const input3 = ref("");
const dialogVisible = ref(false);
const dialogVisible2 = ref(false);
const dialogVisible3 = ref(false);
@ -1415,9 +1415,9 @@ const nameEdit = () => {
dialogVisible.value = true;
};
//
const xzEdit=()=>{
const xzEdit = () => {
dialogVisible4.value = true;
}
};
const centerEdit = () => {
dialogVisible3.value = true;
};
@ -1456,10 +1456,9 @@ const csName = async () => {
});
}, 500);
};
const ssxzEdit=()=>{
const ssxzEdit = () => {
console.log(cs_choose_arr.value[0]);
}
};
const csCenter = async () => {
let regionalDivisionEditDTO = {
id: changeCsqkId.value,
@ -3298,9 +3297,11 @@ const addPolygonCounty = () => {
map.addOverlay(polygon);
polygon.addEventListener("click", async () => {
// if (cfJd.value == "" && item.name=='') {
// return;
// }
console.log(item.name);
if (cfJd.value == "湖镇镇" && item.name == "模环乡") {
return;
}
if (showEdit.value) {
return;
}
@ -3557,7 +3558,7 @@ const addPolygonCountyCs = () => {
}
loadingss.value = true;
cs_dd_arr.value = [];
xuanzhongCs.value=[];
xuanzhongCs.value = [];
cfCs.value = item.name;
title_cs.value = item.name;
sfdd.value = true;

View File

@ -5,7 +5,7 @@
<!-- <div class="lineEnd"></div> -->
<div class="menuBar">
<div class="tabPosition" v-for="(item, index) in data.tabPosition">
<div class="tabPositionBox" @click="toggleVisibility(item)">
<div class="tabPositionBox" @click="toggleVisibility(item, true)">
<div style="display: flex; text-align: center">
<div class="img"><img :src="item.img" alt="" /></div>
<div class="tabsItem">
@ -209,6 +209,7 @@ const goto = (val) => {
const data = reactive({
taps1: "6",
taps: "1",
tapbody: {},
tabPosition: [
{
id: "0",
@ -522,9 +523,11 @@ const gk = computed(() => {
});
const tapshow = (parentId, childId) => {
console.log(parentId, childId, "菜单名");
// console.log(parentId, childId, "");
data.taps1 = parentId.id;
data.taps = childId;
localStorage.setItem("taps", data.taps);
localStorage.setItem("taps1", JSON.stringify(parentId));
if (
childId == 0 &&
(parentId.name == "弱有所扶" ||
@ -564,15 +567,19 @@ const tapshow = (parentId, childId) => {
}
}
};
const toggleVisibility = (val) => {
// console.log(val, "");
const toggleVisibility = (val, show) => {
// console.log(val, show, "");
data.tabPosition.forEach((parent) => {
parent.visible = false;
if (parent.id === val.id) {
parent.visible = !parent.visible;
}
});
tapshow(val, 0);
if (show) {
tapshow(val, 0);
} else {
tapshow(data.tapbody, data.taps);
}
};
const gaikuang = (name) => {
// console.log(4444, name);
@ -670,17 +677,18 @@ const sevenYX = (name) => {
onMounted(() => {
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
getData("弱有所扶", "社会救助服务");
sevenYX("弱有众扶");
if (localStorage.getItem("taps1") !== undefined) {
data.tapbody = JSON.parse(localStorage.getItem("taps1"));
data.taps = localStorage.getItem("taps");
data.taps1 = data.tapbody.id;
// console.log("", data.tapbody, data.taps);
toggleVisibility(data.tapbody, false);
} else {
getData("弱有所扶", "社会救助服务");
sevenYX("弱有众扶");
}
});
// onMounted(() => {
// let token = tools.data.get("token");
// if (token == null) {
// ElMessage.error("!");
// window.location.href =
// "http://220.191.238.50:996/api/login?returnURL=" + window.location.href;
// }
// });
</script>
<style lang="scss" scoped>