全局中文化

This commit is contained in:
Cheng Zhou
2026-01-12 11:14:04 +08:00
parent 9021c7fe2b
commit 1338fa7e2b
103 changed files with 2443 additions and 1533 deletions
+6 -5
View File
@@ -13,15 +13,15 @@
<div class="filters">
<el-input
v-model="keyword"
placeholder="搜索关键词"
:placeholder="TEXT.common.placeholders.keyword"
clearable
@keyup.enter="loadFaqs"
style="width: 260px"
/>
<el-switch v-model="onlyActive" active-text="仅启用" @change="loadFaqs" />
<el-switch v-model="onlyActive" :active-text="TEXT.common.labels.activeOnly" @change="loadFaqs" />
<div class="spacer" />
<PermissionAction action="faq.create">
<el-button type="primary" @click="openForm()">新建咨询</el-button>
<el-button type="primary" @click="openForm()">{{ TEXT.modules.knowledgeMedicalConsult.newItem }}</el-button>
</PermissionAction>
</div>
</el-card>
@@ -59,6 +59,7 @@ import { useAuthStore } from "../store/auth";
import { useStudyStore } from "../store/study";
import PermissionAction from "../components/PermissionAction.vue";
import { usePermission } from "../utils/permission";
import { TEXT } from "../locales";
const auth = useAuthStore();
const study = useStudyStore();
@@ -86,7 +87,7 @@ const loadCategories = async () => {
const { data } = await fetchFaqCategories(params);
categories.value = data.items || data || [];
} catch (e: any) {
ElMessage.error(e?.response?.data?.message || "分类加载失败");
ElMessage.error(e?.response?.data?.message || TEXT.common.messages.loadFailed);
}
};
@@ -111,7 +112,7 @@ const loadFaqs = async () => {
total.value = data.total || 0;
}
} catch (e: any) {
ElMessage.error(e?.response?.data?.message || "咨询加载失败");
ElMessage.error(e?.response?.data?.message || TEXT.common.messages.loadFailed);
} finally {
loading.value = false;
}