广告功能和协议完善

This commit is contained in:
SjS 2025-04-09 20:36:59 +08:00
parent 837a201bcc
commit 3d031b4278

View File

@ -11,17 +11,6 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="广告类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择广告类型" @change="handleQuery">
<el-option
v-for="dict in dict.type.ad_type"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -40,15 +29,6 @@
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-has-permi="['bst:ad:remove']"-->
<!-- >删除</el-button>-->
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -65,11 +45,6 @@
<el-table v-loading="loading" :data="adList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange"> <el-table v-loading="loading" :data="adList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="广告类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.ad_type" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="广告所属" align="center" prop="belong"> <el-table-column label="广告所属" align="center" prop="belong">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.ad_belong" :value="scope.row.belong"/> <dict-tag :options="dict.type.ad_belong" :value="scope.row.belong"/>
@ -123,10 +98,19 @@
<!-- 添加或修改广告对话框 --> <!-- 添加或修改广告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item label="广告类型" prop="type"> <el-form-item label="运营区" prop="areaId">
<el-select v-model="form.type" placeholder="请选择广告类型"> <area-remote-select
v-model="form.areaId"
placeholder="请选择运营区"
clearable
@change="handleQuery"
style="width: 58%"
/>
</el-form-item>
<el-form-item label="广告所属" prop="belong" v-if="isSysAdmin()">
<el-select v-model="form.belong" placeholder="请选择广告所属">
<el-option <el-option
v-for="dict in dict.type.ad_type" v-for="dict in dict.type.ad_belong"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -165,6 +149,8 @@
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 {isSysAdmin} from "@/utils/permission";
// //
const defaultSort = { const defaultSort = {
@ -176,7 +162,7 @@ export default {
name: "Ad", name: "Ad",
dicts:['ad_type','ad_url_type','ad_belong'], dicts:['ad_type','ad_url_type','ad_belong'],
mixins: [$showColumns], mixins: [$showColumns],
components: {FormCol}, components: {AreaRemoteSelect, FormCol},
data() { data() {
return { return {
span: 24, span: 24,
@ -233,6 +219,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
isSysAdmin,
/** 当排序按钮被点击时触发 **/ /** 当排序按钮被点击时触发 **/
onSortChange(column) { onSortChange(column) {
if (column.order == null) { if (column.order == null) {
@ -262,6 +249,7 @@ export default {
reset() { reset() {
this.form = { this.form = {
adId: null, adId: null,
areaId: null,
type: null, type: null,
picture: null, picture: null,
url: null, url: null,