简单汉化
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
<el-card class="mb-12">
|
||||
<div class="filters">
|
||||
<el-select v-model="filters.status" placeholder="状态" clearable @change="loadQueries">
|
||||
<el-option v-for="s in statuses" :key="s" :label="s" :value="s" />
|
||||
<el-option v-for="s in statuses" :key="s" :label="statusLabel(s)" :value="s" />
|
||||
</el-select>
|
||||
<el-switch v-model="filters.overdue" active-text="仅逾期" @change="loadQueries" />
|
||||
<el-input v-model="filters.assigned_to" placeholder="指派人ID" style="width: 180px" @change="loadQueries" />
|
||||
<el-input v-model="filters.assigned_to" placeholder="负责人" style="width: 180px" @change="loadQueries" />
|
||||
<div class="spacer" />
|
||||
<el-button type="primary" v-if="canEdit" @click="showForm = true">新建 Query</el-button>
|
||||
<el-button type="primary" v-if="canEdit" @click="showForm = true">新建数据问题</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -20,12 +20,20 @@
|
||||
{{ subjectMap[scope.row.subject_id] || scope.row.subject_id || "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="category" label="类别" width="140" />
|
||||
<el-table-column prop="priority" label="优先级" width="120" />
|
||||
<el-table-column prop="category" label="类别" width="140">
|
||||
<template #default="scope">
|
||||
{{ categoryLabel(scope.row.category) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="优先级" width="120">
|
||||
<template #default="scope">
|
||||
{{ priorityLabel(scope.row.priority) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="due_date" label="截止日期" width="140" />
|
||||
<el-table-column prop="status" label="状态" width="120">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.is_overdue ? 'danger' : 'info'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag :type="scope.row.is_overdue ? 'danger' : 'info'">{{ statusLabel(scope.row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -71,6 +79,8 @@ const subjectMap = computed(() =>
|
||||
);
|
||||
|
||||
const statuses = ["OPEN", "IN_PROGRESS", "ANSWERED", "CLOSED"];
|
||||
const categories = ["MISSING", "INCONSISTENT", "OUT_OF_RANGE", "OTHER"];
|
||||
const priorities = ["LOW", "MEDIUM", "HIGH"];
|
||||
|
||||
const filters = ref({
|
||||
status: "",
|
||||
@@ -124,6 +134,29 @@ const goDetail = (row: any) => {
|
||||
router.push(`/study/data-queries/${row.id}`);
|
||||
};
|
||||
|
||||
const statusLabel = (v: string) =>
|
||||
({
|
||||
OPEN: "待处理",
|
||||
IN_PROGRESS: "处理中",
|
||||
ANSWERED: "已回复",
|
||||
CLOSED: "已关闭",
|
||||
}[v] || v);
|
||||
|
||||
const categoryLabel = (v: string) =>
|
||||
({
|
||||
MISSING: "缺失",
|
||||
INCONSISTENT: "不一致",
|
||||
OUT_OF_RANGE: "超范围",
|
||||
OTHER: "其他",
|
||||
}[v] || v);
|
||||
|
||||
const priorityLabel = (v: string) =>
|
||||
({
|
||||
LOW: "低",
|
||||
MEDIUM: "中",
|
||||
HIGH: "高",
|
||||
}[v] || v);
|
||||
|
||||
onMounted(async () => {
|
||||
if (!auth.user && auth.token) {
|
||||
await auth.fetchMe().catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user