From e46c392e0f55c88f2191b3351e5ace6439d99a6e Mon Sep 17 00:00:00 2001 From: gtz <535262213@qq.com> Date: Fri, 2 Sep 2022 16:34:14 +0800 Subject: [PATCH] =?UTF-8?q?'=E5=BC=BA=E5=88=B6=E5=8F=98=E6=9B=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=EF=BC=8Cureport=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=BD=AE=E5=85=A5'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/i18n.js | 25 +++++++++++++++++++ ...> productionLineRecSch-add-or-update1.vue} | 0 ...-update.vue => sysFile-add-or-update1.vue} | 0 ...ate.vue => sysFileType-add-or-update1.vue} | 0 ...rkshopSectionEquipment-add-or-update1.vue} | 0 5 files changed, 25 insertions(+) create mode 100644 public/i18n.js rename src/views/modules/monitoring/{productionlinerecsch-add-or-update.vue => productionLineRecSch-add-or-update1.vue} (100%) rename src/views/modules/monitoring/{sysfile-add-or-update.vue => sysFile-add-or-update1.vue} (100%) rename src/views/modules/monitoring/{sysfiletype-add-or-update.vue => sysFileType-add-or-update1.vue} (100%) rename src/views/modules/monitoring/{workshopsectionequipment-add-or-update.vue => workshopSectionEquipment-add-or-update1.vue} (100%) diff --git a/public/i18n.js b/public/i18n.js new file mode 100644 index 0000000..592ea4f --- /dev/null +++ b/public/i18n.js @@ -0,0 +1,25 @@ +/** + * Created by Jacky.Gao on 2017-10-01. + */ + import defaultI18nJsonData from './designer.json'; + import en18nJsonData from './designer_en.json'; + export default function buildLocal () { + let language = getCookie('language') || 'zh-CN'; + window.i18n = defaultI18nJsonData; + if (language !== 'zh-CN') { + window.i18n = en18nJsonData; + } +} + +function getCookie (name) { + var strcookie = document.cookie;//获取cookie字符串 + var arrcookie = strcookie.split("; ");//分割 + //遍历匹配 + for (var i = 0; i < arrcookie.length; i++) { + var arr = arrcookie[i].split("="); + if (arr[0] == name){ + return arr[1]; + } + } + return ""; +} diff --git a/src/views/modules/monitoring/productionlinerecsch-add-or-update.vue b/src/views/modules/monitoring/productionLineRecSch-add-or-update1.vue similarity index 100% rename from src/views/modules/monitoring/productionlinerecsch-add-or-update.vue rename to src/views/modules/monitoring/productionLineRecSch-add-or-update1.vue diff --git a/src/views/modules/monitoring/sysfile-add-or-update.vue b/src/views/modules/monitoring/sysFile-add-or-update1.vue similarity index 100% rename from src/views/modules/monitoring/sysfile-add-or-update.vue rename to src/views/modules/monitoring/sysFile-add-or-update1.vue diff --git a/src/views/modules/monitoring/sysfiletype-add-or-update.vue b/src/views/modules/monitoring/sysFileType-add-or-update1.vue similarity index 100% rename from src/views/modules/monitoring/sysfiletype-add-or-update.vue rename to src/views/modules/monitoring/sysFileType-add-or-update1.vue diff --git a/src/views/modules/monitoring/workshopsectionequipment-add-or-update.vue b/src/views/modules/monitoring/workshopSectionEquipment-add-or-update1.vue similarity index 100% rename from src/views/modules/monitoring/workshopsectionequipment-add-or-update.vue rename to src/views/modules/monitoring/workshopSectionEquipment-add-or-update1.vue