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

监控撒点

parent d3ab7ef4
...@@ -21,7 +21,7 @@ Axios.interceptors.response.use(response => { ...@@ -21,7 +21,7 @@ Axios.interceptors.response.use(response => {
return response.data return response.data
}, error => { }, error => {
Store.commit('SET_LOADING', false) 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 ...@@ -56,7 +56,7 @@ const request = ({ method, url, params = {}, contentType = 'application/json;cha
if (showLoading) { if (showLoading) {
Store.commit('SET_LOADING', true) Store.commit('SET_LOADING', true)
} }
return Axios(config) return Axios(config).catch(err => console.error(err))
} }
export default { export default {
......
...@@ -21,6 +21,8 @@ export default { ...@@ -21,6 +21,8 @@ export default {
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', // 联勤联动列表
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_GRID1: '/dc/countDiscoveredCaseByStreet', // 网格-发现
GET_GRID2: '/dc/countRegisterCaseByStreet', // 网格-立案 GET_GRID2: '/dc/countRegisterCaseByStreet', // 网格-立案
GET_GRID3: '/dc/countDispatchCaseByStreet', // 网格-派遣 GET_GRID3: '/dc/countDispatchCaseByStreet', // 网格-派遣
......
...@@ -18,12 +18,14 @@ export default { ...@@ -18,12 +18,14 @@ export default {
dispatch('getCheckSum') dispatch('getCheckSum')
dispatch('getGridSum') dispatch('getGridSum')
dispatch('getPopulationInfo') dispatch('getPopulationInfo')
dispatch('getPatrolList') // dispatch('getPatrolList')
dispatch('getCameraList')
dispatch('getDiscoverInfo') dispatch('getDiscoverInfo')
dispatch('getRepairInfo') dispatch('getRepairInfo')
dispatch('getHandleList') dispatch('getHandleList')
dispatch('getDoneList') dispatch('getDoneList')
dispatch('getHealthInfo') dispatch('getHealthInfo')
dispatch('getInspection')
// dispatch('getStreetBasic') // dispatch('getStreetBasic')
}, },
async getGreenInfo({commit}) { async getGreenInfo({commit}) {
...@@ -102,17 +104,27 @@ export default { ...@@ -102,17 +104,27 @@ export default {
commit('SET_LAND_POPULATION_INFO', result) 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({ ajax.get({
url: api.GET_CHECK_LIST, url: api.GET_CAMERA_LIST,
params: { params: {
hoId_eq, streetname_l: curStreet,
pageSize: 10000,
nearlyMonth: 12,
orderType_in: '0,1,2,3',
} }
}).then(res => { }).then(res => {
commit('SET_PATROL_LIST', com.confirm(res, 'data.content', [])) commit('SET_CAMERA_LIST', com.confirm(res, 'data.content', []))
}) })
}, },
getDiscoverInfo({commit}) { getDiscoverInfo({commit}) {
...@@ -161,6 +173,20 @@ export default { ...@@ -161,6 +173,20 @@ export default {
commit('SET_HEALTH_INFO', com.confirm(res, 'data.content', {})) 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}) { // 街道基数 // getStreetBasic({commit}) { // 街道基数
// ajax.get({url: api.DATA_URL + api.GET_STREET_BASIC, params: {street: '五角场街道', gridId: 10027}}).then(res => { // ajax.get({url: api.DATA_URL + api.GET_STREET_BASIC, params: {street: '五角场街道', gridId: 10027}}).then(res => {
// console.log('basic', com.confirm(res, 'data.content', {})) // console.log('basic', com.confirm(res, 'data.content', {}))
......
...@@ -42,6 +42,9 @@ export default { ...@@ -42,6 +42,9 @@ export default {
SET_PATROL_LIST(state, data) { SET_PATROL_LIST(state, data) {
state.patrolList = data state.patrolList = data
}, },
SET_CAMERA_LIST(state, data) {
state.cameraList = data
},
SET_DISCOVER_SUM(state, data) { SET_DISCOVER_SUM(state, data) {
state.discoverSum = data state.discoverSum = data
}, },
......
...@@ -100,6 +100,7 @@ export default { ...@@ -100,6 +100,7 @@ export default {
gridSum: [0, 0, 0, 0, 0, 0], gridSum: [0, 0, 0, 0, 0, 0],
notAlertSum: [0, 0, 0, 0, 0, 0], notAlertSum: [0, 0, 0, 0, 0, 0],
patrolList: [], patrolList: [],
cameraList: [],
discoverSum: {}, discoverSum: {},
discoverInfo: [], discoverInfo: [],
handleCurTab: '处置中', handleCurTab: '处置中',
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
tarValue = data[i].value tarValue = data[i].value
} }
} }
const percent = (tarValue / total * 100).toFixed(0) const percent = total == 0 ? 0 : (tarValue / total * 100).toFixed(0)
return `${name} ${percent}%` return `${name} ${percent}%`
} }
} }
......
...@@ -30,13 +30,10 @@ ...@@ -30,13 +30,10 @@
<m-modal v-model="doneModal" title="已完成处置"> <m-modal v-model="doneModal" title="已完成处置">
<DoneComponent v-if="doneModal" :data="doneData" /> <DoneComponent v-if="doneModal" :data="doneData" />
</m-modal> </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-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-form :label-width=".7" :model="streetInfo[currentStreetInfo.id]" :layout="streetInfo[currentStreetInfo.id].layout" />
</m-modal> </m-modal>
<m-modal title="鹰眼监控" v-model="videoModal"> <m-modal :title="`鹰眼监控:${cameraName}`" v-model="videoModal">
<VideoComponent v-if="videoModal" :videoSrc="videoSrc" /> <VideoComponent v-if="videoModal" :videoSrc="videoSrc" />
</m-modal> </m-modal>
</m-grid> </m-grid>
...@@ -67,11 +64,10 @@ export default { ...@@ -67,11 +64,10 @@ export default {
videoModal: false, videoModal: false,
videoSrc: null, videoSrc: null,
detailModal: false, detailModal: false,
// patrolModal: false,
smartPoints: null, smartPoints: null,
// patrolPoints: null,
detailData: {}, detailData: {},
// patrolData: {}, cameraPoints: [],
cameraName: null,
detailLayout: [ detailLayout: [
{ {
communityName: { communityName: {
...@@ -102,44 +98,6 @@ export default { ...@@ -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, doneModal: false,
doneData: {}, doneData: {},
} }
...@@ -150,7 +108,7 @@ export default { ...@@ -150,7 +108,7 @@ export default {
'streetInfo', 'streetInfo',
'curSmartType', 'curSmartType',
'showCommandModal', 'showCommandModal',
// 'patrolList', 'cameraList',
'handleList', 'handleList',
'handleCurTab', 'handleCurTab',
]) ])
...@@ -168,14 +126,11 @@ export default { ...@@ -168,14 +126,11 @@ export default {
methods: { methods: {
...mapActions([ ...mapActions([
'initData', // 初始化获取首次加载所需的所有数据 'initData', // 初始化获取首次加载所需的所有数据
'getDiscoverTrend',
'getRepairRate', 'getRepairRate',
'getDiscoverInfo', 'getDiscoverInfo',
'getRepairInfo', 'getRepairInfo',
'getHandleList', 'getHandleList',
'getDoneList', 'getDoneList',
'getCheckSum',
// 'getPatrolList',
'getGridSum', 'getGridSum',
]), ]),
mapComplete() { mapComplete() {
...@@ -183,12 +138,9 @@ export default { ...@@ -183,12 +138,9 @@ export default {
this.initData() this.initData()
this.complete = true this.complete = true
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.getDiscoverTrend()
this.getRepairRate() this.getRepairRate()
this.getDiscoverInfo() this.getDiscoverInfo()
this.getRepairInfo() this.getRepairInfo()
this.getCheckSum()
// this.getPatrolList()
this.getHandleList() this.getHandleList()
this.getDoneList() this.getDoneList()
}, 1000 * 60 * 1) }, 1000 * 60 * 1)
...@@ -209,9 +161,15 @@ export default { ...@@ -209,9 +161,15 @@ export default {
this.$refs.map.focus(...center, 5.5) this.$refs.map.focus(...center, 5.5)
}, },
handleMapClick(data) { handleMapClick(data) {
if (data.key === 'patrol') { if (data.key === 'camera') {
this.patrolData = data const {deviceGbcode, deviceName} = data
this.patrolModal = true 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 { } else {
this.detailData = data this.detailData = data
this.detailModal = true this.detailModal = true
...@@ -236,7 +194,7 @@ export default { ...@@ -236,7 +194,7 @@ export default {
data: data.map(item => { data: data.map(item => {
return { return {
...item, ...item,
icon: item.done_time ? 'blue4.png' : 'red4.png', icon: 'red4.png',
} }
}), }),
}) })
...@@ -251,16 +209,16 @@ export default { ...@@ -251,16 +209,16 @@ export default {
}, },
}, },
watch: { watch: {
// patrolList(cur) { cameraList(cur) {
// const {addPoint, removePoint} = this.$refs.map const {addPoint, removePoint} = this.$refs.map
// removePoint(this.patrolPoints) removePoint(this.cameraPoints)
// this.patrolPoints = addPoint({ this.cameraPoints = addPoint({
// key: 'patrol', key: 'camera',
// size: 14, size: 14,
// icon: 'red.png', icon: 'blue4.png',
// data: cur, data: cur,
// }) })
// }, },
curSmartType(cur) { curSmartType(cur) {
let data = this.handleList let data = this.handleList
if (cur) { 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