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

消息管理列表fixed

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