@@ -253,7 +215,7 @@ onUnmounted(() => {
{{ value.show_value }}
-
+
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 @@
+
+
+
+
+
+
+ {{ $t("language") }}
+
+
+
+ 繁體中文
+
+
+ 简体中文
+
+
+ English
+
+
+
+
+
+
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) => {
-
+ /> -->
{
};
let subSysSchema = yup.object({
- system_key: yup.string().required("必填"), // 名稱
- system_value: yup.string().required("必填"), // 代稱
- system_parent_id: yup.number().required("必填"), // 大類id
+ system_key: yup.string().required(t("button.required")), // 名稱
+ system_value: yup.string().required(t("button.required")), // 代稱
+ system_parent_id: yup.number().required(t("button.required")), // 大類id
});
const { formErrorMsg, handleSubmit, handleErrorReset } =
@@ -73,11 +74,11 @@ const onOk = async () => {
- 新增
+ {{ $t("button.add") }}
{
diff --git a/src/views/AssetManagement/components/AssetTable.vue b/src/views/AssetManagement/components/AssetTable.vue
index df9b5a9..adb40e8 100644
--- a/src/views/AssetManagement/components/AssetTable.vue
+++ b/src/views/AssetManagement/components/AssetTable.vue
@@ -1,12 +1,13 @@
-
+
[
{
- title: "編號",
+ title: t("accountManagement.index"),
key: "index",
},
{
- title: "姓名",
+ title: t("accountManagement.name"),
key: "full_name",
filter: true,
},
{
- title: "帳號",
+ title: t("accountManagement.account"),
key: "account",
},
{
- title: "角色",
+ title: t("accountManagement.role"),
key: "role_full_name",
},
{
- title: "email",
+ title: t("accountManagement.email"),
key: "email",
},
{
- title: "手機",
+ title: t("accountManagement.phone"),
key: "phone",
},
{
- title: "建立時間",
+ title: t("accountManagement.created_at"),
key: "created_at",
},
{
- title: "操作",
+ title: t("accountManagement.operation"),
key: "operation",
},
-];
+]);
const dataSource = ref([]);
const loading = ref(false);
@@ -145,17 +146,18 @@ const removeAccount = async (id) => {
class="btn btn-success mr-3"
@click.stop.prevent="() => openModal(null)"
>
- 新增
+
+ {{ $t("button.add") }}
@@ -163,13 +165,13 @@ const removeAccount = async (id) => {
class="btn btn-outline-success ml-5"
@click.stop.prevent="onSearch"
>
- 搜尋
+ {{ $t("button.search") }}
- 重置
+ {{ $t("button.reset") }}
@@ -180,7 +182,7 @@ const removeAccount = async (id) => {
class="btn btn-sm btn-success text-white mr-2"
@click.stop.prevent="() => getUser(record.userinfo_guid)"
>
- 修改
+ {{ $t("button.edit") }}
{
})
"
>
- 變更密碼
+ {{ $t("accountManagement.change_password") }}
removeAccount(record.userinfo_guid)"
>
- 刪除
+ {{ $t("button.delete") }}
diff --git a/src/views/accountManagement/components/AccountModal.vue b/src/views/accountManagement/components/AccountModal.vue
index c850f04..34fbd03 100644
--- a/src/views/accountManagement/components/AccountModal.vue
+++ b/src/views/accountManagement/components/AccountModal.vue
@@ -4,7 +4,8 @@ import * as yup from "yup";
import "yup-phone-lite";
import useFormErrorMessage from "@/hooks/useFormErrorMessage";
import { getAccountRoleList, postAccountUser } from "@/apis/account";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { openToast } = inject("app_toast");
const props = defineProps({
@@ -15,18 +16,21 @@ const props = defineProps({
let userSchema = ref(
yup.object({
- Account: yup.string().required("必填"),
- Name: yup.string().required("必填"),
- Email: yup.string().email("請輸入正確的 Email 地址").required("必填"),
- Phone: yup.string().phone("TW", "請輸入正確電話號碼格式").required("必填"),
- RoleId: yup.string().required("必填"),
+ Account: yup.string().required(t("button.required")),
+ Name: yup.string().required(t("button.required")),
+ Email: yup
+ .string()
+ .email(t("button.email_format"))
+ .required(t("button.required")),
+ Phone: yup
+ .string()
+ .phone("TW", t("button.phone_format"))
+ .required(t("button.required")),
+ RoleId: yup.string().required(t("button.required")),
Password: yup
.string()
- .required("必填")
- .matches(
- /^(?=.{8})(?=.*[A-Za-z])(?=.*\d)/g,
- "密碼長度至少8碼,必須包含英文及數字"
- ),
+ .required(t("button.required"))
+ .matches(/^(?=.{8})(?=.*[A-Za-z])(?=.*\d)/g, t("button.password_format")),
})
);
@@ -40,32 +44,38 @@ watch(
let newSchema;
if (Boolean(newValue?.Id)) {
newSchema = yup.object({
- Account: yup.string().required("必填"),
- Name: yup.string().required("必填"),
- Email: yup.string().email("請輸入正確的 Email 地址").required("必填"),
+ Account: yup.string().required(t("button.required")),
+ Name: yup.string().required(t("button.required")),
+ Email: yup
+ .string()
+ .email(t("button.email_format"))
+ .required(t("button.required")),
Phone: yup
.string()
- .phone("TW", "請輸入正確電話號碼格式")
- .required("必填"),
- RoleId: yup.string().required("必填"),
+ .phone("TW", t("button.phone_format"))
+ .required(t("button.required")),
+ RoleId: yup.string().required(t("button.required")),
Password: yup.string(),
});
} else {
newSchema = yup.object({
- Account: yup.string().required("必填"),
- Name: yup.string().required("必填"),
- Email: yup.string().email("請輸入正確的 Email 地址").required("必填"),
+ Account: yup.string().required(t("button.required")),
+ Name: yup.string().required(t("button.required")),
+ Email: yup
+ .string()
+ .email(t("button.email_format"))
+ .required(t("button.required")),
Phone: yup
.string()
- .phone("TW", "請輸入正確電話號碼格式")
- .required("必填"),
- RoleId: yup.string().required("必填"),
+ .phone("TW", t("button.phone_format"))
+ .required(t("button.required")),
+ RoleId: yup.string().required(t("button.required")),
Password: yup
.string()
- .required("必填")
+ .required(t("button.required"))
.matches(
/^(?=.{8})(?=.*[A-Za-z])(?=.*\d)/g,
- "密碼長度至少8碼,必須包含英文及數字"
+ t("button.password_format")
),
});
}
@@ -111,7 +121,7 @@ const onOk = async () => {
@@ -123,7 +133,7 @@ const onOk = async () => {
name="Account"
:disabled="Boolean(formState?.Id)"
>
- 帳號
+ {{ $t("accountManagement.account") }}
{{ formErrorMsg.Account }}
@@ -137,7 +147,7 @@ const onOk = async () => {
name="Password"
type="password"
>
- 密碼
+ {{ $t("accountManagement.password") }}
{{ formErrorMsg.Password }}
@@ -145,7 +155,7 @@ const onOk = async () => {
>
- 姓名
+ {{ $t("accountManagement.name") }}
{{ formErrorMsg.Name }}
@@ -154,7 +164,7 @@ const onOk = async () => {
- Email
+ {{ $t("accountManagement.email") }}
{{ formErrorMsg.Email }}
@@ -162,7 +172,7 @@ const onOk = async () => {
>
- 電話
+ {{ $t("accountManagement.phone") }}
{{ formErrorMsg.Phone }}
@@ -178,7 +188,9 @@ const onOk = async () => {
Attribute="full_name"
:options="roleList"
>
- 角色權限
+ {{
+ $t("accountManagement.role_permissions")
+ }}
{{ formErrorMsg.RoleId }}
@@ -193,14 +205,14 @@ const onOk = async () => {
class="btn btn-outline-success mr-2"
@click.prevent="onCancel"
>
- 取消
+ {{ $t("button.cancel") }}
- 確定
+ {{ $t("button.submit") }}
diff --git a/src/views/accountManagement/components/AccountPasswordModal.vue b/src/views/accountManagement/components/AccountPasswordModal.vue
index d177938..6991f74 100644
--- a/src/views/accountManagement/components/AccountPasswordModal.vue
+++ b/src/views/accountManagement/components/AccountPasswordModal.vue
@@ -4,7 +4,8 @@ import * as yup from "yup";
import "yup-phone-lite";
import useFormErrorMessage from "@/hooks/useFormErrorMessage";
import { changePassword } from "@/apis/account";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { openToast } = inject("app_toast");
const props = defineProps({
@@ -16,7 +17,7 @@ const formState = ref({
});
let userSchema = yup.object({
- Password: yup.string().required("必填"),
+ Password: yup.string().required(t("button.required")),
});
const { formErrorMsg, handleSubmit, handleErrorReset } =
@@ -41,7 +42,7 @@ const onOk = async () => {
@@ -49,7 +50,9 @@ const onOk = async () => {
{{ account.Name }}
diff --git a/src/views/accountManagement/components/Role.vue b/src/views/accountManagement/components/Role.vue
index 03f5406..557b6c5 100644
--- a/src/views/accountManagement/components/Role.vue
+++ b/src/views/accountManagement/components/Role.vue
@@ -3,27 +3,28 @@ import Table from "@/components/customUI/Table.vue";
import Input from "@/components/customUI/Input.vue";
import { getAccountRoleList, delRole } from "@/apis/account";
import RoleAuthModal from "./RoleAuthModal.vue";
-import { ref, onMounted } from "vue";
-
-const columns = [
+import { ref, onMounted, computed } from "vue";
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
+const columns = computed(() => [
{
- title: "編號",
+ title: t("accountManagement.index"),
key: "index",
},
{
- title: "名稱",
+ title: t("accountManagement.role_name"),
key: "full_name",
},
{
- title: "建立時間",
+ title: t("accountManagement.created_at"),
key: "created_at",
},
{
- title: "操作",
+ title: t("accountManagement.operation"),
key: "operation",
width: 400,
},
-];
+]);
const dataSource = ref([]);
const loading = ref(false);
@@ -97,7 +98,7 @@ const onSearch = () => {
@@ -105,10 +106,10 @@ const onSearch = () => {
class="btn btn-outline-info mx-3"
@click.stop.prevent="onSearch"
>
- 搜尋
+ {{ $t("button.search") }}
- 新增
+ {{ $t("button.add") }}
@@ -119,19 +120,19 @@ const onSearch = () => {
class="btn btn-sm btn-info text-white mr-2"
@click.stop.prevent="() => view(record)"
>
- 查看
+ {{ $t("button.view") }}
edit(record)"
>
- 修改
+ {{ $t("button.edit") }}
remove(record.role_guid)"
>
- 刪除
+ {{ $t("button.delete") }}
diff --git a/src/views/accountManagement/components/RoleAuthModal.vue b/src/views/accountManagement/components/RoleAuthModal.vue
index f8a99ed..a5339d9 100644
--- a/src/views/accountManagement/components/RoleAuthModal.vue
+++ b/src/views/accountManagement/components/RoleAuthModal.vue
@@ -8,9 +8,10 @@ import {
getAccountRoleAuthList,
postAccountRole,
} from "@/apis/account";
-import { defineProps, onMounted, ref, watch } from "vue";
+import { defineProps, onMounted, ref, watch, computed } from "vue";
import useActiveBtn from "@/hooks/useActiveBtn";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const props = defineProps({
selectedRole: String,
cancelModal: Function,
@@ -20,20 +21,20 @@ const props = defineProps({
const { items, changeActiveBtn, setItems, selectedBtn } = useActiveBtn();
-const columns = [
+const columns = computed(() => [
{
- title: "選擇",
+ title: t("accountManagement.choose"),
key: "SaveCheckAuth",
},
{
- title: "編號",
+ title: t("accountManagement.index"),
key: "index",
},
{
- title: "權限名稱",
+ title: t("accountManagement.index"),
key: "subName",
},
-];
+]);
const rawData = ref([]);
const dataSource = ref([]);
@@ -58,13 +59,13 @@ watch(SaveCheckAuth, (newValue, oldValue) => {
if (newValue.includes("PF10") && !oldValue.includes("PF10")) {
setItems([
{
- title: "基礎權限",
+ title: t("accountManagement.basic_permissions"),
key: "PF",
active: selectedBtn.value.authCode === "PF",
authCode: "PF",
},
{
- title: "生產設定權限",
+ title: t("accountManagement.production_permissions"),
key: "PS",
active: selectedBtn.value.authCode === "PS",
authCode: "PS",
@@ -77,7 +78,7 @@ watch(SaveCheckAuth, (newValue, oldValue) => {
);
setItems([
{
- title: "基礎權限",
+ title: t("accountManagement.basic_permissions"),
key: "PF",
active: true,
authCode: "PF",
@@ -133,7 +134,7 @@ watch(
onMounted(() => {
setItems([
{
- title: "基礎權限",
+ title: t("accountManagement.basic_permissions"),
key: "PF",
active: true,
authCode: "PF",
@@ -144,13 +145,17 @@ onMounted(() => {
-
+
-
- 關閉
+
+ {{ $t("button.cancel") }}
-
- 確認
+
+ {{ $t("button.submit") }}
diff --git a/src/views/alert/AlertManagement.vue b/src/views/alert/AlertManagement.vue
index 2a82f7a..55d9e63 100644
--- a/src/views/alert/AlertManagement.vue
+++ b/src/views/alert/AlertManagement.vue
@@ -2,30 +2,39 @@
import ButtonGroup from "@/components/customUI/ButtonGroup.vue";
import AlertQuery from "./components/AlertQuery/AlertQuery.vue";
import AlertSetting from "./components/AlertSetting/AlertSetting.vue";
-import { computed, onMounted, ref, provide, onBeforeMount } from "vue";
+import { computed, watch, onBeforeMount } from "vue";
import useActiveBtn from "@/hooks/useActiveBtn";
-
+import { useI18n } from "vue-i18n";
+const { t, locale } = useI18n();
const changeComponent = (e, item) => {
changeActiveBtn(item);
};
const { items, changeActiveBtn, setItems } = useActiveBtn();
-onBeforeMount(() => {
+const initializeItems = () => {
setItems([
{
- title: "告警記錄查詢",
+ title: t("alert.query_title"),
key: "Query",
active: true,
component: AlertQuery,
},
{
- title: "告警設定",
+ title: t("alert.setting_title"),
key: "Setting",
active: false,
component: AlertSetting,
},
]);
+};
+
+onBeforeMount(() => {
+ initializeItems();
+});
+
+watch(locale, () => {
+ initializeItems();
});
const activeTab = computed(() => {
diff --git a/src/views/alert/components/AlertQuery/AlertActionButton.vue b/src/views/alert/components/AlertQuery/AlertActionButton.vue
deleted file mode 100644
index dfc92fa..0000000
--- a/src/views/alert/components/AlertQuery/AlertActionButton.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/alert/components/AlertQuery/AlertQuery.vue b/src/views/alert/components/AlertQuery/AlertQuery.vue
index 107a250..d9596d9 100644
--- a/src/views/alert/components/AlertQuery/AlertQuery.vue
+++ b/src/views/alert/components/AlertQuery/AlertQuery.vue
@@ -5,9 +5,7 @@ import AlertTableModal from "./AlertTableModal.vue";
import { ref, provide, onMounted } from "vue";
import useSearchParam from "@/hooks/useSearchParam";
import useAlarmData from "@/hooks/baja/useAlarmData";
-import {
- getAlertFormId,
-} from "@/apis/alert";
+import { getAlertFormId } from "@/apis/alert";
import {
getOperationDeviceList,
getOperationCompanyList,
@@ -55,7 +53,9 @@ const getFormId = async (uuid) => {
};
const getModalDevList = async () => {
- const sub_system_tags = searchParams.value.system_tag.map(tag => tag.split('_')[1]);
+ const sub_system_tags = searchParams.value.system_tag.map(
+ (tag) => tag.split("_")[1]
+ );
const res = await getOperationDeviceList({
list_sub_system_tag: sub_system_tags,
device_building_tag: store.buildings[0].building_tag,
@@ -102,18 +102,20 @@ const search = async () => {
async (result) => {
alarmData.value = result.data;
// 確保所有 alarm 都包含 formId
- alarmData.value = alarmData.value.map(alarm => ({
+ alarmData.value = alarmData.value.map((alarm) => ({
...alarm,
- formId: null // 初始設置 formId 為 null
+ formId: null, // 初始設置 formId 為 null
}));
- const uuids = alarmData.value.map(alarm => ({ uuid: alarm.uuid }));
+ const uuids = alarmData.value.map((alarm) => ({ uuid: alarm.uuid }));
const formIds = await getFormId(uuids);
if (Array.isArray(formIds)) {
formIds.forEach((form) => {
if (form && form.uuid) {
- const index = alarmData.value.findIndex(alarm => alarm.uuid === form.uuid);
+ const index = alarmData.value.findIndex(
+ (alarm) => alarm.uuid === form.uuid
+ );
if (index !== -1) {
alarmData.value[index].formId = form.formId || null;
}
@@ -150,11 +152,17 @@ onMounted(() => {
});
provide("alert_modal", { model_data, search, updateEditRecord });
-provide("alert_table", { openModal, updateEditRecord, dataSource, search, tableLoading });
+provide("alert_table", {
+ openModal,
+ updateEditRecord,
+ dataSource,
+ search,
+ tableLoading,
+});
-
+
diff --git a/src/views/alert/components/AlertQuery/AlertSearch.vue b/src/views/alert/components/AlertQuery/AlertSearch.vue
index d6203bd..e9e8a9d 100644
--- a/src/views/alert/components/AlertQuery/AlertSearch.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearch.vue
@@ -15,7 +15,7 @@ const { search } = inject("alert_table");
-
查詢
+
{{ $t("button.query")}}
diff --git a/src/views/alert/components/AlertQuery/AlertSearchAckBtns.vue b/src/views/alert/components/AlertQuery/AlertSearchAckBtns.vue
index 52b7a2d..42e9e96 100644
--- a/src/views/alert/components/AlertQuery/AlertSearchAckBtns.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearchAckBtns.vue
@@ -2,7 +2,8 @@
import { onMounted, watch } from "vue";
import useActiveBtn from "@/hooks/useActiveBtn";
import useSearchParam from "@/hooks/useSearchParam";
-
+import { useI18n } from "vue-i18n";
+const { t, locale } = useI18n();
const { searchParams, changeParams } = useSearchParam();
const {
items,
@@ -11,19 +12,27 @@ const {
selectedBtn
} = useActiveBtn();
-onMounted(() => {
+const initializeItems = () => {
setItems([
{
- title: "未確認",
+ title: t("alert.unacked"),
key: "unacked",
active: true,
},
{
- title: "已確認",
+ title: t("alert.acked"),
key: "acked",
active: false,
},
]);
+};
+
+onMounted(() => {
+ initializeItems();
+});
+
+watch(locale, () => {
+ initializeItems();
});
watch(
diff --git a/src/views/alert/components/AlertQuery/AlertSearchNormalBtns.vue b/src/views/alert/components/AlertQuery/AlertSearchNormalBtns.vue
index 7614aaf..e3c849d 100644
--- a/src/views/alert/components/AlertQuery/AlertSearchNormalBtns.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearchNormalBtns.vue
@@ -2,25 +2,32 @@
import useActiveBtn from "@/hooks/useActiveBtn";
import { onMounted, watch } from "vue";
import useSearchParam from "@/hooks/useSearchParam";
-
+import { useI18n } from "vue-i18n";
+const { t, locale } = useI18n();
const { searchParams, changeParams } = useSearchParam();
-
const { items, changeActiveBtn, setItems, selectedBtn } = useActiveBtn();
-onMounted(() => {
+const initializeItems = () => {
setItems([
{
- title: "未復歸",
+ title: t("alert.offnormal"),
key: "offnormal",
active: true,
},
{
- title: "已賦歸",
+ title: t("alert.normal"),
key: "normal",
active: false,
},
]);
+};
+onMounted(() => {
+ initializeItems();
+});
+
+watch(locale, () => {
+ initializeItems();
});
// 監聽按鈕變化
diff --git a/src/views/alert/components/AlertQuery/AlertSearchTimeRange.vue b/src/views/alert/components/AlertQuery/AlertSearchTimeRange.vue
index c70ba65..aaededd 100644
--- a/src/views/alert/components/AlertQuery/AlertSearchTimeRange.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearchTimeRange.vue
@@ -2,21 +2,26 @@
import { ref, onMounted, watch } from "vue";
import dayjs from "dayjs";
import useSearchParam from "@/hooks/useSearchParam";
-
+import { useI18n } from "vue-i18n";
+const { t, locale } = useI18n();
const { searchParams, changeParams } = useSearchParam();
const dateRange = ref([
{
key: "start_at",
- value: searchParams.value.start_created_at ? dayjs(searchParams.value.start_created_at).valueOf() : dayjs().subtract(30, 'day').valueOf(),
+ value: searchParams.value.start_created_at
+ ? dayjs(searchParams.value.start_created_at).valueOf()
+ : dayjs().subtract(30, "day").valueOf(),
dateFormat: "yyyy-MM-dd",
- placeholder: "起始日期",
+ placeholder: t("alert.start_date"),
},
{
key: "end_at",
- value: searchParams.value.end_created_at ? dayjs(searchParams.value.end_created_at).valueOf() : dayjs().valueOf(),
+ value: searchParams.value.end_created_at
+ ? dayjs(searchParams.value.end_created_at).valueOf()
+ : dayjs().valueOf(),
dateFormat: "yyyy-MM-dd",
- placeholder: "結束日期",
+ placeholder: t("alert.end_date"),
},
]);
@@ -24,15 +29,15 @@ const changeTimeRange = () => {
const newRange = [
{
key: "start_at",
- value: dayjs().subtract(30, 'day').startOf('day').valueOf(), // 向前推30天並設置為當天的00:00:00.000
+ value: dayjs().subtract(30, "day").startOf("day").valueOf(), // 向前推30天並設置為當天的00:00:00.000
dateFormat: "yyyy-MM-dd",
- placeholder: "起始日期",
+ placeholder: t("alert.start_date"),
},
{
key: "end_at",
- value: dayjs().endOf('day').valueOf(), // 設置為今日的23:59:59.999
+ value: dayjs().endOf("day").valueOf(), // 設置為今日的23:59:59.999
dateFormat: "yyyy-MM-dd",
- placeholder: "結束日期",
+ placeholder: t("alert.end_date"),
},
];
@@ -47,7 +52,10 @@ const changeTimeRange = () => {
onMounted(() => {
// 初始化日期範圍
- if (!searchParams.value.start_created_at || !searchParams.value.end_created_at) {
+ if (
+ !searchParams.value.start_created_at ||
+ !searchParams.value.end_created_at
+ ) {
changeTimeRange();
}
});
@@ -58,18 +66,29 @@ watch(
() => {
changeParams({
...searchParams.value,
- start_created_at: dayjs(dateRange.value[0].value).startOf('day').valueOf(),
- end_created_at: dayjs(dateRange.value[1].value).endOf('day').valueOf(),
+ start_created_at: dayjs(dateRange.value[0].value)
+ .startOf("day")
+ .valueOf(),
+ end_created_at: dayjs(dateRange.value[1].value).endOf("day").valueOf(),
});
},
{ deep: true } // 確保在初始化立即觸發
);
+
+watch(locale, () => {
+ dateRange.value[0].placeholder = t("alert.start_date");
+ dateRange.value[1].placeholder = t("alert.end_date");
+});
-
- 近30天
+
+ {{ $t("alert.30days") }}
diff --git a/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue b/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
index 4580ad9..2a626b9 100644
--- a/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
@@ -3,7 +3,8 @@ import useBuildingStore from "@/stores/useBuildingStore";
import Checkbox from "@/components/customUI/Checkbox.vue";
import { computed, onMounted, ref, watch } from "vue";
import useSearchParam from "@/hooks/useSearchParam";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { searchParams, changeParams } = useSearchParam();
const store = useBuildingStore();
@@ -65,7 +66,7 @@ watch(searchParams, (newValue) => {
class="btn btn-success mr-4"
@click.stop.prevent="changeCheckedItem"
>
- {{ checkedItem.length === store.subSys.length ? "取消全選" : "全選" }}
+ {{ checkedItem.length === store.subSys.length ? t("button.deselect_all") : t("button.select_all") }}
-import { inject } from "vue";
-import {
- postChgAck,
-} from "@/apis/alert";
+import { inject, computed } from "vue";
+import { postChgAck } from "@/apis/alert";
import { Button } from "ant-design-vue";
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { dataSource, openModal, search, tableLoading } = inject("alert_table");
-const columns = [
+const columns = computed(() => [
{
key: "building_tag",
- title: "棟別-樓層",
+ title: t("alert.building_and_floor"),
},
{
key: "uuid",
- title: "異常ID",
+ title: t("alert.uuid"),
},
{
key: "alarmClass",
- title: "異常類別",
+ title: t("alert.alarmClass"),
},
{
key: "full_name",
- title: "設備名稱",
+ title: t("alert.device_name"),
},
{
key: "device_number",
- title: "設備編號",
+ title: t("alert.device_number"),
},
{
key: "timestamp_date",
- title: "發生日期",
+ title: t("alert.date"),
},
{
key: "timestamp_time",
- title: "發生時間",
+ title: t("alert.time"),
},
{
key: "msg",
- title: "異常原因",
+ title: t("alert.error_msg"),
},
{
key: "ackState",
- title: "Ack 確認",
+ title: t("alert.ack_state"),
},
{
key: "repairOrder",
- title: "派工 / 維運單號",
+ title: t("alert.repair_order_number"),
},
-];
+]);
const chgAck = async (devUuid) => {
const res = await postChgAck(devUuid);
@@ -55,7 +55,6 @@ const chgAck = async (devUuid) => {
search?.();
}
};
-
@@ -63,8 +62,11 @@ const chgAck = async (devUuid) => {
- chgAck(record.uuid)">
- 未確認
+ chgAck(record.uuid)"
+ >
+ {{ $t("alert.unacked") }}
@@ -72,11 +74,15 @@ const chgAck = async (devUuid) => {
- openModal(record)">
+ openModal(record)"
+ >
{{ record.formId }}
- 維修單
+ {{
+ $t("alert.repair_order_number")
+ }}
diff --git a/src/views/alert/components/AlertQuery/AlertTableModal.vue b/src/views/alert/components/AlertQuery/AlertTableModal.vue
index b9d4345..f68c50a 100644
--- a/src/views/alert/components/AlertQuery/AlertTableModal.vue
+++ b/src/views/alert/components/AlertQuery/AlertTableModal.vue
@@ -1,13 +1,12 @@
-
+
+
+
- 上傳檔案
+ {{ $t("alert.upload_file") }}
-
- 取消
+
+ {{ $t("button.cancel") }}
-
- 確定
+
+ {{ $t("button.submit")}}
-
\ No newline at end of file
+
diff --git a/src/views/alert/components/AlertSetting/AlertNoticesTable.vue b/src/views/alert/components/AlertSetting/AlertNoticesTable.vue
index 4e9fb00..2bfdfd1 100644
--- a/src/views/alert/components/AlertSetting/AlertNoticesTable.vue
+++ b/src/views/alert/components/AlertSetting/AlertNoticesTable.vue
@@ -1,23 +1,24 @@
diff --git a/src/views/alert/components/AlertSetting/AlertNotifyTable.vue b/src/views/alert/components/AlertSetting/AlertNotifyTable.vue
index 7c196c9..8176048 100644
--- a/src/views/alert/components/AlertSetting/AlertNotifyTable.vue
+++ b/src/views/alert/components/AlertSetting/AlertNotifyTable.vue
@@ -1,60 +1,64 @@
-
通知名單
-
+
{{ $t("alert.notify_list") }}
+
- openModal(record)">
- 修改
+ openModal(record)"
+ >
+ {{ $t("button.edit") }}
- remove(record.id)">
- 刪除
+ remove(record.id)"
+ >
+ {{ $t("button.delete") }}
diff --git a/src/views/alert/components/AlertSetting/AlertNotifyTableAddModal.vue b/src/views/alert/components/AlertSetting/AlertNotifyTableAddModal.vue
index 0c8ac16..4252752 100644
--- a/src/views/alert/components/AlertSetting/AlertNotifyTableAddModal.vue
+++ b/src/views/alert/components/AlertSetting/AlertNotifyTableAddModal.vue
@@ -4,7 +4,8 @@ import useFormErrorMessage from "@/hooks/useFormErrorMessage";
import AlertNoticesTable from "./AlertNoticesTable.vue";
import { postAlertMember } from "@/apis/alert";
import * as yup from "yup";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { openToast } = inject("app_toast");
const { noticeList } = inject("notify_table");
const props = defineProps({
@@ -15,9 +16,15 @@ const props = defineProps({
});
let scheme = yup.object({
- name: yup.string().required("必填"),
- phone: yup.string().phone("TW", "請輸入正確電話號碼格式").required("必填"),
- email: yup.string().email("請輸入正確的 Email 地址").required("必填"),
+ name: yup.string().required(t("button.required")),
+ phone: yup
+ .string()
+ .phone("TW", t("button.phone_format"))
+ .required(t("button.required")),
+ email: yup
+ .string()
+ .email(t("button.email_format"))
+ .required(t("button.required")),
});
const form = ref(null);
@@ -31,8 +38,9 @@ const formState = ref({
const SaveCheckAuth = ref([]);
-const { formErrorMsg, handleSubmit, handleErrorReset } =
- useFormErrorMessage(scheme.value);
+const { formErrorMsg, handleSubmit, handleErrorReset } = useFormErrorMessage(
+ scheme.value
+);
watch(
() => props.editRecord,
@@ -60,11 +68,10 @@ const onChange = (value, checked) => {
const onOk = async () => {
const values = await handleSubmit(scheme, formState.value);
- const res = await postAlertMember(
- {
- ...values,
- notices: SaveCheckAuth.value ? SaveCheckAuth.value : [],
- });
+ const res = await postAlertMember({
+ ...values,
+ notices: SaveCheckAuth.value ? SaveCheckAuth.value : [],
+ });
if (res.isSuccess) {
props.fetchTableData();
closeModal();
@@ -82,40 +89,48 @@ const closeModal = () => {
- 新增
+ {{ $t("button.add") }}
-
+
- 姓名
-
-
- {{ formErrorMsg.name }}
-
-
+ {{ $t("alert.notify_name") }}
+
+
+ {{ formErrorMsg.name }}
+
+
- 電話
-
-
- {{ formErrorMsg.phone }}
-
-
+ {{ $t("alert.notify_phone") }}
+
+
+ {{ formErrorMsg.phone }}
+
+
- Email
-
-
- {{ formErrorMsg.email }}
-
-
+ {{ $t("alert.notify_email") }}
+
+
+ {{ formErrorMsg.email }}
+
+
-
- 通知項目
-
-
+
{{ $t("alert.notify_items") }}
+
{{ formErrorMsg.notices }}
@@ -123,11 +138,19 @@ const closeModal = () => {
-
- 取消
+
+ {{ $t("button.cancel") }}
-
- 確定
+
+ {{ $t("button.submit") }}
diff --git a/src/views/alert/components/AlertSetting/AlertOutliersTable.vue b/src/views/alert/components/AlertSetting/AlertOutliersTable.vue
index d942294..59b750a 100644
--- a/src/views/alert/components/AlertSetting/AlertOutliersTable.vue
+++ b/src/views/alert/components/AlertSetting/AlertOutliersTable.vue
@@ -1,10 +1,16 @@
-
異常設定
-
{{ $t("alert.alarm_settings") }}
+
+
-
@@ -180,19 +195,22 @@ const onTimeCancel = () => {
class="btn btn-sm btn-success text-white mr-2"
@click.stop.prevent="() => openModal(record)"
>
- 修改
+ {{ $t("button.edit") }}
- {{ record.enable === 1 ? '是' : '否' }}
+ {{ record.enable === 1 ? t("alert.yes") : t("alert.no") }}
{{ record.warning_method }}
- openTimeModal(record)"
>
- 限制告警時間
+ {{ $t("alert.time_setting") }}
diff --git a/src/views/alert/components/AlertSetting/AlertOutliersTableAddModal.vue b/src/views/alert/components/AlertSetting/AlertOutliersTableAddModal.vue
index 95ffd43..2d95e4d 100644
--- a/src/views/alert/components/AlertSetting/AlertOutliersTableAddModal.vue
+++ b/src/views/alert/components/AlertSetting/AlertOutliersTableAddModal.vue
@@ -5,7 +5,8 @@ import useFormErrorMessage from "@/hooks/useFormErrorMessage";
import AlertNoticesTable from "./AlertNoticesTable.vue";
import { postOutliersSetting } from "@/apis/alert";
import * as yup from "yup";
-
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const { openToast } = inject("app_toast");
const { noticeList } = inject("notify_table");
const { searchParams, changeParams } = useSearchParam();
@@ -20,23 +21,23 @@ const props = defineProps({
const form = ref(null);
const formState = ref({
- "id": 0,
- "device_number": "",
- "device_name_tag": searchParams.value?.subSys_id,
- "points": "",
- "enable": 0,
- "is_bool": 1,
- "factor": null,
- "highLimit": null,
- "lowLimit": null,
- "highDelay": null,
- "lowDelay": null,
- "notices": []
+ id: 0,
+ device_number: "",
+ device_name_tag: searchParams.value?.subSys_id,
+ points: "",
+ enable: 0,
+ is_bool: 1,
+ factor: null,
+ highLimit: null,
+ lowLimit: null,
+ highDelay: null,
+ lowDelay: null,
+ notices: [],
});
let scheme = yup.object({
- device_number: yup.string().required("必填"),
- points: yup.string().required("必填"),
+ device_number: yup.string().required(t("button.required")),
+ points: yup.string().required(t("button.required")),
factor: yup.number().nullable(),
enable: yup.number().required(),
highLimit: yup.number().nullable(),
@@ -45,8 +46,9 @@ let scheme = yup.object({
lowDelay: yup.number().nullable(),
});
-const { formErrorMsg, handleSubmit, handleErrorReset } =
- useFormErrorMessage(scheme.value);
+const { formErrorMsg, handleSubmit, handleErrorReset } = useFormErrorMessage(
+ scheme.value
+);
const SaveCheckAuth = ref([]);
const isBool = ref(1);
@@ -69,15 +71,17 @@ watch(
);
const onPointsChange = (selectedPoint) => {
- const pointData = props.OptionsData.alarmPoints.find(p => p.points === selectedPoint);
+ const pointData = props.OptionsData.alarmPoints.find(
+ (p) => p.points === selectedPoint
+ );
if (pointData) {
isBool.value = pointData.is_bool;
formState.value.is_bool = pointData.is_bool;
if (pointData.factor && Array.isArray(pointData.factor)) {
factorData.value = pointData.factor.map((d) => ({
...d,
- key: d.id
- }));;
+ key: d.id,
+ }));
} else {
factorData.value = [];
formState.value.factor = 0;
@@ -120,74 +124,141 @@ const closeModal = () => {
factorData.value = [];
isBool.value = 1;
};
-
- 新增
+ {{ $t("button.add") }}
-
+
-
- 設備名稱
-
+
+ {{ $t("alert.device_name") }}
+
{{ formErrorMsg.device_number }}
-
+
-
- 項目
-
+
+ {{ $t("alert.item") }}
+
{{ formErrorMsg.points }}
-
+
-
- 狀態
+
+ {{ $t("alert.status") }}
-
- 限定條件
+
+ {{ $t("alert.qualifications") }}
-
- 上限(>=)
+
+ {{ $t("alert.upper_limit") }}(>=)
-
- 下限(<=)
+
+ {{ $t("alert.lower_limit") }}(<=)
-
- 上限持續秒數
+
+ {{ $t("alert.highDelay") }}
-
- 下限持續秒數
+
+ {{ $t("alert.lowDelay") }}
- 警示方式
+ {{ $t("alert.warning_method") }}
-
+
-
- 取消
+
+ {{ $t("button.cancel") }}
-
- 確定
+
+ {{ $t("buttton.submit") }}
diff --git a/src/views/alert/components/AlertSetting/AlertOutliersTimeModal.vue b/src/views/alert/components/AlertSetting/AlertOutliersTimeModal.vue
index 154dd85..3aa3dfe 100644
--- a/src/views/alert/components/AlertSetting/AlertOutliersTimeModal.vue
+++ b/src/views/alert/components/AlertSetting/AlertOutliersTimeModal.vue
@@ -10,29 +10,73 @@ const closeModal = () => {
props.onCancel();
};
+const columns = [
+ {
+ title: "排程名稱",
+ key: "schedule_name",
+ },
+ {
+ title: "時段",
+ key: "schedule_time",
+ },
+ {
+ title: "狀態",
+ key: "enable",
+ },
+ {
+ title: "功能",
+ key: "operation",
+ width: 150,
+ },
+];
-
+
- 限制告警時間設定
+ 警示時間設定
-
+
-
+
+
+
+ openModal(record)"
+ >
+ 修改
+
+ remove(record.userinfo_guid)"
+ >
+ 刪除
+
+
+
+ {{ record[column.key] }}
+
+
+
-
+
diff --git a/src/views/alert/components/AlertSetting/AlertSetting.vue b/src/views/alert/components/AlertSetting/AlertSetting.vue
index f5b02e7..0c121ea 100644
--- a/src/views/alert/components/AlertSetting/AlertSetting.vue
+++ b/src/views/alert/components/AlertSetting/AlertSetting.vue
@@ -8,7 +8,7 @@ const noticeList = ref([]);
const NoticeListData = async () => {
const res = await getNoticeList();
- noticeList.value = res.data;
+ noticeList.value = res.data;
};
onMounted(() => {
@@ -16,11 +16,10 @@ onMounted(() => {
});
provide("notify_table", { noticeList });
-
-
+
diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue
index 9ceb1b8..ddf5fb9 100644
--- a/src/views/dashboard/Dashboard.vue
+++ b/src/views/dashboard/Dashboard.vue
@@ -1,13 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/dashboard/components/DashboardAlert.vue b/src/views/dashboard/components/DashboardAlert.vue
deleted file mode 100644
index 562d044..0000000
--- a/src/views/dashboard/components/DashboardAlert.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
異常資料 Top 5
-
-
-
- 日期
- 時間
- 設備名稱
- 備註
-
-
-
-
- {{ alarm.timestamp_date }}
- {{ alarm.timestamp_time }}
- {{ alarm.full_name }}
- {{ alarm.msg }}
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardElecChart.vue b/src/views/dashboard/components/DashboardElecChart.vue
new file mode 100644
index 0000000..2eaea08
--- /dev/null
+++ b/src/views/dashboard/components/DashboardElecChart.vue
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+ Yesterday / Today's Electricity Consumption Comparison (kWH)
+
+
+
+
+
+
+
+
+
+
+
+
+ This Week's / Last Week's Electricity Consumption Comparison (kWH)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/dashboard/components/DashboardElectricity.vue b/src/views/dashboard/components/DashboardElectricity.vue
deleted file mode 100644
index c7c0392..0000000
--- a/src/views/dashboard/components/DashboardElectricity.vue
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
- 用電量
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardEnergy.vue b/src/views/dashboard/components/DashboardEnergy.vue
deleted file mode 100644
index fa6a49d..0000000
--- a/src/views/dashboard/components/DashboardEnergy.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardFormulaTemp.vue b/src/views/dashboard/components/DashboardFormulaTemp.vue
deleted file mode 100644
index 377303b..0000000
--- a/src/views/dashboard/components/DashboardFormulaTemp.vue
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
廠房溫濕度
-
-
- openModal(intervalType)"
- >
- More
-
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardFrozenTemp.vue b/src/views/dashboard/components/DashboardFrozenTemp.vue
deleted file mode 100644
index a359a7c..0000000
--- a/src/views/dashboard/components/DashboardFrozenTemp.vue
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
- 冷藏溫度
- openModal(intervalType)"
- >
- More
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardGasoline.vue b/src/views/dashboard/components/DashboardGasoline.vue
deleted file mode 100644
index f2872b0..0000000
--- a/src/views/dashboard/components/DashboardGasoline.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
- 柴油用量
- openModal(intervalType)"
- >
- More
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardImmediateTemp.vue b/src/views/dashboard/components/DashboardImmediateTemp.vue
deleted file mode 100644
index 481fc14..0000000
--- a/src/views/dashboard/components/DashboardImmediateTemp.vue
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
二重鍋溫度
-
-
- openModal(intervalType)"
- >
- More
-
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardMoreModal.vue b/src/views/dashboard/components/DashboardMoreModal.vue
deleted file mode 100644
index c2aef11..0000000
--- a/src/views/dashboard/components/DashboardMoreModal.vue
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
-
-
-
-
-
- 取消
-
-
- 確定
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardProduct.vue b/src/views/dashboard/components/DashboardProduct.vue
deleted file mode 100644
index 551af5c..0000000
--- a/src/views/dashboard/components/DashboardProduct.vue
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardProductComplete.vue b/src/views/dashboard/components/DashboardProductComplete.vue
deleted file mode 100644
index 02ca10b..0000000
--- a/src/views/dashboard/components/DashboardProductComplete.vue
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
今日生產完成率 %
-
-
-
- More
-
-
-
-
-
-
{{ pac }}
-
-
{{ percentage }} %
-
-
- 尚未設定目標值
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardProductCompleteModal.vue b/src/views/dashboard/components/DashboardProductCompleteModal.vue
deleted file mode 100644
index a7d239a..0000000
--- a/src/views/dashboard/components/DashboardProductCompleteModal.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 取消
-
-
- 確定
-
-
-
-
- 取消
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/dashboard/components/DashboardProductCompleteModalRecord.vue b/src/views/dashboard/components/DashboardProductCompleteModalRecord.vue
deleted file mode 100644
index 8b9c417..0000000
--- a/src/views/dashboard/components/DashboardProductCompleteModalRecord.vue
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
-
- 日期
-
-
-
-
-
-
-
-
-
{{ item.pac }} : {{ item.value }}/{{ item.target }}
-
-
-
- {{ record[column.key] }}
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/DashboardProductCompleteModalTarget.vue b/src/views/dashboard/components/DashboardProductCompleteModalTarget.vue
deleted file mode 100644
index bc1dd86..0000000
--- a/src/views/dashboard/components/DashboardProductCompleteModalTarget.vue
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- 日期
-
-
-
-
-
-
包裝類型
-
-
-
- {{ size.text }}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/dashboard/components/DashboardStat.vue b/src/views/dashboard/components/DashboardStat.vue
new file mode 100644
index 0000000..3685522
--- /dev/null
+++ b/src/views/dashboard/components/DashboardStat.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
{{ item.value }}
+
+ {{ item.label }}
+
+
+
+
+
+
+
diff --git a/src/views/dashboard/components/DashboardSysCard.vue b/src/views/dashboard/components/DashboardSysCard.vue
new file mode 100644
index 0000000..c59fcd6
--- /dev/null
+++ b/src/views/dashboard/components/DashboardSysCard.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
diff --git a/src/views/dashboard/components/DashboardSysProgress.vue b/src/views/dashboard/components/DashboardSysProgress.vue
new file mode 100644
index 0000000..231f73e
--- /dev/null
+++ b/src/views/dashboard/components/DashboardSysProgress.vue
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
{{ section.title }}
+
+
+
+
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+
+
+
+
+
{{ group[0].value }}
+
+
+
{{ group[1].value }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/energyManagement/EnergyManagement.vue b/src/views/energyManagement/EnergyManagement.vue
new file mode 100644
index 0000000..6e9a8e8
--- /dev/null
+++ b/src/views/energyManagement/EnergyManagement.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/energyManagement/components/BillingDegreeChart.vue b/src/views/energyManagement/components/BillingDegreeChart.vue
new file mode 100644
index 0000000..bfdca33
--- /dev/null
+++ b/src/views/energyManagement/components/BillingDegreeChart.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
diff --git a/src/views/energyManagement/components/ElecConsumption.vue b/src/views/energyManagement/components/ElecConsumption.vue
new file mode 100644
index 0000000..fd51b92
--- /dev/null
+++ b/src/views/energyManagement/components/ElecConsumption.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
diff --git a/src/views/energyManagement/components/ElectricityBillChart.vue b/src/views/energyManagement/components/ElectricityBillChart.vue
new file mode 100644
index 0000000..5c73cde
--- /dev/null
+++ b/src/views/energyManagement/components/ElectricityBillChart.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
diff --git a/src/views/energyManagement/components/ImmediateDemandChart.vue b/src/views/energyManagement/components/ImmediateDemandChart.vue
new file mode 100644
index 0000000..fd03231
--- /dev/null
+++ b/src/views/energyManagement/components/ImmediateDemandChart.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
diff --git a/src/views/energyManagement/components/UsageInformation.vue b/src/views/energyManagement/components/UsageInformation.vue
new file mode 100644
index 0000000..937869f
--- /dev/null
+++ b/src/views/energyManagement/components/UsageInformation.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
今年電費總計 (元)
+
516,519
+
2024-01-01 ~ 2024-08-08
+
+
+
區間電費總計 (元)
+
22,432
+
2024-07-01 ~ 2024-07-31
+
+
+
+
+
+
+
今年用電度數 (kWh)
+
172,173
+
2024-01-01 ~ 2024-08-08
+
+
+
區間用電度數 (kWh)
+
7,477
+
2024-07-01 ~ 2024-07-31
+
+
+
+
+
diff --git a/src/views/graphManagement/GraphManagement.vue b/src/views/graphManagement/GraphManagement.vue
index db73a2f..3122bbe 100644
--- a/src/views/graphManagement/GraphManagement.vue
+++ b/src/views/graphManagement/GraphManagement.vue
@@ -12,11 +12,12 @@ provide("current_dir", { current_dir, updateCurrentDir });
diff --git a/src/views/graphManagement/components/GraphModal.vue b/src/views/graphManagement/components/GraphModal.vue
index 25130bb..1260374 100644
--- a/src/views/graphManagement/components/GraphModal.vue
+++ b/src/views/graphManagement/components/GraphModal.vue
@@ -122,13 +122,13 @@ watch(
- 新增
+ {{ $t("button.add") }}
-
圖資類別
+
{{ $t("graphManagement.category") }}
{{ current_dir?.remark }}