mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-11 04:00:56 +08:00
style: Update list styling for cronjob (#9872)
This commit is contained in:
parent
305eff048c
commit
b10de66ed3
2 changed files with 18 additions and 16 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue