From a518f6a1e0d1eca28adf6d4d1c82ee30cb9de398 Mon Sep 17 00:00:00 2001
From: yuzongping <835949940@qq.com>
Date: Thu, 12 Jun 2025 10:15:58 +0800
Subject: [PATCH] =?UTF-8?q?gis=E5=8A=A0=E5=85=A5=E5=9C=B0=E5=8C=BA?=
=?UTF-8?q?=E5=92=8C=E5=B9=B4=E4=BB=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/index.js | 2 +-
src/views/capital/index.html | 11 +++++++++
src/views/capital/index.js | 45 +++++++++++++++++++++++++++++++-----
src/views/capital/index.scss | 22 ++++++++++++++++++
4 files changed, 73 insertions(+), 7 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index 202ac64..714edfb 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,7 +6,7 @@ const routes = [
{
path: '/',
name: 'root',
- redirect: '/property'
+ redirect: '/capital'
},
// 资金
{
diff --git a/src/views/capital/index.html b/src/views/capital/index.html
index 60bccc6..cbf40e0 100644
--- a/src/views/capital/index.html
+++ b/src/views/capital/index.html
@@ -16,6 +16,17 @@
+
+
+
+ {{ centerYear }}
+
+
+
+
diff --git a/src/views/capital/index.js b/src/views/capital/index.js
index 0ccaeb6..89c5a34 100644
--- a/src/views/capital/index.js
+++ b/src/views/capital/index.js
@@ -59,6 +59,32 @@ export default {
},
data () {
return {
+ financeSummary: {
+ funds: 0, // 资金
+ totalAssets: 0, // 资产
+ totalResource: 0, // 资源
+ income: 0, // 经营收入
+ outcome: 0, // 经营支出
+ overhead: 0, // 管理费用
+ revenue: 0, // 发包收入
+ otherIncome: 0, // 其他收入
+ otherOutcome: 0, // 其他支出
+ },
+ financeSummaryOverview: {
+ zeroIncomeBook: 0, // 0收入组织
+ areaTotalIncome: 0, // 区收入总和
+ townAvgIncome: 0, // 镇平均收入
+ bookAvgIncome: 0, // 组织平均收入
+ },
+ //搜索栏参数
+ centerYear: new Date().getFullYear(),
+ yearList: [
+ new Date().getFullYear(),
+ new Date().getFullYear() - 1,
+ new Date().getFullYear() - 2,
+ new Date().getFullYear() - 3,
+ new Date().getFullYear() - 4,
+ ],
addrText: [100,],
deptTreeProps: {
checkStrictly: true,
@@ -111,6 +137,12 @@ export default {
});
},
methods: {
+ //切换年份
+ yearDropdown (item) {
+ this.queryParams.year = item;
+ this.centerYear = item;
+ this.getData(YEAR_CHANGED);
+ },
// 绘制地图
drawMap (node, isLocated) { // isLocated 控制地图是否跳转
const dept = node.data;
@@ -128,8 +160,8 @@ export default {
this.addDeptLayer(dept.children, 'yellow.png');
}
if (isLocated) {
- this.map.getView().setZoom(9);
- this.map.getView().setCenter(fromLonLat([dept.lng, dept.lat]));
+ gis.getMapContainer().getView().setZoom(9);
+ gis.getMapContainer().getView().setCenter(fromLonLat([dept.lng, dept.lat]));
}
} else if (dept.deptLevel === '4') {
this.countyId = dept.id;
@@ -179,11 +211,11 @@ export default {
deptList.push(dept);
this.addDeptLayer(deptList, 'yellow.png');
if (isLocated) {
- this.map.getView().setCenter(fromLonLat([dept.lng, dept.lat]));
+ gis.getMapContainer().getView().setCenter(fromLonLat([dept.lng, dept.lat]));
}
}
if (isLocated) {
- this.map.getView().setZoom(15);
+ gis.getMapContainer().getView().setZoom(15);
}
// this.villageIds = this.findLeafNodeIds(dept);
} else if (dept.deptLevel === '1') {
@@ -196,7 +228,7 @@ export default {
// 添加组的坐标点图层,并且跳转到图层的中心点位置
this.addGroupPointLayer(dept.id, isLocated);
if (isLocated) {
- this.map.getView().setZoom(17);
+ gis.getMapContainer().getView().setZoom(17);
}
// this.villageIds = this.findLeafNodeIds(dept);
}
@@ -270,7 +302,7 @@ export default {
if (!mask)
mask = ALL_CHANGED;
financeSummary(this.queryParams).then((resp) => {
- let data = resp.data;
+ let data = resp;
this.financeSummary.funds = data.funds;
this.financeSummary.totalAssets = data.totalAssets;
this.financeSummary.totalResource = data.totalResource;
@@ -310,6 +342,7 @@ export default {
this.incomeTownRankList = resp.data;
});
financeSummaryOverview(this.queryParams).then((resp) => {
+ console.log(resp, 777);
let data = resp.data;
this.financeSummaryOverview.zeroIncomeBook = data.zeroIncomeBook;
this.financeSummaryOverview.areaTotalIncome = data.areaTotalIncome;
diff --git a/src/views/capital/index.scss b/src/views/capital/index.scss
index 11352e6..d0c31cf 100644
--- a/src/views/capital/index.scss
+++ b/src/views/capital/index.scss
@@ -5,4 +5,26 @@
left: 0;
right: 0;
bottom: 0;
+}
+
+.select_address {
+ position: absolute;
+ left: 480px;
+ top: 112px;
+ height: 44px;
+ border: 2px solid #3181F6;
+}
+
+.select_wrap {
+ width: 88x;
+ height: 44px;
+ background: rgba(3, 16, 40, 0.2);
+ border: 2px solid #3181F6;
+ position: absolute;
+ left: 710px;
+ top: 112px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding-left: 14px;
}
\ No newline at end of file