fix: 修复时间显示+文章标题可点击
- axios 拦截器把 +00:00 转 +08:00 - MySQL/后端容器加 TZ=Asia/Shanghai - scheduler.py 全部改用 datetime.now() - main.py 加 _CNJSONResponse 修复序列化时区 - 互动记录文章标题支持点击跳转详情页 - 执行时间直接显示字符串无需二次转换
This commit is contained in:
@@ -30,7 +30,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文章" min-width="180" show-overflow-tooltip>
|
<el-table-column label="文章" min-width="180" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span style="font-size:13px">{{ row.article_title || '--' }}</span>
|
<el-tooltip v-if="row.article_id" content="点击查看文章详情" placement="top">
|
||||||
|
<a
|
||||||
|
:href="getArticleUrl(row.article_id)"
|
||||||
|
target="_blank"
|
||||||
|
style="font-size:13px;color:var(--el-color-primary);text-decoration:none;cursor:pointer"
|
||||||
|
@mouseover="$event.target.style.textDecoration='underline'"
|
||||||
|
@mouseout="$event.target.style.textDecoration='none'"
|
||||||
|
>{{ row.article_title || row.article_id }}</a>
|
||||||
|
</el-tooltip>
|
||||||
|
<span v-else style="font-size:13px">{{ row.article_title || '--' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类型" width="80" align="center">
|
<el-table-column label="类型" width="80" align="center">
|
||||||
@@ -55,7 +64,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="执行时间" width="145">
|
<el-table-column label="执行时间" width="145">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span style="font-size:12px;color:var(--color-text-muted)">{{ row.executed_at ? new Date(row.executed_at).toLocaleString('zh-CN',{timeZone:'Asia/Shanghai',hour12:false}) : '-' }}</span>
|
<span style="font-size:12px;color:var(--color-text-muted)">{{ row.executed_at ? row.executed_at.replace('T',' ').replace('+08:00','').replace('+00:00','') : '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="160" align="center">
|
<el-table-column label="操作" width="160" align="center">
|
||||||
@@ -104,6 +113,11 @@ function onDateChange(v) {
|
|||||||
load()
|
load()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 构造文章详情页 URL
|
||||||
|
function getArticleUrl(articleId) {
|
||||||
|
return `https://fat-open.99hui.com/api/huihuibusiness/news/open/${articleId}`
|
||||||
|
}
|
||||||
|
|
||||||
async function load() {
|
async function load() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user