fix(admin): 后台时间统一展示为 YYYY-MM-DD HH:mm:ss(formatDateTime 全页接入)

This commit is contained in:
2026-09-05 21:52:00 +08:00
parent e4473a6021
commit a4e4eb427c
15 changed files with 1553 additions and 7 deletions
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { formatDateTime } from '@/utils/datetime'
/** 不符合 ASIN(品牌数据库):分页 + 手动新增/编辑/删除。 */
import { onMounted, reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -173,7 +174,9 @@ onMounted(() => {
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createdAt" label="创建时间" min-width="170" />
<el-table-column prop="createdAt" label="创建时间" min-width="170">
<template #default="{ row }">{{ formatDateTime(row.createdAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button text type="primary" size="small" @click="openEdit(row as InvalidAsinItem)">编辑</el-button>
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { formatDateTime } from '@/utils/datetime'
/** 数据去重总数据(registry):对齐 admin panel-dedupe-total-data —— 扩充筛选(用户名/日期/分组)、行编辑/删除、新增/删除导入(轮询)、导出。 */
import { onMounted, reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -300,7 +301,9 @@ onMounted(() => {
<el-table-column label="分组" width="150">
<template #default="{ row }">{{ (row as DedupeTotalItem).groupName || '—' }}</template>
</el-table-column>
<el-table-column prop="createdAt" label="创建时间" width="170" />
<el-table-column prop="createdAt" label="创建时间" width="170">
<template #default="{ row }">{{ formatDateTime(row.createdAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openEdit(row as DedupeTotalItem)">编辑</el-button>
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { formatDateTime } from '@/utils/datetime'
/** 查询 ASIN:对齐 admin panel-query-asin —— 宽表筛选 + 行内「配置」抽屉(逐国 ASIN,留空=删除该站点) + 导入添加/删除导入/导出。 */
import { onMounted, reactive, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -277,7 +278,9 @@ onMounted(() => {
<span v-else class="dim">—</span>
</template>
</el-table-column>
<el-table-column prop="updatedAt" label="更新时间" min-width="160" />
<el-table-column prop="updatedAt" label="更新时间" min-width="160">
<template #default="{ row }">{{ formatDateTime(row.updatedAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="90" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openConfig(row as QueryAsinItem)">配置</el-button>
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { formatDateTime } from '@/utils/datetime'
/** 最低价 ASIN(跳过跟价):对齐 admin panel-skip-price-asin —— 价格范围筛选、行内「配置」抽屉
* (逐国 ASIN+最低价,留空=删除该站点、低价必带 ASIN)、导入添加/删除导入/导出。 */
import { onMounted, reactive, ref } from 'vue'
@@ -315,7 +316,9 @@ onMounted(() => {
<template #default="{ row }">{{ priceOf(row as SkipPriceItem, code) ?? '—' }}</template>
</el-table-column>
</template>
<el-table-column prop="updatedAt" label="更新时间" min-width="160" />
<el-table-column prop="updatedAt" label="更新时间" min-width="160">
<template #default="{ row }">{{ formatDateTime(row.updatedAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="90" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openConfig(row as SkipPriceItem)">配置</el-button>