This commit is contained in:
duanxiaohai 2024-07-24 11:08:58 +08:00
parent ef90d290db
commit d9fdca24b3
5 changed files with 132 additions and 57 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -412,11 +412,6 @@ const rowState = (row) => {
}
};
const leftchoose = ref({
first: "1",
second: "1",
third: "1",
});
const change = (name, index) => {
data.first = !data.first;
};

View File

@ -8,8 +8,13 @@
<div class="title_line"></div>
</div>
<div class="content">
<div class="content_item" v-for="(item, index) in personTotal" :class="{ choose: item.id == choose.person }"
@click="changeRs(item.id)" :key="index">
<div
class="content_item"
v-for="(item, index) in personTotal"
:class="{ choose: item.id == choose.person }"
@click="changeRs(item.id)"
:key="index"
>
<div class="content_item_name">{{ item.name }}</div>
<div class="content_item_value">{{ item.value }}</div>
</div>
@ -21,8 +26,13 @@
<div class="title_line"></div>
</div>
<div class="content">
<div class="content_item" v-for="(item, index) in tsbqTotal" :class="{ choose: item.id == choose.bq }"
@click="changebq(item.id)" :key="index">
<div
class="content_item"
v-for="(item, index) in tsbqTotal"
:class="{ choose: item.id == choose.bq }"
@click="changebq(item.id)"
:key="index"
>
<div class="content_item_name">{{ item.name }}</div>
<div class="content_item_value">{{ item.value }}</div>
</div>
@ -36,11 +46,19 @@
<div class="title_line"></div>
</div>
<div class="jbggfwq_content">
<div class="jbggfwq_content_item" v-for="(item, index) in jbfwqTotal" :key="index">
<div
class="jbggfwq_content_item"
v-for="(item, index) in jbfwqTotal"
:key="index"
>
<div class="jbggfwq_content_item_left">{{ item.name }}</div>
<div class="jbggfwq_content_item_right">
<div class="jbggfwq_content_item_right_item" v-for="itemm in item.child"
:class="{ choose: itemm.id == choose.fwq }" @click="changeFwq(itemm.id, itemm.fwqList, itemm.center)">
<div
class="jbggfwq_content_item_right_item"
v-for="itemm in item.child"
:class="{ choose: itemm.id == choose.fwq }"
@click="changeFwq(itemm.id, itemm.fwqList, itemm.center)"
>
{{ itemm.name }}
</div>
</div>
@ -53,8 +71,13 @@
<div class="title_line"></div>
</div>
<div class="zyys_content">
<div class="zyys_content_item" v-for="(item, index) in yaosuTotal"
:class="{ choose: item.id == choose.yaosu, wz: item.wz == true }" @click="changeys(item.id)" :key="index">
<div
class="zyys_content_item"
v-for="(item, index) in yaosuTotal"
:class="{ choose: item.id == choose.yaosu, wz: item.wz == true }"
@click="changeys(item.id)"
:key="index"
>
<img :src="item.img" class="zyys_content_item_left" />
<div class="zyys_content_item_right">{{ item.name }}</div>
</div>
@ -267,9 +290,6 @@ const addPolygonCounty = () => {
fillOpacity: 0.7,
name: item.name,
});
polygon.addEventListener("click", () => {
console.log(1111111);
});
map.addOverlay(polygon);
}
});
@ -279,12 +299,10 @@ const addPolygonCounty = () => {
};
//
const addJd = () => {
goMapCenter([119.178783, 29.034581], 12);
mapTownCount.map((item) => {
createCustomOverlayJd(item);
});
goMapCenter([119.178783, 29.034583], 12);
};
//2
@ -453,6 +471,12 @@ const createCustomOverlayJd2 = (polygon) => {
});
map.addOverlay(customOverlay);
};
//
const addggfwq = () => {
fwqList.value.map((item) => {
createCustomOverlay(item);
});
};
//
const createCustomOverlay = (polygon) => {
function createLabelDOM() {
@ -534,26 +558,42 @@ const goMapCenter = (point, zoom) => {
map.centerAndZoom(new BMapGL.Point(point[0], point[1]), zoom);
};
const removeAllPolygon = (e) => {
let allOverlay = map.getOverlays();
console.log("allOverlay", allOverlay);
for (let i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
if (e == "fwq") {
addPolygonCounty();
nextTick(() => {
addJd();
})
} else {
addPolygonCounty();
nextTick(() => {
addJd2();
})
}
// if (e == "fwq") {
// addPolygonCounty();
// nextTick(() => {
// addJd();
// });
// } else {
// addPolygonCounty();
// nextTick(() => {
// addJd2();
// });
// }
};
//
//
const chooseArr = ref([]);
const xuanran = () => {
addPolygonCounty();
if (chooseArr.value.includes("person")) {
console.log(3434);
addJd2();
}else{
addJd();
}
if (chooseArr.value.includes("fwq")) {
console.log(5656);
addggfwq();
}
// if (!chooseArr.value.includes("person")) {
// addJd();
// }
};
const choose = ref({
person: 9999,
bq: 9999,
@ -561,23 +601,56 @@ const choose = ref({
yaosu: 9999,
});
const changeRs = (id) => {
choose.value.person = id;
choose.value.bq = 9999;
removeAllPolygon("person");
if (choose.value.person == id) {
console.log(111111);
chooseArr.value = chooseArr.value.filter((item) => item !== "person");
choose.value.person = 9999;
removeAllPolygon("person");
xuanran();
addJd();
} else {
console.log(2222222);
chooseArr.value.push("person");
choose.value.person = id;
choose.value.bq = 9999;
removeAllPolygon("person");
xuanran();
}
};
const changebq = (id) => {
choose.value.bq = id;
choose.value.person = 9999;
};
const changeFwq = (id, list, center) => {
choose.value.fwq = id;
removeAllPolygon("fwq");
fwqList.value = list;
goMapCenter(center, 17);
fwqList.value.map((item) => {
createCustomOverlay(item);
});
console.log(fwqList.value);
if (choose.value.fwq == id) {
console.log(7878);
chooseArr.value = chooseArr.value.filter((item) => item !== "fwq");
choose.value.fwq = 9999;
removeAllPolygon("fwq");
xuanran();
} else {
console.log(9999);
chooseArr.value.push("fwq");
choose.value.fwq = id;
fwqList.value = list;
removeAllPolygon("fwq");
xuanran();
console.log(1111111111,center);
setTimeout(() => {
goMapCenter(center, 17);
}, 500);
// addggfwq()
}
// choose.value.fwq = id;
// removeAllPolygon("fwq");
// fwqList.value = list;
// goMapCenter(center, 17);
// fwqList.value.map((item) => {
// createCustomOverlay(item);
// });
// console.log(fwqList.value);
};
const changeys = (id) => {
choose.value.yaosu = id;
@ -1148,8 +1221,7 @@ const jbfwqTotal = ref([
},
],
},
]);
//
]);//
const fwqList = ref([]);
//
const yaosuTotal = ref([
@ -1249,13 +1321,17 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
background: linear-gradient(270deg,
background: linear-gradient(
270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
rgba(0, 60, 131, 0.74) 100%),
radial-gradient(128% 99% at 100% 46%,
rgba(0, 60, 131, 0.74) 100%
),
radial-gradient(
128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
rgba(0, 61, 134, 0.42) 100%);
rgba(0, 61, 134, 0.42) 100%
);
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;
@ -1413,13 +1489,17 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
background: linear-gradient(270deg,
background: linear-gradient(
270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
rgba(0, 60, 131, 0.74) 100%),
radial-gradient(128% 99% at 100% 46%,
rgba(0, 60, 131, 0.74) 100%
),
radial-gradient(
128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
rgba(0, 61, 134, 0.42) 100%);
rgba(0, 61, 134, 0.42) 100%
);
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;

View File

@ -275,7 +275,7 @@ const data = reactive({
});
const tapshow = (val) => {
console.log(val);
// console.log(val);
data.taps = val;
};
//

View File

@ -15,8 +15,8 @@ export default defineConfig({
// 第一个代理
"/api": {
// 匹配到啥来进行方向代理
target: "http://192.168.2.17:8095/", //刘进
// target: "http://220.191.238.50:996/", //线上
// target: "http://192.168.2.17:8095/", //刘进
target: "http://220.191.238.50:996/", //线上
changeOrigin: true, //是否支持跨域
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
},