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

区分街镇

parent 3da9fa44
......@@ -16,7 +16,7 @@
<!-- built files will be auto injected -->
</body>
<script src="./static/hls.js"></script>
<!-- <script src="./static/SMap.min.js"></script> -->
<script src="./static/esm/SMap.min.js"></script>
<script src="./static/SMap.min.js"></script>
<!-- <script src="./static/esm/SMap.min.js"></script> -->
<script src="./static/Plugins.min.js"></script>
</html>
......@@ -122,6 +122,7 @@ export default {
strokeWeight,
label,
})
// console.log('000', this.map, polygon)
this.map.add(polygon)
},
// 添加边界
......
......@@ -8,7 +8,7 @@ Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
path: '*',
name: 'main',
component: Main,
},
......
......@@ -2,17 +2,18 @@ import ajax from '@/server/ajax'
import api from '@/server/api'
import com from '@/util/common'
import moment from 'moment'
const curStreet = '新江湾城街道'
let curStreet = '新江湾城街道'
let streetId = null
export default {
initData({dispatch, state}) {
streetId = state.currentStreetInfo.id
curStreet = state.currentStreetInfo.name
dispatch('getGreenInfo')
dispatch('getDiscoverTrend')
dispatch('getRepairRate')
dispatch('getResourceSum')
// dispatch('getCheckSum')
dispatch('getCheckSum')
dispatch('getGridSum')
dispatch('getPopulationInfo')
dispatch('getPatrolList')
......@@ -57,11 +58,11 @@ export default {
commit('SET_RESOURCE_SUM', com.confirm(res, 'data.content', {}))
})
},
// getCheckSum({commit}) {
// ajax.get({url: api.GET_CHECK_SUM}).then(res => {
// commit('SET_CHECK_SUM', com.confirm(res, 'data.content', {}))
// })
// },
getCheckSum({commit}) {
ajax.get({url: api.GET_CHECK_SUM, params: {streetId}}).then(res => {
commit('SET_CHECK_SUM', com.confirm(res, 'data.content', {}))
})
},
async getGridSum({commit}) {
const start = moment().add(-10, 'days').format('YYYY-MM-DD')
const end = moment().format('YYYY-MM-DD')
......@@ -82,53 +83,56 @@ export default {
commit('SET_LAND_POPULATION_INFO', result)
}
},
getPatrolList({commit}) {
getPatrolList({commit, state}) {
let result = []
setTimeout(() => {
const 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
}
]
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
}
]
}
commit('SET_PATROL_LIST', result)
}, 3000)
},
......@@ -166,7 +170,11 @@ export default {
})
},
getHandleList({commit}) { // 获取并全局设置联勤联动处置列表
ajax.get({url: api.GET_HANDLE_LIST, params: {streetId}}).then(res => {
ajax.get({url: api.GET_HANDLE_LIST, params: {state_ne: 5, streetId}}).then(res => {
// const data = com.confirm(res, 'data.content', [])
// if (data.length === 0) {
// console.log('=========', res, moment().format('MM-DD HH:mm:ss'), '============')
// }
commit('SET_HANDLE_LIST', com.confirm(res, 'data.content', []))
})
},
......
This diff is collapsed.
......@@ -23,7 +23,10 @@
<m-step class="combine-step" :steps="steps" :current="getCurrent(item)" />
</div>
</m-scroll>
<div v-else class="no-data">— 暂无数据 —</div>
<div v-else class="no-data">
<img src="@/assets/images/building.png" />
<p>— 暂无数据 —</p>
</div>
</div>
</template>
......@@ -64,9 +67,14 @@ export default {
<style lang="stylus" scoped>
.combine
.no-data
$flex-center()
flex-direction column
width 100%
height 100%
$flex-center()
color #999
img
width .35rem
height @width
.detail
background $section-bg
padding .05rem .1rem .2rem
......
......@@ -14,22 +14,24 @@
<script>
export default {
name: 'Command',
data() {
return {
list: [
computed: {
list() {
const {currentStreetInfo, streetInfo} = this.$store.state
const {master1, master2} = streetInfo[currentStreetInfo.id]
return [
{
img: 'command1.png',
label: '指挥长',
name: '卞洪斌',
name: master1,
},
{
img: 'command2.png',
label: '值班长',
name: '丁建新',
name: master2,
},
]
}
},
},
}
}
</script>
......
<template>
<div class="defense">
<p>民防建筑总数 <m-count style="color:#6ae7b5" :value="190" :decimal="0"/>/<m-count :value="208" :decimal="0"/></p>
<p>民防建筑总数 <m-count style="color:#6ae7b5" :value="data.num" :decimal="0"/>/<m-count :value="data.totalNum" :decimal="0"/></p>
<div class="bar">
<div class="inner green" style="background:#6ae7b5;width:91%;"></div>
<div class="inner green" :style="`background:#6ae7b5;width:${data.num / data.totalNum * 100}%;`"></div>
</div>
<p>使用面积 <m-count style="color:#ff9502" :value="308433" /> <span class="unit"></span></p>
<p>建筑面积 <m-count :value="606413.35" /> <span class="unit"></span></p>
<p>使用面积 <m-count style="color:#ff9502" :value="data.area" /> <span class="unit"></span></p>
<p>建筑面积 <m-count :value="data.totalArea" /> <span class="unit"></span></p>
<div class="bar">
<div class="inner red" style="background:#ff9502;width:51%;"></div>
<div class="inner red" :style="`background:#ff9502;width:${data.area / data.totalArea * 100}%;`"></div>
</div>
</div>
</template>
......@@ -15,9 +15,12 @@
<script>
export default {
name: 'Defense',
data() {
return {}
},
computed: {
data() {
const {currentStreetInfo, streetInfo} = this.$store.state
return streetInfo[currentStreetInfo.id]
},
}
}
</script>
......
......@@ -10,7 +10,7 @@
</div>
</div>
<div class="detail">
<m-scroll :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 === '逾期'}">
<h5>{{item.name}}</h5>
<div>
......@@ -30,6 +30,10 @@
<img v-if="item.status === '逾期'" src="@/assets/images/overtime.png" />
</div>
</m-scroll>
<div v-else class="no-data">
<img src="@/assets/images/building.png" />
<p>— 暂无数据 —</p>
</div>
</div>
</div>
</template>
......@@ -39,16 +43,11 @@ export default {
name: 'Patrol',
computed: {
sum() {
// const {totalOrder, undoneOrder, overdueOrder} = this.$store.state.checkSum
// return [
// {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'},
// ]
const {totalOrder, undoneOrder, overdueOrder} = this.$store.state.checkSum
return [
{name: '逾期整改单', value: 4, unit: '个', img: 'patrol1.png', color: '#ff1e1e'},
{name: '整改单总数', value: 4, unit: '个', img: 'patrol2.png', color: '#fece34'},
{name: '巡检总数', value: 463, unit: '次', img: 'patrol3.png', color: '#00beff'},
{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'},
]
}
},
......@@ -59,6 +58,15 @@ export default {
.patrol
display flex
flex-direction column
.no-data
$flex-center()
flex-direction column
width 100%
height 100%
color #999
img
width .35rem
height @width
h5
font-size .1rem
.sum
......
......@@ -19,7 +19,10 @@
</div>
<div class="chart">
<m-chart v-if="discoverTrend.length > 0" :config="config" :data="discoverTrend" :options="options" />
<div v-else class="no-data">— 暂无数据 —</div>
<div v-else class="no-data">
<img src="@/assets/images/building.png" />
<p>— 暂无数据 —</p>
</div>
</div>
</div>
</template>
......@@ -84,9 +87,14 @@ export default {
<style lang="stylus" scoped>
.smart-discover
.no-data
$flex-center()
flex-direction column
width 100%
height 100%
$flex-center()
color #999
img
width .35rem
height @width
.sum
display flex
margin-bottom .05rem
......
......@@ -31,7 +31,7 @@
<m-form :label-width=".6" :model="patrolData" :layout="patrolLayout" />
</m-modal>
<m-modal title="指挥体系" :value="showCommandModal" @close="$store.commit('SET_COMMAND_MODAL', false)">
<m-form :label-width=".7" :model="commandData" :layout="commandLayout" />
<m-form :label-width=".7" :model="streetInfo[currentStreetInfo.id]" :layout="streetInfo[currentStreetInfo.id].layout" />
</m-modal>
<m-modal title="鹰眼监控" v-model="videoModal">
<VideoComponent v-if="videoModal" :videoSrc="videoSrc" />
......@@ -172,10 +172,9 @@ export default {
computed: {
...mapState([
'currentStreetInfo',
'streetInfo',
'curSmartType',
'xinjiangwanPaths',
'commandLayout',
'commandData',
'showCommandModal',
'patrolList',
'handleList',
......@@ -211,13 +210,18 @@ export default {
}, 1000 * 60 * 1)
},
init() {
const {name, id} = this.currentStreetInfo
document.querySelector('title').innerText = `${name}城市运行平台`
const {map} = this.$refs
this.initMapFocus()
map.addPolygon({paths: this.xinjiangwanPaths, fillColor: 'rgba(51,145,255,.3)'})
map.addBoundary({name: '新江湾城'})
map.addPolygon({paths: this.$store.state.streetPaths[id], fillColor: 'rgba(51,145,255,.3)'})
map.addBoundary({name: name})
},
initMapFocus() {
this.$refs.map.focus(3489.0714111328125, 10384.431030273437, 4.5)
const {id} = this.currentStreetInfo
// this.$refs.map.focus(3489.0714111328125, 10384.431030273437, 4.5)
this.$refs.map.focus(...this.$store.state.streetPaths[id][0], 4.5)
},
handleMapClick(data) {
if (data.key === 'patrol') {
......
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