故障审核和广告审核完善
This commit is contained in:
parent
f2692ef3aa
commit
d03ee7792f
|
@ -42,3 +42,12 @@ export function delAd(adId) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function handleAudit(data){
|
||||||
|
return request({
|
||||||
|
url: '/bst/ad/handle',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="跳转链接" prop="url">
|
<el-form-item label="跳转链接" prop="url">
|
||||||
|
@ -65,6 +65,11 @@
|
||||||
<dict-tag :options="dict.type.ad_url_type" :value="scope.row.urlType"/>
|
<dict-tag :options="dict.type.ad_url_type" :value="scope.row.urlType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="url" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
@ -72,10 +77,18 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-view"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
v-has-permi="['bst:ad:edit']"
|
v-hasPermi="['bst:ad:edit']">
|
||||||
>修改</el-button>
|
{{ 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
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -94,6 +107,62 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@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>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
@ -145,24 +214,25 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listAd, getAd, delAd, addAd, updateAd } from "@/api/bst/ad";
|
import { listAd, getAd, delAd, addAd, updateAd } from "@/api/bst/ad";
|
||||||
import { $showColumns } from '@/utils/mixins';
|
import { $showColumns } from '@/utils/mixins';
|
||||||
import FormCol from "@/components/FormCol/index.vue";
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
||||||
import {isSysAdmin} from "@/utils/permission";
|
import {isSysAdmin} from "@/utils/permission";
|
||||||
|
import {handleAudit} from "@/api/bst/ad";
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
prop: "createTime",
|
prop: "createTime",
|
||||||
order: "descending"
|
order: "descending"
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Ad",
|
name: "Ad",
|
||||||
dicts:['ad_type','ad_url_type','ad_belong'],
|
dicts:['ad_type','ad_url_type','ad_belong','ad_audit_status'],
|
||||||
props:{
|
props:{
|
||||||
id: {
|
id: {
|
||||||
type: [String, Number],
|
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: '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: '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: '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: '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},
|
//{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,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
|
detailVisible: false, // 控制详情弹窗显示
|
||||||
|
detailForm: {}, // 详情数据存储
|
||||||
|
verifyRemark: '',
|
||||||
// 广告表格数据
|
// 广告表格数据
|
||||||
adList: [],
|
adList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
|
@ -233,6 +307,33 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
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,
|
isSysAdmin,
|
||||||
/** 当排序按钮被点击时触发 **/
|
/** 当排序按钮被点击时触发 **/
|
||||||
onSortChange(column) {
|
onSortChange(column) {
|
||||||
|
@ -277,6 +378,17 @@ export default {
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
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() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -349,5 +461,5 @@ export default {
|
||||||
}, `ad_${new Date().getTime()}.xlsx`)
|
}, `ad_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user