
-
{{ section.title }}
+
{{ equipmentData.title }}
-
-
-
-
+
+
+ |
+ Online |
+ Offline |
+ Alarm |
+
+
+
+
-
- {{ item.label }}
- {{ item.value }}
-
-
-
-
-

-
-
-
{{ group[0].value }}
-
-
-
{{ group[1].value }}
-
-
-
-
+ {{ item.label }} |
+ {{ item.online }} |
+ {{ item.offline }} |
+ {{ item.alarm }} |
+
+
+
+
+
+
+
+
+

+
{{ orderData.title }}
+
+
+
+
+ |
+ value |
+
+
+
+
+
+ {{ item.label }}
+ |
+ {{ item.value }} |
+
+
+
@@ -107,7 +101,7 @@ const getProgressValue = (group) => {
}
.state-box {
- @apply border-2 border-light-info rounded-sm py-2 px-6 text-white relative;
+ @apply h-80 border-2 border-light-info rounded-sm py-2 px-6 text-white relative;
}
.state-box:after {
@@ -133,58 +127,4 @@ const getProgressValue = (group) => {
.state-box .title .state-title02 {
@apply w-5 ml-1.5;
}
-
-.state-box .item-title {
- @apply flex justify-between items-center m-auto mb-1 relative;
-}
-
-.state-box .item-title:after {
- @apply absolute right-0 -bottom-2.5 w-full h-4 bg-no-repeat bg-center z-10;
- content: "";
- background-image: url(@ASSET/img/text-position-line.svg);
-}
-
-.state-box .item-title .text {
- @apply w-1/2 m-0 mb-1.5 flex justify-center items-center relative;
-}
-
-.state-box .item-title .text .text-position span {
- @apply block text-center text-xs;
-}
-
-.state-box .item-title .text .text-position span:nth-child(2) {
- text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.8);
-}
-
-.mark {
- @apply flex justify-between items-center mb-2.5;
-}
-
-.state-ul {
- @apply relative mb-2.5;
-}
-
-.state-ul::after {
- @apply absolute -left-3.5 top-0 w-4 h-16 bg-no-repeat bg-center z-10;
- content: "";
- background-image: url(@ASSET/img/state-ul-background01.svg);
-}
-
-.state-ul .box {
- @apply absolute top-1/2 w-4/5 left-0 right-0 m-auto text-center -translate-y-1/2;
-}
-
-.progress {
- @apply w-full h-3 rounded;
- appearance: none;
-
- &::-webkit-progress-bar {
- border: 1px solid #ffffff;
- background-color: #5eabea;
- }
-
- &::-webkit-progress-value {
- border-radius: 4px;
- }
-}
diff --git a/src/views/energyManagement/components/ElecConsumption.vue b/src/views/energyManagement/components/ElecConsumption.vue
index 1b9f906..b7abd52 100644
--- a/src/views/energyManagement/components/ElecConsumption.vue
+++ b/src/views/energyManagement/components/ElecConsumption.vue
@@ -1,35 +1,29 @@
@@ -64,19 +92,7 @@ onMounted(() => {
{{ $t("energy.elec_consumption") }}
-
-
- -
- {{ $t("energy.total_elec") }} (kWh)
- 160.05
-
- -
- {{ $t("energy.green_elec") }} (kWh)
- 39.50
-
-
+
diff --git a/src/views/history/components/HistorySearch.vue b/src/views/history/components/HistorySearch.vue
index a809da6..03ebd3c 100644
--- a/src/views/history/components/HistorySearch.vue
+++ b/src/views/history/components/HistorySearch.vue
@@ -25,8 +25,15 @@ import dayjs from "dayjs";
const { searchParams, changeParams } = useSearchParam();
-// 選小類
const store = useBuildingStore();
+// 選大類
+const {
+ items: sysMainTagItems,
+ changeActiveBtn: changeMainSysActiveBtn,
+ setItems: setMainSysItems,
+ selectedBtn: selectedMainSysItems,
+} = useActiveBtn();
+// 選小類
const {
items: sysTagItems,
changeActiveBtn: changeSysActiveBtn,
@@ -34,6 +41,38 @@ const {
selectedBtn: selectedSysItems,
} = useActiveBtn();
+watch(
+ () => store.mainSys,
+ () => {
+ setMainSysItems(
+ store.mainSubSys.map(({ full_name, main_system_tag }, index) => ({
+ title: full_name,
+ key: main_system_tag,
+ active: searchParams.value.main_system_tag
+ ? searchParams.value.main_system_tag === mian_system_tag
+ : index === 0,
+ }))
+ );
+ }
+);
+
+watch(
+ () => selectedMainSysItems,
+ (newVal, oldVal) => {
+ setSysItems(
+ store.subSys.filter((s) => s.main_system_tag === newVal.value?.key).map(({ full_name, sub_system_tag }, index) => ({
+ title: full_name,
+ key: sub_system_tag,
+ active: index === 0,
+ }))
+ );
+ },
+ {
+ deep: true,
+ immediate: true,
+ }
+);
+
watch(
() => selectedSysItems,
(newVal, oldVal) => {
@@ -54,21 +93,6 @@ watch(
}
);
-watch(
- () => store.subSys,
- () => {
- setSysItems(
- store.subSys.map(({ full_name, sub_system_tag }, index) => ({
- title: full_name,
- key: sub_system_tag,
- active: searchParams.value.sub_system_tag
- ? searchParams.value.sub_system_tag === sub_system_tag
- : index === 0,
- }))
- );
- }
-);
-
// 設定點位
const {
items: points,
@@ -82,7 +106,7 @@ const getPoint = async (deviceList) => {
setPoints(
res.data.map((d, index) => ({
...d,
- title: d.points,
+ title: d.item_name,
key: d.points,
active: index === 0,
}))
@@ -118,10 +142,10 @@ watch(searchParams, (newVal, oldValue) => {
});
onMounted(() => {
- setSysItems(
- store.subSys.map(({ full_name, sub_system_tag }, index) => ({
+ setMainSysItems(
+ store.mainSubSys.map(({ full_name, main_system_tag }, index) => ({
title: full_name,
- key: sub_system_tag,
+ key: main_system_tag,
active: index === 0,
}))
);
@@ -136,7 +160,23 @@ onBeforeMount(() => {
-
{{ $t("history.device_category") }} :
+
+ {{ $t("history.system_category") }} :
+
+
+
+
+
+ {{ $t("history.device_category") }} :
+
{
-
+
+
+ {{ $t("history.device_category") }} :
+