From 4c00d4aaf015fc5afcea605d1144526a9de538fa Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 17 一月 2025 11:47:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/index.vue | 113 ++++++++++++++++++++++++++++++++++----------------------
1 files changed, 69 insertions(+), 44 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 614cabe..d015b96 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -71,48 +71,53 @@
:countExceptionProjectData="countExceptionProjectData"
/>
</div>
- <!-- 浠e姙浜嬮」 -->
+ <!-- 寰呭姙浜嬮」 -->
<div class="flex">
<div class="flex_card">
<el-card>
- <NoticeTable style="height: 360px" />
+ <NoticeTable style="height: 340px" />
</el-card>
</div>
<!-- 娑堟伅閫氱煡 -->
<div class="flex_card">
<el-card>
- <TidingsTable style="height: 360px" />
+ <TidingsTable style="height: 340px" />
</el-card>
</div>
<!-- 鍦板浘 -->
</div>
- <div class="mt-[10px] min-w-[1600px]">
+ <div style="margin-top: 10px">
<el-card>
<div>
<div class="search-form">
- <el-form :model="searchForm" inline>
- <el-form-item label=" ">
+ <el-form :model="searchForm" inline size="small">
+ <el-form-item label="">
<el-input
v-model="searchForm.name"
clearable
placeholder="璇疯緭鍏ラ」鐩悕绉版垨椤圭洰浠g爜"
- style="width: 180px"
+ style="width: 240px"
/>
</el-form-item>
<el-form-item style="margin-right: 0px">
- <el-button icon="Search" type="primary" @click="searchList"
+ <el-button
+ clearable
+ @clear="searchList"
+ icon="Search"
+ type="primary"
+ @click="searchList"
>鎼滅储</el-button
>
<el-button icon="Refresh" @click="mapQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
- <div class="flex w-full h-[500px] border border-[#DBDEEA]">
+ <div class="map_div">
<Map
id="DangerSourceId"
ref="mapRef"
:is-show-control="true"
- :list-type="true"
+ :list-type="false"
:map-list="tableDatas"
:map-type="true"
class="w-full h-full border-r border-[#DBDEEA]"
@@ -133,6 +138,8 @@
import NoticeTable from "./components/noticeTable.vue";
import TidingsTable from "./components/tidingsTable.vue";
import Map from "./components/Map/index.vue";
+import { getCalculatioln, getAbnormalData } from "@/api/login";
+import { searchByKey } from "@/api/projectEngineering/projectInfo";
export default {
name: "Index",
data() {
@@ -140,24 +147,18 @@
queryParams: {},
timeMerge: [],
sys_administrative_divisions: [],
- calculation: [],
countExceptionProjectData: {},
searchForm: {},
- tableDatas: [
- {
- name: "灏勬椽甯�",
- value: 105.37281,
- lat: 30.87145,
- lon: 105.37281,
- id: "222222222",
- },
- {
- name: "xxxx",
- value: 105.22332,
- lat: 31.52421,
- lon: 106.22332,
- id: "11112",
- },
+ tableDatas: [],
+ calculation: [
+ { text: "鍌�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "寤�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "鐪�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "甯�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "鏂�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "绔�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "鍘�", mun: 0, statistics: "", statisticsMun: "0" },
+ { text: "鏅�", mun: 0, statistics: "", statisticsMun: "0" },
],
};
},
@@ -168,6 +169,10 @@
TidingsTable,
Map,
},
+ created() {
+ this.handleQuery();
+ this.searchList();
+ },
methods: {
dataPickerChange(val) {
if (!val) {
@@ -176,20 +181,19 @@
return;
}
- this.queryParams.startTime = timeMerge[0];
- this.queryParams.endTime = timeMerge[1];
+ this.queryParams.startTime = this.timeMerge[0];
+ this.queryParams.endTime = this.timeMerge[1];
},
handleQuery() {
- console.log(queryParams);
const obj = {
- startDate: queryParams.startTime,
- endDate: queryParams.endTime,
- areaCode: queryParams.area,
- minInvestment: queryParams.start,
- maxInvestment: queryParams.end,
+ startDate: this.queryParams.startTime,
+ endDate: this.queryParams.endTime,
+ areaCode: this.queryParams.area,
+ minInvestment: this.queryParams.start,
+ maxInvestment: this.queryParams.end,
};
- this.getCalculatioln(obj).then((res) => {
+ getCalculatioln(obj).then((res) => {
const arr = res.data.proPhaseCountVO?.concat(res.data.impTypeCountVO);
const newArr = arr.map((item) => ({
text: item.text,
@@ -197,7 +201,6 @@
statistics: item.type,
statisticsMun: item.amount,
}));
-
// 鍒涘缓涓�涓璞★紝浠ヤ究鏍规嵁 text 灞炴�у揩閫熸煡鎵� newArr 涓殑瀵硅薄
const newArrLookup = newArr.reduce((lookup, item) => {
lookup[item.text] = item;
@@ -205,15 +208,34 @@
}, {});
// 鏇存柊 calculation 鏁扮粍锛屼繚鎸佸叾鍘熷椤哄簭
- calculation.value = calculation.value.map((item) => {
+ this.calculation = this.calculation.map((item) => {
const newItem = newArrLookup[item.text];
return newItem ? newItem : item; // 濡傛灉 newItem 瀛樺湪锛屽垯杩斿洖 newItem锛屽惁鍒欒繑鍥炲師濮� item
});
});
- abnormalData(obj);
+ this.abnormalData(obj);
},
+ // 鍦板浘鎼滅储
+ searchList() {
+ var _this = this;
+ searchByKey({ wordKey: this.searchForm.name }).then((res) => {
+ if (res.code == 200) {
+ if (res.data.length > 0) {
+ // this.$refs["mapRef"].showProjectInfo(res.data);
+ // _this.tableDatas = res.data;
+ setTimeout(() => {
+ _this.$refs["mapRef"].makeAllMask(res.data);
+ }, 2000);
+ } else {
+ _this.$message.error("鏈煡璇㈠埌瀵瑰簲椤圭洰");
+ }
+ } else {
+ _this.$message.error(res.msg);
+ }
+ });
+ },
// 鑾峰彇寮傚父鏁版嵁
async abnormalData(obj) {
const res = await getAbnormalData(obj);
@@ -244,12 +266,6 @@
};
this.timeMerge = [];
this.handleQuery();
- },
-
- // 鍦板浘鎼滅储
- async searchList() {
- // await search()
- this.mapRef.moveTo(105.37281, 30.87145);
},
mapQuery() {},
},
@@ -286,6 +302,9 @@
}
.search-form {
+ padding: 5px;
+ position: absolute;
+ z-index: 999;
display: flex;
justify-content: flex-end;
}
@@ -344,5 +363,11 @@
gap: 10px;
font-size: 12px;
}
+.map_div {
+ display: flex;
+ width: 100%;
+ height: 500px;
+ border: #dbdeea;
+}
</style>
--
Gitblit v1.8.0