From 92e9990c1f67c37693c9b0570de4795e8159dd86 Mon Sep 17 00:00:00 2001 From: koko1108 Date: Mon, 20 Oct 2025 16:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AA=BF=E6=95=B4=E7=92=B0=E5=A2=83=E8=AE=8A?= =?UTF-8?q?=E6=95=B8=E8=A8=AD=E5=AE=9A=20|=20Alert=20=E7=B6=AD=E9=81=8B?= =?UTF-8?q?=E5=96=AE=E8=99=9F=20=E7=9A=84=E4=B8=8B=E6=8B=89=E5=BC=8F?= =?UTF-8?q?=E9=81=B8=E9=A0=85=E3=80=81=E8=AA=BF=E6=95=B4AlertSubList?= =?UTF-8?q?=E7=B5=84=E4=BB=B6=E7=9A=84=E5=AD=90=E7=B3=BB=E7=B5=B1=E9=81=8E?= =?UTF-8?q?=E6=BF=BE=E9=82=8F=E8=BC=AF=20|=20=E4=BF=AE=E6=94=B9=E5=A0=B1?= =?UTF-8?q?=E8=A1=A8=E7=AE=A1=E7=90=86=E7=9A=84=E6=90=9C=E5=B0=8B=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=20|=20=E9=A6=96=E9=A0=81=E8=AA=BF=E7=90=86=E6=A1=B6?= =?UTF-8?q?=E5=8A=A0=20AI=20=E8=B3=87=E8=A8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .../components/AlertQuery/AlertQuery.vue | 6 +- .../components/AlertSetting/AlertSubList.vue | 17 +++--- .../dashboardForgeCards/CookingPotCard.vue | 58 ++++++++++++++++--- .../reportManagement/ReportManagement.vue | 8 +++ 5 files changed, 73 insertions(+), 17 deletions(-) diff --git a/.env.development b/.env.development index 7fb6562..a7b8d74 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ VITE_API_BASEURL = "https://pccv-api.production.mjmtech.com.tw" +# VITE_API_BASEURL = "http://192.168.0.219:8010/" VITE_FILE_API_BASEURL = "" VITE_FORGE_BASEURL = "http://localhost:5173" \ No newline at end of file diff --git a/src/views/alert/components/AlertQuery/AlertQuery.vue b/src/views/alert/components/AlertQuery/AlertQuery.vue index e30c19a..e6fb11b 100644 --- a/src/views/alert/components/AlertQuery/AlertQuery.vue +++ b/src/views/alert/components/AlertQuery/AlertQuery.vue @@ -55,7 +55,7 @@ const getModalCompanyList = async () => { const getAllOptions = async () => { Promise.all([getModalUserList(), getModalCompanyList()]).then( - ([devices, users, companies]) => { + ([users, companies]) => { model_data.value.model_userList = users; model_data.value.model_companyList = companies; } @@ -120,6 +120,10 @@ watch( { immediate: true, deep: true } ); +onMounted(() => { + getAllOptions(); +}); + provide("alert_modal", { model_data, search, updateEditRecord }); provide("alert_table", { openModal, diff --git a/src/views/alert/components/AlertSetting/AlertSubList.vue b/src/views/alert/components/AlertSetting/AlertSubList.vue index 3a5d20c..844b18b 100644 --- a/src/views/alert/components/AlertSetting/AlertSubList.vue +++ b/src/views/alert/components/AlertSetting/AlertSubList.vue @@ -9,15 +9,14 @@ const { items, changeActiveBtn, setItems, selectedBtn } = useActiveBtn(); const store = useBuildingStore(); const updateSubSystemsFromStore = () => { - const subSystems = store.subSys - .filter(subSystem => subSystem.is_alarm === 1) - .map(subSystem => ({ - title: subSystem.full_name, - key: subSystem.sub_system_tag, - active: searchParams.value?.subSys_id - ? searchParams.value.subSys_id === subSystem.sub_system_tag - : subSystem.sub_system_tag == "DP", - })); + const filtered = store.subSys.filter(subSystem => subSystem.is_alarm === 1); + const subSystems = filtered.map((subSystem, idx) => ({ + title: subSystem.full_name, + key: subSystem.sub_system_tag, + active: searchParams.value?.subSys_id + ? searchParams.value.subSys_id === subSystem.sub_system_tag + : idx === 0, + })); setItems(subSystems); }; diff --git a/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue b/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue index 2caf261..21ecce4 100644 --- a/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue +++ b/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue @@ -12,6 +12,12 @@ const tabs = [ { label: "AI" }, ]; const activeTab = ref(tabs[0].label); + +// 圖片顯示切換 +const showImages = ref(false); +function toggleImages() { + showImages.value = !showImages.value; +}