Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pc
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
wbx-PCAndMobi
pc
Commits
cc9393f6
Commit
cc9393f6
authored
Dec 18, 2020
by
程卓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into xuhui
parents
4b2ae778
e7b9db3c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
328 additions
and
2 deletions
+328
-2
routes.js
src/router/routes.js
+11
-0
api.js
src/server/api.js
+7
-1
neighborhoodCommittees.vue
src/views/houseData/neighborhoodCommittees.vue
+274
-0
propertyInfoView.vue
src/views/houseData/propertyInfoView.vue
+36
-1
No files found.
src/router/routes.js
View file @
cc9393f6
...
...
@@ -131,6 +131,16 @@ const appRoutes = [
},
]
},
{
//居委会列表
path
:
'/houseData/neighborhoodCommittees'
,
name
:
'neighborhoodCommittees'
,
component
:
resolve
=>
require
([
'@/views/houseData/neighborhoodCommittees'
],
resolve
),
//neighborhoodCommittees,
meta
:
{
title
:
'居委会信息列表'
,
menuPath
:
true
,
hideInBread
:
false
,
},
children
:
[
{
path
:
'/houseData/neighborhoodCommittees/:id'
,
name
:
'neighborhoodCommitteesView'
,
component
:
resolve
=>
require
([
'@/views/houseData/propertyInfoView'
],
resolve
),
//PropertyInfoView,
meta
:
{
title
:
'居委会详细情况'
,
menuPath
:
false
,
hideInBread
:
false
,
},
},
]
},
]
},
{
...
...
@@ -149,6 +159,7 @@ const appRoutes = [
},
]
},
],
},
{
...
...
src/server/api.js
View file @
cc9393f6
...
...
@@ -52,7 +52,8 @@ case 'huangpu-prod':
default
:
// 默认环境下(开发环境)
// BASE_URL = 'http://31.0.161.39/apiv2'
BASE_URL
=
'http://211.136.105.193/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2'
BASE_URL
=
'http://pudong.hm.omniview.pro/api'
// MOCK_URL = 'https://yapi.omniview.pro/mock/278'
break
...
...
@@ -143,6 +144,11 @@ export default {
// 首页统计列表
POST_LOGIN
:
'/service-user/public/login'
,
// 居委会列表
GET_NEI_LIST
:
'/service-basicdatasync-ddd/residentsCommittees'
,
// 居委会详情
GET_NEI_ID
:
'/service-basicdatasync-ddd/residentsCommittees/{id}'
,
/**
* SSO
*/
...
...
src/views/houseData/neighborhoodCommittees.vue
0 → 100644
View file @
cc9393f6
// 居委委会列表
<
template
>
<div
class=
"routerWapper"
>
<div
v-if=
"$route.name == 'neighborhoodCommittees'"
class=
"layoutMargin layoutPadding"
>
<a-form
:form=
"form"
class=
"protalForm"
>
<a-row
class=
"formItemLine"
type=
"flex"
align=
'top'
:gutter=
"18"
>
<a-col
span=
"8"
>
<a-form-item
label=
"居委会名称"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-input
placeholder=
"请输入查询内容"
v-decorator=
"['cmtName_l']"
/>
</a-form-item>
</a-col>
<!-- 动态搜索条件 -->
<template
v-if=
"customKeyEnable"
>
<a-col
span=
"8"
v-for=
"i in searchList"
:key=
"i.id"
>
<a-form-item
:label=
"i.keyName"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
@
change=
"handleChangeZdy(i.keyCode,$event)"
v-if=
"i.compntType == 'select' || i.compntType == 'radio'"
showSearch
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"[i.keyCode]"
>
<a-select-option
v-for=
"(item) in JSON.parse(i.sltJson)"
:key=
"item"
:value=
"item"
>
{{
item
}}
</a-select-option>
</a-select>
<a-select
@
change=
"handleChangeZdy(i.keyCode,$event)"
mode=
"multiple"
v-else-if=
"i.compntType =='checkbox'"
placeholder=
"请选择查询内容(多选)"
v-decorator=
"[i.keyCode]"
>
<a-select-option
v-for=
"(item) in JSON.parse(i.sltJson)"
:key=
"item"
:value=
"item"
>
{{
item
}}
</a-select-option>
</a-select>
<a-date-picker
@
change=
"handleChangeZdy(i.keyCode,$event)"
v-else-if=
"i.compntType =='date'"
v-decorator=
"[i.keyCode]"
/>
<a-input
v-else-if=
"i.compntType =='num'"
type=
"tel"
placeholder=
"请输入查询内容"
v-decorator=
"[i.keyCode]"
/>
<a-input
v-else
placeholder=
"请输入查询内容"
v-decorator=
"[i.keyCode]"
/>
</a-form-item>
</a-col>
</
template
>
<!-- 功能按钮区 -->
<a-col
span=
"24"
class=
"algin-right"
>
<a-button
@
click=
"exportList"
>
导出数据
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"search"
>
搜索
</a-button>
</a-col>
</a-row>
</a-form>
<!-- <p class="gayLine noline" /> -->
<div
class=
"portalTableOperates"
>
<tableAndMut
ref=
"childTab"
:tableData=
"tableData"
:pagination=
"pagination"
:tbl=
"tbl"
/>
</div>
</div>
<RouterWapper
v-else
></RouterWapper>
</div>
</template>
<
script
>
export
default
{
name
:
'neighborhoodCommittees'
,
data
()
{
return
{
customKeyEnable
:
false
,
// cookie里存的是否开启自定义字段
tbl
:
'tbl_residents_committees'
,
// 当前表名,
searchList
:
[],
// 动态渲染的搜索列表
keyCodeList
:
[],
// 动态搜索的keycode列表
searchParams
:
{},
//搜索的列表
searchForm
:
{},
columns
:
[
//未开启自定义字段展示的列
{
title
:
'居委会名称'
,
dataIndex
:
'cmtName'
,
key
:
'cmtName'
},
{
title
:
'居委会地址'
,
dataIndex
:
'cmtAddr'
,
key
:
'cmtAddr'
},
{
title
:
'居委主任姓名'
,
dataIndex
:
'cmtDirectorName'
,
key
:
'cmtDirectorName'
},
{
title
:
'居委书记姓名'
,
dataIndex
:
'cmtSecretaryName'
,
key
:
'cmtSecretaryName'
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
160
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
pagination
:
{
// 分页信息
pageNo
:
1
,
pageSize
:
20
,
total
:
0
,
current
:
1
,
showTotal
:
total
=>
`总条数:
${
total
}
`
,
defaultCurrent
:
1
,
defaultPageSize
:
20
,
showQuickJumper
:
true
,
onChange
:
this
.
pageChange
,
showSizeChanger
:
true
,
onShowSizeChange
:
this
.
showSizeChange
,
pageSizeOptions
:
[
'10'
,
'20'
,
'50'
,
'100'
],
},
tableData
:
[],
street
:
[],
// 街道数据
}
},
beforeCreate
()
{
// 页面进来创建form
this
.
form
=
this
.
$form
.
createForm
(
this
)
},
created
()
{
// 进页面获取数据
this
.
customKeyEnable
=
this
.
$cookie
.
get
(
'customKeyEnable'
)
if
(
this
.
customKeyEnable
&&
this
.
customKeyEnable
==
'true'
){
// this.getKeys()
// this.getAllKeys()
}
else
{
this
.
getList
()
}
},
mounted
(){
if
(
this
.
$route
.
name
==
'neighborhoodCommittees'
)
{
this
.
$nextTick
(
function
()
{
this
.
getSearchParams
()
this
.
getStreet
()
})
}
console
.
log
(
this
.
searchList
)
},
methods
:
{
getStreet
(){
//获取街道下拉
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_STREET_LIST
,
params
:
{
pageSize
:
10000
}
}).
then
(
res
=>
{
this
.
street
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
})
},
handleChangeZdy
(
i
,
e
){
// 自定义字段 - 搜索条件的 change
if
(
Object
.
prototype
.
toString
.
call
(
e
)
==
'[object Array]'
)
{
e2
=
e
.
join
(
','
)
}
else
if
(
Object
.
prototype
.
toString
.
call
(
e
)
==
'[object Object]'
)
{
e2
=
this
.
$moment
(
e
).
format
(
'YYYY-MM-DD'
)
}
this
.
form
.
setFieldsValue
({
// 传入的i 是i.keyCode 将form表单设置成最新的值
i
:
e2
})
setTimeout
(()
=>
{
// 延时器,去掉会拿不到最新的value
this
.
getList
()
},
0
)
},
getList
(){
// 获取数据
//处理动态的搜索条件,耦合到搜索列表
const
obj
=
{}
this
.
keyCodeList
.
forEach
(
item
=>
{
let
value
=
!
this
.
form
.
getFieldValue
(
item
)?
''
:
this
.
form
.
getFieldValue
(
item
)
if
(
Object
.
prototype
.
toString
.
call
(
value
)
==
'[object Array]'
)
{
//如果是数组
value
=
value
.
join
(
','
)
}
else
if
(
Object
.
prototype
.
toString
.
call
(
value
)
===
'[object Object]'
){
value
=
this
.
$moment
(
value
).
format
(
'YYYY-MM-DD'
)
}
this
.
$set
(
obj
,
item
,
value
)
})
const
searchParams
=
Object
.
assign
({},
{
'cmtName_l'
:
this
.
form
.
getFieldValue
(
'cmtName_l'
)
||
''
,
},
obj
)
this
.
searchParams
=
searchParams
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_NEI_LIST
,
params
:
Object
.
assign
({},
searchParams
,
{
pageSize
:
this
.
pagination
.
pageSize
,
pageNo
:
this
.
pagination
.
pageNo
})
}).
then
(
res
=>
{
if
(
res
.
code
===
'200'
)
{
// 正常请求数据得到的结果
this
.
pagination
.
total
=
this
.
$com
.
confirm
(
res
,
'data.totalRows'
,
0
)
this
.
tableData
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
console
.
log
(
this
.
tableData
)
}
//
// 存储当前页面列表的搜索信息
//
this
.
$com
.
storeSearchParams
(
this
.
$route
.
name
,
this
.
pagination
,
searchParams
)
})
},
/**
* 从vuex中或已存储的搜索条件,判断此条件是否为当前路由的 。如果是则使用
*/
getSearchParams
(){
const
searchParams
=
!
this
.
$store
.
state
.
listSearchParams
?
null
:
this
.
$store
.
state
.
listSearchParams
[
this
.
$route
.
name
]
if
(
!!
searchParams
&&
!!
searchParams
.
routeName
&&
(
this
.
$route
.
name
==
searchParams
.
routeName
)){
if
(
!!
searchParams
.
params
){
Object
.
keys
(
searchParams
.
params
).
forEach
(
elem
=>
{
switch
(
elem
)
{
case
'cmtName_l'
:
this
.
form
.
setFieldsValue
({
'cmtName_l'
:
searchParams
.
params
[
elem
]
})
break
default
:
break
}
})
}
if
(
!!
searchParams
.
pagination
){
if
(
!!
searchParams
.
pagination
.
pageNo
){
this
.
pagination
.
pageNo
=
searchParams
.
pagination
.
pageNo
this
.
pagination
.
current
=
searchParams
.
pagination
.
current
this
.
pagination
.
pageSize
=
searchParams
.
pagination
.
pageSize
}
}
}
this
.
getList
()
},
pageChange
(
page
){
//分页切换
this
.
pagination
.
pageNo
=
page
this
.
pagination
.
current
=
page
this
.
getList
()
},
showSizeChange
(
current
,
size
)
{
//每页条数切换
this
.
pagination
.
pageNo
=
1
this
.
pagination
.
current
=
1
this
.
pagination
.
pageSize
=
size
this
.
getList
()
},
reset
(){
// 重置表单
this
.
form
.
resetFields
()
this
.
pagination
.
pageNo
=
1
this
.
pagination
.
current
=
1
this
.
pagination
.
pageSize
=
20
this
.
getList
()
},
search
()
{
// 搜索按钮
this
.
pagination
.
current
=
1
this
.
pagination
.
pageNo
=
1
//需要发送ajax
this
.
getList
()
},
toView
(
params
){
// 查看详情
console
.
log
(
params
)
this
.
$router
.
push
({
path
:
`/houseData/neighborhoodCommittees/
${
params
.
id
}
`
,
query
:
{
id
:
params
.
id
}})
},
exportList
(){
//导出功能
const
formValue
=
this
.
form
.
getFieldsValue
()
let
newUrl
=
this
.
tbl
+
'?'
let
newObj
=
{}
for
(
const
k
in
formValue
){
if
(
formValue
[
k
]
!=
undefined
)
{
// 判断是否值为 undefined
if
(
Object
.
prototype
.
toString
.
call
(
formValue
[
k
])
==
'[object Array]'
){
// 数组的话就拼接字符串
newUrl
+=
k
+
'='
+
formValue
[
k
].
join
(
','
)
+
'&'
}
else
if
(
Object
.
prototype
.
toString
.
call
(
formValue
[
k
])
===
'[object Object]'
)
{
//时间格式对象就转换成字符串
newUrl
+=
k
+
'='
+
this
.
$moment
(
formValue
[
k
]).
format
(
'YYYY-MM-DD'
)
+
'&'
}
else
{
newUrl
+=
k
+
'='
+
formValue
[
k
]
+
'&'
//没有特殊情况 直接拼接到 newUrl
}
}
}
let
token
=
this
.
$cookie
.
get
(
'token'
)
// 获取token 并拼接到 newUrl
newUrl
+=
'sectType=1&token='
+
token
window
.
open
(
this
.
$api
.
BASE_URL
+
'/service-basicdatasync-ddd/export/'
+
newUrl
)
},
},
}
</
script
>
<
style
scoped
>
</
style
>
src/views/houseData/propertyInfoView.vue
View file @
cc9393f6
<
template
>
<div
class=
"routerWapper"
>
<div
v-if=
"urls.name == 'memberView' ||'cmDivisionView' || 'propertyInfoView' || 'indCouView' || 'nonResidentsView' || 'managerView' || 'buildingView'"
class=
"portalDetailWapper"
>
<div
v-if=
"urls.name == 'memberView' ||'cmDivisionView' || 'propertyInfoView' || 'indCouView' || 'nonResidentsView' || 'managerView' || 'buildingView'
||'neighborhoodCommitteesView'
"
class=
"portalDetailWapper"
>
<div
class=
"portalDetailContentWapper"
>
<div
class=
"portalDetailTitle"
>
<span
class=
"title"
>
详情
</span>
...
...
@@ -20,6 +20,7 @@
<p
v-if=
"urls.name == 'managerView'"
class=
"detailsPartTitle"
>
小区经理信息
</p>
<p
v-if=
"urls.name == 'buildingView'"
class=
"detailsPartTitle"
>
小区楼栋信息
</p>
<p
v-if=
"urls.name == 'memberView'"
class=
"detailsPartTitle"
>
成员信息
</p>
<p
v-if=
"urls.name == 'neighborhoodCommitteesView'"
class=
"detailsPartTitle"
>
业委会信息
</p>
<div
style=
"margin:0 16px;"
>
<!-- 物业 -->
<div
v-if=
"urls.name == 'propertyInfoView' "
>
...
...
@@ -591,6 +592,35 @@
</a-col>
</a-row>
</a-col>
</a-row>
<!-- 居委会 -->
<a-row
v-if=
"urls.name == 'neighborhoodCommitteesView'"
type=
"flex"
justify=
"start"
>
<a-col
span=
"8"
>
<a-row
type=
"flex"
justify=
"start"
class=
"detailsPartLine"
>
<a-col
span=
"24"
>
<DetailsItem
:labelSpan=
'12'
:textSpan=
"12"
:label=
'"居委会名称"'
:text=
'detail.cmtName'
/>
</a-col>
</a-row>
<a-row
type=
"flex"
justify=
"start"
class=
"detailsPartLine"
>
<a-col
span=
"24"
>
<DetailsItem
:labelSpan=
'12'
:textSpan=
"12"
:label=
'"居委会地址"'
:text=
'detail.cmtAddr'
/>
</a-col>
</a-row>
</a-col>
<a-col
span=
"8"
>
<a-row
type=
"flex"
justify=
"start"
class=
"detailsPartLine"
>
<a-col
span=
"24"
>
<DetailsItem
:labelSpan=
'12'
:textSpan=
"12"
:label=
'"居委会主任姓名"'
:text=
'detail.cmtDirectorName'
/>
</a-col>
</a-row>
</a-col>
<a-col
span=
"8"
>
<a-row
type=
"flex"
justify=
"start"
class=
"detailsPartLine"
>
<a-col
span=
"24"
>
<DetailsItem
:labelSpan=
'12'
:textSpan=
"12"
:label=
'"居委书记姓名"'
:text=
'detail.cmtSecretaryName'
/>
</a-col>
</a-row>
</a-col>
</a-row>
</div>
</div>
...
...
@@ -872,6 +902,10 @@ export default {
this
.
newUrl
=
this
.
$api
.
GET_MEMBER_ID
.
replace
(
'{id}'
,
this
.
$route
.
params
.
id
)
this
.
tbl
=
'tbl_ic_member'
break
case
'neighborhoodCommitteesView'
:
this
.
newUrl
=
this
.
$api
.
GET_NEI_ID
.
replace
(
'{id}'
,
this
.
$route
.
params
.
id
)
this
.
tbl
=
'tbl_ic_member'
break
default
:
break
}
...
...
@@ -885,6 +919,7 @@ export default {
if
(
res
.
code
==
200
)
{
//先获取全部的自定义字段列表
this
.
extList
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
console
.
log
(
this
.
extList
)
this
.
getList
()
}
})
...
...
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