mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-03-01 07:25:39 +08:00
通知媒介增加任务队列查看功能
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
Vue.component("menu-item", {
|
||||
props: ["href", "active", "code"],
|
||||
data: function () {
|
||||
var active = this.active
|
||||
let active = this.active
|
||||
if (typeof (active) == "undefined") {
|
||||
var itemCode = ""
|
||||
if (typeof (window.TEA.ACTION.data.firstMenuItem) != "undefined") {
|
||||
@@ -18,8 +18,19 @@ Vue.component("menu-item", {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let href = (this.href == null) ? "" : this.href
|
||||
if (typeof (href) == "string" && href.length > 0 && href.startsWith(".")) {
|
||||
let qIndex = href.indexOf("?")
|
||||
if (qIndex >= 0) {
|
||||
href = Tea.url(href.substring(0, qIndex)) + href.substring(qIndex)
|
||||
} else {
|
||||
href = Tea.url(href)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
vHref: (this.href == null) ? "" : this.href,
|
||||
vHref: href,
|
||||
vActive: active
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
<menu-item href="/admins/recipients/groups" code="group">接收人分组</menu-item>
|
||||
<menu-item href="/admins/recipients/instances" code="instance">媒介</menu-item>
|
||||
<menu-item href="/admins/recipients/logs" code="log">发送记录</menu-item>
|
||||
<menu-item href="/admins/recipients/tasks" code="task">任务队列</menu-item>
|
||||
</first-menu>
|
||||
|
||||
37
web/views/@default/admins/recipients/tasks/index.html
Normal file
37
web/views/@default/admins/recipients/tasks/index.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{$layout}
|
||||
{$template "../menu"}
|
||||
|
||||
<second-menu>
|
||||
<menu-item href=".?status=0" :active="status == 0">等待发送({{countWaiting}})</menu-item>
|
||||
<menu-item href=".?status=3" :active="status == 3">发送错误({{countFailed}})</menu-item>
|
||||
</second-menu>
|
||||
|
||||
|
||||
<p class="comment" v-if="tasks.length == 0">暂时还没有发送任务。</p>
|
||||
|
||||
<div v-if="tasks.length > 0">
|
||||
<div class="margin"></div>
|
||||
<table class="ui table selectable definition" v-for="task in tasks">
|
||||
<tr>
|
||||
<td class="title">简介</td>
|
||||
<td>
|
||||
{{task.user}} <span class="disabled"> | </span> <span v-if="task.instance != null">媒介:{{task.instance.name}}<link-icon :href="'/admins/recipients/instances/instance?instanceId=' + task.instance.id"></link-icon></span>
|
||||
<span class="disabled"> | </span> 时间:{{task.createdTime}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="task.subject.length > 0">
|
||||
<td>标题</td>
|
||||
<td>{{task.subject}}</td>
|
||||
</tr>
|
||||
<tr v-if="task.body.length > 0">
|
||||
<td>内容</td>
|
||||
<td>{{task.body}}</td>
|
||||
</tr>
|
||||
<tr v-if="task.status == 3 && task.result != null && !task.result.isOk" class="error">
|
||||
<td>错误信息</td>
|
||||
<td>{{task.result.error}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="page" v-html="page"></div>
|
||||
Reference in New Issue
Block a user