Commit afdb080b by Tianqing Liu

feat: 批量操作功能,只有当前组的图片,可以选中

1 parent ba782d7f
......@@ -141,7 +141,7 @@
<!--批量操作-->
<div class="multiple-operation">
<el-button type="text" @click="handleMutipleOperation">
<el-button type="text" @click="handleMutipleOperation(person)">
{{mutipleOperationText}}
<i class="el-icon-arrow-right el-icon--right"></i>
</el-button>
......@@ -607,10 +607,14 @@ export default {
// 批量操作
const isMultipleOperation = ref(false)
const handleMutipleOperation = () => {
const currentMultipleGroupId = ref('') // 当前批量操作的组id
const handleMutipleOperation = (person) => {
isMultipleOperation.value = !isMultipleOperation.value
if (!isMultipleOperation.value) {
selectedPersonList.value = []
currentMultipleGroupId.value = ''
} else {
currentMultipleGroupId.value = person.person_unid
}
}
const mutipleOperationText = computed(() => {
......@@ -730,9 +734,9 @@ export default {
window.open(url)
}
const handleClick = function(data, event){
console.log('handleClick', event)
// 多选
if (isMultipleOperation.value) {
console.log('handleClick', data, event)
// 多选。只有设置为多选状态的组,才可以选中
if (isMultipleOperation.value && currentMultipleGroupId.value === data.person_unid) {
selectedPersonList.value.push(data)
} else {
currentItemId.value = data.id
......@@ -928,6 +932,7 @@ export default {
mutipleOperationText,
mutipleOperationDisabled,
deleteRealPersonRecord,
currentMultipleGroupId,
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!