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
14ffc5f4
Commit
14ffc5f4
authored
Mar 12, 2021
by
Gakki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0e61c95c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
42 deletions
+96
-42
basicInfo.vue
src/views/houseData/basicInfo.vue
+16
-1
labelRightSide.vue
src/views/label/labelRightSide.vue
+80
-41
No files found.
src/views/houseData/basicInfo.vue
View file @
14ffc5f4
// 小区列表
<
template
>
<div
class=
"routerWapper"
>
{{
checkedKeys
}}
<a-row
type=
'flex'
>
<a-col
flex=
'250px'
style=
"overflow: hidden"
>
<div
v-if=
"$route.path == '/houseData/basicInfo'"
class=
"layoutMargin layoutPadding"
>
<a-tree
@
check=
'onCheck'
checkable
:tree-data=
"treeData"
:replace-fields=
"replaceFields"
/>
<!--
<a-tree
v-model=
'checkedKeys'
checkable
:tree-data=
"treeData"
:replace-fields=
"replaceFields"
:selected-keys=
"selectedKeys"
@
select=
"onSelect"
/>
/>
-->
</div>
</a-col>
<a-col
flex=
'78%'
>
...
...
@@ -185,6 +194,7 @@ export default {
title
:
'labelName'
,
key
:
'id'
},
checkedKeys
:
[],
simpleSearchForm
:
true
,
// 展示、收取简单搜索开关,true为简单搜索
levelType
:
[
...
...
@@ -429,6 +439,10 @@ export default {
}
},
methods
:
{
onCheck
(
keys
,
node
)
{
console
.
log
(
keys
,
node
.
checkedNodesPositions
)
},
getLabelList
()
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_LABEL_LIST
,
...
...
@@ -591,6 +605,7 @@ export default {
this
.
form
.
setFieldsValue
({
'c.cspId'
:
this
.
$route
.
query
.
name
+
'#'
+
this
.
$route
.
query
.
id
})
searchParams
=
Object
.
assign
(
searchParams
,
{},
{
'c.cspId'
:
this
.
$route
.
query
.
id
,
'c.createTime_desc'
:
'desc'
})
}
this
.
searchParams
=
searchParams
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_BASIC_LIST
,
...
...
src/views/label/labelRightSide.vue
View file @
14ffc5f4
...
...
@@ -89,13 +89,16 @@
</a-form>
<a-button
type=
'link'
v-if=
"loopContent.data.length == 0"
@
click=
"addInitRow()"
>
新增配置
</a-button>
<div
v-if=
"resultList.length > 0"
>
<
!--
<
div
v-if=
"resultList.length > 0"
>
<a-divider
type=
'horizontal'
/>
<a-row
style=
"font-weight: bold"
>
筛选结果
</a-row>
<a-table
class=
"portalTable"
size=
"small"
row-key=
"id"
:columns=
"columns"
:dataSource=
"resultList"
></a-table>
</div>
</div>
-->
<a-modal
:visible=
'deleteVisible'
@
ok=
'handleDeleteOk'
@
cancel=
'handleCancelOk'
>
确定删除该标签【
{{
labelId
}}
】吗?
确定删除标签【
{{
labelNameForDel
}}
】吗?
</a-modal>
<a-modal
width=
'800px'
:bordered=
'true'
:title=
'`搜索到`+resultList.length + `条结果,确认保存吗?`'
:visible=
'confirmVisible'
@
ok=
'handleConfirmVisible'
@
cancel=
'handleConfirmCancel'
>
<a-table
class=
"portalTable"
size=
"small"
row-key=
"id"
:columns=
"columns"
:dataSource=
"resultList"
></a-table>
</a-modal>
</div>
</
template
>
...
...
@@ -116,21 +119,49 @@ export default {
},
jsonData
:
{},
deleteVisible
:
false
,
confirmVisible
:
false
,
finish
:
false
,
parentLabelList
:
[],
availableKeyList
:
[],
initKey
:
''
,
resultList
:
[],
labelNameForDel
:
''
,
columns
:
[
// {
// title: '小区名称',
// // width: 240,
// dataIndex: 'position',
// key: 'position',
// width: '20%',
// align: 'center',
// }
{
title
:
'小区名称'
,
// width: 240,
dataIndex
:
'stNameFrst'
,
key
:
'stNameFrst'
,
align
:
'center'
,
},
{
title
:
'小区地址'
,
// width: 240,
dataIndex
:
'addrFrst'
,
key
:
'addrFrst'
,
align
:
'center'
,
},
{
title
:
'房管办'
,
// width: 240,
dataIndex
:
'hoName'
,
key
:
'hoName'
,
align
:
'center'
,
},
{
title
:
'小区性质'
,
// width: 240,
dataIndex
:
'stKindName'
,
key
:
'stKindName'
,
align
:
'center'
,
},
{
title
:
'小区类型'
,
// width: 240,
dataIndex
:
'sectTypeName'
,
key
:
'sectTypeName'
,
align
:
'center'
,
},
]
}
},
...
...
@@ -203,6 +234,7 @@ export default {
parentId
:
res
.
data
.
content
.
parentId
,
tableName
:
res
.
data
.
content
.
tableName
})
this
.
labelNameForDel
=
res
.
data
.
content
.
labelName
this
.
loopContent
.
data
=
res
.
data
.
content
.
selParams
console
.
log
(
res
.
data
.
content
.
selParams
)
this
.
initKeyList
()
...
...
@@ -289,6 +321,41 @@ export default {
resetFormFields
()
{
this
.
loopContent
.
data
=
[]
this
.
labelForm
.
resetFields
()
this
.
resultList
=
[]
},
handleConfirmVisible
()
{
if
(
!!
this
.
labelId
)
{
this
.
$ajax
.
put
({
url
:
this
.
$api
.
PUT_LABEL_INFO
.
replace
(
'{id}'
,
this
.
labelId
),
params
:
Object
.
assign
(
this
.
jsonData
,
{
id
:
this
.
labelId
})
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'修改成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
else
{
this
.
$message
.
success
(
'修改失败!'
)
}
})
}
else
{
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_SINGLE_LABEL
,
params
:
Object
.
assign
(
this
.
jsonData
)
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
else
{
this
.
$message
.
success
(
'保存失败!'
)
}
})
}
},
handleConfirmCancel
()
{
this
.
confirmVisible
=
!
this
.
confirmVisible
},
save
()
{
this
.
jsonData
=
{
selParams
:
[]}
...
...
@@ -320,36 +387,8 @@ export default {
// 如果查询到content里有内容,则在下方以表格的形式展示出来。否则提示无匹配数据。
this
.
resultList
=
res
.
data
.
content
if
(
this
.
resultList
.
length
>
0
)
{
this
.
confirmVisible
=
!
this
.
confirmVisible
// 提交标签内容, 如果有labelId则调用put接口,反之调用post接口
if
(
!!
this
.
labelId
)
{
this
.
$ajax
.
put
({
url
:
this
.
$api
.
PUT_LABEL_INFO
.
replace
(
'{id}'
,
this
.
labelId
),
params
:
Object
.
assign
(
this
.
jsonData
,
{
id
:
this
.
labelId
})
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'修改成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
else
{
this
.
$message
.
success
(
'修改失败!'
)
}
})
}
else
{
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_SINGLE_LABEL
,
params
:
Object
.
assign
(
this
.
jsonData
)
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
else
{
this
.
$message
.
success
(
'保存失败!'
)
}
})
}
}
else
{
this
.
$message
.
error
(
'该标签无搜索结果,标签添加失败!'
)
}
...
...
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