Commit 3da9fa44 authored by 郭铭瑶's avatar 郭铭瑶 🤘

加入街镇判断,传参调接口

parent 8d0bad7c
......@@ -5,8 +5,8 @@
<span>{{curDate}}</span>
</DatePicker>
</span> -->
<div class="btn back" @click="toAli" />
<div class="btn close" @click="toAli" />
<div class="btn back" @click="closePage" />
<div class="btn close" @click="closePage" />
<span v-if="!hideTime" class="moment time">
<!-- <span class="switch"><img src="@/assets/images/switch.png"/> 切换街道</span> -->
{{curDate}} {{time}}
......@@ -88,8 +88,11 @@ export default {
this.$store.commit('SET_CURDATE', date)
this.openDatePicker = false
},
toAli() {
window.location = 'http://10.89.1.208/share/ypdp'
// toAli() {
// window.location = 'http://10.89.1.208/share/ypdp'
// },
closePage() {
window.close()
},
}
}
......@@ -106,6 +109,7 @@ export default {
// font-family $font-pang
font-weight bold
>.btn
display block
position absolute
width .2rem
height @width
......
......@@ -3,9 +3,11 @@ import api from '@/server/api'
import com from '@/util/common'
import moment from 'moment'
const curStreet = '新江湾城街道'
let streetId = null
export default {
initData({dispatch}) {
initData({dispatch, state}) {
streetId = state.currentStreetInfo.id
dispatch('getGreenInfo')
dispatch('getDiscoverTrend')
dispatch('getRepairRate')
......@@ -29,7 +31,7 @@ export default {
getDiscoverTrend({commit}) {
ajax.get({
url: api.GET_DISCOVER_TREND,
params: {days: 10}
params: {days: 10, streetId}
}).then(res => {
const {content} = res.data
const keys = (content && Object.keys(content)) ||[]
......@@ -41,7 +43,7 @@ export default {
})
},
getRepairRate({commit}) {
ajax.get({url: api.GET_REPAIR_RATE}).then(res => {
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,
......@@ -51,15 +53,15 @@ export default {
})
},
getResourceSum({commit}) {
ajax.get({url: api.GET_RESOURCE_SUM}).then(res => {
ajax.get({url: api.GET_RESOURCE_SUM, params: {streetId}}).then(res => {
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}).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')
......@@ -133,6 +135,7 @@ export default {
getDiscoverInfo({commit}) {
ajax.get({
url: api.GET_DISCOVER_INFO,
params: {streetId},
}).then(res => {
const sum = {total: 0, today: 0}
const data = com.confirm(res, 'data.content', [])
......@@ -152,6 +155,7 @@ export default {
getRepairInfo({commit}) {
ajax.get({
url: api.GET_TS_BX,
params: {streetId},
}).then(res => {
const data = com.confirm(res, 'data.content', {})
const result = [
......@@ -162,7 +166,7 @@ export default {
})
},
getHandleList({commit}) { // 获取并全局设置联勤联动处置列表
ajax.get({url: api.GET_HANDLE_LIST}).then(res => {
ajax.get({url: api.GET_HANDLE_LIST, params: {streetId}}).then(res => {
commit('SET_HANDLE_LIST', com.confirm(res, 'data.content', []))
})
},
......
export default {
SET_CURRENT_STREET(state, name) {
if (!name) return
state.currentStreetInfo = state.streets.find(street => street.name.indexOf(name) >= 0)
},
SET_LOADING(state, val) {
state.showLoading = val
},
......
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: '五角场镇'},
],
currentStreetInfo: {id: 310110020000, name: '新江湾城街道'},
showLoading: false,
curDate: null,
curSmartType: null,
......
......@@ -10,7 +10,7 @@
:complete="complete"
>
<m-map ref="map" @complete="mapComplete" @event="handleMapClick"/>
<m-title area="title" :bgImg="require('@/assets/images/title-bg.png')">新江湾城街道城市运行平台</m-title>
<m-title area="title" :bgImg="require('@/assets/images/title-bg.png')">{{currentStreetInfo.name}}城市运行平台</m-title>
<m-animate enter="fadeInLeft" leave="fadeOutLeft">
<LeftComponent v-show="!fullView" area="left"/>
</m-animate>
......@@ -171,6 +171,7 @@ export default {
},
computed: {
...mapState([
'currentStreetInfo',
'curSmartType',
'xinjiangwanPaths',
'commandLayout',
......@@ -180,6 +181,10 @@ export default {
'handleList',
])
},
beforeCreate() {
const {name} = this.$route.query
this.$store.commit('SET_CURRENT_STREET', name)
},
beforeDestroy() {
clearInterval(this.timer)
this.timer = null
......
### 环卫公厕数
http://10.89.1.208:10005/dc/countToiletsByStreet?street=新江湾街道
> 返回示例:
>
> 22
---
### 垃圾收集点数
http://10.89.1.208:10005/dc/countPointsByStreet?street=新江湾街道
> 返回示例:
>
> 110
---
### 小型压缩站数
http://10.89.1.208:10005/dc/countCompressStationsByStreet?street=新江湾街道
> 返回示例:
>
> 8
---
### 智能发现趋势
http://yangpu.hm.omniview.pro/api/service-special-ddd/public/alarm/unremoved/statistics?days=10
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"content": {
"20201031": {
"created": 30,
"done": 0
},
"20201101": {
"created": 36,
"done": 0
},
"20201102": {
"created": 23,
"done": 0
},
"20201103": {
"created": 32,
"done": 0
},
"20201104": {
"created": 43,
"done": 0
},
"20201105": {
"created": 33,
"done": 0
},
"20201106": {
"created": 31,
"done": 0
},
"20201107": {
"created": 48,
"done": 0
},
"20201108": {
"created": 47,
"done": 0
},
"20201109": {
"created": 65,
"done": 0
}
}
}
}
```
---
### 投诉报修比例
http://yangpu.hm.omniview.pro/api/service-documents-ddd/public/unsolved/repair/type/count
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"content": [
{
"count": 29,
"troubleType": "堵"
},
{
"count": 14,
"troubleType": "水"
},
{
"count": 50,
"troubleType": "漏"
},
{
"count": 21,
"troubleType": "电"
},
{
"troubleType": "其他",
"count": 240
}
]
}
}
```
---
### 房屋物业统计数
http://yangpu.hm.omniview.pro/api/service-basicdatasync-ddd/public/resource/count
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"content": {
"area": 41935047,
"nonResident": 0,
"street": 12,
"company": 222,
"ic": 725,
"community": 909,
"houseOffice": 12,
"csm": 501,
"house": 527161,
"building": 27644
}
}
}
```
---
### 主动巡检统计数
http://yangpu.hm.omniview.pro/api/service-documents-ddd/public/checkorder/count
> 返回示例
```json
{
"code": "200",
"msg": "success",
"data": {
"content":{
"totalOrder": 463,
"undoneOrder": 4,
"overdueOrder": 4
}
}
}
```
---
### 网格数
http://10.89.1.208:10005/dc/countDiscoveredCaseByStreet?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 98
---
### 网格-处置中数
http://10.89.1.208:10005/dc/countSolvingCaseByStreet?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 10
---
### 网格-处置逾期数
http://10.89.1.208:10005/dc/countExceedCaseByStreet?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 22
---
### 非警情数
http://10.89.1.208:10005/dc/countClosedNotPolice?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 99
---
### 非警情-处置中数
http://10.89.1.208:10005/dc/countSolvingNotPoliceByStreet?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 10
---
### 非警情-逾期数
http://10.89.1.208:10005/dc/countExceedNotPoliceByStreet?street=新江湾街道&start=2020-10-30&end=2020-11-09
> 返回示例:
>
> 10
---
### 土地人口统计数
- 这个接口应该不用加参数, 返回整个区的数据很全了
http://10.89.1.208:10005/dc/statisticsbureauArea?year=2019
> 返回示例:
```json
[
{
"year": "2018",
"district": "杨浦区",
"street": "总计",
"area": 60.61,
"registered_population": "1074138",
"population_density": 17722.125061871000000000000000000000
},
{
"year": "2018",
"district": "杨浦区",
"street": "定海路街道",
"area": 7.02,
"registered_population": "86062",
"population_density": 12259.544159544200000000000000000000
},
{
"year": "2018",
"district": "杨浦区",
"street": "大桥街道",
"area": 4.36,
"registered_population": "118236",
"population_density": 27118.348623853200000000000000000000
},
{
"year": "2018",
"district": "杨浦区",
"street": "平凉路街道",
"area": 3.44,
"registered_population": "87142",
"population_density": 25331.976744186000000000000000000000
}
]
```
---
### 智能发现数目
http://yangpu.hm.omniview.pro/api/service-special-ddd/public/discoverInfo
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"content": [
{
"types": "elevatorLock",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "heap",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "parkFireExit",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "staffLeaveAlarmTcfteodr",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "parkingGate",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "fire",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "nonVehicleCharg",
"total": "3",
"numbers": "0",
"undone": "0"
},
{
"types": "ebcc",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "buildingVibration",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "hermeticSpace",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "waterTank",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "fireExits",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "manholeCover",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "trash",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "roofWater",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "garageWater",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "vip",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "nonLivingSpace",
"total": "0",
"numbers": "0",
"undone": "0"
},
{
"types": "accCtl",
"total": "463",
"numbers": "67",
"undone": "188"
}
]
}
}
```
---
### 投诉报修数
http://yangpu.hm.omniview.pro/api/service-documents-ddd/public/repair/complaint
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"content": {
"alarmIn5MinBX": 0,
"undoneTS": 416,
"undoneBX": 354,
"alarmIn5MinTS": 0
}
}
}
```
---
### 联勤联动处置列表
http://yangpu.hm.omniview.pro/api/service-special-ddd/public/alarm/index
> 返回示例:
```json
{
"code": "200",
"msg": "success",
"data": {
"page": 1,
"totalPages": 1,
"pageSize": 1000000,
"totalRows": 67,
"content": [
{
"arrival_department": "1",
"community_name": "尚锦嘉园",
"create_note": null,
"neighbourhood_code": null,
"community_id": "",
"device_name": "江湾城路1199弄17号",
"communityName": "尚锦嘉园",
"id": 473,
"fault_id": null,
"state": "0",
"done_note": null,
"done_photo": "",
"types": "accCtl",
"create_time": "2020-11-09 11:01:38",
"community_addr": null,
"csp_name": null,
"imgs_url": null,
"receive_time": "2020-11-09 11:01:38",
"receive_note": null,
"communityAddr": null,
"receive_property_name": null,
"sensor_no": "lx000000009C0095E9",
"push_source": "风险处置场景",
"aid": "lx65876_2022517795",
"gpsx": "4668",
"cspName": null,
"check_time": "2020-11-09 11:01:38",
"done_time": null,
"gpsy": "11268"
},
{
"arrival_department": "1",
"community_name": "雍景苑",
"create_note": null,
"neighbourhood_code": null,
"community_id": "",
"device_name": "政悦路500弄8号",
"communityName": "雍景苑",
"id": 472,
"fault_id": null,
"state": "0",
"done_note": null,
"done_photo": "",
"types": "accCtl",
"create_time": "2020-11-09 10:51:26",
"community_addr": null,
"csp_name": null,
"imgs_url": null,
"receive_time": "2020-11-09 10:51:26",
"receive_note": null,
"communityAddr": null,
"receive_property_name": null,
"sensor_no": "lx000000009C00F10B",
"push_source": "风险处置场景",
"aid": "lx65876_2022517732",
"gpsx": "5079",
"cspName": null,
"check_time": "2020-11-09 10:51:26",
"done_time": null,
"gpsy": "11080"
},
],
"hasPrevPage": true,
"hasNextPage": false,
"url": null,
"conditionJson": null,
"fields": null
}
}
```
### 根据id获取鹰眼监控视频地址
- 这个接口应该也不用加参数
http://10.89.1.208:7000/hawkeye/api/v1/camera/31011022001328101004
> 返回示例:
```json
{
"code": "200",
"message": "OK",
"payload": {
"url": "http://10.216.71.20:83/openUrl/TMIXpTy/live.m3u8"
}
}
```
---
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