style: Update list styling for cronjob (#9872)

This commit is contained in:
ssongliu 2025-08-06 10:30:37 +08:00 committed by GitHub
parent 305eff048c
commit b10de66ed3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 16 deletions

View file

@ -85,7 +85,7 @@
</fu-select-rw-switch>
</template>
</el-table-column>
<el-table-column :label="$t('commons.table.status')" :min-width="80" prop="status" sortable>
<el-table-column :label="$t('commons.table.status')" :min-width="90" prop="status" sortable>
<template #default="{ row }">
<Status
v-if="row.status === 'Enable'"
@ -178,9 +178,9 @@
</template>
</el-table-column>
<fu-table-operations
width="300px"
width="200px"
:buttons="buttons"
:ellipsis="10"
:ellipsis="2"
:label="$t('commons.table.operate')"
min-width="mobile ? 'auto' : 200"
:fixed="mobile ? false : 'right'"
@ -495,18 +495,18 @@ const buttons = [
return row.status === 'Pending';
},
},
{
label: i18n.global.t('commons.button.edit'),
click: (row: Cronjob.CronjobInfo) => {
onOpenDialog(row.id + '');
},
},
{
label: i18n.global.t('cronjob.record'),
click: (row: Cronjob.CronjobInfo) => {
loadDetail(row);
},
},
{
label: i18n.global.t('commons.button.edit'),
click: (row: Cronjob.CronjobInfo) => {
onOpenDialog(row.id + '');
},
},
{
label: i18n.global.t('commons.button.delete'),
click: (row: Cronjob.CronjobInfo) => {

View file

@ -785,6 +785,7 @@ const loading = ref();
const nextTimes = ref([]);
const isCreate = ref();
const defaultGroupID = ref();
const form = reactive<Cronjob.CronjobInfo>({
id: 0,
name: '',
@ -852,7 +853,7 @@ const search = async () => {
.then((res) => {
loading.value = false;
form.name = res.data.name;
form.groupID = res.data.groupID || null;
form.groupID = res.data.groupID || defaultGroupID.value;
form.type = res.data.type;
form.specCustom = res.data.specCustom;
form.spec = res.data.spec;
@ -1147,13 +1148,14 @@ const loadScriptDir = async (path: string) => {
const loadGroups = async () => {
const res = await getGroupList('cronjob');
groupOptions.value = res.data || [];
if (isCreate.value) {
for (const item of groupOptions.value) {
if (item.isDefault) {
form.groupID = item.id;
defaultGroupID.value = item.id;
break;
}
}
if (isCreate.value) {
form.groupID = defaultGroupID.value;
}
};