fix 拆分已入库文本改成可以批量拆分
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
rowKey="id"
|
||||
:loading="loading"
|
||||
:scroll="{x: '100%'}"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'checkbox' }"
|
||||
:pagination="ipagination"
|
||||
@change="handleTableChange">
|
||||
</j-table>
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/laws/DocumentTool/documentSplit/querySplitFileInfoByPage', // 表格数据
|
||||
list: '/laws/DocumentTool/documentSplit/querySplitFileInfoByPage' // 表格数据
|
||||
},
|
||||
type: 'pdfdoc',
|
||||
operationList: [],
|
||||
@@ -161,36 +161,23 @@ export default {
|
||||
this.$message.warning(this.$t('selectOne'))
|
||||
return
|
||||
}
|
||||
const file = this.selectionRows[0]
|
||||
console.log(file)
|
||||
if (file.fileName) {
|
||||
const name = file.fileName.split('.')
|
||||
const nameSuffix = name[name.length - 1]
|
||||
if (nameSuffix.toLowerCase() === 'doc' || nameSuffix.toLowerCase() === 'docx') {
|
||||
const params = {
|
||||
fileId: file.id,
|
||||
standardId: file.standardId,
|
||||
serialNumber: file.standardNumber,
|
||||
title: file.standardName,
|
||||
fileType: file.standardFileType,
|
||||
fileName: file.fileName
|
||||
}
|
||||
this.loading = true
|
||||
addDocSplit(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.onClose()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('docTool.split.onlyWord'))
|
||||
}
|
||||
// 最多同时拆分十条
|
||||
if (this.selectedRowKeys.length > 10) {
|
||||
this.$message.warning(this.$t('docTool.split.maximumSelection') + '10' + this.$t('docTool.split.pieceOfData'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
addDocSplit({ ids: this.selectedRowKeys.join(',') }).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('operationSuccessful'))
|
||||
this.onClose()
|
||||
} else {
|
||||
this.messageLineFeedByBr(this.$t('operationFailed'), res.message)
|
||||
}
|
||||
this.$emit('ok')
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user