diff --git a/src/components/ProcessGanttChart.vue b/src/components/ProcessGanttChart.vue index 660edd5..a025858 100644 --- a/src/components/ProcessGanttChart.vue +++ b/src/components/ProcessGanttChart.vue @@ -120,8 +120,6 @@ const updateChart = () => { const itemEndTime = new Date(item.endTime).getTime(); return itemEndTime >= startTime && itemStartTime <= endTime; }); - console.log("🚀 ~ updateChart ~ filteredData:", filteredData) - mappedData.value = mapDataToTimeline(filteredData, startTime, endTime); nextTick(() => { generateXTicks(startTime, endTime); @@ -335,7 +333,6 @@ const generateGaps = (startTime, endTime) => { }); } gaps.value = gapsArray; - console.log("🚀 ~ generateGaps ~ gaps.value:", gaps.value) } // 获取 X 轴刻度样式 diff --git a/src/utils/request.js b/src/utils/request.js index dbb0743..3406b27 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,8 +1,8 @@ import axios from 'axios'; const service = axios.create({ - // baseURL: 'http://192.168.1.199:8080/api', // 办公室测试接口 - baseURL: 'http://39.105.9.124:8090/api', // 家用测试接口 + baseURL: 'http://192.168.1.199:8080/api', // 办公室测试接口 + // baseURL: 'http://39.105.9.124:8090/api', // 家用测试接口 timeout: 5000, // 请求超时时间 headers: { "Access-Control-Allow-Origin": "*", diff --git a/src/views/Dashboard/index.vue b/src/views/Dashboard/index.vue index bedd7bb..c164729 100644 --- a/src/views/Dashboard/index.vue +++ b/src/views/Dashboard/index.vue @@ -79,7 +79,27 @@
- + 已碱洗 + + + 已酸洗 + + + 清洁状态 + + + 无菌状态 + +
@@ -139,10 +159,27 @@
- - + + + 已酸洗 + + + 清洁状态 + + + 无菌状态 + +
@@ -164,13 +201,26 @@

果汁无菌罐

- + + 清洁状态 + + + 无菌状态 + +
@@ -190,7 +240,7 @@
▼果汁流量:{{ juiceTank.productFlowRate - }} + }}
@@ -198,12 +248,26 @@

动态混合器

- + + 清洁状态 + + + 无菌状态 + +
@@ -233,17 +297,31 @@
▲果肉流量:{{ pulpTank.productFlowRate - }} + }}

果肉无菌罐

- + + 清洁状态 + + + 无菌状态 + +
@@ -294,7 +372,8 @@ 流量:{{ productFlowRate }} 配方:{{ formula }} 持续时长:{{ duration }} - {{ selectedReason ? '停机原因:' + selectedReason : '请选择停机原因 ▲' }} + {{ selectedReason ? '停机原因:' + + selectedReason : '请选择停机原因 ▲' }} { alarmCount.value = progressList.value.filter(item => item.rate < 10).length + - innerProgressList.value.filter(item => item.rate > 90).length; + innerProgressList.value.filter(item => item.rate > 90).length; alarmStore.setAlarmCount(alarmCount.value); // 更新 alarmStore 中的报警计数 }; const updateCurrentInfo = (segment) => { id.value = segment.id; currentStatus.value = segment.deviceStatus; - console.log("🚀 ~ updateCurrentInfo ~ currentStatus:", currentStatus.value); // 调试信息 startTimeFormatted.value = formatTime(segment.beginTime); endTimeFormatted.value = formatTime(segment.endTime); duration.value = segment.duration; @@ -523,7 +601,6 @@ const updateData = (processedData) => { juiceData.value = getDataByName(processedData, "果汁调配"); pulpData.value = getDataByName(processedData, "果肉调配"); uhtData.value = getDataByName(processedData, "果汁杀菌"); - console.log("🚀 ~ updateData ~ uhtData.value:", uhtData.value) pulpUHTData.value = getUHTDataByName(processedData, "果肉杀菌"); juiceTankData.value = getUHTDataByName(processedData, "果汁无菌罐"); pulpTankData.value = getUHTDataByName(processedData, "果肉无菌罐"); @@ -815,7 +892,6 @@ const fetchStatusColors = async () => { label: item.name, color: item.color })); - console.log("🚀 ~ fetchStatusColors ~ statuses.value:", statuses.value) } else { console.error('Error fetching status colors:', response.message); } @@ -1067,6 +1143,7 @@ onUnmounted(() => { display: flex; flex-direction: column; padding-left: 5rem; + width: 28%; } :deep(.ix-chip) { @@ -1098,13 +1175,17 @@ onUnmounted(() => { margin: 0.5rem; width: 100%; pointer-events: none; + border: none; + color: #000028; } /* 右侧 IxChip 样式 */ .right-chip { margin: 0.5rem 0.5rem 0 0; - width: 95%; + width: 90%; pointer-events: none; + color: #000028; + border: none; } .tag-panel-2 { diff --git a/src/views/Inspection/index.vue b/src/views/Inspection/index.vue index df4f513..ad28371 100644 --- a/src/views/Inspection/index.vue +++ b/src/views/Inspection/index.vue @@ -165,6 +165,7 @@ const confirmedTimes = ref({}); const hourCheckStatus = ref({}); const hourCheckTime = ref({}); const alarmId = ref({}); +const hourCheckValid = ref({}); const formatTime = (time) => { const date = new Date(time); @@ -178,6 +179,14 @@ const handleInspection = (hour, index) => { selectedItemName.value = inspectionItems.value[index].label; selectedItemTime.value = hour; selectedItemIndex.value = index; // 保存当前索引 + + // 校验是否已经确认异常数据 + if (hourCheckValid.value[hour] !== 1) { + console.log("🚀 ~ handleInspection ~ hourCheckValid.value[hour]:", hourCheckValid.value[hour]) + showWarningMessage('存在异常数据,无法执行点检操作!'); + return; + } + showConfirmMessage('确认要执行点检操作吗?', async () => { await sharpConfirm(alarmId.value[hour], 'admin').then(() => { confirmedHours.value.push(selectedItemTime.value); @@ -325,6 +334,7 @@ const fetchInspectionData = async () => { hourCheckStatus.value[recordTime] = record.hourCheckStatus; hourCheckTime.value[recordTime] = formatTime(record.hourCheckTime); alarmId.value[recordTime] = record.alarmId; + hourCheckValid.value[recordTime] = record.hourCheckValid; for (const [name, valueObj] of Object.entries(data)) { if (valueObj === null || valueObj.valule === null) continue; // 过滤掉值为 null 的属性