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

View File

@ -5,7 +5,7 @@
<!-- <div class="lineEnd"></div> --> <!-- <div class="lineEnd"></div> -->
<div class="menuBar"> <div class="menuBar">
<div class="tabPosition" v-for="(item, index) in data.tabPosition"> <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 style="display: flex; text-align: center">
<div class="img"><img :src="item.img" alt="" /></div> <div class="img"><img :src="item.img" alt="" /></div>
<div class="tabsItem"> <div class="tabsItem">
@ -209,6 +209,7 @@ const goto = (val) => {
const data = reactive({ const data = reactive({
taps1: "6", taps1: "6",
taps: "1", taps: "1",
tapbody: {},
tabPosition: [ tabPosition: [
{ {
id: "0", id: "0",
@ -522,9 +523,11 @@ const gk = computed(() => {
}); });
const tapshow = (parentId, childId) => { const tapshow = (parentId, childId) => {
console.log(parentId, childId, "菜单名"); // console.log(parentId, childId, "");
data.taps1 = parentId.id; data.taps1 = parentId.id;
data.taps = childId; data.taps = childId;
localStorage.setItem("taps", data.taps);
localStorage.setItem("taps1", JSON.stringify(parentId));
if ( if (
childId == 0 && childId == 0 &&
(parentId.name == "弱有所扶" || (parentId.name == "弱有所扶" ||
@ -564,15 +567,19 @@ const tapshow = (parentId, childId) => {
} }
} }
}; };
const toggleVisibility = (val) => { const toggleVisibility = (val, show) => {
// console.log(val, ""); // console.log(val, show, "");
data.tabPosition.forEach((parent) => { data.tabPosition.forEach((parent) => {
parent.visible = false; parent.visible = false;
if (parent.id === val.id) { if (parent.id === val.id) {
parent.visible = !parent.visible; parent.visible = !parent.visible;
} }
}); });
tapshow(val, 0); if (show) {
tapshow(val, 0);
} else {
tapshow(data.tapbody, data.taps);
}
}; };
const gaikuang = (name) => { const gaikuang = (name) => {
// console.log(4444, name); // console.log(4444, name);
@ -670,17 +677,18 @@ const sevenYX = (name) => {
onMounted(() => { onMounted(() => {
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d"); // 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>