bug 78148
This commit is contained in:
@@ -77,6 +77,9 @@ import UEditor from '../../../components/uEditor/UEditor.vue'
|
||||
import { saveDynamicMessage, getDynamicMessageById, releaseDynamicMessage } from '../../../api/standardRegulationLibraryApi.js'
|
||||
import { DynamicCataloging } from '../../../enums/commonEnums.js'
|
||||
|
||||
// 本系统限制可以上传的文件格式
|
||||
const CAN_UPLOAD_FILE_TYPE = 'pdf,docx,doc,xlsx,xls,ppt,pptx,rar,.zip,jpg,jpeg,png,avi,wmv,mov,rm,mp4,cad'
|
||||
|
||||
export default {
|
||||
name: 'DynamicMessageFormPage',
|
||||
components: { UEditor, InternalDetailPage, UserSelection },
|
||||
@@ -194,7 +197,7 @@ export default {
|
||||
editTableIndex: 1
|
||||
},
|
||||
fileNum: 0, // 动态分类为周报或月报时,控制只能上传一个
|
||||
fileType: 'all', // 动态分类为周报或月报时,控制只能上传pdf
|
||||
fileType: CAN_UPLOAD_FILE_TYPE, // 动态分类为周报或月报时,控制只能上传pdf
|
||||
validatorRules: {
|
||||
// 动态标题
|
||||
dynamicHeading: {
|
||||
@@ -247,6 +250,16 @@ export default {
|
||||
if (res.success) {
|
||||
this.modal = res.result || {}
|
||||
this.$nextTick(() => {
|
||||
if (this.modal.dynamicClassification === DynamicCataloging.WEEKLY_NEWSPAPER.value || this.modal.dynamicClassification === DynamicCataloging.MONTHLY_MAGAZINE.value) {
|
||||
this.fileNum = 1
|
||||
this.fileType = 'pdf'
|
||||
this.needWritePushRange = false
|
||||
this.needWriteDynamicDetails = false
|
||||
} else {
|
||||
this.fileNum = 0
|
||||
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||
this.needWritePushRange = true
|
||||
}
|
||||
this.form.setFieldsValue(this.modal)
|
||||
this.ueContent = this.modal.dynamicDetails
|
||||
this.$refs.uEditor.setContent(this.ueContent)
|
||||
@@ -291,7 +304,7 @@ export default {
|
||||
this.form.setFieldsValue({ dataText: undefined })
|
||||
} else {
|
||||
this.fileNum = 0
|
||||
this.fileType = 'all'
|
||||
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||
this.needWritePushRange = true
|
||||
this.needWriteDynamicDetails = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user