合并分支sso
This commit is contained in:
@@ -316,15 +316,15 @@ export default {
|
||||
resetDay()
|
||||
if (Mi == MDate.length - 1) {
|
||||
resetMonth()
|
||||
continue goYear
|
||||
continue // goYear
|
||||
}
|
||||
continue goMonth
|
||||
continue // goMonth
|
||||
}
|
||||
continue goDay
|
||||
continue // goDay
|
||||
}
|
||||
continue goHour
|
||||
continue // goHour
|
||||
}
|
||||
continue goMin
|
||||
continue // goMin
|
||||
}
|
||||
} // goSecond
|
||||
} // goMin
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<el-form-item label="子任务ID">
|
||||
<el-input v-model="form.subTask" placeholder="多个用逗号隔开,按顺序执行" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务负责人" prop="personInCharge">
|
||||
<el-form-item label="任务负责人" prop="person_in_charge">
|
||||
<el-input v-model="form.personInCharge" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="告警邮箱" prop="email">
|
||||
@@ -79,7 +79,7 @@
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="id" label="任务ID" />
|
||||
<el-table-column show-overflow-tooltip prop="jobId" label="任务ID" />
|
||||
<el-table-column show-overflow-tooltip prop="jobName" label="任务名称" min-width="120" />
|
||||
<el-table-column show-overflow-tooltip prop="beanName" label="Bean名称" />
|
||||
<el-table-column show-overflow-tooltip prop="methodName" label="执行方法" />
|
||||
@@ -99,20 +99,20 @@
|
||||
<el-table-column v-permission="['admin','timing:edit','timing:del']" label="操作" width="170px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-permission="['admin','timing:edit']" size="mini" style="margin-right: 3px;" type="text" @click="crud.toEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" @click="execute(scope.row.id)">执行</el-button>
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: 3px" type="text" size="mini" @click="updateStatus(scope.row.id,scope.row.isPause ? '恢复' : '暂停')">
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" @click="execute(scope.row.jobId)">执行</el-button>
|
||||
<el-button v-permission="['admin','timing:edit']" style="margin-left: 3px" type="text" size="mini" @click="updateStatus(scope.row.jobId,scope.row.isPause ? '恢复' : '暂停')">
|
||||
{{ scope.row.isPause ? '恢复' : '暂停' }}
|
||||
</el-button>
|
||||
<el-popover
|
||||
:ref="scope.row.id"
|
||||
:ref="scope.row.jobId"
|
||||
v-permission="['admin','timing:del']"
|
||||
placement="top"
|
||||
width="200"
|
||||
>
|
||||
<p>确定停止并删除该任务吗?</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.id)">确定</el-button>
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.jobId].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.jobId)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="text" size="mini">删除</el-button>
|
||||
</el-popover>
|
||||
@@ -128,21 +128,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudJob from '@/api/system/timing'
|
||||
import crudJob from '@/views/system/timing/timing'
|
||||
import Log from './log'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import Crontab from './components/crontab'
|
||||
|
||||
const defaultForm = { id: null, jobName: null, subTask: null, beanName: null, methodName: null, params: null, cronExpression: null, pauseAfterFailure: true, isPause: false, personInCharge: null, email: null, description: null }
|
||||
const defaultForm = { jobId: null, beanName: null, cronExpression: null, isPause: false, jobName: null, methodName: null, params: null, description: null, personInCharge: null, email: null, subTask: null, pauseAfterFailure: true, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
export default {
|
||||
name: 'Timing',
|
||||
components: { Log, pagination, crudOperation, rrOperation, DateRangePicker, Crontab },
|
||||
components: { Log, pagination, crudOperation, rrOperation, Crontab },
|
||||
cruds() {
|
||||
return CRUD({ title: '定时任务', url: 'api/jobs', crudMethod: { ...crudJob }})
|
||||
return CRUD({ title: '定时任务', idField: 'jobId', url: 'api/jobs', crudMethod: { ...crudJob }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
data() {
|
||||
@@ -222,7 +221,7 @@ export default {
|
||||
this.$refs.log.doInit()
|
||||
},
|
||||
checkboxT(row, rowIndex) {
|
||||
return row.id !== 1
|
||||
return row.job_id !== 1
|
||||
},
|
||||
/** cron表达式按钮操作 */
|
||||
handleShowCron() {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input v-model="query.jobName" clearable size="mini" placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery" />
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<el-select v-model="query.isSuccess" placeholder="日志状态" clearable size="mini" class="filter-item" style="width: 110px" @change="toQuery">
|
||||
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
|
||||
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.displayName" :value="item.key" />
|
||||
</el-select>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
</div>
|
||||
@@ -16,13 +16,13 @@
|
||||
<el-table-column show-overflow-tooltip prop="methodName" label="执行方法" />
|
||||
<el-table-column show-overflow-tooltip prop="params" width="120px" label="参数" />
|
||||
<el-table-column show-overflow-tooltip prop="cronExpression" label="cron表达式" />
|
||||
<el-table-column prop="createTime" label="异常详情" width="110px">
|
||||
<el-table-column prop="create_time" label="异常详情" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-show="scope.row.exceptionDetail" size="mini" type="text" @click="info(scope.row.exceptionDetail)">查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip align="center" prop="time" width="100px" label="耗时(毫秒)" />
|
||||
<el-table-column align="center" prop="isSuccess" width="80px" label="状态">
|
||||
<el-table-column align="center" prop="is_success" width="80px" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.isSuccess ? 'success' : 'danger'">{{ scope.row.isSuccess ? '成功' : '失败' }}</el-tag>
|
||||
</template>
|
||||
@@ -39,7 +39,7 @@
|
||||
<!--分页组件-->
|
||||
<el-pagination
|
||||
:total="total"
|
||||
:current-page="page + 1"
|
||||
:current-page="page"
|
||||
:page-size="6"
|
||||
style="margin-top:8px;"
|
||||
layout="total, prev, pager, next"
|
||||
@@ -60,8 +60,8 @@ export default {
|
||||
title: '任务日志',
|
||||
errorInfo: '', errorDialog: false,
|
||||
enabledTypeOptions: [
|
||||
{ key: 'true', display_name: '成功' },
|
||||
{ key: 'false', display_name: '失败' }
|
||||
{ key: '1', displayName: '成功' },
|
||||
{ key: '0', displayName: '失败' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
41
lms/nladmin-ui/src/views/system/timing/timing.js
Normal file
41
lms/nladmin-ui/src/views/system/timing/timing.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/jobs',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/jobs',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/jobs',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateIsPause(id) {
|
||||
return request({
|
||||
url: 'api/jobs/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
export function execution(id) {
|
||||
return request({
|
||||
url: 'api/jobs/exec/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
export default { del, updateIsPause, execution, add, edit }
|
||||
Reference in New Issue
Block a user