Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
57ead639
Commit
57ead639
authored
Aug 14, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改转换时间显示方式
parent
525078da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
28 deletions
+42
-28
components.d.ts
+1
-0
src/views/order/orderTracking/index.vue
+12
-6
src/views/order/podUs/index.vue
+29
-22
No files found.
components.d.ts
View file @
57ead639
...
...
@@ -65,6 +65,7 @@ declare module 'vue' {
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
Select
:
typeof
import
(
'./src/components/Form/Select.vue'
)[
'default'
]
ShipmentOrderDetail
:
typeof
import
(
'./src/components/ShipmentOrderDetail.vue'
)[
'default'
]
SideBar
:
typeof
import
(
'./src/components/SideBar.vue'
)[
'default'
]
SplitDiv
:
typeof
import
(
'./src/components/splitDiv/splitDiv.vue'
)[
'default'
]
'Switch '
:
typeof
import
(
'./src/components/Form/Switch .vue'
)[
'default'
]
TableView
:
typeof
import
(
'./src/components/TableView.vue'
)[
'default'
]
...
...
src/views/order/orderTracking/index.vue
View file @
57ead639
...
...
@@ -641,7 +641,9 @@ const getOrderByIdApi = async (type: string) => {
}
const
tempChinaLogs
=
ref
<
LogListData
[]
>
([])
const
zoneType
=
ref
<
string
>
(
'Asia/Shanghai'
)
function
changeChinaTime
(
zone
:
string
)
{
zoneType
.
value
=
zone
logList
.
value
=
tempChinaLogs
.
value
.
map
((
el
)
=>
{
return
{
...
el
,
...
...
@@ -1033,24 +1035,28 @@ onMounted(() => {
<el-tab-pane
label=
"操作日志"
@
tab-click=
"operationLog"
>
<div>
<el-button
type=
"primary
"
:type=
"zoneType === 'Asia/Shanghai' ? 'primary' : ''
"
size=
"small"
link
style=
"margin-left: 10px"
@
click=
"changeChinaTime('Asia/Shanghai')"
>
转换为中国
时间
</el-button
>
北京
时间
</el-button
>
<el-button
type=
"primary
"
:type=
"zoneType === 'America/New_York' ? 'primary' : ''
"
size=
"small"
link
style=
"margin-left: 10px"
@
click=
"changeChinaTime('America/New_York')"
>
转换为
新泽西时间
</el-button
>
新泽西时间
</el-button
>
<el-button
type=
"primary
"
:type=
"zoneType === 'America/Los_Angeles' ? 'primary' : ''
"
size=
"small"
link
style=
"margin-left: 10px"
@
click=
"changeChinaTime('America/Los_Angeles')"
>
转换为
洛杉矶时间
</el-button
>
洛杉矶时间
</el-button
>
</div>
...
...
src/views/order/podUs/index.vue
View file @
57ead639
...
...
@@ -1975,27 +1975,32 @@
<
template
#
header
=
"{ titleId, titleClass
}
"
>
<
div
style
=
"display: flex"
class
=
"my-header"
>
<
div
:
id
=
"titleId"
:
class
=
"titleClass"
>
操作日志
<
/div
>
<!--
<
el
-
button
type
=
"primary"
size
=
"small"
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime"
>
转换为中国时间
<
/el-butto
n
>
-->
<
el
-
button
type
=
"primary"
size
=
"small"
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime('America/New_York')"
>
转换为新泽西时间
<
/el-butto
n
>
<
el
-
button
type
=
"primary"
size
=
"small"
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime('America/Los_Angeles')"
>
转换为洛杉矶时间
<
/el-butto
n
>
<
div
style
=
"margin-left: 15px"
>
<
el
-
button
:
type
=
"timeType === 'Asia/Shanghai' ? 'primary' : ''"
size
=
"small"
link
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime('Asia/Shanghai')"
>
北京时间
<
/el-butto
n
>
<
el
-
button
:
type
=
"timeType === 'America/New_York' ? 'primary' : ''"
size
=
"small"
link
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime('America/New_York')"
>
新泽西时间
<
/el-butto
n
>
<
el
-
button
:
type
=
"timeType === 'America/Los_Angeles' ? 'primary' : ''"
size
=
"small"
link
style
=
"margin-left: 10px"
@
click
=
"changeChinaTime('America/Los_Angeles')"
>
洛杉矶时间
<
/el-butto
n
>
<
/div
>
<
/div
>
<
/template
>
<
LogList
:
log
-
list
=
"logList"
/>
...
...
@@ -4960,12 +4965,14 @@ const completeDelivery = async () => {
}
const
tempChinaLogs
=
ref
<
LogListData
[]
>
([])
const
timeType
=
ref
<
string
>
(
'Asia/Shanghai'
)
function
changeChinaTime
(
zone
:
string
)
{
timeType
.
value
=
zone
logList
.
value
=
tempChinaLogs
.
value
.
map
((
el
)
=>
{
return
{
...
el
,
createTime
:
convertToChinaTime
(
el
.
createTime
,
'Asia/Shanghai'
,
zone
),
local
:
zone
.
split
(
'/'
)[
1
],
local
:
zone
.
split
(
'/'
)[
1
]
===
'Shanghai'
?
'BeiJing'
:
zone
.
split
(
'/'
)[
1
]
,
}
}
)
}
...
...
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