Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4e621960
authored
2023-03-27 14:34:11 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
29f6160b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
197 additions
and
201 deletions
src/views/system/timedTask/index.vue
src/views/system/users/index.vue
src/views/system/timedTask/index.vue
View file @
4e62196
...
...
@@ -29,227 +29,227 @@
</div>
</
template
>
<
script
>
// 定时任务
import
data
from
"./data"
import
sjsbTask
from
'@/api/sjsbTask.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
name
:
"timedTask"
,
mixins
:
[
tableMixin
],
components
:
{
addTask
},
data
()
{
return
{
taskData
:
null
,
isDialog
:
false
,
form
:
{
jobName
:
''
,
currentPage
:
1
},
selectionList
:
[],
tableData
:
{
columns
:
[{
label
:
'序号'
,
type
:
'index'
,
width
:
'50'
,
index
:
this
.
indexMethod
,
}].
concat
(
data
.
columns
()).
concat
([
{
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
v
-
show
=
{
scope
.
row
.
jobStatus
===
0
}
class
=
'btnColor'
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
handleActive
(
scope
.
row
)
}}
>
激活
<
/el-button
>
<
el
-
button
type
=
"text"
v
-
show
=
{
scope
.
row
.
jobStatus
===
-
1
}
class
=
'btnColor'
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
recover
(
scope
.
row
)
}}
>
恢复
<
/el-button
>
<
el
-
button
type
=
"text"
icon
=
"el-icon-edit"
class
=
'btnColor'
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
)
}}
>
编辑
<
/el-button
>
<
el
-
button
type
=
"text"
icon
=
"el-icon-delete"
class
=
'successColor'
v
-
show
=
{
scope
.
row
.
jobStatus
!==
-
1
}
onClick
=
{()
=>
{
this
.
handleDel
(
scope
.
row
)
}}
>
删除
<
/el-button
>
<
/div
>
);
},
},
]),
data
:
[]
},
pageData
:
{
total
:
0
,
pageSize
:
15
,
current
:
1
,
},
}
},
methods
:
{
handleAdd
()
{
this
.
taskData
=
null
this
.
isDialog
=
true
// 定时任务
import
data
from
"./data"
import
sjsbTask
from
'@/api/sjsbTask.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
name
:
"timedTask"
,
mixins
:
[
tableMixin
],
components
:
{
addTask
},
resetSe
()
{
this
.
form
.
jobName
=
''
this
.
featchData
()
},
async
featchData
()
{
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
}
=
await
sjsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
result
.
list
}
catch
(
error
)
{
this
.
message
=
error
data
()
{
return
{
taskData
:
null
,
isDialog
:
false
,
form
:
{
jobName
:
''
,
currentPage
:
1
},
selectionList
:
[],
tableData
:
{
columns
:
[{
label
:
'序号'
,
type
:
'index'
,
width
:
'50'
,
index
:
this
.
indexMethod
,
}].
concat
(
data
.
columns
()).
concat
([
{
label
:
"操作"
,
width
:
380
,
render
:
(
h
,
scope
)
=>
{
return
(
<
div
>
<
el
-
button
type
=
"text"
v
-
show
=
{
scope
.
row
.
jobStatus
===
0
}
class
=
'btnColor'
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
handleActive
(
scope
.
row
)
}}
>
激活
<
/el-button
>
<
el
-
button
type
=
"text"
v
-
show
=
{
scope
.
row
.
jobStatus
===
-
1
}
class
=
'btnColor'
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
recover
(
scope
.
row
)
}}
>
恢复
<
/el-button
>
<
el
-
button
type
=
"text"
icon
=
"el-icon-edit"
class
=
'btnColor'
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
)
}}
>
编辑
<
/el-button
>
<
el
-
button
type
=
"text"
icon
=
"el-icon-delete"
class
=
'successColor'
v
-
show
=
{
scope
.
row
.
jobStatus
!==
-
1
}
onClick
=
{()
=>
{
this
.
handleDel
(
scope
.
row
)
}}
>
删除
<
/el-button
>
<
/div
>
);
},
},
]),
data
:
[]
},
pageData
:
{
total
:
0
,
pageSize
:
15
,
current
:
1
,
},
}
},
recover
(
row
)
{
this
.
$confirm
(
'此操将进行恢复操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
recover
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
methods
:
{
handleAdd
()
{
this
.
taskData
=
null
this
.
isDialog
=
true
},
resetSe
()
{
this
.
form
.
jobName
=
''
this
.
featchData
()
},
async
featchData
()
{
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
}
=
await
sjsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
result
.
list
}
catch
(
error
)
{
this
.
message
=
error
}
},
recover
(
row
)
{
this
.
$confirm
(
'此操将进行恢复操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
recover
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
},
},
handleActive
(
row
)
{
this
.
$confirm
(
'此操将进行激活操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
active
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
handleActive
(
row
)
{
this
.
$confirm
(
'此操将进行激活操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
active
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
},
// 暂停
handleSuspend
(
row
)
{
this
.
$confirm
(
'此操将进行暂停操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
},
// 暂停
handleSuspend
(
row
)
{
this
.
$confirm
(
'此操将进行暂停操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消
'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$
message
(
{
type
:
'success
'
,
message
:
res
.
message
,
.
then
(()
=>
{
sjsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success
'
,
message
:
res
.
message
,
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$
alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定
'
,
type
:
'error'
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
},
handleEdit
(
row
)
{
this
.
taskData
=
row
this
.
isDialog
=
true
},
handleDel
(
row
)
{
this
.
$confirm
(
'此操将进行删除操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
},
handleEdit
(
row
)
{
this
.
taskData
=
row
this
.
isDialog
=
true
},
handleDel
(
row
)
{
this
.
$confirm
(
'此操将进行删除操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
sjsbTask
.
sjsbTaskRemove
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
.
then
(()
=>
{
sjsbTask
.
sjsbTaskRemove
(
row
.
jobId
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
,
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
this
.
featchData
()
}
})
.
catch
((
error
)
=>
{
this
.
$alert
(
error
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
.
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
,
})
})
}
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/mixin.scss"
;
</
style
>
...
...
src/views/system/users/index.vue
View file @
4e62196
...
...
@@ -408,9 +408,5 @@ export default {
};
</
script
>
<
style
scoped
lang=
"scss"
>
<<<<<<<
HEAD
@import
"~@/styles/mixin.scss"
;
=======
@import
"~@/styles/mixin.scss"
;
>>>>>>>
7c233183698a503df659c8b6cf28f340f4de3587
</
style
>
...
...
Please
register
or
sign in
to post a comment