feat(i18n): fix Element Plus locale switching, add TagsView i18n, merge maintain_keys, add tagsView translations
This commit is contained in:
@@ -1,14 +1,29 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<el-config-provider :locale="elLocale">
|
||||
<router-view />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { handleThemeStyle } from '@/utils/theme';
|
||||
import { ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
import en from 'element-plus/es/locale/lang/en';
|
||||
import vi from 'element-plus/es/locale/lang/vi';
|
||||
|
||||
const { locale } = useI18n();
|
||||
|
||||
const elLocaleMap = { 'zh-CN': zhCn, 'en': en, 'vi': vi };
|
||||
const elLocale = ref(elLocaleMap[locale.value] || zhCn);
|
||||
|
||||
watch(locale, (newLocale) => {
|
||||
elLocale.value = elLocaleMap[newLocale] || zhCn;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
handleThemeStyle(useSettingsStore().theme);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,9 +59,6 @@ export const changeLocale = async (newLocale) => {
|
||||
|
||||
Cookies.set('lang', newLocale, { expires: 365 })
|
||||
localStorage.setItem('lang', newLocale)
|
||||
|
||||
// Reload locale messages if needed
|
||||
await loadLocaleMessages()
|
||||
}
|
||||
|
||||
export const t = (key, ...params) => {
|
||||
|
||||
@@ -374,7 +374,10 @@
|
||||
"collapse": "Collapse",
|
||||
"expand": "Expand",
|
||||
"yes": "Yes",
|
||||
"no": "No"
|
||||
"no": "No",
|
||||
"startTime": "开始日期",
|
||||
"endTime": "结束日期",
|
||||
"gender": "性别"
|
||||
},
|
||||
"component": {
|
||||
"rightToolbar": {
|
||||
@@ -837,7 +840,7 @@
|
||||
"returnRegistration": "Return",
|
||||
"detail": "Detail",
|
||||
"unknown": "Unknown",
|
||||
"yuan": "",
|
||||
"yuan": "元",
|
||||
"selectAppointmentPatient": "Select Appointment Patient",
|
||||
"placeholderSearchAppointment": "Enter patient name to search",
|
||||
"seqNo": "No.",
|
||||
@@ -2573,7 +2576,7 @@
|
||||
"seq": "No.",
|
||||
"surgeryName": "Surgery Name",
|
||||
"level": "Level",
|
||||
"levelSuffix": "",
|
||||
"levelSuffix": "级",
|
||||
"host": "Host",
|
||||
"conclusion": "Conclusion",
|
||||
"agreeSurgery": "Agree Surgery",
|
||||
@@ -5422,7 +5425,15 @@
|
||||
"exportMethodFailed": "检查方法导出失败",
|
||||
"exportPartSuccess": "检查部位导出成功",
|
||||
"exportPartFailed": "检查部位导出失败",
|
||||
"notImplemented": "功能开发中"
|
||||
"notImplemented": "功能开发中",
|
||||
"rowSaved": "第 {row} 行数据已保存",
|
||||
"deleteWithChildrenSuccess": "删除成功!已删除 1 个父行和 {count} 个子行",
|
||||
"loadMethodFailed": "加载检查方法数据失败: {error}",
|
||||
"loadPartFailed": "加载检查部位数据失败: {error}",
|
||||
"loadMenuFailed": "加载{menu}数据失败,请检查网络或服务状态",
|
||||
"searchMethodSuccess": "搜索到{count}条检查方法数据",
|
||||
"searchPartSuccess": "搜索到{count}条检查部位数据",
|
||||
"searchFailed": "搜索数据失败: {error}"
|
||||
},
|
||||
"validation": {
|
||||
"codeRequired": "请输入编码",
|
||||
@@ -5433,8 +5444,254 @@
|
||||
"confirm": {
|
||||
"unsavedDelete": "确定要删除这一行吗?",
|
||||
"systemTip": "系统提示",
|
||||
"deleteRow": "删除确认"
|
||||
"deleteRow": "删除确认",
|
||||
"deleteRowWithChildren": "确定要删除这一行吗?\n该操作将同时删除 {count} 个子行数据。"
|
||||
},
|
||||
"menuManage": "{menu}管理",
|
||||
"pagination": {
|
||||
"page": "第 {page} 页"
|
||||
},
|
||||
"packageMgmt": {
|
||||
"date": "日期",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"organization": "卫生机构",
|
||||
"selectOrg": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"packageLevel": "套餐级别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"packageType": "套餐类别",
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"checkPackage": "检查套餐",
|
||||
"department": "科室",
|
||||
"selectDepartment": "请选择科室",
|
||||
"user": "用户",
|
||||
"inputUserName": "请输入用户名称",
|
||||
"query": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"comboPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enableFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"view": "查看",
|
||||
"delete": "删除",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"oldFormatHint": "旧编码格式,建议编辑套餐重新选择科室",
|
||||
"oldFormatSuffix": " (旧格式)",
|
||||
"creatorUnknown": "该套餐创建者未知,无法删除",
|
||||
"noPermission": "该套餐由\"{creator}\"创建,您没有权限删除",
|
||||
"confirmDeleteMsg": "确认删除套餐ID:{id} - {name} 吗?删除后将无法恢复",
|
||||
"confirmDelete": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败",
|
||||
"packageInUse": "该套餐已被使用,无法删除",
|
||||
"queryFailed": "查询失败",
|
||||
"loadFailed": "加载套餐数据失败",
|
||||
"loadFailedRetry": "数据加载失败,请重试"
|
||||
},
|
||||
"packageSettings": {
|
||||
"pageTitle": {
|
||||
"add": "套餐设置",
|
||||
"edit": "编辑套餐",
|
||||
"view": "查看套餐"
|
||||
},
|
||||
"btn": {
|
||||
"packageManagement": "套餐管理",
|
||||
"refresh": "刷新",
|
||||
"save": "保存",
|
||||
"confirm": "确定",
|
||||
"cancel": "取消"
|
||||
},
|
||||
"section": {
|
||||
"basicInfo": "基本信息",
|
||||
"packageDetail": "套餐明细"
|
||||
},
|
||||
"form": {
|
||||
"packageType": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室选择",
|
||||
"user": "用户选择",
|
||||
"packageName": "套餐名称",
|
||||
"organization": "卫生机构",
|
||||
"packagePrice": "套餐金额",
|
||||
"discount": "折扣",
|
||||
"creator": "制单人",
|
||||
"isDisabled": "是否停用",
|
||||
"showPackageName": "显示套餐名",
|
||||
"generateServiceFee": "生成服务费",
|
||||
"packagePriceEnabled": "套餐价格",
|
||||
"serviceFee": "服务费",
|
||||
"remark": "备注"
|
||||
},
|
||||
"placeholder": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectOrganization": "请选择卫生机构",
|
||||
"autoCalculate": "自动计算",
|
||||
"inputDiscount": "请输入折扣",
|
||||
"autoSum": "自动合计",
|
||||
"inputRemark": "请输入备注",
|
||||
"inputCode": "请输入编号",
|
||||
"searchItem": "输入名称/首字母/编号搜索",
|
||||
"inputQuantity": "请输入数量",
|
||||
"autoFetch": "自动获取"
|
||||
},
|
||||
"radio": {
|
||||
"enabled": "启用",
|
||||
"disabled": "停用",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"notEnabled": "不启用"
|
||||
},
|
||||
"table": {
|
||||
"seq": "序号",
|
||||
"code": "编号",
|
||||
"itemNameSpec": "项目名称/规格",
|
||||
"dose": "剂量",
|
||||
"method": "途径",
|
||||
"frequency": "频次",
|
||||
"days": "天数",
|
||||
"quantity": "数量",
|
||||
"unit": "单位",
|
||||
"unitPrice": "单价",
|
||||
"amount": "金额",
|
||||
"serviceCharge": "服务费",
|
||||
"total": "总金额",
|
||||
"origin": "产地",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"add": "添加",
|
||||
"delete": "删除",
|
||||
"noMatchItem": "无匹配项目",
|
||||
"tryOtherKeywords": "请尝试其他关键词",
|
||||
"noItemData": "暂无项目数据",
|
||||
"addProjectHint": "请先在【系统管理-目录管理-诊疗项目】中添加项目",
|
||||
"unnamed": "未命名"
|
||||
},
|
||||
"validation": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"message": {
|
||||
"loadItemsSuccess": "成功加载{count}个诊疗项目",
|
||||
"noItemData": "未获取到诊疗项目数据",
|
||||
"loadItemsFailed": "获取诊疗项目列表失败",
|
||||
"selectItem": "请选择项目",
|
||||
"inputValidQuantity": "请输入有效数量",
|
||||
"confirmDelete": "确定要删除这一行吗?",
|
||||
"tip": "提示",
|
||||
"deleteSuccess": "删除成功",
|
||||
"itemNotFound": "未找到该项目信息",
|
||||
"discountRange": "折扣必须在0-100之间",
|
||||
"completeRequired": "请完善必填项:",
|
||||
"addAtLeastOneItem": "请至少添加一条套餐明细",
|
||||
"confirmAllEditingRows": "请先确认所有正在编辑的行",
|
||||
"completeAllDetailItems": "请完善所有明细项目信息(项目名称和数量为必填项)",
|
||||
"saveSuccess": "套餐数据已保存",
|
||||
"saveFailed": "保存失败,请检查表单数据",
|
||||
"saveFailedWithError": "保存失败: "
|
||||
}
|
||||
}
|
||||
},
|
||||
"inspection": {
|
||||
"packageMgmt": {
|
||||
"sidebar": {
|
||||
"inspectionType": "检验类型",
|
||||
"inspectionItem": "检验项目",
|
||||
"packageSetup": "套餐设置"
|
||||
},
|
||||
"filter": {
|
||||
"date": "日期:",
|
||||
"to": "至",
|
||||
"institution": "卫生机构:",
|
||||
"packageName": "套餐名称:",
|
||||
"packageLevel": "套餐级别:",
|
||||
"packageCategory": "套餐类别:",
|
||||
"department": "科室:",
|
||||
"user": "用户:"
|
||||
},
|
||||
"placeholder": {
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"selectInstitution": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"options": {
|
||||
"hospitalPackage": "全院套餐",
|
||||
"departmentPackage": "科室套餐",
|
||||
"personalPackage": "个人套餐",
|
||||
"inspectionPackage": "检验套餐"
|
||||
},
|
||||
"button": {
|
||||
"search": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"export": "导出",
|
||||
"back": "返回"
|
||||
},
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"institution": "卫生机构",
|
||||
"date": "日期",
|
||||
"packageName": "套餐名称",
|
||||
"packageCategory": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室",
|
||||
"user": "用户",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"combinedPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enabledFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"action": "操作"
|
||||
},
|
||||
"pagination": {
|
||||
"total": "总数:"
|
||||
},
|
||||
"message": {
|
||||
"loadUserListFailed": "加载用户列表失败",
|
||||
"loadDataFailed": "加载数据失败: ",
|
||||
"unknownError": "未知错误",
|
||||
"fetchInstitutionFailed": "获取机构列表失败",
|
||||
"cannotGetPackageId": "无法获取套餐ID,请刷新页面后重试",
|
||||
"cannotGetPackageIdDelete": "无法获取套餐ID,删除失败",
|
||||
"confirmDelete": "确定要删除套餐 \"{name}\" 吗?删除后将无法恢复。",
|
||||
"confirmDeleteTitle": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tagsView": {
|
||||
"refresh": "Refresh",
|
||||
"closeCurrent": "Close Current",
|
||||
"closeOthers": "Close Others",
|
||||
"closeLeft": "Close Left",
|
||||
"closeRight": "Close Right",
|
||||
"closeAll": "Close All"
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,10 @@
|
||||
"collapse": "Thu gọn",
|
||||
"expand": "Mở rộng",
|
||||
"yes": "Có",
|
||||
"no": "Không"
|
||||
"no": "Không",
|
||||
"startTime": "开始日期",
|
||||
"endTime": "结束日期",
|
||||
"gender": "性别"
|
||||
},
|
||||
"component": {
|
||||
"rightToolbar": {
|
||||
@@ -837,7 +840,7 @@
|
||||
"returnRegistration": "Hủy",
|
||||
"detail": "Chi Tiết",
|
||||
"unknown": "Không Rõ",
|
||||
"yuan": "",
|
||||
"yuan": "元",
|
||||
"selectAppointmentPatient": "Chọn Bệnh Nhân Lịch Hẹn",
|
||||
"placeholderSearchAppointment": "Nhập tên bệnh nhân để tìm",
|
||||
"seqNo": "STT",
|
||||
@@ -2573,7 +2576,7 @@
|
||||
"seq": "STT",
|
||||
"surgeryName": "Tên phẫu thuật",
|
||||
"level": "Cấp",
|
||||
"levelSuffix": "",
|
||||
"levelSuffix": "级",
|
||||
"host": "Chủ trì",
|
||||
"conclusion": "Kết luận",
|
||||
"agreeSurgery": "Đồng ý phẫu thuật",
|
||||
@@ -5422,7 +5425,15 @@
|
||||
"exportMethodFailed": "检查方法导出失败",
|
||||
"exportPartSuccess": "检查部位导出成功",
|
||||
"exportPartFailed": "检查部位导出失败",
|
||||
"notImplemented": "功能开发中"
|
||||
"notImplemented": "功能开发中",
|
||||
"rowSaved": "第 {row} 行数据已保存",
|
||||
"deleteWithChildrenSuccess": "删除成功!已删除 1 个父行和 {count} 个子行",
|
||||
"loadMethodFailed": "加载检查方法数据失败: {error}",
|
||||
"loadPartFailed": "加载检查部位数据失败: {error}",
|
||||
"loadMenuFailed": "加载{menu}数据失败,请检查网络或服务状态",
|
||||
"searchMethodSuccess": "搜索到{count}条检查方法数据",
|
||||
"searchPartSuccess": "搜索到{count}条检查部位数据",
|
||||
"searchFailed": "搜索数据失败: {error}"
|
||||
},
|
||||
"validation": {
|
||||
"codeRequired": "请输入编码",
|
||||
@@ -5433,8 +5444,254 @@
|
||||
"confirm": {
|
||||
"unsavedDelete": "确定要删除这一行吗?",
|
||||
"systemTip": "系统提示",
|
||||
"deleteRow": "删除确认"
|
||||
"deleteRow": "删除确认",
|
||||
"deleteRowWithChildren": "确定要删除这一行吗?\n该操作将同时删除 {count} 个子行数据。"
|
||||
},
|
||||
"menuManage": "{menu}管理",
|
||||
"pagination": {
|
||||
"page": "第 {page} 页"
|
||||
},
|
||||
"packageMgmt": {
|
||||
"date": "日期",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"organization": "卫生机构",
|
||||
"selectOrg": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"packageLevel": "套餐级别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"packageType": "套餐类别",
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"checkPackage": "检查套餐",
|
||||
"department": "科室",
|
||||
"selectDepartment": "请选择科室",
|
||||
"user": "用户",
|
||||
"inputUserName": "请输入用户名称",
|
||||
"query": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"comboPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enableFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"view": "查看",
|
||||
"delete": "删除",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"oldFormatHint": "旧编码格式,建议编辑套餐重新选择科室",
|
||||
"oldFormatSuffix": " (旧格式)",
|
||||
"creatorUnknown": "该套餐创建者未知,无法删除",
|
||||
"noPermission": "该套餐由\"{creator}\"创建,您没有权限删除",
|
||||
"confirmDeleteMsg": "确认删除套餐ID:{id} - {name} 吗?删除后将无法恢复",
|
||||
"confirmDelete": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败",
|
||||
"packageInUse": "该套餐已被使用,无法删除",
|
||||
"queryFailed": "查询失败",
|
||||
"loadFailed": "加载套餐数据失败",
|
||||
"loadFailedRetry": "数据加载失败,请重试"
|
||||
},
|
||||
"packageSettings": {
|
||||
"pageTitle": {
|
||||
"add": "套餐设置",
|
||||
"edit": "编辑套餐",
|
||||
"view": "查看套餐"
|
||||
},
|
||||
"btn": {
|
||||
"packageManagement": "套餐管理",
|
||||
"refresh": "刷新",
|
||||
"save": "保存",
|
||||
"confirm": "确定",
|
||||
"cancel": "取消"
|
||||
},
|
||||
"section": {
|
||||
"basicInfo": "基本信息",
|
||||
"packageDetail": "套餐明细"
|
||||
},
|
||||
"form": {
|
||||
"packageType": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室选择",
|
||||
"user": "用户选择",
|
||||
"packageName": "套餐名称",
|
||||
"organization": "卫生机构",
|
||||
"packagePrice": "套餐金额",
|
||||
"discount": "折扣",
|
||||
"creator": "制单人",
|
||||
"isDisabled": "是否停用",
|
||||
"showPackageName": "显示套餐名",
|
||||
"generateServiceFee": "生成服务费",
|
||||
"packagePriceEnabled": "套餐价格",
|
||||
"serviceFee": "服务费",
|
||||
"remark": "备注"
|
||||
},
|
||||
"placeholder": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectOrganization": "请选择卫生机构",
|
||||
"autoCalculate": "自动计算",
|
||||
"inputDiscount": "请输入折扣",
|
||||
"autoSum": "自动合计",
|
||||
"inputRemark": "请输入备注",
|
||||
"inputCode": "请输入编号",
|
||||
"searchItem": "输入名称/首字母/编号搜索",
|
||||
"inputQuantity": "请输入数量",
|
||||
"autoFetch": "自动获取"
|
||||
},
|
||||
"radio": {
|
||||
"enabled": "启用",
|
||||
"disabled": "停用",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"notEnabled": "不启用"
|
||||
},
|
||||
"table": {
|
||||
"seq": "序号",
|
||||
"code": "编号",
|
||||
"itemNameSpec": "项目名称/规格",
|
||||
"dose": "剂量",
|
||||
"method": "途径",
|
||||
"frequency": "频次",
|
||||
"days": "天数",
|
||||
"quantity": "数量",
|
||||
"unit": "单位",
|
||||
"unitPrice": "单价",
|
||||
"amount": "金额",
|
||||
"serviceCharge": "服务费",
|
||||
"total": "总金额",
|
||||
"origin": "产地",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"add": "添加",
|
||||
"delete": "删除",
|
||||
"noMatchItem": "无匹配项目",
|
||||
"tryOtherKeywords": "请尝试其他关键词",
|
||||
"noItemData": "暂无项目数据",
|
||||
"addProjectHint": "请先在【系统管理-目录管理-诊疗项目】中添加项目",
|
||||
"unnamed": "未命名"
|
||||
},
|
||||
"validation": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"message": {
|
||||
"loadItemsSuccess": "成功加载{count}个诊疗项目",
|
||||
"noItemData": "未获取到诊疗项目数据",
|
||||
"loadItemsFailed": "获取诊疗项目列表失败",
|
||||
"selectItem": "请选择项目",
|
||||
"inputValidQuantity": "请输入有效数量",
|
||||
"confirmDelete": "确定要删除这一行吗?",
|
||||
"tip": "提示",
|
||||
"deleteSuccess": "删除成功",
|
||||
"itemNotFound": "未找到该项目信息",
|
||||
"discountRange": "折扣必须在0-100之间",
|
||||
"completeRequired": "请完善必填项:",
|
||||
"addAtLeastOneItem": "请至少添加一条套餐明细",
|
||||
"confirmAllEditingRows": "请先确认所有正在编辑的行",
|
||||
"completeAllDetailItems": "请完善所有明细项目信息(项目名称和数量为必填项)",
|
||||
"saveSuccess": "套餐数据已保存",
|
||||
"saveFailed": "保存失败,请检查表单数据",
|
||||
"saveFailedWithError": "保存失败: "
|
||||
}
|
||||
}
|
||||
},
|
||||
"inspection": {
|
||||
"packageMgmt": {
|
||||
"sidebar": {
|
||||
"inspectionType": "检验类型",
|
||||
"inspectionItem": "检验项目",
|
||||
"packageSetup": "套餐设置"
|
||||
},
|
||||
"filter": {
|
||||
"date": "日期:",
|
||||
"to": "至",
|
||||
"institution": "卫生机构:",
|
||||
"packageName": "套餐名称:",
|
||||
"packageLevel": "套餐级别:",
|
||||
"packageCategory": "套餐类别:",
|
||||
"department": "科室:",
|
||||
"user": "用户:"
|
||||
},
|
||||
"placeholder": {
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"selectInstitution": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"options": {
|
||||
"hospitalPackage": "全院套餐",
|
||||
"departmentPackage": "科室套餐",
|
||||
"personalPackage": "个人套餐",
|
||||
"inspectionPackage": "检验套餐"
|
||||
},
|
||||
"button": {
|
||||
"search": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"export": "导出",
|
||||
"back": "返回"
|
||||
},
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"institution": "卫生机构",
|
||||
"date": "日期",
|
||||
"packageName": "套餐名称",
|
||||
"packageCategory": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室",
|
||||
"user": "用户",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"combinedPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enabledFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"action": "操作"
|
||||
},
|
||||
"pagination": {
|
||||
"total": "总数:"
|
||||
},
|
||||
"message": {
|
||||
"loadUserListFailed": "加载用户列表失败",
|
||||
"loadDataFailed": "加载数据失败: ",
|
||||
"unknownError": "未知错误",
|
||||
"fetchInstitutionFailed": "获取机构列表失败",
|
||||
"cannotGetPackageId": "无法获取套餐ID,请刷新页面后重试",
|
||||
"cannotGetPackageIdDelete": "无法获取套餐ID,删除失败",
|
||||
"confirmDelete": "确定要删除套餐 \"{name}\" 吗?删除后将无法恢复。",
|
||||
"confirmDeleteTitle": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tagsView": {
|
||||
"refresh": "Làm mới",
|
||||
"closeCurrent": "Đóng hiện tại",
|
||||
"closeOthers": "Đóng khác",
|
||||
"closeLeft": "Đóng trái",
|
||||
"closeRight": "Đóng phải",
|
||||
"closeAll": "Đóng tất cả"
|
||||
}
|
||||
}
|
||||
@@ -5424,7 +5424,15 @@
|
||||
"exportMethodFailed": "检查方法导出失败",
|
||||
"exportPartSuccess": "检查部位导出成功",
|
||||
"exportPartFailed": "检查部位导出失败",
|
||||
"notImplemented": "功能开发中"
|
||||
"notImplemented": "功能开发中",
|
||||
"rowSaved": "第 {row} 行数据已保存",
|
||||
"deleteWithChildrenSuccess": "删除成功!已删除 1 个父行和 {count} 个子行",
|
||||
"loadMethodFailed": "加载检查方法数据失败: {error}",
|
||||
"loadPartFailed": "加载检查部位数据失败: {error}",
|
||||
"loadMenuFailed": "加载{menu}数据失败,请检查网络或服务状态",
|
||||
"searchMethodSuccess": "搜索到{count}条检查方法数据",
|
||||
"searchPartSuccess": "搜索到{count}条检查部位数据",
|
||||
"searchFailed": "搜索数据失败: {error}"
|
||||
},
|
||||
"validation": {
|
||||
"codeRequired": "请输入编码",
|
||||
@@ -5435,8 +5443,254 @@
|
||||
"confirm": {
|
||||
"unsavedDelete": "确定要删除这一行吗?",
|
||||
"systemTip": "系统提示",
|
||||
"deleteRow": "删除确认"
|
||||
"deleteRow": "删除确认",
|
||||
"deleteRowWithChildren": "确定要删除这一行吗?\n该操作将同时删除 {count} 个子行数据。"
|
||||
},
|
||||
"menuManage": "{menu}管理",
|
||||
"pagination": {
|
||||
"page": "第 {page} 页"
|
||||
},
|
||||
"packageMgmt": {
|
||||
"date": "日期",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"organization": "卫生机构",
|
||||
"selectOrg": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"packageLevel": "套餐级别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"packageType": "套餐类别",
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"checkPackage": "检查套餐",
|
||||
"department": "科室",
|
||||
"selectDepartment": "请选择科室",
|
||||
"user": "用户",
|
||||
"inputUserName": "请输入用户名称",
|
||||
"query": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"comboPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enableFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"view": "查看",
|
||||
"delete": "删除",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"oldFormatHint": "旧编码格式,建议编辑套餐重新选择科室",
|
||||
"oldFormatSuffix": " (旧格式)",
|
||||
"creatorUnknown": "该套餐创建者未知,无法删除",
|
||||
"noPermission": "该套餐由\"{creator}\"创建,您没有权限删除",
|
||||
"confirmDeleteMsg": "确认删除套餐ID:{id} - {name} 吗?删除后将无法恢复",
|
||||
"confirmDelete": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败",
|
||||
"packageInUse": "该套餐已被使用,无法删除",
|
||||
"queryFailed": "查询失败",
|
||||
"loadFailed": "加载套餐数据失败",
|
||||
"loadFailedRetry": "数据加载失败,请重试"
|
||||
},
|
||||
"packageSettings": {
|
||||
"pageTitle": {
|
||||
"add": "套餐设置",
|
||||
"edit": "编辑套餐",
|
||||
"view": "查看套餐"
|
||||
},
|
||||
"btn": {
|
||||
"packageManagement": "套餐管理",
|
||||
"refresh": "刷新",
|
||||
"save": "保存",
|
||||
"confirm": "确定",
|
||||
"cancel": "取消"
|
||||
},
|
||||
"section": {
|
||||
"basicInfo": "基本信息",
|
||||
"packageDetail": "套餐明细"
|
||||
},
|
||||
"form": {
|
||||
"packageType": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室选择",
|
||||
"user": "用户选择",
|
||||
"packageName": "套餐名称",
|
||||
"organization": "卫生机构",
|
||||
"packagePrice": "套餐金额",
|
||||
"discount": "折扣",
|
||||
"creator": "制单人",
|
||||
"isDisabled": "是否停用",
|
||||
"showPackageName": "显示套餐名",
|
||||
"generateServiceFee": "生成服务费",
|
||||
"packagePriceEnabled": "套餐价格",
|
||||
"serviceFee": "服务费",
|
||||
"remark": "备注"
|
||||
},
|
||||
"placeholder": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectOrganization": "请选择卫生机构",
|
||||
"autoCalculate": "自动计算",
|
||||
"inputDiscount": "请输入折扣",
|
||||
"autoSum": "自动合计",
|
||||
"inputRemark": "请输入备注",
|
||||
"inputCode": "请输入编号",
|
||||
"searchItem": "输入名称/首字母/编号搜索",
|
||||
"inputQuantity": "请输入数量",
|
||||
"autoFetch": "自动获取"
|
||||
},
|
||||
"radio": {
|
||||
"enabled": "启用",
|
||||
"disabled": "停用",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"notEnabled": "不启用"
|
||||
},
|
||||
"table": {
|
||||
"seq": "序号",
|
||||
"code": "编号",
|
||||
"itemNameSpec": "项目名称/规格",
|
||||
"dose": "剂量",
|
||||
"method": "途径",
|
||||
"frequency": "频次",
|
||||
"days": "天数",
|
||||
"quantity": "数量",
|
||||
"unit": "单位",
|
||||
"unitPrice": "单价",
|
||||
"amount": "金额",
|
||||
"serviceCharge": "服务费",
|
||||
"total": "总金额",
|
||||
"origin": "产地",
|
||||
"actions": "操作",
|
||||
"edit": "编辑",
|
||||
"add": "添加",
|
||||
"delete": "删除",
|
||||
"noMatchItem": "无匹配项目",
|
||||
"tryOtherKeywords": "请尝试其他关键词",
|
||||
"noItemData": "暂无项目数据",
|
||||
"addProjectHint": "请先在【系统管理-目录管理-诊疗项目】中添加项目",
|
||||
"unnamed": "未命名"
|
||||
},
|
||||
"validation": {
|
||||
"selectPackageType": "请选择套餐类别",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"inputPackageName": "请输入套餐名称",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"message": {
|
||||
"loadItemsSuccess": "成功加载{count}个诊疗项目",
|
||||
"noItemData": "未获取到诊疗项目数据",
|
||||
"loadItemsFailed": "获取诊疗项目列表失败",
|
||||
"selectItem": "请选择项目",
|
||||
"inputValidQuantity": "请输入有效数量",
|
||||
"confirmDelete": "确定要删除这一行吗?",
|
||||
"tip": "提示",
|
||||
"deleteSuccess": "删除成功",
|
||||
"itemNotFound": "未找到该项目信息",
|
||||
"discountRange": "折扣必须在0-100之间",
|
||||
"completeRequired": "请完善必填项:",
|
||||
"addAtLeastOneItem": "请至少添加一条套餐明细",
|
||||
"confirmAllEditingRows": "请先确认所有正在编辑的行",
|
||||
"completeAllDetailItems": "请完善所有明细项目信息(项目名称和数量为必填项)",
|
||||
"saveSuccess": "套餐数据已保存",
|
||||
"saveFailed": "保存失败,请检查表单数据",
|
||||
"saveFailedWithError": "保存失败: "
|
||||
}
|
||||
}
|
||||
},
|
||||
"inspection": {
|
||||
"packageMgmt": {
|
||||
"sidebar": {
|
||||
"inspectionType": "检验类型",
|
||||
"inspectionItem": "检验项目",
|
||||
"packageSetup": "套餐设置"
|
||||
},
|
||||
"filter": {
|
||||
"date": "日期:",
|
||||
"to": "至",
|
||||
"institution": "卫生机构:",
|
||||
"packageName": "套餐名称:",
|
||||
"packageLevel": "套餐级别:",
|
||||
"packageCategory": "套餐类别:",
|
||||
"department": "科室:",
|
||||
"user": "用户:"
|
||||
},
|
||||
"placeholder": {
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"selectInstitution": "请选择机构",
|
||||
"packageName": "套餐名称",
|
||||
"selectPackageLevel": "请选择套餐级别",
|
||||
"selectDepartment": "请选择科室",
|
||||
"selectUser": "请选择用户"
|
||||
},
|
||||
"options": {
|
||||
"hospitalPackage": "全院套餐",
|
||||
"departmentPackage": "科室套餐",
|
||||
"personalPackage": "个人套餐",
|
||||
"inspectionPackage": "检验套餐"
|
||||
},
|
||||
"button": {
|
||||
"search": "查询",
|
||||
"reset": "重置",
|
||||
"add": "新增",
|
||||
"export": "导出",
|
||||
"back": "返回"
|
||||
},
|
||||
"table": {
|
||||
"id": "ID",
|
||||
"institution": "卫生机构",
|
||||
"date": "日期",
|
||||
"packageName": "套餐名称",
|
||||
"packageCategory": "套餐类别",
|
||||
"packageLevel": "套餐级别",
|
||||
"department": "科室",
|
||||
"user": "用户",
|
||||
"amount": "金额",
|
||||
"serviceFee": "服务费",
|
||||
"totalAmount": "总金额",
|
||||
"combinedPackage": "组合套餐",
|
||||
"showPackageName": "显示套餐名",
|
||||
"enabledFlag": "启用标志",
|
||||
"operator": "操作人",
|
||||
"action": "操作"
|
||||
},
|
||||
"pagination": {
|
||||
"total": "总数:"
|
||||
},
|
||||
"message": {
|
||||
"loadUserListFailed": "加载用户列表失败",
|
||||
"loadDataFailed": "加载数据失败: ",
|
||||
"unknownError": "未知错误",
|
||||
"fetchInstitutionFailed": "获取机构列表失败",
|
||||
"cannotGetPackageId": "无法获取套餐ID,请刷新页面后重试",
|
||||
"cannotGetPackageIdDelete": "无法获取套餐ID,删除失败",
|
||||
"confirmDelete": "确定要删除套餐 \"{name}\" 吗?删除后将无法恢复。",
|
||||
"confirmDeleteTitle": "确认删除",
|
||||
"confirmDeleteBtn": "确定删除",
|
||||
"cancel": "取消",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tagsView": {
|
||||
"refresh": "刷新页面",
|
||||
"closeCurrent": "关闭当前",
|
||||
"closeOthers": "关闭其他",
|
||||
"closeLeft": "关闭左侧",
|
||||
"closeRight": "关闭右侧",
|
||||
"closeAll": "全部关闭"
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
|
||||
@contextmenu.prevent="openMenu(tag, $event)"
|
||||
>
|
||||
{{ tag.title }}
|
||||
{{ translateTitle(tag.title) }}
|
||||
<span
|
||||
v-if="!isAffix(tag)"
|
||||
@click.prevent.stop="closeSelectedTag(tag)"
|
||||
@@ -38,31 +38,31 @@
|
||||
class="contextmenu"
|
||||
>
|
||||
<li @click="refreshSelectedTag(selectedTag)">
|
||||
<refresh-right style="width: 1em; height: 1em" /> 刷新页面
|
||||
<refresh-right style="width: 1em; height: 1em" /> {{ $t('tagsView.refresh') }}
|
||||
</li>
|
||||
<li
|
||||
v-if="!isAffix(selectedTag)"
|
||||
@click="closeSelectedTag(selectedTag)"
|
||||
>
|
||||
<close style="width: 1em; height: 1em" /> 关闭当前
|
||||
<close style="width: 1em; height: 1em" /> {{ $t('tagsView.closeCurrent') }}
|
||||
</li>
|
||||
<li @click="closeOthersTags">
|
||||
<circle-close style="width: 1em; height: 1em" /> 关闭其他
|
||||
<circle-close style="width: 1em; height: 1em" /> {{ $t('tagsView.closeOthers') }}
|
||||
</li>
|
||||
<li
|
||||
v-if="!isFirstView()"
|
||||
@click="closeLeftTags"
|
||||
>
|
||||
<back style="width: 1em; height: 1em" /> 关闭左侧
|
||||
<back style="width: 1em; height: 1em" /> {{ $t('tagsView.closeLeft') }}
|
||||
</li>
|
||||
<li
|
||||
v-if="!isLastView()"
|
||||
@click="closeRightTags"
|
||||
>
|
||||
<right style="width: 1em; height: 1em" /> 关闭右侧
|
||||
<right style="width: 1em; height: 1em" /> {{ $t('tagsView.closeRight') }}
|
||||
</li>
|
||||
<li @click="closeAllTags(selectedTag)">
|
||||
<circle-close style="width: 1em; height: 1em" /> 全部关闭
|
||||
<circle-close style="width: 1em; height: 1em" /> {{ $t('tagsView.closeAll') }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -74,6 +74,16 @@ import {getNormalPath} from '@/utils/his';
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import usePermissionStore from '@/store/modules/permission';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import menuTitleMap from '../Sidebar/menuTitleMap';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
function translateTitle(title) {
|
||||
if (!title) return '';
|
||||
const key = menuTitleMap[title];
|
||||
return key ? t(key) : title;
|
||||
}
|
||||
|
||||
const visible = ref(false);
|
||||
const top = ref(0);
|
||||
|
||||
@@ -5,11 +5,9 @@ import 'vxe-table/lib/style.css';
|
||||
import { VxeTooltip } from 'vxe-pc-ui';
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
// 导入 hiprint 并挂载到全局 window 对象
|
||||
import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint';
|
||||
|
||||
import ElementPlus, {ElDialog, ElMessage} from 'element-plus';
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn';
|
||||
import 'element-plus/dist/index.css';
|
||||
|
||||
import '@/assets/styles/index.scss'; // global css
|
||||
@@ -17,11 +15,10 @@ import App from './App';
|
||||
import store from './store';
|
||||
import router from './router';
|
||||
import directive from './directive'; // directive
|
||||
// 注册指令
|
||||
import plugins from './plugins'; // plugins
|
||||
import {download, downloadGet} from '@/utils/request';
|
||||
|
||||
// svg图标
|
||||
// svg图标
|
||||
import 'virtual:svg-icons-register';
|
||||
import SvgIcon from '@/components/SvgIcon';
|
||||
import elementIcons from '@/components/SvgIcon/svgicon';
|
||||
@@ -32,30 +29,30 @@ import {addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectD
|
||||
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
|
||||
// 分页组件
|
||||
// 通用组件
|
||||
import Pagination from '@/components/Pagination';
|
||||
// 自定义表格工具组件
|
||||
// 分页组件
|
||||
import RightToolbar from '@/components/RightToolbar';
|
||||
// 富文本组件
|
||||
// 上传组件
|
||||
import Editor from '@/components/Editor';
|
||||
// 文件上传组件
|
||||
// 文件上传
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
// 图片上传组件
|
||||
// 图片上传
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
// 图片预览组件
|
||||
// 图片预览
|
||||
import ImagePreview from '@/components/ImagePreview';
|
||||
// 自定义树选择组件
|
||||
// 树下拉
|
||||
import TreeSelect from '@/components/TreeSelect';
|
||||
// Ã¥ÂÂÂâ€â€Â典标ç¾组件
|
||||
// 字典标签
|
||||
import DictTag from '@/components/DictTag';
|
||||
|
||||
// 导入请求工具
|
||||
// 动态组件注册
|
||||
|
||||
import {registerComponents} from './template';
|
||||
|
||||
window.hiprint = hiprint;
|
||||
|
||||
// åˆÂÂÂ始化 hiprint,使çâ€Â¨默认元素类型æÂÂÂÂÂÂ供器(æâ€Â¯挠tableã€ÂÂÂtextã€ÂÂÂimage ç‰元素)
|
||||
// 初始化hiprint
|
||||
hiprint.init({
|
||||
providers: [new defaultElementTypeProvider()]
|
||||
});
|
||||
@@ -85,75 +82,91 @@ console.error = (...args) => {
|
||||
_origError.apply(console, args);
|
||||
};
|
||||
|
||||
const app = createApp(App);
|
||||
async function bootstrap() {
|
||||
const {initI18n} = await import('@/i18n');
|
||||
const i18n = await initI18n();
|
||||
|
||||
// 全局方法挂载
|
||||
app.config.globalProperties.useDict = useDict;
|
||||
app.config.globalProperties.download = download;
|
||||
app.config.globalProperties.downloadGet = downloadGet;
|
||||
app.config.globalProperties.parseTime = parseTime;
|
||||
app.config.globalProperties.resetForm = resetForm;
|
||||
app.config.globalProperties.handleTree = handleTree;
|
||||
app.config.globalProperties.addDateRange = addDateRange;
|
||||
app.config.globalProperties.selectDictLabel = selectDictLabel;
|
||||
app.config.globalProperties.selectDictLabels = selectDictLabels;
|
||||
app.config.globalProperties.formatDateStr = formatDateStr;
|
||||
// 全局组件挂载
|
||||
app.component('DictTag', DictTag);
|
||||
app.component('Pagination', Pagination);
|
||||
app.component('TreeSelect', TreeSelect);
|
||||
app.component('FileUpload', FileUpload);
|
||||
app.component('ImageUpload', ImageUpload);
|
||||
app.component('ImagePreview', ImagePreview);
|
||||
app.component('RightToolbar', RightToolbar);
|
||||
app.component('Editor', Editor);
|
||||
app.use(registerComponents);
|
||||
app.use(router);
|
||||
app.use(store);
|
||||
app.use(plugins);
|
||||
app.use(elementIcons);
|
||||
app.component('SvgIcon', SvgIcon);
|
||||
directive(app);
|
||||
// 全局ç¦ÂÂÂæÂ¢点击é®罩层关éâ€â€ÂÂÂÂå¼¹çªâ€â€Â
|
||||
ElDialog.props.closeOnClickModal.default = false;
|
||||
// 使çâ€Â¨element-plus å¹¶ä¸â€ÂÂ设置全局的大å°ÂÂÂ
|
||||
app.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
// æâ€Â¯挠largeã€ÂÂÂdefaultã€ÂÂÂsmall
|
||||
size: Cookies.get('size') || 'default',
|
||||
});
|
||||
// Register vxe-tooltip component required by vxe-table v4 for show-overflow="title"
|
||||
VxeUIAll.VxeUI.component(VxeTooltip);
|
||||
// Register element-plus render plugin for declarative editRender (ElSelect, ElInput etc.)
|
||||
import VXETablePluginRenderElement from '@vxe-ui/plugin-render-element';
|
||||
VxeUIAll.VxeUI.use(VXETablePluginRenderElement);
|
||||
app.use(VxeUIAll);
|
||||
const app = createApp(App);
|
||||
|
||||
// 导入公告帮助工具
|
||||
import { initNoticePopupAfterLogin } from '@/utils/noticeHelper'
|
||||
// 设置全局属性
|
||||
app.config.globalProperties.useDict = useDict;
|
||||
app.config.globalProperties.download = download;
|
||||
app.config.globalProperties.downloadGet = downloadGet;
|
||||
app.config.globalProperties.parseTime = parseTime;
|
||||
app.config.globalProperties.resetForm = resetForm;
|
||||
app.config.globalProperties.handleTree = handleTree;
|
||||
app.config.globalProperties.addDateRange = addDateRange;
|
||||
app.config.globalProperties.selectDictLabel = selectDictLabel;
|
||||
app.config.globalProperties.selectDictLabels = selectDictLabels;
|
||||
app.config.globalProperties.formatDateStr = formatDateStr;
|
||||
// 注册全局组件
|
||||
app.component('DictTag', DictTag);
|
||||
app.component('Pagination', Pagination);
|
||||
app.component('TreeSelect', TreeSelect);
|
||||
app.component('FileUpload', FileUpload);
|
||||
app.component('ImageUpload', ImageUpload);
|
||||
app.component('ImagePreview', ImagePreview);
|
||||
app.component('RightToolbar', RightToolbar);
|
||||
app.component('Editor', Editor);
|
||||
app.use(registerComponents);
|
||||
app.use(router);
|
||||
app.use(store);
|
||||
app.use(plugins);
|
||||
app.use(elementIcons);
|
||||
app.component('SvgIcon', SvgIcon);
|
||||
directive(app);
|
||||
// 设置 el-dialog 关闭点击遮罩无效
|
||||
ElDialog.props.closeOnClickModal.default = false;
|
||||
// Element Plus locale mapping
|
||||
const elLocaleMap = {
|
||||
'zh-CN': () => import('element-plus/es/locale/lang/zh-cn'),
|
||||
'en': () => import('element-plus/es/locale/lang/en'),
|
||||
'vi': () => import('element-plus/es/locale/lang/vi')
|
||||
};
|
||||
const savedLang = Cookies.get('lang') || localStorage.getItem('lang') || 'zh-CN';
|
||||
let elLocale = (await elLocaleMap[savedLang]?.())?.default || (await elLocaleMap['zh-CN']()).default;
|
||||
|
||||
// Global error handler: suppress el-form teardown errors from vxe-table expand rows
|
||||
app.config.errorHandler = (err, vm, info) => {
|
||||
const name = vm?.$?.type?.name ?? '';
|
||||
if (name.includes('LabelWrap') || name.includes('ElForm') || name.includes('FormItem')) return;
|
||||
console.error(err);
|
||||
};
|
||||
window.addEventListener('unhandledrejection', (e) => {
|
||||
const msg = e?.reason?.message ?? e?.reason?.toString?.() ?? '';
|
||||
const stack = e?.reason?.stack ?? '';
|
||||
const all = msg + ' ' + stack;
|
||||
if (all.includes('form-label') || all.includes('LabelWrap') || all.includes('ElForm') || all.includes('FormItem') || all.includes('deregisterLabel') || all.includes('labelPosition') || all.includes('autoLabel') || all.includes('label') || all.includes('width') || all.includes('NaN') || all.includes('formContext')) { e.preventDefault(); }
|
||||
});
|
||||
// 使用element-plus 设置默认字体大小
|
||||
app.use(ElementPlus, {
|
||||
locale: elLocale,
|
||||
// 设置element-plus 组件大小default|small|large
|
||||
size: Cookies.get('size') || 'default',
|
||||
});
|
||||
// Register vxe-tooltip component required by vxe-table v4 for show-overflow="title"
|
||||
VxeUIAll.VxeUI.component(VxeTooltip);
|
||||
// Register element-plus render plugin for declarative editRender (ElSelect, ElInput etc.)
|
||||
import('@vxe-ui/plugin-render-element').then(({default: VXETablePluginRenderElement}) => {
|
||||
VxeUIAll.VxeUI.use(VXETablePluginRenderElement);
|
||||
});
|
||||
app.use(VxeUIAll);
|
||||
|
||||
// Catch uncaught errors from el-form teardown in vxe-table expand rows
|
||||
window.addEventListener("error", (e) => {
|
||||
const stack = e?.error?.stack ?? "";
|
||||
if (stack.includes("form-label") || stack.includes("LabelWrap") || stack.includes("ElForm") || stack.includes("FormItem") || stack.includes("deregisterLabel")) { e.preventDefault(); return true; }
|
||||
}, true);
|
||||
// 首页通知弹窗延迟加载
|
||||
|
||||
// åºâ€ÂÂçâ€Â¨å¯åЍåÂÂÂŽåˆÂÂÂ始化公告弹çªâ€â€Â功能
|
||||
nextTick(() => {
|
||||
initNoticePopupAfterLogin()
|
||||
})
|
||||
// Global error handler: suppress el-form teardown errors from vxe-table expand rows
|
||||
app.config.errorHandler = (err, vm, info) => {
|
||||
const name = vm?.$?.type?.name ?? '';
|
||||
if (name.includes('LabelWrap') || name.includes('ElForm') || name.includes('FormItem')) return;
|
||||
console.error(err);
|
||||
};
|
||||
window.addEventListener('unhandledrejection', (e) => {
|
||||
const msg = e?.reason?.message ?? e?.reason?.toString?.() ?? '';
|
||||
const stack = e?.reason?.stack ?? '';
|
||||
const all = msg + ' ' + stack;
|
||||
if (all.includes('form-label') || all.includes('LabelWrap') || all.includes('ElForm') || all.includes('FormItem') || all.includes('deregisterLabel') || all.includes('labelPosition') || all.includes('autoLabel') || all.includes('label') || all.includes('width') || all.includes('NaN') || all.includes('formContext')) { e.preventDefault(); }
|
||||
});
|
||||
|
||||
app.mount('#app')
|
||||
// Catch uncaught errors from el-form teardown in vxe-table expand rows
|
||||
window.addEventListener("error", (e) => {
|
||||
const stack = e?.error?.stack ?? "";
|
||||
if (stack.includes("form-label") || stack.includes("LabelWrap") || stack.includes("ElForm") || stack.includes("FormItem") || stack.includes("deregisterLabel")) { e.preventDefault(); return true; }
|
||||
}, true);
|
||||
|
||||
// 登录成功后延迟加载首页通知弹窗
|
||||
nextTick(() => {
|
||||
import('@/utils/noticeHelper').then(({initNoticePopupAfterLogin}) => initNoticePopupAfterLogin());
|
||||
});
|
||||
|
||||
app.use(i18n);
|
||||
app.mount('#app');
|
||||
}
|
||||
bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user