From 6e3f39127fa0d1d9b42da15904cdf4217a3ae9d6 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 11 七月 2025 09:53:12 +0800 Subject: [PATCH] refactor(web-antd): 重构预测性维护页面 --- eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/device-detail.vue | 33 ++++++++++++--------------------- 1 files changed, 12 insertions(+), 21 deletions(-) diff --git a/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/device-detail.vue b/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/device-detail.vue index 70a9732..c621509 100644 --- a/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/device-detail.vue +++ b/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/device-detail.vue @@ -91,9 +91,9 @@ </a-row> </a-card> <a-row :gutter="16"> - <!-- 澶囦欢瀵垮懡棰勬祴 --> + <!-- 閮ㄤ欢瀵垮懡棰勬祴 --> <a-col :span="12"> - <a-card title="澶囦欢瀵垮懡棰勬祴" class="mb-4"> + <a-card title="閮ㄤ欢瀵垮懡棰勬祴" class="mb-4"> <a-table :columns="sparePartColumns" :data-source="sparePartData" @@ -164,16 +164,7 @@ dataIndex: 'suggestedTime', key: 'suggestedTime' }, - { - title: '绱ф�ョ▼搴�', - dataIndex: 'urgency', - key: 'urgency' - }, - { - title: '鎿嶄綔', - key: 'action', - slots: { customRender: 'action' } - }, + { title: '绱ф�ョ▼搴�', dataIndex: 'urgency', @@ -219,7 +210,7 @@ const sparePartColumns = [ { - title: '澶囦欢鍚嶇О', + title: '閮ㄤ欢鍚嶇О', dataIndex: 'name', key: 'name' }, @@ -337,13 +328,13 @@ value: value }); } - + const updateChart = () => { // 鐢熸垚鏂扮殑鏁版嵁鐐� const now = new Date(); const time = `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`; const newValue = +(Math.random() * fluctuation + baseValue - fluctuation / 2).toFixed(2); - + // 娣诲姞鏂版暟鎹偣锛屾渶澶氫繚鐣�60涓偣锛�5鍒嗛挓鏁版嵁锛� chartData.push({ time, @@ -352,7 +343,7 @@ if (chartData.length > 60) { chartData.shift(); } - + const option = { title: { text: title, @@ -403,13 +394,13 @@ }; chart.setOption(option); }; - + // 鍒濆娓叉煋 updateChart(); - + // 姣�5绉掓洿鏂颁竴娆℃暟鎹� const intervalId = setInterval(updateChart, 5000); - + window.addEventListener('resize', () => { chart.resize(); }); @@ -427,7 +418,7 @@ initChart('vibrationChart', '鎸姩瓒嬪娍', vibrationData, 'mm/s', 10, 2); initChart('currentChart', '鐢垫祦瓒嬪娍', currentData, 'A', 50, 10); } - + }); </script> @@ -436,4 +427,4 @@ padding: 16px; background: #f0f2f5; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3