| | |
| | | |
| | | <!-- 备件信息 --> |
| | | <div class="grid grid-cols-2 gap-4 mb-6"> |
| | | <!-- 备件寿命预测 --> |
| | | <Card title="备件寿命预测"> |
| | | <!-- 设备部件寿命预测 --> |
| | | <Card title="设备部件寿命预测"> |
| | | <a-table :columns="lifePredictionColumns" :data-source="lifePredictionData" :pagination="false" class="w-full"> |
| | | <template #bodyCell="{ column, record }"> |
| | | <template v-if="column.key === 'lifeStatus'"> |
| | |
| | | key: '1', |
| | | name: 'SMT贴片机', |
| | | type: 'SMT机器', |
| | | component: '传送带', |
| | | indicator: '振动幅度', |
| | | value: 0.8, |
| | | threshold: 0.5, |
| | | status: '高风险', |
| | | maintenanceSuggestion: '建议更换传送带轴承', |
| | | component: '左3-Head', |
| | | indicator: '真空压力', |
| | | value: 32, |
| | | threshold: 35, |
| | | status: '中风险', |
| | | maintenanceSuggestion: '真空压力值低于设定值,建议检查或更换吸嘴', |
| | | maintenanceType: '预防性维护', |
| | | }, |
| | | { |
| | |
| | | value: 85, |
| | | threshold: 80, |
| | | status: '中风险', |
| | | maintenanceSuggestion: '建议对主轴进行润滑保养', |
| | | maintenanceSuggestion: '建议对主轴进行润滑保养并检查冷却系统', |
| | | maintenanceType: '润滑维护', |
| | | }, |
| | | { |
| | |
| | | name: '注塑机', |
| | | type: '注塑设备', |
| | | component: '液压系统', |
| | | indicator: '压力', |
| | | value: 120, |
| | | threshold: 150, |
| | | indicator: '射出压力不稳定', |
| | | value: 28, |
| | | threshold: 30, |
| | | status: '低风险', |
| | | maintenanceSuggestion: '建议检查液压系统密封件', |
| | | maintenanceType: '检查维护', |
| | | }, |
| | | { |
| | | key: '4', |
| | | name: '空压机', |
| | | type: '空气压缩机', |
| | | component: '电机', |
| | | indicator: '电流', |
| | | value: 49, |
| | | threshold: 50, |
| | | status: '低风险', |
| | | maintenanceSuggestion: '暂无建议', |
| | | maintenanceType: '无', |
| | | }, |
| | | // { |
| | | // key: '4', |
| | | // name: '空压机', |
| | | // type: '空气压缩机', |
| | | // component: '电机', |
| | | // indicator: '电流', |
| | | // value: 49, |
| | | // threshold: 50, |
| | | // status: '低风险', |
| | | // maintenanceSuggestion: '暂无建议', |
| | | // maintenanceType: '无', |
| | | // }, |
| | | ]); |
| | | |
| | | // 备件库存数据 |
| | |
| | | key: '1', |
| | | name: '传送带轴承', |
| | | currentStock: 10, |
| | | safetyStock: 5, |
| | | predictedDemand: 3, |
| | | safetyStock: 15, |
| | | predictedDemand: 8, |
| | | }, |
| | | { |
| | | key: '2', |
| | |
| | | key: '3', |
| | | name: '液压系统密封件', |
| | | currentStock: 20, |
| | | safetyStock: 10, |
| | | safetyStock: 25, |
| | | predictedDemand: 5, |
| | | }, |
| | | { |
| | |
| | | |
| | | const lifePredictionColumns = [ |
| | | { title: '设备名称', dataIndex: 'deviceName', key: 'deviceName' }, |
| | | { title: '部件名称', dataIndex: 'componentName', key: 'componentName' }, |
| | | { title: '备件名称', dataIndex: 'name', key: 'name' }, |
| | | { title: '部位名称', dataIndex: 'componentName', key: 'componentName' }, |
| | | { title: '部件名称', dataIndex: 'name', key: 'name' }, |
| | | { title: '预测寿命 (天)', dataIndex: 'predictedLife', key: 'predictedLife' }, |
| | | { title: '剩余寿命 (天)', dataIndex: 'remainingDays', key: 'remainingDays' }, |
| | | { title: '状态', dataIndex: 'lifeStatus', key: 'lifeStatus' }, |
| | |
| | | ]; |
| | | |
| | | const lifePredictionData = ref([ |
| | | { key: '1', deviceName: 'SMT贴片机', componentName: '传送带', name: '轴承A', predictedLife: 365, remainingDays: 120 }, |
| | | { key: '2', deviceName: 'CNC加工中心', componentName: '主轴', name: '齿轮B', predictedLife: 730, remainingDays: 30 }, |
| | | { key: '3', deviceName: '注塑机', componentName: '液压系统', name: '滤芯C', predictedLife: 180, remainingDays: 90 }, |
| | | { key: '4', deviceName: '空压机', componentName: '电机', name: '传感器D', predictedLife: 500, remainingDays: 10 }, |
| | | { key: '5', deviceName: '焊接机器人', componentName: '焊枪', name: '焊嘴E', predictedLife: 240, remainingDays: 60 } |
| | | { key: '4', deviceName: '空压机', componentName: '电机', name: '传感器', predictedLife: 500, remainingDays: 10 }, |
| | | { key: '2', deviceName: 'CNC加工中心', componentName: '主轴', name: '齿轮', predictedLife: 730, remainingDays: 30 }, |
| | | { key: '1', deviceName: 'SMT贴片机', componentName: '传送带', name: '轴承', predictedLife: 365, remainingDays: 50 }, |
| | | |
| | | { key: '3', deviceName: '注塑机', componentName: '液压系统', name: '滤芯', predictedLife: 180, remainingDays: 90 }, |
| | | |
| | | { key: '5', deviceName: '焊接机器人', componentName: '焊枪', name: '焊嘴', predictedLife: 240, remainingDays: 60 } |
| | | ]); |
| | | |
| | | const getLifeStatus = (remainingDays) => { |
| | |
| | | console.log('设备ID111:', record.name) |
| | | router.push({ path: '/predictive/smt-detail', query: { deviceId: record.key } }); |
| | | } else if (record.name === 'CNC加工中心') { |
| | | router.push({ path: '/predictive/predictive-detail', query: { deviceId: record.key } }); |
| | | router.push({ path: '/predictive/cnc-detail', query: { deviceId: record.key } }); |
| | | } else if (record.name === '注塑机') { |
| | | router.push({ path: '/predictive/injection-detail', query: { deviceId: record.key } }); |
| | | } else { |
| | |
| | | type: 'bar', |
| | | barWidth: '60%', |
| | | data: [ |
| | | { value: 15, itemStyle: { color: '#52c41a' } }, |
| | | { value: 20, itemStyle: { color: '#52c41a' } }, |
| | | { value: 25, itemStyle: { color: '#faad14' } }, |
| | | { value: 15, itemStyle: { color: '#faad14' } }, |
| | | { value: 10, itemStyle: { color: '#faad14' } }, |
| | | { value: 5, itemStyle: { color: '#ff4d4f' } }, |
| | | { value: 5, itemStyle: { color: '#ff4d4f' } }, |
| | | { value: 3, itemStyle: { color: '#ff4d4f' } }, |
| | | { value: 48, itemStyle: { color: '#52c41a' } }, |
| | | { value: 53, itemStyle: { color: '#52c41a' } }, |
| | | { value: 37, itemStyle: { color: '#52c41a' } }, |
| | | { value: 29, itemStyle: { color: '#52c41a' } }, |
| | | { 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' } } |
| | | ], |