|
@@ -46,22 +46,23 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="信息状态" align="center" prop="status">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.status == 0"><el-tag>草稿</el-tag></span>
|
|
|
+ <span v-if="scope.row.status == 0"><el-tag type="info">草稿</el-tag></span>
|
|
|
<span v-if="scope.row.status == 1"><el-tag type="warning">审核中</el-tag></span>
|
|
|
<span v-if="scope.row.status == 2"><el-tag type="danger">审核驳回</el-tag></span>
|
|
|
<span v-if="scope.row.status == 3"><el-tag type="success">已审核</el-tag></span>
|
|
|
<span v-if="scope.row.status == 4"><el-tag type="success">已上报</el-tag></span>
|
|
|
- <span v-if="scope.row.status == 5"><el-tag type="info">已发布</el-tag></span>
|
|
|
- <span v-if="scope.row.status == 6"><el-tag>已下架</el-tag></span>
|
|
|
+ <span v-if="scope.row.status == 5"><el-tag>已发布</el-tag></span>
|
|
|
+ <span v-if="scope.row.status == 6"><el-tag type="info">已下架</el-tag></span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.status == 4" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:COUNSELINGMESSAGE:remove']">下架</el-button>
|
|
|
- <el-button v-if="scope.row.status == 0 || scope.row.status == 2" size="mini" type="text" v-hasPermi="['business:COUNSELINGMESSAGE:remove']" @click="handleCommit(scope.row)">提交审核</el-button>
|
|
|
- <el-button v-if="scope.row.status == 0 || scope.row.status == 2 || scope.row.status == 5" size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:COUNSELINGMESSAGE:remove']">修改</el-button>
|
|
|
- <el-button v-if="scope.row.status == 5 || scope.row.status == 3" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:COUNSELINGMESSAGE:remove']">发布</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 5" size="mini" type="text" @click="handleDownOrUp(scope.row)">下架</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0 || scope.row.status == 2" size="mini" type="text" @click="handleCommit(scope.row)">提交审核</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 3" size="mini" type="text" @click="handleDownOrUp(scope.row)">上报</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 6 || scope.row.status == 4" size="mini" type="text" @click="handleDownOrUp(scope.row)">发布</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0 || scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 4 || scope.row.status == 5 || scope.row.status == 6" size="mini" type="text" @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -92,8 +93,9 @@ export default {
|
|
|
{ label: '审核中', value: 1 },
|
|
|
{ label: '审核驳回', value: 2 },
|
|
|
{ label: '已审核', value: 3 },
|
|
|
- { label: '已发布', value: 4 },
|
|
|
- { label: '已下架', value: 5 },
|
|
|
+ { label: '已上报', value: 4 },
|
|
|
+ { label: '已发布', value: 5 },
|
|
|
+ { label: '已下架', value: 6 },
|
|
|
],
|
|
|
// 根路径
|
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
@@ -157,23 +159,30 @@ export default {
|
|
|
/** 发布 */
|
|
|
handleDownOrUp(row) {
|
|
|
//修改发布、下架状态
|
|
|
-
|
|
|
- if (row.status == '4' || row.status == '3') {
|
|
|
+ if (row.status == '5') {
|
|
|
//已发布 已审核
|
|
|
- row.status = '5';
|
|
|
+ row.status = '6';
|
|
|
updateCOUNSELINGMESSAGE(row).then(response => {
|
|
|
this.$modal.msgSuccess('下架成功');
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
- } else if (row.status == '5') {
|
|
|
+ } else if (row.status == '4'|| row.status == '6') {
|
|
|
//已下架
|
|
|
- row.status = '4';
|
|
|
+ row.status = '5';
|
|
|
updateCOUNSELINGMESSAGE(row).then(response => {
|
|
|
this.$modal.msgSuccess('发布成功');
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
+ } else if (row.status == '3') {
|
|
|
+ //已上报
|
|
|
+ row.status = '4';
|
|
|
+ updateCOUNSELINGMESSAGE(row).then(response => {
|
|
|
+ this.$modal.msgSuccess('上报成功');
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
/** 提交审核 */
|