Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust_web
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
cust_web
Commits
72621e84
Commit
72621e84
authored
Mar 21, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b53f537b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
12 deletions
+87
-12
sysScheduledTaskLog.js
src/api/system/sysScheduledTaskLog.js
+13
-0
index.vue
src/views/contentManagement/activity/info/index.vue
+4
-11
index.vue
src/views/system/sysScheduledTaskLog/index.vue
+70
-1
No files found.
src/api/system/sysScheduledTaskLog.js
View file @
72621e84
...
...
@@ -19,6 +19,12 @@ export function listSysScheduledTaskLog(query) {
params
:
query
})
}
export
function
listSysScheduledTask
()
{
return
request
({
url
:
'/scheduledTask/scheduledTaskList'
,
method
:
'get'
})
}
// 2. 查询详细信息
export
function
getSysScheduledTaskLog
(
businessId
)
{
...
...
@@ -28,6 +34,13 @@ export function getSysScheduledTaskLog(businessId) {
})
}
export
function
executeSysScheduledTask
(
type
)
{
return
request
({
url
:
'/scheduledTask/executeScheduledTask/'
+
type
,
method
:
'get'
})
}
// 3. 新增
export
function
addSysScheduledTaskLog
(
data
)
{
data
=
Qs
.
stringify
(
data
)
...
...
src/views/contentManagement/activity/info/index.vue
View file @
72621e84
...
...
@@ -326,8 +326,8 @@
:use-custom-image-handler=
"true"
:editor-toolbar=
"customToolbar"
:disabled=
"secondFromDisabled"
@
blur=
"queryRules"
@
image-added=
"handleImageAdded"
@
blur=
"queryRules"
/>
</el-form-item>
</el-col>
...
...
@@ -554,7 +554,6 @@ export default {
if
(
response
.
code
===
200
)
{
this
.
form
=
response
.
data
this
.
imageUrl
=
response
.
data
.
url
console
.
log
(
'this.imageUrl:'
,
this
.
imageUrl
)
}
})
}
...
...
@@ -591,17 +590,11 @@ export default {
},
// 保存方法
submit
()
{
let
details
=
this
.
form
.
details
// 将 HTML 换行转换为纯文本换行
details
=
details
.
replace
(
/<br
\s
*
\/?
>/gi
,
'
\
n'
)
// 替换
<
br
>
标签为
\
n
details
=
details
.
replace
(
/<
\/
p>/gi
,
'
\
n'
)
// 替换
<
/p> 标签为
\n
details
=
details
.
replace
(
/<p
[^
>
]
*>/gi
,
''
)
// 移除
<
p
>
标签
// 更新表单数据
this
.
form
.
details
=
details
const
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
this
.
$refs
.
deviceFormRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
businessId
!==
null
)
{
updateCmsActivity
(
this
.
form
).
then
(
res
=>
{
updateCmsActivity
(
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
message
:
'保存成功'
,
...
...
@@ -614,7 +607,7 @@ export default {
})
}
else
{
this
.
form
.
publishStatus
=
'0'
addCmsActivity
(
this
.
form
).
then
(
res
=>
{
addCmsActivity
(
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
message
:
'保存成功'
,
...
...
src/views/system/sysScheduledTaskLog/index.vue
View file @
72621e84
...
...
@@ -62,6 +62,15 @@
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
:class=
"commonField.resetClass"
:size=
"commonField.smallSize"
@
click=
"handleExecute"
>
执行
</el-button>
</el-form-item>
</div>
</el-form>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
定时任务日志列表
</div>
...
...
@@ -96,11 +105,41 @@
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1000px"
append-to-body
>
<el-table
border
:data=
"scheduledTaskList"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"任务名称"
prop=
"taskName"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
taskName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"任务执行时间"
prop=
"taskTime"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
taskTime
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
min-width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
v-has-permi=
"['mem:info:update']"
:class=
"commonField.updateClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handleExecuteNow(scope.row)"
>
立即执行
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"cancelBtn"
@
click=
"cancel"
>
关 闭
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSysScheduledTaskLog
}
from
'@/api/system/sysScheduledTaskLog'
import
{
executeSysScheduledTask
,
listSysScheduledTask
,
listSysScheduledTaskLog
}
from
'@/api/system/sysScheduledTaskLog'
import
commonField
from
'@/utils/commonField'
export
default
{
name
:
'SysScheduledTaskLog'
,
...
...
@@ -112,6 +151,7 @@ export default {
total
:
0
,
// 表格数据
sysScheduledTaskLogList
:
[],
scheduledTaskList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
...
...
@@ -236,6 +276,35 @@ export default {
flag
:
''
}
this
.
handleQuery
()
},
handleExecute
()
{
listSysScheduledTask
().
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
scheduledTaskList
=
response
.
data
this
.
open
=
true
this
.
title
=
'定时任务列表'
}
else
{
this
.
$message
({
message
:
response
.
msg
,
type
:
'error'
})
}
})
},
handleExecuteNow
(
row
)
{
executeSysScheduledTask
(
row
.
type
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$message
({
message
:
'执行成功'
,
type
:
'success'
})
}
else
{
this
.
$message
({
message
:
'执行失败'
,
type
:
'error'
})
}
})
}
}
}
...
...
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