Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 41eda484
authored
Mar 18, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.5.0版本需求
1 parent
018c49fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
src/views/user/select.vue
src/views/user/select.vue
View file @
41eda48
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
</div>
</div>
<div
class=
"tree_box"
>
<div
class=
"tree_box"
>
<el-scrollbar
class=
"el_scroll"
>
<el-scrollbar
class=
"el_scroll"
v-loading=
"treeLoading"
>
<el-tree
:
data=
"vehicleList"
:props=
"treeProps"
:default-checked-keys=
"checkKeys"
v-loading=
"treeLoading
"
show-checkbox
lazy
node-key=
"id"
:load=
"loadNode"
:render-content=
"renderTreeContent"
@
check=
"onCheckChange"
>
<el-tree
:
key=
"id"
:data=
"vehicleList"
:props=
"treeProps"
:default-checked-keys=
"checkKeys
"
show-checkbox
lazy
node-key=
"id"
:load=
"loadNode"
:render-content=
"renderTreeContent"
@
check=
"onCheckChange"
>
</el-tree>
</el-tree>
</el-scrollbar>
</el-scrollbar>
</div>
</div>
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</el-input>
</el-input>
</div>
</div>
<div
class=
"tree_box"
>
<div
class=
"tree_box"
>
<el-scrollbar
ref=
"scrollbar"
class=
"el_scroll"
>
<el-scrollbar
ref=
"scrollbar"
class=
"el_scroll"
v-loading=
"rightLoading"
>
<el-checkbox-group
class=
"el_checkbox_group"
v-model=
"rightCheckList"
>
<el-checkbox-group
class=
"el_checkbox_group"
v-model=
"rightCheckList"
>
<el-checkbox
v-for=
"(item,index) in showCheckList"
:key=
"index"
:label=
"item.id"
>
<el-checkbox
v-for=
"(item,index) in showCheckList"
:key=
"index"
:label=
"item.id"
>
<span
class=
"checkbox_label"
:title=
"`$
{item.label}/${item.label1}`">
{{
showLabels
(
item
)
}}
</span>
<span
class=
"checkbox_label"
:title=
"`$
{item.label}/${item.label1}`">
{{
showLabels
(
item
)
}}
</span>
...
@@ -99,7 +99,7 @@ export default {
...
@@ -99,7 +99,7 @@ export default {
checkList
:
[],
// 所有已选择的车辆
checkList
:
[],
// 所有已选择的车辆
showCheckList
:
[],
// 动态渲染的列表
showCheckList
:
[],
// 动态渲染的列表
pageNum
:
1
,
// 渲染下标
pageNum
:
1
,
// 渲染下标
vehicleList
:
this
.
$store
.
state
.
userVehicleTree
,
vehicleList
:
[]
,
treeProps
:
{
treeProps
:
{
label
:
"label"
,
label
:
"label"
,
children
:
"children"
,
children
:
"children"
,
...
@@ -115,16 +115,17 @@ export default {
...
@@ -115,16 +115,17 @@ export default {
resultList
:
[],
resultList
:
[],
placeholderText
:
"请输入至少两个关键字"
,
placeholderText
:
"请输入至少两个关键字"
,
treeLoading
:
true
,
treeLoading
:
true
,
rightLoading
:
true
,
};
};
},
},
mounted
()
{
mounted
()
{
let
list
=
this
.
$store
.
state
.
userVehicleTree
;
let
list
=
this
.
$store
.
state
.
userVehicleTree
;
this
.
vehicleList
=
list
;
console
.
log
(
"树数据:"
,
list
);
if
(
!
list
||
list
.
length
<=
0
)
{
if
(
!
list
||
list
.
length
<=
0
)
{
this
.
getList
();
this
.
getList
();
}
else
{
}
else
{
this
.
treeLoading
=
false
;
this
.
treeLoading
=
false
;
this
.
vehicleList
=
list
;
}
}
this
.
handleScroll
();
this
.
handleScroll
();
this
.
getInfo
();
this
.
getInfo
();
...
@@ -388,24 +389,29 @@ export default {
...
@@ -388,24 +389,29 @@ export default {
getInfo
()
{
getInfo
()
{
let
oParams
=
{};
let
oParams
=
{};
oParams
.
receiverId
=
this
.
id
;
oParams
.
receiverId
=
this
.
id
;
GET_USER_ASSIGN_INFO
(
oParams
).
then
((
res
)
=>
{
GET_USER_ASSIGN_INFO
(
oParams
)
let
list
=
res
.
data
||
[];
.
then
((
res
)
=>
{
let
arr
=
[];
this
.
rightLoading
=
false
;
list
.
map
((
k
)
=>
{
let
list
=
res
.
data
||
[];
let
idx
=
arr
.
findIndex
((
j
)
=>
j
==
k
.
pid
);
let
arr
=
[];
if
(
idx
<
0
)
{
list
.
map
((
k
)
=>
{
arr
.
push
(
k
.
pid
.
replace
(
"u"
,
""
));
let
idx
=
arr
.
findIndex
((
j
)
=>
j
==
k
.
pid
);
}
if
(
idx
<
0
)
{
k
.
vid
=
k
.
vehicleId
;
arr
.
push
(
k
.
pid
.
replace
(
"u"
,
""
));
k
.
label
=
k
.
vin
;
}
k
.
label1
=
k
.
ownerName
;
k
.
vid
=
k
.
vehicleId
;
return
k
;
k
.
label
=
k
.
vin
;
k
.
label1
=
k
.
ownerName
;
return
k
;
});
this
.
checkList
=
list
;
this
.
checkKeys
=
arr
;
console
.
log
(
arr
);
this
.
loadList
();
})
.
catch
((
error
)
=>
{
this
.
rightLoading
=
false
;
});
});
this
.
checkList
=
list
;
this
.
checkKeys
=
arr
;
console
.
log
(
arr
);
this
.
loadList
();
});
},
},
// 筛选数据
// 筛选数据
...
@@ -585,6 +591,7 @@ export default {
...
@@ -585,6 +591,7 @@ export default {
}
}
}
}
.el_checkbox_group
{
.el_checkbox_group
{
height
:
100%
;
padding
:
0
10px
;
padding
:
0
10px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment