|
81 | 81 | ><div> |
82 | 82 | <el-row style="font-size: 14px" class="mb-8 w-full" :gutter="10"> |
83 | 83 | <el-col :span="24" class="w-full"> |
84 | | - <span class="w-full">触发周期</span> |
| 84 | + <span class="w-full">{{ $t('views.trigger.triggerCycle.title') }}</span> |
85 | 85 | </el-col> |
86 | 86 | </el-row> |
87 | 87 | <el-row style="width: 100%" :gutter="10" class="mb-8"> |
|
133 | 133 | <el-form-item> |
134 | 134 | <template #label> |
135 | 135 | <div class="flex-between"> |
136 | | - {{ $t('请求参数') }} |
| 136 | + {{ $t('views.trigger.requestParameter') }} |
137 | 137 | <el-button link type="primary" @click.stop="addParameter()"> |
138 | 138 | <AppIcon iconName="app-add-outlined" class="mr-4"></AppIcon> |
139 | 139 | </el-button> |
|
203 | 203 | </el-card> |
204 | 204 | </el-card> |
205 | 205 | </el-form-item> |
206 | | - <el-form-item label="任务执行"> |
| 206 | + <el-form-item :label="$t('views.trigger.taskExecution')"> |
207 | 207 | <el-card shadow="never" class="card-never w-full" style="--el-card-padding: 8px 12px"> |
208 | 208 | <!-- 智能体 --> |
209 | 209 | <div class="flex-between" @click="collapseData.agent = !collapseData.agent"> |
@@ -365,7 +365,8 @@ import triggerAPI from '@/api/trigger/trigger' |
365 | 365 | import toolAPI from '@/api/tool/tool' |
366 | 366 | import ToolParameter from './ToolParameter.vue' |
367 | 367 | import ApplicationParameter from './ApplicationParameter.vue' |
368 | | -import { resetUrl } from '@/utils/common' |
| 368 | +import { resetUrl } from '@/utils/common.ts' |
| 369 | +import { t } from '@/locales' |
369 | 370 | import { type FormInstance } from 'element-plus' |
370 | 371 | import Result from '@/request/Result' |
371 | 372 |
|
@@ -482,49 +483,49 @@ const openToolDialog = () => { |
482 | 483 | } |
483 | 484 | const drawer = ref<boolean>(false) |
484 | 485 | const times = Array.from({ length: 24 }, (_, i) => { |
485 | | - const t = i.toString().padStart(2, '0') + ':00' |
486 | | - return { label: t, value: t } |
| 486 | + const time = i.toString().padStart(2, '0') + ':00' |
| 487 | + return { label: time, value: time } |
487 | 488 | }) |
488 | 489 | const days = Array.from({ length: 31 }, (_, i) => { |
489 | | - const t = i.toString() + '日' |
490 | | - return { label: t, value: i.toString(), children: times } |
| 490 | + const day = i.toString() + t('views.trigger.triggerCycle.days') |
| 491 | + return { label: day, value: i.toString(), children: times } |
491 | 492 | }) |
492 | 493 | const hours = Array.from({ length: 24 }, (_, i) => { |
493 | | - const t = i.toString().padStart(2, '0') |
494 | | - return { label: t, value: i } |
| 494 | + const time = i.toString().padStart(2, '0') |
| 495 | + return { label: time, value: i } |
495 | 496 | }) |
496 | 497 | const minutes = Array.from({ length: 60 }, (_, i) => { |
497 | | - const t = i.toString().padStart(2, '0') |
498 | | - return { label: t, value: i } |
| 498 | + const time = i.toString().padStart(2, '0') |
| 499 | + return { label: time, value: i } |
499 | 500 | }) |
500 | 501 |
|
501 | 502 | const options = [ |
502 | 503 | { |
503 | 504 | value: 'daily', |
504 | | - label: '每日触发', |
| 505 | + label: t('views.trigger.triggerCycle.daily'), |
505 | 506 | multiple: true, |
506 | 507 | children: times, |
507 | 508 | }, |
508 | 509 | { |
509 | 510 | value: 'weekly', |
510 | | - label: '每周触发', |
| 511 | + label: t('views.trigger.triggerCycle.weekly'), |
511 | 512 | children: [ |
512 | | - { label: '周日', value: 7, children: times }, |
513 | | - { label: '周一', value: 1, children: times }, |
514 | | - { label: '周二', value: 2, children: times }, |
515 | | - { label: '周三', value: 3, children: times }, |
516 | | - { label: '周四', value: 4, children: times }, |
517 | | - { label: '周五', value: 5, children: times }, |
518 | | - { label: '周六', value: 6, children: times }, |
| 513 | + { label: t('views.trigger.triggerCycle.sunday'), value: 7, children: times }, |
| 514 | + { label: t('views.trigger.triggerCycle.monday'), value: 1, children: times }, |
| 515 | + { label: t('views.trigger.triggerCycle.tuesday'), value: 2, children: times }, |
| 516 | + { label: t('views.trigger.triggerCycle.wednesday'), value: 3, children: times }, |
| 517 | + { label: t('views.trigger.triggerCycle.thursday'), value: 4, children: times }, |
| 518 | + { label: t('views.trigger.triggerCycle.friday'), value: 5, children: times }, |
| 519 | + { label: t('views.trigger.triggerCycle.saturday'), value: 6, children: times }, |
519 | 520 | ], |
520 | 521 | }, |
521 | | - { value: 'monthly', label: '每月触发', children: days }, |
| 522 | + { value: 'monthly', label: t('views.trigger.triggerCycle.monthly'), children: days }, |
522 | 523 | { |
523 | 524 | value: 'interval', |
524 | | - label: '间隔触发', |
| 525 | + label: t('views.trigger.triggerCycle.interval'), |
525 | 526 | children: [ |
526 | | - { label: '小时', value: 'hours', children: hours }, |
527 | | - { label: '分钟', value: 'minutes', children: minutes }, |
| 527 | + { label: t('views.trigger.triggerCycle.hours'), value: 'hours', children: hours }, |
| 528 | + { label: t('views.trigger.triggerCycle.minutes'), value: 'minutes', children: minutes }, |
528 | 529 | ], |
529 | 530 | }, |
530 | 531 | ] |
|
0 commit comments