From 1524fa42ddf01fd72207a8a4b4667a48e4f233aa Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 11 七月 2025 13:39:02 +0800 Subject: [PATCH] refactor(eims): 重构预测性维护模块 --- eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/index.vue | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/index.vue b/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/index.vue index fc523d1..7b629cb 100644 --- a/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/index.vue +++ b/eims-ui/apps/web-antd/src/views/eims/predictive-maintenance/index.vue @@ -4,7 +4,7 @@ <!-- 璁惧鍋ュ悍鐘舵�佸彲瑙嗗寲 --> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> - <Card title="璁惧鍋ュ悍搴﹀垎甯�" > + <Card title="璁惧鍋ュ悍搴﹁瘎鍒�" > <!-- 杩欓噷灏嗘斁缃仴搴峰害鍒嗗竷鍥捐〃 --> <div ref="chartRef" class="h-64 w-full"></div> </Card> @@ -43,7 +43,7 @@ <div class="grid grid-cols-1 gap-4"> <!-- 杩欓噷灏嗘斁缃璀﹁〃鏍� --> - <a-table :columns="warningColumns" :data-source="warningData" :pagination="false" class="w-full"> + <Table :columns="warningColumns" :data-source="warningData" :pagination="false" class="w-full"> <template #bodyCell="{ column, record }"> <template v-if="column.key === 'status'"> <a-tag :color="getStatusColor(record.status)"> @@ -55,7 +55,7 @@ <a-button type="link" @click="generateWorkOrder(record)" :disabled="record.maintenanceSuggestion === '鏆傛棤寤鸿'">鐢熸垚宸ュ崟</a-button> </template> </template> - </a-table> + </Table> </div> </Card> @@ -64,7 +64,7 @@ <div class="grid grid-cols-2 gap-4 mb-6"> <!-- 璁惧閮ㄤ欢瀵垮懡棰勬祴 --> <Card title="璁惧閮ㄤ欢瀵垮懡棰勬祴"> - <a-table :columns="lifePredictionColumns" :data-source="lifePredictionData" :pagination="false" class="w-full"> + <Table :columns="lifePredictionColumns" :data-source="lifePredictionData" :pagination="false" class="w-full"> <template #bodyCell="{ column, record }"> <template v-if="column.key === 'lifeStatus'"> <a-tag :color="getLifeStatusColor(record.remainingDays)"> @@ -75,12 +75,12 @@ <a-button type="link" @click="showLifePredictionDetail(record)">璇︽儏</a-button> </template> </template> - </a-table> + </Table> </Card> <!-- 澶囦欢搴撳瓨涓庨璀� --> <Card title="澶囦欢搴撳瓨涓庨璀�"> - <a-table :columns="sparePartColumns" :data-source="sparePartData" :pagination="false" class="w-full"> + <Table :columns="sparePartColumns" :data-source="sparePartData" :pagination="false" class="w-full"> <template #bodyCell="{ column, record }"> <template v-if="column.key === 'stockStatus'"> <a-tag :color="getStockStatusColor(record.currentStock, record.safetyStock)"> @@ -91,7 +91,7 @@ <a-button type="link" @click="showSparePartDetail(record)">璇︽儏</a-button> </template> </template> - </a-table> + </Table> </Card> </div> @@ -103,7 +103,7 @@ <script setup lang="ts"> import { onMounted, ref } from 'vue'; import { Page } from '@vben/common-ui'; -import { Card, Table, Tag, Button, Form, Input, Textarea, Select, message } from 'ant-design-vue'; +import { Button, Card, Form, Input, message, Select, Table, Tag } from 'ant-design-vue'; import * as echarts from 'echarts'; const chartRef = ref<HTMLElement | null>(null); @@ -362,10 +362,8 @@ }, xAxis: { type: 'category', - data: ['90%-100%', '80%-90%', '70%-80%', '60%-70%', '50%-60%', '40%-50%', '30%-40%', '20%-30%', '10%-20%', '0%-10%'], - axisLabel: { - rotate: 45 - } + data: ['10鍒�', '9鍒�', '8鍒�', '7鍒�', '6鍒�', '5鍒�', '4鍒�', '3鍒�', '2鍒�', '1鍒�'], + }, yAxis: { type: 'value', @@ -385,13 +383,12 @@ { value: 21, itemStyle: { color: '#52c41a' } }, { value: 8, itemStyle: { color: '#faad14' } }, { value: 5, itemStyle: { color: '#faad14' } }, - { value: 3, itemStyle: { color: '#faad14' } }, - { value: 1, itemStyle: { color: '#ff4d4f' } }, - { value: 1, itemStyle: { color: '#ff4d4f' } } + ], label: { show: true, - position: 'top' + position: 'top', + formatter: '{c}鍙�' } } ] -- Gitblit v1.9.3