Commit 8f723928 authored by 郭铭瑶's avatar 郭铭瑶 🤘

监控撒点

parent d3ab7ef4
......@@ -21,7 +21,7 @@ Axios.interceptors.response.use(response => {
return response.data
}, error => {
Store.commit('SET_LOADING', false)
return Promise.resolve(error.response)
return Promise.reject(error)
})
/**
......@@ -56,7 +56,7 @@ const request = ({ method, url, params = {}, contentType = 'application/json;cha
if (showLoading) {
Store.commit('SET_LOADING', true)
}
return Axios(config)
return Axios(config).catch(err => console.error(err))
}
export default {
......
......@@ -21,6 +21,8 @@ export default {
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', // 联勤联动列表
GET_CAMERA_LIST: '/service-special-ddd/public/camerainfo', // 视频撒点列表 参数:streetname=街道名称,streetname_l=平凉路街道 模糊查询,rootname=街道 查询所有街道
GET_INSPECTION_LIST: 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye/propertyinspector/api/v1/sharingplatform/themeListForOneDay', // 专项检查
GET_GRID1: '/dc/countDiscoveredCaseByStreet', // 网格-发现
GET_GRID2: '/dc/countRegisterCaseByStreet', // 网格-立案
GET_GRID3: '/dc/countDispatchCaseByStreet', // 网格-派遣
......
......@@ -18,12 +18,14 @@ export default {
dispatch('getCheckSum')
dispatch('getGridSum')
dispatch('getPopulationInfo')
dispatch('getPatrolList')
// dispatch('getPatrolList')
dispatch('getCameraList')
dispatch('getDiscoverInfo')
dispatch('getRepairInfo')
dispatch('getHandleList')
dispatch('getDoneList')
dispatch('getHealthInfo')
dispatch('getInspection')
// dispatch('getStreetBasic')
},
async getGreenInfo({commit}) {
......@@ -102,17 +104,27 @@ export default {
commit('SET_LAND_POPULATION_INFO', result)
}
},
getPatrolList({commit}) {
// getPatrolList({commit}) {
// ajax.get({
// url: api.GET_CHECK_LIST,
// params: {
// hoId_eq,
// pageSize: 10000,
// nearlyMonth: 12,
// orderType_in: '0,1,2,3',
// }
// }).then(res => {
// commit('SET_PATROL_LIST', com.confirm(res, 'data.content', []))
// })
// },
getCameraList({commit}) {
ajax.get({
url: api.GET_CHECK_LIST,
url: api.GET_CAMERA_LIST,
params: {
hoId_eq,
pageSize: 10000,
nearlyMonth: 12,
orderType_in: '0,1,2,3',
streetname_l: curStreet,
}
}).then(res => {
commit('SET_PATROL_LIST', com.confirm(res, 'data.content', []))
commit('SET_CAMERA_LIST', com.confirm(res, 'data.content', []))
})
},
getDiscoverInfo({commit}) {
......@@ -161,6 +173,20 @@ export default {
commit('SET_HEALTH_INFO', com.confirm(res, 'data.content', {}))
})
},
getInspection({commit}) { // 专项检查
ajax.post({
url: api.GET_INSPECTION_LIST,
params: {
pageNo: 1,
pageSize: 10000,
flag: 0,
someday: moment().format('YYYYMMDD'),
hpb_id: 310110000000,
}
}).then(res => {
console.log('res --', res)
})
}
// getStreetBasic({commit}) { // 街道基数
// ajax.get({url: api.DATA_URL + api.GET_STREET_BASIC, params: {street: '五角场街道', gridId: 10027}}).then(res => {
// console.log('basic', com.confirm(res, 'data.content', {}))
......
......@@ -42,6 +42,9 @@ export default {
SET_PATROL_LIST(state, data) {
state.patrolList = data
},
SET_CAMERA_LIST(state, data) {
state.cameraList = data
},
SET_DISCOVER_SUM(state, data) {
state.discoverSum = data
},
......
......@@ -100,6 +100,7 @@ export default {
gridSum: [0, 0, 0, 0, 0, 0],
notAlertSum: [0, 0, 0, 0, 0, 0],
patrolList: [],
cameraList: [],
discoverSum: {},
discoverInfo: [],
handleCurTab: '处置中',
......
......@@ -56,7 +56,7 @@ export default {
tarValue = data[i].value
}
}
const percent = (tarValue / total * 100).toFixed(0)
const percent = total == 0 ? 0 : (tarValue / total * 100).toFixed(0)
return `${name} ${percent}%`
}
}
......
......@@ -30,13 +30,10 @@
<m-modal v-model="doneModal" title="已完成处置">
<DoneComponent v-if="doneModal" :data="doneData" />
</m-modal>
<!-- <m-modal v-model="patrolModal" title="主动巡检">
<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="streetInfo[currentStreetInfo.id]" :layout="streetInfo[currentStreetInfo.id].layout" />
</m-modal>
<m-modal title="鹰眼监控" v-model="videoModal">
<m-modal :title="`鹰眼监控:${cameraName}`" v-model="videoModal">
<VideoComponent v-if="videoModal" :videoSrc="videoSrc" />
</m-modal>
</m-grid>
......@@ -67,11 +64,10 @@ export default {
videoModal: false,
videoSrc: null,
detailModal: false,
// patrolModal: false,
smartPoints: null,
// patrolPoints: null,
detailData: {},
// patrolData: {},
cameraPoints: [],
cameraName: null,
detailLayout: [
{
communityName: {
......@@ -102,44 +98,6 @@ export default {
},
},
],
// patrolLayout: [
// {
// communityName: {
// label: '小区名称',
// width: 12,
// },
// orderTypeName: {
// label: '整改事项',
// width: 12,
// },
// },
// {
// checkTime: {
// label: '发现时间',
// width: 12,
// },
// checkStateName: {
// label: '整改状态',
// width: 12,
// },
// },
// {
// checkPersonName: {
// label: '上报人',
// width: 12,
// },
// hoName: {
// label: '房办名称',
// width: 12,
// },
// },
// {
// tcName: {
// label: '检查主题',
// width: 24,
// },
// },
// ],
doneModal: false,
doneData: {},
}
......@@ -150,7 +108,7 @@ export default {
'streetInfo',
'curSmartType',
'showCommandModal',
// 'patrolList',
'cameraList',
'handleList',
'handleCurTab',
])
......@@ -168,14 +126,11 @@ export default {
methods: {
...mapActions([
'initData', // 初始化获取首次加载所需的所有数据
'getDiscoverTrend',
'getRepairRate',
'getDiscoverInfo',
'getRepairInfo',
'getHandleList',
'getDoneList',
'getCheckSum',
// 'getPatrolList',
'getGridSum',
]),
mapComplete() {
......@@ -183,12 +138,9 @@ export default {
this.initData()
this.complete = true
this.timer = setInterval(() => {
this.getDiscoverTrend()
this.getRepairRate()
this.getDiscoverInfo()
this.getRepairInfo()
this.getCheckSum()
// this.getPatrolList()
this.getHandleList()
this.getDoneList()
}, 1000 * 60 * 1)
......@@ -209,9 +161,15 @@ export default {
this.$refs.map.focus(...center, 5.5)
},
handleMapClick(data) {
if (data.key === 'patrol') {
this.patrolData = data
this.patrolModal = true
if (data.key === 'camera') {
const {deviceGbcode, deviceName} = data
this.cameraName = deviceName
this.$ajax.get({
url: this.$api.GET_VIDEO_URL + deviceGbcode,
showLoading: true,
}).then(res => {
this.handleViewVideo(this.$com.confirm(res, 'payload.url', ''))
})
} else {
this.detailData = data
this.detailModal = true
......@@ -236,7 +194,7 @@ export default {
data: data.map(item => {
return {
...item,
icon: item.done_time ? 'blue4.png' : 'red4.png',
icon: 'red4.png',
}
}),
})
......@@ -251,16 +209,16 @@ export default {
},
},
watch: {
// patrolList(cur) {
// const {addPoint, removePoint} = this.$refs.map
// removePoint(this.patrolPoints)
// this.patrolPoints = addPoint({
// key: 'patrol',
// size: 14,
// icon: 'red.png',
// data: cur,
// })
// },
cameraList(cur) {
const {addPoint, removePoint} = this.$refs.map
removePoint(this.cameraPoints)
this.cameraPoints = addPoint({
key: 'camera',
size: 14,
icon: 'blue4.png',
data: cur,
})
},
curSmartType(cur) {
let data = this.handleList
if (cur) {
......
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