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

调整接口入参

parent d6ccd533
......@@ -38,6 +38,8 @@ export default {
addListener() { // 触发地图点击事件
this.map.on(SMap.MapEvent.click, (view, eventParamter) => {
view.hitTest(eventParamter).then(res => {
// const {x, y} = res.results[0].graphic.geometry.centroid
// console.log([x, y])
if (res.results && res.results.length > 0) {
this.$emit('event', res.results[0].graphic.attributes)
}
......@@ -122,7 +124,6 @@ export default {
strokeWeight,
label,
})
// console.log('000', this.map, polygon)
this.map.add(polygon)
},
// 添加边界
......
......@@ -3,13 +3,13 @@ import api from '@/server/api'
import com from '@/util/common'
import moment from 'moment'
let curStreet = '新江湾城街道'
let hold_eq = null
let hoId_eq = null
let streetId = null
export default {
initData({dispatch, state}) {
streetId = state.currentStreetInfo.id
hold_eq = state.currentStreetInfo.houseId
hoId_eq = state.currentStreetInfo.houseId
curStreet = state.currentStreetInfo.name
dispatch('getGreenInfo')
dispatch('getDiscoverTrend')
......@@ -65,7 +65,11 @@ export default {
})
},
getCheckSum({commit}) {
ajax.get({url: api.GET_CHECK_SUM, params: {streetId}}).then(res => {
ajax.get({url: api.GET_CHECK_SUM, params: {
hoId_eq,
nearlyMonth: 12,
orderType_in: '0,1,2,3',
}}).then(res => {
commit('SET_CHECK_SUM', com.confirm(res, 'data.content', {}))
})
},
......@@ -90,62 +94,10 @@ export default {
}
},
getPatrolList({commit}) {
// let result = []
// setTimeout(() => {
// if (state.currentStreetInfo.id === 310110020000) { // 新江湾数据
// result = [
// {
// communityName: '建发新江湾华苑二期',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-10-21',
// checkStateName: '逾期',
// checkPersonName: '朱煜东',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '市物业中心-住宅小区日常巡查2020.10',
// communityMinx: 3249.901,
// communityMiny: 9338.801
// }, {
// communityName: '建发新江湾华苑一期',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-10-01',
// checkStateName: '逾期',
// checkPersonName: '朱煜东',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '市物业中心-住宅小区日常巡查2020.10',
// communityMinx: 3161.201,
// communityMiny: 9327.401
// },
// {
// communityName: '嘉誉园',
// orderTypeName: '车库挡水板未配置',
// checkTime: '2020-06-12',
// checkStateName: '逾期',
// checkPersonName: '俞泓',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '2020年住宅小区防汛防台检查',
// communityMinx: 3580.401,
// communityMiny: 10968.201
// },
// {
// communityName: '东方锦园',
// orderTypeName: '未落实每日自查',
// checkTime: '2020-02-07',
// checkStateName: '逾期',
// checkPersonName: '黄麒玮',
// hoName: '新江湾城街道房屋管理办事处',
// tcName: '2020年上海市住宅小区疫情防控专项检查',
// communityMinx: 2719.201,
// communityMiny: 8474.801
// }
// ]
// }
// commit('SET_PATROL_LIST', result)
// }, 3000)
ajax.get({
url: api.GET_CHECK_LIST,
params: {
hold_eq,
hoId_eq,
pageSize: 10000,
nearlyMonth: 12,
orderType_in: '0,1,2,3',
......@@ -167,9 +119,6 @@ export default {
sum.total += +e.total
sum.today += +e.numbers
})
// if (result.today > 100) {
// console.info(moment().format('YYYY-MM-DD HH:mm:ss'), result.today, res)
// }
commit('SET_DISCOVER_SUM', sum)
commit('SET_DISCOVER_INFO', result)
})
......@@ -189,10 +138,6 @@ export default {
},
getHandleList({commit}) { // 获取并全局设置联勤联动处置列表
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', []))
})
},
......
......@@ -64,20 +64,20 @@ const commandLayout2 = [
]
export default {
streets: [
{id: 310110001000, name: '定海路街道', houseId: 310110000169},
{id: 310110006000, name: '平凉路街道', houseId: 310110000167},
{id: 310110008000, name: '江浦路街道', houseId: 310110000177},
{id: 310110009000, name: '四平路街道', houseId: 310110000170},
{id: 310110012000, name: '控江路街道', houseId: 310110000171},
{id: 310110013000, name: '长白新村街道', houseId: 310110000173},
{id: 310110015000, name: '延吉新村街道', houseId: 310110000172},
{id: 310110016000, name: '殷行街道', houseId: 310110000176},
{id: 310110018000, name: '大桥街道', houseId: 310110000166},
{id: 310110019000, name: '五角场街道', houseId: 310110000174},
{id: 310110020000, name: '新江湾城街道', houseId: 310110000168},
{id: 310110101000, name: '长海路街道', houseId: 310110000175},
{id: 310110001000, name: '定海路街道', houseId: 310110000169, center: [8140.864167601668, 5079.364284699033]},
{id: 310110006000, name: '平凉路街道', houseId: 310110000167, center: [5107.94932750342, 2423.6864417613733]},
{id: 310110008000, name: '江浦路街道', houseId: 310110000177, center: [4211.45116637842, 3786.741592954671]},
{id: 310110009000, name: '四平路街道', houseId: 310110000170, center: [3293.5942071892155, 5147.717485190097]},
{id: 310110012000, name: '控江路街道', houseId: 310110000171, center: [5008.673834530317, 5227.606100514474]},
{id: 310110013000, name: '长白新村街道', houseId: 310110000173, center: [7430.66083957447, 6663.5712796890675]},
{id: 310110015000, name: '延吉新村街道', houseId: 310110000172, center: [6246.9579368837085, 5745.491634168607]},
{id: 310110016000, name: '殷行街道', houseId: 310110000176, center: [6688.878806764382, 10366.540369915294]},
{id: 310110018000, name: '大桥街道', houseId: 310110000166, center: [6374.902499188995, 3511.8719065605596]},
{id: 310110019000, name: '五角场街道', houseId: 310110000174, center: [3296.4282528002864, 7281.637272274846]},
{id: 310110020000, name: '新江湾城街道', houseId: 310110000168, center: [3635.8506067447124, 10472.688944671301]},
{id: 310110101000, name: '长海路街道', houseId: 310110000175, center: [6016.66261261553, 8153.563542586172]},
],
currentStreetInfo: {id: 310110020000, name: '新江湾城街道', houseId: 310110000168},
currentStreetInfo: {id: 310110020000, name: '新江湾城街道', houseId: 310110000168, center: [3635.8506067447124, 10472.688944671301]},
showLoading: false,
curDate: null,
curSmartType: null,
......
......@@ -63,6 +63,7 @@ export default {
detailModal: false,
patrolModal: false,
smartPoints: null,
patrolPoints: null,
detailData: {},
patrolData: {},
detailLayout: [
......@@ -218,14 +219,12 @@ export default {
document.querySelector('title').innerText = `${name}城市运行平台`
const {map} = this.$refs
this.initMapFocus()
map.addPolygon({paths: this.$store.state.streetPaths[id], fillColor: 'rgba(51,145,255,.3)'})
map.addBoundary({name: name})
},
initMapFocus() {
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)
const {center} = this.currentStreetInfo
this.$refs.map.focus(...center, 5.5)
},
handleMapClick(data) {
if (data.key === 'patrol') {
......@@ -262,7 +261,9 @@ export default {
},
watch: {
patrolList(cur) {
this.$refs.map.addPoint({
const {addPoint, removePoint} = this.$refs.map
removePoint(this.patrolPoints)
this.patrolPoints = addPoint({
key: 'patrol',
size: 14,
icon: 'red.png',
......
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