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
3da9fa44
Commit
3da9fa44
authored
Nov 10, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入街镇判断,传参调接口
parent
8d0bad7c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
15 deletions
+47
-15
monitor-title.vue
...mponents/MonitorComponents/MonitorTitle/monitor-title.vue
+8
-4
actions.js
src/store/actions.js
+14
-10
mutations.js
src/store/mutations.js
+4
-0
state.js
src/store/state.js
+15
-0
main.vue
src/views/main.vue
+6
-1
杨浦API.md
杨浦API.md
+0
-0
No files found.
src/components/MonitorComponents/MonitorTitle/monitor-title.vue
View file @
3da9fa44
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<span>
{{
curDate
}}
</span>
<span>
{{
curDate
}}
</span>
</DatePicker>
</DatePicker>
</span>
-->
</span>
-->
<div
class=
"btn back"
@
click=
"
toAli
"
/>
<div
class=
"btn back"
@
click=
"
closePage
"
/>
<div
class=
"btn close"
@
click=
"
toAli
"
/>
<div
class=
"btn close"
@
click=
"
closePage
"
/>
<span
v-if=
"!hideTime"
class=
"moment time"
>
<span
v-if=
"!hideTime"
class=
"moment time"
>
<!--
<span
class=
"switch"
><img
src=
"@/assets/images/switch.png"
/>
切换街道
</span>
-->
<!--
<span
class=
"switch"
><img
src=
"@/assets/images/switch.png"
/>
切换街道
</span>
-->
{{
curDate
}}
{{
time
}}
{{
curDate
}}
{{
time
}}
...
@@ -88,8 +88,11 @@ export default {
...
@@ -88,8 +88,11 @@ export default {
this
.
$store
.
commit
(
'SET_CURDATE'
,
date
)
this
.
$store
.
commit
(
'SET_CURDATE'
,
date
)
this
.
openDatePicker
=
false
this
.
openDatePicker
=
false
},
},
toAli
()
{
// toAli() {
window
.
location
=
'http://10.89.1.208/share/ypdp'
// window.location = 'http://10.89.1.208/share/ypdp'
// },
closePage
()
{
window
.
close
()
},
},
}
}
}
}
...
@@ -106,6 +109,7 @@ export default {
...
@@ -106,6 +109,7 @@ export default {
// font-family $font-pang
// font-family $font-pang
font-weight bold
font-weight bold
>.btn
>.btn
display block
position absolute
position absolute
width .2rem
width .2rem
height @width
height @width
...
...
src/store/actions.js
View file @
3da9fa44
...
@@ -3,9 +3,11 @@ import api from '@/server/api'
...
@@ -3,9 +3,11 @@ import api from '@/server/api'
import
com
from
'@/util/common'
import
com
from
'@/util/common'
import
moment
from
'moment'
import
moment
from
'moment'
const
curStreet
=
'新江湾城街道'
const
curStreet
=
'新江湾城街道'
let
streetId
=
null
export
default
{
export
default
{
initData
({
dispatch
})
{
initData
({
dispatch
,
state
})
{
streetId
=
state
.
currentStreetInfo
.
id
dispatch
(
'getGreenInfo'
)
dispatch
(
'getGreenInfo'
)
dispatch
(
'getDiscoverTrend'
)
dispatch
(
'getDiscoverTrend'
)
dispatch
(
'getRepairRate'
)
dispatch
(
'getRepairRate'
)
...
@@ -29,7 +31,7 @@ export default {
...
@@ -29,7 +31,7 @@ export default {
getDiscoverTrend
({
commit
})
{
getDiscoverTrend
({
commit
})
{
ajax
.
get
({
ajax
.
get
({
url
:
api
.
GET_DISCOVER_TREND
,
url
:
api
.
GET_DISCOVER_TREND
,
params
:
{
days
:
10
}
params
:
{
days
:
10
,
streetId
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
{
content
}
=
res
.
data
const
{
content
}
=
res
.
data
const
keys
=
(
content
&&
Object
.
keys
(
content
))
||
[]
const
keys
=
(
content
&&
Object
.
keys
(
content
))
||
[]
...
@@ -41,7 +43,7 @@ export default {
...
@@ -41,7 +43,7 @@ export default {
})
})
},
},
getRepairRate
({
commit
})
{
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
data
=
com
.
confirm
(
res
,
'data.content'
,
[])
const
result
=
data
.
map
(
item
=>
({
const
result
=
data
.
map
(
item
=>
({
name
:
item
.
troubleType
,
name
:
item
.
troubleType
,
...
@@ -51,15 +53,15 @@ export default {
...
@@ -51,15 +53,15 @@ export default {
})
})
},
},
getResourceSum
({
commit
})
{
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'
,
{}))
commit
(
'SET_RESOURCE_SUM'
,
com
.
confirm
(
res
,
'data.content'
,
{}))
})
})
},
},
getCheckSum
({
commit
})
{
//
getCheckSum({commit}) {
ajax
.
get
({
url
:
api
.
GET_CHECK_SUM
}).
then
(
res
=>
{
//
ajax.get({url: api.GET_CHECK_SUM}).then(res => {
commit
(
'SET_CHECK_SUM'
,
com
.
confirm
(
res
,
'data.content'
,
{}))
//
commit('SET_CHECK_SUM', com.confirm(res, 'data.content', {}))
})
//
})
},
//
},
async
getGridSum
({
commit
})
{
async
getGridSum
({
commit
})
{
const
start
=
moment
().
add
(
-
10
,
'days'
).
format
(
'YYYY-MM-DD'
)
const
start
=
moment
().
add
(
-
10
,
'days'
).
format
(
'YYYY-MM-DD'
)
const
end
=
moment
().
format
(
'YYYY-MM-DD'
)
const
end
=
moment
().
format
(
'YYYY-MM-DD'
)
...
@@ -133,6 +135,7 @@ export default {
...
@@ -133,6 +135,7 @@ export default {
getDiscoverInfo
({
commit
})
{
getDiscoverInfo
({
commit
})
{
ajax
.
get
({
ajax
.
get
({
url
:
api
.
GET_DISCOVER_INFO
,
url
:
api
.
GET_DISCOVER_INFO
,
params
:
{
streetId
},
}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
sum
=
{
total
:
0
,
today
:
0
}
const
sum
=
{
total
:
0
,
today
:
0
}
const
data
=
com
.
confirm
(
res
,
'data.content'
,
[])
const
data
=
com
.
confirm
(
res
,
'data.content'
,
[])
...
@@ -152,6 +155,7 @@ export default {
...
@@ -152,6 +155,7 @@ export default {
getRepairInfo
({
commit
})
{
getRepairInfo
({
commit
})
{
ajax
.
get
({
ajax
.
get
({
url
:
api
.
GET_TS_BX
,
url
:
api
.
GET_TS_BX
,
params
:
{
streetId
},
}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
data
=
com
.
confirm
(
res
,
'data.content'
,
{})
const
data
=
com
.
confirm
(
res
,
'data.content'
,
{})
const
result
=
[
const
result
=
[
...
@@ -162,7 +166,7 @@ export default {
...
@@ -162,7 +166,7 @@ export default {
})
})
},
},
getHandleList
({
commit
})
{
// 获取并全局设置联勤联动处置列表
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'
,
[]))
commit
(
'SET_HANDLE_LIST'
,
com
.
confirm
(
res
,
'data.content'
,
[]))
})
})
},
},
...
...
src/store/mutations.js
View file @
3da9fa44
export
default
{
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
)
{
SET_LOADING
(
state
,
val
)
{
state
.
showLoading
=
val
state
.
showLoading
=
val
},
},
...
...
src/store/state.js
View file @
3da9fa44
export
default
{
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
,
showLoading
:
false
,
curDate
:
null
,
curDate
:
null
,
curSmartType
:
null
,
curSmartType
:
null
,
...
...
src/views/main.vue
View file @
3da9fa44
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
:complete=
"complete"
:complete=
"complete"
>
>
<m-map
ref=
"map"
@
complete=
"mapComplete"
@
event=
"handleMapClick"
/>
<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"
>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<LeftComponent
v-show=
"!fullView"
area=
"left"
/>
<LeftComponent
v-show=
"!fullView"
area=
"left"
/>
</m-animate>
</m-animate>
...
@@ -171,6 +171,7 @@ export default {
...
@@ -171,6 +171,7 @@ export default {
},
},
computed
:
{
computed
:
{
...
mapState
([
...
mapState
([
'currentStreetInfo'
,
'curSmartType'
,
'curSmartType'
,
'xinjiangwanPaths'
,
'xinjiangwanPaths'
,
'commandLayout'
,
'commandLayout'
,
...
@@ -180,6 +181,10 @@ export default {
...
@@ -180,6 +181,10 @@ export default {
'handleList'
,
'handleList'
,
])
])
},
},
beforeCreate
()
{
const
{
name
}
=
this
.
$route
.
query
this
.
$store
.
commit
(
'SET_CURRENT_STREET'
,
name
)
},
beforeDestroy
()
{
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
this
.
timer
=
null
this
.
timer
=
null
...
...
杨浦API.md
0 → 100644
View file @
3da9fa44
This diff is collapsed.
Click to expand it.
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