内容发布新增审核功能
This commit is contained in:
@@ -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))
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
11
packages/3.0.0/AppContentInfo/components/Add.vue
vendored
11
packages/3.0.0/AppContentInfo/components/Add.vue
vendored
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
|
||||
@@ -88,7 +88,9 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList()
|
||||
this.dict.load('auditStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核" style="width: 100%;" prop="needExamine" :rules="[{required: true, message: '请选择是否审核', trigger: 'change'}]">
|
||||
<el-radio-group v-model="form.needExamine">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -65,7 +71,8 @@
|
||||
form: {
|
||||
moduleName: '',
|
||||
menuId: '',
|
||||
menuName: ''
|
||||
menuName: '',
|
||||
needExamine: '0'
|
||||
},
|
||||
isShowAdd: false,
|
||||
treeData: [],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="220px" fixed="right" label="操作" align="center">
|
||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
@@ -95,7 +95,8 @@
|
||||
colConfigs: [
|
||||
{ prop: 'moduleName', label: '模块名称', align: 'left', width: '200px' },
|
||||
{ prop: 'menuName', label: '关联菜单', align: 'center' },
|
||||
{ prop: 'categoryStr', label: '文章分类', align: 'center' }
|
||||
{ prop: 'categoryStr', label: '文章分类', align: 'center' },
|
||||
{ prop: 'needExamine', label: '是否审核', align: 'center', formart: v => v === '0' ? '否' : '是' }
|
||||
],
|
||||
cateColConfigs: [
|
||||
{prop: 'categoryName', label: '分类名称', align: 'center'}
|
||||
|
||||
Reference in New Issue
Block a user