[update 动态消息] 动态分类相关调整
This commit is contained in:
@@ -56,18 +56,6 @@ export const StandardSource = {
|
|||||||
ENTERPRISE: { text: '企标', value: '3' }
|
ENTERPRISE: { text: '企标', value: '3' }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 动态分类
|
|
||||||
export const DynamicCataloging = {
|
|
||||||
WEEKLY_NEWSPAPER: { text: '周报', value: '1' },
|
|
||||||
MONTHLY_MAGAZINE: { text: '月报', value: '2' },
|
|
||||||
NOTIFICATION: { text: '通知', value: '3' },
|
|
||||||
IMPLEMENTATION_OF_EARLY_WARNING: { text: '实施预警', value: '4' },
|
|
||||||
SHARE: { text: '分享', value: '5' },
|
|
||||||
DOMESTIC_DYNAMICS: { text: '国内动态', value: '6' },
|
|
||||||
FOREIGN_TRENDS: { text: '国外动态', value: '7' },
|
|
||||||
OTHER: { text: '其他', value: '8' }
|
|
||||||
}
|
|
||||||
|
|
||||||
// 标准法规入库/变更流程-操作类型
|
// 标准法规入库/变更流程-操作类型
|
||||||
export const OperationType = {
|
export const OperationType = {
|
||||||
ENTRY: { text: '入库', value: '1' },
|
ENTRY: { text: '入库', value: '1' },
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
:label="$t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')">
|
:label="$t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')">
|
||||||
<j-dict-select-tag v-decorator="['dynamicClassification', validatorRules.dynamicClassification]"
|
<j-dict-select-tag v-decorator="['dynamicClassification', validatorRules.dynamicClassification]"
|
||||||
dict-code="dynamic_news_type"
|
dict-code="dynamic_news_type"
|
||||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')"
|
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.dynamicMessage.dynamicCataloging')" />
|
||||||
@change="handleCatalogingChange" />
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--来源-->
|
<!--来源-->
|
||||||
@@ -67,9 +66,9 @@
|
|||||||
:label="$t('standardRegulationLibrary.dynamicMessage.dataText')">
|
:label="$t('standardRegulationLibrary.dynamicMessage.dataText')">
|
||||||
<j-upload v-decorator="['dataText', validatorRules.dataText]"
|
<j-upload v-decorator="['dataText', validatorRules.dataText]"
|
||||||
return-id
|
return-id
|
||||||
:number="fileNum"
|
:number="0"
|
||||||
:file-type="fileType"
|
:file-type="fileType"
|
||||||
:multiple="fileNum !== 1" />
|
:multiple="true" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
@@ -95,10 +94,9 @@ import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
|||||||
import UserSelection from '../../../components/selection/UserSelection.vue'
|
import UserSelection from '../../../components/selection/UserSelection.vue'
|
||||||
import UEditor from '../../../components/uEditor/UEditor.vue'
|
import UEditor from '../../../components/uEditor/UEditor.vue'
|
||||||
import { saveDynamicMessage, getDynamicMessageById, releaseDynamicMessage } from '../../../api/standardRegulationLibraryApi.js'
|
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 {
|
export default {
|
||||||
name: 'DynamicMessageFormPage',
|
name: 'DynamicMessageFormPage',
|
||||||
@@ -216,8 +214,7 @@ export default {
|
|||||||
UEDITOR_HOME_URL: '/ueditor/',
|
UEDITOR_HOME_URL: '/ueditor/',
|
||||||
editTableIndex: 1
|
editTableIndex: 1
|
||||||
},
|
},
|
||||||
fileNum: 0, // 动态分类为周报或月报时,控制只能上传一个
|
fileType: CAN_UPLOAD_FILE_TYPE,
|
||||||
fileType: CAN_UPLOAD_FILE_TYPE, // 动态分类为周报或月报时,控制只能上传pdf
|
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 动态标题
|
// 动态标题
|
||||||
dynamicHeading: {
|
dynamicHeading: {
|
||||||
@@ -278,16 +275,8 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.modal = res.result || {}
|
this.modal = res.result || {}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.modal.dynamicClassification === DynamicCataloging.WEEKLY_NEWSPAPER.value || this.modal.dynamicClassification === DynamicCataloging.MONTHLY_MAGAZINE.value) {
|
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||||
this.fileNum = 1
|
this.needWritePushRange = true
|
||||||
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.form.setFieldsValue(this.modal)
|
||||||
this.ueContent = this.modal.dynamicDetails
|
this.ueContent = this.modal.dynamicDetails
|
||||||
this.$refs.uEditor.setContent(this.ueContent)
|
this.$refs.uEditor.setContent(this.ueContent)
|
||||||
@@ -324,18 +313,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCatalogingChange (value) {
|
handleCatalogingChange (value) {
|
||||||
if (value === DynamicCataloging.WEEKLY_NEWSPAPER.value || value === DynamicCataloging.MONTHLY_MAGAZINE.value) {
|
this.fileType = CAN_UPLOAD_FILE_TYPE
|
||||||
this.fileNum = 1
|
this.needWritePushRange = true
|
||||||
this.fileType = 'pdf'
|
this.needWriteDynamicDetails = true
|
||||||
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
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handlePublish () {
|
handlePublish () {
|
||||||
this.form.validateFields((errors, values) => {
|
this.form.validateFields((errors, values) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user