简单汉化
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<el-option v-for="s in sites" :key="s.id" :label="s.name || s.id" :value="s.id" />
|
||||
</el-select>
|
||||
<el-select v-model="filters.status" placeholder="状态" clearable @change="loadSubjects">
|
||||
<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>
|
||||
<div class="spacer" />
|
||||
<el-button type="primary" v-if="canEdit" @click="showForm = true">新增受试者</el-button>
|
||||
@@ -24,7 +24,11 @@
|
||||
<el-table :data="subjects" v-loading="loading" style="width: 100%" @row-click="goDetail">
|
||||
<el-table-column prop="subject_no" label="受试者编号" />
|
||||
<el-table-column prop="site_id" label="中心ID" />
|
||||
<el-table-column prop="status" label="状态" width="120" />
|
||||
<el-table-column prop="status" label="状态" width="120">
|
||||
<template #default="scope">
|
||||
<el-tag>{{ statusLabel(scope.row.status) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="screening_date" label="筛选日期" width="140" />
|
||||
<el-table-column prop="enrollment_date" label="入组日期" width="140" />
|
||||
</el-table>
|
||||
@@ -128,6 +132,14 @@ onMounted(async () => {
|
||||
await loadSites();
|
||||
loadSubjects();
|
||||
});
|
||||
|
||||
const statusLabel = (v: string) =>
|
||||
({
|
||||
SCREENING: "筛选中",
|
||||
ENROLLED: "已入组",
|
||||
COMPLETED: "已完成",
|
||||
DROPPED: "已脱落",
|
||||
}[v] || v);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user