This commit is contained in:
闫世杰 2024-08-01 17:29:20 +08:00
commit 6c38f6c9f9
4 changed files with 113 additions and 79 deletions

View File

@ -700,9 +700,9 @@ const minData = reactive({
zq: "1610", zq: "1610",
}, },
minPieData2: { minPieData2: {
wfgz: "1500", wfgz: "4754",
xstp: "1610", xstp: "31145",
skym: "1610", skym: "13255",
}, },
}); });
// //

View File

@ -10,11 +10,7 @@
> >
<template #header="{ close, titleId, titleClass }"> <template #header="{ close, titleId, titleClass }">
<div class="my-header"> <div class="my-header">
<el-icon <el-icon size="26" color="#fff" @click="closeDialog">
size="26"
color="#fff"
@click="closeDialog"
>
<CircleCloseFilled /> <CircleCloseFilled />
</el-icon> </el-icon>
</div> </div>
@ -49,6 +45,8 @@
height="100%" height="100%"
:header-cell-style="{ background: '#008FCD' }" :header-cell-style="{ background: '#008FCD' }"
:key="tableKey" :key="tableKey"
@row-click="handleRowClick"
class="custom-table-font"
> >
<!-- <el-table-column <!-- <el-table-column
v-for="(item, index) in data.columns" v-for="(item, index) in data.columns"
@ -88,6 +86,7 @@
<div class="pagePart"> <div class="pagePart">
<el-pagination <el-pagination
class="small-pagination"
background background
layout="prev, pager, next,total" layout="prev, pager, next,total"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
@ -113,6 +112,9 @@ import {
nextTick, nextTick,
} from "vue"; } from "vue";
import { CircleCloseFilled } from "@element-plus/icons-vue"; import { CircleCloseFilled } from "@element-plus/icons-vue";
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const routers = useRoute();
const props = defineProps({ const props = defineProps({
dialogShow: { dialogShow: {
type: Boolean, type: Boolean,
@ -144,7 +146,13 @@ const props = defineProps({
}, },
}); });
const emit = defineEmits(["close", "handle"]); const emit = defineEmits(["close", "handle"]);
const handleRowClick = (row, column, event) => {
// row
console.log(row);
router.push({
path: `/home/index/person`,
});
};
// //
const dialogShow = ref(); const dialogShow = ref();
const data = reactive({ const data = reactive({
@ -269,7 +277,7 @@ const handle = (current) => {
} }
.title { .title {
margin: 10px auto; margin: 0px auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -285,9 +293,9 @@ const handle = (current) => {
.name { .name {
font-family: PangMenZhengDao, PangMenZhengDao; font-family: PangMenZhengDao, PangMenZhengDao;
font-weight: 600; font-weight: 600;
font-size: 24px; font-size: 22px;
color: #ffffff; color: #ffffff;
line-height: 38px; line-height: 27px;
text-align: center; text-align: center;
font-style: normal; font-style: normal;
letter-spacing: 2px; letter-spacing: 2px;
@ -304,4 +312,14 @@ const handle = (current) => {
height: 19px; height: 19px;
} }
} }
.custom-table-font {
font-size: 10px;
}
:deep(.el-table:not(.el-table--border) .el-table__cell){
padding: 3px 0px;
}
:deep(.el-pagination ){
transform: scale(0.8);
}
</style> </style>

View File

@ -70,17 +70,17 @@ const pieData = reactive([
{ {
name: "0-18岁", // name: "0-18岁", //
value: 0, // value: 0, //
per: 2, per: 9.67,
}, },
{ {
name: "19-60岁", name: "19-60岁",
value: 0, value: 0,
per: 8, per: 63.37,
}, },
{ {
name: "60岁以上", name: "60岁以上",
value: 0, value: 0,
per: 10, per: 26.97,
}, },
]); ]);

View File

@ -1237,7 +1237,7 @@ const getDatas = async (e, i) => {
} }
if (cfJd.value != "") { if (cfJd.value != "") {
xkzCenter.map((item) => { xkzCenter.map((item) => {
// item.number = 0; item.swrs = 0;
res.data.committeeSwrs.map((items) => { res.data.committeeSwrs.map((items) => {
if (items.csq == item.name) { if (items.csq == item.name) {
item.swrs = items.swrs; item.swrs = items.swrs;
@ -1400,6 +1400,15 @@ const getDatas2 = async (e, i, cs) => {
} }
} }
}); });
if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index);
});
} else {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}
}; };
// //
// //
@ -1600,13 +1609,13 @@ const to_jd = (item_name) => {
// console.log(111, choose.value.person); // console.log(111, choose.value.person);
cfJd.value = item_name; cfJd.value = item_name;
let jdCenter = []; let jdCenter = [];
if (item_name == "溪口镇") {
BMAP(); BMAP();
if (choose.value.person == "") { loadCs(item_name);
getDatas("溪口镇", ""); addPolygonCountyCs();
}
getDataBq(cfJd.value, ""); getDataBq(cfJd.value, "");
if (choose.value.person == "") {
getDatas(cfJd.value, "");
}
if ( if (
choose.value.person == "cjr" || choose.value.person == "cjr" ||
choose.value.person == "dibian" || choose.value.person == "dibian" ||
@ -1617,27 +1626,30 @@ const to_jd = (item_name) => {
choose.value.person == "kjer" choose.value.person == "kjer"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
getDatas("溪口镇", ""); getDatas(cfJd.value, "");
} else if (choose.value.person != "") { } else if (choose.value.person != "") {
if (choose.value.person == "9999") { if (choose.value.person == "9999") {
getDatas("溪口镇", ""); getDatas(cfJd.value, "");
} else { } else {
if (choose.value.person == 1) { if (choose.value.person == 1) {
getDatas("溪口镇", "0"); //0 getDatas(cfJd.value, "0"); //0
} else { } else {
getDatas("溪口镇", choose.value.person - 1); getDatas(cfJd.value, choose.value.person - 1);
} }
} }
} }
loadCs(item_name); // if (title_jd.value == item.name) {
addPolygonCountyCs(); // } else {
mapTownCount.map((item) => { // title_jd.value = item.name;
if (item.name == item_name) { // }
jdCenter = item.center;
mapTownCount.map((itemm) => {
if (itemm.name == item_name) {
jdCenter = itemm.center;
} }
}); });
goMapCenter(jdCenter, 13); goMapCenter(jdCenter, 13);
}
// } // }
}; };
// //
@ -2012,7 +2024,7 @@ const createCustomOverlayJd = (polygon, indexx) => {
div.setAttribute("name", this.properties.title); div.setAttribute("name", this.properties.title);
var title = document.createElement("div"); var title = document.createElement("div");
title.style.fontSize = "10px"; title.style.fontSize = "12px";
title.style.fontWeight = "600"; title.style.fontWeight = "600";
title.style.color = "#000000"; title.style.color = "#000000";
div.appendChild(title); div.appendChild(title);
@ -2053,14 +2065,14 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
div.setAttribute("name", this.properties.title); div.setAttribute("name", this.properties.title);
var title = document.createElement("div"); var title = document.createElement("div");
title.style.fontSize = "10px"; title.style.fontSize = "12px";
title.style.fontWeight = "600"; title.style.fontWeight = "600";
title.style.color = "#000000"; title.style.color = "#000000";
div.appendChild(title); div.appendChild(title);
title.appendChild(document.createTextNode(this.properties.title)); title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(div); content.appendChild(div);
var number = document.createElement("div"); var number = document.createElement("div");
number.style.fontSize = "12px"; number.style.fontSize = "13px";
number.style.fontWeight = "600"; number.style.fontWeight = "600";
number.style.color = "#FEFF6C"; number.style.color = "#FEFF6C";
number.style.textShadow = "0px 2px 4px rgba(0,0,0,0.5)"; number.style.textShadow = "0px 2px 4px rgba(0,0,0,0.5)";
@ -2217,15 +2229,15 @@ const addPolygonCountyCs = () => {
getDatas2(cfJd.value, choose.value.person, cfCs.value); getDatas2(cfJd.value, choose.value.person, cfCs.value);
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
if (choose.value.person == "") { // if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index); // DGcreateCs(item, index);
}); // });
} else { // } else {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index); // DGcreateCs2(item, index);
}); // });
} // }
}); });
} }
}); });
@ -2319,11 +2331,12 @@ const addCsUnChoose = () => {
// ) { // ) {
// getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); // getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
// } // }
if (choose.value.person == "") { // if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index); // DGcreateCs(item, index);
}); // });
} else if ( // } else
if (
choose.value.person == "cjr" || choose.value.person == "cjr" ||
choose.value.person == "dibian" || choose.value.person == "dibian" ||
choose.value.person == "db" || choose.value.person == "db" ||
@ -2333,13 +2346,16 @@ const addCsUnChoose = () => {
choose.value.person == "kjer" choose.value.person == "kjer"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
} else {
setTimeout(() => {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}, 600);
} }
// if (choose.value.person == "") {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs(item, index);
// });
// } else {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs2(item, index);
// });
// }
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
}); });
@ -2649,7 +2665,7 @@ const reset_font = () => {
} }
}; };
onMounted(() => { onMounted(() => {
tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d"); // tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
reset_font(); reset_font();
initMap(); initMap();
getData(); getData();