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
0184d012
Commit
0184d012
authored
Jun 10, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施设备表
parent
dfa0d51b
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
329 additions
and
23 deletions
+329
-23
index.html
index.html
+1
-1
api.ts
src/ajax/api.ts
+2
-1
dimond1.png
src/assets/images/dimond1.png
+0
-0
dimond2.png
src/assets/images/dimond2.png
+0
-0
my-drawer.vue
src/components/MyComponent/MyDrawer/my-drawer.vue
+2
-2
index.ts
src/store/index.ts
+1
-0
mutations.ts
src/store/mutations.ts
+4
-0
state.ts
src/store/state.ts
+1
-0
person-list.vue
src/view/components/person-list.vue
+3
-3
search-view.vue
src/view/components/search-view.vue
+21
-0
summary.vue
src/view/components/summary.vue
+23
-1
community-drawer.vue
src/view/drawers/community-drawer.vue
+93
-3
population-drawer.vue
src/view/drawers/population-drawer.vue
+81
-1
useSwitchMap.ts
src/view/hooks/useSwitchMap.ts
+32
-4
main.vue
src/view/main.vue
+1
-1
emergency-store.vue
src/view/right/emergency-store.vue
+64
-6
No files found.
index.html
View file @
0184d012
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<body>
<body>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<script
src=
"/SMap.min.js"
></script>
<script
src=
"/
dev/
SMap.min.js"
></script>
<script
src=
"/Plugins.min.js"
></script>
<script
src=
"/Plugins.min.js"
></script>
<script
src=
"/hls.js"
></script>
<script
src=
"/hls.js"
></script>
<script
type=
"module"
src=
"/src/main.ts"
></script>
<script
type=
"module"
src=
"/src/main.ts"
></script>
...
...
src/ajax/api.ts
View file @
0184d012
...
@@ -27,6 +27,7 @@ export default {
...
@@ -27,6 +27,7 @@ export default {
GET_COMMUNITY
:
'/service-basicdatasync-ddd/communities'
,
GET_COMMUNITY
:
'/service-basicdatasync-ddd/communities'
,
GET_MANAGE
:
'/service-basicdatasync-ddd/css'
,
// 小区管理处
GET_MANAGE
:
'/service-basicdatasync-ddd/css'
,
// 小区管理处
GET_BUILDING
:
'/service-basicdatasync-ddd/building'
,
// 门牌幢列表
GET_BUILDING
:
'/service-basicdatasync-ddd/building'
,
// 门牌幢列表
GET_DEVICE
:
'/service-basicdatasync-ddd/facilitiesEquipment'
,
// 设施设备列表
GET_INDUSTRY_AUTHORITY
:
'/service-basicdatasync-ddd/indCous'
,
// 业委会列表
GET_INDUSTRY_AUTHORITY
:
'/service-basicdatasync-ddd/indCous'
,
// 业委会列表
GET_HOC_MEMBER
:
'/service-basicdatasync-ddd/indcou/members'
,
// 业委会成员
GET_HOC_MEMBER
:
'/service-basicdatasync-ddd/indcou/members'
,
// 业委会成员
GET_COMMITTEE
:
'/service-basicdatasync-ddd/residentsCommittees'
,
// 居委会列表
GET_COMMITTEE
:
'/service-basicdatasync-ddd/residentsCommittees'
,
// 居委会列表
...
@@ -90,7 +91,7 @@ export default {
...
@@ -90,7 +91,7 @@ export default {
GET_ENTRY
:
'/service-special-nandong/inputUrl'
,
// 业务入口
GET_ENTRY
:
'/service-special-nandong/inputUrl'
,
// 业务入口
/** 公共服务 */
/** 公共服务 */
GET_ECOLOGY_LIST
:
'/service-
basicdatasync-ddd
/nonResident/ecological'
,
// 生态-衣食住行
GET_ECOLOGY_LIST
:
'/service-
special-nandong
/nonResident/ecological'
,
// 生态-衣食住行
GET_ECOLOGY_POINTS
:
'/service-basicdatasync-ddd/nonResidents'
,
// 获取衣食住行撒点
GET_ECOLOGY_POINTS
:
'/service-basicdatasync-ddd/nonResidents'
,
// 获取衣食住行撒点
GET_ECOLOGY_CONVENIENT
:
'/service-special-nandong/convenient/ecological'
,
// 生态-便民设施
GET_ECOLOGY_CONVENIENT
:
'/service-special-nandong/convenient/ecological'
,
// 生态-便民设施
GET_ECOLOGY_PHOTO
:
'/service-special-nandong/buildingPhotos'
,
// 生态 - 商业综合体、文保、历保照片
GET_ECOLOGY_PHOTO
:
'/service-special-nandong/buildingPhotos'
,
// 生态 - 商业综合体、文保、历保照片
...
...
src/assets/images/dimond1.png
0 → 100644
View file @
0184d012
546 Bytes
src/assets/images/dimond2.png
0 → 100644
View file @
0184d012
536 Bytes
src/components/MyComponent/MyDrawer/my-drawer.vue
View file @
0184d012
<
template
>
<
template
>
<teleport
to=
"
body
"
>
<teleport
to=
"
#app
"
>
<MyAnimate
enter=
"fadeInRight"
leave=
"fadeOutRight"
>
<MyAnimate
enter=
"fadeInRight"
leave=
"fadeOutRight"
>
<div
v-if=
"modelValue"
class=
"my-drawer"
:style=
"
{ width: width }">
<div
v-if=
"modelValue"
class=
"my-drawer"
:style=
"
{ width: width }">
<img
<img
...
@@ -66,7 +66,7 @@ export default defineComponent({
...
@@ -66,7 +66,7 @@ export default defineComponent({
top .45rem
top .45rem
right .05rem
right .05rem
bottom @right
bottom @right
z-index 9999
z-index 9999
9
$blur()
$blur()
color #fff
color #fff
.close-btn
.close-btn
...
...
src/store/index.ts
View file @
0184d012
...
@@ -165,6 +165,7 @@ export interface GlobalStateProps {
...
@@ -165,6 +165,7 @@ export interface GlobalStateProps {
elevCount
:
ElevCountProp
[]
elevCount
:
ElevCountProp
[]
responsivity
:
ResponsivityProp
[]
responsivity
:
ResponsivityProp
[]
entry
:
EntryProp
[]
entry
:
EntryProp
[]
emergencyPoints
:
any
[]
}
}
export
default
createStore
<
GlobalStateProps
>
({
export
default
createStore
<
GlobalStateProps
>
({
...
...
src/store/mutations.ts
View file @
0184d012
...
@@ -304,4 +304,8 @@ export default {
...
@@ -304,4 +304,8 @@ export default {
SET_ELEV_COUNT
(
state
:
GlobalStateProps
,
data
:
ElevCountProp
[]):
void
{
SET_ELEV_COUNT
(
state
:
GlobalStateProps
,
data
:
ElevCountProp
[]):
void
{
state
.
elevCount
=
data
state
.
elevCount
=
data
},
},
SET_EMERGENCY_POINTS
(
state
:
GlobalStateProps
,
data
:
any
[]):
void
{
state
.
emergencyPoints
=
data
},
}
}
src/store/state.ts
View file @
0184d012
...
@@ -244,4 +244,5 @@ export default {
...
@@ -244,4 +244,5 @@ export default {
elevCount
:
[],
elevCount
:
[],
responsivity
:
[],
responsivity
:
[],
entry
:
[],
entry
:
[],
emergencyPoints
:
[],
}
as
GlobalStateProps
}
as
GlobalStateProps
src/view/components/person-list.vue
View file @
0184d012
<
template
>
<
template
>
<div
class=
"person-list"
:class=
"
{ 'select-able': selectAble }">
<div
class=
"person-list"
:class=
"
{ 'select-able': selectAble }">
<template
v-if=
"
list && list
.length > 0"
>
<template
v-if=
"
data && data
.length > 0"
>
<div
<div
v-for=
"(item, i) in data"
v-for=
"(item, i) in data"
:key=
"i"
:key=
"i"
...
@@ -47,7 +47,7 @@ export default defineComponent({
...
@@ -47,7 +47,7 @@ export default defineComponent({
emits
:
[
'select'
],
emits
:
[
'select'
],
setup
(
props
,
ctx
)
{
setup
(
props
,
ctx
)
{
const
handleClick
=
(
data
:
unknown
)
=>
{
const
handleClick
=
(
data
:
unknown
)
=>
{
console
.
log
(
data
)
;
console
.
log
(
data
)
ctx
.
emit
(
'select'
,
data
)
ctx
.
emit
(
'select'
,
data
)
}
}
...
@@ -71,10 +71,10 @@ export default defineComponent({
...
@@ -71,10 +71,10 @@ export default defineComponent({
item
.
personInfo
=
item
.
personInfo
=
(
res
[
index
]
&&
res
[
index
].
data
&&
res
[
index
].
data
.
content
)
||
{}
(
res
[
index
]
&&
res
[
index
].
data
&&
res
[
index
].
data
.
content
)
||
{}
})
})
data
.
value
=
content
}
}
}
}
store
.
commit
(
'SET_LOADING'
,
false
)
store
.
commit
(
'SET_LOADING'
,
false
)
data
.
value
=
content
||
[]
},
},
{
immediate
:
true
}
{
immediate
:
true
}
)
)
...
...
src/view/components/search-view.vue
View file @
0184d012
...
@@ -123,6 +123,15 @@ export default defineComponent({
...
@@ -123,6 +123,15 @@ export default defineComponent({
).
data
).
data
return
content
return
content
}
}
const
searchDevice
=
async
(
params
:
any
)
=>
{
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_DEVICE
,
params
:
{
...
params
,
pageSize
:
1000
},
})
).
data
return
content
}
const
searchCompany
=
async
(
id
:
string
)
=>
{
const
searchCompany
=
async
(
id
:
string
)
=>
{
const
{
content
}
=
(
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_COMPANY
,
params
:
{
cspId
:
id
}
})
await
ajax
.
get
({
url
:
api
.
GET_COMPANY
,
params
:
{
cspId
:
id
}
})
...
@@ -216,12 +225,15 @@ export default defineComponent({
...
@@ -216,12 +225,15 @@ export default defineComponent({
caseInfo
.
value
=
content
||
[]
caseInfo
.
value
=
content
||
[]
const
{
buildingId
}
=
data
const
{
buildingId
}
=
data
if
(
buildingId
)
{
if
(
buildingId
)
{
// 楼栋信息
const
content
=
await
searchBuilding
({
unitId
:
buildingId
})
const
content
=
await
searchBuilding
({
unitId
:
buildingId
})
buildingInfo
.
value
=
content
&&
content
[
0
]
buildingInfo
.
value
=
content
&&
content
[
0
]
const
sectId
=
content
&&
content
[
0
]
&&
content
[
0
].
sectId
const
sectId
=
content
&&
content
[
0
]
&&
content
[
0
].
sectId
if
(
sectId
)
{
if
(
sectId
)
{
// 小区信息
const
content
=
await
searchCommunity
(
null
,
sectId
)
const
content
=
await
searchCommunity
(
null
,
sectId
)
communityInfo
.
value
=
content
&&
content
[
0
]
communityInfo
.
value
=
content
&&
content
[
0
]
// 管理处信息
const
csId
=
communityInfo
.
value
&&
communityInfo
.
value
.
csId
const
csId
=
communityInfo
.
value
&&
communityInfo
.
value
.
csId
if
(
csId
)
{
if
(
csId
)
{
const
{
content
}
=
(
const
{
content
}
=
(
...
@@ -234,6 +246,7 @@ export default defineComponent({
...
@@ -234,6 +246,7 @@ export default defineComponent({
}
else
{
}
else
{
communityInfo
.
value
.
manageInfo
=
{}
communityInfo
.
value
.
manageInfo
=
{}
}
}
// 业委会信息
const
hocId
=
communityInfo
.
value
&&
communityInfo
.
value
.
hocId
const
hocId
=
communityInfo
.
value
&&
communityInfo
.
value
.
hocId
if
(
hocId
)
{
if
(
hocId
)
{
const
content
=
await
searchHoc
(
hocId
)
const
content
=
await
searchHoc
(
hocId
)
...
@@ -243,6 +256,7 @@ export default defineComponent({
...
@@ -243,6 +256,7 @@ export default defineComponent({
}
else
{
}
else
{
communityInfo
.
value
.
hocInfo
=
{}
communityInfo
.
value
.
hocInfo
=
{}
}
}
// 物业信息
const
cspId
=
communityInfo
.
value
&&
communityInfo
.
value
.
cspId
const
cspId
=
communityInfo
.
value
&&
communityInfo
.
value
.
cspId
if
(
cspId
)
{
if
(
cspId
)
{
const
content
=
await
searchCompany
(
cspId
)
const
content
=
await
searchCompany
(
cspId
)
...
@@ -250,8 +264,12 @@ export default defineComponent({
...
@@ -250,8 +264,12 @@ export default defineComponent({
}
else
{
}
else
{
propertyInfo
.
value
=
{}
propertyInfo
.
value
=
{}
}
}
// 获取小区楼栋列表
communityInfo
.
value
.
buildingList
=
communityInfo
.
value
.
buildingList
=
(
await
searchBuilding
({
sectId
}))
||
[]
(
await
searchBuilding
({
sectId
}))
||
[]
// 设施设备列表
communityInfo
.
value
.
deviceList
=
(
await
searchDevice
({
sectId
}))
||
[]
}
else
{
}
else
{
communityInfo
.
value
=
{}
communityInfo
.
value
=
{}
}
}
...
@@ -296,6 +314,9 @@ export default defineComponent({
...
@@ -296,6 +314,9 @@ export default defineComponent({
}
}
communityInfo
.
value
.
buildingList
=
communityInfo
.
value
.
buildingList
=
(
await
searchBuilding
({
sectId
:
data
.
sectId
}))
||
[]
(
await
searchBuilding
({
sectId
:
data
.
sectId
}))
||
[]
// 设施设备列表
communityInfo
.
value
.
deviceList
=
(
await
searchDevice
({
sectId
:
data
.
sectId
}))
||
[]
communityModal
.
value
=
true
communityModal
.
value
=
true
populationModal
.
value
=
false
populationModal
.
value
=
false
caseModal
.
value
=
false
caseModal
.
value
=
false
...
...
src/view/components/summary.vue
View file @
0184d012
<
template
>
<
template
>
<div
class=
"summary-container"
:class=
"
{ 'over-two': list.length > 3 }">
<div
class=
"summary-container"
:class=
"
{ 'over-two': list.length > 3, 'click-able': clickAble }"
@click="handleClick"
>
<div
v-for=
"(item, i) in list"
:key=
"item.name"
>
<div
v-for=
"(item, i) in list"
:key=
"item.name"
>
<p>
<p>
<img
v-if=
"avatar && i === 0"
:src=
"avatar"
/>
<img
v-if=
"avatar && i === 0"
:src=
"avatar"
/>
...
@@ -30,6 +34,19 @@ export default defineComponent({
...
@@ -30,6 +34,19 @@ export default defineComponent({
type
:
String
as
PropType
<
string
>
,
type
:
String
as
PropType
<
string
>
,
default
:
null
,
default
:
null
,
},
},
clickAble
:
{
type
:
Boolean
as
PropType
<
boolean
>
,
default
:
false
,
},
},
emits
:
[
'select'
],
setup
(
props
,
ctx
)
{
const
handleClick
=
()
=>
{
if
(
props
.
clickAble
)
{
ctx
.
emit
(
'select'
)
}
}
return
{
handleClick
}
},
},
})
})
</
script
>
</
script
>
...
@@ -57,6 +74,11 @@ $create-border()
...
@@ -57,6 +74,11 @@ $create-border()
$card-bg2()
$card-bg2()
box-sizing border-box
box-sizing border-box
padding .06rem 0
padding .06rem 0
&.click-able
cursor pointer
&:hover
background rgba(70,83,97,0.5)
box-shadow none
&.over-two
&.over-two
>div
>div
&:nth-last-child(2)
&:nth-last-child(2)
...
...
src/view/drawers/community-drawer.vue
View file @
0184d012
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
</m-card>
</m-card>
<m-card
title=
"房屋档案"
>
<m-card
title=
"房屋档案"
>
<m-form
<m-form
class=
"basic-info"
:template=
"[
:template=
"[
'stNameFrst:小区名称',
'stNameFrst:小区名称',
'address:小区地址|cmtName:所属居委会',
'address:小区地址|cmtName:所属居委会',
...
@@ -103,7 +104,30 @@
...
@@ -103,7 +104,30 @@
<m-empty
v-else
/>
<m-empty
v-else
/>
</
template
>
</
template
>
<
template
v-else-if=
"curTab === 'device'"
>
<
template
v-else-if=
"curTab === 'device'"
>
<m-empty
/>
<div
class=
"select-bar"
>
<a-select
v-model:value=
"deviceType"
dropdown-class-name=
"device-selector-drop-down"
>
<a-select-option
v-for=
"option in deviceOptions"
:key=
"option.name"
:value=
"option.name"
>
{{
option
.
name
}}
</a-select-option>
</a-select>
</div>
<div
v-if=
"deviceList.length > 0"
class=
"device-table"
>
<m-table
:template=
"[
'序号|安装位置*2|名称*2|类型|维保单位*3',
'index|ieAddr|ieName|ieType|ieUnit',
]"
:data=
"deviceList"
/>
</div>
<m-empty
v-else
/>
</
template
>
</
template
>
<
template
v-else-if=
"curTab === 'public'"
>
<
template
v-else-if=
"curTab === 'public'"
>
<m-empty
/>
<m-empty
/>
...
@@ -200,6 +224,22 @@ export default defineComponent({
...
@@ -200,6 +224,22 @@ export default defineComponent({
showBuildingRoom
.
value
=
true
showBuildingRoom
.
value
=
true
}
}
const
deviceType
=
ref
(
'大门'
)
const
deviceOptions
=
ref
([
{
name
:
'大门'
,
type
:
'gate'
},
{
name
:
'监控'
,
type
:
'monitor'
},
{
name
:
'防盗门'
,
type
:
'security'
},
{
name
:
'电梯'
,
type
:
'elevator'
},
{
name
:
'消防泵'
,
type
:
'fire'
},
])
const
deviceList
=
computed
(()
=>
{
const
{
deviceList
:
list
}
=
props
.
communityInfo
as
any
if
(
!
list
||
list
.
length
===
0
)
return
[]
return
list
.
filter
((
e
:
any
)
=>
e
.
ieClassify
.
includes
(
deviceType
.
value
))
.
map
((
e
:
any
,
i
:
number
)
=>
({
index
:
i
+
1
,
...
e
}))
})
return
{
return
{
curTab
,
curTab
,
tabs
,
tabs
,
...
@@ -207,6 +247,9 @@ export default defineComponent({
...
@@ -207,6 +247,9 @@ export default defineComponent({
showBuildingRoom
,
showBuildingRoom
,
selectBuilding
,
selectBuilding
,
buildingRoomList
,
buildingRoomList
,
deviceType
,
deviceOptions
,
deviceList
,
}
}
},
},
})
})
...
@@ -238,7 +281,7 @@ export default defineComponent({
...
@@ -238,7 +281,7 @@ export default defineComponent({
&:hover
&:hover
background $secondary-color
background $secondary-color
.building-list
.building-list
max-height
60
vh
max-height
53
vh
overflow-y auto
overflow-y auto
>div
>div
display inline-block
display inline-block
...
@@ -266,6 +309,53 @@ export default defineComponent({
...
@@ -266,6 +309,53 @@ export default defineComponent({
border-bottom .01rem dotted rgba(91,213,255,.4)
border-bottom .01rem dotted rgba(91,213,255,.4)
margin .04rem 0
margin .04rem 0
.room-table
.room-table
max-height 38vh
max-height 50vh
overflow-y auto
.device-table
max-height 48vh
overflow-y auto
overflow-y auto
</
style
>
</
style
>
<
style
lang=
"stylus"
>
.community-drawer
.basic-info
margin-bottom .05rem
.row
.col
p
font-weight bold
padding .05rem
$bg = rgba(13, 39, 76, .7)
$size = .1rem
$height = .2rem
.select-bar
margin .04rem 0
.ant-select
background $bg
min-width .9rem
.ant-select-selector
min-width .9rem
border-top none
border-left none
border-right none
height $height
.ant-select-selection-item
font-size $size
line-height $height
text-align center
color #fff
font-weight bold
.ant-select-arrow
font-size $size * 0.8
.device-selector-drop-down
&.ant-select-dropdown
background $bg
font-size $size
.ant-select-item
font-size $size
line-height $height / 2
.ant-select-item-option-selected:not(.ant-select-item-option-disabled)
background $bg
font-size $size
</
style
>
src/view/drawers/population-drawer.vue
View file @
0184d012
...
@@ -135,7 +135,30 @@
...
@@ -135,7 +135,30 @@
<m-empty
v-else
/>
<m-empty
v-else
/>
</
template
>
</
template
>
<
template
v-else-if=
"curTab2 === 'device'"
>
<
template
v-else-if=
"curTab2 === 'device'"
>
<m-empty
/>
<div
class=
"select-bar"
>
<a-select
v-model:value=
"deviceType"
dropdown-class-name=
"device-selector-drop-down"
>
<a-select-option
v-for=
"option in deviceOptions"
:key=
"option.name"
:value=
"option.name"
>
{{
option
.
name
}}
</a-select-option>
</a-select>
</div>
<div
v-if=
"deviceList.length > 0"
class=
"device-table"
>
<m-table
:template=
"[
'序号|安装位置*2|名称*2|类型|维保单位*3',
'index|ieAddr|ieName|ieType|ieUnit',
]"
:data=
"deviceList"
/>
</div>
<m-empty
v-else
/>
</
template
>
</
template
>
<
template
v-else-if=
"curTab2 === 'public'"
>
<
template
v-else-if=
"curTab2 === 'public'"
>
<m-empty
/>
<m-empty
/>
...
@@ -329,6 +352,21 @@ export default defineComponent({
...
@@ -329,6 +352,21 @@ export default defineComponent({
const
getName
=
(
_
:
unknown
,
data
:
any
)
=>
{
const
getName
=
(
_
:
unknown
,
data
:
any
)
=>
{
return
data
.
cnName
||
data
.
enName
return
data
.
cnName
||
data
.
enName
}
}
const
deviceType
=
ref
(
'大门'
)
const
deviceOptions
=
ref
([
{
name
:
'大门'
,
type
:
'gate'
},
{
name
:
'监控'
,
type
:
'monitor'
},
{
name
:
'防盗门'
,
type
:
'security'
},
{
name
:
'电梯'
,
type
:
'elevator'
},
{
name
:
'消防泵'
,
type
:
'fire'
},
])
const
deviceList
=
computed
(()
=>
{
const
{
deviceList
:
list
}
=
props
.
communityInfo
as
any
if
(
!
list
||
list
.
length
===
0
)
return
[]
return
list
.
filter
((
e
:
any
)
=>
e
.
ieClassify
.
includes
(
deviceType
.
value
))
.
map
((
e
:
any
,
i
:
number
)
=>
({
index
:
i
+
1
,
...
e
}))
})
return
{
return
{
curTab
,
curTab
,
tabs
,
tabs
,
...
@@ -345,6 +383,9 @@ export default defineComponent({
...
@@ -345,6 +383,9 @@ export default defineComponent({
selectBuilding
,
selectBuilding
,
buildingRoomList
,
buildingRoomList
,
getName
,
getName
,
deviceType
,
deviceOptions
,
deviceList
,
}
}
},
},
})
})
...
@@ -406,4 +447,43 @@ export default defineComponent({
...
@@ -406,4 +447,43 @@ export default defineComponent({
.room-table
.room-table
max-height 38vh
max-height 38vh
overflow-y auto
overflow-y auto
.device-table
max-height 35vh
overflow-y auto
</
style
>
<
style
lang=
"stylus"
>
$bg = rgba(13, 39, 76, .7)
$size = .1rem
$height = .2rem
.select-bar
margin .04rem 0
.ant-select
background $bg
min-width .9rem
.ant-select-selector
min-width .9rem
border-top none
border-left none
border-right none
height $height
.ant-select-selection-item
font-size $size
line-height $height
text-align center
color #fff
font-weight bold
.ant-select-arrow
font-size $size * 0.8
.device-selector-drop-down
&.ant-select-dropdown
background $bg
font-size $size
.ant-select-item
font-size $size
line-height $height / 2
.ant-select-item-option-selected:not(.ant-select-item-option-disabled)
background $bg
font-size $size
</
style
>
</
style
>
src/view/hooks/useSwitchMap.ts
View file @
0184d012
...
@@ -136,20 +136,31 @@ export default function useSwitchMap(map: any): any {
...
@@ -136,20 +136,31 @@ export default function useSwitchMap(map: any): any {
}
}
// 撒点相关
// 撒点相关
watch
([()
=>
curPointType
.
value
,
()
=>
checkedKeys
.
value
],
([
type
,
keys
])
=>
watch
(
[()
=>
curPointType
.
value
,
()
=>
checkedKeys
.
value
],
([
type
,
keys
],
[
pastType
,
pastKeys
])
=>
{
if
(
type
===
pastType
&&
keys
.
join
()
===
pastKeys
.
join
())
return
handlePoint
(
type
,
keys
)
handlePoint
(
type
,
keys
)
}
)
)
const
ecologyPoints
=
computed
(()
=>
store
.
state
.
ecologyPoints
)
const
ecologyPoints
=
computed
(()
=>
store
.
state
.
ecologyPoints
)
const
mapPoints
=
ref
<
any
>
(
null
)
const
mapPoints
=
ref
<
any
>
(
null
)
const
emergencyPoints
=
computed
(()
=>
store
.
state
.
emergencyPoints
)
const
mapEmergency
=
ref
<
any
>
(
null
)
function
handlePoint
(
type
:
null
|
string
,
keys
:
string
[])
{
function
handlePoint
(
type
:
null
|
string
,
keys
:
string
[])
{
if
(
!
map
.
value
)
return
if
(
!
map
.
value
)
return
const
{
showCommunity
,
hideCommunity
,
addPoint
,
remove
}
=
map
.
value
if
(
keys
.
length
===
0
)
{
hideCommunity
()
remove
(
mapPoints
.
value
)
return
}
const
pointData
=
type
const
pointData
=
type
?
ecologyPoints
.
value
.
filter
((
e
)
=>
e
.
labelName
===
type
)
?
ecologyPoints
.
value
.
filter
((
e
)
=>
e
.
labelName
===
type
)
:
ecologyPoints
.
value
:
ecologyPoints
.
value
const
{
showCommunity
,
hideCommunity
,
addPoint
,
remove
}
=
map
.
value
if
(
keys
.
some
((
key
)
=>
key
===
'community'
))
{
if
(
keys
.
some
((
key
)
=>
key
===
'community'
))
{
showCommunity
()
showCommunity
()
}
else
{
}
else
{
...
@@ -164,6 +175,7 @@ export default function useSwitchMap(map: any): any {
...
@@ -164,6 +175,7 @@ export default function useSwitchMap(map: any): any {
// const signPoints = []
// const signPoints = []
// const historyPoints = []
// const historyPoints = []
remove
(
mapEmergency
.
value
)
remove
(
mapPoints
.
value
)
remove
(
mapPoints
.
value
)
mapPoints
.
value
=
addPoint
({
mapPoints
.
value
=
addPoint
({
key
:
'map-points'
,
key
:
'map-points'
,
...
@@ -194,6 +206,22 @@ export default function useSwitchMap(map: any): any {
...
@@ -194,6 +206,22 @@ export default function useSwitchMap(map: any): any {
})
})
}
}
watch
(
()
=>
emergencyPoints
.
value
,
(
points
)
=>
{
if
(
points
.
length
===
0
||
!
map
.
value
)
return
store
.
commit
(
'SET_CHECKED_KEYS'
,
[])
const
{
addPoint
,
remove
}
=
map
.
value
remove
(
mapEmergency
.
value
)
remove
(
mapPoints
.
value
)
mapEmergency
.
value
=
addPoint
({
key
:
'map-emergency'
,
size
:
20
,
data
:
points
,
})
}
)
return
{
return
{
handleMapComplete
,
handleMapComplete
,
selectArea
,
selectArea
,
...
...
src/view/main.vue
View file @
0184d012
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
gap=
"0.05rem"
gap=
"0.05rem"
>
>
<m-title
area=
"title"
>
南东城运
</m-title>
<m-title
area=
"title"
>
南东城运
</m-title>
<
!--
<m-map
ref=
"map"
width=
"71vw"
@
complete=
"handleMapComplete"
/>
--
>
<
m-map
ref=
"map"
width=
"71vw"
@
complete=
"handleMapComplete"
/
>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<m-animate
enter=
"fadeInLeft"
leave=
"fadeOutLeft"
>
<Command
v-show=
"'street' === curViewType && !fullScreen"
area=
"left"
/>
<Command
v-show=
"'street' === curViewType && !fullScreen"
area=
"left"
/>
</m-animate>
</m-animate>
...
...
src/view/right/emergency-store.vue
View file @
0184d012
...
@@ -24,7 +24,12 @@
...
@@ -24,7 +24,12 @@
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</div>
</div>
<Summary
:list=
"houseSum"
:avatar=
"avatar8"
/>
<Summary
:list=
"houseSum"
:avatar=
"avatar8"
click-able
@
select=
"selectBuilding(null)"
/>
<div
class=
"chart-container"
>
<div
class=
"chart-container"
>
<div
class=
"info"
>
<div
class=
"info"
>
<div
v-for=
"item in info"
:key=
"item.name"
>
<div
v-for=
"item in info"
:key=
"item.name"
>
...
@@ -46,7 +51,10 @@
...
@@ -46,7 +51,10 @@
<div
v-for=
"item in buildings"
:key=
"item.id"
>
<div
v-for=
"item in buildings"
:key=
"item.id"
>
<div>
<div>
<span>
{{
item
.
projectName
}}
</span>
<span>
{{
item
.
projectName
}}
</span>
<img
src=
"@/assets/images/location.png"
/>
<img
src=
"@/assets/images/location.png"
@
click=
"selectBuilding(item)"
/>
</div>
</div>
<div
class=
"secRow"
>
<div
class=
"secRow"
>
<span>
<span>
...
@@ -96,6 +104,8 @@ import avatar8 from '@/assets/images/avatar8.png'
...
@@ -96,6 +104,8 @@ import avatar8 from '@/assets/images/avatar8.png'
import
one
from
'@/assets/images/1.png'
import
one
from
'@/assets/images/1.png'
import
two
from
'@/assets/images/2.png'
import
two
from
'@/assets/images/2.png'
import
three
from
'@/assets/images/3.png'
import
three
from
'@/assets/images/3.png'
import
{
ajax
,
api
}
from
'@/ajax'
import
dimond2
from
'@/assets/images/dimond2.png'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'EmergencyStore'
,
name
:
'EmergencyStore'
,
...
@@ -115,10 +125,57 @@ export default defineComponent({
...
@@ -115,10 +125,57 @@ export default defineComponent({
{
name
:
'危险点数'
,
value
:
0
},
{
name
:
'危险点数'
,
value
:
0
},
])
])
const
buildings
=
computed
(()
=>
{
const
pubulicSafeBuildings
=
computed
(
const
data
=
store
.
state
.
pubulicSafeBuildings
()
=>
store
.
state
.
pubulicSafeBuildings
return
data
.
filter
((
e
)
=>
e
.
year
===
year
.
value
)
)
const
buildings
=
computed
(()
=>
pubulicSafeBuildings
.
value
.
filter
((
e
:
any
)
=>
e
.
year
===
year
.
value
)
)
const
locations
=
ref
<
any
>
({})
watch
(
()
=>
pubulicSafeBuildings
.
value
,
async
(
list
)
=>
{
if
(
list
.
length
===
0
)
return
const
ids
=
list
.
map
((
item
:
any
)
=>
(
item
&&
item
.
sectId
)
||
''
)
.
join
(
','
)
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_COMMUNITY
,
params
:
{
pageSize
:
1000
,
sectId_in
:
ids
},
})
).
data
if
(
content
&&
content
.
length
>
0
)
{
const
obj
:
any
=
{}
content
.
forEach
((
item
:
any
)
=>
{
obj
[
item
.
sectId
]
=
{
x
:
item
.
maxx
||
item
.
minx
,
y
:
item
.
maxy
||
item
.
miny
,
}
})
})
locations
.
value
=
obj
}
},
{
immediate
:
true
}
)
const
emergencyPoints
=
computed
(()
=>
store
.
state
.
emergencyPoints
)
const
selectBuilding
=
(
data
:
any
)
=>
{
let
points
=
buildings
.
value
.
map
((
item
:
any
)
=>
({
...(
locations
.
value
[
item
.
sectId
]
||
{}),
...
item
,
icon
:
dimond2
,
size
:
18
,
}))
if
(
data
)
{
if
(
!
data
.
sectId
)
return
if
(
emergencyPoints
.
value
.
length
>
0
)
{
points
.
find
((
e
:
any
)
=>
e
.
sectId
===
data
.
sectId
).
size
=
22
}
else
{
points
=
[
points
.
find
((
e
:
any
)
=>
e
.
sectId
===
data
.
sectId
)]
}
}
store
.
commit
(
'SET_EMERGENCY_POINTS'
,
points
)
}
//切换年份
//切换年份
const
changeYear
=
(
value
:
string
)
=>
{
const
changeYear
=
(
value
:
string
)
=>
{
...
@@ -277,6 +334,7 @@ export default defineComponent({
...
@@ -277,6 +334,7 @@ export default defineComponent({
outHouseWall
,
outHouseWall
,
pieData
,
pieData
,
barOption
,
barOption
,
selectBuilding
,
}
}
},
},
})
})
...
...
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