Commit d6ccd533 authored by 郭铭瑶's avatar 郭铭瑶 🤘

分街镇

parent d23f7737
......@@ -70,7 +70,7 @@ export default {
image: require(`@/assets/images/${item.icon || icon}`),
}),
attributes: {key, ...item},
position: [item.X || item.x || item.gpsx, item.Y || item.y || item.gpsy, 0],
position: [item.communityMinx || item.X || item.x || item.gpsx, item.communityMiny || item.Y || item.y || item.gpsy, 0],
}
if (labelKey) {
result.label = new SMap.Label({
......
......@@ -17,6 +17,7 @@ export default {
GET_REPAIR_RATE: '/service-documents-ddd/public/unsolved/repair/type/count', // 投诉报修比例图
GET_RESOURCE_SUM: '/service-basicdatasync-ddd/public/resource/count', // 房屋物业统计数字
GET_CHECK_SUM: '/service-documents-ddd/public/checkorder/count', // 主动巡检统计数字
GET_CHECK_LIST: '/service-documents-ddd/public/v1/need/rectification/check/order/list', // 巡检列表
GET_DISCOVER_INFO: '/service-special-ddd/public/discoverInfo', // 智能发现数目
GET_TS_BX: '/service-documents-ddd/public/repair/complaint', // 投诉报修数目
GET_HANDLE_LIST: '/service-special-ddd/public/alarm/index', // 联勤联动列表
......
......@@ -3,11 +3,13 @@ import api from '@/server/api'
import com from '@/util/common'
import moment from 'moment'
let curStreet = '新江湾城街道'
let hold_eq = null
let streetId = null
export default {
initData({dispatch, state}) {
streetId = state.currentStreetInfo.id
hold_eq = state.currentStreetInfo.houseId
curStreet = state.currentStreetInfo.name
dispatch('getGreenInfo')
dispatch('getDiscoverTrend')
......@@ -44,12 +46,16 @@ export default {
})
},
getRepairRate({commit}) {
const list = ['水', '堵', '险', '电', '漏', '其他']
ajax.get({url: api.GET_REPAIR_RATE, params: {streetId}}).then(res => {
const data = com.confirm(res, 'data.content', [])
const result = data.map(item => ({
name: item.troubleType,
value: +item.count || 0,
}))
const result = list.map(name => {
const cur = data.find(item => item.troubleType === name)
return {
name,
value: (cur && +cur.count) || 0
}
})
commit('SET_REPAIR_RATE', result)
})
},
......@@ -83,58 +89,70 @@ export default {
commit('SET_LAND_POPULATION_INFO', result)
}
},
getPatrolList({commit, state}) {
let result = []
setTimeout(() => {
if (state.currentStreetInfo.id === 310110020000) { // 新江湾数据
result = [
{
name: '建发新江湾华苑二期',
event: '未落实每日自查',
time: '2020-10-21',
status: '逾期',
submit: '朱煜东',
department: '新江湾城街道房屋管理办事处',
theme: '市物业中心-住宅小区日常巡查2020.10',
x: 3249.901,
y: 9338.801
}, {
name: '建发新江湾华苑一期',
event: '未落实每日自查',
time: '2020-10-01',
status: '逾期',
submit: '朱煜东',
department: '新江湾城街道房屋管理办事处',
theme: '市物业中心-住宅小区日常巡查2020.10',
x: 3161.201,
y: 9327.401
},
{
name: '嘉誉园',
event: '车库挡水板未配置',
time: '2020-06-12',
status: '逾期',
submit: '俞泓',
department: '新江湾城街道房屋管理办事处',
theme: '2020年住宅小区防汛防台检查',
x: 3580.401,
y: 10968.201
},
{
name: '东方锦园',
event: '未落实每日自查',
time: '2020-02-07',
status: '逾期',
submit: '黄麒玮',
department: '新江湾城街道房屋管理办事处',
theme: '2020年上海市住宅小区疫情防控专项检查',
x: 2719.201,
y: 8474.801
}
]
getPatrolList({commit}) {
// let result = []
// setTimeout(() => {
// if (state.currentStreetInfo.id === 310110020000) { // 新江湾数据
// result = [
// {
// communityName: '建发新江湾华苑二期',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-10-21',
// checkStateName: '逾期',
// checkPersonName: '朱煜东',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '市物业中心-住宅小区日常巡查2020.10',
// communityMinx: 3249.901,
// communityMiny: 9338.801
// }, {
// communityName: '建发新江湾华苑一期',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-10-01',
// checkStateName: '逾期',
// checkPersonName: '朱煜东',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '市物业中心-住宅小区日常巡查2020.10',
// communityMinx: 3161.201,
// communityMiny: 9327.401
// },
// {
// communityName: '嘉誉园',
// orderTypeName: '车库挡水板未配置',
// checkTime: '2020-06-12',
// checkStateName: '逾期',
// checkPersonName: '俞泓',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '2020年住宅小区防汛防台检查',
// communityMinx: 3580.401,
// communityMiny: 10968.201
// },
// {
// communityName: '东方锦园',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-02-07',
// checkStateName: '逾期',
// checkPersonName: '黄麒玮',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '2020年上海市住宅小区疫情防控专项检查',
// communityMinx: 2719.201,
// communityMiny: 8474.801
// }
// ]
// }
// commit('SET_PATROL_LIST', result)
// }, 3000)
ajax.get({
url: api.GET_CHECK_LIST,
params: {
hold_eq,
pageSize: 10000,
nearlyMonth: 12,
orderType_in: '0,1,2,3',
}
commit('SET_PATROL_LIST', result)
}, 3000)
}).then(res => {
commit('SET_PATROL_LIST', com.confirm(res, 'data.content', []))
})
},
getDiscoverInfo({commit}) {
ajax.get({
......
......@@ -64,20 +64,20 @@ const commandLayout2 = [
]
export default {
streets: [
{id: 310110001000, name: '定海路街道'},
{id: 310110006000, name: '平凉路街道'},
{id: 310110008000, name: '江浦路街道'},
{id: 310110009000, name: '四平路街道'},
{id: 310110012000, name: '控江路街道'},
{id: 310110013000, name: '长白新村街道'},
{id: 310110015000, name: '延吉新村街道'},
{id: 310110016000, name: '殷行街道'},
{id: 310110018000, name: '大桥街道'},
{id: 310110019000, name: '五角场街道'},
{id: 310110020000, name: '新江湾城街道'},
{id: 310110101000, name: '长海路街道'},
{id: 310110001000, name: '定海路街道', houseId: 310110000169},
{id: 310110006000, name: '平凉路街道', houseId: 310110000167},
{id: 310110008000, name: '江浦路街道', houseId: 310110000177},
{id: 310110009000, name: '四平路街道', houseId: 310110000170},
{id: 310110012000, name: '控江路街道', houseId: 310110000171},
{id: 310110013000, name: '长白新村街道', houseId: 310110000173},
{id: 310110015000, name: '延吉新村街道', houseId: 310110000172},
{id: 310110016000, name: '殷行街道', houseId: 310110000176},
{id: 310110018000, name: '大桥街道', houseId: 310110000166},
{id: 310110019000, name: '五角场街道', houseId: 310110000174},
{id: 310110020000, name: '新江湾城街道', houseId: 310110000168},
{id: 310110101000, name: '长海路街道', houseId: 310110000175},
],
currentStreetInfo: {id: 310110020000, name: '新江湾城街道'},
currentStreetInfo: {id: 310110020000, name: '新江湾城街道', houseId: 310110000168},
showLoading: false,
curDate: null,
curSmartType: null,
......
<template>
<div class="combine">
<m-scroll v-if="list.length > 0" :length="list.length" :limit="2">
<m-scroll v-if="list.length > 0" :length="list.length" :limit="$store.state.currentStreetInfo.name === '新江湾城街道' ? 2 : 3">
<div @click="$emit('select', item)" class="detail" v-for="item in list" :key="item.id">
<div>
<h5>{{item.communityName}}</h5>
......
......@@ -15,7 +15,7 @@
</div>
</div>
<img class="branch" src="@/assets/images/branch.png" />
<div class="chart">
<div class="chart" v-if="showChart">
<m-chart :config="config" :data="$store.state.repairRate" :options="options" />
</div>
</div>
......@@ -26,6 +26,7 @@ export default {
name: 'ComplaintRepair',
data() {
return {
showChart: false,
config: {
colors: ['#5bd4ff', '#72c011', '#fece35', '#ff6160', '#826bfa', '#cccccc'],
tooltip: {
......@@ -55,13 +56,16 @@ export default {
tarValue = data[i].value
}
}
const percent = (tarValue / total * 100).toFixed(2)
const percent = (tarValue / total * 100).toFixed(0)
return `${name} ${percent}%`
}
}
}
}
},
mounted() {
setTimeout(() => this.showChart = true, 100)
},
computed: {
list() {
const {repairInfo} = this.$store.state
......
<template>
<div class="green">
<div class="chart"><m-chart :config="config" :data="data" /></div>
<div class="chart" v-if="showChart"><m-chart :config="config" :data="data" /></div>
<div class="info">
<div v-for="(item, i) in data" :key="item.name">
<span class="dot" :style="`border-color:${config.colors[i]}`"/>
......@@ -17,6 +17,7 @@ export default {
name: 'Green',
data() {
return {
showChart: false,
config: {
colors: ['#fe7403', '#ffd400', '#33c5ff'],
legend: {hide: true},
......@@ -28,6 +29,9 @@ export default {
},
}
},
mounted() {
setTimeout(() => this.showChart = true, 100)
},
computed: {
data() {
return this.$store.state.greenInfo
......
......@@ -70,7 +70,9 @@ export default {
width 100%
height 100%
>div
flex 1
// flex 1
width 50%
height 100%
&.left
>div
&:nth-child(1)
......
......@@ -11,23 +11,23 @@
</div>
<div class="detail">
<m-scroll v-if="$store.state.patrolList.length > 0" :length="$store.state.patrolList.length" mode="2" :limit="2" :step="0.75">
<div @click="$emit('select', {...item, key: 'patrol'})" class="info" v-for="(item, i) in $store.state.patrolList" :key="item.name+i" :class="{over: item.status === '逾期'}">
<h5>{{item.name}}</h5>
<div @click="$emit('select', {...item, key: 'patrol'})" class="info" v-for="(item, i) in $store.state.patrolList" :key="item.communityName+i" :class="{over: item.checkStateName === '逾期' || item.checkStateName.indexOf('未完结') >= 0}">
<h5>{{item.communityName}}</h5>
<div>
<div>
<p>整改事项</p>
<p>{{item.event}}</p>
<p>{{item.orderTypeName}}</p>
</div>
<div>
<p>发现时间</p>
<p>{{item.time}}</p>
<p>{{item.checkTime}}</p>
</div>
<div>
<p>上报人</p>
<p>{{item.submit}}</p>
<p>{{item.checkPersonName}}</p>
</div>
</div>
<img v-if="item.status === '逾期'" src="@/assets/images/overtime.png" />
<img v-if="item.checkStateName === '逾期' || item.checkStateName.indexOf('未完结') >= 0" src="@/assets/images/overtime.png" />
</div>
</m-scroll>
<div v-else class="no-data">
......@@ -45,7 +45,7 @@ export default {
sum() {
const {totalOrder, undoneOrder, overdueOrder} = this.$store.state.checkSum
return [
{name: '逾期整改单', value: +overdueOrder || 0, unit: '个', img: 'patrol1.png', color: '#ff1e1e'},
{name: '未完结整改单', value: +overdueOrder || 0, unit: '个', img: 'patrol1.png', color: '#ff1e1e'},
{name: '整改单总数', value: +undoneOrder || 0, unit: '个', img: 'patrol2.png', color: '#fece34'},
{name: '巡检总数', value: +totalOrder || 0, unit: '次', img: 'patrol3.png', color: '#00beff'},
]
......
......@@ -9,7 +9,7 @@
<div class="right">
<m-card title="主动巡检"><Patrol @select="$emit('patrol', $event)" /></m-card>
<m-card title="联勤联动"><Combine @select="$emit('handle', $event)"/></m-card>
<m-card title="鹰眼监控">
<m-card title="鹰眼监控" v-if="$store.state.currentStreetInfo.name === '新江湾城街道'">
<div class="monitor-video">
<div v-for="(img, i) in imgs" @click="handleClick(i)" :key="img" :style="`background-image: url(${require(`@/assets/images/${img}`)})`">
<div><img src="@/assets/images/play.png"/></div>
......@@ -79,7 +79,9 @@ export default {
width 100%
height 100%
>div
flex 1
// flex 1
width 50%
height 100%
&.left
>div
&:nth-child(1)
......@@ -87,10 +89,13 @@ export default {
&:nth-child(2)
height 30%
&.right
display flex
flex-direction column
>div
&:nth-child(1)
&:nth-child(2)
height 40%
&:nth-child(2)
flex 1
&:nth-child(3)
height 20%
.monitor-video
......
......@@ -17,7 +17,7 @@
</div>
</div>
</div>
<div class="chart">
<div v-if="showChart" class="chart">
<m-chart v-if="discoverTrend.length > 0" :config="config" :data="discoverTrend" :options="options" />
<div v-else class="no-data">
<img src="@/assets/images/building.png" />
......@@ -32,6 +32,7 @@ export default {
name: 'SmartDiscover',
data() {
return {
showChart: false,
config: {
colors: ['#FFCE34', '#826AFA'],
legend: {
......@@ -52,6 +53,9 @@ export default {
}
}
},
mounted() {
setTimeout(() => this.showChart = true, 100)
},
computed: {
discoverTrend() {
return this.$store.state.discoverTrend
......@@ -143,7 +147,8 @@ export default {
color $color-yellow
.chart
width 100%
height 40%
height 39%
margin-top .05rem
background-image url('../../assets/images/chart-bg.png')
background-size 100% 100%
background-repeat no-repeat
......
......@@ -4,8 +4,8 @@
'title title title',
'left . right',
]"
columns="1fr 1fr 1fr"
rows="0.4rem 1fr"
columns="33.3vw auto 33.3vw"
rows="0.4rem auto"
gap="0.05rem"
:complete="complete"
>
......@@ -131,37 +131,37 @@ export default {
// ],
patrolLayout: [
{
name: {
communityName: {
label: '小区名称',
width: 12,
},
event: {
orderTypeName: {
label: '整改事项',
width: 12,
},
},
{
time: {
checkTime: {
label: '发现时间',
width: 12,
},
status: {
checkStateName: {
label: '整改状态',
width: 12,
},
},
{
submit: {
checkPersonName: {
label: '上报人',
width: 12,
},
department: {
hoName: {
label: '房办名称',
width: 12,
},
},
{
theme: {
tcName: {
label: '检查主题',
width: 24,
},
......@@ -196,6 +196,8 @@ export default {
'getDiscoverInfo',
'getRepairInfo',
'getHandleList',
'getCheckSum',
'getPatrolList',
]),
mapComplete() {
this.init()
......@@ -206,6 +208,8 @@ export default {
this.getRepairRate()
this.getDiscoverInfo()
this.getRepairInfo()
this.getCheckSum()
this.getPatrolList()
this.getHandleList()
}, 1000 * 60 * 1)
},
......
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