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) => { const change = (name, index) => {
data.first = !data.first; data.first = !data.first;
}; };

View File

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

View File

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

View File

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