[update] 文档对比的弹框拆分出来

This commit is contained in:
lideqin
2023-08-22 16:12:33 +08:00
parent 0c65e30e98
commit ca8d334c45
9 changed files with 276 additions and 225 deletions
+31 -30
View File
@@ -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) {