Vue3 重构:简化 formatDate
This commit is contained in:
parent
eb29f8e2c5
commit
44dc02a02e
@ -194,5 +194,5 @@ export const dateFormatter = (row, column, cellValue) => {
|
|||||||
if (!cellValue) {
|
if (!cellValue) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss')
|
return formatDate(cellValue)
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
{{ detailData.requestParams }}
|
{{ detailData.requestParams }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="请求时间">
|
<el-descriptions-item label="请求时间">
|
||||||
{{ formatDate(detailData.beginTime, 'YYYY-MM-DD HH:mm:ss') }} ~
|
{{ formatDate(detailData.beginTime) }} ~ {{ formatDate(detailData.endTime) }}
|
||||||
{{ formatDate(detailData.endTime, 'YYYY-MM-DD HH:mm:ss') }}
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="请求耗时">{{ detailData.duration }} ms</el-descriptions-item>
|
<el-descriptions-item label="请求耗时">{{ detailData.duration }} ms</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作结果">
|
<el-descriptions-item label="操作结果">
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
<el-table-column label="请求地址" align="center" prop="requestUrl" width="250" />
|
<el-table-column label="请求地址" align="center" prop="requestUrl" width="250" />
|
||||||
<el-table-column label="请求时间" align="center" prop="beginTime" width="180">
|
<el-table-column label="请求时间" align="center" prop="beginTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ formatDate(scope.row.beginTime, 'YYYY-MM-DD HH:mm:ss') }}</span>
|
<span>{{ formatDate(scope.row.beginTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="执行时长" align="center" prop="duration" width="180">
|
<el-table-column label="执行时长" align="center" prop="duration" width="180">
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{{ detailData.requestParams }}
|
{{ detailData.requestParams }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="异常时间">
|
<el-descriptions-item label="异常时间">
|
||||||
{{ formatDate(detailData.exceptionTime, 'YYYY-MM-DD HH:mm:ss') }}
|
{{ formatDate(detailData.exceptionTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="异常名">
|
<el-descriptions-item label="异常名">
|
||||||
{{ detailData.exceptionName }}
|
{{ detailData.exceptionName }}
|
||||||
@ -50,7 +50,7 @@
|
|||||||
{{ detailData.processUserId }}
|
{{ detailData.processUserId }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="处理时间" v-if="detailData.processTime">
|
<el-descriptions-item label="处理时间" v-if="detailData.processTime">
|
||||||
{{ formatDate(detailData.processTime, 'YYYY-MM-DD HH:mm:ss') }}
|
{{ formatDate(detailData.processTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_RESULT" :value="detailData.result" />
|
<dict-tag :type="DICT_TYPE.SYSTEM_LOGIN_RESULT" :value="detailData.result" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="登录日期">
|
<el-descriptions-item label="登录日期">
|
||||||
{{ formatDate(detailData.createTime, 'YYYY-MM-DD HH:mm:ss') }}
|
{{ formatDate(detailData.createTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
{{ detailData.javaMethodArgs }}
|
{{ detailData.javaMethodArgs }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作时间">
|
<el-descriptions-item label="操作时间">
|
||||||
{{ formatDate(detailData.startTime, 'YYYY-MM-DD HH:mm:ss') }}
|
{{ formatDate(detailData.startTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="执行时长">{{ detailData.duration }} ms</el-descriptions-item>
|
<el-descriptions-item label="执行时长">{{ detailData.duration }} ms</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作结果">
|
<el-descriptions-item label="操作结果">
|
||||||
|
Loading…
Reference in New Issue
Block a user