[update] 修改选人组件的全选

This commit is contained in:
lideqin
2024-02-23 09:14:11 +08:00
parent 35ed990a05
commit 80fb11dd9a
4 changed files with 28 additions and 40 deletions
@@ -210,11 +210,8 @@ export default {
this.loadData()
},
methods: {
async open (value) {
open (value) {
this.visible = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
if (value) {
this.selectedRowKeys = value.split(',')
@@ -272,16 +269,16 @@ export default {
this.queryParam = {}
this.loadData()
},
async searchQuery () {
searchQuery () {
this.isClickedSearch = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
},
// 获取用户左侧树列表
loadData () {
async loadData () {
this.loadingLeft = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
const params = Object.assign({}, this.queryParam)
params.pageNo = this.ipagination.current
params.pageSize = this.ipagination.pageSize
@@ -142,6 +142,7 @@ export default {
},
currentQueryAllData: {
immediate: true,
deep: true,
handler (val) {
console.log(this.currentQueryAllData)
const arrOne = this.currentQueryAllData.map(item => item.id)
@@ -235,11 +236,8 @@ export default {
this.loadData()
},
methods: {
async open (value) {
open (value) {
this.visible = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
if (value) {
this.selectedRowKeys = value.split(',')
@@ -300,16 +298,16 @@ export default {
this.queryParam = {}
this.loadData()
},
async searchQuery () {
searchQuery () {
this.isClickedSearch = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
},
// 获取用户左侧树列表
loadData () {
async loadData () {
this.loadingLeft = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
const params = Object.assign({}, this.queryParam)
params.pageNo = this.ipagination.current
params.pageSize = this.ipagination.pageSize
@@ -169,6 +169,7 @@ export default {
},
currentQueryAllData: {
immediate: true,
deep: true,
handler (val) {
console.log(this.currentQueryAllData)
const arrOne = this.currentQueryAllData.map(item => item.userId)
@@ -265,11 +266,8 @@ export default {
this.loadData()
},
methods: {
async open (value) {
open (value) {
this.visible = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
if (value) {
this.selectedRowKeys = value.split(',')
@@ -287,13 +285,10 @@ export default {
})
},
// 左侧树点击选中
async treeSelect (selectedKeys) {
treeSelect (selectedKeys) {
console.log(selectedKeys)
this.currentTreeNode = selectedKeys
this.queryParam.workingGroupId = selectedKeys[0]
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
},
// 获取左侧树数据
@@ -368,16 +363,16 @@ export default {
this.queryParam = {}
this.loadData()
},
async searchQuery () {
searchQuery () {
this.isClickedSearch = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
},
// 获取用户左侧树列表
loadData () {
async loadData () {
this.loadingLeft = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
const params = Object.assign({}, this.queryParam)
params.pageNo = this.ipagination.current
params.pageSize = this.ipagination.pageSize
+7 -9
View File
@@ -144,6 +144,7 @@ export default {
},
currentQueryAllData: {
immediate: true,
deep: true,
handler (val) {
console.log(this.currentQueryAllData)
const arrOne = this.currentQueryAllData.map(item => item.id)
@@ -232,12 +233,9 @@ export default {
}
},
methods: {
async open (value) {
open (value) {
this.getSysCategoryTree()
this.initRoleList()
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData()
this.visible = true
if (value) {
@@ -318,16 +316,16 @@ export default {
this.queryParam = {}
this.loadData(1)
},
async searchQuery () {
searchQuery () {
this.isClickedSearch = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
this.loadData(1)
},
// 获取用户左侧树列表
loadData (arg) {
async loadData (arg) {
this.loadingLeft = true
if (this.type === 'checkbox') {
await this.getCurrentAllData()
}
if (arg) {
this.ipagination.current = 1
}