Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yangpu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭铭瑶
yangpu
Commits
e2c8f1cf
Commit
e2c8f1cf
authored
Nov 12, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整接口入参
parent
d6ccd533
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
82 deletions
+29
-82
monitor-map.vue
src/components/MonitorComponents/MonitorMap/monitor-map.vue
+2
-1
actions.js
src/store/actions.js
+8
-63
state.js
src/store/state.js
+13
-13
main.vue
src/views/main.vue
+6
-5
No files found.
src/components/MonitorComponents/MonitorMap/monitor-map.vue
View file @
e2c8f1cf
...
...
@@ -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
)
},
// 添加边界
...
...
src/store/actions.js
View file @
e2c8f1cf
...
...
@@ -3,13 +3,13 @@ import api from '@/server/api'
import
com
from
'@/util/common'
import
moment
from
'moment'
let
curStreet
=
'新江湾城街道'
let
ho
l
d_eq
=
null
let
ho
I
d_eq
=
null
let
streetId
=
null
export
default
{
initData
({
dispatch
,
state
})
{
streetId
=
state
.
currentStreetInfo
.
id
ho
l
d_eq
=
state
.
currentStreetInfo
.
houseId
ho
I
d_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
:
{
ho
l
d_eq
,
ho
I
d_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'
,
[]))
})
},
...
...
src/store/state.js
View file @
e2c8f1cf
...
...
@@ -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
},
],
currentStreetInfo
:
{
id
:
310110020000
,
name
:
'新江湾城街道'
,
houseId
:
310110000168
},
{
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
,
center
:
[
3635.8506067447124
,
10472.688944671301
]
},
showLoading
:
false
,
curDate
:
null
,
curSmartType
:
null
,
...
...
src/views/main.vue
View file @
e2c8f1cf
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment