From 80f796c7e17370e9e124fb47f1d03ba77f3d629b Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Thu, 22 Aug 2024 14:24:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E9=9B=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/analyze.vue | 48 ++++++++++-- src/view/echart_analyze/dialog_jjlxfb.vue | 92 +++-------------------- src/view/sy_map.vue | 2 +- 3 files changed, 50 insertions(+), 92 deletions(-) diff --git a/src/view/analyze.vue b/src/view/analyze.vue index 7181118..e89d85a 100644 --- a/src/view/analyze.vue +++ b/src/view/analyze.vue @@ -199,7 +199,7 @@ @close="close" > { dialogShowElderly.value = false; }; const closeJj = () => { - tableType.data=[]; + tableType.data = []; dialogShow.value = false; pagination.currentPage = 1; }; @@ -593,6 +596,11 @@ const showEchartTy = (name) => { if (name == "年龄分布") { dialogShowEcTy1.value = true; } else { + http.get("/api/ggfwyth/getXzjdQrQcRs").then((res) => { + if (res.code == 200) { + jjlxfb.value = res.data; + } + }); dialogShowEcTy.value = true; } }; @@ -607,12 +615,26 @@ const tableType = reactive({ const jsSj = (name, index) => { if (index == 0 || index == 2) { tableType.title = `${name}转入人数`; + getzrzc(name, 0); } else { tableType.title = `${name}转出人数`; + getzrzc(name, 1); } tableType.columns = columns["聚集数据"].column; dialogShow.value = true; }; +const getzrzc = (name, bq) => { + http + .get( + `/api/ggfwyth/getXzjdQrQcList?page=${pagination.currentPage}&size=${pagination.pageSize}&xzjd=${name}&bq=${bq}` + ) + .then((res) => { + if (res.code == 200) { + tableType.data = res.data; + pagination.total = res.count; + } + }); +}; //培训+公益岗位数 const showPx = (name) => { if (name == "培训人次") { @@ -644,7 +666,17 @@ const pagination = reactive({ }); const handlePagination = (current) => { pagination.currentPage = current; - getTrain(); + console.log(tableType.title); + + if (tableType.title == "培训详情") { + getTrain(); + } else if (tableType.title.includes("转入人数")) { + let name = tableType.title.split("转入人数")[0]; + getzrzc(name, 0); + } else if (tableType.title.includes("转出人数")) { + let name = tableType.title.split("转出人数")[0]; + getzrzc(name, 1); + } }; //---------表格弹框------- //数据切换 @@ -970,7 +1002,7 @@ onMounted(() => { onBeforeMount(async () => { getData(); - getTrain();//培训人次 + getTrain(); //培训人次 }); onBeforeUnmount(() => { diff --git a/src/view/echart_analyze/dialog_jjlxfb.vue b/src/view/echart_analyze/dialog_jjlxfb.vue index 190d92f..248e975 100644 --- a/src/view/echart_analyze/dialog_jjlxfb.vue +++ b/src/view/echart_analyze/dialog_jjlxfb.vue @@ -34,15 +34,11 @@ const colors = [ front: "rgba(14, 252, 255, .66)", }, ]; -const maxList = ref([ - 18000, 18000, 18000, 18000, 18000, 18000, 18000, 18000, 18000, 18000, 18000, - 18000, 18000, 18000, 18000, -]); // const valueList = [20, 53, 47, 65, 29, 11, 10]; const data = reactive({ list: [], option: {}, - Max: 20000, + Max: 8000, valueList: [ 4504, 16086, 6130, 2844, 4967, 179, 1685, 5010, 633, 569, 219, 5152, 40, 631, 536, @@ -377,80 +373,6 @@ const getOption = () => { }, }, series: [ - //阴影部分 - // { - // type: "custom", - // renderItem: function (params, api) { - // // console.log(api); - // const location = api.coord([api.value(0), api.value(1)]); - // return { - // type: "group", - // children: [ - // { - // type: "CubeBottom_1", - // shape: { - // api, - // x: location[0], - // y: location[1], - // xAxisPoint: api.coord([api.value(0), 0]), - // }, - // style: { - // fill: "rgba(103, 180, 233, .16)", - // }, - // }, - // { - // type: "CubeLeft_1", - // shape: { - // api, - // x: location[0], - // y: location[1], - // xAxisPoint: api.coord([api.value(0), 0]), - // }, - // style: { - // fill: "rgba(103, 180, 233, .04)", - // }, - // }, - // { - // type: "CubeFront_1", - // shape: { - // api, - // x: location[0], - // y: location[1], - // xAxisPoint: api.coord([api.value(0), 0]), - // }, - // style: { - // fill: "rgba(103, 180, 233, .16)", - // }, - // }, - // { - // type: "CubeRight_1", - // shape: { - // api, - // x: location[0], - // y: location[1], - // xAxisPoint: api.coord([api.value(0), 0]), - // }, - // style: { - // fill: "rgba(103, 180, 233, .08)", - // }, - // }, - // { - // type: "CubeTop_1", - // shape: { - // api, - // x: location[0], - // y: location[1], - // xAxisPoint: api.coord([api.value(0), 0]), - // }, - // style: { - // fill: "rgba(103, 180, 233, .26)", - // }, - // }, - // ], - // }; - // }, - // data: maxList.value, - // }, { xAxisIndex: 0, name: "转入人数(含同乡镇跨村聚集人口)", @@ -703,10 +625,14 @@ const setChart1 = () => { onBeforeMount(() => { setTimeout(() => { - // data.list = props.list; - // setChart1(); - // data.Max = getMaxCeilingValue(data.valueList); - // maxList.value = data.valueList.map((item) => parseInt(data.Max) * 0.9);// 生成新的数组,将每个值都替换为 data.Max 的90% + data.xxname.forEach((item,index)=>{ + props.list.forEach((itemm,indexx)=>{ + if(item==itemm.xzjd){ + data.valueList[index]=itemm.qrrs; + data.valueList2[index]=itemm.qcrs; + } + }) + }) getOption(); setChart(); }, 800); diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index b6286f3..8291807 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -1055,7 +1055,7 @@ const draw = () => { map.removeOverlay(currentMarker); } let drawScene = new DrawScene(map, { - noLimit: true, + noLimit: false, }); let polygon = new PolygonDraw(drawScene, { hideTip: true, // 隐藏绘制提示