Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
a47aed2b
Commit
a47aed2b
authored
Jul 18, 2023
by
王启林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加全选
parent
6a1a6423
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
attendance-performance-manager-ui/admin/src/views/feedback/addQuestion/list.vue
...-manager-ui/admin/src/views/feedback/addQuestion/list.vue
+29
-1
No files found.
attendance-performance-manager-ui/admin/src/views/feedback/addQuestion/list.vue
View file @
a47aed2b
...
...
@@ -87,6 +87,8 @@
<div
style=
"margin-top: 3px;"
>
{{ userOptions.length > 0 ? '请选择人员' : '请选择部门' }}
</div>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
v-if=
"userOptions.length > 0"
>
全选
</el-checkbox>
<el-checkbox-group
v-model=
"checkedUser"
>
<el-checkbox
v-for=
"i in userOptions"
:label=
"i.staffId"
:key=
"i"
>
{{ i.staffName
}}
</el-checkbox>
...
...
@@ -105,7 +107,6 @@
<
script
>
import
formCreate
from
"
@form-create/element-ui
"
;
import
moment
from
'
moment
'
function
formType
(
val
)
{
// (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
switch
(
val
)
{
...
...
@@ -174,8 +175,11 @@ export default {
},
treeDialog
:
0
,
isIndeterminate
:
false
,
userOptions
:
[],
checkedUser
:
[],
checkAll
:
false
,
checkAllArr
:
[],
}
},
mounted
()
{
...
...
@@ -203,8 +207,32 @@ export default {
this
.
$message
.
warning
(
'
请选择人员
'
)
}
},
handleCheckAllChange
(
val
)
{
console
.
log
(
val
,
this
.
userOptions
)
if
(
val
)
{
let
arr
=
[]
this
.
userOptions
.
forEach
(
i
=>
{
arr
.
push
(
i
.
staffId
)
})
this
.
checkedUser
=
Array
.
from
(
new
Set
([...
this
.
checkedUser
,
...
arr
]))
console
.
log
(
this
.
checkedUser
)
this
.
isIndeterminate
=
false
;
}
else
{
let
arr
=
[]
this
.
userOptions
.
forEach
(
i
=>
{
arr
.
push
(
i
.
staffId
)
})
let
newSet
=
new
Set
(
this
.
checkedUser
)
arr
.
forEach
(
i
=>
{
newSet
.
delete
(
i
)
})
this
.
checkedUser
=
[...
newSet
]
console
.
log
(
this
.
checkedUser
)
}
},
handleNodeClick
(
data
)
{
if
(
data
.
personList
)
{
this
.
checkAll
=
false
;
this
.
userOptions
=
data
.
personList
// console.log(this.userOptions)
}
...
...
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