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