[update] 文档对比的弹框拆分出来
This commit is contained in:
@@ -231,31 +231,32 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
getList () {
|
||||
const queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
queryParam[val] = queryParam[val].join(',')
|
||||
}
|
||||
})
|
||||
const query = {
|
||||
pageNo: this.ipagination.current,
|
||||
pageSize: this.ipagination.pageSize,
|
||||
...queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length === 0) {
|
||||
this.ipagination.current = 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records || []
|
||||
this.ipagination.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.dataSource = [{ id: 1, serialNumberLeft: '11' }]
|
||||
// const queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
// Object.keys(queryParam).forEach(val => {
|
||||
// if (queryParam[val] instanceof Array) {
|
||||
// queryParam[val] = queryParam[val].join(',')
|
||||
// }
|
||||
// })
|
||||
// const query = {
|
||||
// pageNo: this.ipagination.current,
|
||||
// pageSize: this.ipagination.pageSize,
|
||||
// ...queryParam
|
||||
// }
|
||||
// this.loading = true
|
||||
// getAction(this.url.list, query).then((res) => {
|
||||
// if (res.success) {
|
||||
// if (res.result.current > 1 && res.result.records.length === 0) {
|
||||
// this.ipagination.current = 1
|
||||
// this.getList()
|
||||
// return
|
||||
// }
|
||||
// this.dataSource = res.result.records || []
|
||||
// this.ipagination.total = res.result.total
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
},
|
||||
batchDelete () {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
@@ -263,11 +264,11 @@ export default {
|
||||
content: this.$t('confirmBatchDeletion'),
|
||||
onOk: () => {
|
||||
const idList = []
|
||||
const selectedRowKeysRecord = JSON.parse(JSON.stringify(this.selectedRowKeysRecord))
|
||||
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
|
||||
if (selectedRowKeysRecord[i].createBy === this.userInfoQuery.username &&
|
||||
selectedRowKeysRecord[i].releaseState === 'draft') {
|
||||
idList.push(selectedRowKeysRecord[i].id)
|
||||
const selectedRows = JSON.parse(JSON.stringify(this.selectedRows))
|
||||
for (let i = 0; i < selectedRows.length; i++) {
|
||||
if (selectedRows[i].createBy === this.userInfoQuery.username &&
|
||||
selectedRows[i].releaseState === 'draft') {
|
||||
idList.push(selectedRows[i].id)
|
||||
}
|
||||
}
|
||||
if (idList.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user