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

分街镇

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