通知公告新增封面

This commit is contained in:
QuAoLi 2022-03-11 17:59:35 +08:00
parent c6f8452f8d
commit 3d0c74cc5d
2 changed files with 13 additions and 1 deletions

View File

@ -79,6 +79,7 @@
<a-select-option :value="1">新闻资讯</a-select-option>
<a-select-option :value="2">公告详情</a-select-option>
<a-select-option :value="3">通知</a-select-option>
<a-select-option :value="4">必读文件</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
@ -98,6 +99,13 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="上传封面图">
<db-upload v-model="fileList2" type="img" max="1"></db-upload>
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="上传附件">
@ -153,6 +161,7 @@ export default {
content: ''
},
fileList: [],
fileList2: [],
timeShow: true,
classHourShow: true,
rules: {
@ -189,6 +198,7 @@ export default {
// form.publishTime = moment(form.publishTime)
this.form = form
this.fileList = JSON.parse(res.data.file)
this.fileList2 = JSON.parse(res.data.cover)
})
},
save() {
@ -203,6 +213,7 @@ export default {
form.isNowPublish = 0
}
form.file = JSON.stringify(this.fileList)
form.cover = JSON.stringify(this.fileList2)
noticeAdd(form).then(res => {
if (res.code === 200) {
this.$message.success('操作成功')

View File

@ -175,7 +175,8 @@
const typeMap = {
1: '新闻资讯',
2: '公告详情',
3: '通知'
3: '通知',
4: '必读公告'
}
return typeMap[type]
},