[update 动态消息] 动态分类相关调整
This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
:label="$t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')">
|
||||
<j-dict-select-tag v-decorator="['dynamicClassification', validatorRules.dynamicClassification]"
|
||||
dict-code="dynamic_news_type"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')"
|
||||
@change="handleCatalogingChange" />
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--来源-->
|
||||
@@ -67,9 +66,9 @@
|
||||
:label="$t('standardRegulationLibrary.dynamicMessage.dataText')">
|
||||
<j-upload v-decorator="['dataText', validatorRules.dataText]"
|
||||
return-id
|
||||
:number="fileNum"
|
||||
:number="0"
|
||||
:file-type="fileType"
|
||||
:multiple="fileNum !== 1" />
|
||||
:multiple="true" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
@@ -95,10 +94,9 @@ import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import UserSelection from '../../../components/selection/UserSelection.vue'
|
||||
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'
|
||||
const CAN_UPLOAD_FILE_TYPE = 'pdf,docx,doc,xlsx,xls,ppt,pptx,jpg,jpeg,png'
|
||||
|
||||
export default {
|
||||
name: 'DynamicMessageFormPage',
|
||||
@@ -216,8 +214,7 @@ export default {
|
||||
UEDITOR_HOME_URL: '/ueditor/',
|
||||
editTableIndex: 1
|
||||
},
|
||||
fileNum: 0, // 动态分类为周报或月报时,控制只能上传一个
|
||||
fileType: CAN_UPLOAD_FILE_TYPE, // 动态分类为周报或月报时,控制只能上传pdf
|
||||
fileType: CAN_UPLOAD_FILE_TYPE,
|
||||
validatorRules: {
|
||||
// 动态标题
|
||||
dynamicHeading: {
|
||||
@@ -278,16 +275,8 @@ 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.fileType = CAN_UPLOAD_FILE_TYPE
|
||||
this.needWritePushRange = true
|
||||
this.form.setFieldsValue(this.modal)
|
||||
this.ueContent = this.modal.dynamicDetails
|
||||
this.$refs.uEditor.setContent(this.ueContent)
|
||||
@@ -324,18 +313,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handleCatalogingChange (value) {
|
||||
if (value === DynamicCataloging.WEEKLY_NEWSPAPER.value || value === DynamicCataloging.MONTHLY_MAGAZINE.value) {
|
||||
this.fileNum = 1
|
||||
this.fileType = 'pdf'
|
||||
this.needWritePushRange = false
|
||||
this.needWriteDynamicDetails = false
|
||||
this.form.setFieldsValue({ dataText: undefined })
|
||||
} else {
|
||||
this.fileNum = 0
|
||||
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||
this.needWritePushRange = true
|
||||
this.needWriteDynamicDetails = true
|
||||
}
|
||||
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||
this.needWritePushRange = true
|
||||
this.needWriteDynamicDetails = true
|
||||
},
|
||||
handlePublish () {
|
||||
this.form.validateFields((errors, values) => {
|
||||
|
||||
Reference in New Issue
Block a user