diff --git a/src/apis/dashboard/api.js b/src/apis/dashboard/api.js
index bf8fe03..bc135f6 100644
--- a/src/apis/dashboard/api.js
+++ b/src/apis/dashboard/api.js
@@ -7,4 +7,5 @@ export const GET_DASHBOARD_ROOM_TEMP_API = `/SituationRoom/GetFormulaRoomStatusD
export const GET_DASHBOARD_ENERGY_API = `/SituationRoom/GetEnergeData`;
export const POST_DASHBOARD_PRODUCT_TARGET_SETTING_API = `/SituationRoom/SetTargetSetting`;
export const GET_DASHBOARD_PRODUCT_TARGET_SETTING_API = `/SituationRoom/GetTargetSetting`
-export const GET_DASHBOARD_PRODUCT_HISTORY_API = `/SituationRoom/GetProductionHistory`
\ No newline at end of file
+export const GET_DASHBOARD_PRODUCT_HISTORY_API = `/SituationRoom/GetProductionHistory`;
+export const GET_DASHBOARD_PRODUCT_TASK_API = `/SituationRoom/GetProductionTask`;
diff --git a/src/apis/dashboard/index.js b/src/apis/dashboard/index.js
index f520e96..d4476d3 100644
--- a/src/apis/dashboard/index.js
+++ b/src/apis/dashboard/index.js
@@ -9,6 +9,7 @@ import {
POST_DASHBOARD_PRODUCT_TARGET_SETTING_API,
GET_DASHBOARD_PRODUCT_TARGET_SETTING_API,
GET_DASHBOARD_PRODUCT_HISTORY_API,
+ GET_DASHBOARD_PRODUCT_TASK_API
} from "./api";
import instance from "@/util/request";
import apihandler from "@/util/apihandler";
@@ -147,3 +148,12 @@ export const getDashboardProductRecord = async ({ start_time, end_time }) => {
});
};
+export const getDashboardProductTask = async () => {
+ const res = await instance.get(GET_DASHBOARD_PRODUCT_TASK_API);
+
+ return apihandler(res.code, res.data, {
+ msg: res.msg,
+ code: res.code,
+ });
+}
+
diff --git a/src/views/alert/components/AlertQuery/AlertQuery.vue b/src/views/alert/components/AlertQuery/AlertQuery.vue
index 28e6631..94620a2 100644
--- a/src/views/alert/components/AlertQuery/AlertQuery.vue
+++ b/src/views/alert/components/AlertQuery/AlertQuery.vue
@@ -66,7 +66,7 @@ const getModalDevList = async () => {
const formattedKey = d.device_number
.replace(/-/g, '_')
.split('_')
- .slice(0, 8)
+ .slice(0, 8)
.join('_');
return { ...d, key: formattedKey };
@@ -151,11 +151,28 @@ const openModal = async (record) => {
}
};
-watch(searchParams, (newValue) => {
- if (newValue.system_tag) {
- search();
- }
-});
+watch(
+ () => ({
+ isAck: searchParams.value.isAck,
+ isRecover: searchParams.value.isRecover,
+ Start_date: searchParams.value.start_created_at,
+ End_date: searchParams.value.end_created_at,
+ system_tag: searchParams.value.system_tag,
+ }),
+ (val) => {
+ // 判斷所有必要欄位都已經有值
+ if (
+ val.isAck !== undefined &&
+ val.isRecover !== undefined &&
+ val.Start_date &&
+ val.End_date &&
+ val.system_tag
+ ) {
+ search();
+ }
+ },
+ { immediate: true, deep: true }
+);
provide("alert_modal", { model_data, search, updateEditRecord });
provide("alert_table", { openModal, updateEditRecord, dataSource, search, tableLoading });
diff --git a/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue b/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
index 4580ad9..e59c263 100644
--- a/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
+++ b/src/views/alert/components/AlertQuery/AlertSearchTypesButton.vue
@@ -11,7 +11,7 @@ const changeCheckedItem = () => {
if (checkedItem.value.length === store.subSys.length) {
changeParams({
...searchParams.value,
- system_tag: [],
+ system_tag: [store.subSys[0]?.main_system_tag+`_`+store.subSys[0]?.sub_system_tag],
});
} else {
changeParams({
@@ -53,7 +53,7 @@ watch(searchParams, (newValue) => {
if (!newValue.system_tag) {
changeParams({
...newValue,
- system_tag: [store.subSys[0]?.main_system_tag+`_`+store.subSys[0]?.sub_system_tag],
+ system_tag: store.subSys.map(({ main_system_tag, sub_system_tag }) => main_system_tag+`_`+sub_system_tag),
});
}
});
diff --git a/src/views/dashboard/components/DashboardForgeOptionCard.vue b/src/views/dashboard/components/DashboardForgeOptionCard.vue
index 6a78923..3d4dd45 100644
--- a/src/views/dashboard/components/DashboardForgeOptionCard.vue
+++ b/src/views/dashboard/components/DashboardForgeOptionCard.vue
@@ -53,18 +53,6 @@ const vesselsData = computed(() => {
return data.map((vessel) => ({
...vessel,
activeTab: getDeviceActiveTab(vessel.name),
- SIP: [
- {
- count: "1",
- startTime: "08:00",
- endTime: "08:30",
- },
- {
- count: "2",
- startTime: "14:00",
- endTime: "14:30",
- },
- ],
}));
});
@@ -84,12 +72,12 @@ const cookingPotData = computed(() => {
// 冷藏室資料
const refrigerationData = computed(() => {
- return props.realTimeData?.refrigerationData[0] || {};
+ return props.realTimeData?.refrigerationData || [];
});
// 電錶資料
const meterData = computed(() => {
- const data = props.realTimeData?.refrigerationData || [];
+ const data = props.realTimeData?.meterData || [];
return data.sort((a, b) => a.name.localeCompare(b.name));
});
@@ -117,7 +105,7 @@ const valveData = computed(() => {
v-for="(vessel, index) in vesselsData"
:key="index"
:vessel="vessel"
- :tabs="tabs"
+ :tabs="tabs.filter(tab => tab.label !== '品檢')"
/>
diff --git a/src/views/dashboard/components/DashboardTarget.vue b/src/views/dashboard/components/DashboardTarget.vue
index 75ffd0b..371e54e 100644
--- a/src/views/dashboard/components/DashboardTarget.vue
+++ b/src/views/dashboard/components/DashboardTarget.vue
@@ -1,92 +1,35 @@
@@ -144,7 +98,7 @@ onMounted(() => {
/>
- {{ selectedProduct.productName }}
+ {{ selectedProduct.name }}
@@ -154,27 +108,35 @@ onMounted(() => {
品名 |
狀態 |
生產進度 |
-
功能 |
+
功能 |
- 鍋次 |
- 位置 |
+
+ 鍋次
+ |
狀態 |
-
- {{ item.productName }} |
+
+ {{ item.name }} |
{{ item.status }} |
- {{ (item.completionRate * 100).toFixed(0) }}% |
-
+ | {{ item.progress }} |
+
@@ -183,14 +145,21 @@ onMounted(() => {
-
- {{ detail.pot }} |
- {{ detail.location }} |
+
+ {{ detail.batch }} |
{{ detail.status }} |
+
+ 無詳細資料 |
+
|
+
載入中...
diff --git a/src/views/dashboard/components/dashboardForgeCards/CookingCard.vue b/src/views/dashboard/components/dashboardForgeCards/CookingCard.vue
index 88bd65f..1c2b51b 100644
--- a/src/views/dashboard/components/dashboardForgeCards/CookingCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/CookingCard.vue
@@ -1,5 +1,6 @@
@@ -8,50 +9,62 @@ defineProps({ data: Array });
:key="index"
class="stats shadow bg-slate-200"
>
-
+
-
第{{ item.batch }}鍋
-
{{ item.product }}
+
第{{ item.batch || "__" }}鍋
+
+ {{ item.product || " " }}
+
-
-
{{ item.equipment }}
+
+
{{ item.name }}
{{ item.status }}
-
-
-
-
+
-
-
-
+
+
+
+ {{ item.sterilization }}
-
{{ item.sterilization }}
-
-
-
+
+
+
+ {{ item.sugar }}
-
糖{{ item.sugar }}
-
-
-
+
+
+
-
{{ item.material }}
+
{{ item.qcName }}
diff --git a/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue b/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue
index 0207ddb..75b9da8 100644
--- a/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/CookingPotCard.vue
@@ -1,7 +1,7 @@
@@ -29,41 +29,105 @@ const props = defineProps({
- - 品名: {{ pot.product }}
- - 鍋次: 第{{ pot.batch }}鍋
- - 溫度: {{ pot.temperature }}
- - 糖度: {{ pot.sugar }}
- - 狀態: {{ pot.status }}
+ - 品名: {{ pot.productInfo?.product }}
+ - 鍋次: 第{{ pot.productInfo?.batch || "__" }}鍋
+ - 溫度: {{ pot.productInfo?.temperature }}
+ - 糖度: {{ pot.productInfo?.sugar }}
+ - 狀態: {{ pot.productInfo?.status }}
+
+
+
+
+
+ 順序 |
+ 動作 |
+ 原料 |
+ 狀態 |
+
+
+
+
+ {{ feed.order }} |
+ {{ feed.action }} |
+ {{ feed.material }} |
+ {{ feed.state }} |
+
+
+ 無投料進度資料 |
+
+
+
+
+
-
- - 品檢時間: {{ pot.inspectionTime }}
- - 風味: {{ pot.flavor }}
- - 鹽度: {{ pot.salinity }}
- - 酸度: {{ pot.acidity }}
-
+
+
+
+
+ 狀態 |
+ 品檢時間 |
+ 風味 |
+ 色澤 |
+ 雜異物 |
+ 鹽度 |
+ 酸度 |
+ 糖度 |
+
+
+
+
+ {{ flow.state }} |
+ {{ flow.time }} |
+ {{ flow.flavor }} |
+ {{ flow.color }} |
+ {{ flow.impurities }} |
+ {{ flow.actual_Salinity }} |
+ {{ flow.actual_PH }} |
+ {{ flow.actual_Brix }} |
+
+
+ 無品檢資料 |
+
+
+
+
-
-
+
+
|
- 當前使用量 |
今日累積量 |
-
- 補水 |
- {{ pot.waterConsumption }} |
- 100L |
+
+ {{ flow.material }} |
+ {{ flow.total }} |
-
- 補醋 |
- {{ pot.aceticAcidConsumption }} |
- 100L |
+
+ 無流量計資料 |
@@ -80,26 +144,19 @@ const props = defineProps({
-
-
- 第一次
- |
- 2025-06-01T08:00:00 |
- 2025-06-01T08:30:00 |
+
+ {{ value.count }} |
+ {{ value.startTime }} |
+ {{ value.endTime }} |
-
-
- 第二次
- |
- 2025-06-01T09:00:00 |
- 2025-06-01T09:30:00 |
-
-
-
- 第二次
- |
- 2025-06-01T10:00:00 |
- 2025-06-01T10:30:00 |
+
+ 無SIP資料 |
diff --git a/src/views/dashboard/components/dashboardForgeCards/HeaterCard.vue b/src/views/dashboard/components/dashboardForgeCards/HeaterCard.vue
index 53bd9da..66c23b0 100644
--- a/src/views/dashboard/components/dashboardForgeCards/HeaterCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/HeaterCard.vue
@@ -1,5 +1,5 @@
@@ -8,14 +8,15 @@ defineProps({ data: Array })
:key="index"
class="stats shadow bg-slate-200"
>
-
-
{{ item.equipment }}
-
+
-
diff --git a/src/views/dashboard/components/dashboardForgeCards/ProductionCard.vue b/src/views/dashboard/components/dashboardForgeCards/ProductionCard.vue
index 5b3b460..22297d8 100644
--- a/src/views/dashboard/components/dashboardForgeCards/ProductionCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/ProductionCard.vue
@@ -8,20 +8,21 @@ defineProps({ data: Array });
:key="index"
class="stats shadow bg-slate-200"
>
-
+
第{{ item.batch }}鍋
{{ item.product }}
-
-
{{ item.equipment }}
+
+
{{ item.name }}
{{ item.status }}
-
diff --git a/src/views/dashboard/components/dashboardForgeCards/RefrigerationCard.vue b/src/views/dashboard/components/dashboardForgeCards/RefrigerationCard.vue
index 6d84941..43c8869 100644
--- a/src/views/dashboard/components/dashboardForgeCards/RefrigerationCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/RefrigerationCard.vue
@@ -1,20 +1,31 @@
-
-
-
- {{ data.name }}
+
+
+
+
+
+
+
+
+
+ {{ item.temperature }}
+
+
-
-
-
-
-
-
- {{ data.temperature }}
-
-
+
+
+ 無冷藏室資料
+
diff --git a/src/views/dashboard/components/dashboardForgeCards/ValveCard.vue b/src/views/dashboard/components/dashboardForgeCards/ValveCard.vue
index c53bd2e..af407d8 100644
--- a/src/views/dashboard/components/dashboardForgeCards/ValveCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/ValveCard.vue
@@ -10,18 +10,16 @@ import { twMerge } from "tailwind-merge";
-
\ No newline at end of file
+
diff --git a/src/views/dashboard/components/dashboardForgeCards/VesselCard.vue b/src/views/dashboard/components/dashboardForgeCards/VesselCard.vue
index 4f1e3ff..475d5e3 100644
--- a/src/views/dashboard/components/dashboardForgeCards/VesselCard.vue
+++ b/src/views/dashboard/components/dashboardForgeCards/VesselCard.vue
@@ -7,7 +7,7 @@ const props = defineProps({
-
{{ vessel.name }}
+
{{ vessel?.name }}
- - 品名: {{ vessel.product }}
- - 鍋次: 第{{ vessel.batch }}鍋
- - 狀態: {{ vessel.status }}
+ - 品名: {{ vessel.productInfo?.product }}
+ - 鍋次: 第{{ vessel.productInfo?.batch || "__" }}鍋
+ - 溫度: {{ vessel.productInfo?.temperature }}
+ - 狀態: {{ vessel.productInfo?.status }}
-
-
+
+
- 順序 |
+ 順序 |
動作 |
原料 |
- 狀態 |
+ 狀態 |
@@ -56,17 +57,22 @@ const props = defineProps({
{{ feed.material }} |
{{ feed.state }} |
+
+ 無投料進度資料 |
+
-
-
+
+
|
- 當前使用量 |
今日累積量 |
@@ -76,17 +82,22 @@ const props = defineProps({
:key="index"
class="border-0"
>
- {{ flow.material }} |
- {{ flow.current }} |
+ {{ flow.material }} |
{{ flow.total }} |
+
+ 無流量計資料 |
+
-
-
+
+
次數 |
@@ -96,14 +107,20 @@ const props = defineProps({
- {{ value.count }} |
+ {{ value.count }} |
{{ value.startTime }} |
{{ value.endTime }} |
+
+ 無SIP資料 |
+
diff --git a/tailwind.config.js b/tailwind.config.js
index 7a4a796..a9aef9c 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -4,6 +4,13 @@ module.exports = {
"./node_modules/vue-tailwind-datepicker/**/*.js",
],
purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
+ safelist: [
+ 'text-white',
+ 'text-green-600',
+ 'text-yellow-300',
+ 'text-red-700',
+ 'text-slate-400'
+ ],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {