Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multiSystem
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
Yulun Yao
multiSystem
Commits
1940cb77
Commit
1940cb77
authored
May 13, 2021
by
levante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签
parent
8c5eca40
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1086 additions
and
343 deletions
+1086
-343
api.js
src/server/api.js
+4
-0
tableAndMutWithoutMulSel.vue
src/views/components/tableAndMutWithoutMulSel.vue
+304
-0
basicInfo.vue
src/views/houseData/basicInfo.vue
+1
-1
basicInfoByLabel.vue
src/views/houseData/basicInfoByLabel.vue
+390
-233
labelRightSide.vue
src/views/label/labelRightSide.vue
+387
-109
No files found.
src/server/api.js
View file @
1940cb77
...
...
@@ -212,4 +212,8 @@ export default {
DELETE_AVAILABLE_KEY
:
'/service-customkey-ddd/entityKeyDic/{id}'
,
// 删除字段
GET_SINGLE_KEY_INFO
:
'/service-customkey-ddd/entityKeyDic/{id}'
,
//可查询字段详情
GET_LABEL_BIND_FILTER_RESULT
:
'/service-customkey-ddd/labelResource'
,
// 点击保存后查询是否有结果,有结果则调用绑定接口
POST_LABEL_RESULT_PREVIEW
:
'/service-customkey-ddd/findLabelObject'
,
// 标签预览
POST_LABEL_CREATE_CONFIRM
:
'/service-customkey-ddd/label/confirm'
,
GET_ID_INFO_BY_LABEL
:
'/service-customkey-ddd/label/resource/datas'
,
GET_WY_AND_YWH_LIST
:
'/service-customkey-ddd/datas'
}
src/views/components/tableAndMutWithoutMulSel.vue
0 → 100644
View file @
1940cb77
// 多选框,表格,批量操作的组件
<
template
>
<div>
<div
class=
"portalTableOperates"
>
<p
style=
"textAlign:left;margin:-10px;marginLeft:10px;"
v-if=
"$route.name == 'basicInfo'"
>
小区总数:
{{
pagination
.
total
!=
''
?
pagination
.
total
+
'个'
:
'暂无数据'
}}
,
房屋总面积:
{{
pagination
.
totStCnstArea
!=
'0'
?
pagination
.
totStCnstArea
+
'平方米'
:
'暂无数据'
}}
,
总门牌数:
{{
pagination
.
totUnits
!=
'0'
?
pagination
.
totUnits
+
'幢'
:
'暂无数据'
}}
,
总分户数:
{{
pagination
.
totHous
!=
'0'
?
pagination
.
totHous
+
'户'
:
'暂无数据'
}}
</p>
<a-table
class=
"portalTable"
size=
"small"
:rowSelection=
"rowSelection"
rowKey=
"id"
:pagination=
"pagination"
:columns=
"customKeyEnable=='true' ? newColumns: $parent.columns"
:dataSource=
"tableData"
bordered
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<span
class=
"actionBtn"
@
click=
"$parent.toView(record)"
>
查看
</span>
<a-dropdown
:trigger=
"['click']"
v-if=
"customKeyEnable == 'true' || $route.name=='basicInfo' || $route.name=='propertyInfo' || $route.name=='indCous'"
>
<a
class=
"ant-dropdown-link"
href=
"#"
>
| 更多
<a-icon
type=
"down"
/></a>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"0"
v-if=
"$route.name == 'basicInfo' || $route.name == 'nonResidents'"
>
<a
@
click=
"$parent.toBul(record)"
>
门牌幢
</a>
</a-menu-item>
<!--
<a-menu-item
key=
"1"
v-if=
"$route.name == 'basicInfo'"
>
<a
@
click=
"$parent.toShebei(record)"
>
设施设备
</a>
</a-menu-item>
-->
<a-menu-item
key=
"2"
v-if=
"$route.name == 'indCous'"
>
<a
@
click=
"$parent.toMem(record)"
>
成员列表
</a>
</a-menu-item>
<a-menu-item
key=
"3"
v-if=
"$route.name == 'propertyInfo'"
>
<a
@
click=
"$parent.toList(record.cspId)"
>
小区列表
</a>
</a-menu-item>
<a-menu-item
key=
"4"
v-if=
"customKeyEnable == 'true'"
>
<a
@
click=
"showModal(record)"
>
拓展信息维护
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
<zdyModal
ref=
"modal"
:selectedRowKeys=
"selectedRowKeys"
:searchParams=
"searchParams"
:isSingle=
"isSingle"
:resourceId=
"resourceId"
:tbl=
"tbl"
:extList=
"extList"
:isAll=
"isAll"
@
saveSingleKeys=
"saveSingleKeys"
@
saveSomeKeys=
"saveSomeKeys"
/>
<!--
<BatchOperation
v-if=
"customKeyEnable== 'true'"
@
choose=
"choose"
@
chooseAll=
"chooseAll"
/>
-->
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'tableAndMut'
,
props
:
{
tableData
:
{
type
:
Array
},
pagination
:
{
type
:
Object
},
tbl
:
{
type
:
String
},
},
data
(){
return
{
formTab
:
this
.
$form
.
createForm
(
this
),
// form : this.$form.createForm(this),
nowNum
:
0
,
// 当前已选字段的数量
newColumns
:
[],
// 开启自定义字段展示的列(根据多选框变化的展示列)
allKeys
:
[],
// 所有可展示的字段(对象数组,含keyname 和key)
selKeys
:
[],
// 选中展示字段(含key和keyName)
selKeysList
:
[],
// 选中展示字段(仅key), 给多选框用
maxLength
:
6
,
// 最大展示的数量
customKeyEnable
:
false
,
// cookie里存的 是否开启自定义字段
extList
:
[],
// ext请求到的所有自定义字段列表
resourceId
:
''
,
// 当前小区的id
selectList
:
[],
// 批量操作小区id数组
isSingle
:
true
,
// 批量还是单个
isAll
:
true
,
// 全量还是已选中
searchList
:
[],
// 动态渲染的搜索列表
keyCodeList
:
[],
// 动态搜索的keycode列表
searchParams
:
{},
// 搜索的列表
selectedRowKeys
:
[]
}
},
created
()
{
// 进页面获取数据
this
.
customKeyEnable
=
this
.
$cookie
.
get
(
'customKeyEnable'
)
if
(
this
.
customKeyEnable
&&
this
.
customKeyEnable
==
'true'
){
this
.
getKeys
()
this
.
getAllKeys
()
// this.$parent.getList()
}
else
{
this
.
$parent
.
getList
()
}
},
mounted
(){
console
.
log
(
this
.
$parent
);
},
computed
:
{
rowSelection
()
{
const
{
selectedRowKeys
}
=
this
return
{
selectedRowKeys
,
onChange
:
this
.
onSelectChange
,
onSelection
:
this
.
onSelection
,
}
},
},
methods
:
{
selKeysNew
(
val
)
{
//重新赋值选中项数组
this
.
selKeysList
=
val
},
/**
* 重新赋值展示的列 和当前选中数
*/
changeColumnsList
(
value
){
// 当前已选中数
this
.
nowNum
=
value
.
length
-
1
// 重新赋值给展示的列 newColumns
this
.
newColumns
=
value
// 存入cookie
this
.
$com
.
saveColumnsCookie
(
this
.
tbl
,
this
.
selKeysList
,
this
.
allKeys
)
},
onSelectChange
(
selectedRowKeys
)
{
// 被勾选的数据
this
.
selectedRowKeys
=
selectedRowKeys
},
getKeys
(){
// 获取可显示全部表格字段 和 maxlength
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_KEYS
.
replace
(
'{table}'
,
this
.
tbl
),
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
maxLength
=
!!
this
.
$com
.
confirm
(
res
,
'data.content.maxLength'
,
[])
?
this
.
$com
.
confirm
(
res
,
'data.content.maxLength'
,
[])
:
this
.
maxLength
this
.
allKeys
=
this
.
$com
.
confirm
(
res
,
'data.content.allKeys'
,
[])
// 全部字段存入allkeys
// 优先获取本地已选字段,没有则取allkeys里面的
this
.
selKeys
=
this
.
$cookie
.
get
(
this
.
tbl
)
?
JSON
.
parse
(
this
.
$cookie
.
get
(
this
.
tbl
))
:
this
.
allKeys
.
slice
(
0
,
this
.
maxLength
)
// 判断本地的已选字段是否在全部字段当中,被删除的自定义字段会被删除 (处理可能被删除的自定义字段)
const
newArr
=
[]
this
.
selKeys
.
forEach
(
col
=>
{
this
.
allKeys
.
forEach
(
item
=>
{
if
(
col
.
key
==
item
.
key
)
{
newArr
.
push
(
col
)
return
}
})
})
// 重新赋值已选中字段 (处理可能被删除的自定义字段)
this
.
selKeys
=
newArr
// 此时得到了allkeys和selkeys (带key 和 keyName) 需要变成 只有key的数组(多选框要用)
this
.
selKeys
.
forEach
(
col
=>
{
this
.
selKeysList
.
push
(
col
.
key
)
})
// 已选中的数根据selkeys的长度实时展示
this
.
nowNum
=
this
.
selKeys
.
length
// 1.根据allkeys重写全部的列
console
.
log
(
this
.
$parent
.
columns
,
'99999'
);
this
.
$parent
.
columns
=
[]
this
.
allKeys
.
forEach
(
col
=>
{
if
(
col
.
key
.
indexOf
(
'&'
)
!=
-
1
){
// 如果有& 就取xx.xx
this
.
$parent
.
columns
.
push
(
{
title
:
col
.
keyName
,
dataIndex
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
],
key
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
]
},
)
}
else
{
this
.
$parent
.
columns
.
push
(
{
title
:
col
.
keyName
,
dataIndex
:
col
.
key
,
key
:
col
.
key
},
)
}
})
// 2.根据selkeys重写选中的列
this
.
newColumns
=
[]
this
.
selKeys
.
forEach
(
col
=>
{
if
(
col
.
key
.
indexOf
(
'&'
)
!=
-
1
){
// 如果有& 就取xx.xx
this
.
newColumns
.
push
(
{
title
:
col
.
keyName
,
dataIndex
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
],
key
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
]
},
)
}
else
{
this
.
newColumns
.
push
(
{
title
:
col
.
keyName
,
dataIndex
:
col
.
key
,
key
:
col
.
key
},
)
}
})
// 增加 操作
this
.
newColumns
.
push
({
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
160
,
scopedSlots
:
{
customRender
:
'action'
}
})
this
.
newColumns
.
forEach
(
col
=>
{
if
(
col
.
key
==
'addrFrst'
){
col
.
width
=
'30%'
}
})
}
})
},
showModal
(
row
)
{
//展开模态框
this
.
resourceId
=
row
.
id
this
.
isAll
=
false
this
.
isSingle
=
true
this
.
getExtKey
(
row
)
},
async
getExtKey
(
row
){
// 处理过的返回数值
await
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_SAFE_EXT
.
replace
(
'{table}'
,
this
.
tbl
).
replace
(
'{id}'
,
row
.
id
),
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
extList
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
this
.
$refs
.
modal
.
isShow
=
true
}
})
this
.
$refs
.
modal
.
seeData
()
},
async
getAllKeys
(){
// 获取当前列表下所有的自定义字段
await
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_TBLS_KEYS
,
params
:
{
tbl
:
this
.
tbl
,
pageSize
:
10000
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
searchList
=
[]
this
.
extList
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
this
.
extList
.
forEach
(
col
=>
{
// 遍历所有字段拿到 支持搜索的所有字段
if
(
col
.
canSearch
==
true
)
{
if
(
col
.
compntType
==
'checkbox'
||
col
.
compntType
==
'radio'
||
col
.
compntType
==
'date'
||
col
.
compntType
==
'select'
)
{
}
else
{
col
.
keyCode
=
col
.
keyCode
+
'_l'
}
this
.
searchList
.
push
(
col
)
}
})
this
.
keyCodeList
=
[]
this
.
searchList
.
forEach
(
col
=>
{
// 支持搜索的字段遍历,取出keyCode
this
.
keyCodeList
.
push
(
col
.
keyCode
)
})
this
.
$parent
.
searchList
=
this
.
searchList
this
.
$parent
.
keyCodeList
=
this
.
keyCodeList
}
})
},
saveSingleKeys
(
params
){
// post保存一条自定义数据
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_EXT
,
params
:
params
,
}).
then
(()
=>
{
this
.
$parent
.
getList
()
this
.
$refs
.
modal
.
isShow
=
false
this
.
$refs
.
modal
.
formExt
.
resetFields
()
})
},
saveSomeKeys
(
params
){
// 批量post保存自定义
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_EXT_BATCH
,
params
:
params
,
}).
then
(
res
=>
{
if
(
res
.
code
==
'200'
)
{
this
.
$refs
.
modal
.
formExt
.
resetFields
()
this
.
$parent
.
getList
()
this
.
$refs
.
modal
.
isShow
=
false
}
})
},
chooseAll
(){
this
.
isAll
=
true
this
.
isSingle
=
false
this
.
$refs
.
modal
.
isShow
=
true
this
.
$refs
.
modal
.
seeData
()
// 打开弹窗恢复默认的选项
},
choose
(){
this
.
isAll
=
false
this
.
isSingle
=
false
if
(
this
.
selectedRowKeys
.
length
<
1
)
{
this
.
$message
.
error
(
'请勾选至少一条数据'
)
}
else
{
this
.
$refs
.
modal
.
isShow
=
true
}
this
.
$refs
.
modal
.
seeData
()
// 打开弹窗恢复默认的选项
},
},
}
</
script
>
<
style
>
</
style
>
src/views/houseData/basicInfo.vue
View file @
1940cb77
...
...
@@ -395,7 +395,7 @@ export default {
},
mounted
(){
console
.
log
(
this
.
$api
.
BASE_URL
.
indexOf
(
'211.136.105'
)
!=-
1
)
console
.
log
(
this
.
$parent
);
if
(
this
.
$route
.
name
==
'basicInfo'
){
this
.
$nextTick
(
function
()
{
// setTimeout(() => {
...
...
src/views/houseData/basicInfoByLabel.vue
View file @
1940cb77
...
...
@@ -5,7 +5,9 @@
<div
class=
"layoutMargin layoutPadding"
>
<a-row>
<a-col
:span=
"4"
style=
"height:100%; position:relative;"
v-if=
"leftPanelShow"
>
<span
style=
"display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px; border-bottom:1px solid #1890ff;"
>
标签筛选条件
</span>
<span
style=
"display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px; border-bottom:1px solid #1890ff;"
>
标签筛选条件
</span>
<a-tree
@
check=
'onCheck'
checkable
...
...
@@ -18,157 +20,23 @@
<a-button
v-else
@
click=
"showNHide"
type=
'link'
icon=
'left'
style=
"position: absolute; left: 14.5%; top: 14%; color: grey"
/>
<a-col
:span=
"!!leftPanelShow ? 20 : 24"
:style=
"!!leftPanelShow? `padding-left: 10px; border-left:1px solid #ccc;`:`padding-left: 10px;`"
>
<!--
<div
v-if=
"$route.path == '/houseData/basicInfoByLabel'"
class=
"layoutMargin layoutPadding"
>
-->
<a-form
:form=
"form"
class=
"protalForm"
>
<a-row
class=
"formItem"
type=
"flex"
:justify=
"simpleSearchForm ? 'end' : ''"
align=
"top"
:gutter=
"simpleSearchForm ? 16 : 0"
>
<a-col
span=
"8"
>
<a-form-item
label=
"小区名称"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-input
placeholder=
"请输入查询内容"
v-decorator=
"['stNameFrst_l']"
/>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
label=
"小区地址"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-input
placeholder=
"请输入查询内容"
v-decorator=
"['addrFrst_l']"
/>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
label=
"房办"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
showSearch
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['c.hoId']"
@
change=
"handleChangefb"
>
<a-select-option
v-for=
"(item) in hos"
:key=
"item.hoId"
:value=
"item.cspName+'#'+item.hoId"
>
{{
item
.
hoName
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
label=
"门牌幢地址"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-input
placeholder=
"请输入查询内容"
v-decorator=
"['unitAddr']"
/>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
label=
"物业公司名称"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
showSearch
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['c.cspId'] "
@
change=
"changeWy"
>
<a-select-option
v-for=
"(item) in wuye"
:key=
"item.cspId"
:value=
" item.cspName+'#'+item.cspId"
>
{{
item
.
cspName
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
label=
"街道名称"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
showSearch
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['c.streetId']"
@
change=
"changeStreet"
>
<a-select-option
v-for=
"(item) in street"
:key=
"item.streetId"
:value=
"item.strName+'#'+item.streetId"
>
{{
item
.
strName
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"更新时间"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-range-picker
v-decorator=
"['syncTime_betn']"
/>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"成立业主大会"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['isHoc']"
@
change=
"changeIsHoc"
>
<a-select-option
value=
"false"
>
否
</a-select-option>
<a-select-option
value=
"true"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"物业合同服务到期日"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-date-picker
placeholder=
"请选择查询内容"
v-decorator=
"['cspContractEndDate_lt']"
/>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"小区性质"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
v-decorator=
"['stKind_in']"
mode=
"multiple"
style=
"width: 100%"
placeholder=
"请选择小区性质(多选)"
@
change=
"changeType"
allowClear
>
<a-select-option
v-for=
"i in typeList"
:key=
"i.key"
>
{{
i
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"小区层数"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
v-decorator=
"['unitKind_in']"
mode=
"multiple"
style=
"width: 100%"
placeholder=
"请选择小区层数(多选)"
@
change=
"changeLevel"
allowClear
>
<a-select-option
v-for=
"i in levelType"
:key=
"i.key"
>
{{
i
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"物业服务类型"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['wuyeServiceType'] "
@
change=
"changeServiceType"
>
<a-select-option
v-for=
"(item) in wuyeServiceType"
:key=
"item.key"
:value=
"item.key"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"竣工日期"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['finishDate'] "
@
change=
"changeFinishDate"
>
<a-select-option
v-for=
"(item) in finishDate"
:key=
"item.key"
:value=
"item.key"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
span=
"8"
v-if=
"$store.state.isXuhui"
>
<a-form-item
v-if=
"!simpleSearchForm"
label=
"邻小汇成立状态"
class=
"formItem"
:label-col=
"
{span:10}" :wrapper-col="{span:14}">
<a-select
allowClear
placeholder=
"请选择查询内容"
v-decorator=
"['neighbourType'] "
@
change=
"changeNeighbourType"
>
<a-select-option
v-for=
"(item) in neighbourType"
:key=
"item.key"
:value=
"item.key"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</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
v-if=
"!$store.state.isXuhui && $api.BASE_URL.indexOf('211.136.105')!=-1"
@
click=
"exportEWM"
>
导出二维码
</a-button>
<a-button
@
click=
"exportList"
>
导出数据
</a-button>
<a-button
@
click=
"reset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"search"
>
搜索
</a-button>
<a-button
type=
"primary"
v-if=
"simpleSearchForm"
@
click=
"showMoreSearch"
>
更多搜索
</a-button
>
<a-button
type=
"primary"
v-if=
"!simpleSearchForm"
@
click=
"closeMoreSearch"
>
简单搜索
</a-button
>
</a-col>
</a-row>
</a-form>
<!--
<p
class=
"gayLine noline"
/>
-->
<div
class=
"portalTableOperates"
>
<tableAndMut
ref=
"childTab"
:tableData=
"tableData"
:pagination=
"pagination"
:tbl=
"tbl"
/>
<a-button
type=
'primary'
@
click=
"searchXXXByLabel"
>
查询
</a-button>
<a-tabs
default-active-key=
"1"
@
change=
"changeTbl"
>
<a-tab-pane
key=
"tbl_community"
tab=
"小区"
>
<TAM
ref=
"childTab"
:tableData=
"tableData_sect"
:pagination=
"pagination"
:tbl=
"tbl"
/>
</a-tab-pane>
<a-tab-pane
key=
"tbl_building"
tab=
"门牌"
>
<TAM
ref=
"childTab"
:tableData=
"tableData_mpz"
:pagination=
"pagination"
:tbl=
"tbl"
/>
</a-tab-pane>
<a-tab-pane
key=
"tbl_prop_company"
tab=
"物业"
>
<TAM
ref=
"childTab"
:tableData=
"tableData_wy"
:pagination=
"pagination"
:tbl=
"tbl"
/>
</a-tab-pane>
<a-tab-pane
key=
"tbl_industry_council"
tab=
"业委会"
>
<TAM
ref=
"childTab"
:tableData=
"tableData_ywh"
:pagination=
"pagination"
:tbl=
"tbl"
/>
</a-tab-pane>
</a-tabs>
</div>
<!--
</div>
-->
<!--
<RouterWapper
v-else
></RouterWapper>
-->
...
...
@@ -179,12 +47,17 @@
</
template
>
<
script
>
import
TAM
from
'@/views/components/tableAndMutWithoutMulSel.vue'
const
treeData
=
[]
export
default
{
name
:
'basicInfo'
,
components
:
{
TAM
},
data
()
{
return
{
treeData
,
tbl
:
'tbl_community'
,
selectedKeys
:
[],
replaceFields
:
{
children
:
'children'
,
...
...
@@ -383,7 +256,10 @@ export default {
totUnits
:
''
,
// 总门牌数 幢
totHous
:
''
,
// 总分户数 户
},
tableData
:
[],
tableData_sect
:
[],
tableData_mpz
:
[],
tableData_wy
:
[],
tableData_ywh
:
[],
stLevel
:
''
,
cspServiceType
:
''
,
tableName
:
''
,
// 邻里小汇
...
...
@@ -428,15 +304,132 @@ export default {
if
(
this
.
$route
.
name
==
'basicInfoByLabel'
){
this
.
$nextTick
(
function
()
{
// setTimeout(() => {
this
.
getConfig
(),
this
.
getSearchParams
(),
this
.
getLabelList
()
// }, 0)
})
}
},
methods
:
{
getListWy
()
{
},
getListYwh
()
{
},
changeTbl
(
tbl
)
{
this
.
tbl
=
tbl
if
(
this
.
checkedKeys
.
length
>
0
)
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_ID_INFO_BY_LABEL
,
params
:
{
tableName
:
this
.
tbl
,
labelId_in
:
this
.
checkedKeys
.
toString
()
}
}).
then
(
res
=>
{
let
keyType
=
''
if
(
res
.
code
==
200
)
{
switch
(
this
.
tbl
)
{
case
'tbl_community'
:
if
(
res
.
data
.
content
.
sectId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListSect
(
res
.
data
.
content
)
}
break
case
'tbl_building'
:
if
(
res
.
data
.
content
.
unit_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListMpz
(
res
.
data
.
content
)
}
break
case
'tbl_prop_company'
:
if
(
res
.
data
.
content
.
cspId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListWy
(
res
.
data
.
content
)
}
break
case
'tbl_industry_council'
:
if
(
res
.
data
.
content
.
hocId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListYwh
(
res
.
data
.
content
)
}
break
default
:
break
}
}
})
}
else
{
this
.
clearAllTableData
()
}
},
clearAllTableData
()
{
this
.
tableData_sect
=
[]
this
.
tableData_mpz
=
[]
this
.
tableData_wy
=
[]
this
.
tableData_ywh
=
[]
},
searchXXXByLabel
()
{
console
.
log
(
this
.
checkedKeys
)
if
(
this
.
checkedKeys
.
length
>
0
)
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_ID_INFO_BY_LABEL
,
params
:
{
tableName
:
this
.
tbl
,
labelId_in
:
this
.
checkedKeys
.
toString
()
}
}).
then
(
res
=>
{
let
keyType
=
''
if
(
res
.
code
==
200
)
{
switch
(
this
.
tbl
)
{
case
'tbl_community'
:
if
(
res
.
data
.
content
.
sectId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListSect
(
res
.
data
.
content
)
}
break
case
'tbl_building'
:
if
(
res
.
data
.
content
.
unit_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListMpz
(
res
.
data
.
content
)
}
break
case
'tbl_prop_company'
:
if
(
res
.
data
.
content
.
cspId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListWy
(
res
.
data
.
content
)
}
break
case
'tbl_industry_council'
:
if
(
res
.
data
.
content
.
hocId_in
==
''
)
{
this
.
clearAllTableData
()
}
else
{
this
.
getListYwh
(
res
.
data
.
content
)
}
break
default
:
break
}
}
})
}
else
{
this
.
clearAllTableData
()
}
},
onCheck
(
keys
,
node
)
{
// console.log(keys, node.node.$children.length)
this
.
checkedKeys
=
[]
...
...
@@ -589,72 +582,249 @@ export default {
this
.
getList
()
},
0
)
},
getList
(
){
// 获取小区数据
getList
Sect
(
id
){
// 获取小区数据
//处理动态的搜索条件,耦合到搜索列表
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
)
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_BASIC_LIST
,
params
:
{
pageSize
:
this
.
pagination
.
pageSize
,
pageNo
:
this
.
pagination
.
pageNo
,
...
id
},
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
/**
* 存导出的数据? 暂时废弃
*/
// searchParams.token = this.$cookie.get('token')
// let a = this.tbl + '?'
// for(let k in searchParams){
// a = a+k+'='+ searchParams[k]+ '&'
// }
// this.exportParams = a
// 小区的展示统计量信息数据
this
.
pagination
.
total
=
this
.
$com
.
confirm
(
res
,
'data.totalRows'
,
0
)
this
.
pagination
.
totStCnstArea
=
this
.
$com
.
confirm
(
res
,
'data.totStCnstArea'
,
0
)
this
.
pagination
.
totUnits
=
this
.
$com
.
confirm
(
res
,
'data.totUnits'
,
0
)
this
.
pagination
.
totHous
=
this
.
$com
.
confirm
(
res
,
'data.totHous'
,
0
)
this
.
tableData_sect
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// 处理显示的字段
this
.
tableData_sect
.
forEach
(
col
=>
{
if
(
col
.
stKind
==
'01'
)
{
col
.
stKind
=
'商品房'
}
else
if
(
col
.
stKind
==
'02'
)
{
col
.
stKind
=
'动迁房'
}
else
if
(
col
.
stKind
==
'03'
)
{
col
.
stKind
=
'共有产权保障房'
}
else
if
(
col
.
stKind
==
'04'
)
{
col
.
stKind
=
'售后房'
}
else
if
(
col
.
stKind
==
'05'
)
{
col
.
stKind
=
'直管公房'
}
else
if
(
col
.
stKind
==
'06'
)
{
col
.
stKind
=
'混合'
}
else
if
(
col
.
stKind
==
'07'
)
{
col
.
stKind
=
'系统公房'
}
else
if
(
col
.
stKind
==
'08'
)
{
col
.
stKind
=
'集体土地集资房'
}
else
if
(
col
.
stKind
==
'09'
)
{
col
.
stKind
=
'军产'
}
else
if
(
col
.
stKind
==
'10'
)
{
col
.
stUseType
=
'私产'
}
else
if
(
col
.
stKind
==
'11'
)
{
col
.
stUseType
=
'公租房'
}
if
(
col
.
sectType
==
'1'
)
{
col
.
sectType
=
'住宅'
}
else
if
(
col
.
sectType
==
'2'
)
{
col
.
sectType
=
'非住宅'
}
else
if
(
col
.
sectType
==
'3'
)
{
col
.
sectType
=
'虚拟小区'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
col
.
hocId
=
'是'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
col
.
hocId
=
'是'
}
//特殊处理更新时间
if
(
!!
col
.
syncTime
)
{
col
.
syncTime
=
col
.
syncTime
.
slice
(
0
,
4
)
+
'-'
+
col
.
syncTime
.
slice
(
4
,
6
)
+
'-'
+
col
.
syncTime
.
slice
(
6
,
8
)
+
' '
+
col
.
syncTime
.
slice
(
8
,
10
)
+
':'
+
col
.
syncTime
.
slice
(
10
,
12
)
+
':'
+
col
.
syncTime
.
slice
(
12
,
14
)
}
})
let
isHocId
=
{}
if
(
this
.
form
.
getFieldValue
(
'isHoc'
))
{
//判断是否有业主大会, 处理入参为 hocId_ne 还是 hocId
if
(
this
.
form
.
getFieldValue
(
'isHoc'
)
!=
'true'
)
{
isHocId
=
{
hocId
:
'null'
}
})
},
getListMpz
(
id
){
// 获取小区数据
//处理动态的搜索条件,耦合到搜索列表
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_BUILDINGS_LIST
,
params
:
{
pageSize
:
this
.
pagination
.
pageSize
,
pageNo
:
this
.
pagination
.
pageNo
,
...
id
},
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
/**
* 存导出的数据? 暂时废弃
*/
// searchParams.token = this.$cookie.get('token')
// let a = this.tbl + '?'
// for(let k in searchParams){
// a = a+k+'='+ searchParams[k]+ '&'
// }
// this.exportParams = a
// 小区的展示统计量信息数据
this
.
pagination
.
total
=
this
.
$com
.
confirm
(
res
,
'data.totalRows'
,
0
)
this
.
pagination
.
totStCnstArea
=
this
.
$com
.
confirm
(
res
,
'data.totStCnstArea'
,
0
)
this
.
pagination
.
totUnits
=
this
.
$com
.
confirm
(
res
,
'data.totUnits'
,
0
)
this
.
pagination
.
totHous
=
this
.
$com
.
confirm
(
res
,
'data.totHous'
,
0
)
this
.
tableData_mpz
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// 处理显示的字段
this
.
tableData_mpz
.
forEach
(
col
=>
{
if
(
col
.
stKind
==
'01'
)
{
col
.
stKind
=
'商品房'
}
else
if
(
col
.
stKind
==
'02'
)
{
col
.
stKind
=
'动迁房'
}
else
if
(
col
.
stKind
==
'03'
)
{
col
.
stKind
=
'共有产权保障房'
}
else
if
(
col
.
stKind
==
'04'
)
{
col
.
stKind
=
'售后房'
}
else
if
(
col
.
stKind
==
'05'
)
{
col
.
stKind
=
'直管公房'
}
else
if
(
col
.
stKind
==
'06'
)
{
col
.
stKind
=
'混合'
}
else
if
(
col
.
stKind
==
'07'
)
{
col
.
stKind
=
'系统公房'
}
else
if
(
col
.
stKind
==
'08'
)
{
col
.
stKind
=
'集体土地集资房'
}
else
if
(
col
.
stKind
==
'09'
)
{
col
.
stKind
=
'军产'
}
else
if
(
col
.
stKind
==
'10'
)
{
col
.
stUseType
=
'私产'
}
else
if
(
col
.
stKind
==
'11'
)
{
col
.
stUseType
=
'公租房'
}
if
(
col
.
sectType
==
'1'
)
{
col
.
sectType
=
'住宅'
}
else
if
(
col
.
sectType
==
'2'
)
{
col
.
sectType
=
'非住宅'
}
else
if
(
col
.
sectType
==
'3'
)
{
col
.
sectType
=
'虚拟小区'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
isHocId
=
{
hocId_ne
:
'null'
}
}
}
let
syncTime_betn
=
''
if
(
this
.
form
.
getFieldValue
(
'syncTime_betn'
)
&&
this
.
form
.
getFieldValue
(
'syncTime_betn'
).
length
>
1
)
{
syncTime_betn
=
this
.
$moment
(
this
.
form
.
getFieldValue
(
'syncTime_betn'
)[
0
]).
format
(
'YYYYMMDD'
)
+
'000000'
syncTime_betn
+=
','
+
this
.
$moment
(
this
.
form
.
getFieldValue
(
'syncTime_betn'
)[
1
]).
format
(
'YYYYMMDD'
)
+
'235959'
}
let
searchParams
=
Object
.
assign
({},
{
'stNameFrst_l'
:
this
.
form
.
getFieldValue
(
'stNameFrst_l'
)
||
''
,
'addrFrst_l'
:
this
.
form
.
getFieldValue
(
'addrFrst_l'
)
||
''
,
'c.cspId'
:
!
this
.
form
.
getFieldValue
(
'c.cspId'
)?
''
:
this
.
form
.
getFieldValue
(
'c.cspId'
).
split
(
'#'
)[
1
],
'c.hoId'
:
!
this
.
form
.
getFieldValue
(
'c.hoId'
)?
''
:
this
.
form
.
getFieldValue
(
'c.hoId'
).
split
(
'#'
)[
1
],
'c.streetId'
:
!
this
.
form
.
getFieldValue
(
'c.streetId'
)?
''
:
this
.
form
.
getFieldValue
(
'c.streetId'
).
split
(
'#'
)[
1
],
'stKind_in'
:
!
this
.
form
.
getFieldValue
(
'stKind_in'
)?
''
:
this
.
form
.
getFieldValue
(
'stKind_in'
).
join
(
','
),
'unitAddr'
:
!
this
.
form
.
getFieldValue
(
'unitAddr'
)?
''
:
this
.
form
.
getFieldValue
(
'unitAddr'
),
'unitKind_in'
:
!
this
.
stLevel
?
''
:
this
.
stLevel
,
'cspServiceType'
:
!
this
.
cspServiceType
?
''
:
this
.
cspServiceType
,
// 'tableName': !this.tableName?'': this.tableName,
'type'
:
!
this
.
type
?
''
:
this
.
type
,
'sectType'
:
1
,
'sectType_in'
:
this
.
sectType_in
,
'c.createTime_desc'
:
'desc'
,
syncTime_betn
,
// 更新时间
// 'finishDate_lt': !!this.isBeforeTwoThousand? '2000-01-01': '',
'finishDate_lt'
:
this
.
isBeforeTwoThousand
==
'1'
?
'2020-01-01'
:
''
,
'finishDate_gt'
:
this
.
isBeforeTwoThousand
==
'2'
?
'2020-01-01'
:
''
,
'labelIds'
:
this
.
checkedKeys
.
toString
(),
'cspContractEndDate_lt'
:
!!
this
.
form
.
getFieldValue
(
'cspContractEndDate_lt'
)
?
this
.
$moment
(
this
.
form
.
getFieldValue
(
'cspContractEndDate_lt'
)).
format
(
'YYYY-MM-DD'
)
:
''
},
obj
,
isHocId
)
// 融合obj 和isHocId 到入参
searchParams
[
this
.
personalizedKey
]
=
!
this
.
formed
?
''
:
this
.
formed
if
(
this
.
$route
.
query
.
id
&&
this
.
$route
.
query
.
id
!=
''
)
{
// 如果query的id不为空,则回显,并根据id搜索
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
col
.
hocId
=
'是'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
col
.
hocId
=
'是'
}
//特殊处理更新时间
if
(
!!
col
.
syncTime
)
{
col
.
syncTime
=
col
.
syncTime
.
slice
(
0
,
4
)
+
'-'
+
col
.
syncTime
.
slice
(
4
,
6
)
+
'-'
+
col
.
syncTime
.
slice
(
6
,
8
)
+
' '
+
col
.
syncTime
.
slice
(
8
,
10
)
+
':'
+
col
.
syncTime
.
slice
(
10
,
12
)
+
':'
+
col
.
syncTime
.
slice
(
12
,
14
)
}
})
}
})
},
getListWy
(
id
){
// 获取小区数据
//处理动态的搜索条件,耦合到搜索列表
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_BASIC_LIST
,
params
:
Object
.
assign
({},
searchParams
,
{
url
:
this
.
$api
.
GET_WY_AND_YWH_LIST
,
params
:
{
tableName
:
this
.
tbl
,
pageSize
:
this
.
pagination
.
pageSize
,
pageNo
:
this
.
pagination
.
pageNo
pageNo
:
this
.
pagination
.
pageNo
,
...
id
},
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
/**
* 存导出的数据? 暂时废弃
*/
// searchParams.token = this.$cookie.get('token')
// let a = this.tbl + '?'
// for(let k in searchParams){
// a = a+k+'='+ searchParams[k]+ '&'
// }
// this.exportParams = a
// 小区的展示统计量信息数据
this
.
pagination
.
total
=
this
.
$com
.
confirm
(
res
,
'data.totalRows'
,
0
)
this
.
pagination
.
totStCnstArea
=
this
.
$com
.
confirm
(
res
,
'data.totStCnstArea'
,
0
)
this
.
pagination
.
totUnits
=
this
.
$com
.
confirm
(
res
,
'data.totUnits'
,
0
)
this
.
pagination
.
totHous
=
this
.
$com
.
confirm
(
res
,
'data.totHous'
,
0
)
this
.
tableData_wy
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// 处理显示的字段
this
.
tableData_wy
.
forEach
(
col
=>
{
if
(
col
.
stKind
==
'01'
)
{
col
.
stKind
=
'商品房'
}
else
if
(
col
.
stKind
==
'02'
)
{
col
.
stKind
=
'动迁房'
}
else
if
(
col
.
stKind
==
'03'
)
{
col
.
stKind
=
'共有产权保障房'
}
else
if
(
col
.
stKind
==
'04'
)
{
col
.
stKind
=
'售后房'
}
else
if
(
col
.
stKind
==
'05'
)
{
col
.
stKind
=
'直管公房'
}
else
if
(
col
.
stKind
==
'06'
)
{
col
.
stKind
=
'混合'
}
else
if
(
col
.
stKind
==
'07'
)
{
col
.
stKind
=
'系统公房'
}
else
if
(
col
.
stKind
==
'08'
)
{
col
.
stKind
=
'集体土地集资房'
}
else
if
(
col
.
stKind
==
'09'
)
{
col
.
stKind
=
'军产'
}
else
if
(
col
.
stKind
==
'10'
)
{
col
.
stUseType
=
'私产'
}
else
if
(
col
.
stKind
==
'11'
)
{
col
.
stUseType
=
'公租房'
}
if
(
col
.
sectType
==
'1'
)
{
col
.
sectType
=
'住宅'
}
else
if
(
col
.
sectType
==
'2'
)
{
col
.
sectType
=
'非住宅'
}
else
if
(
col
.
sectType
==
'3'
)
{
col
.
sectType
=
'虚拟小区'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
col
.
hocId
=
'是'
}
if
(
col
.
hocId
==
''
||
col
.
hocId
==
null
||
col
.
hocId
==
0
)
{
col
.
hocId
=
'否'
}
else
{
col
.
hocId
=
'是'
}
//特殊处理更新时间
if
(
!!
col
.
syncTime
)
{
col
.
syncTime
=
col
.
syncTime
.
slice
(
0
,
4
)
+
'-'
+
col
.
syncTime
.
slice
(
4
,
6
)
+
'-'
+
col
.
syncTime
.
slice
(
6
,
8
)
+
' '
+
col
.
syncTime
.
slice
(
8
,
10
)
+
':'
+
col
.
syncTime
.
slice
(
10
,
12
)
+
':'
+
col
.
syncTime
.
slice
(
12
,
14
)
}
})
}
})
},
getListYwh
(
id
){
// 获取小区数据
//处理动态的搜索条件,耦合到搜索列表
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_WY_AND_YWH_LIST
,
params
:
{
tableName
:
this
.
tbl
,
pageSize
:
this
.
pagination
.
pageSize
,
pageNo
:
this
.
pagination
.
pageNo
,
...
id
},
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
/**
...
...
@@ -672,9 +842,9 @@ export default {
this
.
pagination
.
totUnits
=
this
.
$com
.
confirm
(
res
,
'data.totUnits'
,
0
)
this
.
pagination
.
totHous
=
this
.
$com
.
confirm
(
res
,
'data.totHous'
,
0
)
this
.
tableData
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
this
.
tableData
_ywh
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// 处理显示的字段
this
.
tableData
.
forEach
(
col
=>
{
this
.
tableData
_ywh
.
forEach
(
col
=>
{
if
(
col
.
stKind
==
'01'
)
{
col
.
stKind
=
'商品房'
}
else
if
(
col
.
stKind
==
'02'
)
{
...
...
@@ -721,22 +891,6 @@ export default {
}
})
}
//
// 存储当前页面列表的搜索信息
//
this
.
$com
.
storeSearchParams
(
this
.
$route
.
name
,
this
.
pagination
,
Object
.
assign
({},
this
.
searchForm
,
{
'stNameFrst_l'
:
this
.
form
.
getFieldValue
(
'stNameFrst_l'
)
||
''
,
'addrFrst_l'
:
this
.
form
.
getFieldValue
(
'addrFrst_l'
)
||
''
,
'c.cspId'
:
this
.
form
.
getFieldValue
(
'c.cspId'
)
||
''
,
'c.hoId'
:
this
.
form
.
getFieldValue
(
'c.hoId'
)
||
''
,
'c.streetId'
:
this
.
form
.
getFieldValue
(
'c.streetId'
)
||
''
,
'stKind_in'
:
this
.
form
.
getFieldValue
(
'stKind_in'
)
||
''
,
'isHoc'
:
this
.
form
.
getFieldValue
(
'isHoc'
)
||
''
,
},
obj
)
)
})
},
getStreet
(){
//获取街道下拉
...
...
@@ -830,6 +984,9 @@ export default {
}
this
.
getList
()
},
test
()
{
console
.
log
(
'ajsdojsidjoasd'
)
},
toView
(
row
){
// 操作里面去详情
this
.
$router
.
push
({
path
:
`/houseData/basicInfoByLabel/
${
row
.
id
}
`
,
query
:
{
id
:
row
.
id
,
name
:
row
.
cspName
}})
},
...
...
src/views/label/labelRightSide.vue
View file @
1940cb77
...
...
@@ -11,9 +11,9 @@
<a-col
:span=
'1'
v-if=
"triggerType !== 'create' && triggerType !== 'loadParentLabel'"
:offset=
'1'
>
<a-button
type=
'danger'
@
click=
"deleteLabel(labelId)"
>
删除
</a-button>
</a-col>
<
!--
<
a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'
default'
>
编辑
</a-button>
</a-col>
-->
<a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'
primary'
@
click=
"preview()"
>
预览
</a-button>
</a-col>
<a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'primary'
@
click=
"save()"
>
保存
</a-button>
</a-col>
...
...
@@ -23,6 +23,7 @@
<a-divider
type=
'horizontal'
/>
<div
style=
"height: 580px; overflow-y: scroll"
>
<a-form
:form=
'labelForm'
>
<!--
{{
loopContent
}}
-->
<a-form-item
label=
'标签名'
:label-col=
"
{span:3}" :wrapper-col="{span:15}">
<a-input
placeholder=
'请输入标签名'
v-decorator=
"['labelName',
{validateTrigger:'blur', initialValue: jsonData.labelName?jsonData.labelName: '', rules: [{required: true, message: '请填写标签名!'}]}]">
</a-input>
</a-form-item>
...
...
@@ -50,12 +51,18 @@
</a-select>
</a-form-item>
-->
<a-form-item
label=
'标记对象'
:label-col=
"
{span:3}" :wrapper-col="{span:15}">
<a-radio-group
@
change=
'handleObjChange'
v-decorator=
"['tableName',
{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]">
<a-radio-group
v-decorator=
"['tableName',
{validateTrigger:'blur', initialValue: jsonData.tableName?jsonData.tableName: '', rules: [{required: true, message: '请选择业务对象!'}]}]">
<a-radio
value=
"tbl_community"
>
小区
</a-radio>
<a-radio
value=
"tbl_building"
>
门牌幢
门牌
</a-radio>
<a-radio
value=
"tbl_prop_company"
>
物业
</a-radio>
<a-radio
value=
"tbl_industry_council"
>
业委会
</a-radio>
</a-radio-group>
</a-form-item>
...
...
@@ -71,13 +78,13 @@
<span
style=
"font-weight: bold"
>
条件分组
{{
index66
+
1
}}
</span>
</a-col>
<a-col
:span=
'3'
>
<a-button
style=
"color: darkred"
type=
"link"
@
click=
"delGroup(index66)"
><a-icon
type=
"delete"
/>
{{
index66
}}
删除分组
</a-button>
<a-button
style=
"color: darkred"
type=
"link"
@
click=
"delGroup(index66)"
><a-icon
type=
"delete"
/>
删除分组
</a-button>
</a-col>
</a-row>
<div
style=
"width: 90%; padding: 20px; margin-bottom: 20px"
>
<div
v-for=
"(item, index) in item66.labelSelConditionList"
:key=
'index'
style=
"margin-bottom: 20px"
>
<a-form-item>
<a-select
style=
"width:
120px"
placeholder=
'请选择条件'
v-decorator=
"['relation-' + index66 +'-' + index,
{initialValue: item.relation, validateTrigger:'blur',rules: [
]}]">
<a-select
style=
"width:
80px"
placeholder=
'请选择条件'
v-decorator=
"['relation-' + index66 +'-' + index,
{initialValue: item.relation, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}
]}]">
<a-select-option
value=
'and'
>
与
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'ne'
>
非
</a-select-option>
...
...
@@ -85,13 +92,22 @@
</a-form-item>
<a-form-item>
<a-select
style=
"width: 120px"
placeholder=
'请选择业务属性'
v-decorator=
"['key-' + index66 +'-' + index,
{initialValue: item.key, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
v-for=
"(item1, index1) in availableKeyList"
:key=
'index1'
:value=
'item1.tblKey'
>
{{
item1
.
tblKeyName
}}
</a-select-option>
<a-select
style=
"width: 80px"
placeholder=
'请选择标记对象'
v-decorator=
"['tableName-' + index66 +'-' + index,
{initialValue: item.tableName, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
v-for=
"(item, index) in objSelectOptions"
:key=
'index'
:value=
'item.value'
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
<!--
{{
cnonvertObj
(
availableKeyList
,
infoSettingForm
.
getFieldValue
(
'tableName-'
+
index66
+
'-'
+
index
))
}}
-->
<!--
{{
infoSettingForm
.
getFieldValue
(
'tableName-'
+
index66
+
'-'
+
index
)
}}
-->
<!--
<div
v-for=
"(item1) in availableKeyList"
:key=
'item1.id'
>
{{
item1
.
tableName
}}
</div>
-->
<a-form-item>
<a-select
style=
"width: 180px"
placeholder=
'请选择业务属性'
v-decorator=
"['key-' + index66 +'-' + index,
{initialValue: item.key, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
v-for=
"(item1) in cnonvertObj(availableKeyList, infoSettingForm.getFieldValue('tableName-' + index66 +'-' + index))"
:key=
'item1.id'
:value=
'item1.tblKey'
>
{{
item1
.
tblKeyName
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<a-select
style=
"width:
12
0px"
placeholder=
'区间'
v-decorator=
"['codition-' + index66 +'-' + index,
{initialValue: item.codition, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width:
8
0px"
placeholder=
'区间'
v-decorator=
"['codition-' + index66 +'-' + index,
{initialValue: item.codition, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
value=
'eq'
>
等于
</a-select-option>
<a-select-option
value=
'gt'
>
大于
</a-select-option>
<a-select-option
value=
'gte'
>
大于等于
</a-select-option>
...
...
@@ -101,22 +117,22 @@
</a-select>
</a-form-item>
<a-form-item>
<a-input
style=
"width: 1
2
0px"
placeholder=
'请输入'
v-decorator=
"['inputOne-' + index66 +'-' + index,
{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]">
</a-input>
<a-input
style=
"width: 1
0
0px"
placeholder=
'请输入'
v-decorator=
"['inputOne-' + index66 +'-' + index,
{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]">
</a-input>
</a-form-item>
<a-form-item
v-if=
"infoSettingForm.getFieldValue('codition-'+index66 +'-' + index) == 'btw'"
>
<a-input
style=
"width: 1
2
0px"
placeholder=
'请输入'
v-decorator=
"['inputTwo-' + index66 +'-' + index,
{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]">
</a-input>
<a-input
style=
"width: 1
0
0px"
placeholder=
'请输入'
v-decorator=
"['inputTwo-' + index66 +'-' + index,
{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]">
</a-input>
</a-form-item>
<a-form-item>
<a-select
style=
"width:
12
0px"
placeholder=
'查询方式'
v-decorator=
"['selMet-' + index66 +'-' + index,
{initialValue: item.selMet, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width:
8
0px"
placeholder=
'查询方式'
v-decorator=
"['selMet-' + index66 +'-' + index,
{initialValue: item.selMet, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
value=
'equels'
>
精确
</a-select-option>
<a-select-option
value=
'like'
>
模糊
</a-select-option>
</a-select>
</a-form-item>
<!--
{{
index
+
`,`
+
loopContent
.
data
[
index66
].
labelSelConditionList
.
length
}}
-->
<a-form-item>
<a-icon
v-if=
"index+1 == loopContent.data.length"
theme=
'filled'
style=
"color:lightgreen;"
type=
"plus-circle"
@
click=
"addRow(index66)"
/>
<a-icon
v-if=
"index+1 == loopContent.data.length"
theme=
'filled'
style=
"color:red; margin-left: 5px"
type=
"minus-circle"
@
click=
"deleteRow(index66, index)"
/>
<a-icon
v-if=
"index+1 == loopContent.data
[index66].labelSelConditionList
.length"
theme=
'filled'
style=
"color:lightgreen;"
type=
"plus-circle"
@
click=
"addRow(index66)"
/>
<a-icon
v-if=
"index+1 == loopContent.data
[index66].labelSelConditionList
.length"
theme=
'filled'
style=
"color:red; margin-left: 5px"
type=
"minus-circle"
@
click=
"deleteRow(index66, index)"
/>
</a-form-item>
</div>
</div>
...
...
@@ -133,6 +149,17 @@
<span>
请选择业务对象后填写筛选配置
</span>
</a-row>
</div>
<a-modal
title=
'以下是预览结果,确定保存吗?'
width=
'55%'
v-model=
'resultModalVisible'
>
<template
slot=
"footer"
>
<a-button
key=
"cancel"
@
click=
"handleResultCancel"
>
返回
</a-button>
<a-button
key=
"ok"
type=
"primary"
@
click=
'handleResultOk'
>
确认并保存
</a-button>
</
template
>
<a-table
class=
"portalTable"
size=
"small"
row-key=
"id"
:columns=
"columns[0][labelForm.getFieldValue('tableName')]"
:dataSource=
"resultList"
></a-table>
</a-modal>
<!-- <div v-if="resultList.length > 0">
<a-divider type='horizontal' />
<a-row style="font-weight: bold">筛选结果</a-row>
...
...
@@ -155,14 +182,34 @@ export default {
return
{
labelForm
:
this
.
$form
.
createForm
(
this
),
infoSettingForm
:
this
.
$form
.
createForm
(
this
),
resultModalVisible
:
false
,
loopContent
:
{
data
:
[{
key
:
''
,
codition
:
'eq'
,
val
:
''
,
selMet
:
''
}],
// data: [{
// key: '',
// tableName: '',
// codition: 'eq',
// val: '',
// selMet: ''
// }],
},
objSelectOptions
:
[
{
name
:
'小区'
,
value
:
'tbl_community'
},
{
name
:
'门牌'
,
value
:
'tbl_building'
},
{
name
:
'物业'
,
value
:
'tbl_prop_company'
},
{
name
:
'业委会'
,
value
:
'tbl_industry_council'
}
],
verifySelect
:
false
,
verifyInput
:
false
,
jsonData
:
{},
...
...
@@ -175,6 +222,8 @@ export default {
resultList
:
[],
labelNameForDel
:
''
,
columns
:
[
{
tbl_community
:
[
{
title
:
'小区名称'
,
// width: 240,
...
...
@@ -210,6 +259,105 @@ export default {
key
:
'sectTypeName'
,
align
:
'center'
,
},
],
tbl_building
:
[
{
title
:
'门牌地址'
,
// width: 240,
dataIndex
:
'unitAddr'
,
key
:
'unitAddr'
,
align
:
'center'
,
},
{
title
:
'门牌类型'
,
// width: 240,
dataIndex
:
'unitKindName'
,
key
:
'unitKindName'
,
align
:
'center'
,
},
{
title
:
'门牌所在路'
,
// width: 240,
dataIndex
:
'uLoad'
,
key
:
'uLoad'
,
align
:
'center'
,
},
{
title
:
'门牌所在弄'
,
// width: 240,
dataIndex
:
'uLong'
,
key
:
'uLong'
,
align
:
'center'
,
},
],
tbl_prop_company
:
[
{
title
:
'物业名称'
,
// width: 240,
dataIndex
:
'cspName'
,
key
:
'cspName'
,
align
:
'center'
,
},
{
title
:
'物业联系人'
,
// width: 240,
dataIndex
:
'cspContacter'
,
key
:
'cspContacter'
,
align
:
'center'
,
},
{
title
:
'物业地址'
,
// width: 240,
dataIndex
:
'cspAddr'
,
key
:
'cspAddr'
,
align
:
'center'
,
},
{
title
:
'注册地址'
,
// width: 240,
dataIndex
:
'registerAddress'
,
key
:
'registerAddress'
,
align
:
'center'
,
},
],
tbl_industry_council
:
[
{
title
:
'业委会名称'
,
// width: 240,
dataIndex
:
'hocName'
,
key
:
'hocName'
,
align
:
'center'
,
},
{
title
:
'业委会地址'
,
// width: 240,
dataIndex
:
'hocAddr'
,
key
:
'hocAddr'
,
align
:
'center'
,
},
{
title
:
'竞选时间'
,
// width: 240,
dataIndex
:
'electionDate'
,
key
:
'electionDate'
,
align
:
'center'
,
},
{
title
:
'开始时间'
,
// width: 240,
dataIndex
:
'conStartDate'
,
key
:
'conStartDate'
,
align
:
'center'
,
},
{
title
:
'结束时间'
,
// width: 240,
dataIndex
:
'conEndDate'
,
key
:
'conEndDate'
,
align
:
'center'
,
},
]
}
]
}
},
...
...
@@ -218,7 +366,7 @@ export default {
this
.
getLabelDetail
()
this
.
getParentLabelList
()
// this.getKeyList()
//
this.initKeyList()
this
.
initKeyList
()
},
props
:
[
'triggerType'
,
...
...
@@ -227,6 +375,7 @@ export default {
watch
:
{
triggerType
:
{
handler
:
function
(
newV
,
oldV
)
{
console
.
log
(
111
)
this
.
resetFormFields
()
this
.
getLabelDetail
()
},
...
...
@@ -234,6 +383,7 @@ export default {
},
labelId
:
{
handler
:
function
(
newV
,
oldV
)
{
console
.
log
(
222
)
this
.
resetFormFields
()
this
.
getLabelDetail
()
},
...
...
@@ -241,13 +391,120 @@ export default {
},
},
methods
:
{
handleResultCancel
()
{
this
.
resultModalVisible
=
!
this
.
resultModalVisible
},
clearNextKey
(
col
)
{
console
.
log
(
col
)
// console.log(this.infoSettingForm.resetFields());
},
cnonvertObj
(
options
,
tableName
)
{
let
tbRealName
=
''
switch
(
tableName
)
{
case
'tbl_community'
:
tbRealName
=
'小区'
break
case
'tbl_building'
:
tbRealName
=
'自然幢'
break
case
'tbl_prop_company'
:
tbRealName
=
'物业公司'
break
case
'tbl_industry_council'
:
tbRealName
=
'业委会'
break
default
:
break
}
let
optionsPush
=
[]
for
(
let
i
=
0
;
i
<
options
.
length
;
i
++
)
{
if
(
options
[
i
].
tableName
==
tbRealName
)
{
optionsPush
.
push
(
options
[
i
])
}
}
return
optionsPush
},
handleResultOk
()
{
this
.
resultModalVisible
=
!
this
.
resultModalVisible
if
(
Object
.
keys
(
this
.
loopContent
).
length
==
0
)
{
this
.
$message
.
error
(
'请至少添加一组配置!'
)
}
else
{
// 判断是否选择分组或填写分组
console
.
log
(
!!
this
.
labelForm
.
getFieldValue
(
'parentId'
))
if
(
!!
this
.
labelForm
.
getFieldValue
(
'parentId'
))
{
this
.
verifyInput
=
false
this
.
verifySelect
=
true
}
else
{
this
.
verifyInput
=
true
this
.
verifySelect
=
false
}
this
.
labelForm
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
labelFormData
=
this
.
labelForm
.
getFieldsValue
()
this
.
jsonData
=
Object
.
assign
(
this
.
jsonData
,
labelFormData
)
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
let
loopGroup
=
this
.
loopContent
// 有多少组
console
.
log
(
loopGroup
)
let
innerResult
=
[]
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
loopGroup
.
data
.
forEach
((
item
,
i
)
=>
{
let
rowList
=
[]
item
.
labelSelConditionList
.
forEach
((
ele
,
index
)
=>
{
// console.log(formData)
rowList
.
push
({
key
:
formData
[
'key-'
+
i
+
'-'
+
index
],
tableName
:
formData
[
'tableName-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
formData
[
'relation-'
+
i
+
'-'
+
index
],
selMet
:
formData
[
'selMet-'
+
i
+
'-'
+
index
]
})
})
innerResult
.
push
({
'serial'
:
1
,
'relation'
:
formData
[
'relation-'
+
i
+
'-0'
],
'labelSelConditionList'
:
rowList
})
})
this
.
jsonData
.
selParams
=
innerResult
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_LABEL_CREATE_CONFIRM
,
params
:
Object
.
assign
(
this
.
jsonData
,
{
id
:
this
.
labelId
})
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
}
else
{
this
.
$message
.
error
(
'保存失败!'
)
}
})
}
})
}
})
}
},
addGroup
()
{
// 添加分组前,先查询当前有几个分组
const
groupTotal
=
Object
.
keys
(
this
.
loopContent
.
data
).
length
console
.
log
(
groupTotal
)
console
.
log
(
this
.
loopContent
)
this
.
loopContent
.
data
.
push
(
{
'serial'
:
'1'
,
'relation'
:
'and'
,
'labelSelConditionList'
:
[
{
'key'
:
''
,
'val'
:
''
,
'codition'
:
'eq'
,
'selMet'
:
''
,
'relation'
:
''
}
]
}
{
'serial'
:
'1'
,
'relation'
:
'and'
,
'labelSelConditionList'
:
[
{
'key'
:
''
,
'val'
:
''
,
'
tableName'
:
''
,
'
codition'
:
'eq'
,
'selMet'
:
''
,
'relation'
:
''
}
]
}
)
// Vue.set(this.loopContent.data, ''+(groupTotal+1), [
// { 'serial': '1', 'relation': 'and', 'labelSelConditionList': [ { 'key': '', 'val': '', 'codition': 'eq', 'selMet': '', 'relation': '' } ] }
...
...
@@ -265,17 +522,19 @@ export default {
this
.
getKeyList
(
this
.
initKey
)
},
handleObjChange
(
val
)
{
let
needValue
=
this
.
labelForm
.
getFieldValue
(
'tableName'
)
this
.
getKeyList
(
needValue
)
// 确定插入到哪一行
console
.
log
(
val
)
// let needValue = this.labelForm.getFieldValue('tableName')
// this.getKeyList(needValue)
this
.
loopContent
=
{
data
:
[{
key
:
''
,
codition
:
'eq'
,
val
:
''
,
selMet
:
''
}]}
//
this.loopContent = {data: [{
//
key: '',
//
codition: 'eq',
//
val: '',
//
selMet: ''
//
}]}
this
.
infoSettingForm
.
resetFields
()
//
this.infoSettingForm.resetFields()
// 重置key表项的值为空 或 业务对象干脆disable掉
},
getKeyList
(
val
)
{
...
...
@@ -307,7 +566,6 @@ export default {
this
.
loopContent
.
data
=
res
.
data
.
content
.
selParams
console
.
log
(
this
.
loopContent
.
data
)
this
.
initKeyList
()
}
})
}
else
{
...
...
@@ -359,6 +617,7 @@ export default {
console
.
log
(
whichGroup
)
this
.
loopContent
.
data
[
whichGroup
].
labelSelConditionList
.
push
({
key
:
''
,
tableName
:
''
,
codition
:
'eq'
,
val
:
''
,
relation
:
'and'
,
...
...
@@ -368,7 +627,7 @@ export default {
},
deleteRow
(
whichGroup
,
whichRow
)
{
console
.
log
(
whichGroup
,
whichRow
)
this
.
loopContent
[
whichGroup
]
.
splice
(
whichRow
,
1
)
this
.
loopContent
.
data
[
whichGroup
].
labelSelConditionList
.
splice
(
whichRow
,
1
)
// console.log(JSON.stringify(this.loopContent.data))
// console.log(index)
// this.loopContent.data.splice(index, 1)
...
...
@@ -395,9 +654,11 @@ export default {
this
.
deleteVisible
=
!
this
.
deleteVisible
},
resetFormFields
()
{
this
.
loopContent
=
{
'data'
:
[
{
'serial'
:
'1'
,
'relation'
:
'and'
,
'labelSelConditionList'
:
[
{
'key'
:
''
,
'val'
:
''
,
'codition'
:
'eq'
,
'selMet'
:
''
,
'relation'
:
''
}
]
}
]
}
this
.
loopContent
.
data
=
[
{
serial
:
1
,
relation
:
'and'
,
labelSelConditionList
:
[
{
key
:
''
,
val
:
''
,
tableName
:
''
,
codition
:
'eq'
,
selMet
:
''
,
relation
:
''
}
]
}
]
this
.
resultList
=
[]
this
.
labelForm
.
resetFields
()
this
.
infoSettingForm
.
resetFields
()
this
.
jsonData
=
{
selParams
:
[]}
},
handleConfirmVisible
()
{
...
...
@@ -433,6 +694,61 @@ export default {
handleConfirmCancel
()
{
this
.
confirmVisible
=
!
this
.
confirmVisible
},
preview
()
{
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
let
loopGroup
=
this
.
loopContent
// 有多少组
console
.
log
(
loopGroup
)
let
innerResult
=
[]
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
loopGroup
.
data
.
forEach
((
item
,
i
)
=>
{
let
rowList
=
[]
item
.
labelSelConditionList
.
forEach
((
ele
,
index
)
=>
{
// console.log(formData)
rowList
.
push
({
key
:
formData
[
'key-'
+
i
+
'-'
+
index
],
tableName
:
formData
[
'tableName-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
formData
[
'relation-'
+
i
+
'-'
+
index
],
selMet
:
formData
[
'selMet-'
+
i
+
'-'
+
index
]
})
})
innerResult
.
push
({
'serial'
:
1
,
'relation'
:
formData
[
'relation-'
+
i
+
'-0'
],
'labelSelConditionList'
:
rowList
})
})
// 调用预览接口
const
tableName
=
this
.
labelForm
.
getFieldValue
(
'tableName'
)
this
.
sendToPreview
(
innerResult
,
tableName
)
}
})
},
sendToPreview
(
body
,
tableName
)
{
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_LABEL_RESULT_PREVIEW
+
'?pageNo=0&pageSize=999&tableName='
+
tableName
,
params
:
body
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
resultModalVisible
=
!
this
.
resultModalVisible
this
.
resultList
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// this.resetFormFields()
// this.finish = true
// this.$emit('finish', this.finish)
}
else
{
this
.
$message
.
success
(
'发生错误!'
)
}
})
},
save
()
{
// if(this.loopContent.data.length == 0) {
if
(
Object
.
keys
(
this
.
loopContent
).
length
==
0
)
{
...
...
@@ -453,30 +769,22 @@ export default {
const
labelFormData
=
this
.
labelForm
.
getFieldsValue
()
this
.
jsonData
=
Object
.
assign
(
this
.
jsonData
,
labelFormData
)
console
.
log
(
this
.
jsonData
)
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
let
loopGroup
=
this
.
loopContent
// 有多少组
console
.
log
(
loopGroup
)
// console.log(values, 'form表单的数据')
let
innerResult
=
[]
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
// console.log(loopGroup, 'loopGroup')
console
.
log
(
formData
,
'formData'
)
loopGroup
.
data
.
forEach
((
item
,
i
)
=>
{
let
rowList
=
[]
console
.
log
(
item
)
item
.
labelSelConditionList
.
forEach
((
ele
,
index
)
=>
{
// console.log(formData)
rowList
.
push
({
key
:
formData
[
'key-'
+
i
+
'-'
+
index
],
tableName
:
formData
[
'tableName-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
formData
[
'relation-'
+
i
+
'-'
+
index
],
...
...
@@ -491,37 +799,7 @@ export default {
})
})
console
.
log
(
innerResult
)
this
.
jsonData
.
selParams
=
innerResult
// console.log(innerResult)
// 先循环得到有多少个form
// this.$ajax.post({
// url: this.$api.GET_LABEL_BIND_FILTER_RESULT,
// params: this.jsonData
// }).then(res => {
// if (res.code == 200) {
// if(res.data == null) {
// console.log(1)
// this.$message.error('该标签无搜索结果,标签添加失败!')
// } else if(!!res.data.content) {
// if(res.data.content.length > 0) {
// this.resultList = res.data.content
// this.confirmVisible = !this.confirmVisible
// } else {
// console.log(2)
// this.$message.error('该标签无搜索结果,标签添加失败!')
// }
// } else {
// }
// } else {
// this.$message.error('接口报错,报错码 ' + res.code + ', 请稍后重试!')
// }
// })
// this.resultList = res.data.content
this
.
confirmVisible
=
!
this
.
confirmVisible
}
})
...
...
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