Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-nanjing-new
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
郭铭瑶
east-nanjing-new
Commits
30743bf7
Commit
30743bf7
authored
Apr 13, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公共安全除饼图和切换年份换数据,接口完成
parent
3bbe493c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
28 deletions
+76
-28
actions.ts
src/store/actions.ts
+24
-5
index.ts
src/store/index.ts
+1
-0
mutations.ts
src/store/mutations.ts
+7
-0
state.ts
src/store/state.ts
+1
-0
house.vue
src/view/right/house.vue
+1
-1
police.vue
src/view/right/police.vue
+13
-6
public-safety.vue
src/view/right/public-safety.vue
+29
-16
No files found.
src/store/actions.ts
View file @
30743bf7
...
...
@@ -43,9 +43,30 @@ export default {
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_PUBLICSAFE_NEWFIND
})
).
data
console
.
log
(
content
)
const
obj
=
{
done
:
0
,
doing
:
0
,
find
:
0
,
newFind
:
content
.
newDiscovery
,
}
function
format
(
params
:
any
)
{
params
.
forEach
((
item
:
any
)
=>
{
obj
.
find
+=
item
.
num
switch
(
item
.
status
)
{
case
'已结案'
:
obj
.
done
=
item
.
num
break
case
'待处置'
:
obj
.
find
=
item
.
num
break
default
:
break
}
})
}
format
(
content
.
caseNum
)
// commit('SET_PUBLICSAFE_NEWFIND', publicHouse
)
commit
(
'SET_PUBLICSAFE_NEWFIND'
,
obj
)
},
// 公共服务 - 门岗值守 - 社会物业和直管公房数据
async
GET_PUBLICSAFE_RIGHT_GATE
({
...
...
@@ -196,8 +217,7 @@ export default {
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_PUBLICSAFE_OUTHOUSEWALL
})
).
data
console
.
log
(
content
)
// console.log(content)
commit
(
'SET_PUBLICSAFE_OUTHOUSEWALL_2019'
,
content
[
0
])
commit
(
'SET_PUBLICSAFE_OUTHOUSEWALL_2020'
,
content
[
1
])
},
...
...
@@ -213,7 +233,6 @@ export default {
params
:
{
pageSize
:
1000
},
})
).
data
console
.
log
(
content
)
commit
(
'SET_PUBLICSAFE_BUILDINGS'
,
content
)
},
// 公共服务 - 房屋外立面饼图
...
...
src/store/index.ts
View file @
30743bf7
...
...
@@ -29,6 +29,7 @@ export interface GlobalStateProps {
pubulicSafeOutHouseWall2020
:
{
[
key
:
string
]:
number
}
pubulicSafeBuildings
:
unknown
[]
pubulicSafePieData
:
unknown
[]
pubulicSafeNewFindNum
:
{
[
key
:
string
]:
number
}
}
export
default
createStore
<
GlobalStateProps
>
({
state
,
...
...
src/store/mutations.ts
View file @
30743bf7
...
...
@@ -113,4 +113,11 @@ export default {
):
void
{
state
.
pubulicSafePieData
=
data
},
SET_PUBLICSAFE_NEWFIND
(
// 公共安全-最新发现数
state
:
GlobalStateProps
,
data
:
{
[
key
:
string
]:
number
}
):
void
{
state
.
pubulicSafeNewFindNum
=
data
},
}
src/store/state.ts
View file @
30743bf7
...
...
@@ -26,4 +26,5 @@ export default {
pubulicSafeOutHouseWall2020
:
{},
pubulicSafeBuildings
:
[],
pubulicSafePieData
:
[],
pubulicSafeNewFindNum
:
{},
}
as
GlobalStateProps
src/view/right/house.vue
View file @
30743bf7
...
...
@@ -17,7 +17,7 @@
<m-count
class=
"count"
:value=
"pubulicSafeHouse.befor"
/>
<span
class=
"unit"
>
幢
</span>
</p>
<
img
src=
"@/assets/images/location.png"
/
>
<
!--
<img
src=
"@/assets/images/location.png"
/>
--
>
</div>
<m-progress
v-if=
"allTrueHouse"
...
...
src/view/right/police.vue
View file @
30743bf7
<
template
>
<m-card
title=
"110非警情"
>
<div>
<m-sub
:addition=
"
{ value: 3, unit: '近30mins' }">最新发现
</m-sub>
<m-sub
:addition=
"
{ value: String(newFind.newFind), unit: '近30mins' }">
最新发现
</m-sub>
<Brief
:list=
"sumList"
/>
<div
v-if=
"showChart"
class=
"chart"
>
<m-line
:dataset=
"lineData"
:option=
"lineOption"
/>
...
...
@@ -70,6 +72,8 @@ export default defineComponent({
setup
()
{
store
.
dispatch
(
'GET_PUBLICSAFE_RIGHT_GATE'
)
store
.
dispatch
(
'GET_PUBLICSAFE_RIGHT_SAFEMAP'
)
store
.
dispatch
(
'GET_PUBLICSAFE_NEWFIND'
)
const
newFind
=
computed
(()
=>
store
.
state
.
pubulicSafeNewFindNum
)
const
searchModal
=
ref
(
false
)
const
showChart
=
computed
(()
=>
store
.
state
.
curTheme
===
'safety'
)
const
fontSize
=
computed
(()
=>
Math
.
floor
((
screen
.
height
*
1.6
)
/
100
))
...
...
@@ -82,11 +86,13 @@ export default defineComponent({
const
safeMap
=
computed
(()
=>
store
.
state
.
pubulicSafeMap
)
// 门岗值守数据 - 社会物业
const
streetData
=
ref
(
''
)
const
sumList
=
ref
<
BriefProp
[]
>
([
{
name
:
'今日发现'
,
value
:
157
,
icon
:
icon15
},
{
name
:
'今日处置中'
,
value
:
64
,
icon
:
icon16
},
{
name
:
'今日结案'
,
value
:
37
,
icon
:
icon17
},
])
const
sumList
=
computed
(()
=>
{
return
[
{
name
:
'今日发现'
,
value
:
newFind
.
value
.
find
,
icon
:
icon15
},
{
name
:
'今日处置中'
,
value
:
newFind
.
value
.
doing
,
icon
:
icon16
},
{
name
:
'今日结案'
,
value
:
newFind
.
value
.
done
,
icon
:
icon17
},
]
})
const
lineData
=
ref
({
dimensions
:
[
{
name
:
'time'
,
displayName
:
'时间'
},
...
...
@@ -175,6 +181,7 @@ export default defineComponent({
zggfList
,
shwyList
,
clickStreetName
,
newFind
,
}
},
})
...
...
src/view/right/public-safety.vue
View file @
30743bf7
...
...
@@ -36,9 +36,7 @@
</a-select-option>
</a-select>
</div>
<Summary
class=
"summary"
:two-child=
"true"
:list=
"houseSum"
/>
<div
class=
"chartBox"
>
<div
v-if=
"showChart"
class=
"drawCharts"
>
<div>
...
...
@@ -64,8 +62,7 @@
<span
:style=
"
{ background: pieOption.color[i][0] }" />
<m-count
class=
"count"
:value=
"item.value"
/>
</p>
<p>
外墙面层开裂
</p>
<p>
高坠隐患点
</p>
<span
style=
""
>
{{
item
.
name
}}
</span>
</div>
</div>
</div>
...
...
@@ -194,17 +191,31 @@ export default defineComponent({
{
name
:
'楼宇名称'
,
value
:
4
,
danger
:
1
},
])
const
pieData1
=
ref
({
const
pieData1
=
computed
(()
=>
{
return
{
dimensions
:
[
{
name
:
'name'
,
displayName
:
'类型'
},
{
name
:
'value'
,
displayName
:
'数量'
},
],
source
:
[
{
name
:
'事业单位'
,
value
:
4591
},
{
name
:
'企业单位'
,
value
:
4591
},
{
name
:
'机关团体'
,
value
:
1020
},
{
name
:
'其他'
,
value
:
899
},
{
name
:
'外立面附加设施危险点'
,
value
:
outHouseWall2019
.
value
.
outerWallFacilityDangerPoint
,
},
{
name
:
'外立面附加设施隐患点'
,
value
:
outHouseWall2019
.
value
.
outerWallFacilityHiddenPoint
,
},
{
name
:
'外墙面层隐患点'
,
value
:
outHouseWall2019
.
value
.
outerWallHiddenPoint
,
},
{
name
:
'外墙面层危险点'
,
value
:
outHouseWall2019
.
value
.
outerWallDangerPoint
,
},
],
}
})
const
pieData2
=
ref
({
dimensions
:
[
...
...
@@ -310,7 +321,7 @@ export default defineComponent({
font-size 0.2rem
font-family $font-pang
.outHouse
white-space nowrap
//
white-space nowrap
flex 2
.chartBox
height 40%
...
...
@@ -368,6 +379,8 @@ export default defineComponent({
flex-direction column
justify-content space-between
align-items center
>span
width 70%
>p
flex 1
white-space nowrap
...
...
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