[update] 修改bug79075
This commit is contained in:
@@ -170,6 +170,7 @@ module.exports = {
|
||||
addATable: '请添加一个表格',
|
||||
select: '选择',
|
||||
attach: '附件',
|
||||
checkedAll: '全选',
|
||||
// 树右键
|
||||
treeRight: {
|
||||
addFolder: 'Create New Folder',
|
||||
|
||||
@@ -173,6 +173,7 @@ module.exports = {
|
||||
addATable: '请添加一个表格',
|
||||
select: '选择',
|
||||
attach: '附件',
|
||||
checkedAll: '全选',
|
||||
// 树右键
|
||||
treeRight: {
|
||||
addFolder: '新增文件夹',
|
||||
|
||||
@@ -10,8 +10,11 @@
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<template v-if="model && Object.keys(model).length > 0">
|
||||
<a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange">
|
||||
{{ $t('checkedAll') }}
|
||||
</a-checkbox>
|
||||
<div class="content-wrapper" ref="contentWrapper" @scroll="contentWrapperScroll">
|
||||
<a-checkbox-group @change="onCheckChange">
|
||||
<a-checkbox-group v-model="checkedArr" @change="onCheckChange">
|
||||
<template v-for="(item, key) in model">
|
||||
<p :key="key" class="time-p">{{ isCurrentDate(key) ? '最近' : key }}</p>
|
||||
<div v-for="arrItem in item" :key="arrItem.id" class="search-value-div">
|
||||
@@ -55,6 +58,8 @@ export default {
|
||||
width: 500,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
indeterminate: false,
|
||||
checkAll: false,
|
||||
model: {},
|
||||
page: {
|
||||
pageNo: 1,
|
||||
@@ -70,7 +75,7 @@ export default {
|
||||
open () {
|
||||
this.page = {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
pages: 0
|
||||
}
|
||||
@@ -116,6 +121,7 @@ export default {
|
||||
}
|
||||
this.page.pages = res.result.pages
|
||||
this.page.total = res.result.total
|
||||
this.indeterminate = !!this.checkedArr.length && this.checkedArr.length < this.dataList.length
|
||||
for (const item of res.result.records) {
|
||||
const modelKeys = Object.keys(this.model)
|
||||
if (!modelKeys.includes(item.createTime)) {
|
||||
@@ -131,7 +137,17 @@ export default {
|
||||
},
|
||||
// 多选变化
|
||||
onCheckChange (checkedValue) {
|
||||
console.log(checkedValue)
|
||||
this.checkedArr = checkedValue
|
||||
this.indeterminate = !!checkedValue.length && checkedValue.length < this.dataList.length
|
||||
this.checkAll = checkedValue.length === this.dataList.length
|
||||
},
|
||||
// 全选变化
|
||||
onCheckAllChange (e) {
|
||||
console.log(e)
|
||||
this.checkedArr = e.target.checked ? this.dataList.map(item => item.id) : []
|
||||
this.indeterminate = false
|
||||
this.checkAll = e.target.checked
|
||||
},
|
||||
// 删除
|
||||
handleDelete (id) {
|
||||
@@ -145,6 +161,8 @@ export default {
|
||||
this.model = {}
|
||||
this.dataList = []
|
||||
this.initData(1)
|
||||
this.indeterminate = !!this.checkedArr.length && this.checkedArr.length < this.dataList.length
|
||||
this.checkAll = this.checkedArr.length === this.dataList.length
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
@@ -159,6 +177,8 @@ export default {
|
||||
this.model = {}
|
||||
this.dataList = []
|
||||
this.initData(1)
|
||||
this.indeterminate = !!this.checkedArr.length && this.checkedArr.length < this.dataList.length
|
||||
this.checkAll = this.checkedArr.length > 0 && this.checkedArr.length === this.dataList.length
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
@@ -170,6 +190,8 @@ export default {
|
||||
this.model = {}
|
||||
this.dataList = []
|
||||
this.checkedArr = []
|
||||
this.indeterminate = false
|
||||
this.checkAll = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user