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 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)
|
const getDocSplitTableHeader = (params) => getAction('/clause/split/getCommonHeader', params)
|
||||||
// 文档拆分编辑-查询条件
|
// 文档拆分编辑-查询条件
|
||||||
|
|||||||
@@ -476,7 +476,9 @@ module.exports = {
|
|||||||
addQuantity: '添加数量',
|
addQuantity: '添加数量',
|
||||||
enterQuantity: '请输入数量',
|
enterQuantity: '请输入数量',
|
||||||
numberRows: '行数',
|
numberRows: '行数',
|
||||||
numberColumns: '列数'
|
numberColumns: '列数',
|
||||||
|
maximumSelection:'最多选择',
|
||||||
|
pieceOfData:'条数据'
|
||||||
},
|
},
|
||||||
// 文档比对
|
// 文档比对
|
||||||
comparison: {
|
comparison: {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
rowKey="id"
|
rowKey="id"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{x: '100%'}"
|
:scroll="{x: '100%'}"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'checkbox' }"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
</j-table>
|
</j-table>
|
||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: '/laws/DocumentTool/documentSplit/querySplitFileInfoByPage', // 表格数据
|
list: '/laws/DocumentTool/documentSplit/querySplitFileInfoByPage' // 表格数据
|
||||||
},
|
},
|
||||||
type: 'pdfdoc',
|
type: 'pdfdoc',
|
||||||
operationList: [],
|
operationList: [],
|
||||||
@@ -161,36 +161,23 @@ export default {
|
|||||||
this.$message.warning(this.$t('selectOne'))
|
this.$message.warning(this.$t('selectOne'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const file = this.selectionRows[0]
|
// 最多同时拆分十条
|
||||||
console.log(file)
|
if (this.selectedRowKeys.length > 10) {
|
||||||
if (file.fileName) {
|
this.$message.warning(this.$t('docTool.split.maximumSelection') + '10' + this.$t('docTool.split.pieceOfData'))
|
||||||
const name = file.fileName.split('.')
|
return
|
||||||
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'))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
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