Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
59fd6433c0
|
@ -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,17 +45,12 @@
|
||||||
|
|
||||||
<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"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属运营区" align="center" prop="area_name">
|
<el-table-column label="所属运营区" align="center" prop="areaName">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.areaName || '-' }}</span>
|
<span>{{ scope.row.areaName || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,11 +97,20 @@
|
||||||
|
|
||||||
<!-- 添加或修改广告对话框 -->
|
<!-- 添加或修改广告对话框 -->
|
||||||
<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" v-loading="detailLoading">
|
||||||
<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"
|
||||||
|
:init-options="initAreaOptions"
|
||||||
|
v-if="!detailLoading"
|
||||||
|
placeholder="请选择运营区"
|
||||||
|
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 = {
|
||||||
|
@ -175,8 +161,14 @@ const defaultSort = {
|
||||||
export default {
|
export default {
|
||||||
name: "Ad",
|
name: "Ad",
|
||||||
dicts:['ad_type','ad_url_type','ad_belong'],
|
dicts:['ad_type','ad_url_type','ad_belong'],
|
||||||
|
props:{
|
||||||
|
id: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
},
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
components: {FormCol},
|
components: {AreaRemoteSelect, FormCol},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
span: 24,
|
span: 24,
|
||||||
|
@ -227,12 +219,19 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
detailLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
initAreaOptions() {
|
||||||
|
return [{id: this.form.areaId, name: this.form.areaName}]
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isSysAdmin,
|
||||||
/** 当排序按钮被点击时触发 **/
|
/** 当排序按钮被点击时触发 **/
|
||||||
onSortChange(column) {
|
onSortChange(column) {
|
||||||
if (column.order == null) {
|
if (column.order == null) {
|
||||||
|
@ -262,6 +261,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,
|
||||||
|
@ -301,10 +301,13 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const adId = row.adId || this.ids
|
const adId = row.adId || this.ids
|
||||||
|
this.detailLoading = true;
|
||||||
getAd(adId).then(response => {
|
getAd(adId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改广告";
|
this.title = "修改广告";
|
||||||
|
}).finally(() => {
|
||||||
|
this.detailLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|
|
@ -117,20 +117,19 @@
|
||||||
|
|
||||||
<!-- 添加或修改协议对话框 -->
|
<!-- 添加或修改协议对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false">
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" v-loading="detailLoading">
|
||||||
<el-row>
|
<el-form-item :span="24" label="标题" prop="title">
|
||||||
<form-col :span="24" label="标题" prop="title">
|
|
||||||
<el-input v-model="form.title" placeholder="请输入标题" />
|
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||||
</form-col>
|
</el-form-item>
|
||||||
<form-col label="运营区" prop="areaId">
|
<el-form-item label="运营区" prop="areaId" >
|
||||||
<area-remote-select
|
<area-remote-select
|
||||||
v-model="form.areaId"
|
v-model="form.areaId"
|
||||||
|
:init-options="initAreaOptions"
|
||||||
|
v-if="!detailLoading"
|
||||||
placeholder="请选择运营区"
|
placeholder="请选择运营区"
|
||||||
clearable
|
style="width: 58%"
|
||||||
@change="handleQuery"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
/>
|
||||||
</form-col>
|
</el-form-item>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<form-col label="协议类型" prop="agreementType">
|
<form-col label="协议类型" prop="agreementType">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -168,8 +167,6 @@
|
||||||
<form-col :span="span" label="内容详情">
|
<form-col :span="span" label="内容详情">
|
||||||
<editor v-model="form.content" :min-height="200"/>
|
<editor v-model="form.content" :min-height="200"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
@ -185,6 +182,7 @@ import { $showColumns } from '@/utils/mixins';
|
||||||
import FormCol from "@/components/FormCol/index.vue";
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
import Editor from "@/components/Editor/index.vue";
|
import Editor from "@/components/Editor/index.vue";
|
||||||
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
prop: "createTime",
|
prop: "createTime",
|
||||||
|
@ -286,6 +284,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
detailLoading: false,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
|
@ -294,6 +293,11 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
initAreaOptions() {
|
||||||
|
return [{id: this.form.areaId, name: this.form.areaName}]
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
@ -328,6 +332,7 @@ export default {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
storeId: null,
|
storeId: null,
|
||||||
|
areaName:null,
|
||||||
areaId: null,
|
areaId: null,
|
||||||
title: null,
|
title: null,
|
||||||
brief: null,
|
brief: null,
|
||||||
|
@ -365,10 +370,13 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
|
this.detailLoading = true
|
||||||
getAgreement(id).then(response => {
|
getAgreement(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改协议";
|
this.title = "修改协议";
|
||||||
|
}).finally(()=>{
|
||||||
|
this.detailLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user