内容发布新增审核功能

This commit is contained in:
yanran200730
2022-03-18 14:30:56 +08:00
parent af65ba44ab
commit e67e0fbb82
6 changed files with 43 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
<template>
<ai-list v-if="!isShowDetail">
<template slot="title">
<ai-title :title="moduleName" :isShowBottomBorder="false" :isShowArea="currIndex === '0'" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
<ai-title :title="moduleName" :isShowBottomBorder="false" :isShowArea="true" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
</template>
<template slot="tabs">
<el-tabs v-model="currIndex">
@@ -66,9 +66,9 @@
this.moduleName = res.data.moduleName
this.tabs = [
{label: this.moduleName, name: 'List', comp: List, permission: ''},
{label: `${this.moduleName}审核`, name: 'Audit', comp: Audit, permission: ''}
{label: `${this.moduleName}审核`, name: 'Audit', comp: Audit, permission: 'app_appcontentinfo_examine'}
].filter(item => {
return true
return item.name !== 'Audit' || (res.data.needExamine === '1' && item.name === 'Audit' && this.permissions(item.permission))
})
}
})

View File

@@ -135,7 +135,8 @@
}
],
isHideCoverimg: false,
cateList: []
cateList: [],
needExamine: '0'
}
},
@@ -162,7 +163,6 @@
this.form.pictureUrl = res.data.pictureUrl ? [{
url: res.data.pictureUrl
}] : []
}
})
},
@@ -171,6 +171,7 @@
this.instance.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.$route.query.moduleId}`).then(res => {
if (res.code === 0) {
this.isHideCoverimg = res.data.styleType === '0'
this.needExamine = res.data.needExamine
}
})
},
@@ -254,7 +255,11 @@
pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : ''
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')
if (this.needExamine === '1') {
this.$message.success('提交成功,等待管理员审核')
} else {
this.$message.success('提交成功')
}
setTimeout(() => {
this.cancel(true)
}, 600)

View File

@@ -3,6 +3,12 @@
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<ai-select
v-model="search.examineStatus"
@change="search.current = 1, getList()"
placeholder="审核状态"
:selectList="dict.getDict('auditStatus')">
</ai-select>
</template>
<template #right>
<el-input
@@ -54,7 +60,7 @@
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0', message: '请输入审核意见' }]">
<el-form-item v-if="form.pass === '0'" label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0', message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
@@ -80,7 +86,8 @@
search: {
current: 1,
size: 10,
title: ''
title: '',
examineStatus: ''
},
form: {
opinion: '',
@@ -92,6 +99,8 @@
colConfigs: [
{ prop: 'title', label: '标题', align: 'left', width: '200px' },
{ prop: 'areaName', label: '地区', align: 'left' },
{ prop: 'examineStatus', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
{ prop: 'examineOpinion', label: '信息', align: 'center' },
{ prop: 'createUserName', label: '发布人', align: 'center' },
{ prop: 'createTime', label: '发布时间', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
@@ -106,8 +115,10 @@
...mapState(['user'])
},
created() {
this.getList()
created () {
this.dict.load('auditStatus').then(() => {
this.getList()
})
},
methods: {
@@ -116,7 +127,8 @@
params: {
moduleId: this.$route.query.moduleId,
...this.search,
areaId: this.areaId
areaId: this.areaId,
queryType: 1
}
}).then(res => {
if (res.code == 0) {
@@ -127,6 +139,7 @@
},
onStatusChange () {
this.form.opinion = ''
this.$refs.form.clearValidate()
},

View File

@@ -88,7 +88,9 @@
},
created() {
this.getList()
this.dict.load('auditStatus').then(() => {
this.getList()
})
},
methods: {