Commit 58908ac2 authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改网格事件日期为动态昨天

parent 1ccd808e
<!DOCTYPE html><html id=html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge, chrome=1"><title>南东城运第一综合网格工作站</title><style>html { <!DOCTYPE html><html id=html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge, chrome=1"><title>南东城运第一综合网格工作站</title><style>html {
font-size: 16vh; font-size: 16vh;
}</style><link href=./static/css/app.dc6b55404189b7a71fee0fcdbdf1904c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.4a2448573f8458d0d93f.js></script><script type=text/javascript src=./static/js/vendor.64f49a750b0f66cbba6d.js></script><script type=text/javascript src=./static/js/app.315e4e31ad1fe207d395.js></script></body><script src=./static/SMap.min.js></script><script src=./static/Plugins.min.js></script></html> }</style><link href=./static/css/app.376a734a0d8779d391342cfa939dacbf.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3dc1820374cd7ed2f9ef.js></script><script type=text/javascript src=./static/js/vendor.64f49a750b0f66cbba6d.js></script><script type=text/javascript src=./static/js/app.22d639f47cfa07342a02.js></script></body><script src=./static/SMap.min.js></script><script src=./static/Plugins.min.js></script></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([7],{afto:function(t,i){},jkqj:function(t,i,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=o("Dd8w"),e=o.n(n),a=window,r=a.SMap,s=a.Plugins,u={name:"MonitorMap",data:function(){return{map:null}},mounted:function(){this.$nextTick(this.initMap)},computed:{sizeRate:function(){return Math.floor(1.48*screen.height/100/11)}},methods:{initMap:function(){var t=this;this.map=new r.Map("mapContainer",{viewMode:"2D",mapStyle:"smap://styles/dark"}).on(r.MapEvent.maploaded,function(){t.hideCommunity(),t.addListener(),t.$emit("complete")})},hideCommunity:function(){this.map.hideXQ_Poly(),this.map.hideXQ_Point(),this.map.hideMPZ()},showCommunity:function(){this.map.showXQ_Poly(),this.map.showXQ_Point(),this.map.showMPZ()},addListener:function(){var t=this;this.map.on(r.MapEvent.click,function(i,o){var n=o.mapPoint,e=n.x,a=n.y;console.log([e,a]),i.hitTest(o).then(function(i){i.results&&i.results.length>0&&t.$emit("event",i.results[0]&&i.results[0].graphic.attributes)})})},addPoint:function(t){var i=t.key,o=t.data,n=t.labelKey,e=void 0===n?null:n,a=t.icon,r=void 0===a?"test.png":a,s=t.size,u=void 0===s?14:s,d=t.color;if(this.map){var l=this.getMapPoints({data:o,key:i,labelKey:e,icon:r,size:u,color:d});return this.map.add(l),l}},remove:function(t){this.map&&t&&this.map.remove(t)},setFilter:function(t){if(0!==t.length){var i=t.map(function(t){return"sect_name_ = '"+t+"'"});this.map.setFilter("wg_gis_xq_point",i.join(" or ")),this.map.setFilter("wg_gis_mpz",i.join(" or ")),this.map.setFilter("wg_gis_xq_poly",i.join(" or "))}},getMapPoints:function(t){var i=t.data,n=void 0===i?[]:i,a=t.key,s=t.labelKey,u=t.icon,d=t.size,l=t.color,c=void 0===l?"#47B3FF":l;return n.map(function(t){var i={icon:new r.Icon({size:Array.isArray(t.size||d)?new r.Size(t.size[0]||d[0],t.size[1]||d[1]):new r.Size(t.size||d,t.size||d),image:o("g2Y0")("./"+(t.icon||u))}),attributes:e()({key:a},t),position:[t.communityMinx||t.X||t.x||t.gpsx,t.communityMiny||t.Y||t.y||t.gpsy,0]};return s&&(i.label=new r.Label({text:(t[s]||t[a])+"",size:d,color:c})),new r.Marker(i)})},focus:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6;this.map&&t&&i?this.map.setZoomAndCenter(o,[t,i]):console.error("传入的坐标点不能为空")},zoomIn:function(){this.map.zoomIn()},zoomOut:function(){this.map.zoomOut()},addPolygon:function(t){var i=t.paths,o=t.fillColor,n=void 0===o?"rgba(255,255,255,.3)":o,e=t.strokeColor,a=void 0===e?"transparent":e,s=t.attributes,u=void 0===s?{}:s,d=t.style,l=void 0===d?"solid":d,c=t.strokeWeight,m=void 0===c?1:c,p=t.label,h=void 0===p?null:p,v=new r.Polygon({paths:i.map(function(t){return new r.LngLat(t[0],t[1])}),attributes:u,fillColor:n,style:l,strokeColor:a,strokeStyle:l,strokeWeight:m,label:h});return this.map.add(v),v},addPolyLine:function(t){var i=t.paths,o=t.attributes,n=void 0===o?{}:o,e=t.strokeColor,a=void 0===e?"rgba(51,145,255,.6)":e,s=t.width,u=void 0===s?2:s,d=new r.Polyline({path:i.map(function(t){return new r.LngLat(t[0],t[1])}),attributes:n,cap:"square",strokeColor:a,style:"solid",lineJoin:"round",width:u});return this.map.add(d),d},addBoundary:function(t){var i=t.name,o=t.weight,n=void 0===o?10:o,e=t.count,a=void 0===e?10:e,r=t.color,u=void 0===r?"rgba(51,145,255,.6)":r,d=t.maskColor,l={boundaryType:"jd_boundary",boundaryDefinition:"name like '%"+i+"%'",boundarydistance:n,bounarycount:a,boundaryColor:u,maskColor:void 0===d?[0,17,33,.9]:d},c=new s.MaskBoundary(this.map.view);return c.add(l),c}}},d={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{attrs:{id:"mapContainer"}})},staticRenderFns:[]};var l=o("VU/8")(u,d,!1,function(t){o("afto"),o("udAJ")},"data-v-7cca37c4",null);i.default=l.exports},udAJ:function(t,i){}});
//# sourceMappingURL=7.2adc06a626d61874b5da.js.map
\ No newline at end of file
This diff is collapsed.
webpackJsonp([7],{"4CER":function(t,i){},EOBP:function(t,i){},jkqj:function(t,i,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=o("Dd8w"),e=o.n(n),a=window,r=a.SMap,s=a.Plugins,u={name:"MonitorMap",data:function(){return{map:null}},mounted:function(){this.$nextTick(this.initMap)},computed:{sizeRate:function(){return Math.floor(1.48*screen.height/100/11)}},methods:{initMap:function(){var t=this;this.map=new r.Map("mapContainer",{viewMode:"2D",mapStyle:"smap://styles/dark"}).on(r.MapEvent.maploaded,function(){t.addListener(),t.$emit("complete")})},hideCommunity:function(){this.map.hideXQ_Poly(),this.map.hideXQ_Point(),this.map.hideMPZ()},showCommunity:function(){this.map.showXQ_Poly(),this.map.showXQ_Point(),this.map.showMPZ()},addListener:function(){var t=this;this.map.on(r.MapEvent.click,function(i,o){var n=o.mapPoint,e=n.x,a=n.y;console.log([e,a]),i.hitTest(o).then(function(i){i.results&&i.results.length>0&&t.$emit("event",i.results[0]&&i.results[0].graphic.attributes)})})},addPoint:function(t){var i=t.key,o=t.data,n=t.labelKey,e=void 0===n?null:n,a=t.icon,r=void 0===a?"test.png":a,s=t.size,u=void 0===s?14:s,l=t.color;if(this.map){var d=this.getMapPoints({data:o,key:i,labelKey:e,icon:r,size:u,color:l});return this.map.add(d),d}},remove:function(t){this.map&&t&&this.map.remove(t)},setFilter:function(t){var i=t.map(function(t){return"sect_name_ = '"+t+"'"});this.map.setFilter("wg_gis_xq_point",i.join(" or ")),this.map.setFilter("wg_gis_mpz",i.join(" or ")),this.map.setFilter("wg_gis_xq_poly",i.join(" or "))},getMapPoints:function(t){var i=t.data,n=void 0===i?[]:i,a=t.key,s=t.labelKey,u=t.icon,l=t.size,d=t.color,c=void 0===d?"#47B3FF":d;return n.map(function(t){var i={icon:new r.Icon({size:Array.isArray(t.size||l)?new r.Size(t.size[0]||l[0],t.size[1]||l[1]):new r.Size(t.size||l,t.size||l),image:o("g2Y0")("./"+(t.icon||u))}),attributes:e()({key:a},t),position:[t.communityMinx||t.X||t.x||t.gpsx,t.communityMiny||t.Y||t.y||t.gpsy,0]};return s&&(i.label=new r.Label({text:(t[s]||t[a])+"",size:l,color:c})),new r.Marker(i)})},focus:function(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6;this.map&&t&&i?this.map.setZoomAndCenter(o,[t,i]):console.error("传入的坐标点不能为空")},zoomIn:function(){this.map.zoomIn()},zoomOut:function(){this.map.zoomOut()},addPolygon:function(t){var i=t.paths,o=t.fillColor,n=void 0===o?"rgba(255,255,255,.3)":o,e=t.strokeColor,a=void 0===e?"transparent":e,s=t.attributes,u=void 0===s?{}:s,l=t.style,d=void 0===l?"solid":l,c=t.strokeWeight,m=void 0===c?1:c,p=t.label,h=void 0===p?null:p,v=new r.Polygon({paths:i.map(function(t){return new r.LngLat(t[0],t[1])}),attributes:u,fillColor:n,style:d,strokeColor:a,strokeStyle:d,strokeWeight:m,label:h});return this.map.add(v),v},addPolyLine:function(t){var i=t.paths,o=t.attributes,n=void 0===o?{}:o,e=t.strokeColor,a=void 0===e?"rgba(51,145,255,.6)":e,s=t.width,u=void 0===s?2:s,l=new r.Polyline({path:i.map(function(t){return new r.LngLat(t[0],t[1])}),attributes:n,cap:"square",strokeColor:a,style:"solid",lineJoin:"round",width:u});return this.map.add(l),l},addBoundary:function(t){var i=t.name,o=t.weight,n=void 0===o?10:o,e=t.count,a=void 0===e?10:e,r=t.color,u=void 0===r?"rgba(51,145,255,.6)":r,l=t.maskColor,d={boundaryType:"jd_boundary",boundaryDefinition:"name like '%"+i+"%'",boundarydistance:n,bounarycount:a,boundaryColor:u,maskColor:void 0===l?[0,17,33,.9]:l},c=new s.MaskBoundary(this.map.view);return c.add(d),c}}},l={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{attrs:{id:"mapContainer"}})},staticRenderFns:[]};var d=o("VU/8")(u,l,!1,function(t){o("EOBP"),o("4CER")},"data-v-29c2630c",null);i.default=d.exports}});
//# sourceMappingURL=7.d0ea0413c3a04b154142.js.map
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=a(a.s=o[i]);return b};var r={},t={25:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});n[2]=r;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+e+"."+{0:"d67c1b54497bca5732c1",1:"3dab2f03f71b0f0b1713",2:"ad27f749f3b321530af7",3:"ad4ee5a96965c56d8caf",4:"a46e55b2b83af355e6c8",5:"8d38d044dc9e96d56699",6:"b4bee5960cbbfd744133",7:"d0ea0413c3a04b154142",8:"8a6b22163b5bfcc9466a",9:"2e90654263237c67e337",10:"87620061e05ff5870743",11:"a46d5ac57625764ad2be",12:"d6456664f1e4baa71c20",13:"ae1e82db8885c816fd6b",14:"cb69db1f9056d9e7b17f",15:"353d417a5ed863ccb3d2",16:"f7a75116f7b71310e271",17:"fff71e6a37ad22903519",18:"c4d6f4db971fd6a53de5",21:"5fe24bc860088be1b528",22:"c26ff53165d90faf9c4f",23:"795fee1c52905a188792",24:"ec1d710a9e7c95e61e7b"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="./",a.oe=function(e){throw console.error(e),e}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,o){for(var f,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=c(c.s=o[i]);return b};var r={},t={25:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+e+"."+{0:"d67c1b54497bca5732c1",1:"3dab2f03f71b0f0b1713",2:"52ff46b6b15222e043d6",3:"ad4ee5a96965c56d8caf",4:"a46e55b2b83af355e6c8",5:"8d38d044dc9e96d56699",6:"b4bee5960cbbfd744133",7:"2adc06a626d61874b5da",8:"8a6b22163b5bfcc9466a",9:"2e90654263237c67e337",10:"87620061e05ff5870743",11:"a46d5ac57625764ad2be",12:"d6456664f1e4baa71c20",13:"ae1e82db8885c816fd6b",14:"cb69db1f9056d9e7b17f",15:"353d417a5ed863ccb3d2",16:"f7a75116f7b71310e271",17:"fff71e6a37ad22903519",18:"c4d6f4db971fd6a53de5",21:"5fe24bc860088be1b528",22:"c26ff53165d90faf9c4f",23:"795fee1c52905a188792",24:"ec1d710a9e7c95e61e7b"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,a.appendChild(o),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="./",c.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.4a2448573f8458d0d93f.js.map //# sourceMappingURL=manifest.3dc1820374cd7ed2f9ef.js.map
\ No newline at end of file \ No newline at end of file
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
// zooms: [6, 9], // zooms: [6, 9],
mapStyle: 'smap://styles/dark', mapStyle: 'smap://styles/dark',
}).on(SMap.MapEvent.maploaded, () => { }).on(SMap.MapEvent.maploaded, () => {
// this.hideCommunity() this.hideCommunity()
this.addListener() this.addListener()
// this.map.enableMouseEvent(false) // 禁用鼠标 // this.map.enableMouseEvent(false) // 禁用鼠标
this.$emit('complete') this.$emit('complete')
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
this.map.remove(points) this.map.remove(points)
}, },
setFilter(arr) { setFilter(arr) {
if (arr.length === 0) return
const valid = arr.map(name => { const valid = arr.map(name => {
return `sect_name_ = '${name}'` return `sect_name_ = '${name}'`
// return `sect_guid = '${name}'` // return `sect_guid = '${name}'`
......
...@@ -2,6 +2,9 @@ export default { ...@@ -2,6 +2,9 @@ export default {
SET_LOADING(state, val) { SET_LOADING(state, val) {
state.showLoading = val state.showLoading = val
}, },
SET_CURRENT_AREA(state, name) {
state.curWorkArea = 'workArea' + name
},
SET_CURDATE(state, date) { SET_CURDATE(state, date) {
state.curDate = date state.curDate = date
}, },
......
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:complete="complete" :complete="complete"
> >
<m-map ref="map" @complete="mapComplete" @event="handleMapClick"/> <m-map ref="map" @complete="mapComplete" @event="handleMapClick"/>
<m-title area="title" :bgImg="require('@/assets/images/title-bg-left.png')">南东城运第一综合网格工作站</m-title> <m-title area="title" :bgImg="require('@/assets/images/title-bg-left.png')">南东城运{{$store.state[curWorkArea].workStation.name}}综合网格工作站</m-title>
<!-- <m-animate enter="fadeInLeft" leave="fadeOutLeft"> <!-- <m-animate enter="fadeInLeft" leave="fadeOutLeft">
<div v-show="themeName === '主屏'" area="left" class="wrapper"> <div v-show="themeName === '主屏'" area="left" class="wrapper">
<HomeScreen /> <HomeScreen />
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
<!-- <m-modal title="详情" v-model="normalModal"> <!-- <m-modal title="详情" v-model="normalModal">
<m-form :label-width=".6" :model="normalData" :layout="normalLayout"/> <m-form :label-width=".6" :model="normalData" :layout="normalLayout"/>
</m-modal> --> </m-modal> -->
<m-drawer title="详情" v-model="normalModal" @close="fullView = false" right="0.1rem" width="49vw" height="auto"> <!-- <m-drawer title="详情" v-model="normalModal" @close="fullView = false" right="0.1rem" width="49vw" height="auto">
<m-form class="form" :label-width=".6" :model="normalData" :layout="normalLayout"/> <m-form class="form" :label-width=".6" :model="normalData" :layout="normalLayout"/>
<img v-if="normalData.photo" :src="require(`@/assets/images/${normalData.photo}`)" style="width:100%;max-height:70vh;" /> <img v-if="normalData.photo" :src="require(`@/assets/images/${normalData.photo}`)" style="width:100%;max-height:70vh;" />
</m-drawer> </m-drawer> -->
<m-drawer title="美丽街区-美丽家园" v-model="beautyModal" @close="closeBeauty"> <m-drawer title="美丽街区-美丽家园" v-model="beautyModal" @close="closeBeauty">
<div class="beauty-list"> <div class="beauty-list">
<p :class="{on: curBeautyId === item.id}" v-for="item in beautyData" :key="item.name" :title="item.name" @click="handleSelectBeauty(item)">{{item.name}}</p> <p :class="{on: curBeautyId === item.id}" v-for="item in beautyData" :key="item.name" :title="item.name" @click="handleSelectBeauty(item)">{{item.name}}</p>
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
complete: false, complete: false,
fullView: false, fullView: false,
boundary: null, boundary: null,
workspaceA: null, workStation: null,
nonLivingPoints: null, nonLivingPoints: null,
gridModal: false, gridModal: false,
steps: [ steps: [
...@@ -234,6 +234,7 @@ export default { ...@@ -234,6 +234,7 @@ export default {
}, },
computed: { computed: {
...mapState([ ...mapState([
'curWorkArea',
'themeName', 'themeName',
'nonLivingList', 'nonLivingList',
'beautyList', 'beautyList',
...@@ -241,6 +242,10 @@ export default { ...@@ -241,6 +242,10 @@ export default {
'coldList', 'coldList',
]) ])
}, },
beforeCreate() {
const {name} = this.$route.query
this.$store.commit('SET_CURRENT_AREA', name || 1)
},
methods: { methods: {
...mapActions([ ...mapActions([
'initData' 'initData'
...@@ -252,126 +257,39 @@ export default { ...@@ -252,126 +257,39 @@ export default {
}, },
initMap() { initMap() {
const {map} = this.$refs const {map} = this.$refs
// map.focus(97.87804679686496, -40.686071867261035, 6) // 南京东路街道 const {center, paths, community, areas, workStation} = this.$store.state[this.curWorkArea]
// map.focus(41.75319496382872, -480.0854532701907, 7) // 市政府区域 document.querySelector('title').innerText = `南东城运${workStation.name}综合网格工作站`
// map.focus(-189.37734542225144, 305.3152060727947, 6) // 市政府北边区域 map.focus(...center, 7) // 市政府偏移点
// map.focus(573.7817329792392, 158.7688192300202, 6) // 市政府东边区域
map.focus(1141.75319496382872, -480.0854532701907, 7) // 市政府偏移点
map.addPolyLine({ map.addPolyLine({
paths: this.$store.state.areaAPath, paths,
strokeColor: '#ffce34', strokeColor: '#ffce34',
}) })
this.addAreaLines() this.addAreaLines(areas)
this.addWorkSpacePoint() this.addWorkStationPoint(workStation)
map.setFilter([ map.setFilter(community)
'南京街道顺天邨2小区',
'南京街道顺天邨1小区',
'南京东路街道江阴小区',
'黄浦区威海苑',
'黄浦区宏泰公寓',
'长发大厦',
'黄浦区长发大厦',
'宏泰公寓',
'南京街道均乐小区',
'南京街道振兴(大)1小区',
'黄浦区文海大楼',
'黄浦区紫华大楼',
'南京街道振兴小区',
'南京东路街道振兴小区',
'南京街道重庆小区',
'广场街道139街坊ab5-1396小区',
'南京东路街道均乐1小区',
'南京街道新昌售小区',
'南京东路街道祥康里小区',
'南京街道新昌1小区',
'南京东路街道长江(大)2小区'
])
// map.addPolyLine({
// paths: this.$store.state.areaBPath,
// strokeColor: 'rgba(51,145,255,1)',
// })
// map.addPolyLine({
// paths: this.$store.state.areaCPath,
// strokeColor: 'rgba(51,145,255,1)',
// })
// map.addPolygon({
// paths: this.$store.state.areaAPath,
// // fillColor: 'rgba(51,145,255,.3)',
// fillColor: 'transparent',
// attributes: {
// key: 'areaA',
// name: '区域A',
// test: 'hahahhaha'
// }
// })
// map.addPolygon({paths: this.$store.state.areaBPath, fillColor: 'rgba(65,217,199,.3)'})
// map.addPolygon({paths: this.$store.state.areaCPath, fillColor: 'rgba(240,72,100,.3)'})
// map.addPolygon({paths: this.$store.state.streetPath, fillColor: 'rgba(51,145,255,.3)'})
this.boundary = map.addBoundary({name: '南京东路街道', color: 'rgba(0,0,0,0)'}) this.boundary = map.addBoundary({name: '南京东路街道', color: 'rgba(0,0,0,0)'})
}, },
addAreaLines() { addAreaLines(areas) {
const {map} = this.$refs const {map} = this.$refs
const jiangyin = [ Object.keys(areas).forEach(key => {
[-265.73166753193834, -19.6103135699113],
[-246.0780474955316, -61.358753186582206],
[-221.12654902482632, -101.26750813430043],
[-184.38246511999182, -139.4130596858202],
[-146.2617183055816, -182.81514844312272],
[-139.54583573319144, -218.23011185117454],
[-144.81563520508178, -282.03616394244546],
[-113.85932329245793, -373.52016852503795],
[-203.7144834715283, -428.83473227916545],
[-235.70019197419526, -414.85726291797675],
[-274.3211676536466, -436.61928560868876],
[-324.31098117494037, -445.96240325325743],
[-278.88110515893834, -553.9415580136503],
[-248.97899457346716, -642.1513372977922],
]
const renmindadao = [
[-427.0604705280855, -662.3506615506074],
[-301.8544258451628, -649.8325375560261],
[-255.3538120106018, -647.3520638450786],
[-201.48619125452694, -651.1141156400156],
[-84.11430937534647, -654.7397413808504],
[36.90800298177817, -659.4154343259863],
[-5.475024492610032, -589.2759060260963],
[452.3460083369556, -245.20112933487624],
]
const chongqingbeilu = [
[-205.5128269119649, -652.3460842497868],
[-144.95206125918355, -832.5070239987497],
[-136.47710941344656, -846.8855032765414],
[-129.37055223158222, -915.458199015683],
[-123.07428312862737, -959.9082879158607],
[-234.600515295675, -1019.7331797010611],
]
map.addPolyLine({
paths: jiangyin,
strokeColor: '#FF6161',
})
map.addPolyLine({ map.addPolyLine({
paths: renmindadao, paths: areas[key],
strokeColor: '#FF6161', strokeColor: '#FF6161',
}) })
map.addPolyLine({
paths: chongqingbeilu,
strokeColor: '#FF6161',
}) })
}, },
addWorkSpacePoint() { addWorkStationPoint(workStation) {
const {addPoint, remove} = this.$refs.map const {addPoint, remove} = this.$refs.map
remove(this.workspaceA) remove(this.workStation)
this.workspaceA = addPoint({ this.workStation = addPoint({
key: 'workspaceA', key: 'workStation',
size: 20, size: 20,
icon: 'workspace.png', icon: 'workspace.png',
data: [{name: '第一工作站', address: '武胜路481号', x: -136.67, y: -660.07}] data: [workStation]
}) })
}, },
handleMapClick(data) { handleMapClick(data) {
const {map} = this.$refs if (data.key === 'workStation') {
if (data.key === 'workspaceA') {
this.workspaceModal = true this.workspaceModal = true
return return
} }
...@@ -383,14 +301,14 @@ export default { ...@@ -383,14 +301,14 @@ export default {
this.coldModal = false this.coldModal = false
return return
} }
if (data.key === 'areaA-points') { // if (data.key === 'areaA-points') {
this.normalData = data // this.normalData = data
this.normalModal = true // this.normalModal = true
this.codeModal = false // this.codeModal = false
this.fullView = true // this.fullView = true
this.nonLivingModal = false // this.nonLivingModal = false
return // return
} // }
if (data.key === 'beauty') { if (data.key === 'beauty') {
if (this.curBeautyId) { if (this.curBeautyId) {
this.beautyDetail = data this.beautyDetail = data
...@@ -398,15 +316,7 @@ export default { ...@@ -398,15 +316,7 @@ export default {
} }
return return
} }
if (data.key === 'areaA') { if (data.key === 'coldPoints') {
this.boundary.hide()
map.addPolyLine({
paths: this.$store.state.areaAPath,
strokeColor: 'rgba(51,145,255,1)',
})
map.focus(41.75319496382872, -480.0854532701907, 7)
}
if (data.key === 'codePoints') {
this.normalModal = false this.normalModal = false
this.nonLivingModal = false this.nonLivingModal = false
this.coldData = data this.coldData = data
...@@ -487,7 +397,7 @@ export default { ...@@ -487,7 +397,7 @@ export default {
if (keys.some(key => key === 'cold')) { if (keys.some(key => key === 'cold')) {
if (!this.coldPoints) { if (!this.coldPoints) {
this.coldPoints = addPoint({ this.coldPoints = addPoint({
key: 'codePoints', key: 'coldPoints',
size: 20, size: 20,
icon: 'cold.png', icon: 'cold.png',
data: this.coldList, data: this.coldList,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment