From c658f7289583e2d39b70b548d8b26c7cf1ad214f Mon Sep 17 00:00:00 2001 From: yjl <1490736767@qq.com> Date: Wed, 15 Mar 2023 10:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=94=E7=A4=BA=E5=B9=B3=E5=8F=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/config.js | 2 +- src/components/map/gd-map.vue | 71 +-- .../electricityManage/devManage.vue | 35 +- .../equipmentCenter/waterManage/devManage.vue | 35 +- .../personModule/administration.vue | 4 +- .../panoramicView/panoramicManage.vue | 441 ++++++++++-------- .../gantryCrane/equipmentRecords.vue | 353 ++++++++------ 7 files changed, 569 insertions(+), 372 deletions(-) diff --git a/public/js/config.js b/public/js/config.js index e7fb5161..a51c2bf6 100644 --- a/public/js/config.js +++ b/public/js/config.js @@ -20,7 +20,7 @@ var PROJECT = { } -var PROJECT_TYPE = PROJECT.local_test +var PROJECT_TYPE = PROJECT.online_zjsj var headerShow = true; // 是否显示头部 var tabsShow = true; // 是否显示tabs diff --git a/src/components/map/gd-map.vue b/src/components/map/gd-map.vue index d3f575ef..fa9318a6 100644 --- a/src/components/map/gd-map.vue +++ b/src/components/map/gd-map.vue @@ -10,7 +10,7 @@ >
- {{$t('message.alarmValueSet.gdAddress')}}: + {{ $t('message.alarmValueSet.gdAddress') }}: - {{$t('message.alarmValueSet.longitude')}}: + {{ $t('message.alarmValueSet.longitude') }}: - {{$t('message.alarmValueSet.latitude')}}: + {{ $t('message.alarmValueSet.latitude') }}: - {{$t('message.alarmValueSet.submit')}} + {{ $t('message.alarmValueSet.submit') }}
@@ -50,58 +50,63 @@ export default { default: {} } }, - name: "gd-map", + name: 'gd-map', data() { return { coordinateInfo: { - city:"", - lng: "", - lat: "" + city: '', + lng: '', + lat: '' }, map: {}, auto: {}, placeSearch: {}, dialogVisible: true - }; + } }, mounted() { // console.log("过来了吗", this.addProjectForm); this.coordinateInfo.city = this.addProjectForm.areaName - this.coordinateInfo.lng = this.addProjectForm.longitude + this.coordinateInfo.lng = this.addProjectForm.longitude this.coordinateInfo.lat = this.addProjectForm.latitude this.$nextTick(() => { - this.initMap(); - }); + this.initMap() + }) }, - + methods: { initMap() { //地图加载 - this.map = new AMap.Map("container", { + this.map = new AMap.Map('container', { resizeEnable: true, - center:[ this.addProjectForm.longitude != "" ? this.addProjectForm.longitude : "112.5", - this.addProjectForm.latitude != "" ? this.addProjectForm.latitude : "23" - ] - }); + center: [ + this.addProjectForm.longitude != '' + ? this.addProjectForm.longitude + : '112.5', + this.addProjectForm.latitude != '' + ? this.addProjectForm.latitude + : '23' + ] + }) //输入提示 var autoOptions = { - input: "tipinput" - }; - this.auto = new AMap.Autocomplete(autoOptions); + input: 'tipinput' + } + this.auto = new AMap.Autocomplete(autoOptions) this.placeSearch = new AMap.PlaceSearch({ map: this.map - }); //构造地点查询类 - AMap.event.addListener(this.auto, "select", this.select); //注册监听,当选中某条记录时会触发 - this.map.on("click", e => { - this.coordinateInfo.lng = e.lnglat.getLng(); - this.coordinateInfo.lat = e.lnglat.getLat(); + }) //构造地点查询类 + AMap.event.addListener(this.auto, 'select', this.select) //注册监听,当选中某条记录时会触发 + this.map.on('click', (e) => { + this.coordinateInfo.lng = e.lnglat.getLng() + this.coordinateInfo.lat = e.lnglat.getLat() // console.log('您在 [ ' + e.lnglat.getLng() + ',' + e.lnglat.getLat() + ' ] 的位置单击了地图!'); - }); + }) }, select(e) { - console.log("select", e); - this.placeSearch.setCity(e.poi.adcode); - this.placeSearch.search(e.poi.name); //关键字查询查询 + console.log('select', e) + this.placeSearch.setCity(e.poi.adcode) + this.placeSearch.search(e.poi.name) //关键字查询查询 }, search() { // console.log('a', e.poi.adcode, 'name', e.poi.name, '----------placeSearch', this.placeSearch) @@ -109,13 +114,13 @@ export default { // this.placeSearch.search(e.poi.name); //关键字查询查询 }, submit() { - this.$emit("save", this.coordinateInfo); + this.$emit('save', this.coordinateInfo) }, closeMap() { - this.$emit("closeMap", false); + this.$emit('closeMap', false) } } -}; +} \ No newline at end of file