Commit 68d2a8d7 authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents 78ebfd8a 150845c3
...@@ -197,6 +197,10 @@ export default { ...@@ -197,6 +197,10 @@ export default {
this.currentPage = value; this.currentPage = value;
this.listAction(); this.listAction();
}, },
resetCurrentPage(value = 1) {
this.currentPage = value;
this.listAction();
},
listAction() { listAction() {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer); clearTimeout(this.timer);
......
...@@ -9,6 +9,18 @@ ...@@ -9,6 +9,18 @@
placeholder="请输入消息模板名称/id" placeholder="请输入消息模板名称/id"
></el-input> ></el-input>
</div> </div>
<div class="filter_item" v-if="tpl_types.length > 1">
<span class="filter_title">模板类型:</span>
<el-select v-model="type" placeholder="请选择">
<el-option
v-for="item in tpl_types"
:label="item.name"
:value="item.value"
:key="item.value"
>
</el-option>
</el-select>
</div>
<div class="filter_item"> <div class="filter_item">
<span class="filter_title">最后更新时间:</span> <span class="filter_title">最后更新时间:</span>
<el-date-picker <el-date-picker
...@@ -127,6 +139,10 @@ export default { ...@@ -127,6 +139,10 @@ export default {
type: Boolean, type: Boolean,
defailt: false, defailt: false,
}, },
tmpTypes: {
type: Array,
defailt: [],
},
}, },
data() { data() {
return { return {
...@@ -138,6 +154,7 @@ export default { ...@@ -138,6 +154,7 @@ export default {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
keyword: "", keyword: "",
type: "",
updateTime: "", updateTime: "",
types: [ types: [
{ {
...@@ -161,6 +178,7 @@ export default { ...@@ -161,6 +178,7 @@ export default {
value: 4, value: 4,
}, },
], ],
tpl_types: [],
detail: { detail: {
name: "", name: "",
tpl_type: "", tpl_type: "",
...@@ -234,12 +252,36 @@ export default { ...@@ -234,12 +252,36 @@ export default {
}, },
]; ];
if (this.tmpTypes.length > 0) {
let tpl_types = [];
this.types.forEach((item) => {
if (this.tmpTypes.indexOf(item.value) > -1) {
tpl_types.push(item);
}
});
if (this.tmpTypes.length > 1) {
tpl_types = [
{
name: "全部",
value: this.tmpTypes.join(","),
},
...tpl_types,
];
}
this.tpl_types = tpl_types;
this.type = tpl_types[0].value;
}
this.getTemplateList(); this.getTemplateList();
}, },
methods: { methods: {
getTemplateList() { getTemplateList() {
let params = { let params = {
page: this.currentPage, page: this.currentPage,
tpl_type: this.type,
size: this.pageSize, size: this.pageSize,
keyword: this.keyword, keyword: this.keyword,
update_time_s: (this.updateTime && this.updateTime[0]) || "", update_time_s: (this.updateTime && this.updateTime[0]) || "",
...@@ -287,6 +329,7 @@ export default { ...@@ -287,6 +329,7 @@ export default {
this.getTemplateList(); this.getTemplateList();
}, },
topFilterAction() { topFilterAction() {
this.currentPage = 1;
this.getTemplateList(); this.getTemplateList();
}, },
topFilterClear() { topFilterClear() {
...@@ -358,7 +401,7 @@ export default { ...@@ -358,7 +401,7 @@ export default {
...this.selected, ...this.selected,
content: this.detail.content, content: this.detail.content,
}); });
this.$refs.dialog.hide(); this.$refs.dialog.hide();
}, },
}, },
......
...@@ -268,8 +268,11 @@ export default { ...@@ -268,8 +268,11 @@ export default {
}); });
}); });
}, },
resetCurrentPage() {
this.$refs.list.resetCurrentPage();
},
topFilterAction() { topFilterAction() {
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
topFilterClear() { topFilterClear() {
this.topFilter = { this.topFilter = {
...@@ -279,7 +282,7 @@ export default { ...@@ -279,7 +282,7 @@ export default {
down_time: "", down_time: "",
}; };
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
showDialog() { showDialog() {
this.$refs.dialog.show(); this.$refs.dialog.show();
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
> >
<select-template <select-template
class="apaas_step_content" class="apaas_step_content"
:tmp-types="[1]"
@change="selectTemplate" @change="selectTemplate"
></select-template> ></select-template>
......
...@@ -260,8 +260,11 @@ export default { ...@@ -260,8 +260,11 @@ export default {
}); });
}); });
}, },
resetCurrentPage() {
this.$refs.list.resetCurrentPage();
},
topFilterAction() { topFilterAction() {
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
topFilterClear() { topFilterClear() {
this.topFilter = { this.topFilter = {
...@@ -270,7 +273,7 @@ export default { ...@@ -270,7 +273,7 @@ export default {
push_time: "", push_time: "",
}; };
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
addNew() { addNew() {
this.$router.push("/message/directed_push/add"); this.$router.push("/message/directed_push/add");
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<select-template <select-template
class="apaas_step_content" class="apaas_step_content"
:edit="true" :edit="true"
:tmp-types="[2, 3]"
@change="selectTemplate" @change="selectTemplate"
></select-template> ></select-template>
...@@ -98,7 +99,7 @@ export default { ...@@ -98,7 +99,7 @@ export default {
step: 0, step: 0,
done: false, done: false,
templateId: "", templateId: "",
templateContent:"", templateContent: "",
targetUserIds: "", targetUserIds: "",
}; };
}, },
......
...@@ -33,8 +33,9 @@ ...@@ -33,8 +33,9 @@
<span class="filter_title">状态:</span> <span class="filter_title">状态:</span>
<el-select v-model="topFilter.state" placeholder="请选择"> <el-select v-model="topFilter.state" placeholder="请选择">
<el-option label="全部" value=""> </el-option> <el-option label="全部" value=""> </el-option>
<el-option label="推送成功" value="1"> </el-option> <el-option label="推送成功" value="success"> </el-option>
<el-option label="推送失败" value="0"> </el-option> <el-option label="推送失败" value="fail"> </el-option>
<el-option label="推送中" value="pushing"> </el-option>
</el-select> </el-select>
</div> </div>
<div class="filter_item"> <div class="filter_item">
...@@ -259,8 +260,11 @@ export default { ...@@ -259,8 +260,11 @@ export default {
}); });
}); });
}, },
resetCurrentPage() {
this.$refs.list.resetCurrentPage();
},
topFilterAction() { topFilterAction() {
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
topFilterClear() { topFilterClear() {
this.topFilter = { this.topFilter = {
...@@ -269,7 +273,7 @@ export default { ...@@ -269,7 +273,7 @@ export default {
push_time: "", push_time: "",
}; };
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
addNew() { addNew() {
this.$router.push("/message/message_alert/add"); this.$router.push("/message/message_alert/add");
......
...@@ -235,8 +235,11 @@ export default { ...@@ -235,8 +235,11 @@ export default {
}); });
}); });
}, },
resetCurrentPage() {
this.$refs.list.resetCurrentPage();
},
topFilterAction() { topFilterAction() {
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
topFilterClear() { topFilterClear() {
this.topFilter = { this.topFilter = {
...@@ -245,7 +248,7 @@ export default { ...@@ -245,7 +248,7 @@ export default {
update_time: "", update_time: "",
}; };
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
showDialog() { showDialog() {
this.$refs.dialog.show(); this.$refs.dialog.show();
......
...@@ -196,8 +196,11 @@ export default { ...@@ -196,8 +196,11 @@ export default {
}); });
}); });
}, },
resetCurrentPage() {
this.$refs.list.resetCurrentPage();
},
topFilterAction() { topFilterAction() {
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
topFilterClear() { topFilterClear() {
this.topFilter = { this.topFilter = {
...@@ -206,7 +209,7 @@ export default { ...@@ -206,7 +209,7 @@ export default {
time: "", time: "",
}; };
this.initList(this.tempFilter); this.resetCurrentPage();
}, },
detailAction(item) { detailAction(item) {
this.$router.push( this.$router.push(
......
...@@ -365,6 +365,7 @@ ...@@ -365,6 +365,7 @@
:title="dialogInfo.title" :title="dialogInfo.title"
:msg="dialogInfo.msg" :msg="dialogInfo.msg"
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
:cancelHide="true"
></apass-dialog> ></apass-dialog>
</div> </div>
</template> </template>
...@@ -997,6 +998,7 @@ export default { ...@@ -997,6 +998,7 @@ export default {
this.getOrganization(); this.getOrganization();
} else { } else {
self.is_map = 0; self.is_map = 0;
self.getServiceType1();
} }
}, },
goBack() { goBack() {
...@@ -1076,9 +1078,8 @@ export default { ...@@ -1076,9 +1078,8 @@ export default {
} }
} }
}); });
self.getServiceType1();
self.getArea();
self.judgeMap(); self.judgeMap();
self.getArea();
}, },
}; };
</script> </script>
......
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