Commit 68fee7a8 authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新数据

parent 30e26d16
......@@ -343,6 +343,9 @@ export default {
color: '#fff',
fontSize: this.fontSize,
},
// interval: 40,
min: 80,
max: 100,
type: 'value',
splitLine: {
show: true,
......
......@@ -2,18 +2,19 @@ let BASE_URL = ''
switch (process.env.NODE_ENV) {
case 'production':
// BASE_URL = 'http://www.962121.net/hmfmstest/shanghaiwuye/propertyinspector/api/v1'
BASE_URL = 'http://211.136.105.193/apiv2/service-special'
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/service-special'
BASE_URL = 'http://211.136.105.193/apiv2'
};
export default {
BASE_URL,
POST_CHECKCOMMUNITY_LIST:'sharingplatform/sectListForOneDay', //物业督查---每一个主题下某天已检查的小区列表
POST_CHECKPEOPLE_LIST:'sharingplatform/getInspectors', // 检查人员列表
GET_SENSOR: '/public/sensor/discover',
GET_DISCOVER_INFO: '/public/discoverInfo',
GET_SENSOR: '/service-special/public/sensor/discover',
GET_DISCOVER_INFO: '/service-special/public/discoverInfo',
GET_BUILDING: '/service-search/public/buildings?sectId=120324203558281&pageSize=1000&pageNo=1'
}
......@@ -809,14 +809,14 @@ export default {
{
title:'当日新增',
img:'data1.png',
num:'6',
num:'0',
unit:'个',
key: 'today',
},
{
title:'历史累计',
img:'data2.png',
num:'6',
num:'0',
unit:'个',
key: 'total'
},
......@@ -831,19 +831,19 @@ export default {
{
title:'占用消防通道',
img:'xf.png',
num:'1',
num:'0',
key: 'fireExits'
},
{
title:'集中充电异常',
img:'cd.png',
num:'1',
num:'0',
key: 'ebcc'
},
{
title:'楼道充电',
img:'cd.png',
num:'1',
num:'0',
key: 'nonVehicleCharg'
},
{
......@@ -860,25 +860,25 @@ export default {
{
title:'密闭空间监控',
img:'lj.png',
num:'1',
num:'0',
key: 'hermeticSpace'
},
{
title:'窨井监控异常',
img:'ld.png',
num:'1',
num:'0',
key: 'manholeCover'
},
{
title:'电梯运行异常',
img:'dt.png',
num:'1',
num:'0',
key: 'elevatorLock'
},
{
title:'水箱开启异常',
img:'sx.png',
num:'1',
num:'0',
key: 'waterTank'
},
]
......
......@@ -17,12 +17,15 @@
</i-circle>
</div>
<Tabs value="all" size="small" @on-click="handleClick">
<TabPane label="管理提醒" name="all"/>
<TabPane label="要素分析" name="all"/>
<TabPane label="安全类" name="安全"/>
<TabPane label="有序类" name="有序"/>
<TabPane label="干净类" name="干净"/>
</Tabs>
<div class="list">
<div v-if="analysisChart" class="chart">
<m-chart :config="config" :data="data"/>
</div>
<div v-else class="list">
<div
class="item"
v-for="item in datas"
......@@ -42,6 +45,7 @@ export default {
name: 'ManageIssue',
data() {
return {
analysisChart: true,
circles: [
{
title: '安全',
......@@ -60,6 +64,49 @@ export default {
},
],
datas: [],
config: {
colors: ['rgba(143, 214, 24, .9)', 'rgba(1, 167, 255, .9)', 'rgba(254, 233, 2, .9)'],
legend: {hide: true},
shape: [
{key: 'clean', name: '干净', type: 'line', areaStyle: {}},
{key: 'orderly', name: '有序', type: 'line', areaStyle: {}},
{key: 'safe', name: '安全', type: 'line', areaStyle: {}},
],
xAxis: {key: 'date'},
},
data: [
{date: '5月1日', safe: 88.6, orderly: 96.2, clean: 97.1},
{date: '5月2日', safe: 88.6, orderly: 100, clean: 100},
{date: '5月3日', safe: 100, orderly: 88.6, clean: 97.1},
{date: '5月4日', safe: 94.3, orderly: 100, clean: 97.1},
{date: '5月5日', safe: 94.3, orderly: 96.2, clean: 94.2},
{date: '5月6日', safe: 100, orderly: 92.4, clean: 97.1},
{date: '5月7日', safe: 88.6, orderly: 100, clean: 100},
{date: '5月8日', safe: 100, orderly: 84.8, clean: 100},
{date: '5月9日', safe: 94.3, orderly: 100, clean: 100},
{date: '5月10日', safe: 100, orderly: 88.6, clean: 100},
{date: '5月11日', safe: 88.6, orderly: 92.4, clean: 97.1},
{date: '5月12日', safe: 100, orderly: 92.4, clean: 100},
{date: '5月13日', safe: 100, orderly: 100, clean: 97.1},
{date: '5月14日', safe: 94.3, orderly: 100, clean: 97.1},
{date: '5月15日', safe: 88.6, orderly: 92.4, clean: 100},
{date: '5月16日', safe: 100, orderly: 100, clean: 100},
{date: '5月17日', safe: 100, orderly: 100, clean: 100},
{date: '5月18日', safe: 100, orderly: 96.2, clean: 100},
{date: '5月19日', safe: 100, orderly: 100, clean: 100},
{date: '5月20日', safe: 94.3, orderly: 100, clean: 97.1},
{date: '5月21日', safe: 82.9, orderly: 96.2, clean: 97.1},
{date: '5月22日', safe: 100, orderly: 100, clean: 97.1},
{date: '5月23日', safe: 100, orderly: 92.4, clean: 97.1},
{date: '5月24日', safe: 94.3, orderly: 96.2, clean: 100},
{date: '5月25日', safe: 100, orderly: 96.2, clean: 94.2},
{date: '5月26日', safe: 100, orderly: 100, clean: 100},
{date: '5月27日', safe: 100, orderly: 88.6, clean: 97.1},
{date: '5月28日', safe: 94.3, orderly: 100, clean: 100},
{date: '5月29日', safe: 88.6, orderly: 100, clean: 94.2},
{date: '5月30日', safe: 94.3, orderly: 100, clean: 100},
{date: '5月31日', safe: 100, orderly: 100, clean: 97.1},
],
}
},
mounted() {
......@@ -80,9 +127,11 @@ export default {
methods: {
handleClick(name) {
if (name === 'all') {
this.datas = this.list
// this.datas = this.list
this.analysisChart = true
return
}
this.analysisChart = false
this.datas = this.list.filter(item => item.type == name)
}
},
......@@ -117,6 +166,9 @@ $blue = #3391FF
align-items center
height 40%
justify-content space-around
.chart
width 100%
height 50%
.list
flex 1
overflow-y auto
......
<template>
<div class="map-menu" :style="style">
<img @click="$emit('switch')" src="@/assets/images/switch.png"/>
<img @click="$emit('in')" src="@/assets/images/zoomin.png"/>
<img @click="$emit('out')" src="@/assets/images/zoomout.png"/>
<img @click="$emit('full')" src="@/assets/images/full.png"/>
......@@ -45,6 +46,10 @@ export default {
margin-bottom 0.3rem
cursor pointer
transition transform .3s
&:first-child
width 1.4rem
height @width
margin 0 0 .8rem .5rem
&:hover
transform scale(1.5)
</style>
......@@ -41,7 +41,7 @@ export default {
center: [0, 0],
zoom: 5,
}).on(SMap.MapEvent.maploaded, () => {
this.map.showXQ_Poly()
this.map.hideXQ_Poly()
this.map.hideXQ_Point()
this.map.showMPZ()
this.$emit('complete')
......@@ -103,34 +103,50 @@ export default {
},
drawStreet(name, points, color = '#00f2ff') {
this.map.Invoke({
ActionName: 'displayJsonData',
Parameters: JSON.stringify({
name: name,
mode: 'add', //add delete replace
dataArray: [{
points: points.map(item => {
return {
codX: item[0],
codY: item[1],
codZ: 0,
}
})
}],
popupEnabled: false,
legendVisible: false,
type: 'polyline',
renderer: {
type: 'unique-value',
defaultSymbol: {
type: 'simple-line',
color: color,
// color: 'red',
width: 3 * this.sizeRate,
},
},
const line = new SMap.Polyline({
path: [
new SMap.LngLat(0, 0),
new SMap.LngLat(10, 10),
new SMap.LngLat(50, 50)
],
path: points.map(item => new SMap.LngLat(item[0], item[1])),
cap: 'square',
strokeColor: color,
style: 'solid',
lineJoin: 'round',
label: new SMap.Label({
lineWidth: 3 * this.sizeRate,
})
})
this.map.add(line)
// this.map.Invoke({
// ActionName: 'displayJsonData',
// Parameters: JSON.stringify({
// name: name,
// mode: 'add', //add delete replace
// dataArray: [{
// points: points.map(item => {
// return {
// codX: item[0],
// codY: item[1],
// codZ: 0,
// }
// })
// }],
// popupEnabled: false,
// legendVisible: false,
// type: 'polyline',
// renderer: {
// type: 'unique-value',
// defaultSymbol: {
// type: 'simple-line',
// color: color,
// // color: 'red',
// width: 3 * this.sizeRate,
// },
// },
// })
// })
},
/**
......@@ -273,6 +289,7 @@ export default {
focus(x, y, zoom = 6) {
this.map.setCenter(x, y)
this.map.setZoom(zoom)
this.map.setZoomAndCenter(zoom, [x, y])
},
/**
......
......@@ -26,7 +26,7 @@
<BasicData />
</m-card>
<m-card v-show="complete" enter="fadeInLeft" leave="fadeOutLeft" area="box8" title="管理要素" mode="4" btn="模型">
<ManageIssue showList/>
<ManageIssue v-if="complete" showList/>
</m-card>
<m-card v-show="complete" area="box10" title="辅助应用" mode="4">
<Application @elevator="showEleMap = true"/>
......@@ -62,7 +62,7 @@
<m-card v-show="complete" enter="fadeInUp" leave="fadeOutDown" area="box7" title="联勤联动动态流程" :width="25" mode="4">
<Handle v-if="complete"/>
</m-card>
<MapMenu :full="complete" @full="complete = !complete" @in="$refs.map.zoomIn()" @out="$refs.map.zoomOut()"/>
<MapMenu :full="complete" @switch="handleSwitchIcon" @full="complete = !complete" @in="$refs.map.zoomIn()" @out="$refs.map.zoomOut()"/>
<StreetMenu @select="handleStreetSelect"/>
<m-modal :value="$store.state.showElementModal" @close="$store.commit('SET_ELEMENTMODAL', false)" width="85%" title="管理要素明细">
<IssueDetail />
......@@ -77,6 +77,10 @@
<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>
<div class="icon-wrapper">
<p><img src="@/assets/images/no-warn.png"/>未报警传感器</p>
<p><img src="@/assets/images/warn.png"/>已报警传感器</p>
</div>
</m-grid>
</template>
......@@ -95,6 +99,7 @@ import ManageIssue from './components/manage-issue'
import Application from './components/application'
import ImgContainer from './components/img-container'
import IssueDetail from './components/issue-detail'
import NewMap from './components/new-map'
import {mapActions} from 'vuex'
export default {
......@@ -114,6 +119,7 @@ export default {
Application,
ImgContainer,
IssueDetail,
NewMap,
},
data() {
return {
......@@ -121,6 +127,7 @@ export default {
curTitle: '',
complete: false,
showEleMap: false,
openIcon: true,
remindList: [
{key: 'linyi', title: '临沂二村', total: 17, detail: [
{title: '屋顶漏水', num: 6},
......@@ -133,6 +140,7 @@ export default {
{key: 'mingcheng', title: '铭城园', total: 2, detail: [{title: '垃圾分类', num: 2}]},
{key: 'sihao', title: '浦三路12弄4号大楼', total: 0, detail: []},
],
sensorList: [],
options: {direction: 2, limitMoveNum: 2},
remindModal: false,
remindLayout: [
......@@ -193,16 +201,25 @@ export default {
this.initLinyiData()
setTimeout(() => {
this.complete = true
this.startTimer()
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: 18, labelKey: 'unitAddr', key: 'id', data: data, icon: 'icon-unit.png'})
})
},
handleMapClick({layername, data}) {
const {map} = this.$refs
switch (layername) {
......@@ -227,6 +244,10 @@ export default {
this.eventData = Array.isArray(data) ? data : [data]
this.showEventModal = true
},
handleSwitchIcon() {
this.openIcon = !this.openIcon
this.addPoints()
},
addPoints() {
// const data = [
// {TASKID:'(补)临沂二村', COMMUNITYID: '(补)临沂二村', msg: {img: '1.png', type: '屋顶违建', method: '物联传感'}, X: 3706.690186, Y: -4234.159912},
......@@ -239,30 +260,22 @@ export default {
const {map} = this.$refs
map.removePoint('sensor')
map.removeGifPoint('sensor')
if (this.openIcon) {
this.$ajax.get({
url: this.$api.GET_SENSOR,
}).then(res => {
let sensorList = this.$com.confirm(res, 'data.content', [])
sensorList.forEach(sensor => {
sensor._status = sensor.state == '1' ? '报警' : '正常'
sensor.state == '1' ? sensor.icon = 'red.png' : null
sensor.state == '1' ? sensor.icon = 'warn.png' : null
})
map.addPoint({name: 'sensor', key: 'id', data: sensorList, icon: 'yellow.png'})
// const normal = [], warn = []
// sensorList.forEach(sensor => {
// if (sensor.state == '1') {
// warn.push(sensor)
// } else {
// normal.push(sensor)
// }
// })
// map.addPoint({name: 'sensor', key: 'id', data: normal, icon: 'blue.png'})
// map.addGifPoint({name: 'sensor', key: 'id', data: warn, icon: 'red.png'})
this.sensorList = sensorList
map.addPoint({name: 'sensor', key: 'id', data: sensorList, icon: 'no-warn.png'})
})
}
this.$ajax.get({
url: this.$api.GET_DISCOVER_INFO,
}).then(res => {
console.log('res', 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))
......@@ -277,6 +290,7 @@ export default {
this.$store.commit('SET_DISCOVERYLIST', originSum)
this.$store.commit('SET_FOUNDLIST', originData)
})
this.addBuildingIcon()
},
handleStreetSelect(index, name) {
if (name === '临沂二村') return
......@@ -297,6 +311,17 @@ export default {
}
</script>
<style lang="stylus" scoped>
.icon-wrapper
position fixed
bottom 22%
left 28%
p
display flex
align-items center
margin-bottom 1rem
img
width 1.2rem
margin-right 0.5rem
.analysis-wrapper
height 100%
width 100%
......@@ -315,13 +340,12 @@ export default {
overflow hidden
width 14rem
margin-right .5rem
&:first-child
color $fontColor
&:nth-child(2)
width 3rem
text-align right
b
color $edgeColor
font-size 1.1rem
margin-right .2rem
img
width 1.2rem
......
......@@ -62,7 +62,7 @@
<Operation />
</m-card>
<m-card v-show="complete" enter="fadeInLeft" leave="fadeOutLeft" area="box8" title="管理要素" mode="4" btn="模型">
<ManageIssue />
<ManageIssue v-if="complete"/>
</m-card>
<m-card v-show="complete" area="box3" title="投诉报修" mode="4">
<Repair />
......
......@@ -26,7 +26,7 @@
<BasicData />
</m-card>
<m-card v-show="complete" enter="fadeInLeft" leave="fadeOutLeft" area="box8" title="管理要素" mode="4" btn="list">
<ManageIssue showList/>
<ManageIssue v-if="complete" showList/>
</m-card>
<m-card v-show="complete" area="box10" title="辅助应用" mode="4">
<Application @elevator="showEleMap = true"/>
......
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