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
95af0221
Commit
95af0221
authored
Mar 11, 2025
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified
parent
4f532f34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
CampaignTaskManage.vue
src/views/campaignTask/CampaignTaskManage.vue
+14
-12
No files found.
src/views/campaignTask/CampaignTaskManage.vue
View file @
95af0221
...
...
@@ -66,14 +66,14 @@
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"start
_t
ime"
label=
"开始时间"
width=
"180"
>
<el-table-column
prop=
"start
T
ime"
label=
"开始时间"
width=
"180"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
start
_time
}}
{{
scope
.
row
.
start
Time
?
moment
(
scope
.
row
.
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"finish
_t
ime"
label=
"结束时间"
width=
"180"
>
<el-table-column
prop=
"finish
T
ime"
label=
"结束时间"
width=
"180"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
finish
_time
}}
{{
scope
.
row
.
finish
Time
?
moment
(
scope
.
row
.
finishTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}}
</
template
>
</el-table-column>
<el-table-column
label=
"执行时间"
width=
"150"
>
...
...
@@ -138,10 +138,11 @@
import
CampaignTemplateSelector
from
'@/components/GroupSelectors/CampaignTemplateSelector'
import
{
getCampaignTaskList
,
createCampaignTask
,
updateCampaignTask
}
from
'@/api/campaignTask'
import
axios
from
'axios'
import
dayjs
from
'dayjs'
import
duration
from
'dayjs/plugin/duration'
import
moment
from
'moment'
dayjs
.
extend
(
duration
)
// 设置moment语言为中文
moment
.
locale
(
'zh-cn'
)
export
default
{
name
:
'CampaignTaskManage'
,
...
...
@@ -149,8 +150,8 @@ export default {
CampaignTemplateSelector
},
data
()
{
const
end
=
dayjs
()
const
start
=
end
.
subtract
(
7
,
'day'
)
const
end
=
moment
()
const
start
=
end
.
clone
().
subtract
(
7
,
'day'
)
return
{
loading
:
false
,
condition
:
{
...
...
@@ -180,6 +181,7 @@ export default {
this
.
fetchData
()
},
methods
:
{
moment
,
async
fetchData
()
{
this
.
loading
=
true
try
{
...
...
@@ -225,10 +227,10 @@ export default {
},
calculateDuration
(
row
)
{
const
startTime
=
dayjs
(
row
.
start_t
ime
)
const
endTime
=
row
.
finish
_time
?
dayjs
(
row
.
finish_time
)
:
dayjs
()
const
startTime
=
moment
(
row
.
startT
ime
)
const
endTime
=
row
.
finish
Time
?
moment
(
row
.
finishTime
)
:
moment
()
const
diff
=
endTime
.
diff
(
startTime
)
const
duration
=
dayjs
.
duration
(
diff
)
const
duration
=
moment
.
duration
(
diff
)
if
(
duration
.
asHours
()
>=
1
)
{
return
Math
.
floor
(
duration
.
asHours
())
+
'小时'
...
...
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