|
|
|
@ -557,8 +557,6 @@ |
|
|
|
<el-table |
|
|
|
:height="this.height + 300" |
|
|
|
:data="copyDocumentList" |
|
|
|
ref="copyDocumentTable" |
|
|
|
stripe |
|
|
|
border |
|
|
|
@selection-change="selectionCopyDocument" |
|
|
|
style="width: 100%;"> |
|
|
|
@ -659,6 +657,7 @@ |
|
|
|
import {EventBus} from "../../../main"; |
|
|
|
import {getSiteAndBuByUserName} from "../../../api/qc/qc"; |
|
|
|
import {updateColumnSize} from "../../../api/table"; |
|
|
|
import {uploadFileList} from '@/api/base/baseFunction.js'; |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
// 增加一个 prop 用于区分是否在模态框中展示 |
|
|
|
@ -1397,18 +1396,7 @@ |
|
|
|
this.documentSelection = val |
|
|
|
}, |
|
|
|
selectionCopyDocument(selection) { |
|
|
|
if (selection.length > 1) { |
|
|
|
// 只保留最后选择的那一行 |
|
|
|
const lastRow = selection[selection.length - 1]; |
|
|
|
// 清除所有选择 |
|
|
|
this.$refs.copyDocumentTable.clearSelection(); |
|
|
|
// 选中最后一次选择的那一行 |
|
|
|
this.$refs.copyDocumentTable.toggleRowSelection(lastRow, true); |
|
|
|
// 如有需要,可以将选中行存储到一个 data 变量中 |
|
|
|
this.documentCopySelection = [lastRow]; |
|
|
|
} else { |
|
|
|
this.documentCopySelection = selection; |
|
|
|
} |
|
|
|
}, |
|
|
|
//初始化组件的参数 |
|
|
|
init(inData,authUpdate) { |
|
|
|
@ -2109,7 +2097,6 @@ |
|
|
|
partDesc: this.searchData.partDesc, |
|
|
|
}; |
|
|
|
this.copyDialog = true |
|
|
|
console.log(this.copyModalData) |
|
|
|
}, |
|
|
|
searchCopyDocumentFileList() { |
|
|
|
getCopyDocumentFileList(this.copyModalData).then(({data}) => { |
|
|
|
@ -2127,12 +2114,6 @@ |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} else if (this.documentCopySelection.length > 1) { |
|
|
|
this.$message({ |
|
|
|
message: '只能选择一个文档', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.copyModalData.conclusion === '' || this.copyModalData.conclusion === null || |
|
|
|
this.copyModalData.conclusion === undefined) { |
|
|
|
@ -2142,34 +2123,39 @@ |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
const inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
ossId: this.documentCopySelection[0].ossId, |
|
|
|
proofingId: this.copyModalData.proofingId, |
|
|
|
projectId: this.copyModalData.projectId, |
|
|
|
projectPartId: this.copyModalData.projectPartId, |
|
|
|
documentDefinitionListId: this.copyModalData.documentDefinitionListId, |
|
|
|
conclusion: this.copyModalData.conclusion, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
const inDataList = this.documentCopySelection.map(item => ({ |
|
|
|
ossId: item.ossId, |
|
|
|
orderRef1: this.$store.state.user.site, |
|
|
|
orderRef2: this.copyModalData.proofingId.toString(), |
|
|
|
orderRef3: this.copyModalData.documentDefinitionListId, |
|
|
|
orderRef4: this.copyModalData.projectId.toString(), |
|
|
|
orderRef5: this.copyModalData.projectPartId.toString(), |
|
|
|
documentDesc: this.copyModalData.documentTypeId, |
|
|
|
cAdditionalInfo: this.copyModalData.documentType, |
|
|
|
conclusion: this.copyModalData.conclusion, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
folder: (this.copyModalData.proofingId === -1) |
|
|
|
? 'projectPMPDocumentFiles' |
|
|
|
: 'projectPPDocumentFiles' |
|
|
|
})); |
|
|
|
uploadFileList('/upload/testList',inDataList).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '复制成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.getProofDocument() |
|
|
|
this.copyDialog = false |
|
|
|
//刷新表格 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: '复制失败', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
copyDocumentFileToDoc(inData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '复制成功', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.getProofDocument() |
|
|
|
this.copyDialog = false |
|
|
|
//刷新表格 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: '复制失败', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeCopyDocumentFileFlag() { |
|
|
|
this.copyDialog = false |
|
|
|
|