2021-05-19 19:03:03 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.$delay(function () {
|
|
|
|
|
teaweb.datepicker("day-from-picker")
|
|
|
|
|
teaweb.datepicker("day-to-picker")
|
|
|
|
|
})
|
2021-10-15 12:54:23 +08:00
|
|
|
|
|
|
|
|
this.updateRead = function (logId) {
|
|
|
|
|
this.$post(".readLogs")
|
|
|
|
|
.params({
|
|
|
|
|
logIds: [logId]
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.updatePageRead = function () {
|
|
|
|
|
let logIds = this.logs.map(function (v) {
|
|
|
|
|
return v.id
|
|
|
|
|
})
|
2021-11-15 11:31:54 +08:00
|
|
|
teaweb.confirm("确定要设置本页日志为已读吗?", function () {
|
|
|
|
|
this.$post(".readLogs")
|
|
|
|
|
.params({
|
|
|
|
|
logIds: logIds
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.updateAllRead = function () {
|
|
|
|
|
teaweb.confirm("确定要设置所有日志为已读吗?", function () {
|
|
|
|
|
this.$post(".readAllLogs")
|
|
|
|
|
.params({})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
2021-10-15 12:54:23 +08:00
|
|
|
}
|
2021-05-19 19:03:03 +08:00
|
|
|
})
|