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
c202ad50
Commit
c202ad50
authored
Jun 04, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
person-list暂存
parent
d331de0c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
165 additions
and
78 deletions
+165
-78
api.ts
src/ajax/api.ts
+1
-0
actions.ts
src/store/actions.ts
+0
-28
index.ts
src/store/index.ts
+0
-2
mutations.ts
src/store/mutations.ts
+0
-6
state.ts
src/store/state.ts
+0
-2
case-list.vue
src/view/components/case-list.vue
+1
-1
map-btns.vue
src/view/components/map-btns.vue
+0
-1
person-list.vue
src/view/components/person-list.vue
+135
-0
search-view.vue
src/view/components/search-view.vue
+21
-36
population-drawer.vue
src/view/drawers/population-drawer.vue
+7
-2
No files found.
src/ajax/api.ts
View file @
c202ad50
...
@@ -23,6 +23,7 @@ export default {
...
@@ -23,6 +23,7 @@ export default {
TEST
:
'/service-basicdatasync-ddd/communities'
,
TEST
:
'/service-basicdatasync-ddd/communities'
,
GET_LIST
:
'/service-special-nandong/classifyAddrs'
,
// 根据地址搜索
GET_LIST
:
'/service-special-nandong/classifyAddrs'
,
// 根据地址搜索
GET_ROOM
:
'/service-special-nandong/households'
,
// 获取分户
GET_ROOM
:
'/service-special-nandong/households'
,
// 获取分户
GET_PERSON
:
'/service-special-nandong/personnels'
,
// 实有人口
GET_COMMUNITY_DETAIL
:
'/service-basicdatasync-ddd/communities'
,
GET_COMMUNITY_DETAIL
:
'/service-basicdatasync-ddd/communities'
,
GET_BUILDING
:
'/service-basicdatasync-ddd/building'
,
// 门牌幢列表
GET_BUILDING
:
'/service-basicdatasync-ddd/building'
,
// 门牌幢列表
GET_INDUSTRY_AUTHORITY
:
'/service-basicdatasync-ddd/indCous'
,
// 业委会列表
GET_INDUSTRY_AUTHORITY
:
'/service-basicdatasync-ddd/indCous'
,
// 业委会列表
...
...
src/store/actions.ts
View file @
c202ad50
...
@@ -7,8 +7,6 @@ const today = dayjs().format('YYYY-MM-DD')
...
@@ -7,8 +7,6 @@ const today = dayjs().format('YYYY-MM-DD')
export
default
{
export
default
{
initData
({
dispatch
}:
{
dispatch
:
Dispatch
}):
void
{
initData
({
dispatch
}:
{
dispatch
:
Dispatch
}):
void
{
dispatch
(
'getPropertySummary'
)
dispatch
(
'getPropertySummary'
)
dispatch
(
'getCaseList'
)
dispatch
(
'getRoomList'
)
dispatch
(
'GET_PUBLICSAFE_COMMANDSYSTEM'
)
dispatch
(
'GET_PUBLICSAFE_COMMANDSYSTEM'
)
dispatch
(
'GET_PUBLICSAFE_STREETPOWER'
)
dispatch
(
'GET_PUBLICSAFE_STREETPOWER'
)
dispatch
(
'GET_PUBLICSAFE_PARTY'
)
dispatch
(
'GET_PUBLICSAFE_PARTY'
)
...
@@ -68,32 +66,6 @@ export default {
...
@@ -68,32 +66,6 @@ export default {
commit
(
'SET_PROPERTY_SUMMARY'
,
{
num1
:
+
num1
,
num2
:
+
num2
,
num3
:
+
num3
})
commit
(
'SET_PROPERTY_SUMMARY'
,
{
num1
:
+
num1
,
num2
:
+
num2
,
num3
:
+
num3
})
},
},
// 案件汇总列表
async
getCaseList
(
{
commit
}:
{
commit
:
Commit
},
address
=
null
):
Promise
<
void
>
{
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_CASE
,
params
:
{
pageSize
:
200
,
address_l
:
address
},
})
).
data
commit
(
'SET_CASE_LIST'
,
content
)
},
async
getRoomList
(
{
commit
}:
{
commit
:
Commit
},
address
=
null
):
Promise
<
void
>
{
const
{
content
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_LIST
,
params
:
{
pageSize
:
200
,
addr_l
:
address
,
classifyName
:
'分户'
},
})
).
data
commit
(
'SET_ROOM_LIST'
,
content
)
},
// 公共服务 - 门岗值守 - 社会物业和直管公房数据
// 公共服务 - 门岗值守 - 社会物业和直管公房数据
async
GET_PUBLICSAFE_NEWFIND
({
commit
}:
{
commit
:
Commit
}):
Promise
<
void
>
{
async
GET_PUBLICSAFE_NEWFIND
({
commit
}:
{
commit
:
Commit
}):
Promise
<
void
>
{
const
{
content
}
=
(
const
{
content
}
=
(
...
...
src/store/index.ts
View file @
c202ad50
...
@@ -109,8 +109,6 @@ export interface GlobalStateProps {
...
@@ -109,8 +109,6 @@ export interface GlobalStateProps {
readonly
communityOptions
:
ViewType
[]
readonly
communityOptions
:
ViewType
[]
curTheme
:
ThemeType
curTheme
:
ThemeType
propertySummary
:
{
[
key
:
string
]:
number
}
propertySummary
:
{
[
key
:
string
]:
number
}
caseList
:
unknown
[]
roomList
:
unknown
[]
pubulicSafeGateSenteryShehuiwuye
:
{
[
key
:
string
]:
number
}[]
pubulicSafeGateSenteryShehuiwuye
:
{
[
key
:
string
]:
number
}[]
pubulicSafeGateSenteryZhiguangongfang
:
{
[
key
:
string
]:
number
}[]
pubulicSafeGateSenteryZhiguangongfang
:
{
[
key
:
string
]:
number
}[]
pubulicSafeMap
:
unknown
[]
pubulicSafeMap
:
unknown
[]
...
...
src/store/mutations.ts
View file @
c202ad50
...
@@ -38,12 +38,6 @@ export default {
...
@@ -38,12 +38,6 @@ export default {
):
void
{
):
void
{
state
.
propertySummary
=
val
state
.
propertySummary
=
val
},
},
SET_CASE_LIST
(
state
:
GlobalStateProps
,
data
:
unknown
[]):
void
{
state
.
caseList
=
data
},
SET_ROOM_LIST
(
state
:
GlobalStateProps
,
data
:
unknown
[]):
void
{
state
.
roomList
=
data
},
SET_STATION
(
state
:
GlobalStateProps
,
data
:
{
[
key
:
string
]:
unknown
}):
void
{
SET_STATION
(
state
:
GlobalStateProps
,
data
:
{
[
key
:
string
]:
unknown
}):
void
{
state
.
stationInfo
=
data
state
.
stationInfo
=
data
},
},
...
...
src/store/state.ts
View file @
c202ad50
...
@@ -180,8 +180,6 @@ export default {
...
@@ -180,8 +180,6 @@ export default {
],
],
},
},
propertySummary
:
{},
propertySummary
:
{},
caseList
:
[],
roomList
:
[],
stationInfo
:
{},
stationInfo
:
{},
pubulicSafeGateSenteryShehuiwuye
:
[],
pubulicSafeGateSenteryShehuiwuye
:
[],
pubulicSafeGateSenteryZhiguangongfang
:
[],
pubulicSafeGateSenteryZhiguangongfang
:
[],
...
...
src/view/
drawer
s/case-list.vue
→
src/view/
component
s/case-list.vue
View file @
c202ad50
...
@@ -84,7 +84,7 @@ export default defineComponent({
...
@@ -84,7 +84,7 @@ export default defineComponent({
box-shadow none
box-shadow none
.case-item
.case-item
position relative
position relative
margin-
top
.08rem
margin-
bottom
.08rem
padding .05rem .08rem
padding .05rem .08rem
overflow hidden
overflow hidden
background rgba(70,83,97,.45)
background rgba(70,83,97,.45)
...
...
src/view/components/map-btns.vue
View file @
c202ad50
...
@@ -83,7 +83,6 @@ export default defineComponent({
...
@@ -83,7 +83,6 @@ export default defineComponent({
ctx
.
emit
(
'full'
,
fullScreen
.
value
)
ctx
.
emit
(
'full'
,
fullScreen
.
value
)
break
break
case
'search'
:
case
'search'
:
store
.
dispatch
(
'getCaseList'
)
searchModal
.
value
=
true
searchModal
.
value
=
true
break
break
case
'in'
:
case
'in'
:
...
...
src/view/components/person-list.vue
0 → 100644
View file @
c202ad50
<
template
>
<div
class=
"person-list"
:class=
"
{ 'select-able': selectAble }">
<template
v-if=
"list && list.length > 0"
>
<div
v-for=
"(item, i) in data"
:key=
"i"
class=
"person-item"
@
click=
"handleClick(item)"
>
<div>
{{
item
.
communityName
}}
|
{{
item
.
addr
}}
</div>
<div>
无
<span>
<b>
实有人
</b>
</span>
{{
persons
(
item
)
}}
<span>
<b>
实住人
</b>
</span>
</div>
</div>
</
template
>
<m-empty
v-else
:img=
"empty"
hidden-text
/>
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
ref
,
watch
}
from
'vue'
import
empty
from
'@/assets/images/empty.png'
import
{
ajax
,
api
}
from
'@/ajax'
export
default
defineComponent
({
name
:
'CaseList'
,
props
:
{
list
:
{
type
:
Array
as
PropType
<
any
[]
|
null
>
,
default
:
()
=>
{
return
[]
},
},
selectAble
:
{
type
:
Boolean
as
PropType
<
boolean
>
,
default
:
false
,
},
},
emits
:
[
'select'
],
setup
(
props
,
ctx
)
{
const
handleClick
=
(
data
:
unknown
)
=>
{
ctx
.
emit
(
'select'
,
data
)
}
const
data
=
ref
<
any
>
([])
watch
(
()
=>
props
.
list
,
async
(
content
)
=>
{
if
(
content
&&
content
.
length
>
0
)
{
content
.
forEach
(
async
(
item
:
any
)
=>
{
const
{
content
:
person
}
=
(
await
ajax
.
get
({
url
:
api
.
GET_PERSON
,
params
:
{
pageSize
:
100
,
liveAddr_l
:
item
.
addr
},
})
).
data
item
.
personInfo
=
person
})
}
data
.
value
=
content
},
{
immediate
:
true
}
)
const
persons
=
(
data
:
any
)
=>
{
const
{
personInfo
}
=
data
if
(
personInfo
&&
personInfo
.
length
>
0
)
{
const
result
=
personInfo
.
map
((
item
:
any
)
=>
item
.
cnName
)
return
result
.
join
(
' | '
)
}
return
'无'
}
return
{
data
,
empty
,
handleClick
,
persons
,
}
},
})
</
script
>
<
style
lang=
"stylus"
scoped
>
@import '../../components/MyComponent/main.styl'
.person-list
width 100%
height 100%
padding-right .05rem
overflow-y auto
&.select-able
.person-item
cursor pointer
transition all .1s ease
&:hover
background rgba(70,83,97,.25)
box-shadow none
.person-item
position relative
margin-bottom .08rem
padding .05rem .08rem
overflow hidden
background rgba(70,83,97,.45)
box-shadow 0 0 .04rem 0 rgba(44,51,70,.65), inset 0 .01rem .02rem 0 rgba(204,204,204,.2)
border-radius .04rem
>div
font-size .09rem
span
display inline-block
font-size .08rem
padding 0 .06rem
border-radius .08rem
margin-left .1rem
transform skew(-30deg)
background $edge
>b
display inline-block
transform skew(30deg)
font-weight normal
color #000
&:nth-of-type(1)
background gold
margin-right .6rem
&:nth-of-type(1)
border-bottom .01rem dotted rgba(91,213,255,.5)
margin-bottom .08rem
padding-bottom .06rem
font-size .11rem
font-weight bold
</
style
>
src/view/components/search-view.vue
View file @
c202ad50
...
@@ -23,14 +23,10 @@
...
@@ -23,14 +23,10 @@
<template
v-if=
"searchType === 'case'"
>
<template
v-if=
"searchType === 'case'"
>
<CaseList
:list=
"list"
select-able
@
select=
"handleSelect"
/>
<CaseList
:list=
"list"
select-able
@
select=
"handleSelect"
/>
</
template
>
</
template
>
<
template
v-else-if=
"searchType === 'population'"
></
template
>
<
template
v-else-if=
"searchType === 'population'"
>
<PersonList
:list=
"list"
select-able
@
select=
"handleSelect"
/>
</
template
>
<
template
v-else-if=
"searchType === 'community'"
></
template
>
<
template
v-else-if=
"searchType === 'community'"
></
template
>
<!-- <div v-for="(item, i) in caseList" :key="i" @click="handleSelect(item)">
<span :class="getStyle(item.managementType || item.classifyName)">{{
item.managementType || item.classifyName
}}</span>
<p>{{ item.address || item.addr }}</p>
</div> -->
</template>
</template>
<m-empty
v-else
/>
<m-empty
v-else
/>
</div>
</div>
...
@@ -60,23 +56,29 @@
...
@@ -60,23 +56,29 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
computed
,
defineComponent
,
onMounted
,
ref
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
watch
}
from
'vue'
import
CaseDrawer
from
'@/view/drawers/case-drawer.vue'
import
CaseDrawer
from
'@/view/drawers/case-drawer.vue'
import
PopulationDrawer
from
'@/view/drawers/population-drawer.vue'
import
PopulationDrawer
from
'@/view/drawers/population-drawer.vue'
import
CommunityDrawer
from
'@/view/drawers/community-drawer.vue'
import
CommunityDrawer
from
'@/view/drawers/community-drawer.vue'
import
store
from
'@/store'
import
{
ajax
,
api
}
from
'@/ajax'
import
{
ajax
,
api
}
from
'@/ajax'
import
CaseList
from
'../drawers/case-list.vue'
import
CaseList
from
'./case-list.vue'
import
PersonList
from
'./person-list.vue'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'SearchView'
,
name
:
'SearchView'
,
components
:
{
CaseDrawer
,
PopulationDrawer
,
CommunityDrawer
,
CaseList
},
components
:
{
CaseDrawer
,
PopulationDrawer
,
CommunityDrawer
,
CaseList
,
PersonList
,
},
setup
()
{
setup
()
{
const
searchType
=
ref
(
'case'
)
const
searchType
=
ref
(
'case'
)
const
searchKey
=
ref
(
''
)
const
searchKey
=
ref
(
''
)
const
list
=
ref
([])
const
list
=
ref
([])
const
searchCase
=
async
(
address
:
string
,
pageSize
=
2
00
)
=>
{
const
searchCase
=
async
(
address
:
string
,
pageSize
=
1
00
)
=>
{
const
{
content
}
=
(
const
{
content
}
=
(
await
ajax
.
get
({
await
ajax
.
get
({
url
:
api
.
GET_CASE
,
url
:
api
.
GET_CASE
,
...
@@ -85,16 +87,16 @@ export default defineComponent({
...
@@ -85,16 +87,16 @@ export default defineComponent({
).
data
).
data
return
content
return
content
}
}
const
searchRoom
=
async
(
address
:
string
,
pageSize
=
2
00
)
=>
{
const
searchRoom
=
async
(
address
:
string
,
pageSize
=
1
00
)
=>
{
const
{
content
}
=
(
const
{
content
}
=
(
await
ajax
.
get
({
await
ajax
.
get
({
url
:
api
.
GET_
LIST
,
url
:
api
.
GET_
ROOM
,
params
:
{
pageSize
,
addr_l
:
address
,
classifyName
:
'分户'
},
params
:
{
pageSize
,
addr_l
:
address
},
})
})
).
data
).
data
return
content
return
content
}
}
const
searchCommunity
=
async
(
address
:
string
,
pageSize
=
2
00
)
=>
{
const
searchCommunity
=
async
(
address
:
string
,
pageSize
=
1
00
)
=>
{
const
{
content
}
=
(
const
{
content
}
=
(
await
ajax
.
get
({
await
ajax
.
get
({
url
:
api
.
GET_LIST
,
url
:
api
.
GET_LIST
,
...
@@ -105,16 +107,15 @@ export default defineComponent({
...
@@ -105,16 +107,15 @@ export default defineComponent({
}
}
const
handleSearch
=
async
()
=>
{
const
handleSearch
=
async
()
=>
{
const
address
=
searchKey
.
value
const
address
=
searchKey
.
value
const
pageSize
=
address
?
200
:
500
switch
(
searchType
.
value
)
{
switch
(
searchType
.
value
)
{
case
'case'
:
case
'case'
:
list
.
value
=
await
searchCase
(
address
,
pageSize
)
list
.
value
=
await
searchCase
(
address
)
break
break
case
'population'
:
case
'population'
:
list
.
value
=
await
searchRoom
(
address
,
pageSize
)
list
.
value
=
await
searchRoom
(
address
)
break
break
case
'community'
:
case
'community'
:
list
.
value
=
await
searchCommunity
(
address
,
pageSize
)
list
.
value
=
await
searchCommunity
(
address
)
break
break
default
:
default
:
list
.
value
=
[]
list
.
value
=
[]
...
@@ -123,19 +124,6 @@ export default defineComponent({
...
@@ -123,19 +124,6 @@ export default defineComponent({
}
}
watch
(()
=>
searchType
.
value
,
handleSearch
,
{
immediate
:
true
})
watch
(()
=>
searchType
.
value
,
handleSearch
,
{
immediate
:
true
})
// const getStyle = (type: string): string => {
// switch (type) {
// case '小区':
// return 'green'
// case '街面':
// return 'yellow'
// case '综合':
// return 'blue'
// default:
// return 'blue'
// }
// }
const
caseModal
=
ref
(
false
)
const
caseModal
=
ref
(
false
)
const
populationModal
=
ref
(
false
)
const
populationModal
=
ref
(
false
)
const
communityModal
=
ref
(
false
)
const
communityModal
=
ref
(
false
)
...
@@ -145,8 +133,6 @@ export default defineComponent({
...
@@ -145,8 +133,6 @@ export default defineComponent({
const
roomInfo
=
ref
<
any
>
(
null
)
const
roomInfo
=
ref
<
any
>
(
null
)
const
buildingInfo
=
ref
<
any
>
(
null
)
const
buildingInfo
=
ref
<
any
>
(
null
)
const
handleSelect
=
async
(
item
:
any
)
=>
{
const
handleSelect
=
async
(
item
:
any
)
=>
{
console
.
log
(
item
)
caseInfo
.
value
=
item
caseInfo
.
value
=
item
if
(
item
.
communityId
)
{
if
(
item
.
communityId
)
{
const
{
content
}
=
(
const
{
content
}
=
(
...
@@ -228,7 +214,6 @@ export default defineComponent({
...
@@ -228,7 +214,6 @@ export default defineComponent({
searchKey
,
searchKey
,
list
,
list
,
handleSearch
,
handleSearch
,
// getStyle,
handleSelect
,
handleSelect
,
caseModal
,
caseModal
,
populationModal
,
populationModal
,
...
...
src/view/drawers/population-drawer.vue
View file @
c202ad50
...
@@ -14,9 +14,10 @@
...
@@ -14,9 +14,10 @@
'stNameFrst:所属小区|buildingAddr:门牌幢',
'stNameFrst:所属小区|buildingAddr:门牌幢',
'sectTypeName:小区类型|houseNo:室号',
'sectTypeName:小区类型|houseNo:室号',
'cspName:物业公司|cspContacter:物业经理',
'cspName:物业公司|cspContacter:物业经理',
'csName:管理处|unitFlag:有无电梯',
'csName:管理处|unitFlag:有无电梯
>hasElev
',
'hocName:业委会|cmtName:居委会',
'hocName:业委会|cmtName:居委会',
]"
]"
:formatter=
"
{ hasElev }"
:data="houseData"
:data="houseData"
label-width="1.2rem"
label-width="1.2rem"
/>
/>
...
@@ -90,7 +91,7 @@
...
@@ -90,7 +91,7 @@
import
{
defineComponent
,
ref
,
PropType
,
computed
}
from
'vue'
import
{
defineComponent
,
ref
,
PropType
,
computed
}
from
'vue'
import
Tabs
,
{
TabsProp
}
from
'../components/tabs.vue'
import
Tabs
,
{
TabsProp
}
from
'../components/tabs.vue'
import
SubTitle
from
'../components/sub-title.vue'
import
SubTitle
from
'../components/sub-title.vue'
import
CaseList
from
'./case-list.vue'
import
CaseList
from
'.
./components
/case-list.vue'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'PopulationDrawer'
,
name
:
'PopulationDrawer'
,
...
@@ -213,6 +214,9 @@ export default defineComponent({
...
@@ -213,6 +214,9 @@ export default defineComponent({
console
.
log
(
'select-person'
,
person
)
console
.
log
(
'select-person'
,
person
)
showPersonDetail
.
value
=
true
showPersonDetail
.
value
=
true
}
}
const
hasElev
=
(
val
:
boolean
|
null
)
=>
{
return
val
?
'有'
:
'无'
}
return
{
return
{
curTab
,
curTab
,
tabs
,
tabs
,
...
@@ -223,6 +227,7 @@ export default defineComponent({
...
@@ -223,6 +227,7 @@ export default defineComponent({
communityData
,
communityData
,
selectPerson
,
selectPerson
,
showPersonDetail
,
showPersonDetail
,
hasElev
,
}
}
},
},
})
})
...
...
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