Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 3ab392ce
authored
Dec 14, 2021
by
test
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
选择员工组件BUG修复
1 parent
c30a9c2d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
linkwe-ui/src/components/SelectUser.vue
linkwe-ui/src/views/drainageCode/staff/add.vue
linkwe-ui/src/components/SelectUser.vue
View file @
3ab392c
...
...
@@ -105,13 +105,6 @@
})
return
dealOptions
},
setData
()
{
if
(
this
.
$refs
.
tree
)
this
.
$refs
.
tree
.
setCheckedKeys
([])
this
.
userList
.
forEach
(
dd
=>
{
this
.
$refs
.
tree
.
setCheckedKeys
([
dd
.
userId
])
})
this
.
$forceUpdate
()
},
loadNode
(
node
,
resolve
)
{
if
(
node
.
level
===
0
)
{
if
(
!
Array
.
isArray
(
this
.
defaultValues
)
||
...
...
@@ -138,8 +131,6 @@
// })
node
.
data
.
children
&&
rows
.
push
(...
node
.
data
.
children
)
resolve
(
rows
)
console
.
log
(
222
)
this
.
setData
()
}
)
}
...
...
@@ -157,10 +148,10 @@
handleCheckChange
(
data
,
checked
,
indeterminate
)
{
// console.log(arguments)
if
(
checked
)
{
//
if (this.isSigleSelect) {
//
// 单选情况
//
this.$refs.tree.setCheckedKeys([data.userId])
//
}
if
(
this
.
isSigleSelect
)
{
// 单选情况
this
.
$refs
.
tree
.
setCheckedKeys
([
data
.
userId
])
}
if
(
this
.
isOnlyLeaf
)
{
if
(
data
.
userId
&&
!
data
.
isParty
)
{
this
.
userList
.
push
(
data
)
...
...
@@ -174,8 +165,19 @@
let
index
=
this
.
userList
.
findIndex
(
i
=>
i
.
userId
===
data
.
userId
)
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
}
this
.
setData
()
// console.log(data, checked, indeterminate);
this
.
userList
=
this
.
unique
(
this
.
userList
)
},
unique
(
arr
){
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
for
(
var
j
=
i
+
1
;
j
<
arr
.
length
;
j
++
){
if
(
arr
[
i
].
userId
.
split
(
'_'
)[
0
]
==
arr
[
j
].
userId
.
split
(
'_'
)[
0
]){
arr
.
splice
(
j
,
1
);
j
--
;
}
}
}
return
arr
;
},
// 确 定
submit
()
{
...
...
@@ -189,7 +191,6 @@
index
>
-
1
&&
this
.
userList
.
splice
(
index
,
1
)
let
order
=
this
.
defaultValues
.
findIndex
(
i
=>
i
.
userId
===
key
)
order
>
-
1
&&
this
.
defaultValues
.
splice
(
order
,
1
)
this
.
setData
()
},
},
}
...
...
linkwe-ui/src/views/drainageCode/staff/add.vue
View file @
3ab392c
...
...
@@ -78,7 +78,7 @@
<div
v-if=
"codeForm.weEmpleCodeUseScops.length > 0"
>
<el-tag
size=
"medium"
v-for=
"(item, index) in codeForm.weEmpleCodeUseScops"
:key=
"index"
>
{{ item.businessName }}
</el-tag>
</div>
<el-button
style=
"margin-left:10px;"
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{ codeForm.weEmpleCodeUseScops.length ? '修改' : '选择' }}员工
</el-button>
<el-button
type=
"primary"
plain
size=
"mini"
@
click=
"onSelectUser"
>
{{ codeForm.weEmpleCodeUseScops.length ? '修改' : '选择' }}员工
</el-button>
<div
class=
"sub-des"
>
单人活码只能选择一个员工,多人活码支持选择多个员工
</div>
</el-form-item>
<el-form-item
v-if=
"codeForm.qrRuleType == 2"
label=
"活码排班"
prop=
"empleCodeRosterDto"
>
...
...
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