Commit f63f75ce authored by 徐一鸣's avatar 徐一鸣

定向推送列表详情调试

parent a8d5eb68
...@@ -68,13 +68,80 @@ ...@@ -68,13 +68,80 @@
<apass-dialog <apass-dialog
ref="dialog" ref="dialog"
:msg="dialogInfo.msg" width="800"
:cancel-text="dialogInfo.cancelText" title="查看"
:cancel-type="dialogInfo.cancelType" @cancel="cancelAction"
:cancel="dialogInfo.cancel" @submit="submitAction"
:sunbmit-text="dialogInfo.sunbmitText" >
:submit="dialogInfo.submit" <div class="detail_dialog" slot="content">
></apass-dialog> <div class="detail_item">
<p class="item_title">
消息模板名称:
</p>
<p class="item_content">
服务定向推送的消息
</p>
</div>
<div class="detail_item">
<p class="item_title">
模板类型:
</p>
<p class="item_content">
服务推送
</p>
</div>
<div class="detail_item full_line">
<p class="item_title">
消息详情:
</p>
<div class="full_content">
<div class="apass_scroll">
<p class="item_content">
亲爱的用户,根据您最近的服务调用情况,我们向您推荐
地图视频融合服务,贵州应急资源地图微服务,欢迎使用!
产品说这里最多可以输入500字。
</p>
</div>
</div>
</div>
<div class="detail_item full_line">
<p class="item_title">
目标用户:
</p>
<div class="full_content">
<div class="apass_scroll">
<p class="item_content">
贵阳市公安局,贵阳市水利局,内马尔,勒布朗詹姆斯
</p>
</div>
</div>
</div>
<div class="detail_item">
<p class="item_title">
推送时间:
</p>
<p class="item_content">
2020-04-30 12:34:56
</p>
</div>
<div class="detail_item">
<p class="item_title">
推送状态:
</p>
<p class="item_content">
推送成功
</p>
</div>
<div class="detail_item">
<p class="item_title">
推送流水号:
</p>
<p class="item_content">
propelling2020001
</p>
</div>
</div>
</apass-dialog>
</div> </div>
</template> </template>
...@@ -108,6 +175,7 @@ export default { ...@@ -108,6 +175,7 @@ export default {
push_time: "", push_time: "",
}, },
tempFilter: null, tempFilter: null,
templateDetail: null,
}), }),
created() { created() {
this.listHeader = [ this.listHeader = [
...@@ -116,40 +184,37 @@ export default { ...@@ -116,40 +184,37 @@ export default {
prop: "state", prop: "state",
type: "image-tooltip", type: "image-tooltip",
getImage(item) { getImage(item) {
return item.state == 1 return [
? require("@/assets/imgs/ic_true.png") require("@/assets/imgs/ic_failed.png"),
: require("@/assets/imgs/ic_failed.png"); require("@/assets/imgs/ic_true.png"),
require("@/assets/imgs/ic_pushing.png"),
][item.state || 0];
}, },
getTooltip(item) { getTooltip(item) {
return item.state == 1 ? "推送成功" : "推送失败"; return ["推送失败", "推送成功", "推送中"][item.state || 0];
}, },
align: "center", align: "center",
width: 60, width: 60,
}, },
{ {
label: "推送流水号", label: "推送流水号",
prop: "push_num", prop: "id",
width: 240, width: 240,
}, },
{ {
label: "消息模板名称", label: "消息模板名称",
prop: "name", prop: "tpl_name",
type: "button", type: "button",
callback: this.detailAction, callback: this.detailAction,
width: 300, width: 300,
}, },
{ {
label: "消息详情", label: "消息详情",
prop: "detail", prop: "contents",
}, },
{ {
label: "接收用户", label: "接收用户",
prop: "users", prop: "receive_user",
getText(item) {
let users = item.users || [];
return users.join("");
},
width: 300, width: 300,
}, },
{ {
...@@ -220,7 +285,46 @@ export default { ...@@ -220,7 +285,46 @@ export default {
console.log("新建模板"); console.log("新建模板");
}, },
detailAction(item) { detailAction(item) {
console.log(`查看${item.name}`); this.$http
.get(`/apaas/service/v3/push/directmsg/view/${item.id}`)
.then(({ data }) => {
if (data.success == 1) {
let detail = data.data;
this.templateDetail = {
tpl_name: detail.tpl_name,
tpl_type: ["", "服务推送", "平台维护", "版本更新", "自动消息"][
detail.tpl_type || 0
],
contents: "",
create_user: "",
id: "",
push_time: "",
receive_user: "",
state: "",
tpl_id: "",
};
this.$refs.dialog.show();
} else {
this.$message({
message: data.errMsg || "获取详情失败",
type: "warning",
});
}
})
.catch((error) => {
console.log(error);
this.$message({
message: "获取详情失败",
type: "warning",
});
});
},
cancelAction() {
this.$refs.dialog.hide();
},
submitAction() {
this.$refs.dialog.hide();
}, },
}, },
}; };
...@@ -230,4 +334,40 @@ export default { ...@@ -230,4 +334,40 @@ export default {
.list_container { .list_container {
height: 100%; height: 100%;
} }
.detail_dialog {
display: flex;
flex-wrap: wrap;
text-align: left;
}
.detail_dialog .detail_item {
flex: 1 1 auto;
width: 50%;
margin-top: 20px;
}
.detail_dialog .detail_item.full_line {
width: 100%;
}
.detail_dialog .detail_item p {
padding: 0 15px;
font-size: 14px;
line-height: 22px;
color: #8890a7;
}
.detail_dialog .detail_item .item_content {
color: #000;
margin-top: 10px;
}
.detail_dialog .detail_item .full_content {
padding: 10px 0;
border-radius: 8px;
background-color: #f8f9fd;
margin-top: 5px;
}
.detail_dialog .detail_item .full_content > .apass_scroll {
height: 176px;
overflow: auto;
}
.detail_dialog .detail_item .full_content .item_content {
margin: 0;
}
</style> </style>
...@@ -985,7 +985,7 @@ export default { ...@@ -985,7 +985,7 @@ export default {
pic: require("@/assets/imgs/home_tool_ic_lcsj.png"), pic: require("@/assets/imgs/home_tool_ic_lcsj.png"),
bg: "#e6ebfe", bg: "#e6ebfe",
color: "#515fe7", color: "#515fe7",
url: "https://apaas.wodcloud.com/lcgl/index.html#/", url: "https://apaas-nologo.wodcloud.com/lcgl/index.html#/",
target: 1 target: 1
}, },
{ {
......
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