Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop

This commit is contained in:
18571350067 2022-03-11 18:16:11 +08:00
commit 9447a05919
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="1">新闻资讯</a-select-option>
<a-select-option :value="2">公告详情</a-select-option> <a-select-option :value="2">公告详情</a-select-option>
<a-select-option :value="3">通知</a-select-option> <a-select-option :value="3">通知</a-select-option>
<a-select-option :value="4">必读文件</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -98,6 +99,13 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </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-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="上传附件"> <a-form-model-item label="上传附件">
@ -153,6 +161,7 @@ export default {
content: '' content: ''
}, },
fileList: [], fileList: [],
fileList2: [],
timeShow: true, timeShow: true,
classHourShow: true, classHourShow: true,
rules: { rules: {
@ -189,6 +198,7 @@ export default {
// form.publishTime = moment(form.publishTime) // form.publishTime = moment(form.publishTime)
this.form = form this.form = form
this.fileList = JSON.parse(res.data.file) this.fileList = JSON.parse(res.data.file)
this.fileList2 = JSON.parse(res.data.cover)
}) })
}, },
save() { save() {
@ -203,6 +213,7 @@ export default {
form.isNowPublish = 0 form.isNowPublish = 0
} }
form.file = JSON.stringify(this.fileList) form.file = JSON.stringify(this.fileList)
form.cover = JSON.stringify(this.fileList2)
noticeAdd(form).then(res => { noticeAdd(form).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('操作成功') this.$message.success('操作成功')

View File

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