diff --git a/index.html b/index.html index 88f1929..06d05ee 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ href="https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/style.css" /> - Marketing Dashboard - Application Intel - SmartAdmin v4.5.1 + 瀚荃監控系統 diff --git a/package-lock.json b/package-lock.json index 055d529..16107f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,10 +20,12 @@ "date-fns": "^3.3.1", "dayjs": "^1.11.10", "echarts": "^5.4.3", + "flag-icons": "^7.2.3", "pinia": "^2.1.7", "requirejs": "^2.3.6", "tailwind-merge": "^2.2.1", "vue": "^3.3.4", + "vue-i18n": "^10.0.4", "vue-router": "^4.2.5", "yup": "^1.4.0", "yup-phone-lite": "^2.0.1" @@ -545,6 +547,50 @@ "vue": ">= 3.0.0 < 4" } }, + "node_modules/@intlify/core-base": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-10.0.4.tgz", + "integrity": "sha512-GG428DkrrWCMhxRMRQZjuS7zmSUzarYcaHJqG9VB8dXAxw4iQDoKVQ7ChJRB6ZtsCsX3Jse1PEUlHrJiyQrOTg==", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "10.0.4", + "@intlify/shared": "10.0.4" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-10.0.4.tgz", + "integrity": "sha512-AFbhEo10DP095/45EauinQJ5hJ3rJUmuuqltGguvc3WsvezZN+g8qNHLGWKu60FHQVizMrQY7VJ+zVlBXlQQkQ==", + "license": "MIT", + "dependencies": { + "@intlify/shared": "10.0.4", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-10.0.4.tgz", + "integrity": "sha512-ukFn0I01HsSgr3VYhYcvkTCLS7rGa0gw4A4AMpcy/A9xx/zRJy7PS2BElMXLwUazVFMAr5zuiTk3MQeoeGXaJg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -2334,6 +2380,12 @@ "node": ">=8" } }, + "node_modules/flag-icons": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-7.2.3.tgz", + "integrity": "sha512-X2gUdteNuqdNqob2KKTJTS+ZCvyWeLCtDz9Ty8uJP17Y4o82Y+U/Vd4JNrdwTAjagYsRznOn9DZ+E/Q52qbmqg==", + "license": "MIT" + }, "node_modules/follow-redirects": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", @@ -5378,6 +5430,26 @@ } } }, + "node_modules/vue-i18n": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-10.0.4.tgz", + "integrity": "sha512-1xkzVxqBLk2ZFOmeI+B5r1J7aD/WtNJ4j9k2mcFcQo5BnOmHBmD7z4/oZohh96AAaRZ4Q7mNQvxc9h+aT+Md3w==", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "10.0.4", + "@intlify/shared": "10.0.4", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz", diff --git a/package.json b/package.json index 9ba49d9..3dbb529 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,12 @@ "date-fns": "^3.3.1", "dayjs": "^1.11.10", "echarts": "^5.4.3", + "flag-icons": "^7.2.3", "pinia": "^2.1.7", "requirejs": "^2.3.6", "tailwind-merge": "^2.2.1", "vue": "^3.3.4", + "vue-i18n": "^10.0.4", "vue-router": "^4.2.5", "yup": "^1.4.0", "yup-phone-lite": "^2.0.1" diff --git a/public/favicon.png b/public/favicon.png index 5ba69a3..e92470e 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/public/logo.svg b/public/logo.svg index b6cd190..2ce49b1 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 731f6d6..522e0b6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,11 +39,11 @@ provide("app_toast", { openToast }); />
-
+
-
+
\ No newline at end of file diff --git a/src/assets/img/chart-data-background02.svg b/src/assets/img/chart-data-background02.svg new file mode 100644 index 0000000..4ccfade --- /dev/null +++ b/src/assets/img/chart-data-background02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/chart-data-background03.svg b/src/assets/img/chart-data-background03.svg new file mode 100644 index 0000000..32d1f69 --- /dev/null +++ b/src/assets/img/chart-data-background03.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/chart-title01.svg b/src/assets/img/chart-title01.svg new file mode 100644 index 0000000..554b6b4 --- /dev/null +++ b/src/assets/img/chart-title01.svg @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/src/assets/img/chart-title02.svg b/src/assets/img/chart-title02.svg new file mode 100644 index 0000000..d9cb565 --- /dev/null +++ b/src/assets/img/chart-title02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment-item-background.svg b/src/assets/img/equipment-item-background.svg new file mode 100644 index 0000000..69359bd --- /dev/null +++ b/src/assets/img/equipment-item-background.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/equipment-item-background04.svg b/src/assets/img/equipment-item-background04.svg new file mode 100644 index 0000000..64b7d0d --- /dev/null +++ b/src/assets/img/equipment-item-background04.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment-item-background05.svg b/src/assets/img/equipment-item-background05.svg new file mode 100644 index 0000000..67e6cbc --- /dev/null +++ b/src/assets/img/equipment-item-background05.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/icon/C.png b/src/assets/img/icon/C.png new file mode 100644 index 0000000..aa07fec Binary files /dev/null and b/src/assets/img/icon/C.png differ diff --git a/src/assets/img/icon/E1.png b/src/assets/img/icon/E1.png new file mode 100644 index 0000000..d434aa5 Binary files /dev/null and b/src/assets/img/icon/E1.png differ diff --git a/src/assets/img/icon/E2.png b/src/assets/img/icon/E2.png new file mode 100644 index 0000000..edf9ee6 Binary files /dev/null and b/src/assets/img/icon/E2.png differ diff --git a/src/assets/img/icon/E3.png b/src/assets/img/icon/E3.png new file mode 100644 index 0000000..70dcf6d Binary files /dev/null and b/src/assets/img/icon/E3.png differ diff --git a/src/assets/img/icon/E4-1.png b/src/assets/img/icon/E4-1.png new file mode 100644 index 0000000..d5d452f Binary files /dev/null and b/src/assets/img/icon/E4-1.png differ diff --git a/src/assets/img/icon/EL.png b/src/assets/img/icon/EL.png new file mode 100644 index 0000000..accba6c Binary files /dev/null and b/src/assets/img/icon/EL.png differ diff --git a/src/assets/img/icon/F1.png b/src/assets/img/icon/F1.png new file mode 100644 index 0000000..fa1da1a Binary files /dev/null and b/src/assets/img/icon/F1.png differ diff --git a/src/assets/img/icon/L1.png b/src/assets/img/icon/L1.png new file mode 100644 index 0000000..c94f5ab Binary files /dev/null and b/src/assets/img/icon/L1.png differ diff --git a/src/assets/img/icon/L2.png b/src/assets/img/icon/L2.png new file mode 100644 index 0000000..82884af Binary files /dev/null and b/src/assets/img/icon/L2.png differ diff --git a/src/assets/img/icon/M1.png b/src/assets/img/icon/M1.png new file mode 100644 index 0000000..4f6cf25 Binary files /dev/null and b/src/assets/img/icon/M1.png differ diff --git a/src/assets/img/icon/M10.png b/src/assets/img/icon/M10.png new file mode 100644 index 0000000..4c5c799 Binary files /dev/null and b/src/assets/img/icon/M10.png differ diff --git a/src/assets/img/icon/M12.png b/src/assets/img/icon/M12.png new file mode 100644 index 0000000..fb9cd38 Binary files /dev/null and b/src/assets/img/icon/M12.png differ diff --git a/src/assets/img/icon/M5-2.png b/src/assets/img/icon/M5-2.png new file mode 100644 index 0000000..736489d Binary files /dev/null and b/src/assets/img/icon/M5-2.png differ diff --git a/src/assets/img/icon/M8.png b/src/assets/img/icon/M8.png new file mode 100644 index 0000000..f509702 Binary files /dev/null and b/src/assets/img/icon/M8.png differ diff --git a/src/assets/img/icon/P.png b/src/assets/img/icon/P.png new file mode 100644 index 0000000..7905866 Binary files /dev/null and b/src/assets/img/icon/P.png differ diff --git a/src/assets/img/icon/P1.png b/src/assets/img/icon/P1.png new file mode 100644 index 0000000..b56f53d Binary files /dev/null and b/src/assets/img/icon/P1.png differ diff --git a/src/assets/img/icon/PSC.png b/src/assets/img/icon/PSC.png new file mode 100644 index 0000000..85d0c31 Binary files /dev/null and b/src/assets/img/icon/PSC.png differ diff --git a/src/assets/img/icon/R.png b/src/assets/img/icon/R.png new file mode 100644 index 0000000..91c66e5 Binary files /dev/null and b/src/assets/img/icon/R.png differ diff --git a/src/assets/img/icon/W1.png b/src/assets/img/icon/W1.png new file mode 100644 index 0000000..390fc40 Binary files /dev/null and b/src/assets/img/icon/W1.png differ diff --git a/src/assets/img/icon/W2.png b/src/assets/img/icon/W2.png new file mode 100644 index 0000000..66930ba Binary files /dev/null and b/src/assets/img/icon/W2.png differ diff --git a/src/assets/img/icon/W3.png b/src/assets/img/icon/W3.png new file mode 100644 index 0000000..c10f720 Binary files /dev/null and b/src/assets/img/icon/W3.png differ diff --git a/src/assets/img/item-data-left-2.svg b/src/assets/img/item-data-left-2.svg new file mode 100644 index 0000000..33018f6 --- /dev/null +++ b/src/assets/img/item-data-left-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/item-data-left.svg b/src/assets/img/item-data-left.svg new file mode 100644 index 0000000..24d1b55 --- /dev/null +++ b/src/assets/img/item-data-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/item-data-right-2.svg b/src/assets/img/item-data-right-2.svg new file mode 100644 index 0000000..9025333 --- /dev/null +++ b/src/assets/img/item-data-right-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/item-data-right.svg b/src/assets/img/item-data-right.svg new file mode 100644 index 0000000..927beac --- /dev/null +++ b/src/assets/img/item-data-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/logo.svg b/src/assets/img/logo.svg index b6cd190..2ce49b1 100644 --- a/src/assets/img/logo.svg +++ b/src/assets/img/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/assets/img/state-box-bottom.png b/src/assets/img/state-box-bottom.png new file mode 100644 index 0000000..cf28ba9 Binary files /dev/null and b/src/assets/img/state-box-bottom.png differ diff --git a/src/assets/img/state-box-top.png b/src/assets/img/state-box-top.png new file mode 100644 index 0000000..0d78c94 Binary files /dev/null and b/src/assets/img/state-box-top.png differ diff --git a/src/assets/img/state-title01.svg b/src/assets/img/state-title01.svg new file mode 100644 index 0000000..d91ac0d --- /dev/null +++ b/src/assets/img/state-title01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/state-title02.svg b/src/assets/img/state-title02.svg new file mode 100644 index 0000000..93ae18b --- /dev/null +++ b/src/assets/img/state-title02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/state-ul-background01.svg b/src/assets/img/state-ul-background01.svg new file mode 100644 index 0000000..717aee9 --- /dev/null +++ b/src/assets/img/state-ul-background01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/state-ul-background02.svg b/src/assets/img/state-ul-background02.svg new file mode 100644 index 0000000..b2fbadb --- /dev/null +++ b/src/assets/img/state-ul-background02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/state-ul-text.svg b/src/assets/img/state-ul-text.svg new file mode 100644 index 0000000..74a702b --- /dev/null +++ b/src/assets/img/state-ul-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/state-ul.svg b/src/assets/img/state-ul.svg new file mode 100644 index 0000000..302c130 --- /dev/null +++ b/src/assets/img/state-ul.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/text-position-line.svg b/src/assets/img/text-position-line.svg new file mode 100644 index 0000000..cec0432 --- /dev/null +++ b/src/assets/img/text-position-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/logo.svg b/src/assets/logo.svg index 7565660..b6cd190 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/src/components/alarm/AlarmCards.vue b/src/components/alarm/AlarmCards.vue index 72382a8..c3283ba 100644 --- a/src/components/alarm/AlarmCards.vue +++ b/src/components/alarm/AlarmCards.vue @@ -30,7 +30,7 @@ const ackedAlarm = async (uuid) => { :icon="['fas', 'exclamation-triangle']" class="text-warning mr-2" /> - 異常通知{{ $t("alarm.notify") }} {

-

異常編號:{{ alarm.uuid }}

+

{{ $t("alarm.number") }}:{{ alarm.uuid }}

-

異常類別:{{ alarm.alarmClass }}

-

設備名稱:{{ alarm.full_name }}

-

異常訊息:{{ alarm.msg }}

+

{{ $t("alarm.category") }}:{{ alarm.alarmClass }}

+

{{ $t("alarm.device_name") }}:{{ alarm.full_name }}

+

{{ $t("alarm.message") }}:{{ alarm.msg }}

diff --git a/src/components/alarm/AlarmDrawer.vue b/src/components/alarm/AlarmDrawer.vue index 6e7e916..3ff9fdc 100644 --- a/src/components/alarm/AlarmDrawer.vue +++ b/src/components/alarm/AlarmDrawer.vue @@ -1,6 +1,7 @@ + diff --git a/src/components/forge/Forge.vue b/src/components/forge/Forge.vue index 14e967b..e01517f 100644 --- a/src/components/forge/Forge.vue +++ b/src/components/forge/Forge.vue @@ -17,7 +17,6 @@ import ForgeInfoModal from "./ForgeInfoModal.vue"; import useAlarmStore from "@/stores/useAlarmStore"; const props = defineProps({ - fullScreen: Boolean, initialData: Object, cubeStyle: { type: Object, @@ -116,25 +115,7 @@ const initForge = () => { ); } ); - // viewer.addEventListener( - // Autodesk.Viewing.SELECTION_CHANGED_EVENT, - // (e) => { - // console.log("selection changed!", e, e.dbIdArray[0]); - // if (e.dbIdArray.length > 0) { - // const pos = getModalPosition(viewer, e.dbIdArray[0]); - // let currentValue = Object.values(subscribeData.value).find( - // ({ forge_dbid }) => forge_dbid === e.dbIdArray[0] - // ); - // viewer.getProperties(e.dbIdArray[0], function (e) { - // console.log("Entire object response ", e); - // console.log("Properties ", e.properties); - - // }); - // console.log(Object.values(subscribeData.value), currentValue); - // // getCurrentInfoModalData(pos, currentValue); - // } - // } - // ); + }); }); }); @@ -148,11 +129,6 @@ onMounted(() => { // 傳遞目前點擊資訊 const currentInfoModalData = ref(null); const isMobile = (pointerType) => { - // let flag = - // /phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/gi.test( - // navigator.userAgent - // ); - // console.log("isMobile", flag); return pointerType !== "mouse"; // is desktop }; const getCurrentInfoModalData = (e, position, value) => { @@ -178,24 +154,10 @@ onUnmounted(() => { diff --git a/src/components/navbar/NavbarLang.vue b/src/components/navbar/NavbarLang.vue new file mode 100644 index 0000000..b4f647f --- /dev/null +++ b/src/components/navbar/NavbarLang.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/config/cn.json b/src/config/cn.json new file mode 100644 index 0000000..a1c52ed --- /dev/null +++ b/src/config/cn.json @@ -0,0 +1,222 @@ +{ + "language": "简体中文", + "sign_out": "登出", + "log_in": "登入", + "account": "帐号", + "password": "密码", + "history": { + "title": "历史资料", + "building_name": "厂区", + "device_name": "设备名称", + "device_category": "设备类别", + "category": "类别", + "value": "数值", + "date": "记录时间", + "point": "点位", + "combinations": "常用组合", + "date_range": "日期区间", + "time_range": "时间区间", + "start_date": "起始日期", + "start_time": "起始时间", + "end_date": "结束日期", + "end_time": "结束时间" + }, + "alarm": { + "title": "显示警告", + "notify": "异常通知", + "number": "异常编号", + "category": "异常类别", + "device_name": "设备名称", + "message": "异常讯息", + "confirm": "确认" + }, + "alert": { + "query_title": "告警纪录查询", + "setting_title": "告警设定", + "offnormal": "未复归", + "normal": "已复归", + "unacked": "未确认", + "acked": "已确认", + "30days": "近30天", + "start_date": "起始日期", + "end_date": "结束日期", + "building_and_floor": "栋别-楼层", + "uuid": "异常ID", + "alarmClass": "异常类别", + "device_name": "设备名称", + "device_number": "设备编号", + "date": "发生日期", + "time": "发生时间", + "error_msg": "异常原因", + "ack_state": "Ack 确认", + "repair_order_number": "派工 / 维运单号", + "repair_order": "维修单", + "form_number": "表单编号", + "start_time": "预计开始时间", + "item": "项目", + "maintainance": "保养", + "repair": "维修", + "repair_item": "维修项目", + "repair_item_code": "维修项目代码(设备编号)", + "responsible_vendor": "负责厂商", + "status": "状态", + "not_completed": "未完成", + "completed": "已完成", + "worker_id": "工作人员编号", + "notice": "注意事项", + "result_description": "结果描述", + "upload_file": "上传文件", + "enable": "启用", + "not_enabled": "不启用", + "qualifications": "限定条件", + "upper_limit": "上限", + "lower_limit": "下限", + "highDelay": "上限持续秒数", + "lowDelay": "下限持续秒数", + "warning_method": "警示方式", + "warning_time": "警示时间", + "operation": "功能", + "alarm_settings": "异常设定", + "time_setting": "时间设定", + "yes": "是", + "no": "否", + "no_notify": "无通知", + "notify_name": "姓名", + "notify_phone": "手机号码", + "notify_email": "email", + "notify_items": "通知项目", + "notify_list": "通知名单", + "choose": "选择" + }, + "operation": { + "title": "运维管理", + "project": "项目", + "location": "位置", + "uuid": "异常ID", + "form_number": "表单编号", + "device_name": "设备名称", + "status": "狀態", + "staff": "处理人员", + "start_time": "预计开始时间", + "upload": "档案上传", + "finish_time": "完成时间", + "operation": "功能", + "vendor": "厂商", + "contact_person": "联络人", + "phone": "电话", + "email": "email", + "created_at": "建立日期", + "maintainance": "保养", + "repair": "维修", + "company_info": "厂商资料", + "repair_item": "维修项目", + "repair_item_code": "维修项目代码(设备编号)", + "responsible_vendor": "负责厂商", + "not_completed": "未完成", + "completed": "已完成", + "worker_id": "工作人员编号", + "notice": "注意事项", + "result_description": "结果描述", + "upload_file": "上传文件", + "name": "姓名", + "city": "城市", + "address": "地址", + "tax_id_number": "统一编号", + "remark": "备注", + "date": "日期", + "serial": "单号", + "today": "今天", + "yesterday": "昨天", + "start_created_at": "起始日期", + "end_created_at": "结束日期", + "enter_text": "请输入文字", + "enter_serial": "请输入单号" + }, + "graphManagement": { + "title": "图资管理", + "category": "图资类别", + "new_category": "新类别", + "index": "编号", + "oriOrgName": "档案", + "operation": "功能" + }, + "assetManagement": { + "title": "资产管理", + "add_category": "新增类别", + "system_name": "名称", + "system_value": "代号", + "system_parent": "所属大类", + "device_number": "设备编号", + "device_name": "设备名称", + "asset_number": "资产编号", + "floor": "设备位置", + "add_floor": "新增楼层", + "add_floor_text": "须先上传楼层地图", + "device_coordinate": "图面标识", + "brand_and_modal": "品牌 / 型号", + "brand": "品牌", + "modal": "型号", + "company_and_contact": "厂商 / 联络人", + "company": "负责厂商", + "buying_date": "建置时间", + "oriFile": "档案上传", + "created_at": "建立时间", + "operation": "功能", + "device_list": "设备列表", + "edit_device": "编辑设备", + "add_device": "新增设备", + "operate_text": "显示名称", + "fill_text": "请由系统人员填写", + "equipment_point": "设备点位", + "add_sensor": "新增感测器", + "associated_device": "关联设备", + "choose": "选择", + "index": "编号", + "floor_plan": "平面图" + }, + "accountManagement": { + "account_title": "帐号管理", + "role_title": "角色管理", + "index": "编号", + "name": "姓名", + "account": "帐号", + "password": "密码", + "role": "角色", + "role_name": "角色名称", + "role_permissions": "角色权限", + "role_permissions_setting": "角色权限设定", + "permission_name": "权限名称", + "basic_permissions": "基础权限", + "production_permissions": "生产设定权限", + "email": "email", + "phone": "手机", + "created_at": "建立时间", + "operation": "功能", + "name_placeholder": "请输入使用者名称", + "role_placeholder": "请输入角色名称", + "change_password": "变更密码", + "choose": "选择" + }, + "button": { + "add": "新增", + "cancel": "取消", + "query": "查询", + "search": "搜索", + "view": "查看", + "reset": "重置", + "export": "导出", + "enter_text": "输入文字后按下 Enter", + "required": "必填", + "submit": "确定", + "edit": "修改", + "delete": "删除", + "deselect_all": "取消全选", + "select_all": "全选", + "phone_format": "请输入正确电话号码格式", + "email_format": "请输入正确 Email 地址", + "password_format": "密码长度至少8码,必须包含英文及数字", + "start_time_placeholder": "请输入预计开始日期", + "rename": "重新命名", + "download": "下载" + } +} diff --git a/src/config/tw.json b/src/config/tw.json new file mode 100644 index 0000000..0d89083 --- /dev/null +++ b/src/config/tw.json @@ -0,0 +1,222 @@ +{ + "language": "繁體中文", + "sign_out": "登出", + "log_in": "登入", + "account": "帳號", + "password": "密碼", + "history": { + "title": "歷史資料", + "building_name": "廠區", + "device_name": "設備名稱", + "device_category": "設備類別", + "category": "類別", + "value": "數值", + "date": "記錄時間", + "point": "點位", + "combinations": "常用組合", + "date_range": "日期區間", + "time_range": "時間區間", + "start_date": "起始日期", + "start_time": "起始時間", + "end_date": "結束日期", + "end_time": "結束時間" + }, + "alarm": { + "title": "顯示警告", + "notify": "異常通知", + "number": "異常編號", + "category": "異常類別", + "device_name": "設備名稱", + "message": "異常訊息", + "confirm": "確認" + }, + "alert": { + "query_title": "告警紀錄查詢", + "setting_title": "告警設定", + "offnormal": "未復歸", + "normal": "已復歸", + "unacked": "未確認", + "acked": "已確認", + "30days": "近30天", + "start_date": "起始日期", + "end_date": "結束日期", + "building_and_floor": "棟別-樓層", + "uuid": "異常ID", + "alarmClass": "異常類別", + "device_name": "設備名稱", + "device_number": "設備編號", + "date": "發生日期", + "time": "發生時間", + "error_msg": "異常原因", + "ack_state": "Ack 確認", + "repair_order_number": "派工 / 維運單號", + "repair_order": "維修單", + "form_number": "表單編號", + "start_time": "預計開始時間", + "item": "項目", + "maintainance": "保養", + "repair": "維修", + "repair_item": "維修項目", + "repair_item_code": "維修項目代碼(設備編號)", + "responsible_vendor": "負責廠商", + "status": "狀態", + "not_completed": "未完成", + "completed": "已完成", + "worker_id": "工作人員編號", + "notice": "注意事項", + "result_description": "結果描述", + "upload_file": "上傳檔案", + "enable": "啟用", + "not_enabled": "不啟用", + "qualifications": "限定條件", + "upper_limit": "上限", + "lower_limit": "下限", + "highDelay": "上限持續秒數", + "lowDelay": "下限持續秒數", + "warning_method": "警示方式", + "warning_time": "警示時間", + "operation": "功能", + "alarm_settings": "異常設定", + "time_setting": "時間設定", + "yes": "是", + "no": "否", + "no_notify": "無通知", + "notify_name": "姓名", + "notify_phone": "手機號碼", + "notify_email": "email", + "notify_items": "通知項目", + "notify_list": "通知名單", + "choose": "選擇" + }, + "operation": { + "title": "運維管理", + "project": "項目", + "location": "位置", + "uuid": "異常ID", + "form_number": "表單編號", + "device_name": "設備名稱", + "status": "狀態", + "staff": "處理人員", + "start_time": "預計開始時間", + "upload": "檔案上傳", + "finish_time": "完成時間", + "operation": "功能", + "vendor": "廠商", + "contact_person": "聯絡人", + "phone": "電話", + "email": "email", + "created_at": "建立日期", + "maintainance": "保養", + "repair": "維修", + "company_info": "廠商資料", + "repair_item": "維修項目", + "repair_item_code": "維修項目代碼(設備編號)", + "responsible_vendor": "負責廠商", + "not_completed": "未完成", + "completed": "已完成", + "worker_id": "工作人員編號", + "notice": "注意事項", + "result_description": "結果描述", + "upload_file": "上傳檔案", + "name": "姓名", + "city": "城市", + "address": "地址", + "tax_id_number": "統一編號", + "remark": "備注", + "date": "日期", + "serial": "單號", + "today": "今天", + "yesterday": "昨天", + "start_created_at": "起始日期", + "end_created_at": "結束日期", + "enter_text": "請輸入文字", + "enter_serial": "請輸入單號" + }, + "graphManagement": { + "title": "圖資管理", + "category": "圖資類別", + "new_category": "新類別", + "index": "編號", + "oriOrgName": "檔案", + "operation": "功能" + }, + "assetManagement": { + "title": "資產管理", + "add_category": "新增類別", + "system_name": "名稱", + "system_value": "代號", + "system_parent": "所屬大類", + "device_number": "設備編號", + "device_name": "設備名稱", + "asset_number": "資產編號", + "floor": "設備位置", + "add_floor": "新增樓層", + "add_floor_text": "須先上傳樓層地圖", + "device_coordinate": "圖面標識", + "brand_and_modal": "品牌 / 型號", + "brand": "品牌", + "modal": "型號", + "company_and_contact": "廠商 / 聯絡人", + "company": "負責廠商", + "buying_date": "購買日期", + "oriFile": "檔案上傳", + "created_at": "建立時間", + "operation": "功能", + "device_list": "設備列表", + "edit_device": "編輯設備", + "add_device": "新增設備", + "operate_text": "顯示名稱", + "fill_text": "請由系統人員填寫", + "equipment_point": "設備點位", + "add_sensor": "新增感測器", + "associated_device": "關聯設備", + "choose": "選擇", + "index": "編號", + "floor_plan": "平面圖" + }, + "accountManagement": { + "account_title": "帳號管理", + "role_title": "角色管理", + "index": "編號", + "name": "姓名", + "account": "帳號", + "password": "密碼", + "role": "角色", + "role_name": "角色名稱", + "role_permissions": "角色權限", + "role_permissions_setting": "角色權限設定", + "permission_name": "權限名稱", + "basic_permissions": "基礎權限", + "production_permissions": "生產設定權限", + "email": "email", + "phone": "手機", + "created_at": "建立時間", + "operation": "功能", + "name_placeholder": "請輸入使用者名稱", + "role_placeholder": "請輸入角色名稱", + "change_password": "變更密碼", + "choose": "選擇" + }, + "button": { + "add": "新增", + "cancel": "取消", + "query": "查詢", + "search": "搜尋", + "view": "查看", + "reset": "重置", + "export": "匯出", + "enter_text": "輸入文字後按下 Enter", + "required": "必填", + "submit": "確定", + "edit": "修改", + "delete": "刪除", + "deselect_all": "取消全選", + "select_all": "全選", + "phone_format": "請輸入正確電話號碼格式", + "email_format": "請輸入正確的 Email 地址", + "password_format": "密碼長度至少8碼,必須包含英文及數字", + "start_time_placeholder": "請輸入預計開始日期", + "rename": "重新命名", + "download": "下載" + } +} diff --git a/src/config/us.json b/src/config/us.json new file mode 100644 index 0000000..06f529a --- /dev/null +++ b/src/config/us.json @@ -0,0 +1,222 @@ +{ + "language": "English", + "sign_out": "Sign out", + "log_in": "Log in", + "account": "Account", + "password": "Password", + "history": { + "title": "Historical Data", + "building_name": "Building", + "device_name": "Device Name", + "device_category": "Device Category", + "category": "Category", + "value": "Value", + "date": "Record Time", + "point": "Point", + "combinations": "Common combinations", + "date_range": "Date range", + "time_range": "Time interval", + "start_date": "Start date", + "start_time": "Start time", + "end_date": "End date", + "end_time": "End time" + }, + "alarm": { + "title": "Warning", + "notify": "Notification", + "number": "ID", + "category": "Category", + "device_name": "Device name", + "message": "Message", + "confirm": "Confirm" + }, + "alert": { + "query_title": "Alarm record query", + "setting_title": "Alarm settings", + "offnormal": "off normal", + "normal": "normal", + "unacked": "unacked", + "acked": "acked", + "30days": "Last 30 days", + "start_date": "Start date", + "end_date": "End date", + "building_and_floor": "Building - floor", + "uuid": "Exception ID", + "alarmClass": "Exception Category", + "device_name": "Device name", + "device_number": "Device number", + "date": "Occurrence date", + "time": "Occurrence time", + "error_msg": "Abnormal cause", + "ack_state": "Ack Confirm", + "repair_order_number": "Repair order number", + "repair_order": "Repair order", + "form_number": "Form Number", + "start_time": "Estimated Start Time", + "item": "Item", + "maintainance": "Maintainance", + "repair": "Repair", + "repair_item": "Repair Item", + "repair_item_code": "Repair Item Code (Device Number)", + "responsible_vendor": "Responsible Vendor", + "status": "Status", + "not_completed": "Not completed", + "completed": "Completed", + "worker_id": "Worker ID", + "notice": "Notice", + "result_description": "Result Description", + "upload_file": "Upload File", + "enable": "Enable", + "not_enabled": "Not enabled", + "qualifications": "Qualifications", + "upper_limit": "Upper limit", + "lower_limit": "Lower limit", + "highDelay": "Max duration (s)", + "lowDelay": "Min duration (s)", + "warning_method": "Warning method", + "warning_time": "Warning time", + "operation": "Function", + "alarm_settings": "Abnormal alarm settings", + "time_setting": "Time setting", + "yes": "yes", + "no": "no", + "no_notify": "No notification", + "notify_name": "Name", + "notify_phone": "Phone number", + "notify_email": "email", + "notify_items": "Notification items", + "notify_list": "Notification list", + "choose": "choose" + }, + "operation": { + "title": "Operation and maintenance management", + "project": "Project", + "location": "Location", + "uuid": "Exception ID", + "form_number": "Form Number", + "device_name": "Device name", + "status": "Status", + "staff": "Staff", + "start_time": "Estimated start time", + "upload": "File upload", + "finish_time": "Completion time", + "operation": "Function", + "vendor": "company", + "contact_person": "Contact person", + "phone": "Phone", + "email": "email", + "created_at": "Creation date", + "maintainance": "Maintainance", + "repair": "Repair", + "company_info": "Company Info", + "repair_item": "Repair Item", + "repair_item_code": "Repair Item Code (Device Number)", + "responsible_vendor": "Responsible Vendor", + "not_completed": "Not completed", + "completed": "Completed", + "worker_id": "Worker ID", + "notice": "Notice", + "result_description": "Result Description", + "upload_file": "Upload File", + "name": "Name", + "city": "City", + "address": "Address", + "tax_id_number": "tax ID number", + "remark": "Remark", + "date": "Date", + "serial": "Order number", + "today": "Today", + "yesterday": "Yesterday", + "start_created_at": "Start date", + "end_created_at": "End date", + "enter_text": "Please enter text", + "enter_serial": "Please enter the order number" + }, + "graphManagement": { + "title": "Data and Publication Management", + "category": "Category", + "new_category": "New category", + "index": "serial number", + "oriOrgName": "file", + "operation": "Function" + }, + "assetManagement": { + "title": "Asset Management", + "add_category": "Add category", + "system_name": "Name", + "system_value": "Code", + "system_parent": "Category", + "device_number": "Device number", + "device_name": "Device name", + "asset_number": "Asset number", + "floor": "Location", + "add_floor": "Add floor", + "add_floor_text": "Floor map must be uploaded first", + "device_coordinate": "Coordinate", + "brand_and_modal": "Brand/Model", + "brand": "Brand", + "modal": "Model", + "company_and_contact": "Company/Contact Person", + "company": "Company", + "buying_date": "Purchase time", + "oriFile": "File upload", + "created_at": "Creation time", + "operation": "Function", + "device_list": "Device list", + "edit_device": "Edit device", + "add_device": "Add device", + "operate_text": "Display name", + "fill_text": "Please fill it in by system personnel", + "equipment_point": "Equipment point", + "add_sensor": "Add new sensor", + "associated_device": "Associated devices", + "choose": "Choose", + "index": "serial number", + "floor_plan": "Floor plan" + }, + "accountManagement": { + "account_title": "Account Management", + "role_title": "Role Management", + "index": "serial number", + "name": "Name", + "account": "Account", + "password": "Password", + "role": "Role", + "role_name": "Role name", + "role_permissions": "Role permissions", + "role_permissions_setting": "Role permissions settings", + "permission_name": "Permission name", + "basic_permissions": "Basic permissions", + "production_permissions": "Production setting permissions", + "email": "email", + "phone": "Phone", + "created_at": "Created time", + "operation": "Function", + "name_placeholder": "Please enter user name", + "role_placeholder": "Please enter the role name", + "change_password": "Change password", + "choose": "Choose" + }, + "button": { + "add": "Add", + "cancel": "Cancel", + "query": "Query", + "search": "Search", + "view": "View", + "reset": "Reset", + "export": "Export", + "enter_text": "After entering text, press Enter", + "required": "Required", + "submit": "Submit", + "edit": "Edit", + "delete": "Delete", + "deselect_all": "Deselect all", + "select_all": "Select all", + "phone_format": "Please enter the correct phone number format", + "email_format": "Please enter correct email address", + "password_format": "The password must be at least 8 characters long and must contain English and numbers.", + "start_time_placeholder": "Please enter expected start date", + "rename": "Rename", + "download": "Download" + } +} diff --git a/src/main.js b/src/main.js index aa8baed..1c847f2 100644 --- a/src/main.js +++ b/src/main.js @@ -5,6 +5,10 @@ import "./assets/btn.css"; import "./assets/pagination.css"; import { createApp } from "vue"; +import { createI18n } from "vue-i18n"; +import tw from "./config/tw.json"; +import cn from "./config/cn.json"; +import us from "./config/us.json"; import Antd from "ant-design-vue"; import { createPinia } from "pinia"; import App from "./App.vue"; @@ -13,17 +17,32 @@ import "virtual:svg-icons-register"; // 引入项目中的全部全局组件 import SvgIcon from "@/components/svgIcon.vue"; import library from "./fontawsomeIconRegister"; +import "flag-icons/css/flag-icons.min.css"; /* import font awesome icon component */ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { focusPlugin } from "@/directives/focusPlugin"; import { draggable } from "@/directives/draggable"; +const messages = { + tw, + cn, + us, +}; +const storedLanguage = localStorage.getItem("CviLanguage") || "us"; + +const i18n = createI18n({ + legacy: false, + locale: storedLanguage, + fallbackLocale: 'us', + messages, +}); const app = createApp(App); app.use(createPinia()); app.use(router); app.use(Antd); +app.use(i18n); // 组装成一个对象 const allGlobalComponents = { SvgIcon, FontAwesomeIcon }; diff --git a/src/router/index.js b/src/router/index.js index 880bc39..9f1f5ac 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,6 +7,7 @@ import AccountManagement from "@/views/accountManagement/AccountManagement.vue"; import AssetManagement from "@/views/AssetManagement/AssetManagement.vue"; import AlertManagement from "@/views/alert/AlertManagement.vue"; import ProductSetting from "@/views/productSetting/ProductSetting.vue"; +import EnergyManagement from "@/views/energyManagement/EnergyManagement.vue"; import Login from "@/views/login/Login.vue"; import useUserInfoStore from "@/stores/useUserInfoStore"; import useGetCookie from "@/hooks/useGetCookie"; @@ -63,6 +64,11 @@ const router = createRouter({ name: "productSetting", component: ProductSetting, }, + { + path: "/energyManagement", + name: "energyManagement", + component: EnergyManagement, + }, { path: "/mytestfile/mjm", name: "mytestfile", diff --git a/src/views/AssetManagement/AssetManagement.vue b/src/views/AssetManagement/AssetManagement.vue index da38064..7a17e06 100644 --- a/src/views/AssetManagement/AssetManagement.vue +++ b/src/views/AssetManagement/AssetManagement.vue @@ -4,7 +4,9 @@ import AssetTable from "./components/AssetTable.vue"; diff --git a/src/views/AssetManagement/components/AssetSubList.vue b/src/views/AssetManagement/components/AssetSubList.vue index 76f8ffe..ec4cc92 100644 --- a/src/views/AssetManagement/components/AssetSubList.vue +++ b/src/views/AssetManagement/components/AssetSubList.vue @@ -52,12 +52,12 @@ const deleteItem = async (id) => {