[update] 修改bug81845
This commit is contained in:
+30
-4
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled @typeOfRevisionChange="typeOfRevisionChange"></base-info-form>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -48,6 +48,8 @@ import CommentModal from './CommentModal'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
import { getStandardEditFileByNo } from '../../../../api/workCenter'
|
||||
import { ProjectType } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterCollectBaseInfo',
|
||||
@@ -155,7 +157,8 @@ export default {
|
||||
{ value: '2', label: '部分采纳' },
|
||||
{ value: '3', label: '不采纳' }
|
||||
],
|
||||
onEditFile: '' // 在线编辑文件id
|
||||
onEditFile: '', // 在线编辑文件id
|
||||
standardCanOnlineEditFile: '' // 修订的时候企标本身可以带进在线编辑的文件
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -184,6 +187,7 @@ export default {
|
||||
const data = {}
|
||||
data.advices = this.dataSource
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||
data.onEditFile = this.onEditFile
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -203,9 +207,27 @@ export default {
|
||||
data = false
|
||||
} else {
|
||||
data.advices = this.dataSource
|
||||
data.onEditFile = this.onEditFile
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 获取标准本身的文件
|
||||
async getStandardFile (standardNum) {
|
||||
await getStandardEditFileByNo({ standardNo: standardNum }).then(res => {
|
||||
if (res.success) {
|
||||
const fileId = res.result ? res.result.id : ''
|
||||
this.standardCanOnlineEditFile = fileId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 制修订类型改变
|
||||
typeOfRevisionChange (val, originStandardNum) {
|
||||
if (val === ProjectType.ENACT.value) {
|
||||
this.standardCanOnlineEditFile = ''
|
||||
} else if (val === ProjectType.MODIFY.value) {
|
||||
this.getStandardFile(originStandardNum)
|
||||
}
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
},
|
||||
@@ -254,10 +276,14 @@ export default {
|
||||
/**
|
||||
* 跳转在线编辑
|
||||
*/
|
||||
toOnlineEditor () {
|
||||
async toOnlineEditor () {
|
||||
// 获取参数(用于自动生成封面)
|
||||
const params = this.$refs.baseInfoForm.getOnlineEditorParams()
|
||||
onlineEditor(params, this.onEditFile)
|
||||
if (!this.onEditFile) {
|
||||
this.onEditFile = await onlineEditor(params, this.standardCanOnlineEditFile || '')
|
||||
} else {
|
||||
onlineEditor(params, this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-4
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled @typeOfRevisionChange="typeOfRevisionChange"></base-info-form>
|
||||
<div v-if="drafterDataSource && drafterDataSource.length > 0">
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
@@ -179,6 +179,8 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
import CheckContentProcessModal from './CheckContentProcessModal'
|
||||
import { getStandardEditFileByNo } from '../../../../api/workCenter'
|
||||
import { ProjectType } from '../../../../enums/commonEnums'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
@@ -337,7 +339,8 @@ export default {
|
||||
image: false,
|
||||
imageUrl: '',
|
||||
uploadName: '',
|
||||
onEditFile: '' // 在线编辑的文件id
|
||||
onEditFile: '', // 在线编辑的文件id
|
||||
standardCanOnlineEditFile: '' // 修订的时候企标本身可以带进在线编辑的文件
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -371,6 +374,7 @@ export default {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource || []
|
||||
data.onEditFile = this.onEditFile
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -384,6 +388,7 @@ export default {
|
||||
// 有数据可以抛出
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource || []
|
||||
data.onEditFile = this.onEditFile
|
||||
} else {
|
||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||
data = false
|
||||
@@ -391,6 +396,7 @@ export default {
|
||||
} else if (this.formInline.inspectFlag === '0') {
|
||||
// 有数据可以抛出
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
@@ -401,6 +407,23 @@ export default {
|
||||
})
|
||||
return data
|
||||
},
|
||||
// 获取标准本身的文件
|
||||
async getStandardFile (standardNum) {
|
||||
await getStandardEditFileByNo({ standardNo: standardNum }).then(res => {
|
||||
if (res.success) {
|
||||
const fileId = res.result ? res.result.id : ''
|
||||
this.standardCanOnlineEditFile = fileId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 制修订类型改变
|
||||
typeOfRevisionChange (val, originStandardNum) {
|
||||
if (val === ProjectType.ENACT.value) {
|
||||
this.standardCanOnlineEditFile = ''
|
||||
} else if (val === ProjectType.MODIFY.value) {
|
||||
this.getStandardFile(originStandardNum)
|
||||
}
|
||||
},
|
||||
handleDraftTableChange (pagination) {
|
||||
this.draftIpagination = pagination
|
||||
},
|
||||
@@ -513,10 +536,14 @@ export default {
|
||||
/**
|
||||
* 跳转在线编辑
|
||||
*/
|
||||
toOnlineEditor () {
|
||||
async toOnlineEditor () {
|
||||
// 获取参数(用于自动生成封面)
|
||||
const params = this.$refs.baseInfoForm.getOnlineEditorParams()
|
||||
onlineEditor(params, this.onEditFile)
|
||||
if (!this.onEditFile) {
|
||||
this.onEditFile = await onlineEditor(params, this.standardCanOnlineEditFile || '')
|
||||
} else {
|
||||
onlineEditor(params, this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-4
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled @typeOfRevisionChange="typeOfRevisionChange"></base-info-form>
|
||||
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="form-flex-box">
|
||||
@@ -60,6 +60,8 @@
|
||||
<script>
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
import { getStandardEditFileByNo } from '../../../../api/workCenter'
|
||||
import { ProjectType } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterPublishBaseInfo',
|
||||
@@ -92,7 +94,8 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
onEditFile: '' // 在线编辑的文件id
|
||||
onEditFile: '', // 在线编辑的文件id
|
||||
standardCanOnlineEditFile: '' // 修订的时候企标本身可以带进在线编辑的文件
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -119,6 +122,7 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -137,9 +141,11 @@ export default {
|
||||
data = false
|
||||
} else {
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
}
|
||||
} else {
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
}
|
||||
} else {
|
||||
data = false
|
||||
@@ -147,14 +153,35 @@ export default {
|
||||
})
|
||||
return data
|
||||
},
|
||||
// 获取标准本身的文件
|
||||
async getStandardFile (standardNum) {
|
||||
await getStandardEditFileByNo({ standardNo: standardNum }).then(res => {
|
||||
if (res.success) {
|
||||
const fileId = res.result ? res.result.id : ''
|
||||
this.standardCanOnlineEditFile = fileId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 制修订类型改变
|
||||
typeOfRevisionChange (val, originStandardNum) {
|
||||
if (val === ProjectType.ENACT.value) {
|
||||
this.standardCanOnlineEditFile = ''
|
||||
} else if (val === ProjectType.MODIFY.value) {
|
||||
this.getStandardFile(originStandardNum)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 跳转在线编辑
|
||||
*/
|
||||
toOnlineEditor () {
|
||||
async toOnlineEditor () {
|
||||
// 获取参数(用于自动生成封面)
|
||||
const params = this.$refs.baseInfoForm.getOnlineEditorParams()
|
||||
params.processId = this.$route.query.processInstanceId
|
||||
onlineEditor(params, this.onEditFile)
|
||||
if (!this.onEditFile) {
|
||||
this.onEditFile = await onlineEditor(params, this.standardCanOnlineEditFile || '')
|
||||
} else {
|
||||
onlineEditor(params, this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+30
-5
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled @typeOfRevisionChange="typeOfRevisionChange"></base-info-form>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="form-flex-box">
|
||||
<!-- 会议纪要 -->
|
||||
@@ -171,9 +171,10 @@
|
||||
import BaseInfoForm from './BaseInfoForm'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
import { StandardGradeClassify } from '@/enums/commonEnums'
|
||||
import { StandardGradeClassify, ProjectType } from '@/enums/commonEnums'
|
||||
import { getStandardGradeClassification } from '../../../../api/enterpriseStandardLibraryApi'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
import { getStandardEditFileByNo } from '../../../../api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'MainDrafterUploadMinuteBaseInfo',
|
||||
@@ -249,7 +250,8 @@ export default {
|
||||
authDeptDisabled: false, // 授权部门不可编辑
|
||||
departSelectRange: [], // 授权部门的可选项
|
||||
standardGradeClassification: [], // 企标级别映射数据
|
||||
onEditFile: '' // 在线编辑的文件id
|
||||
onEditFile: '', // 在线编辑的文件id
|
||||
standardCanOnlineEditFile: '' // 修订的时候企标本身可以带进在线编辑的文件
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -313,6 +315,7 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -321,12 +324,30 @@ export default {
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.onEditFile = this.onEditFile
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
// 获取标准本身的文件
|
||||
async getStandardFile (standardNum) {
|
||||
await getStandardEditFileByNo({ standardNo: standardNum }).then(res => {
|
||||
if (res.success) {
|
||||
const fileId = res.result ? res.result.id : ''
|
||||
this.standardCanOnlineEditFile = fileId
|
||||
}
|
||||
})
|
||||
},
|
||||
// 制修订类型改变
|
||||
typeOfRevisionChange (val, originStandardNum) {
|
||||
if (val === ProjectType.ENACT.value) {
|
||||
this.standardCanOnlineEditFile = ''
|
||||
} else if (val === ProjectType.MODIFY.value) {
|
||||
this.getStandardFile(originStandardNum)
|
||||
}
|
||||
},
|
||||
// 获取企标级别映射数据
|
||||
getStandardGradeClassificationArr () {
|
||||
getStandardGradeClassification().then(res => {
|
||||
@@ -359,10 +380,14 @@ export default {
|
||||
/**
|
||||
* 跳转在线编辑
|
||||
*/
|
||||
toOnlineEditor () {
|
||||
async toOnlineEditor () {
|
||||
// 获取参数(用于自动生成封面)
|
||||
const params = this.$refs.baseInfoForm.getOnlineEditorParams()
|
||||
onlineEditor(params, this.onEditFile)
|
||||
if (!this.onEditFile) {
|
||||
this.onEditFile = await onlineEditor(params, this.standardCanOnlineEditFile || '')
|
||||
} else {
|
||||
onlineEditor(params, this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user