fix: 调度任务状态多语言
This commit is contained in:
@@ -865,10 +865,6 @@ export default {
|
||||
cronExpressionTip1: "Illustrative example: Execute tasks every 20 seconds",
|
||||
cronExpressionNew: "Generating Expressions",
|
||||
status: "Status",
|
||||
status0: "Disable",
|
||||
status1: "Opens",
|
||||
status00: "Pause",
|
||||
status01: "Active",
|
||||
statusChange: "Are you sure you want the {text} {num} job?",
|
||||
saveLog: "Recording log",
|
||||
tipRowErr: "Errors in the recording of jobs",
|
||||
|
||||
@@ -865,10 +865,6 @@ export default {
|
||||
cronExpressionTip1: "示例说明:每20秒执行任务",
|
||||
cronExpressionNew: "生成表达式",
|
||||
status: "状态",
|
||||
status0: "关闭",
|
||||
status1: "开启",
|
||||
status00: "暂停",
|
||||
status01: "正常",
|
||||
statusChange: "确定要{text} {num} 任务吗?",
|
||||
saveLog: "记录日志",
|
||||
tipRowErr: "任务记录存在错误",
|
||||
|
||||
@@ -377,8 +377,8 @@ function fnModalCron(opt: boolean, cronStr?: string) {
|
||||
function fnRecordStatus(row: Record<string, string>) {
|
||||
const text =
|
||||
row.status === '1'
|
||||
? t('views.monitor.job.status1')
|
||||
: t('views.monitor.job.status0');
|
||||
? dict.sysJobStatus.find(s => s.value === '1')?.label
|
||||
: dict.sysJobStatus.find(s => s.value === '0')?.label;
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.monitor.job.statusChange', { text, num: row.jobName }),
|
||||
@@ -403,7 +403,11 @@ function fnRecordStatus(row: Record<string, string>) {
|
||||
});
|
||||
},
|
||||
onCancel() {
|
||||
row.status = row.status === '1' ? '0' : '1';
|
||||
const value =
|
||||
row.status === '1'
|
||||
? dict.sysJobStatus.find(s => s.value === '0')?.value
|
||||
: dict.sysJobStatus.find(s => s.value === '1')?.value;
|
||||
row.status = value || '0';
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -768,9 +772,13 @@ onMounted(() => {
|
||||
v-if="hasPermissions(['monitor:job:changeStatus'])"
|
||||
v-model:checked="record.status"
|
||||
checked-value="1"
|
||||
:checked-children="t('views.monitor.job.status01')"
|
||||
:checked-children="
|
||||
dict.sysJobStatus.find(s => s.value === '1')?.label
|
||||
"
|
||||
un-checked-value="0"
|
||||
:un-checked-children="t('views.monitor.job.status00')"
|
||||
:un-checked-children="
|
||||
dict.sysJobStatus.find(s => s.value === '0')?.label
|
||||
"
|
||||
size="small"
|
||||
@change="fnRecordStatus(record)"
|
||||
/>
|
||||
@@ -858,10 +866,7 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.monitor.job.status')" name="status">
|
||||
{{
|
||||
[
|
||||
t('views.monitor.job.status00'),
|
||||
t('views.monitor.job.status01'),
|
||||
][+modalState.from.status]
|
||||
dict.sysJobStatus.find(s => s.value === modalState.from.status)?.label
|
||||
}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1086,7 +1091,7 @@ onMounted(() => {
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="18" :md="18" :xs="24">
|
||||
<a-col :lg="16" :md="16" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.monitor.job.cronExpression')"
|
||||
name="cronExpression"
|
||||
@@ -1122,7 +1127,7 @@ onMounted(() => {
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="6" :xs="24">
|
||||
<a-col :lg="8" :md="8" :xs="24">
|
||||
<a-form-item :label="t('views.monitor.job.saveLog')" name="saveLog">
|
||||
<a-select
|
||||
v-model:value="modalState.from.saveLog"
|
||||
|
||||
Reference in New Issue
Block a user