feat: 调度任务支持是否进行日志记录
This commit is contained in:
@@ -32,9 +32,12 @@ let dict: {
|
|||||||
sysJobGroup: DictType[];
|
sysJobGroup: DictType[];
|
||||||
/**任务状态 */
|
/**任务状态 */
|
||||||
sysJobStatus: DictType[];
|
sysJobStatus: DictType[];
|
||||||
|
/**任务记录日志 */
|
||||||
|
sysJobSaveLog: DictType[];
|
||||||
} = reactive({
|
} = reactive({
|
||||||
sysJobGroup: [],
|
sysJobGroup: [],
|
||||||
sysJobStatus: [],
|
sysJobStatus: [],
|
||||||
|
sysJobSaveLog: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
@@ -125,6 +128,12 @@ let tableColumns: ColumnsType = [
|
|||||||
key: 'status',
|
key: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '记录日志',
|
||||||
|
dataIndex: 'saveLog',
|
||||||
|
key: 'saveLog',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'jobId',
|
key: 'jobId',
|
||||||
@@ -205,6 +214,7 @@ let modalState: ModalStateType = reactive({
|
|||||||
concurrent: '0',
|
concurrent: '0',
|
||||||
jobGroup: 'DEFAULT',
|
jobGroup: 'DEFAULT',
|
||||||
status: '0',
|
status: '0',
|
||||||
|
saveLog: '0',
|
||||||
targetParams: '',
|
targetParams: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
},
|
},
|
||||||
@@ -537,6 +547,7 @@ onMounted(() => {
|
|||||||
Promise.allSettled([
|
Promise.allSettled([
|
||||||
getDict('sys_job_group'),
|
getDict('sys_job_group'),
|
||||||
getDict('sys_job_status'),
|
getDict('sys_job_status'),
|
||||||
|
getDict('sys_job_save_log'),
|
||||||
]).then(resArr => {
|
]).then(resArr => {
|
||||||
if (resArr[0].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
dict.sysJobGroup = resArr[0].value;
|
dict.sysJobGroup = resArr[0].value;
|
||||||
@@ -544,6 +555,9 @@ onMounted(() => {
|
|||||||
if (resArr[1].status === 'fulfilled') {
|
if (resArr[1].status === 'fulfilled') {
|
||||||
dict.sysJobStatus = resArr[1].value;
|
dict.sysJobStatus = resArr[1].value;
|
||||||
}
|
}
|
||||||
|
if (resArr[2].status === 'fulfilled') {
|
||||||
|
dict.sysJobSaveLog = resArr[2].value;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetList();
|
||||||
@@ -745,6 +759,9 @@ onMounted(() => {
|
|||||||
:value="record.status"
|
:value="record.status"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === 'saveLog'">
|
||||||
|
<DictTag :options="dict.sysJobSaveLog" :value="record.saveLog" />
|
||||||
|
</template>
|
||||||
<template v-if="column.key === 'jobId'">
|
<template v-if="column.key === 'jobId'">
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
@@ -857,19 +874,26 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="cron表达式" name="cronExpression">
|
<a-form-item label="cron表达式" name="cronExpression">
|
||||||
<a-tag color="default">{{
|
<a-tag color="default">
|
||||||
modalState.from.cronExpression
|
{{ modalState.from.cronExpression }}
|
||||||
}}</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
|
<a-form-item label="记录日志" name="status">
|
||||||
|
<DictTag
|
||||||
|
:options="dict.sysJobSaveLog"
|
||||||
|
:value="modalState.from.saveLog"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
<a-form-item label="创建时间" name="createTime">
|
<a-form-item label="创建时间" name="createTime">
|
||||||
<span v-if="+modalState.from.createTime > 0">
|
<span v-if="+modalState.from.createTime > 0">
|
||||||
{{ parseDateToStr(+modalState.from.createTime) }}
|
{{ parseDateToStr(+modalState.from.createTime) }}
|
||||||
</span>
|
</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
<a-form-item label="传入参数" name="targetParams">
|
<a-form-item label="传入参数" name="targetParams">
|
||||||
{{ modalState.from.targetParams }}
|
{{ modalState.from.targetParams }}
|
||||||
@@ -990,6 +1014,8 @@ onMounted(() => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
<a-row :gutter="16">
|
||||||
|
<a-col :lg="18" :md="18" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="cron表达式"
|
label="cron表达式"
|
||||||
name="cronExpression"
|
name="cronExpression"
|
||||||
@@ -1024,6 +1050,19 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="6" :xs="24">
|
||||||
|
<a-form-item label="记录日志" name="saveLog">
|
||||||
|
<a-select
|
||||||
|
v-model:value="modalState.from.saveLog"
|
||||||
|
default-value="0"
|
||||||
|
placeholder="记录日志"
|
||||||
|
:options="dict.sysJobSaveLog"
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
label="传入参数"
|
label="传入参数"
|
||||||
|
|||||||
Reference in New Issue
Block a user