Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxn-adputin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lijin
zxn-adputin
Commits
b372c688
Commit
b372c688
authored
Sep 28, 2025
by
hzl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加修改时间字段
parent
d49a952c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
AccountManagement.vue
src/views/promotionManagement/AccountManagement.vue
+35
-0
No files found.
src/views/promotionManagement/AccountManagement.vue
View file @
b372c688
...
...
@@ -58,6 +58,11 @@
<el-table-column
prop=
"actId"
label=
"账户ID"
align=
"center"
/>
<el-table-column
prop=
"name"
label=
"账户名称"
align=
"center"
/>
<el-table-column
prop=
"pkg"
label=
"应用包名"
align=
"center"
/>
<el-table-column
label=
"更新时间"
align=
"center"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
formatDateTime
(
scope
.
row
.
updatedAt
)
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column label="授权状态" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="scope.row.status === 1 ? 'success' : 'danger'">-->
...
...
@@ -364,6 +369,36 @@ export default {
default
:
return
'未知'
}
},
// 格式化日期时间
formatDateTime
(
dateTime
)
{
if
(
!
dateTime
)
{
return
'-'
}
try
{
// 解析ISO 8601格式的时间字符串
const
date
=
new
Date
(
dateTime
)
// 检查日期是否有效
if
(
isNaN
(
date
.
getTime
()))
{
return
'-'
}
// 格式化为 YYYY-MM-DD HH:mm:ss
const
year
=
date
.
getFullYear
()
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
'0'
)
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
'0'
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
'0'
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
'0'
)
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
}
catch
(
error
)
{
console
.
error
(
'格式化时间失败:'
,
error
)
return
'-'
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment