+
@@ -73,7 +83,7 @@ const src = import.meta.env.MODE === "production" ? "./logo.svg" : Logo;
{{ user || "webUser" }}
@@ -102,7 +112,7 @@ const src = import.meta.env.MODE === "production" ? "./logo.svg" : Logo;
}
/**menu**/
.menu-box {
- @apply flex justify-center;
+ @apply flex flex-wrap justify-center ;
position: relative;
z-index: 0;
}
@@ -130,11 +140,6 @@ const src = import.meta.env.MODE === "production" ? "./logo.svg" : Logo;
z-index: 0;
}
-.menu-icon {
- width: 40px;
- margin: auto;
-}
-
.menu-box .btn-group span {
color: #fff;
display: block;
diff --git a/src/components/navbar/NavbarItem.vue b/src/components/navbar/NavbarItem.vue
index 5928960..6324db8 100644
--- a/src/components/navbar/NavbarItem.vue
+++ b/src/components/navbar/NavbarItem.vue
@@ -4,13 +4,14 @@ import { AUTHPAGES } from "@/constant";
import { getAuth, getAllSysSidebar } from "@/apis/building";
import useBuildingStore from "@/stores/useBuildingStore";
import useUserInfoStore from "@/stores/useUserInfoStore";
-
+import { useI18n } from "vue-i18n";
+const { locale } = useI18n();
const store = useUserInfoStore();
const buildingStore = useBuildingStore();
const iniFroList = async () => {
- const res = await getAuth();
+ const res = await getAuth(locale.value);
store.updateAuthPage(
res.data.map((d) =>
@@ -64,6 +65,10 @@ watch(
}
);
+watch(locale, () => {
+ iniFroList();
+});
+
onMounted(() => {
iniFroList();
});
@@ -78,9 +83,9 @@ onMounted(() => {
- 首頁
+ {{ $t("home") }}
{
{{ page.subName }}
@@ -108,7 +113,7 @@ onMounted(() => {
{{ page.subName }}
diff --git a/src/components/navbar/NavbarLang.vue b/src/components/navbar/NavbarLang.vue
index b4f647f..7de7648 100644
--- a/src/components/navbar/NavbarLang.vue
+++ b/src/components/navbar/NavbarLang.vue
@@ -3,12 +3,10 @@ import { useI18n } from "vue-i18n";
import { ref, onMounted } from "vue";
const { locale } = useI18n(); // 使用 I18n
-const language = ref(locale.value)
// 切換語言
const toggleLanguage = (lang) => {
locale.value = lang;
localStorage.setItem("CviLanguage", lang);
- language.value = lang;
};
@@ -20,7 +18,7 @@ const toggleLanguage = (lang) => {
class="flex flex-col justify-center items-center btn-group"
>
{{ $t("language") }}
diff --git a/src/config/cn.json b/src/config/cn.json
index a1c52ed..15f0459 100644
--- a/src/config/cn.json
+++ b/src/config/cn.json
@@ -1,9 +1,28 @@
{
"language": "简体中文",
+ "home": "首页",
"sign_out": "登出",
"log_in": "登入",
"account": "帐号",
"password": "密码",
+ "table": {
+ "no_data": "表中数据为空",
+ "in_otal": "笔资料",
+ "skip_to": "跳至"
+ },
+ "upload": {
+ "title": "选择一个文件或拖放到这里",
+ "description": "档案不超过 10MB"
+ },
+ "dashboard": {
+ "yesterday_today": "昨天/今天",
+ "elec_consumption_comparison": "用电量比较",
+ "today_electricity_consumption": "今日用电量",
+ "yesterday_electricity_consumption": "昨天用电量",
+ "this_last_week": "本周/上周",
+ "thisweek_electricity_consumption": "本周用电量",
+ "lastweek_electricity_consumption": "上周用电量"
+ },
"history": {
"title": "历史资料",
"building_name": "厂区",
@@ -21,6 +40,23 @@
"end_date": "结束日期",
"end_time": "结束时间"
},
+ "energy": {
+ "elec_consumption": "用电即时分布",
+ "total_elec": "总用电",
+ "green_elec": "绿电",
+ "immediate_demand": "即时需量",
+ "average_demand": "平均需量",
+ "elec_bills": "今年电费累计(元)",
+ "interval_elec_charges": "区间电费(元)",
+ "year_carbon_emission": "今年碳排当量累计(公斤)",
+ "interval_carbon_emission": "区间碳排当量",
+ "year_elec_consumption": "今年用电度数(kWh)",
+ "interval_elec_consumption": "区间用电度数(kWh)",
+ "monthly_elec_consumption": "每月用电分析",
+ "monthly_carbon_emission_and_reduction": "每月碳排当量 (kgCO2e) 与减量目标",
+ "monthly_bill_power": "每月计费度数 (kWh)",
+ "interval_bill_degree": "区间计费度数"
+ },
"alarm": {
"title": "显示警告",
"notify": "异常通知",
diff --git a/src/config/tw.json b/src/config/tw.json
index 0d89083..68eb5b9 100644
--- a/src/config/tw.json
+++ b/src/config/tw.json
@@ -1,9 +1,28 @@
{
"language": "繁體中文",
+ "home": "首頁",
"sign_out": "登出",
"log_in": "登入",
"account": "帳號",
"password": "密碼",
+ "table": {
+ "no_data": "表中數據為空",
+ "in_otal": "筆資料",
+ "skip_to": "跳至"
+ },
+ "upload": {
+ "title": "選擇一個文件或拖放到這裡",
+ "description": "檔案不超過 10MB"
+ },
+ "dashboard": {
+ "yesterday_today": "昨天/今天",
+ "elec_consumption_comparison":"用電量比較",
+ "today_electricity_consumption":"今日用電量",
+ "yesterday_electricity_consumption":"昨天用電量",
+ "this_last_week":"本週/上週",
+ "thisweek_electricity_consumption":"本周用電量",
+ "lastweek_electricity_consumption":"上週用電量"
+ },
"history": {
"title": "歷史資料",
"building_name": "廠區",
@@ -21,6 +40,23 @@
"end_date": "結束日期",
"end_time": "結束時間"
},
+ "energy": {
+ "elec_consumption": "用電即時分佈",
+ "total_elec": "總用電",
+ "green_elec": "綠電",
+ "immediate_demand": "即時需量",
+ "average_demand": "平均需量",
+ "elec_bills": "今年電費累計(元)",
+ "interval_elec_charges": "區間電費(元)",
+ "year_carbon_emission": "今年碳排當量累計(公斤)",
+ "interval_carbon_emission": "區間碳排當量",
+ "year_elec_consumption": "今年用電度數(kWh)",
+ "interval_elec_consumption": "區間用電度數(kWh)",
+ "monthly_elec_consumption": "每月用電分析",
+ "monthly_carbon_emission_and_reduction": "每月碳排當量 (kgCO2e) 與減量目標",
+ "monthly_bill_power": "每月計費度數 (kWh)",
+ "interval_bill_degree": "區間計費度數"
+ },
"alarm": {
"title": "顯示警告",
"notify": "異常通知",
diff --git a/src/config/us.json b/src/config/us.json
index 06f529a..eb232dd 100644
--- a/src/config/us.json
+++ b/src/config/us.json
@@ -1,9 +1,19 @@
{
"language": "English",
+ "home": "Home",
"sign_out": "Sign out",
"log_in": "Log in",
"account": "Account",
"password": "Password",
+ "table": {
+ "no_data": "No data",
+ "in_otal": "items in total",
+ "skip_to": "Skip to"
+ },
+ "upload": {
+ "title": "Select a file or drag and drop here",
+ "description": "File size cannot exceed 10MB"
+ },
"history": {
"title": "Historical Data",
"building_name": "Building",
@@ -21,6 +31,32 @@
"end_date": "End date",
"end_time": "End time"
},
+ "dashboard": {
+ "yesterday_today": "Yesterday / Today's",
+ "elec_consumption_comparison": "Electricity Consumption Comparison",
+ "today_electricity_consumption": "Today’s electricity consumption",
+ "yesterday_electricity_consumption": "Yesterday’s electricity consumption",
+ "this_last_week": "This Week's / Last Week's",
+ "thisweek_electricity_consumption": "This week’s electricity consumption",
+ "lastweek_electricity_consumption": "Last week’s electricity consumption"
+ },
+ "energy": {
+ "elec_consumption": "Real-time distribution of electricity consumption",
+ "total_elec": "Total electricity consumption",
+ "green_elec": "Green electricity",
+ "immediate_demand": "immediate demand",
+ "average_demand": "average demand",
+ "elec_bills": "Total electricity bills this year (yuan)",
+ "interval_elec_charges": "Interval electricity charges (yuan)",
+ "year_carbon_emission": "Cumulative carbon emission equivalent this year (kg)",
+ "interval_carbon_emission": "Interval carbon emission equivalent",
+ "year_elec_consumption": "This year's electricity consumption (kWh)",
+ "interval_elec_consumption": "Interval electricity consumption (kWh)",
+ "monthly_elec_consumption": "Monthly electricity consumption analysis",
+ "monthly_carbon_emission_and_reduction": "Monthly carbon emission equivalent (kgCO2e) and reduction target",
+ "monthly_bill_power": "Monthly billing power (kWh)",
+ "interval_bill_degree": "Interval billing degree"
+ },
"alarm": {
"title": "Warning",
"notify": "Notification",
diff --git a/src/fontawsomeIconRegister.js b/src/fontawsomeIconRegister.js
index 541e917..1cf3ca9 100644
--- a/src/fontawsomeIconRegister.js
+++ b/src/fontawsomeIconRegister.js
@@ -40,6 +40,20 @@ import {
faFilePowerpoint,
faFileAlt,
faDatabase,
+ faBuilding,
+ faVideo,
+ faFan,
+ faTemperatureHigh,
+ faLightbulb,
+ faBolt,
+ faChargingStation,
+ faTint,
+ faWater,
+ faCarBattery,
+ faFireExtinguisher,
+ faDoorOpen,
+ faCar,
+ faWind
} from "@fortawesome/free-solid-svg-icons";
/* add icons to the library */
@@ -81,6 +95,20 @@ library.add(
faFilePowerpoint,
faFileAlt,
faDatabase,
+ faBuilding,
+ faVideo,
+ faFan,
+ faTemperatureHigh,
+ faLightbulb,
+ faBolt,
+ faChargingStation,
+ faTint,
+ faWater,
+ faCarBattery,
+ faFireExtinguisher,
+ faDoorOpen,
+ faCar,
+ faWind
);
export default library;
diff --git a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
index 93d7836..0ccab99 100644
--- a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
+++ b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
@@ -167,14 +167,14 @@ const onCancel = () => {
:options="floors"
:isBottomLabelExist="false"
>
- {{ t("assetManagement.floor") }}
+ {{ $t("assetManagement.floor") }}
@@ -195,7 +195,7 @@ const onCancel = () => {
v-if="!currentFloor?.floor_map_url"
class="absolute top-0 left-0 flex justify-center items-center min-h-[500px] w-full border border-stone-900 shadow-lg bg-sub-success bg-opacity-25 rounded-md"
>
-
{{ t("assetManagement.add_floor_text") }}
+
{{ $t("assetManagement.add_floor_text") }}