Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wbx-PCAndMobi
mobi
Commits
cce809d1
Commit
cce809d1
authored
Feb 09, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复自定义columns,出现xxx.xxx时 选中与否表格展示错误
parent
827e18d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
api.js
src/server/api.js
+2
-2
mutSelect.vue
src/views/components/mutSelect.vue
+13
-2
tableAndMut.vue
src/views/components/tableAndMut.vue
+4
-3
No files found.
src/server/api.js
View file @
cce809d1
...
@@ -62,9 +62,9 @@ case 'huangpu-prod':
...
@@ -62,9 +62,9 @@ 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://xuhui.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://211.136.105.193/apiv2'
//
BASE_URL = 'http://211.136.105.193/apiv2'
// MOCK_URL = 'https://yapi.omniview.pro/mock/278'
// MOCK_URL = 'https://yapi.omniview.pro/mock/278'
break
break
...
...
src/views/components/mutSelect.vue
View file @
cce809d1
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
validateMax
(
rule
,
value
,
callback
)
{
// 验证多选个数最大值
validateMax
(
rule
,
value
,
callback
)
{
// 验证多选个数最大值
if
(
value
.
length
>
this
.
maxLength
){
if
(
value
.
length
>
this
.
maxLength
){
this
.
formTab
.
setFieldsValue
({
this
.
formTab
.
setFieldsValue
({
'chooseList'
:
this
.
selKeysList
,
'chooseList'
:
this
.
selKeysList
,
...
@@ -83,11 +83,21 @@ export default {
...
@@ -83,11 +83,21 @@ export default {
this
.
$emit
(
'selKeysNew'
,
value
)
this
.
$emit
(
'selKeysNew'
,
value
)
this
.
changeColumnsList
(
value
)
this
.
changeColumnsList
(
value
)
}
}
},
},
changeColumnsList
(
value
){
// 表格展示的列
changeColumnsList
(
value
){
// 表格展示的列
let
newArr
=
[]
value
.
forEach
(
col
=>
{
if
(
col
.
indexOf
(
'&'
)
!=
-
1
){
// 如果有& 就取xx.xx
newArr
.
push
(
col
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
split
(
'&'
)[
1
]
)
}
else
{
newArr
.
push
(
col
)
}
})
const
arr
=
[]
const
arr
=
[]
this
.
columns
.
forEach
(
col
=>
{
// 判断在全部字段中 是否有当前字段(有些自定义可能会被删除,就不再显示了)
this
.
columns
.
forEach
(
col
=>
{
// 判断在全部字段中 是否有当前字段(有些自定义可能会被删除,就不再显示了)
if
(
value
.
indexOf
(
col
.
key
)
!==
-
1
)
{
if
(
newArr
.
indexOf
(
col
.
key
)
!==
-
1
)
{
arr
.
push
(
col
)
arr
.
push
(
col
)
}
}
})
})
...
@@ -99,6 +109,7 @@ export default {
...
@@ -99,6 +109,7 @@ export default {
customRender
:
'action'
customRender
:
'action'
}
}
})
})
this
.
$emit
(
'changeColumnsList'
,
arr
)
this
.
$emit
(
'changeColumnsList'
,
arr
)
},
},
}
}
...
...
src/views/components/tableAndMut.vue
View file @
cce809d1
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</a-menu-item>
</a-menu-item>
<a-menu-item
key=
"3"
v-if=
"$route.name == 'propertyInfo'"
>
<a-menu-item
key=
"3"
v-if=
"$route.name == 'propertyInfo'"
>
<a
@
click=
"$parent.toList(record.cspId)"
>
小区列表
</a>
<a
@
click=
"$parent.toList(record.cspId)"
>
小区列表
</a>
</a-menu-item>
</a-menu-item>
<a-menu-item
key=
"4"
v-if=
"customKeyEnable == 'true'"
>
<a-menu-item
key=
"4"
v-if=
"customKeyEnable == 'true'"
>
<a
@
click=
"showModal(record)"
>
拓展信息维护
</a>
<a
@
click=
"showModal(record)"
>
拓展信息维护
</a>
</a-menu-item>
</a-menu-item>
...
@@ -132,7 +132,7 @@ export default {
...
@@ -132,7 +132,7 @@ export default {
this
.
$com
.
saveColumnsCookie
(
this
.
tbl
,
this
.
selKeysList
,
this
.
allKeys
)
this
.
$com
.
saveColumnsCookie
(
this
.
tbl
,
this
.
selKeysList
,
this
.
allKeys
)
},
},
onSelectChange
(
selectedRowKeys
)
{
// 被勾选的数据
onSelectChange
(
selectedRowKeys
)
{
// 被勾选的数据
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRowKeys
=
selectedRowKeys
},
},
...
@@ -191,6 +191,7 @@ export default {
...
@@ -191,6 +191,7 @@ export default {
dataIndex
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
],
dataIndex
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
],
key
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
]
key
:
col
.
key
.
split
(
'&'
)[
0
]
+
'.'
+
col
.
key
.
split
(
'&'
)[
1
]
},
)
},
)
}
else
{
}
else
{
this
.
newColumns
.
push
(
{
this
.
newColumns
.
push
(
{
title
:
col
.
keyName
,
title
:
col
.
keyName
,
...
@@ -211,7 +212,7 @@ export default {
...
@@ -211,7 +212,7 @@ export default {
this
.
newColumns
.
forEach
(
col
=>
{
this
.
newColumns
.
forEach
(
col
=>
{
if
(
col
.
key
==
'addrFrst'
){
if
(
col
.
key
==
'addrFrst'
){
col
.
width
=
'30%'
col
.
width
=
'30%'
}
}
})
})
}
}
})
})
...
...
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