+
-
+
{{ $t("dashboard.energy_ranking") }}
-
+
-
-
-
-
- {{
- index + 1
- }}
- |
- {{ item.name }} |
- {{ item.value }} |
-
-
-
+
+
+
+
+
+ {{
+ index + 1
+ }}
+ |
+ {{ item.name }} |
+ {{ item.value }} |
+
+
+
+
diff --git a/src/views/dashboard/components/DashboardStat.vue b/src/views/dashboard/components/DashboardStat.vue
index 662e238..5013210 100644
--- a/src/views/dashboard/components/DashboardStat.vue
+++ b/src/views/dashboard/components/DashboardStat.vue
@@ -3,7 +3,9 @@ import { ref, watch, onMounted, onUnmounted } from "vue";
import { getEnergyInfo } from "@/apis/dashboard";
import useBuildingStore from "@/stores/useBuildingStore";
import { twMerge } from "tailwind-merge";
+import { useI18n } from "vue-i18n";
+const { t } = useI18n();
const store = useBuildingStore();
const energyData = ref([]);
let intervalId = null;
@@ -16,21 +18,21 @@ const getEnergyInfos = async () => {
energyData.value = [
{
value: apiData.todayKWH ? apiData.todayKWH : "N/A",
- label: "Today's electricity consumption in kWH",
+ label: t("dashboard.today_electricity_consumption"),
},
{
value: apiData.yesterdayKWH ? apiData.yesterdayKWH : "N/A",
- label: "Yesterday's electricity consumption in kWH",
+ label: t("dashboard.yesterday_electricity_consumption"),
},
{
value: apiData.instantKW ? apiData.instantKW : "N/A",
- label: "Instant power kW",
+ label: t("dashboard.instant_power"),
},
{
value: apiData.instantContractRatio
? apiData.instantContractRatio
: "N/A",
- label: "Instant contract capacity ratio %",
+ label: t("dashboard.instant_contract_capacity_ratio"),
},
];
} catch (error) {
diff --git a/src/views/dashboard/components/DashboardSysProgress.vue b/src/views/dashboard/components/DashboardSysProgress.vue
index f16c670..537ca06 100644
--- a/src/views/dashboard/components/DashboardSysProgress.vue
+++ b/src/views/dashboard/components/DashboardSysProgress.vue
@@ -4,14 +4,17 @@ import { useRouter } from "vue-router";
import { getAlarmOperationInfo } from "@/apis/dashboard";
import useBuildingStore from "@/stores/useBuildingStore";
import DashboardSysProgressModal from "./DashboardSysProgressModal.vue";
+import { useI18n } from "vue-i18n";
+
+const { t } = useI18n();
const router = useRouter();
const store = useBuildingStore();
const equipmentData = ref({
- title: "System Status",
+ title: t("dashboard.system_status"),
items: [],
});
const orderData = ref({
- title: "Work Order",
+ title: t("dashboard.work_order"),
items: [],
});
const modalData = ref({});
@@ -38,12 +41,12 @@ const getAlarmsInfos = async () => {
if (apiData && apiData.operation) {
orderData.value.items = [
{
- label: "Repair",
+ label: t("operation.repair"),
complete: apiData.operation.repair.complete || 0,
incomplete: apiData.operation.repair.incomplete || 0,
},
{
- label: "Upkeep",
+ label: t("operation.maintenance"),
complete: apiData.operation.upkeep.complete || 0,
incomplete: apiData.operation.upkeep.incomplete || 0,
},
@@ -65,7 +68,7 @@ const navigateToMaintenance = (item) => {
const openModal = (item) => {
modalData.value = item;
- system_status_modal.showModal();
+ system_status_modal.showModal();
};
const onCancel = () => {
@@ -109,8 +112,8 @@ onUnmounted(() => {
|
- Comp |
- Inc |
+ {{ $t("operation.complete") }} |
+ {{ $t("operation.incomplete") }} |
@@ -141,9 +144,9 @@ onUnmounted(() => {
|
- Online |
- Offline |
- Alarm |
+ {{ $t("alert.online") }} |
+ {{ $t("alert.offline") }} |
+ {{ $t("alert.alarm") }} |
@@ -151,33 +154,16 @@ onUnmounted(() => {
v-for="(item, index) in equipmentData.items"
:key="index"
class="border-cyan-400 cursor-pointer hover:text-info"
+ @click.stop.prevent="openModal(item)"
>
{{ item.label }} |
- 0
- ? openModal(item.online)
- : null
- "
- >
+ |
{{ item.online.length }}
|
- 0
- ? openModal(item.offline)
- : null
- "
- >
+ |
{{ item.offline.length }}
|
- 0
- ? openModal(item.alarm)
- : null
- "
- >
+ |
{{ item.alarm.length }}
|
diff --git a/src/views/dashboard/components/DashboardSysProgressModal.vue b/src/views/dashboard/components/DashboardSysProgressModal.vue
index 6781805..f4915ce 100644
--- a/src/views/dashboard/components/DashboardSysProgressModal.vue
+++ b/src/views/dashboard/components/DashboardSysProgressModal.vue
@@ -1,18 +1,56 @@
-
+
diff --git a/src/views/energyManagement/components/EnergyChart/MonthlyElecBillChart.vue b/src/views/energyManagement/components/EnergyChart/MonthlyElecBillChart.vue
index 26d8956..6965877 100644
--- a/src/views/energyManagement/components/EnergyChart/MonthlyElecBillChart.vue
+++ b/src/views/energyManagement/components/EnergyChart/MonthlyElecBillChart.vue
@@ -64,12 +64,12 @@ const defaultChartOption = ref({
},
{
name: "",
- type: "bar",
- stack: "total",
+ type: "line",
data: [],
itemStyle: {
color: "#62E39A",
},
+ lineStyle: { width: 3 },
},
],
});
diff --git a/src/views/system/components/SystemInfoModalDesktop.vue b/src/views/system/components/SystemInfoModalDesktop.vue
index 02cd2ea..a8d3799 100644
--- a/src/views/system/components/SystemInfoModalDesktop.vue
+++ b/src/views/system/components/SystemInfoModalDesktop.vue
@@ -35,6 +35,10 @@ const groupedData = computed(() => {
return grouped;
});
+
+const togglePowerSwitch = () => {
+ console.log("Power Switch");
+};
@@ -64,14 +68,24 @@ const groupedData = computed(() => {
{{ group.full_name }}
- {{ group.value }}
+
+
+
+
+ {{ group.value }}
+
|