节点运行日志可以按照节点ID设置为已读

This commit is contained in:
刘祥超
2022-08-25 18:27:15 +08:00
parent 7852495527
commit 32cfd5c233
4 changed files with 27 additions and 0 deletions

View File

@@ -52,6 +52,7 @@
<second-menu v-if="logs.length > 0">
<a href="" class="item" @click.prevent="updatePageRead()">[本页已读]</a>
<a href="" class="item" @click.prevent="updateAllRead()">[全部已读]</a>
<a href="" class="item" @click.prevent="updateNodeRead(firstUnreadNode.id)" v-if="firstUnreadNode != null">["{{firstUnreadNode.name}}"已读]</a>
</second-menu>
</div>

View File

@@ -27,6 +27,16 @@ Tea.context(function () {
})
}
this.updateNodeRead = function (nodeId) {
this.$post(".readLogs")
.params({
nodeId: nodeId
})
.success(function () {
teaweb.reload()
})
}
this.updateAllRead = function () {
this.$post(".readAllLogs")
.params({})