fix: 调度任务页面排版

This commit is contained in:
TsMask
2024-01-10 15:21:36 +08:00
parent c174af7d8f
commit 3d8b2d35d7
2 changed files with 23 additions and 12 deletions

View File

@@ -109,39 +109,45 @@ let tableColumns: ColumnsType = [
title: t('views.monitor.job.jobName'),
dataIndex: 'jobName',
align: 'left',
width: 200,
},
{
title: t('views.monitor.job.jobGroup'),
dataIndex: 'jobGroup',
key: 'jobGroup',
align: 'center',
width: 100,
},
{
title: t('views.monitor.job.invokeTarget'),
dataIndex: 'invokeTarget',
align: 'left',
width: 100,
},
{
title: t('views.monitor.job.cronExpression'),
dataIndex: 'cronExpression',
align: 'left',
width: 100,
},
{
title: t('views.monitor.job.status'),
dataIndex: 'status',
key: 'status',
align: 'center',
width: 100,
},
{
title: t('views.monitor.job.saveLog'),
dataIndex: 'saveLog',
key: 'saveLog',
align: 'center',
width: 100,
},
{
title: t('common.operate'),
key: 'jobId',
align: 'center',
align: 'left',
},
];
@@ -756,7 +762,7 @@ onMounted(() => {
:size="tableState.size"
:row-class-name="fnTableStriped"
:pagination="tablePagination"
:scroll="{ x: true }"
:scroll="{ x: tableColumns.length * 120 }"
:row-selection="{
type: 'checkbox',
selectedRowKeys: tableState.selectedRowKeys,
@@ -769,16 +775,15 @@ onMounted(() => {
</template>
<template v-if="column.key === 'status'">
<a-switch
v-if="hasPermissions(['monitor:job:changeStatus'])"
v-if="
dict.sysJobStatus.length > 0 &&
hasPermissions(['monitor:job:changeStatus'])
"
v-model:checked="record.status"
checked-value="1"
:checked-children="
dict.sysJobStatus.find(s => s.value === '1')?.label
"
:checked-children="dict.sysJobStatus[0].label"
un-checked-value="0"
:un-checked-children="
dict.sysJobStatus.find(s => s.value === '0')?.label
"
:un-checked-children="dict.sysJobStatus[1].label"
size="small"
@change="fnRecordStatus(record)"
/>

View File

@@ -127,28 +127,33 @@ let tableColumns: ColumnsType = [
title: t('views.monitor.jobLog.jobName'),
dataIndex: 'jobName',
align: 'left',
width: 200,
},
{
title: t('views.monitor.jobLog.jobGroup'),
dataIndex: 'jobGroup',
key: 'jobGroup',
align: 'center',
width: 100,
},
{
title: t('views.monitor.jobLog.invokeTarget'),
dataIndex: 'invokeTarget',
align: 'left',
width: 100,
},
{
title: t('views.monitor.jobLog.status'),
dataIndex: 'status',
key: 'status',
align: 'center',
width: 100,
},
{
title: t('views.monitor.jobLog.createTime'),
dataIndex: 'createTime',
align: 'center',
width: 150,
customRender(opt) {
if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value);
@@ -158,7 +163,8 @@ let tableColumns: ColumnsType = [
title: t('views.monitor.jobLog.costTime'),
dataIndex: 'costTime',
key: 'costTime',
align: 'center',
align: 'right',
width: 100,
customRender(opt) {
return `${opt.value} ms`;
},
@@ -166,7 +172,7 @@ let tableColumns: ColumnsType = [
{
title: t('common.operate'),
key: 'jobLogId',
align: 'center',
align: 'left',
},
];
@@ -592,7 +598,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:row-class-name="fnTableStriped"
:scroll="{ x: true }"
:scroll="{ x: tableColumns.length * 120 }"
:pagination="tablePagination"
:row-selection="{
type: 'checkbox',