fix: i18n

This commit is contained in:
meilin.huang
2024-11-21 20:12:16 +08:00
parent 9366a76b84
commit bffa9c2676
8 changed files with 19 additions and 12 deletions

View File

@@ -107,6 +107,9 @@ export default {
cronjobRunState: 'Run State',
execResRecordType: 'Result record type',
cronExpression: 'Cron Expression',
noRecord: 'Not recorded',
onErrorRecord: 'Record on error',
record: 'Record',
// file
upload: 'Upload',

View File

@@ -108,6 +108,9 @@ export default {
cronjobRunState: '运行状态',
execResRecordType: '结果记录类型',
cronExpression: 'cron表达式',
noRecord: '不记录',
onErrorRecord: '错误时记录',
record: '记录',
// file
upload: '上传',

View File

@@ -71,13 +71,12 @@
<template #status="{ data }">
<el-switch
v-auth:disabled="'machine:update'"
:width="52"
v-model="data.status"
:active-value="1"
:inactive-value="-1"
inline-prompt
active-text="启用"
inactive-text="停用"
:active-text="$t('common.enable')"
:inactive-text="$t('common.disable')"
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
@change="changeStatus(data)"
></el-switch>
@@ -320,7 +319,7 @@ const columns = [
TableColumn.new('name', 'common.name'),
TableColumn.new('ipPort', 'Ip:Port').isSlot().setAddWidth(50),
TableColumn.new('authCerts[0].username', 'machine.acName').isSlot('authCert').setAddWidth(10),
TableColumn.new('status', 'common.status').isSlot().setMinWidth(85),
TableColumn.new('status', 'common.status').isSlot(),
TableColumn.new('stat', 'machine.runningStat').isSlot().setAddWidth(55),
TableColumn.new('fs', 'machine.fs').isSlot().setAddWidth(25),
TableColumn.new('remark', 'common.remark'),

View File

@@ -33,9 +33,9 @@ export const CronJobStatusEnum = {
// 计划任务保存执行结果类型
export const CronJobSaveExecResTypeEnum = {
No: EnumValue.of(-1, '不记录').tagTypeDanger(),
OnError: EnumValue.of(1, '错误时记录').tagTypeWarning(),
Yes: EnumValue.of(2, '记录').tagTypeSuccess(),
No: EnumValue.of(-1, 'machine.noRecord').tagTypeDanger(),
OnError: EnumValue.of(1, 'machine.onErrorRecord').tagTypeWarning(),
Yes: EnumValue.of(2, 'machine.record').tagTypeSuccess(),
};
// 计划任务执行记录状态

View File

@@ -189,7 +189,7 @@
v-if="$props.protocol == MachineProtocolEnum.Ssh.value"
prop="username"
:label="$t('machine.user')"
min-width="55"
min-width="70"
show-overflow-tooltip
>
</el-table-column>
@@ -197,7 +197,7 @@
v-if="$props.protocol == MachineProtocolEnum.Ssh.value"
prop="groupname"
:label="$t('machine.group')"
min-width="55"
min-width="70"
show-overflow-tooltip
>
</el-table-column>

View File

@@ -14,7 +14,7 @@
ref="relatePageTableRef"
:pageable="false"
:page-api="accountApi.roles"
v-model:query-form="releateQuery as any"
v-model:query-form="releateQuery"
:columns="relatedColumns"
:tool-button="false"
lazy
@@ -133,6 +133,8 @@ const state = reactive({
},
releateQuery: {
id: 0, //账号id
pageNum: 1,
pageSize: 1000,
},
showResourceDialog: {
title: '',