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
14aeb7f4
Commit
14aeb7f4
authored
May 21, 2021
by
程卓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.omniview.pro/fangdi/housemanage/web/majorproject
into dev
parents
9b69b2d1
b5e55149
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1401 additions
and
11 deletions
+1401
-11
labelNone.png
src/assets/icon/labelNone.png
+0
-0
routes.js
src/router/routes.js
+8
-0
api.js
src/server/api.js
+22
-2
basicInfoByLabel.vue
src/views/houseData/basicInfoByLabel.vue
+1089
-0
labelList.vue
src/views/label/labelList.vue
+148
-0
labelRightSide.vue
src/views/label/labelRightSide.vue
+10
-9
labelRightSideEmpty.vue
src/views/label/labelRightSideEmpty.vue
+18
-0
parentLabelRightPanel.vue
src/views/label/parentLabelRightPanel.vue
+106
-0
No files found.
src/assets/icon/labelNone.png
0 → 100644
View file @
14aeb7f4
8.46 KB
src/router/routes.js
View file @
14aeb7f4
...
@@ -140,12 +140,20 @@ const appRoutes = [
...
@@ -140,12 +140,20 @@ const appRoutes = [
},
},
]
]
},
},
{
// 标签管理
path
:
'/systemManagement/lvot'
,
name
:
'lvot'
,
component
:
resolve
=>
require
([
'@/views/label/labelList'
],
resolve
),
//Tbls,
meta
:
{
title
:
'标签管理'
,
menuPath
:
true
,
menuIcon
:
'setting'
,
hideInBread
:
false
,
},
},
]
]
},
},
{
{
path
:
'/house'
,
name
:
'house'
,
component
:
resolve
=>
require
([
'@/components/Layout/content-wrapper'
],
resolve
),
// ContentWrapper,
path
:
'/house'
,
name
:
'house'
,
component
:
resolve
=>
require
([
'@/components/Layout/content-wrapper'
],
resolve
),
// ContentWrapper,
meta
:
{
title
:
'住宅信息'
,
menuPath
:
true
,
menuIcon
:
'home'
,
hideInBread
:
true
,
requirePerm
:
false
,
authCode
:
'0001'
},
meta
:
{
title
:
'住宅信息'
,
menuPath
:
true
,
menuIcon
:
'home'
,
hideInBread
:
true
,
requirePerm
:
false
,
authCode
:
'0001'
},
children
:
[
children
:
[
{
path
:
'/houseData/basicInfoByLabel'
,
name
:
'basicInfoByLabel'
,
component
:
resolve
=>
require
([
'@/views/houseData/basicInfoByLabel'
],
resolve
),
//basicInfo,
meta
:
{
title
:
'小区列表-标签'
,
menuPath
:
true
,
hideInBread
:
false
,
},
},
{
// 小区列表
{
// 小区列表
path
:
'/houseData/basicInfo'
,
name
:
'basicInfo'
,
component
:
resolve
=>
require
([
'@/views/houseData/basicInfo'
],
resolve
),
//basicInfo,
path
:
'/houseData/basicInfo'
,
name
:
'basicInfo'
,
component
:
resolve
=>
require
([
'@/views/houseData/basicInfo'
],
resolve
),
//basicInfo,
meta
:
{
title
:
'住宅小区'
,
menuPath
:
true
,
hideInBread
:
false
,
authCode
:
'000101'
,
menuIcon
:
'home'
},
meta
:
{
title
:
'住宅小区'
,
menuPath
:
true
,
hideInBread
:
false
,
authCode
:
'000101'
,
menuIcon
:
'home'
},
...
...
src/server/api.js
View file @
14aeb7f4
...
@@ -37,10 +37,11 @@ case 'huangpu-prod':
...
@@ -37,10 +37,11 @@ case 'huangpu-prod':
default
:
// 默认环境下(开发环境)
default
:
// 默认环境下(开发环境)
// BASE_URL = 'http://31.0.161.39/apiv2'
// 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://yangpu-hm.omniview.pro/api/v2'
BASE_URL
=
'http://yangpu-hm.omniview.pro/api/v2'
BASE_URL
=
'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://huangpu.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
BASE_URL
=
'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2'
break
break
}
}
...
@@ -185,6 +186,10 @@ export default {
...
@@ -185,6 +186,10 @@ export default {
GET_USER_PEIMISSION
:
'/service-permission/user/perms'
,
// 当前用户角色权限树 -- 传userId
GET_USER_PEIMISSION
:
'/service-permission/user/perms'
,
// 当前用户角色权限树 -- 传userId
GET_ALL_PEIMISSION
:
'/service-permission/perms'
,
// 全部角色权限树
GET_ALL_PEIMISSION
:
'/service-permission/perms'
,
// 全部角色权限树
GET_ALL_ROLE
:
'/service-permission/menu/tree'
,
//获取权限
GET_ALL_ROLE
:
'/service-permission/menu/tree'
,
//获取权限
GET_PREMSPOINT_LIST
:
'/service-permission/perm/points'
,
//获取功能点清单
POST_PREMSBRANCH
:
'/service-permission/perm/perm'
,
//单个新增权限分支
DELETE_PREMSPOINT
:
'/service-permission/perm/point/{id}'
,
//删除功能点
SYSTEM_LIST_ALL_GET
:
'/service-user/user/systems'
,
//查询系统列表
GET_USER_CODE
:
'/service-permission/user/menus/code'
,
//获取用户权限
GET_USER_CODE
:
'/service-permission/user/menus/code'
,
//获取用户权限
GET_USER_PERM
:
'/service-permission/user/menus/{id}'
,
GET_USER_PERM
:
'/service-permission/user/menus/{id}'
,
...
@@ -209,4 +214,19 @@ export default {
...
@@ -209,4 +214,19 @@ export default {
GET_RIZHI_INFO
:
'/service-log/operateRecord/{id}'
,
//日志详情
GET_RIZHI_INFO
:
'/service-log/operateRecord/{id}'
,
//日志详情
GET_XIAOQUTOTAL
:
'/service-basicdatasync-ddd/summary/community/totare'
,
//查询小区住宅面积,总楼栋数,总户数信息
GET_XIAOQUTOTAL
:
'/service-basicdatasync-ddd/summary/community/totare'
,
//查询小区住宅面积,总楼栋数,总户数信息
GET_LABEL_LIST
:
'/service-customkey-ddd/label/tree'
,
// 获取标签列表
GET_LABEL_DETAIL
:
'/service-customkey-ddd/label/{id}'
,
// 查看标签详情
DELETE_SINGLE_LABEL
:
'/service-customkey-ddd/label/{id}'
,
// 根据id删除某个标签
POST_SINGLE_LABEL
:
'/service-customkey-ddd/label'
,
// 新增标签
PUT_LABEL_INFO
:
'/service-customkey-ddd/label/{id}'
,
// 修改标签信息
POST_AVAILABLE_KEY
:
'/service-customkey-ddd/entityKeyDic'
,
// 可查询字段新增
PUT_AVAILABLE_KEY
:
'/service-customkey-ddd/entityKeyDic/{id}'
,
// 可查询字段修改
GET_AVAILABLE_KEY_LIST
:
'/service-customkey-ddd/entityKeyDics'
,
// 可查询字段列表
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/houseData/basicInfoByLabel.vue
0 → 100644
View file @
14aeb7f4
// 小区列表
<
template
>
<div
class=
"routerWapper"
>
<!--
{{
checkedKeys
}}
-->
<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>
<a-tree
@
check=
'onCheck'
checkable
:tree-data=
"treeData"
:replace-fields=
"replaceFields"
/>
</a-col>
<a-button
v-if=
"!leftPanelShow"
@
click=
"showNHide"
type=
'link'
icon=
'right'
style=
"position: absolute; left: -2%; top: 14%; color: grey"
/>
<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;`"
>
<!--
<p
class=
"gayLine noline"
/>
-->
<div
class=
"portalTableOperates"
>
<a-button
type=
'primary'
@
click=
"searchXXXByLabel"
>
查询
</a-button>
<a-tabs
:default-active-key=
"tbl"
@
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>
-->
</a-col>
</a-row>
</div>
</div>
</
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'
,
title
:
'labelName'
,
key
:
'id'
},
checkedKeys
:
[],
simpleSearchForm
:
true
,
// 展示、收取简单搜索开关,true为简单搜索
levelType
:
[
{
name
:
'高层'
,
key
:
'1'
},
{
name
:
'多层'
,
key
:
'2'
},
{
name
:
'别墅'
,
key
:
'3'
},
],
leftPanelShow
:
true
,
finishDate
:
[
{
name
:
'2000年以前'
,
key
:
'1'
},
{
name
:
'2000年以后'
,
key
:
'2'
},
],
neighbourType
:
[
{
name
:
'未成立'
,
key
:
'1'
},
{
name
:
'已成立'
,
key
:
'2'
},
{
name
:
'前期筹备中'
,
key
:
'3'
},
],
wuyeServiceType
:
[
{
name
:
'专业委托物业管理(前期阶段)'
,
key
:
'1'
},
{
name
:
'专业委托物业管理(业主大会阶段)'
,
key
:
'2'
},
{
name
:
'无人管理'
,
key
:
'3'
},
{
name
:
'自治管理'
,
key
:
'4'
},
{
name
:
'直管物业(公房)'
,
key
:
'5'
},
{
name
:
'单位自管(公房)'
,
key
:
'6'
},
],
customKeyEnable
:
false
,
// cookie里存的是否开启自定义字段
typeList
:
[
//小区性质的数据
{
name
:
'商品房'
,
key
:
'01'
},
{
name
:
'动迁房'
,
key
:
'02'
},
{
name
:
'共有产权保障房'
,
key
:
'03'
},
{
name
:
'售后房'
,
key
:
'04'
},
{
name
:
'直管公房'
,
key
:
'05'
},
{
name
:
'混合'
,
key
:
'06'
},
{
name
:
'系统公房'
,
key
:
'07'
},
{
name
:
'集体土地集资房'
,
key
:
'08'
},
{
name
:
'军产'
,
key
:
'09'
},
{
name
:
'私产'
,
key
:
'10'
},
{
name
:
'公租房'
,
key
:
'11'
},
],
searchList
:
[],
// 动态渲染的搜索列表
keyCodeList
:
[],
// 动态搜索的keycode列表
searchParams
:
{},
// 搜索的列表
searchForm
:
{},
street
:
[],
// 街道数据
hos
:
[],
// 房办数据
wuye
:
[],
// 物业数据
columns
:
[
//表格展示的列
{
title
:
'小区名称'
,
dataIndex
:
'stNameFrst'
,
key
:
'stNameFrst'
},
{
title
:
'小区地址'
,
dataIndex
:
'addrFrst'
,
key
:
'addrFrst'
},
{
title
:
'房管办'
,
dataIndex
:
'hoName'
,
key
:
'hoName'
},
{
title
:
'街道'
,
dataIndex
:
'strName'
,
key
:
'strName'
},
{
title
:
'小区性质'
,
dataIndex
:
'stKind'
,
key
:
'stKind'
},
{
title
:
'小区类型'
,
dataIndex
:
'sectType'
,
key
:
'sectType'
},
{
title
:
'物业服务企业'
,
dataIndex
:
'cspName'
,
key
:
'cspName'
},
{
title
:
'小区管理处'
,
dataIndex
:
'csName'
,
key
:
'csName'
},
{
title
:
'是否成立业主大会'
,
dataIndex
:
'hocId'
,
key
:
'hocId'
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
160
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
pagination
:
{
// 分页信息
pageNo
:
1
,
pageSize
:
20
,
current
:
1
,
defaultCurrent
:
1
,
defaultPageSize
:
20
,
showQuickJumper
:
true
,
onChange
:
this
.
pageChange
,
showSizeChanger
:
true
,
onShowSizeChange
:
this
.
showSizeChange
,
pageSizeOptions
:
[
'10'
,
'20'
,
'50'
,
'100'
],
total
:
0
,
// 小区总数
showTotal
:
total
=>
`总条数:
${
total
}
`
,
totStCnstArea
:
''
,
// 房屋总面积 平方米
totUnits
:
''
,
// 总门牌数 幢
totHous
:
''
,
// 总分户数 户
},
tableData_sect
:
[],
tableData_mpz
:
[],
tableData_wy
:
[],
tableData_ywh
:
[],
stLevel
:
''
,
cspServiceType
:
''
,
tableName
:
''
,
// 邻里小汇
formed
:
''
,
// 邻里小汇
type
:
''
,
// 邻里小汇
isBeforeTwoThousand
:
''
,
twoThousandValue
:
''
,
personalizedKey
:
''
}
},
beforeCreate
()
{
// 页面进来创建form
this
.
form
=
this
.
$form
.
createForm
(
this
)
},
computed
:
{
formItemLabelCol
()
{
let
labelCol
=
{}
if
(
this
.
simpleSearchForm
)
{
labelCol
=
{
span
:
0
}
}
else
{
labelCol
=
{
span
:
8
}
}
return
labelCol
},
formItemWrapperCol
()
{
let
wrapperCol
=
{}
if
(
this
.
simpleSearchForm
)
{
wrapperCol
=
{
span
:
24
}
}
else
{
wrapperCol
=
{
span
:
16
}
}
return
wrapperCol
}
},
created
()
{
// 进页面获取数据
this
.
customKeyEnable
=
this
.
$cookie
.
get
(
'customKeyEnable'
)
this
.
getHos
()
this
.
getWy
()
this
.
getStreet
()
},
mounted
(){
console
.
log
(
this
.
$api
.
BASE_URL
.
indexOf
(
'211.136.105'
)
!=-
1
)
if
(
this
.
$route
.
name
==
'basicInfoByLabel'
){
this
.
$nextTick
(
function
()
{
this
.
getLabelList
()
})
}
},
methods
:
{
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
()
{
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 = []
for
(
let
i
=
0
;
i
<
keys
.
length
;
i
++
)
{
console
.
log
(
keys
[
i
])
this
.
checkedKeys
.
push
(
keys
[
i
])
}
// cf
},
getLabelList
()
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_LABEL_LIST
,
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
treeData
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
console
.
log
(
JSON
.
stringify
(
this
.
treeData
))
}
})
},
showNHide
()
{
this
.
leftPanelShow
=
!
this
.
leftPanelShow
},
onSelect
(
selectedKeys
,
node
)
{
console
.
log
(
selectedKeys
,
node
.
node
.
$children
.
length
)
},
getConfig
()
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_CONFIG
,
}).
then
(
res
=>
{
if
(
res
.
code
===
'200'
)
{
let
inner
=
res
.
data
.
content
this
.
personalizedKey
=
inner
.
formedKey
}
})
},
closeMoreSearch
()
{
this
.
simpleSearchForm
=
true
},
showMoreSearch
()
{
this
.
simpleSearchForm
=
false
},
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
.
stLevel
=
''
this
.
cspServiceType
=
''
this
.
type
=
''
this
.
isBeforeTwoThousand
=
''
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
()
},
changeWy
(
value
){
// 切换物业
let
query
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
$route
.
query
))
query
=
{
id
:
''
,
name
:
''
}
this
.
$router
.
push
({
path
:
'/houseData/basicInfoByLabel'
,
query
:
query
})
this
.
form
.
setFieldsValue
({
'c.cspId'
:
value
})
this
.
search
()
},
changeStreet
(
value
)
{
// 切换街道
this
.
form
.
setFieldsValue
({
'c.streetId'
:
value
})
this
.
search
()
},
changeIsHoc
(
value
)
{
// 切换是否成立业主大会
this
.
form
.
setFieldsValue
({
'isHoc'
:
value
})
this
.
search
()
},
changeType
(
val
)
{
// 切换小区性质
this
.
form
.
setFieldsValue
({
'stKind_in'
:
val
})
this
.
getList
()
},
handleChangefb
(
value
)
{
//切换房办
this
.
form
.
setFieldsValue
({
'c.hoId'
:
value
})
this
.
search
()
},
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
)
},
getListSect
(
id
){
// 获取小区数据
//处理动态的搜索条件,耦合到搜索列表
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
)
}
})
}
})
},
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
{
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_WY_AND_YWH_LIST
,
params
:
{
tableName
:
this
.
tbl
,
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_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
)
{
/**
* 存导出的数据? 暂时废弃
*/
// 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_ywh
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
// 处理显示的字段
this
.
tableData_ywh
.
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
)
}
})
}
})
},
getStreet
(){
//获取街道下拉
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_STREET_LIST
,
params
:
{
pageSize
:
10000
}
}).
then
(
res
=>
{
this
.
street
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
})
},
getHos
(){
// 获取房办的下拉选项
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_HOS_LIST
,
params
:
{
pageSize
:
100000
,
sectType_in
:
'1'
}
}).
then
(
res
=>
{
this
.
hos
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
})
},
getWy
(){
// 获取物业的下拉选项
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_PROPCOMPANIES_LIST
,
params
:
{
pageSize
:
100000
,
sectType_in
:
'1'
}
}).
then
(
res
=>
{
this
.
wuye
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
})
},
/**
* 从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
'stNameFrst_l'
:
this
.
form
.
setFieldsValue
({
'stNameFrst_l'
:
searchParams
.
params
[
elem
]
})
break
case
'addrFrst_l'
:
this
.
form
.
setFieldsValue
({
'addrFrst_l'
:
searchParams
.
params
[
elem
]
})
break
case
'c.cspId'
:
if
(
searchParams
.
params
[
elem
]
!=
''
)
{
this
.
form
.
setFieldsValue
({
'c.cspId'
:
searchParams
.
params
[
elem
]
})
}
break
case
'c.hoId'
:
if
(
searchParams
.
params
[
elem
]
!=
''
)
{
this
.
form
.
setFieldsValue
({
'c.hoId'
:
searchParams
.
params
[
elem
]
})
}
break
case
'stKind_in'
:
if
(
searchParams
.
params
[
elem
]
!=
''
)
{
this
.
form
.
setFieldsValue
({
'stKind_in'
:
searchParams
.
params
[
elem
]
})
}
break
case
'c.streetId'
:
if
(
searchParams
.
params
[
elem
]
!=
''
)
{
this
.
form
.
setFieldsValue
({
'c.streetId'
:
searchParams
.
params
[
elem
]
})
}
break
case
'isHoc'
:
if
(
searchParams
.
params
[
elem
]
!=
''
)
{
this
.
form
.
setFieldsValue
({
'isHoc'
:
searchParams
.
params
[
elem
]
})
}
break
default
:
break
}
// 无法回显自定义的值,store里面有数据但是会报 You cannot set a form field before rendering a field associated with the value.
// setTimeout(()=>{
// this.form.setFieldsValue({ elem : searchParams.params[elem] })
// },0)
})
}
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
()
},
test
()
{
console
.
log
(
'ajsdojsidjoasd'
)
},
toView
(
row
){
// 操作里面去详情
this
.
$router
.
push
({
path
:
`/houseData/basicInfoByLabel/
${
row
.
id
}
`
,
query
:
{
id
:
row
.
id
,
name
:
row
.
cspName
}})
},
toBul
(
row
){
this
.
$router
.
push
({
path
:
'/houseData/buildings'
,
query
:
{
id
:
row
.
id
}})
},
toShebei
(
row
){
this
.
$router
.
push
({
path
:
`/houseData/shebei/
${
row
.
id
}
`
})
},
exportList
(){
//导出功能
const
formValue
=
this
.
form
.
getFieldsValue
()
let
newUrl
=
this
.
tbl
+
'?'
let
newObj
=
{}
//拼接除 c.xxx 和 是否成立业主大会 之外的数据
for
(
const
k
in
formValue
){
if
(
k
!=
'isHoc'
)
{
// 排除isHoc 是否成立业主大会 后续判断
if
(
formValue
[
k
]
!=
undefined
)
{
// 判断是否值为 undefined
if
(
k
==
'c'
)
{
// 排除 c.xxx 的键
newObj
=
formValue
[
k
]
//有c.xx存入 b对象 下面处理,
}
else
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
}
}
}
}
// 处理 c.xxx 里面的数据
for
(
const
k
in
newObj
){
if
(
newObj
[
k
]
!=
undefined
)
{
// 排除值为undefined的键
newUrl
+=
'c.'
+
k
+
'='
+
newObj
[
k
].
split
(
'#'
)[
1
]
+
'&'
// 拼接到 newUrl
}
}
// 处理是否成立业主大会
if
(
formValue
.
isHoc
)
{
if
(
formValue
.
isHoc
==
'false'
)
{
// 判断业主大会是否选择了, 再根据 选项 拼接参数到 newUrl
newUrl
=
newUrl
+
'hocId=null&'
}
else
{
newUrl
=
newUrl
+
'hocId_ne=null&'
}
}
let
token
=
this
.
$cookie
.
get
(
'token'
)
// 获取token 并拼接到 newUrl
newUrl
+=
'sectType=1&access_token='
+
token
.
split
(
'bearer '
)[
1
]
window
.
open
(
this
.
$api
.
BASE_URL
+
'/service-basicdatasync-ddd/export/'
+
newUrl
)
},
/**
* 导出二维码
*/
exportEWM
(){
const
formValue
=
this
.
form
.
getFieldsValue
()
let
token
=
this
.
$cookie
.
get
(
'token'
)
let
selectedKeys
=
this
.
$refs
.
childTab
.
rowSelection
.
selectedRowKeys
if
(
selectedKeys
.
length
>
0
){
let
sectId
=
selectedKeys
.
join
(
','
)
// console.log('https://hm.omniview.pro/common/public/qrCodeGenerate?sectId='+sectId+'&token='+token)
window
.
open
(
this
.
$api
.
GET_EXPORT_EWM
+
'?sectId='
+
sectId
+
'&access_token='
+
token
.
split
(
'bearer '
)[
1
]
)
}
else
{
let
streetsId
=
formValue
.
c
.
streetId
if
(
streetsId
){
streetsId
=
streetsId
.
split
(
'#'
)[
1
]
}
else
{
streetsId
=
''
}
let
stNameFrst_l
=
formValue
.
stNameFrst_l
?
formValue
.
stNameFrst_l
:
''
// console.log(this.$api.GET_EXPORT_EWM+'?streetId='+streetsId+'&stNameFrst_l='+stNameFrst_l+'&token='+token)
window
.
open
(
this
.
$api
.
GET_EXPORT_EWM
+
'?streetId='
+
streetsId
+
'&stNameFrst_l='
+
stNameFrst_l
+
'&access_token='
+
token
.
split
(
'bearer '
)[
1
])
}
},
changeLevel
(
val
)
{
console
.
log
(
val
)
this
.
stLevel
=
val
.
join
(
','
)
// if(val.indexOf('1')!=-1 && val.indexOf('2')!=-1) {
// this.stLevel = '8'
// } else {
// this.stLevel = val[0]
// }
// this.getList()
},
changeServiceType
(
val
)
{
this
.
cspServiceType
=
val
this
.
getList
()
},
changeNeighbourType
(
val
)
{
switch
(
val
)
{
case
'1'
:
this
.
tableName
=
'tbl_community'
this
.
formed
=
''
this
.
type
=
'un'
break
case
'2'
:
this
.
tableName
=
'tbl_community'
this
.
formed
=
'10,'
+
(
this
.
$moment
().
format
(
'L'
).
split
(
'/'
)).
join
(
''
)
this
.
type
=
'bet'
break
case
'3'
:
this
.
tableName
=
'tbl_community'
this
.
formed
=
'前期筹备中'
this
.
type
=
'l'
break
default
:
this
.
type
=
''
this
.
formed
=
''
break
}
// this.getList()
},
changeFinishDate
(
val
)
{
switch
(
val
)
{
case
'1'
:
this
.
isBeforeTwoThousand
=
'1'
break
case
'2'
:
this
.
isBeforeTwoThousand
=
'2'
break
default
:
this
.
isBeforeTwoThousand
=
'none'
break
}
// this.getList()
}
},
}
</
script
>
<
style
>
</
style
>
src/views/label/labelList.vue
0 → 100644
View file @
14aeb7f4
<
template
>
<div
class=
"routerWapper"
>
<div
class=
"portalDetailTitle"
v-if=
"$route.name=='lvot'"
>
<span
class=
"title"
>
标签维护
</span>
<!--
{{
currentState
}}
-->
<div
class=
"detailOperations"
>
<a-button
@
click=
"backPage"
>
返回
</a-button>
</div>
</div>
<div
class=
"layoutMargin layoutPadding"
v-if=
"$route.name == 'lvot'"
>
<a-row
v-if=
"$route.name=='lvot'"
>
<a-col
:span=
"4"
style=
"border-right:1px solid #ccc;height:100%; position:relative"
>
<span
style=
"display: block; width: 90%; color:#1890ff; font-size: 16px; font-weight: 500; padding-bottom:5px;"
><a-button
style=
"width: 100%"
type=
"default"
@
click=
"addLabel"
>
<a-icon
type=
"plus"
/>
添加标签
</a-button></span>
<a-tree
style=
"height: 700px"
:tree-data=
"treeData"
:replace-fields=
"replaceFields"
:selected-keys=
"selectedKeys"
@
select=
"onSelect"
/>
</a-col>
<a-col
:span=
"19"
:offset=
'1'
>
<RightPanel
v-if=
"currentState == 'create'"
:trigger-type=
'currentState'
@
finish=
'getFinishState'
/>
<RightPanel
v-else-if=
"currentState == 'loadChildLabel'"
:trigger-type=
'currentState'
:label-id=
'labelId'
@
finish=
'getFinishState'
/>
<ParentRightPanel
v-else-if=
"currentState == 'loadParentLabel'"
:trigger-type=
'currentState'
:label-id=
'labelId'
@
finish=
'getFinishState'
/>
<EmptyRightPanel
v-else
/>
</a-col>
</a-row>
</div>
<!--
<div
v-if=
"$route.name=='lvot'"
>
<a-row>
<a-col
:span=
'4'
class=
"layoutMargin layoutPadding"
style=
"height: 680px"
>
<a-row
style=
"height: 36px"
>
<a-button
style=
"width: 100%"
size=
'small'
type=
"default"
@
click=
"addLabel"
>
<a-icon
type=
"plus"
/>
添加标签
</a-button>
</a-row>
<a-tree
:tree-data=
"treeData"
:replace-fields=
"replaceFields"
:selected-keys=
"selectedKeys"
@
select=
"onSelect"
/>
</a-col>
<a-col
:span=
'1'
></a-col>
<a-col
:span=
'18'
class=
"layoutMargin layoutPadding"
style=
"height: 680px"
>
<RightPanel
v-if=
"currentState == 'create'"
:trigger-type=
'currentState'
@
finish=
'getFinishState'
/>
<RightPanel
v-else-if=
"currentState == 'loadChildLabel'"
:trigger-type=
'currentState'
:label-id=
'labelId'
@
finish=
'getFinishState'
/>
<ParentRightPanel
v-else-if=
"currentState == 'loadParentLabel'"
:trigger-type=
'currentState'
:label-id=
'labelId'
@
finish=
'getFinishState'
/>
<EmptyRightPanel
v-else
/>
</a-col>
</a-row>
</div>
-->
<RouterWapper
v-else
/>
</div>
</
template
>
<
script
>
import
RightPanel
from
'@/views/label/labelRightSide.vue'
import
ParentRightPanel
from
'@/views/label/parentLabelRightPanel.vue'
import
EmptyRightPanel
from
'@/views/label/labelRightSideEmpty.vue'
const
treeData
=
[]
export
default
{
name
:
'lvot'
,
components
:
{
RightPanel
,
EmptyRightPanel
,
ParentRightPanel
},
data
()
{
return
{
treeData
,
replaceFields
:
{
children
:
'children'
,
title
:
'labelName'
,
key
:
'id'
},
selectedKeys
:
[],
currentState
:
null
,
labelId
:
null
}
},
mounted
()
{
this
.
getLabelList
()
},
methods
:
{
getFinishState
(
state
)
{
if
(
state
==
true
)
{
this
.
currentState
=
null
this
.
getLabelList
()
}
},
getLabelList
()
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_LABEL_LIST
,
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
treeData
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
console
.
log
(
JSON
.
stringify
(
this
.
treeData
))
}
})
},
backPage
(){
// 返回按钮
this
.
$router
.
back
()
},
onSelect
(
selectedKeys
,
node
)
{
console
.
log
(
selectedKeys
,
node
.
node
.
$children
.
length
)
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_LABEL_DETAIL
.
replace
(
'{id}'
,
selectedKeys
[
0
]),
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
result
=
this
.
$com
.
confirm
(
res
,
'data.content'
,
[])
this
.
labelId
=
selectedKeys
[
0
]
console
.
log
(
result
.
parentId
,
node
.
node
.
$children
.
length
)
if
(
result
.
parentId
!==
'0'
&&
node
.
node
.
$children
.
length
==
0
||
result
.
parentId
==
'0'
&&
node
.
node
.
$children
.
length
==
0
)
{
// 为二级菜单
this
.
currentState
=
'loadChildLabel'
}
else
{
// 为一级菜单
this
.
currentState
=
'loadParentLabel'
}
}
})
},
onCheck
(
checkedKeys
,
info
)
{
console
.
log
(
'onCheck'
,
checkedKeys
,
info
)
},
addLabel
()
{
this
.
currentState
=
'create'
console
.
log
(
'add'
)
}
},
}
</
script
>
<
style
>
.ant-tree
li
{
margin
:
0
;
padding
:
10px
0
;
white-space
:
nowrap
;
list-style
:
none
;
outline
:
0
;
}
.ant-tree-child-tree
>
li
:first-child
{
padding-top
:
20px
;
}
</
style
>
src/views/label/labelRightSide.vue
View file @
14aeb7f4
...
@@ -61,9 +61,8 @@
...
@@ -61,9 +61,8 @@
<a-form-item
v-if=
"index66 !== 0"
style=
"margin-bottom: 20px"
>
<a-form-item
v-if=
"index66 !== 0"
style=
"margin-bottom: 20px"
>
<a-select
style=
"width: 80px"
placeholder=
'与上组关系'
v-decorator=
"['relationWithGroup-' + index66 + '-0',
{initialValue: item66.relation, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width: 80px"
placeholder=
'与上组关系'
v-decorator=
"['relationWithGroup-' + index66 + '-0',
{initialValue: item66.relation, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select-option
value=
'and'
>
与
</a-select-option>
<a-select-option
value=
'and'
>
且
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'ne'
>
非
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
...
@@ -81,9 +80,8 @@
...
@@ -81,9 +80,8 @@
<a-form-item
v-if=
"index !== 0"
>
<a-form-item
v-if=
"index !== 0"
>
<a-select
style=
"width: 80px"
placeholder=
'请选择条件'
v-decorator=
"['relation-' + index66 +'-' + index,
{initialValue: item.relation, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<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=
'and'
>
且
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'or'
>
或
</a-select-option>
<a-select-option
value=
'ne'
>
非
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
...
@@ -104,8 +102,8 @@
...
@@ -104,8 +102,8 @@
<a-form-item>
<a-form-item>
<a-select
style=
"width: 150px"
placeholder=
'区间'
v-decorator=
"['codition-' + index66 +'-' + index,
{initialValue: item.codition, validateTrigger:'blur',rules: [{required: true, message: '请至少选择一项!'}]}]">
<a-select
style=
"width: 150px"
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=
'eq'
>
等于
</a-select-option>
<a-select-option
value=
'regex'
>
等于(模糊)
</a-select-option>
<a-select-option
value=
'regex'
>
包含
</a-select-option>
<a-select-option
value=
'ne'
>
不等于
</a-select-option>
<a-select-option
value=
'ne'
>
不等于
</a-select-option>
<a-select-option
value=
'gt'
>
大于
</a-select-option>
<a-select-option
value=
'gt'
>
大于
</a-select-option>
<a-select-option
value=
'gte'
>
大于等于
</a-select-option>
<a-select-option
value=
'gte'
>
大于等于
</a-select-option>
...
@@ -493,6 +491,7 @@ export default {
...
@@ -493,6 +491,7 @@ export default {
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
randomNum
:
formData
[
'randomNumInner-'
+
i
+
'-'
+
index
],
})
})
})
})
...
@@ -532,7 +531,7 @@ export default {
...
@@ -532,7 +531,7 @@ export default {
console
.
log
(
this
.
loopContent
)
console
.
log
(
this
.
loopContent
)
Vue
.
set
(
this
.
loopContent
,
'data'
,
[
Vue
.
set
(
this
.
loopContent
,
'data'
,
[
...
this
.
loopContent
.
data
,
{
randomNum
:
Math
.
random
().
toString
(),
serial
:
'新分组'
,
relation
:
'and'
,
labelSelConditionList
:
[
{
key
:
''
,
val
:
''
,
tableName
:
''
,
codition
:
'eq'
,
relation
:
''
}
]
}
...
this
.
loopContent
.
data
,
{
randomNum
:
Math
.
random
().
toString
(),
serial
:
'新分组'
,
relation
:
'and'
,
labelSelConditionList
:
[
{
key
:
''
,
val
:
''
,
tableName
:
''
,
codition
:
'eq'
,
relation
:
''
,
randomNum
:
Math
.
random
()
}
]
}
])
])
this
.
$forceUpdate
()
this
.
$forceUpdate
()
...
@@ -556,6 +555,7 @@ export default {
...
@@ -556,6 +555,7 @@ export default {
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
randomNum
:
formData
[
'randomNumInner-'
+
i
+
'-'
+
index
],
})
})
})
})
...
@@ -684,8 +684,7 @@ export default {
...
@@ -684,8 +684,7 @@ export default {
this
.
deleteVisible
=
!
this
.
deleteVisible
this
.
deleteVisible
=
!
this
.
deleteVisible
},
},
resetFormFields
()
{
resetFormFields
()
{
this
.
loopContent
.
data
=
[
{
randomNum
:
Math
.
random
(),
serial
:
'新分组'
,
relation
:
'and'
,
labelSelConditionList
:
[
{
key
:
''
,
val
:
''
,
tableName
:
''
,
codition
:
'eq'
,
relation
:
''
}
]
}
]
this
.
loopContent
.
data
=
[
{
randomNum
:
Math
.
random
(),
serial
:
'新分组'
,
relation
:
'and'
,
labelSelConditionList
:
[
{
key
:
''
,
val
:
''
,
tableName
:
''
,
codition
:
'eq'
,
relation
:
''
,
randomNum
:
Math
.
random
()}
]
}
]
this
.
resultList
=
[]
this
.
resultList
=
[]
this
.
labelForm
.
resetFields
()
this
.
labelForm
.
resetFields
()
this
.
infoSettingForm
.
resetFields
()
this
.
infoSettingForm
.
resetFields
()
...
@@ -744,6 +743,7 @@ export default {
...
@@ -744,6 +743,7 @@ export default {
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
randomNum
:
formData
[
'randomNumInner-'
+
i
+
'-'
+
index
],
})
})
})
})
innerResult
.
push
({
innerResult
.
push
({
...
@@ -813,6 +813,7 @@ export default {
...
@@ -813,6 +813,7 @@ export default {
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
i
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
i
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
i
+
'-'
+
index
],
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
relation
:
!!
formData
[
'relation-'
+
i
+
'-'
+
index
]?
formData
[
'relation-'
+
i
+
'-'
+
index
]:
'and'
,
randomNum
:
formData
[
'randomNumInner-'
+
i
+
'-'
+
index
],
})
})
})
})
...
...
src/views/label/labelRightSideEmpty.vue
0 → 100644
View file @
14aeb7f4
<
template
>
<div
style=
"position: relative"
>
<div
style=
"border: 1px dotted lightgrey; padding: 150px;"
>
<a-row
style=
"text-align: center; margin-bottom: 50px;"
>
<img
src=
"@/assets/icon/labelNone.png"
/>
</a-row>
<a-row
style=
"text-align: center; font-weight: bold; font-size: 16px"
>
<span>
请先在左侧选择一个标签或添加标签。
</span>
</a-row>
</div>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
\ No newline at end of file
src/views/label/parentLabelRightPanel.vue
0 → 100644
View file @
14aeb7f4
<
template
>
<div
class=
"routerWapper"
>
<!--
{{
labelId
}}
-->
<div>
<a-row>
<a-col
:span=
'1'
>
<div
class=
"detailOperations"
>
<a-button
@
click=
"backPage"
>
返回
</a-button>
</div>
</a-col>
<a-col
:span=
'1'
:offset=
'1'
>
<a-button
type=
'primary'
@
click=
"save()"
>
保存
</a-button>
</a-col>
<a-col
:span=
'19'
></a-col>
</a-row>
</div>
<div>
<a-divider
type=
'horizontal'
/>
<a-form
:form=
'labelForm'
>
<a-form-item
label=
'标签名'
:label-col=
"
{span:2}" :wrapper-col="{span:14}">
<a-input
v-decorator=
"['labelName',
{validateTrigger:'blur', initialValue: '', rules: [{required: true, message: '请填写标签名!'}]}]">
</a-input>
</a-form-item>
</a-form>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
labelForm
:
this
.
$form
.
createForm
(
this
),
labelList
:
{},
finish
:
false
,
}
},
props
:
[
'triggerType'
,
'labelId'
],
mounted
()
{
this
.
getLabelInfo
()
},
watch
:
{
triggerType
:
{
handler
:
function
(
newV
,
oldV
)
{
this
.
resetFormFields
()
this
.
getLabelInfo
()
},
immediate
:
true
},
labelId
:
{
handler
:
function
(
newV
,
oldV
)
{
this
.
resetFormFields
()
this
.
getLabelInfo
()
},
immediate
:
true
}
},
methods
:
{
getLabelInfo
()
{
if
(
!!
this
.
labelId
)
{
this
.
$ajax
.
get
({
url
:
this
.
$api
.
GET_LABEL_DETAIL
.
replace
(
'{id}'
,
this
.
labelId
),
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
labelList
=
res
.
data
.
content
this
.
labelForm
.
setFieldsValue
({
labelName
:
res
.
data
.
content
.
labelName
})
}
})
}
},
resetFormFields
()
{
this
.
labelForm
.
resetFields
()
},
backPage
(){
// 返回按钮
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
},
save
()
{
this
.
labelForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
this
.
labelList
.
labelName
=
this
.
labelForm
.
getFieldValue
(
'labelName'
)
this
.
$ajax
.
put
({
url
:
this
.
$api
.
PUT_LABEL_INFO
.
replace
(
'{id}'
,
this
.
labelId
),
params
:
Object
.
assign
(
this
.
labelList
,
{
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
(
'修改失败!'
)
}
})
}
})
},
},
}
</
script
>
\ No newline at end of file
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