Browse Source

fix(admin): 优惠券有效期/发放日志/测评分配时间改用 formatTime 显示北京时间

CouponManagement/CouponGrantLog/AssessmentAssign 之前裸渲 row.validFrom/validUntil/createdAt,
显示的是 Jackson 输出的 ISO-8601 原始串(含 T 与 +08:00 偏移)。改为统一走全局
formatTime(formatDateTime),显示为「yyyy年MM月dd日 HH:mm:ss」北京时间。

配合后端 spring.jackson.time-zone=Asia/Shanghai,页面时间与北京时间一致。
Xiaogang Liao 3 weeks ago
parent
commit
8f4795c022

+ 1 - 1
cfc-web/src/views/admin/AssessmentAssign.vue

@@ -38,7 +38,7 @@
             <template slot="header">
               <span class="sort-header" @click.stop="onSortClick('createdAt', $event)">创建时间<span v-if="sortIndex('createdAt') !== null" class="sort-index" :class="sortClass('createdAt') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('createdAt') }}</span>{{ sortIcon('createdAt') }}</span>
             </template>
-            <template slot-scope="{ row }">{{ row.createdAt }}</template>
+            <template slot-scope="{ row }">{{ formatTime(row.createdAt) }}</template>
           </el-table-column>
           <el-table-column label="操作" width="220" fixed="right">
             <template slot-scope="{ row }">

+ 1 - 1
cfc-web/src/views/admin/CouponGrantLog.vue

@@ -49,7 +49,7 @@
             </template>
           </el-table-column>
           <el-table-column prop="createdAt" label="发放时间" width="180">
-            <template slot-scope="{ row }">{{ row.createdAt }}</template>
+            <template slot-scope="{ row }">{{ formatTime(row.createdAt) }}</template>
             <template slot="header">
               <span class="sort-header" @click.stop="onSortClick('createdAt', $event)">发放时间<span v-if="sortIndex('createdAt') !== null" class="sort-index" :class="sortClass('createdAt') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('createdAt') }}</span>{{ sortIcon('createdAt') }}</span>
             </template>

+ 1 - 1
cfc-web/src/views/admin/CouponManagement.vue

@@ -58,7 +58,7 @@
           </template>
         </el-table-column>
         <el-table-column label="有效期" width="180">
-          <template slot-scope="{ row }">{{ row.validFrom }} ~ {{ row.validUntil }}</template>
+          <template slot-scope="{ row }">{{ formatTime(row.validFrom) }} ~ {{ formatTime(row.validUntil) }}</template>
         </el-table-column>
         <el-table-column prop="totalCount" label="总量" width="70">
           <template slot="header">