From dddd95cd38d640be1e7069ece244b3934610005f Mon Sep 17 00:00:00 2001 From: wangxingyuan <2944009893@qq.com> Date: Tue, 25 Feb 2025 15:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E8=A7=86=E4=BB=BB=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=81=E7=94=9F=E4=BA=A7=E8=AE=BE=E5=A4=87=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E3=80=81=E7=9B=91=E6=B5=8B=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=82=E5=9B=BD=E9=99=85=E5=8C=96=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/lang/en/administration.json | 42 ++ src/lang/en/equipment/entry.json | 18 + src/lang/en/equipment/equipment.json | 30 ++ src/lang/en/index.js | 56 +++ src/lang/index.js | 30 ++ src/lang/zh/administration.json | 42 ++ src/lang/zh/equipment/entry.json | 18 + src/lang/zh/equipment/equipment.json | 30 ++ src/lang/zh/index.js | 55 +++ src/layout/components/Navbar.vue | 153 +++--- src/layout/components/Settings/index.vue | 317 +++++++----- src/main.js | 5 +- src/store/getters.js | 1 + src/store/modules/app.js | 18 +- src/views/administration/administration.vue | 509 +++++++++++++++----- src/views/equipment/entry.vue | 329 ++++++++----- src/views/equipment/equipment.vue | 490 +++++++++++++------ src/views/login.vue | 1 + 19 files changed, 1565 insertions(+), 580 deletions(-) create mode 100644 src/lang/en/administration.json create mode 100644 src/lang/en/equipment/entry.json create mode 100644 src/lang/en/equipment/equipment.json create mode 100644 src/lang/en/index.js create mode 100644 src/lang/index.js create mode 100644 src/lang/zh/administration.json create mode 100644 src/lang/zh/equipment/entry.json create mode 100644 src/lang/zh/equipment/equipment.json create mode 100644 src/lang/zh/index.js diff --git a/package.json b/package.json index 0eb8407..0b26652 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-i18n": "^8.2.1", "vue-meta": "2.4.0", "vue-router": "3.4.9", "vue-video-player": "^5.0.1", diff --git a/src/lang/en/administration.json b/src/lang/en/administration.json new file mode 100644 index 0000000..63632cb --- /dev/null +++ b/src/lang/en/administration.json @@ -0,0 +1,42 @@ +{ + "ProjectName": "Project name", + "RegionName": "Region name", + "PlanValidityPeriod": "Plan validity period", + "TaskStrategy": "Task strategy", + "ExecutionTaskCycle": "Execution task cycle", + "ImmediateExecution": "Immediate execution", + "issue": "issue", + "ReplicationTask": "Replication task", + "SetPlanObject": "Set Plan Object", + "SelectInspectionObject": "Select inspection object", + "PointSetting": "Point setting", + "name": "name", + "priority": "priority", + "TaskType": "Task Type", + "TaskExecutionMethod": "Task execution method", + "InspectionArea": "Inspection area", + "executeCycle": "execute cycle", + "RegularExecution": "Regular execution", + "PeriodicExecution": "Periodic execution", + "IntervalExecution": "Interval execution", + "ExecutionDate": "Execution date", + "WalkThrough": "Walk Through", + "timeSetting": "time setting", + "SelectByWeek": "Select by week", + "MonthlySelection": "Monthly selection", + "date": "date", + "time": "time", + "interval": "interval", + "executionTime": "execution time", + "intervalType": "interval type", + "hour": "hour", + "quantity":"quantity", + "nextStep":"nextStep", + "PreviousStep":"Previous step", + "region":"region", + "ToBeAdded":"To be added", + "Added":"Added", + "IsItEnabled":"Is it enabled", + "CopyTask":"Copy task", + "Copy":"Copy" + } \ No newline at end of file diff --git a/src/lang/en/equipment/entry.json b/src/lang/en/equipment/entry.json new file mode 100644 index 0000000..c9f0655 --- /dev/null +++ b/src/lang/en/equipment/entry.json @@ -0,0 +1,18 @@ +{ + "SearchForDeviceName": "Search for device name", + "RightSidePrompt": "Please select any node on the left to add or edit production equipment", + "EquipmentName": "Equipment name", + "DeviceType": "Device Type", + "EquipmentNumber": "Equipment number", + "EquipmentNumberPrompt": "The equipment number is used for production review and must be consistent with the equipment number in the SCADA system", + "DisplaySorting": "Display sorting", + "physicalObject": "physical object ID", + "MonitoringIndexNumber": "Monitoring index number", + "EquipmentModel": "Equipment model", + "EquipmentManufacturer": "Equipment manufacturer", + "coordinate": "coordinate", + "suggestion": "suggestion", + "MaximumValue": "Maximum value", + "minimumValue": "minimum value", + "save":"save" +} \ No newline at end of file diff --git a/src/lang/en/equipment/equipment.json b/src/lang/en/equipment/equipment.json new file mode 100644 index 0000000..dae5e99 --- /dev/null +++ b/src/lang/en/equipment/equipment.json @@ -0,0 +1,30 @@ +{ + "DeviceType": "Device Type", + "EquipmentName": "Equipment name", + "EquipmentCode": "Equipment code", + "Manufacturer": "Manufacturer", + "ModelSynchronization": "Model synchronization", + "VideoNVREncoding": "Video NVR encoding", + "MainSystemNumber": "Main system number", + "SubstationName": "Substation name", + "SubstationCode": "Substation code", + "areaName": "area name", + "UnitOfUse": "Unit of use", + "EquipmentSource": "Equipment source", + "dateOfManufacture": "date of manufacture", + "factoryNumber": "factory number", + "IsItARotatingWheel": "Is it a rotating wheel", + "UseType": "Use type", + "InstallationPosition": "Installation position", + "RelativeSpatialPosition": "Relative spatial position", + "BelongingRobot": "Belonging robot", + "ipAddress": "ip address", + "port": "port", + "user": "user", + "password": "password", + "thoroughfare": "thoroughfare", + "uploadPictures":"upload pictures", + "EquipmentModel":"Equipment model", + "mainSystem":"main system", + "VideoType":"Video type" +} \ No newline at end of file diff --git a/src/lang/en/index.js b/src/lang/en/index.js new file mode 100644 index 0000000..cffba81 --- /dev/null +++ b/src/lang/en/index.js @@ -0,0 +1,56 @@ +// en.js +import administration from './administration.json' +import entry from './equipment/entry.json'; +import equipment from './equipment/equipment.json'; +export default { + routerIl8n: { + homePage: 'homePage' + }, + navBar: { + IndividualCenter: 'Individual center', + LayoutSetting: 'Layout setting', + LogOut: 'Log out', + }, + settings: { + ThemeStyleSetting: 'Theme style setting', + ThemeColor: 'Theme color', + title: 'Page style setting', + onTopNav: 'On TopNav', + onTagsViews: 'On Tags-Views', + immobilizationHeader: 'immobilization Header', + revealLogo: 'reveal Logo', + DynamicHeading: 'Dynamic heading', + SaveConfiguration: 'Save configuration', + ResetConfiguration: 'Reset configuration', + }, + share: { + search: 'search', + reset: 'reset', + new: 'new', + delete: 'delete', + edit: 'edit', + addTo: 'add to', + cancel: 'cancel', + confirm: 'confirm', + export:'export', + import:'import', + + + PleaseEnter: 'Please enter', + StartTime: 'Start time', + EndTime: 'End time', + On: 'On', + Off: 'Off', + status: 'status', + operate: 'operate', + CreationTime: "Creation time", + PleaseChoose: 'Please choose', + to: 'to', + content:'content', + Yes:'Yes', + No:'No', + }, + administration:administration, + entry:entry, + equipment:equipment + } \ No newline at end of file diff --git a/src/lang/index.js b/src/lang/index.js new file mode 100644 index 0000000..2a4742f --- /dev/null +++ b/src/lang/index.js @@ -0,0 +1,30 @@ +// index.js +import Vue from 'vue' +import VueI18n from 'vue-i18n' +import Cookies from 'js-cookie' +import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang +import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang +import enLocale from './en/index' +import zhLocale from './zh/index' + +Vue.use(VueI18n) + +const messages = { + en_US: { + ...enLocale, + ...elementEnLocale + }, + zh_CN: { + ...zhLocale, + ...elementZhLocale + } +} + +const i18n = new VueI18n({ + // 设置语言 选项 en | zh + locale: Cookies.get('language') || 'zh_CN', + // 设置文本内容 + messages +}) + +export default i18n \ No newline at end of file diff --git a/src/lang/zh/administration.json b/src/lang/zh/administration.json new file mode 100644 index 0000000..03ca1b5 --- /dev/null +++ b/src/lang/zh/administration.json @@ -0,0 +1,42 @@ +{ + "ProjectName": "计划名称", + "RegionName": "区域名称", + "PlanValidityPeriod": "计划有效期", + "TaskStrategy": "任务策略", + "ExecutionTaskCycle": "执行任务周期", + "ImmediateExecution": "立即执行", + "issue": "下发", + "ReplicationTask": "复制任务", + "SetPlanObject": "设置计划对象", + "SelectInspectionObject": "选择巡检对象", + "PointSetting": "点位设置", + "name": "名称", + "priority": "优先级", + "TaskType": "任务类型", + "TaskExecutionMethod": "任务执行方式", + "InspectionArea": "巡检区域", + "executeCycle": "执行周期", + "RegularExecution": "定期执行", + "PeriodicExecution": "周期执行", + "IntervalExecution": "间隔执行", + "ExecutionDate": "执行日期", + "WalkThrough": "现场巡视", + "timeSetting": "时间设置", + "SelectByWeek": "按周选择", + "MonthlySelection": "按月选择", + "date":"日期", + "time":"时间", + "interval":"间隔", + "executionTime":"执行时间", + "intervalType":"间隔类型", + "hour":"小时", + "quantity":"数量", + "nextStep":"下一步", + "PreviousStep":"上一步", + "region":"区域", + "ToBeAdded":"待添加", + "Added":"已添加", + "IsItEnabled":"是否开启", + "CopyTask":"复制任务", + "Copy":"复制" + } \ No newline at end of file diff --git a/src/lang/zh/equipment/entry.json b/src/lang/zh/equipment/entry.json new file mode 100644 index 0000000..4ce4029 --- /dev/null +++ b/src/lang/zh/equipment/entry.json @@ -0,0 +1,18 @@ +{ + "SearchForDeviceName":"搜索设备名称", + "RightSidePrompt":"请选择左侧任意节点,添加或编辑生产设备", + "EquipmentName":"设备名称", + "DeviceType":"设备类型", + "EquipmentNumber":"设备编号", + "EquipmentNumberPrompt":"设备编号用于生产复核,需与SCADA系统中的设备编号一致", + "DisplaySorting":"显示排序", + "physicalObject":"实物ID", + "MonitoringIndexNumber":"监控索引号", + "EquipmentModel":"设备型号", + "EquipmentManufacturer":"设备厂家", + "coordinate":"坐标", + "suggestion":"建议", + "MaximumValue":"最大值", + "minimumValue":"最小值", + "save":"保存" +} \ No newline at end of file diff --git a/src/lang/zh/equipment/equipment.json b/src/lang/zh/equipment/equipment.json new file mode 100644 index 0000000..d59ee32 --- /dev/null +++ b/src/lang/zh/equipment/equipment.json @@ -0,0 +1,30 @@ +{ + "DeviceType": "设备类型", + "EquipmentName": "设备名称", + "EquipmentCode": "设备编码", + "Manufacturer": "生产厂家", + "ModelSynchronization": "模型同步", + "VideoNVREncoding": "视频NVR编码", + "MainSystemNumber": "主系统编号", + "SubstationName": "变电站名称", + "SubstationCode": "变电站编码", + "areaName": "区域名称", + "UnitOfUse": "使用单位", + "EquipmentSource": "设备来源", + "dateOfManufacture": "生产日期", + "factoryNumber": "出厂编号", + "IsItARotatingWheel": "是否转轮", + "UseType": "使用类型", + "InstallationPosition": "安装位置", + "RelativeSpatialPosition": "相对空间位置", + "BelongingRobot": "所属机器人", + "ipAddress": "ip地址", + "port": "端口", + "user": "用户", + "password": "密码", + "thoroughfare":"通道", + "uploadPictures":"上传图片", + "EquipmentModel":"设备型号", + "mainSystem":"主系统", + "VideoType":"视频类型" +} \ No newline at end of file diff --git a/src/lang/zh/index.js b/src/lang/zh/index.js new file mode 100644 index 0000000..4d3e33f --- /dev/null +++ b/src/lang/zh/index.js @@ -0,0 +1,55 @@ +import administration from './administration.json' +import entry from './equipment/entry.json'; +import equipment from './equipment/equipment.json'; +export default { + routerIl8n: { + homePage: '首页' + }, + navBar: { + IndividualCenter: '个人中心', + LayoutSetting: '布局设置', + LogOut: '退出登录', + }, + settings: { + ThemeStyleSetting: '主题风格设置', + ThemeColor: '主题颜色', + title: '系统布局配置', + onTopNav: '开启 TopNav', + onTagsViews: '开启 Tags-Views', + immobilizationHeader: '固定 Header', + revealLogo: '显示 Logo', + DynamicHeading: '动态标题', + SaveConfiguration: '保存配置', + ResetConfiguration: '重置配置', + }, + share: { + search: '搜索', + reset: '重置', + new: '新增', + delete: '删除', + edit: '编辑', + addTo:'添加', + cancel: '取消', + confirm: '确定', + export:'导出', + import:'导入', + + PleaseEnter: '请输入', + StartTime: '开始时间', + EndTime: '结束时间', + On: '开启', + Off: '关闭', + status: '状态', + operate: '操作', + CreationTime: "创建时间", + PleaseChoose: '请选择', + to: '至', + content:'内容', + Yes:'是', + No:'否', + }, + + administration:administration, + entry:entry, + equipment:equipment, +} \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 0be1773..f806206 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,44 +1,72 @@