From 22b9e68e17d1a75c8ac665920c5e53644cc0de5a Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Thu, 16 May 2024 11:46:43 +0800 Subject: [PATCH] =?UTF-8?q?flat:=20=E5=9C=B0=E5=9B=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.hengshui | 4 +- .env.production | 4 +- src/components/map/selectLocation2.vue | 57 +++++++- src/main.js | 4 +- .../tenant/mission/Dialog/CopyMission.vue | 30 +++- src/views/tenant/works/Dialog/CopyMission.vue | 30 +++- src/views/util/mission-view.vue | 14 +- src/views/util/post-view.vue | 130 +++++++++++------- src/views/util/work-view.vue | 14 +- 10 files changed, 217 insertions(+), 74 deletions(-) diff --git a/.env.development b/.env.development index 601eae2..3dc3dc8 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ VUE_APP_SITE='default' VUE_APP_LOGIN_ERROR = http://10.160.7.216:9920/casserver/login VUE_APP_REPLACE_STR = {"{oss_file_url}": "http://10.165.0.173:8000", "https://dy12333.org.cn/api/jobslink-api/front/file": "http://10.165.0.173:8000/jobslink-api/front/file"} -VUE_APP_LOGIN_NEXT = 'http://10.160.7.216:9920/casserver/login?service=http://10.165.0.173/manage/login&stService=http%3A%2F%2F10.165.0.173%2Fmanage%2Flogin' -VUE_APP_SUPPER_MAP = 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768', +VUE_APP_LOGIN_NEXT = http://10.160.7.216:9920/casserver/login?service=http://10.165.0.173/manage/login&stService=http%3A%2F%2F10.165.0.173%2Fmanage%2Flogin +VUE_APP_SUPPER_MAP = http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768 diff --git a/.env.hengshui b/.env.hengshui index 62e1215..45d108c 100644 --- a/.env.hengshui +++ b/.env.hengshui @@ -1,5 +1,5 @@ VUE_APP_SITE='hengshui' VUE_APP_LOGIN_ERROR = http://10.160.7.216:9920/casserver/login VUE_APP_REPLACE_STR = {"{oss_file_url}": "http://10.165.0.173:8000", "https://dy12333.org.cn/api/jobslink-api/front/file": "http://10.165.0.173:8000/jobslink-api/front/file"} -VUE_APP_LOGIN_NEXT = 'http://10.160.7.216:9920/casserver/login?service=http://10.165.0.173/manage/login&stService=http%3A%2F%2F10.165.0.173%2Fmanage%2Flogin' -VUE_APP_SUPPER_MAP = 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768', +VUE_APP_LOGIN_NEXT = http://10.160.7.216:9920/casserver/login?service=http://10.165.0.173/manage/login&stService=http%3A%2F%2F10.165.0.173%2Fmanage%2Flogin +VUE_APP_SUPPER_MAP = http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768 diff --git a/.env.production b/.env.production index d918ddc..710fba2 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ VUE_APP_SITE='default' VUE_APP_LOGIN_ERROR = http://10.160.7.216:9920/casserver/login VUE_APP_REPLACE_STR = {"{oss_file_url}": "http://10.165.0.173:8000", "https://dy12333.org.cn/api/jobslink-api/front/file": "http://10.165.0.77:8000/jobslink-api/front/file"} -VUE_APP_LOGIN_NEXT = 'http://10.160.7.216:9920/casserver/login?service=http://10.165.0.54:8300/manage/login&stService=http%3A%2F%2F10.165.0.54%3A8300%2Fmanage%2Flogin' -VUE_APP_SUPPER_MAP = 'http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768', +VUE_APP_LOGIN_NEXT = http://10.160.7.216:9920/casserver/login?service=http://10.165.0.54:8300/manage/login&stService=http%3A%2F%2F10.165.0.54%3A8300%2Fmanage%2Flogin +VUE_APP_SUPPER_MAP = http://10.165.0.44:1205/proxy/rest/maps/c02c6f51f3ab4190bffd5e3e54cf5ac4/111013e9067749488d44841208771768 diff --git a/src/components/map/selectLocation2.vue b/src/components/map/selectLocation2.vue index 08cb627..05ee3b1 100644 --- a/src/components/map/selectLocation2.vue +++ b/src/components/map/selectLocation2.vue @@ -1,6 +1,13 @@ @@ -45,14 +52,18 @@ import { GetFeaturesByGeometryParameters } from '@supermap/iclient-ol'; +console.log(process.env.VUE_APP_SUPPER_MAP) export default { name: "uMapView", props: { + placeholder: String, latitude: { - required: true, + required: false, + default: 31.126855, }, longitude: { - required: true, + required: false, + default: 104.397894, }, zoom: { type: Number, @@ -88,6 +99,19 @@ export default { type: Boolean, required: false, default: false, + }, + isCanEdit: { + type: Boolean, + required: false, + default: false, + }, + address: { + required: false, + default: '', + }, + type: { + required: false, + default: 'custom', } }, data() { @@ -105,10 +129,14 @@ export default { overlay: null, // 控制参数 isShowToolTip: false, + addressLocation: '' }; }, mounted() { this.initMap() + if (this.address) { + this.addressLocation = this.address + } if (this.flagTip) { this.createHelpTooltip() } @@ -162,9 +190,18 @@ export default { } this.$emit('regionchange', e.pixel) }); - this.map.on('singleclick', (e) => { - this.$emit('clickMap', this.coordinate) - }); + this.ceateMarker([this.longitude, this.latitude]) + if (this.type !== 'view') { + this.map.on('singleclick', (e) => { + this.$emit('addAddress', { + address: this.addressLocation, + lng: e.coordinate[0], + lat: e.coordinate[1] + }) + this.ceateMarker(e.coordinate) + }); + } + // if (this.open) { // this.addFeature([{ @@ -228,6 +265,7 @@ export default { POP: 1, CAPITAL: 'test' }); + this.addPointsSource.clear() // 将特征添加到矢量图层 this.addPointsSource.addFeature(pointFeature); // 确保更新地图视图以显示新的标点 @@ -314,6 +352,11 @@ export default { offset: [-30, 20], positioning: 'center-left' }); + }, + inputAddress(val) { + if (this.type !== 'view') { + this.$emit('input', val) + } } } } @@ -322,7 +365,7 @@ export default {