update translation
This commit is contained in:
1 parent
02d0c1dcd6
commit
1689347494
9 files changed
+1170
-324
No files matched your search
@@ -1,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { listWorkspaceScheduleRuns, workspaceRunExcelUrl, type ScheduleRun } from '../api/schedule';
|
||||
|
||||
const { t } = useI18n();
|
||||
const isLoading = ref(false);
|
||||
const error = ref('');
|
||||
const runs = ref<ScheduleRun[]>([]);
|
||||
@@ -12,7 +14,7 @@ const loadRuns = async () => {
|
||||
try {
|
||||
runs.value = await listWorkspaceScheduleRuns();
|
||||
} catch (e: any) {
|
||||
error.value = e?.message || '加载排程记录失败';
|
||||
error.value = e?.message || t('scheduleRuns.msg.loadFailed');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
@@ -26,27 +28,27 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="mt-6 rounded-2xl border border-slate-200 bg-white p-5">
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold text-slate-900">排程记录</h3>
|
||||
<h3 class="text-lg font-semibold text-slate-900">{{ t('scheduleRuns.title') }}</h3>
|
||||
<button class="rounded-lg border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50" @click="loadRuns">
|
||||
刷新
|
||||
{{ t('scheduleRuns.refresh') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="mb-3 text-xs text-slate-500">仅展示你是 owner 或在通知名单中的记录</p>
|
||||
<div v-if="isLoading" class="py-6 text-sm text-slate-500">加载中...</div>
|
||||
<p class="mb-3 text-xs text-slate-500">{{ t('scheduleRuns.tip') }}</p>
|
||||
<div v-if="isLoading" class="py-6 text-sm text-slate-500">{{ t('scheduleRuns.loading') }}</div>
|
||||
<div v-else-if="error" class="py-6 text-sm text-rose-500">{{ error }}</div>
|
||||
<div v-else-if="runs.length === 0" class="py-6 text-sm text-slate-400">暂无可见记录</div>
|
||||
<div v-else-if="runs.length === 0" class="py-6 text-sm text-slate-400">{{ t('scheduleRuns.empty') }}</div>
|
||||
<div v-else class="overflow-x-auto">
|
||||
<table class="w-full min-w-[920px] text-sm">
|
||||
<thead>
|
||||
<tr class="border-b border-slate-200 text-left text-slate-500">
|
||||
<th class="px-2 py-2">执行单号</th>
|
||||
<th class="px-2 py-2">排程</th>
|
||||
<th class="px-2 py-2">开始</th>
|
||||
<th class="px-2 py-2">结束</th>
|
||||
<th class="px-2 py-2">状态</th>
|
||||
<th class="px-2 py-2">处理</th>
|
||||
<th class="px-2 py-2">成功</th>
|
||||
<th class="px-2 py-2">失败</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.runNo') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.schedule') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.start') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.end') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.status') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.total') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.success') }}</th>
|
||||
<th class="px-2 py-2">{{ t('scheduleRuns.columns.failed') }}</th>
|
||||
<th class="px-2 py-2">Excel</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -61,7 +63,7 @@ onMounted(() => {
|
||||
<td class="px-2 py-2">{{ run.success_count }}</td>
|
||||
<td class="px-2 py-2">{{ run.failed_count }}</td>
|
||||
<td class="px-2 py-2">
|
||||
<a class="text-brand-600 hover:underline" :href="workspaceRunExcelUrl(run.id)" target="_blank">查看Excel</a>
|
||||
<a class="text-brand-600 hover:underline" :href="workspaceRunExcelUrl(run.id)" target="_blank">{{ t('scheduleRuns.viewExcel') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in new issue
Block a user