Commit 523d2a82 authored by 郭铭瑶's avatar 郭铭瑶 🤘

对接数据,提取公共方法

parent aad3ac22
<!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: 1.6vh;
}</style><script src=./static/jquery.min.js></script><link href=./static/css/app.aaa701020514fd7a37bf45cf0d3e2bbd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.2d75636d96e43f0e4912.js></script><script type=text/javascript src=./static/js/vendor.d11eae825e5c4a0e0bb2.js></script><script type=text/javascript src=./static/js/app.390a7436a94f896ad23d.js></script></body></html>
\ No newline at end of file
}</style><script src=./static/jquery.min.js></script><link href=./static/css/app.698da7cee7c405ac60398d018acc00d2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.28cc99f79f31db2b9187.js></script><script type=text/javascript src=./static/js/vendor.d11eae825e5c4a0e0bb2.js></script><script type=text/javascript src=./static/js/app.9bb99372b605c8243f0f.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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,f){for(var o,d,b,i=0,u=[];i<r.length;i++)d=r[i],t[d]&&u.push(t[d][0]),t[d]=0;for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(e[o]=c[o]);for(n&&n(r,c,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=a(a.s=f[i]);return b};var r={},t={27: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],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,a.nc&&f.setAttribute("nonce",a.nc),f.src=a.p+"static/js/"+e+"."+{0:"ff246fa353f4a0e98352",1:"80f3e7aa96153395fe1b",2:"beeb013c854cc4ad7576",3:"874610ae83b6001e99dc",4:"13510734ce92219bd280",5:"79501cbfbec9e7ca1a2b",6:"94c94cc8500e6d11e97a",7:"ae0723e8fa6bf8aefb76",8:"5ad0f24b31031f7284b3",9:"4ef6358bcf9c545ab808",10:"95e6aac83e6fd0b95f6e",11:"e0d0852893a051f35f47",12:"b26fc350b53d2b30f1b4",13:"700fbeaa3fecb8fc2c52",14:"7642b4cf5d2d8918ec69",15:"8dd2c66622a5a46d46cb",16:"f061d63018ce1704dd88",17:"912a00b10d2c58f1968b",18:"1adf9a941d5ebe37bd9e",19:"fd761234a41f95a23244",20:"85aa1475d8f340363b71",23:"2d8001a6b1d5cb810441",24:"f7914065b4d7bec4ccfb",25:"6b5f4749058978064562",26:"584ddfc7aad303eb351f"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),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}}([]);
//# sourceMappingURL=manifest.28cc99f79f31db2b9187.js.map
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(n,f,c){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in f)Object.prototype.hasOwnProperty.call(f,o)&&(e[o]=f[o]);for(a&&a(n,f,c);u.length;)u.shift()();if(c)for(i=0;i<c.length;i++)b=t(t.s=c[i]);return b};var n={},r={27:0};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var a=r[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var n=new Promise(function(n,t){a=r[e]=[n,t]});a[2]=n;var f=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,t.nc&&c.setAttribute("nonce",t.nc),c.src=t.p+"static/js/"+e+"."+{0:"2a0355272afd32adcaf3",1:"80f3e7aa96153395fe1b",2:"a151bb843733234fddd7",3:"21fea74d7d4b4fcd2afa",4:"dec96953daf178f52462",5:"79501cbfbec9e7ca1a2b",6:"94c94cc8500e6d11e97a",7:"ae0723e8fa6bf8aefb76",8:"5ad0f24b31031f7284b3",9:"4ef6358bcf9c545ab808",10:"95e6aac83e6fd0b95f6e",11:"e0d0852893a051f35f47",12:"b26fc350b53d2b30f1b4",13:"700fbeaa3fecb8fc2c52",14:"7642b4cf5d2d8918ec69",15:"8dd2c66622a5a46d46cb",16:"f061d63018ce1704dd88",17:"912a00b10d2c58f1968b",18:"1adf9a941d5ebe37bd9e",19:"fd761234a41f95a23244",20:"85aa1475d8f340363b71",23:"2d8001a6b1d5cb810441",24:"f7914065b4d7bec4ccfb",25:"6b5f4749058978064562",26:"584ddfc7aad303eb351f"}[e]+".js";var o=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(o);var a=r[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return c.onerror=c.onload=d,f.appendChild(c),n},t.m=e,t.c=n,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.2d75636d96e43f0e4912.js.map
\ No newline at end of file
......@@ -5,16 +5,14 @@ case 'production':
BASE_URL = 'http://211.136.105.193/apiv2'
break
default:
// BASE_URL = 'http://yapi.omniview.pro/mock/54/propertyinspector/api/v1/'
// BASE_URL = 'http://www.962121.net/hmfmstest/shanghaiwuye/propertyinspector/api/v1'
BASE_URL = 'http://211.136.105.193/apiv2'
};
export default {
BASE_URL,
POST_CHECKCOMMUNITY_LIST:'sharingplatform/sectListForOneDay', //物业督查---每一个主题下某天已检查的小区列表
POST_CHECKPEOPLE_LIST:'sharingplatform/getInspectors', // 检查人员列表
GET_SENSOR: '/service-special/public/sensor/discover',
GET_DISCOVER_INFO: '/service-special/public/discoverInfo?pcr.communityId_in=S015001231,S015001664',
GET_SENSOR: '/service-special/public/sensor/discover?type_nin=fire,heap',
GET_DISCOVER_INFO: '/service-special/public/discoverInfo?pcr.communityId_in=S015001231,S015001664&days=3',
GET_HANDLE_LIST: '/service-special/public/alarm/index?pcr.communityId_in=S015001231,S015001664&days=3',
GET_TS_BX: '/service-special/public/repair/complaint?communityId=S015001231',
GET_BUILDING: '/service-search/public/buildings?sectId=120324203558281&pageSize=1000&pageNo=1'
}
......
This diff is collapsed.
......@@ -29,16 +29,7 @@ export default {
SET_FOUNDLIST(state, data) {
state.foundList = data
},
SET_CHECKPEOPLELIST(state,data){ //修改检查人员列表数据
state.supervisionPeopleList = data
},
SET_CHECKCOMMUNITYLIST(state,data){ //修改检查小区列表数据
state.supervisionCommunityList = data
},
SET_ALLCHECKED(state,data){ //已检查小区总数
state.supervisionSituationList[0].all = data
},
SET_SENDCHECKED(state,data){ //发整改单小区数
state.supervisionSituationList[0].send = data
},
SET_SENSORLIST(state, data) {
state.sensorList = data
}
}
......@@ -9,13 +9,6 @@ export default {
repairList: [],
discoveryList: [],
foundList: [],
supervisionPeopleList:[], //物业督查检查人员列表
supervisionCommunityList:[], //物业督查小区列表
supervisionSituationList:[
{
all: 130,
send: 20
}
],
handleList: []
handleList: [],
sensorList: [],
}
......@@ -61,6 +61,23 @@ export default {
format (num) {
var reg=/\d{1,3}(?=(\d{3})+$)/g
return (num + '').replace(reg, '$&,')
},
getSensorScene(type) {
const data = {
'fire': '火警报警',
'staffLeaveAlarmTcfteodr': '门岗脱岗',
'parkFireExit': '占用消防通道',
'nonVehicleCharg': '集中充电异常',
'elevatorLock': '楼道充电',
'buildingVibration': '损坏承重结构',
'trash': '非定时倒垃圾',
'manholeCover': '窨井盖异常',
'waterTank': '水箱异常开启',
'roofWater': '屋顶积水',
'hermeticSpace': '屋顶违章建筑',
}
return data[type]
},
}
<template>
<div class="handle">
<m-scroll :length="$store.state.handleList.length" :limit="2" mode="2" :step="5.5">
<div class="card" v-for="(data,i) in $store.state.handleList" :key="i">
<div class="title">
<p>{{data.title}}</p>
<m-scroll :length="list.length" :limit="2" mode="2" :step="5.5">
<div class="card" v-for="(data,i) in list" :key="i">
<div class="communityName">
<p>{{data.communityName}}</p>
<div class="line"></div>
<p>{{data.address}}</p>
<p>{{data.communityAddr}}</p>
</div>
<div class="content">
<div class="info">
<div>
<p>协同事项</p>
<p>{{data.matter}}</p>
<p>{{data.matter || $com.getSensorScene(data.types) || '暂无分类'}}</p>
</div>
<div>
<p>发现方式</p>
<p>{{data.style}}</p>
<p>{{data.check_type || '智能发现'}}</p>
</div>
<div>
<p>响应部门</p>
<p>{{data.department}}</p>
<p>{{data.cspName}}</p>
</div>
<div>
<p>发现时间</p>
<p>{{data.sendTime}}</p>
<p>{{data.check_time}}</p>
</div>
</div>
<div class="step">
<m-step
:steps="data.step"
:current="[data.current, false]"
:steps="steps"
:current="[data.current || 3, false]"
/>
</div>
</div>
......@@ -39,8 +39,113 @@
</template>
<script>
import moment from 'moment'
export default {
name: 'handle',
data() {
return {
steps: [
{
name:'推送',
},
{
name:'接收',
},
{
name:'处置',
},
{
name:'完成'
}
]
}
},
computed: {
list() {
const beforeDay = moment().subtract(1, 'days').format('YYYY-MM-DD')
if (this.$route.name == 'main') {
const mock = [
{
communityName:'(补)教师大楼',
communityAddr:'东方路3391弄',
matter:'占用消防通道' ,
check_type:'智能发现',
cspName:'上海霞悦物业',
check_time:beforeDay + ' 18:30:30',
current:2,
},
{
communityName:'(补)临沂二村',
communityAddr:'浦三路12弄',
matter:'违规充电' ,
check_type:'智能发现',
cspName:'上海振南物业',
check_time:beforeDay + ' 12:30:30',
current:2,
},
{
communityName:'(补)金田公寓',
communityAddr:'南码头路160弄',
matter:'毁绿占绿' ,
check_type:'投诉发现',
cspName:'城管部门',
check_time:beforeDay + ' 10:16:30',
current:2
},
{
communityName:'(补)临沂五村',
communityAddr:'临沂路381弄',
matter:'垃圾分类违规' ,
check_type:'巡查发现',
cspName:'居委会',
check_time:beforeDay + ' 10:16:30',
current:3
},
{
communityName:'(补)东盛公寓',
communityAddr:'浦三路821弄',
matter:'停车矛盾' ,
check_type:'投诉发现',
cspName:'上海创特物业',
check_time:beforeDay + ' 10:16:30',
current:2
},
{
communityName:'(补)华南名苑',
communityAddr:'浦东南路3666弄',
matter:'违规充电' ,
check_type:'智能发现',
cspName:'上海证大物业',
check_time:beforeDay + ' 10:16:30',
current:2
},
{
communityName:'(补)明丰佳园',
communityAddr:'东方路2851弄',
matter:'噪音扰民' ,
check_type:'投诉发现',
cspName:'上海名东物业',
check_time:beforeDay + ' 10:16:30',
current:2
},
]
return [...mock, ...this.$store.state.handleList]
} else {
const mock = [
{
communityName:'(补)临沂二村',
communityAddr:'浦三路12弄',
matter:'垃圾未及时清运' ,
check_type:'巡查发现',
cspName:'上海振南物业',
check_time:beforeDay + ' 08:15:30',
current:2,
},
]
return [...mock, ...this.$store.state.handleList]
}
}
}
}
</script>
......@@ -50,7 +155,7 @@ export default {
height 100%
.card
height 5.5rem
.title
.communityName
display flex
align-items center
justify-content space-between
......@@ -65,12 +170,12 @@ export default {
// font-weight 700
&:last-child
color $fontColor
font-size 1rem
font-size .9rem
.content
display flex
align-items center
.info
width 60%
width 65%
overflow hidden
div
display inline-block
......@@ -80,7 +185,7 @@ export default {
overflow hidden
text-overflow ellipsis
color $color-blue
font-size 1rem
font-size .9rem
&:last-child
color #eee
.step
......
......@@ -7,7 +7,7 @@
:percent="circle.count"
:size="90 * sizeRate"
:trail-width="2 * sizeRate"
:stroke-width="4 * sizeRate"
:stroke-width="3 * sizeRate"
trail-color="gray"
:stroke-color="circle.color">
<div>
......
......@@ -81,7 +81,7 @@
<m-modal v-model="showEleMap" width="90%" title="电梯加装地图">
<iframe style="width:100%;min-height:80vh;background:#fff;" src="http://211.136.105.193/elev/#/?name=南码头" frameborder="0"/>
</m-modal>
<m-modal v-model="showEventModal" title="传感器列表" @close="$refs.map.removeGifPoint('selected-point')" width="50%">
<m-modal v-model="showEventModal" title="传感器列表" @close="$refs.map.removeGifPoint('selected-point')" width="70%">
<m-form v-for="data in eventData" :key="data.id" :title="data.addr" :label-width="6" :model="data" :layout="eventLayout"/>
<!-- <img v-if="showEventModal" style="width:100%;" :src="eventData.img ? require(`@/assets/images/${eventData.img}`) : null"/> -->
</m-modal>
......@@ -187,15 +187,19 @@ export default {
{
sensorType: {
label: '传感器类型',
width: 9,
width: 7,
},
sensorNo: {
label: '传感器编号',
width: 9,
width: 6,
},
_scene: {
label: '场景类型',
width: 6,
},
_status: {
label: '状态',
width: 6,
width: 5,
},
}
],
......@@ -219,9 +223,6 @@ export default {
this.addBuildingIcon()
setTimeout(() => {
this.complete = true
this.getCheckCommunityList({isPublish: 1, someday: '20200316'})
this.getCheckCommunityList()
this.getCheckedPeopleList()
this.startTimer()
}, 3000)
},
......@@ -273,49 +274,24 @@ export default {
},
handleSwitchIcon() {
this.openIcon = !this.openIcon
this.addPoints()
this.addSensorPoints()
},
showVideo(name) {
this.curVideo = name
this.videoModal = true
},
addPoints() {
// this.addBuildingIcon()
addSensorPoints() {
const {map} = this.$refs
map.removePoint('sensor')
map.removeGifPoint('sensor')
if (this.openIcon) {
this.$ajax.get({
url: this.$api.GET_SENSOR,
}).then(res => {
const sensorList = this.$com.confirm(res, 'data.content', [])
sensorList.forEach(sensor => {
sensor._status = sensor.state == '1' ? '报警' : '正常'
sensor.state == '1' ? sensor.icon = 'warn.png' : null
})
map.addPoint({name: 'sensor', key: 'id', size: 25, data: sensorList, icon: 'no-warn.png'})
})
this.setSensorList()
}
this.$ajax.get({ // 获取智能发现数据
url: this.$api.GET_DISCOVER_INFO,
}).then(res => {
const sum = {total: 0, today: 0}
const data = this.$com.confirm(res, 'data.content', [])
const originSum = JSON.parse(JSON.stringify(this.$store.state.discoveryList))
const originData = JSON.parse(JSON.stringify(this.$store.state.foundList))
data.forEach(e => {
const cur = originData.find(item => item.key == e.types)
if (cur) {
cur.num = e.numbers
sum.total += e.total
sum.today += e.numbers
}
})
originSum.forEach(e => e.num = sum[e.key])
this.$store.commit('SET_DISCOVERYLIST', originSum)
this.$store.commit('SET_FOUNDLIST', originData)
})
},
addPoints() {
this.addSensorPoints()
this.setDiscoverInfo()
this.setHandleList()
this.$ajax.get({ // 获取投诉报修数据
url: this.$api.GET_TS_BX,
}).then(res => {
......@@ -346,13 +322,19 @@ export default {
this.$router.push({path: '/'})
},
...mapActions([
'initData',
'initNanmatouData',
'initLinyiData',
'getCheckCommunityList',
'getCheckedPeopleList'
'setDiscoverInfo',
'setHandleList',
'setSensorList',
])
},
watch: {
'$store.state.sensorList': {
handler(cur) {
this.$refs.map.addPoint({name: 'sensor', key: 'id', size: 25, data: cur, icon: 'no-warn.png'})
}
},
}
}
</script>
<style lang="stylus" scoped>
......
......@@ -85,11 +85,11 @@
<m-card v-show="complete" enter="fadeInUp" leave="fadeOutDown" area="box7" title="联勤联动动态流程" mode="4" :width="25">
<Handle v-if="complete"/>
</m-card>
<MapMenu :full="complete" @full="handleFullView" @in="$refs.map.zoomIn()" @out="$refs.map.zoomOut()"/>
<MapMenu :full="complete" @full="handleFullView" @switch="handleSwitchIcon" @in="$refs.map.zoomIn()" @out="$refs.map.zoomOut()"/>
<StreetMenu @select="handleStreetSelect"/>
<m-animate enter="fadeInUp" leave="fadeOutDown">
<!-- <m-animate enter="fadeInUp" leave="fadeOutDown">
<BottomTabs v-show="complete" @click="showModal = true"/>
</m-animate>
</m-animate> -->
<m-modal :value="$store.state.showElementModal" @close="$store.commit('SET_ELEMENTMODAL', false)" width="85%" title="小区综合治理管理要素">
<IssueDetail />
</m-modal>
......@@ -192,6 +192,8 @@ export default {
},
data() {
return {
timer: null,
openIcon: true,
curTitle: '南码头',
emergencyMode: false,
showModeMenu: false,
......@@ -291,32 +293,45 @@ export default {
videoModal: false,
}
},
beforeDestroy() {
clearInterval(this.timer)
this.timer = null
},
methods: {
mapComplete() {
const {features} = require('../../static/nanmatou.json')
this.$refs.map.drawStreet('nanmatou', features[0].geometry.rings[0])
this.$refs.map.focus(4039.44281, -4712.403381, 5.5)
this.$refs.map.focus(4039.44281, -4712.403381, 6)
this.initNanmatouData()
this.addBuildingIcon()
setTimeout(() => {
this.complete = true
this.initNanmatouData()
this.getCheckCommunityList({isPublish: 1, someday: '20200316'})
this.getCheckCommunityList()
this.getCheckedPeopleList()
this.startTimer()
}, 3000)
},
startTimer() {
this.addPoints()
this.timer = setInterval(this.addPoints, 1000 * 60 * 3)
},
addBuildingIcon() {
this.$refs.map.removePoint('building')
this.$ajax.get({
url: this.$api.GET_BUILDING,
}).then(res => {
const data = this.$com.confirm(res, 'data.content', [])
this.$refs.map.addPoint({name: 'building', size: 13, labelKey: 'unitAddr', key: 'id', data: data, icon: 'icon-unit.png'})
})
},
handleMapClick({layername, data}) {
const {X, Y} = data[0]
const {map} = this.$refs
switch (layername) {
case 'community': // 当点击图层为小区时
map.removeGifPoint('selected-point') // 先移除已点击的点
map.focus(X, Y, 8)
map.addGifPoint({name: 'selected-point', key: 'COMMUNITYID', labelKey: 'COMMUNITYNAME', data: data[0], icon: data[0].icon || 'blue.png'})
case 'sensor':
map.focus(data[0].x, data[0].y, 12)
this.handleEventModal(data)
break
case 'em': // 当点击图层为小区时
map.removeGifPoint('selected-point') // 先移除已点击的点
map.focus(X, Y, 8)
map.addGifPoint({name: 'selected-point', key: 'COMMUNITYID', labelKey: 'COMMUNITYNAME', data: data[0], icon: data[0].icon || 'user4.png'})
case 'flashlayer':
map.focus(data[0][1].x, data[0][1].y, 12)
this.handleEventModal(data[0][1])
break
default:
break
......@@ -343,15 +358,10 @@ export default {
}
this.curTitle = name.replace('街道', '')
this.$refs.map.removePoint('nanmatou')
if (index == 0) {
this.$refs.map.focus(9000, -2000, 2)
this.initData()
} else {
const {features} = require('../../static/nanmatou.json')
this.$refs.map.drawStreet('nanmatou', features[0].geometry.rings[0])
this.$refs.map.focus(4039.44281, -4712.403381, 5.5)
this.initNanmatouData()
}
},
handleViewImg(img) {
this.curImg = img
......@@ -361,40 +371,74 @@ export default {
this.curVideo = name
this.videoModal = true
},
handleSwitchIcon() {
this.openIcon = !this.openIcon
this.addSensorPoints()
},
addSensorPoints() {
const {map} = this.$refs
map.removePoint('sensor')
map.removeGifPoint('sensor')
if (this.openIcon) {
this.setSensorList()
}
},
addPoints() {
this.addSensorPoints()
this.setDiscoverInfo()
this.setHandleList()
this.$ajax.get({ // 获取投诉报修数据
url: this.$api.GET_TS_BX,
}).then(res => {
const data = this.$com.confirm(res, 'data.content', {})
const result = [ // 报修投诉
{
title:'报修数量',
img:'repair.png',
num: data.alarmIn5MinBX || 0,
allNum: data.undoneBX || 0,
},
{
title:'投诉数量',
img:'complaint.png',
num: data.alarmIn5MinTS || 0,
allNum: data.undoneTS || 0,
},
]
this.$store.commit('SET_REPAIRLIST', result)
})
},
...mapActions([
'initData',
'initNanmatouData',
'getCheckCommunityList',
'getCheckedPeopleList'
'setDiscoverInfo',
'setHandleList',
'setSensorList',
])
},
watch: {
'$store.state.supervisionCommunityList': {
'$store.state.sensorList': {
handler(cur) {
this.$refs.map.removePoint('community')
this.$refs.map.addPoint({name: 'community', key: 'COMMUNITYID', size: 25, data: cur, icon: 'blue.png'})
this.$refs.map.addPoint({name: 'sensor', key: 'id', size: 25, data: cur, icon: 'no-warn.png'})
}
},
emergencyMode(cur) {
const {map} = this.$refs
map.focus(4039.44281, -4712.403381, 6)
map.removeGifPoint('selected-point')
map.removePoint('em')
map.removeGifPoint('community')
if (cur) {
map.removePoint('nanmatou')
const {features} = require('../../static/nanmatou.json')
map.drawStreet('nanmatou', features[0].geometry.rings[0], 'orange')
map.removePoint('community')
this.$refs.map.addGifPoint({name: 'community', key: 'COMMUNITYID', data: this.$store.state.supervisionCommunityList, color: 'red'})
const mock = [
{COMMUNITYNAME: '(补)教师大楼', TASKID:'(补)教师大楼', COMMUNITYID: '(补)教师大楼', icon: 'icon2.png', X: 4039.44281, Y: -4712.403381},
{COMMUNITYNAME: '(补)临沂二村', TASKID:'(补)临沂二村', COMMUNITYID: '(补)临沂二村', icon: 'icon2.png', X: 3706.690186, Y: -4234.159912},
{COMMUNITYNAME: '(补)金田公寓', TASKID:'(补)金田公寓', COMMUNITYID: '(补)金田公寓', icon: 'icon1.png', X: 3391.523438, Y: -3836.112488},
{COMMUNITYNAME: '(补)临沂五村', TASKID:'(补)临沂五村', COMMUNITYID: '(补)临沂五村', icon: 'icon3.png', X: 3779.35022, Y: -4665.97998},
{COMMUNITYNAME: '(补)华南名苑', TASKID:'(补)华南名苑', COMMUNITYID: '(补)华南名苑', icon: 'icon2.png', X: 3094.474182, Y: -4879.984985},
{COMMUNITYNAME: '(补)明丰佳园', TASKID:'(补)明丰佳园', COMMUNITYID: '(补)明丰佳园', icon: 'icon2.png', X: 4574.670227, Y: -4217.309998},
]
this.$refs.map.addGifPoint({name: 'community', key: 'COMMUNITYID', data: mock, color: 'red'})
const data = [{COMMUNITYNAME: '应急维修服务站', TASKID:'应急维修服务站', COMMUNITYID: '应急维修服务站', X: 4476.35021972656, Y: -4935.41998291016}]
map.addPoint({name: 'em', key: 'COMMUNITYID', labelKey: 'COMMUNITYNAME', data: data, icon: 'user4.png'})
map.focus(4039.44281, -4712.403381, 6)
} else {
map.removePoint('nanmatou')
map.removePoint('em')
const {features} = require('../../static/nanmatou.json')
map.drawStreet('nanmatou', features[0].geometry.rings[0])
map.removeGifPoint('community')
map.addPoint({name: 'community', key: 'COMMUNITYID', data: this.$store.state.supervisionCommunityList, icon: 'blue.png'})
map.focus(4039.44281, -4712.403381, 5.5)
}
}
},
......
......@@ -187,9 +187,6 @@ export default {
setTimeout(() => {
this.complete = true
this.initShenjiangData()
this.getCheckCommunityList({isPublish: 1, someday: '20200316'})
this.getCheckCommunityList()
this.getCheckedPeopleList()
}, 3000)
},
handleMapClick({layername, data}) {
......@@ -240,11 +237,7 @@ export default {
this.$router.push({path: '/'})
},
...mapActions([
'initData',
'initNanmatouData',
'initShenjiangData',
'getCheckCommunityList',
'getCheckedPeopleList'
])
},
}
......
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