Commit 7ca842f5 authored by 徐一鸣's avatar 徐一鸣

消息管理列表fixed

parent 9f85bf27
......@@ -26,6 +26,7 @@
<el-input
v-model="topFilter.name"
placeholder="请输入banner关键词"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
<div class="filter_item">
......@@ -106,7 +107,7 @@ export default {
msg: "",
submit: null,
},
useItem:'',
useItem: "",
topFilter: {
name: "",
state: "",
......@@ -143,7 +144,7 @@ export default {
{
label: "banner编码",
prop: "serial_num",
width: 180,
width: 200,
},
{
label: "banner名称",
......@@ -230,24 +231,23 @@ export default {
...filter,
...this.topFilter,
};
let params = {
page: fullFilter.page,
size: fullFilter.size,
state: fullFilter.state,
name: fullFilter.name,
up_time_s: fullFilter.up_time ? fullFilter.up_time[0] : "",
up_time_e: fullFilter.up_time ? fullFilter.up_time[1] : "",
down_time_s: fullFilter.down_time ? fullFilter.down_time[0] : "",
down_time_e: fullFilter.down_time ? fullFilter.down_time[1] : "",
};
this.tempFilter = filter; // filter存档,用于页面刷新
console.log(fullFilter);
// console.log(params);
this.$http
.get("/apaas/service/v3/recommend/manage/banners/list", {
params: {
page: fullFilter.page,
size: fullFilter.size,
state: fullFilter.state,
name: fullFilter.name,
up_time_s: fullFilter.up_time ? fullFilter.up_time[0] : "",
up_time_e: fullFilter.up_time ? fullFilter.up_time[1] : "",
down_time_s: fullFilter.down_time ? fullFilter.down_time[0] : "",
down_time_e: fullFilter.down_time ? fullFilter.down_time[1] : "",
},
})
.get("/apaas/service/v3/recommend/manage/banners/list", { params })
.then(({ data }) => {
if (data.success == 1) {
this.listTotal = data.data.total;
......@@ -293,28 +293,28 @@ export default {
editAction(item) {
this.$router.push("/message/banner_edit?id=" + item.serial_num);
},
upActionBtn(item){
upActionBtn(item) {
this.useItem = item;
this.dialogInfo={
this.dialogInfo = {
msg: "是否上架到首页banner区域",
submit: this.upAction,
}
};
this.$refs.dialog.show();
},
deleteActionBtn(item){
deleteActionBtn(item) {
this.useItem = item;
this.dialogInfo={
this.dialogInfo = {
msg: "删除后无法撤销,您确定删除吗",
submit: this.deleteAction,
}
};
this.$refs.dialog.show();
},
downActionBtn(item){
downActionBtn(item) {
this.useItem = item;
this.dialogInfo={
this.dialogInfo = {
msg: "下架后首页banner区域将不再显示",
submit: this.downAction,
}
};
this.$refs.dialog.show();
},
upAction() {
......
......@@ -26,6 +26,7 @@
<el-input
v-model="topFilter.name"
placeholder="请输入消息模板名称"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
<div class="filter_item">
......@@ -222,13 +223,17 @@ export default {
},
methods: {
initList(filter) {
let fullFilter = {
...filter,
...this.topFilter,
};
let params = {
page: filter.page,
size: filter.size,
page: fullFilter.page,
size: fullFilter.size,
tplname: this.topFilter.name,
state: this.topFilter.state,
time_s: (this.topFilter.push_time && this.topFilter.push_time[0]) || "",
time_e: (this.topFilter.push_time && this.topFilter.push_time[1]) || "",
state: fullFilter.state,
time_s: (fullFilter.push_time && fullFilter.push_time[0]) || "",
time_e: (fullFilter.push_time && fullFilter.push_time[1]) || "",
};
// console.log(params);
......
......@@ -26,6 +26,7 @@
<el-input
v-model="topFilter.name"
placeholder="请输入消息模板名称"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
<div class="filter_item">
......@@ -221,13 +222,17 @@ export default {
},
methods: {
initList(filter) {
let fullFilter = {
...filter,
...this.topFilter,
};
let params = {
page: filter.page,
size: filter.size,
tplname: this.topFilter.name,
state: this.topFilter.state,
time_s: (this.topFilter.push_time && this.topFilter.push_time[0]) || "",
time_e: (this.topFilter.push_time && this.topFilter.push_time[1]) || "",
page: fullFilter.page,
size: fullFilter.size,
tplname: fullFilter.name,
state: fullFilter.state,
time_s: (fullFilter.push_time && fullFilter.push_time[0]) || "",
time_e: (fullFilter.push_time && fullFilter.push_time[1]) || "",
};
// console.log(params);
......@@ -269,7 +274,7 @@ export default {
this.initList(this.tempFilter);
},
addNew() {
this.$router.push("/message/message_alert/add")
this.$router.push("/message/message_alert/add");
},
detailAction(item) {
this.$http
......
......@@ -26,6 +26,7 @@
<el-input
v-model="topFilter.name"
placeholder="请输入消息模板名称/id"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
<div class="filter_item">
......
......@@ -26,6 +26,7 @@
<el-input
v-model="topFilter.name"
placeholder="请输入推荐位名称"
@keyup.enter.native="topFilterAction"
></el-input>
</div>
<div class="filter_item">
......@@ -156,15 +157,17 @@ export default {
},
methods: {
initList(filter) {
let fullFilter = {
...filter,
...this.topFilter,
};
let params = {
page: filter.page,
size: filter.size,
name: this.topFilter.name,
state: this.topFilter.state,
uptime_s:
(this.topFilter.update_time && this.topFilter.update_time[0]) || "",
uptime_e:
(this.topFilter.update_time && this.topFilter.update_time[1]) || "",
page: fullFilter.page,
size: fullFilter.size,
name: fullFilter.name,
state: fullFilter.state,
uptime_s: (fullFilter.time && fullFilter.time[0]) || "",
uptime_e: (fullFilter.time && fullFilter.time[1]) || "",
};
// console.log(params);
......@@ -206,10 +209,22 @@ export default {
this.initList(this.tempFilter);
},
detailAction(item) {
this.$router.push('/message/recommended/edit?ad_type='+item.ad_type+'&id='+item.id+'&look=1')
this.$router.push(
"/message/recommended/edit?ad_type=" +
item.ad_type +
"&id=" +
item.id +
"&look=1"
);
},
editAction(item) {
this.$router.push('/message/recommended/edit?ad_type='+item.ad_type+'&id='+item.id+'&look=2')
this.$router.push(
"/message/recommended/edit?ad_type=" +
item.ad_type +
"&id=" +
item.id +
"&look=2"
);
},
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment