故障审核和广告审核完善
This commit is contained in:
parent
f2692ef3aa
commit
d03ee7792f
|
@ -42,3 +42,12 @@ export function delAd(adId) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function handleAudit(data){
|
||||
return request({
|
||||
url: '/bst/ad/handle',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
<dict-tag :options="dict.type.ad_url_type" :value="scope.row.urlType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ad_audit_status" :value="scope.row.auditStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跳转链接" align="center" prop="url" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
@ -72,10 +77,18 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-has-permi="['bst:ad:edit']"
|
||||
>修改</el-button>
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['bst:ad:edit']">
|
||||
{{ scope.row.auditStatus === '1' ? '审核' : '查看详情' }}
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-has-permi="['bst:ad:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -94,6 +107,62 @@
|
|||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 在index.vue的template中添加弹窗结构 -->
|
||||
<el-dialog
|
||||
:title="`广告详情`"
|
||||
:visible.sync="detailVisible"
|
||||
width="800px"
|
||||
append-to-body>
|
||||
|
||||
<!-- 申请信息区块 -->
|
||||
<div class="info-section">
|
||||
<el-descriptions title="申报信息" :column="2" border>
|
||||
<el-descriptions-item label="广告所属">
|
||||
<dict-tag :options="dict.type.ad_belong" :value="detailForm.belong"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属运营区">{{ detailForm.areaName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="广告图片" :span="2">
|
||||
<image-preview :src="detailForm.picture" :width="200" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="跳转链接" :span="24">{{ detailForm.url }}</el-descriptions-item>
|
||||
<el-descriptions-item label="跳转类型" :span="2">
|
||||
<dict-tag :options="dict.type.ad_url_type" :value="detailForm.urlType"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核状态">
|
||||
<dict-tag :value="detailForm.auditStatus" :options="dict.type.ad_audit_status"/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<!-- 审核区块 -->
|
||||
<template v-if="detailForm.auditStatus === '1'">
|
||||
<el-divider />
|
||||
<div class="verify-area">
|
||||
<el-input
|
||||
v-model="verifyRemark"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入审核意见"
|
||||
style="margin:20px 0"
|
||||
/>
|
||||
<div class="dialog-footer" style="display: flex; justify-content: flex-end; gap: 10px;">
|
||||
<el-button type="danger" @click="reject" v-hasPermi="['bst:ad:edit']">驳 回</el-button>
|
||||
<el-button type="success" @click="audit" v-hasPermi="['bst:ad:edit']">通 过</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="['0','2'].includes(detailForm.auditStatus)">
|
||||
<el-divider />
|
||||
<el-descriptions title="审核信息" :column="1" border>
|
||||
<el-descriptions-item label="审核人">{{ detailForm.verifyName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ detailForm.verifyEndTime || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见">
|
||||
<pre style="white-space: pre-wrap;">{{ detailForm.verifyRemark || '无' }}</pre>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
<!-- 添加或修改广告对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
|
@ -153,6 +222,7 @@ import { $showColumns } from '@/utils/mixins';
|
|||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
||||
import {isSysAdmin} from "@/utils/permission";
|
||||
import {handleAudit} from "@/api/bst/ad";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -162,7 +232,7 @@ const defaultSort = {
|
|||
|
||||
export default {
|
||||
name: "Ad",
|
||||
dicts:['ad_type','ad_url_type','ad_belong'],
|
||||
dicts:['ad_type','ad_url_type','ad_belong','ad_audit_status'],
|
||||
props:{
|
||||
id: {
|
||||
type: [String, Number],
|
||||
|
@ -182,6 +252,7 @@ export default {
|
|||
{key: 'picture', visible: true, label: '广告图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'url', visible: true, label: '跳转链接', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'auditStatus', visible: true, label: '审核状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
//{key: 'deleted', visible: true, label: '逻辑删除标志,0否,1是', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
//{key: 'urlType', visible: true, label: '跳转类型,1外链跳转,2站内跳转', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
|
@ -199,6 +270,9 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
detailVisible: false, // 控制详情弹窗显示
|
||||
detailForm: {}, // 详情数据存储
|
||||
verifyRemark: '',
|
||||
// 广告表格数据
|
||||
adList: [],
|
||||
// 弹出层标题
|
||||
|
@ -233,6 +307,33 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 审核驳回
|
||||
reject() {
|
||||
this.handleVerify(false);
|
||||
},
|
||||
// 审核通过
|
||||
audit() {
|
||||
this.handleVerify(true);
|
||||
},
|
||||
// 处理审核
|
||||
handleVerify(Pass) {
|
||||
if (!this.verifyRemark) {
|
||||
this.$message.warning('请填写审核意见');
|
||||
return;
|
||||
}
|
||||
const action = Pass ? '通过' : '驳回';
|
||||
this.$modal.confirm(`确认${action}该申请吗?`).then(() => {
|
||||
handleAudit({
|
||||
id: this.detailForm.adId,
|
||||
pass: Pass, // true表示通过,false表示驳回
|
||||
verifyRemark: this.verifyRemark
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(`${action}成功`);
|
||||
this.detailVisible = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
isSysAdmin,
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
|
@ -277,6 +378,17 @@ export default {
|
|||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 查看详情 */
|
||||
handleView(row) {
|
||||
this.loading = true;
|
||||
getAd(row.adId).then(response => {
|
||||
this.detailForm = response.data;
|
||||
this.detailVisible = true;
|
||||
this.verifyRemark = '';
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user