fix 拆分已入库文本改成可以批量拆分
This commit is contained in:
@@ -13,7 +13,7 @@ const previewDocSplit = (params) => postAction('/laws/DocumentTool/documentSplit
|
||||
const importSplitResult = (params) => postForParams('/split/sarFileSplitItems/importSplitResult', params)
|
||||
|
||||
// 文档拆分-拆分已入库文本-拆分
|
||||
const addDocSplit = (params) => postAction('/laws/DocumentTool/documentSplit/split', params)
|
||||
const addDocSplit = (params) => postAction('/laws/DocumentTool/documentSplit/batchSplit', params)
|
||||
// 文档拆分编辑-表头
|
||||
const getDocSplitTableHeader = (params) => getAction('/clause/split/getCommonHeader', params)
|
||||
// 文档拆分编辑-查询条件
|
||||
|
||||
@@ -476,7 +476,9 @@ module.exports = {
|
||||
addQuantity: '添加数量',
|
||||
enterQuantity: '请输入数量',
|
||||
numberRows: '行数',
|
||||
numberColumns: '列数'
|
||||
numberColumns: '列数',
|
||||
maximumSelection:'最多选择',
|
||||
pieceOfData:'条数据'
|
||||
},
|
||||
// 文档比对
|
||||
comparison: {
|
||||
|
||||
@@ -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