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; +}