[update] 企标更改流程在线编辑
This commit is contained in:
@@ -431,6 +431,8 @@ const queryStandardComplianceEvaluateDetail = (params) => getAction('/process/pr
|
||||
const generateEmptyFileTemplate = (params) => getAction('/onlyOffice/saveEditFile', params)
|
||||
// 在线编辑-通过在线编辑的文件id获取文件信息
|
||||
const queryFileInfoByEditId = (params) => getAction('/onlyOffice/queryById', params)
|
||||
// 在线编辑-过程稿件文件id获取在线编辑文件id
|
||||
const getOnlineFileIdByFileId = (params) => getAction('/onlyOffice/saveEditFileWithOss', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
@@ -649,5 +651,6 @@ export {
|
||||
queryStandardComplianceEvaluateDetail,
|
||||
|
||||
generateEmptyFileTemplate,
|
||||
queryFileInfoByEditId
|
||||
queryFileInfoByEditId,
|
||||
getOnlineFileIdByFileId
|
||||
}
|
||||
|
||||
@@ -393,6 +393,7 @@ export default {
|
||||
param.flowUser = personnelObj
|
||||
param.data = Object.assign({}, data.formInline)
|
||||
param.data.list = data.dataSource
|
||||
param.data.onEditFile = data.onEditFile
|
||||
let func
|
||||
if (this.$route.query.taskId) {
|
||||
// 有taskId说明是驳回的提交
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<p>{{ $t('enterpriseStandard') }}</p>
|
||||
<a-button type="primary" @click="onlineEditView">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -142,7 +142,8 @@ export default {
|
||||
],
|
||||
dataSource: [],
|
||||
loading: false,
|
||||
onEditFile: ''
|
||||
onEditFile: '',
|
||||
documentUrl: window._CONFIG.documentUrl
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -184,9 +185,9 @@ export default {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const filePaths = file.editFilePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -258,6 +258,7 @@ import UpdateListModal from './UpdateListModal'
|
||||
import TextContentModal from '../../../businessSupport/askForAdvice/modules/TextContentModal'
|
||||
import { getEnterpriseStandardInfoById } from '../../../../api/enterpriseStandardLibraryApi'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
import { getOnlineFileIdByFileId } from '@/api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterInitBaseInfo',
|
||||
@@ -455,7 +456,7 @@ export default {
|
||||
await this.getStandardFile(data.standardId)
|
||||
}
|
||||
// 在线编辑
|
||||
this.onEditFile = data.onEditFile || this.standardCanOnlineEditFile
|
||||
this.onEditFile = data.onEditFile
|
||||
const formInline = {}
|
||||
// 更改级别代号
|
||||
formInline.levelCode = data.levelCode
|
||||
@@ -516,8 +517,6 @@ export default {
|
||||
async listChange (value) {
|
||||
console.log(value)
|
||||
await this.getStandardFile(value[0].id)
|
||||
// 在线编辑
|
||||
this.onEditFile = this.onEditFile || this.standardCanOnlineEditFile
|
||||
console.log(this.onEditFile)
|
||||
},
|
||||
// 外层要获取数据
|
||||
@@ -624,7 +623,7 @@ export default {
|
||||
/**
|
||||
* 跳转在线编辑
|
||||
*/
|
||||
toOnlineEditor () {
|
||||
async toOnlineEditor () {
|
||||
// 获取参数(用于自动生成封面)
|
||||
const params = this.$refs.baseInfoForm.getOnlineEditorParams()
|
||||
// 校验必填字段(最后一个字段是企标编号)
|
||||
@@ -632,7 +631,15 @@ export default {
|
||||
const validateResult = this.$refs.baseInfoForm.validateFormByFields(requiredField)
|
||||
if (validateResult) {
|
||||
console.log(this.onEditFile)
|
||||
onlineEditor(params, this.onEditFile)
|
||||
if (this.standardCanOnlineEditFile) {
|
||||
getOnlineFileIdByFileId({ ossFileId: this.standardCanOnlineEditFile }).then(async res => {
|
||||
if (res.success) {
|
||||
this.onEditFile = await onlineEditor(params, res.result.id)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.onEditFile = await onlineEditor(params, this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user