From 168b982ca802720893bef8625a36ea284bfae7b1 Mon Sep 17 00:00:00 2001 From: yanfeiyong <2060201549@qq.com> Date: Fri, 11 Apr 2025 09:16:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/views/components/ProjectDetails/Basic.vue | 17 ++-- .../ProjectDetails/Projectpicturetwo.vue | 28 ++---- src/views/components/ProjectDetails/luotu.vue | 74 +++++---------- src/views/components/analysis/map.vue | 89 ++++++++++++++++--- src/views/components/analysis/projectList.vue | 43 +++++---- vue.config.js | 4 +- 7 files changed, 148 insertions(+), 109 deletions(-) diff --git a/.env.production b/.env.production index d0986ca..97cacc7 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,4 @@ VUE_APP_TITLE = 苏州工业园区工业上楼管理系统 ENV = 'production' # 苏州工业园区工业上楼管理系统/生产环境 -# VUE_APP_BASE_API = 'http://39.101.188.84:7071' +VUE_APP_BASE_API = 'http://39.101.188.84:7071' diff --git a/src/views/components/ProjectDetails/Basic.vue b/src/views/components/ProjectDetails/Basic.vue index 941680a..bdef311 100644 --- a/src/views/components/ProjectDetails/Basic.vue +++ b/src/views/components/ProjectDetails/Basic.vue @@ -13,7 +13,7 @@ style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> 编辑 - 编辑 @@ -52,7 +52,7 @@ - + 落图 @@ -209,9 +209,8 @@ - - + + @@ -277,6 +276,7 @@ export default { introduction: '', fj: '', jsjd: '', + }, rules: { name: [ @@ -363,6 +363,13 @@ export default { methods: { checkPermi, checkRole, + // 添加处理地图选择的方法 + handleMapConfirm(location) { + this.form.jsdd = location.address; // 设置建设地点 + this.form.lng = location.lng; // 设置经度 + this.form.lat = location.lat; // 设置纬度 + this.mapDialogVisible = false; // 关闭地图弹窗 + }, /** 导出按钮操作 */ handleExport() { this.download('/gysl/basicInformation/export', { diff --git a/src/views/components/ProjectDetails/Projectpicturetwo.vue b/src/views/components/ProjectDetails/Projectpicturetwo.vue index 47b5460..803bca5 100644 --- a/src/views/components/ProjectDetails/Projectpicturetwo.vue +++ b/src/views/components/ProjectDetails/Projectpicturetwo.vue @@ -2,27 +2,13 @@
- - + +
-
+
{{ item.name }}
{{ item.address }}
@@ -54,6 +40,7 @@ export default { basemaps: [ { id: 2021, + chinaCRS: "GCJ02", pid: 10, name: "高德电子", icon: "img/basemaps/gaode_vec.png", @@ -62,6 +49,9 @@ export default { show: true } ], + center: { lat: 31.2304, lng: 120.6184 }, + zoom: 10, + chinaCRS: 'GCJ02', center: { lat: 31.3256, lng: 120.7457 }, zoom: 16, minZoom: 15, @@ -139,7 +129,7 @@ export default { // 定位到搜索结果 centerMap(item) { const [lng, lat] = item.location.split(',').map(Number); - + // 更新输入框的值 this.keyword = item.name; diff --git a/src/views/components/ProjectDetails/luotu.vue b/src/views/components/ProjectDetails/luotu.vue index d9c0c3f..5ea7450 100644 --- a/src/views/components/ProjectDetails/luotu.vue +++ b/src/views/components/ProjectDetails/luotu.vue @@ -41,6 +41,7 @@ import axios from 'axios'; const attributionHtml = `©2024 高德软件- 审图号:GS(2021)6375号 - 甲测资字11111093 - 服务条款 ` + export default { data() { const basePathUrl = window.basePathUrl || ""; @@ -48,53 +49,21 @@ export default { configUrl: basePathUrl + "config/config.json", mapOptions: { copyright: false, - // basemaps: [ - // { - // id: 2021, - // pid: 10, - // name: "高德电子", - // icon: "img/basemaps/gaode_vec.png", - // type: "gaode", - // layer: "vec", - // show: true - // } - // ], basemaps: [ { - name: "高德地图", + id: 2021, + chinaCRS: "GCJ02", + pid: 10, + name: "高德电子", + icon: "img/basemaps/gaode_vec.png", type: "gaode", layer: "vec", - show: true, - // maxZoom: 21, - // maxNativeZoom: 18, - attribution: attributionHtml - }, - { - name: "高德卫星", - type: "group", - layers: [ - { - type: "gaode", - layer: "img_d" - }, - { - type: "gaode", - layer: "img_z" - } - ], - attribution: attributionHtml - }, - { - name: "高德大字体地图", - type: "gaode", - layer: "vec", - bigfont: true, - attribution: attributionHtml + show: true } ], center: { lat: 31.2304, lng: 120.6184 }, zoom: 10, - CRS: "BAIDU" + chinaCRS: 'GCJ02' }, map: null, floatingPanelVisible: false, @@ -149,15 +118,21 @@ export default { }, confirmPoint() { - if (this.pointForm.name) { - this.selectedPlaceName = this.pointForm.name; - } else if (this.pointForm.address) { - this.selectedPlaceName = this.pointForm.address; + if (!this.pointForm.address) { + this.$message.warning('请先落点选择地址'); + return; } + + // 通知父组件关闭弹窗并传递地址信息 + this.$emit('confirm-selection', { + address: this.pointForm.address, + lng: this.pointForm.lng, + lat: this.pointForm.lat + }); + this.hideFloatingPanel(); this.$message.success('地点选择成功'); }, - // 逆地理编码 - 根据经纬度获取地址 reverseGeocode() { if (!this.pointForm.lat || !this.pointForm.lng) return; @@ -187,7 +162,10 @@ export default { } else { this.$message.warning('未能获取详细地址信息'); } - }).catch().finally(() => { + }).catch(error => { + console.error('逆地理编码失败:', error); + this.$message.error('获取地址信息失败'); + }).finally(() => { this.loadingAddress = false; }); }, @@ -202,12 +180,6 @@ export default { }, toSearch() { - if (!this.keyword.trim()) { - this.$message({ - }); - return; - } - let params = { key: this.gaodeKey, keywords: this.keyword, diff --git a/src/views/components/analysis/map.vue b/src/views/components/analysis/map.vue index cbf25f9..c06967a 100644 --- a/src/views/components/analysis/map.vue +++ b/src/views/components/analysis/map.vue @@ -1,28 +1,59 @@ @@ -31,12 +62,8 @@ export default { position: relative; } -.leftdiv { - width: 35%; - height: 24rem; - /* background-color: #fff; */ - padding: 1rem; - position: absolute; +.containertwo { + position: relative; } .mapareaone { @@ -46,6 +73,44 @@ export default { position: relative; } +/* 控制按钮样式 */ +.collapse-control { + position: absolute; + left:-1.5rem; + top: 12.5rem; + width: auto; + height: 2rem; + border-radius: 0 4px 4px 0; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + z-index: 20; + transition: all 0.3s ease; +} + +.control-icon { + width: 3.5rem; + height: 3.5rem; +} + +.leftdiv { + width: 36%; + height: 27rem; + position: absolute; + left: 0rem; + top: 0rem; + background: #FFFFFF; + border-radius: 0.5rem; + transition: all 0.3s ease; + z-index: 10; +} + +.mainarea { + height: 100%; + overflow: auto; +} + .blueicon { width: 20rem; height: 20rem; diff --git a/src/views/components/analysis/projectList.vue b/src/views/components/analysis/projectList.vue index 8533116..0d36606 100644 --- a/src/views/components/analysis/projectList.vue +++ b/src/views/components/analysis/projectList.vue @@ -12,37 +12,38 @@
- 状态: + 状态 {{ xzflMap[item.xzfl] }}
- 总投资额: - {{ item.ztze }} 万元 + 总投资额 + {{ item.ztze || 0 }} 万元
- 总用地面积: - {{ item.zydmj }} 平方米 + 建筑面积 + {{ item.zydmj || 0 }} 平方米
- 所在区域: + 所在区域 {{ ssgnqMap[item.ssgnq] }}
- 联系人: + 联系人 {{ item.projectLeader }}
- 联系方式: + 联系方式 {{ item.phone }}
+
查看更多
@@ -96,7 +97,7 @@ export default { xzfl: '', name: '', xmfrdwxz: '', - dateRange: '', // 日期范围 + dateRange: '', status: '' }, }; @@ -142,28 +143,28 @@ export default { const id = row.id || this.ids[0]; this.$router.push({ path: `/manage-add/${id}`, query: { action: type } }); }, + getInfotwo() { + this.$router.push({ path: `/manage` }); + }, }, }; \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index bd9d4f8..11b8b8c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -37,8 +37,8 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://192.168.0.107:7071/`, - // target: `http://39.101.188.84:7071/`, + // target: `http://192.168.0.107:7071/`, + target: `http://39.101.188.84:7071/`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''