diff --git a/src/api/dms/report/index.ts b/src/api/dms/report/index.ts index fa9a30d..64d5584 100644 --- a/src/api/dms/report/index.ts +++ b/src/api/dms/report/index.ts @@ -1,6 +1,7 @@ // hwmom-ui/src/api/dms/report/faultTrace.ts import request from '@/utils/request'; import { FaultTraceQuery, FaultTraceVO } from './types'; +import { RealtimeAlarmQuery, RealtimeAlarmVO } from './types'; export function listFaultTrace(query: FaultTraceQuery) { @@ -18,4 +19,21 @@ export function exportFaultTrace(query: FaultTraceQuery) { data: query, responseType: 'blob', }); +} + +export function listRealtimeAlarm(query: RealtimeAlarmQuery) { + return request({ + url: '/dms/report/realtimeAlarm/list', + method: 'get', + params: query, + }); +} + +export function exportRealtimeAlarm(query: RealtimeAlarmQuery) { + return request({ + url: '/dms/report/realtimeAlarm/export', + method: 'post', + data: query, + responseType: 'blob', + }); } \ No newline at end of file diff --git a/src/api/dms/report/types.ts b/src/api/dms/report/types.ts index aeadfc4..dcc99cf 100644 --- a/src/api/dms/report/types.ts +++ b/src/api/dms/report/types.ts @@ -27,3 +27,33 @@ export interface FaultTraceQuery { topResolutionTime: string | null; faultType?: string | number; } + + export interface RealtimeAlarmQuery { + pageNum?: number; + pageSize?: number; + startDate?: string; // 'YYYY-MM-DD HH:mm:ss' or ISO + endDate?: string; // 'YYYY-MM-DD HH:mm:ss' or ISO + deviceModeId?: number; + machineCode?: string; + machineId?: number; + alarmLevelId?: number; + alarmTypeId?: number; + alarmStatus?: string; // 0未处理、1已处理、2已恢复 + alarmMode?: string; // 1云端处理,2终端上报 + alarmInfoType?: string; // 1设备报警,3离线报警 + params?: Record; +} + +export interface RealtimeAlarmVO { + machineCode: string; + machineName: string; + deviceModeName: string; + alarmLevelName: string; + alarmTypeName: string; + alarmStatus: string; // 字典 alarm_status + alarmMode: string; // 字典 alarm_mode + alarmBeginTime: string; + alarmEndTime: string | null; + durationMinutes: string; // as string from backend + alarmContent: string; +} \ No newline at end of file diff --git a/src/api/qms/report/index.ts b/src/api/qms/report/index.ts index 19dbe0f..d575823 100644 --- a/src/api/qms/report/index.ts +++ b/src/api/qms/report/index.ts @@ -17,3 +17,12 @@ export const getDefectAnalysisReport = (params: { startTime: string, endTime: st params }); }; + +// 新增:获取进料检验效率(IQC)报表 +export const getIncomingInspectionEfficiency = (params: { startTime: string, endTime: string }) => { + return request({ + url: '/qms/report/incoming', + method: 'get', + params + }); +}; diff --git a/src/views/dms/deviceLubeReport/index.vue b/src/views/dms/deviceLubeReport/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/dms/report/index.vue b/src/views/dms/report/index.vue index a734403..632e2c0 100644 --- a/src/views/dms/report/index.vue +++ b/src/views/dms/report/index.vue @@ -19,9 +19,9 @@ - - - + + + + + @@ -129,11 +132,11 @@ const debugFaultType = (faultType: any) => { console.log('=== 前端字典调试 ==='); console.log('faultType原始值:', JSON.stringify(faultType), '类型:', typeof faultType); console.log('字典选项:', activity_fault_type.value); - + // 查找匹配的字典项 const matchedDict = activity_fault_type.value.find(item => item.value === faultType); console.log('匹配的字典项:', matchedDict); - + return ''; // 不在页面显示调试信息 }; @@ -151,7 +154,7 @@ const getList = async () => { console.log('第一条记录完整数据:', list.value[0]); } - + } finally { loading.value = false; } @@ -175,6 +178,21 @@ const resetQuery = () => { getList(); }; +// 格式化故障类型显示 +const formatFaultType = (faultType: any) => { + switch (faultType) { + case 1: + case '1': + return '外部故障'; + case 2: + case '2': + return '内部故障'; + default: + return '其他'; + } +}; + + const handleExport = async () => { proxy?.download('/dms/report/faultTrace/export', { ...queryParams }, `fault_trace_${new Date().getTime()}.xlsx`); }; diff --git a/src/views/dms/report/realtimeAlarm.vue b/src/views/dms/report/realtimeAlarm.vue new file mode 100644 index 0000000..2c56ce2 --- /dev/null +++ b/src/views/dms/report/realtimeAlarm.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/mes/reportTeamWork/index.vue b/src/views/mes/reportTeamWork/index.vue new file mode 100644 index 0000000..0b065c0 --- /dev/null +++ b/src/views/mes/reportTeamWork/index.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/src/views/mes/reportTeamWork/index2.vue b/src/views/mes/reportTeamWork/index2.vue new file mode 100644 index 0000000..f4c2e7c --- /dev/null +++ b/src/views/mes/reportTeamWork/index2.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/src/views/mes/reportTeamWork/index3.vue b/src/views/mes/reportTeamWork/index3.vue new file mode 100644 index 0000000..c7b19e4 --- /dev/null +++ b/src/views/mes/reportTeamWork/index3.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/src/views/mes/reportWorkHour/index.vue b/src/views/mes/reportWorkHour/index.vue index 1c13f8c..1ecd7cc 100644 --- a/src/views/mes/reportWorkHour/index.vue +++ b/src/views/mes/reportWorkHour/index.vue @@ -76,7 +76,11 @@ - + + + @@ -96,6 +100,14 @@ import { getBaseShiftInfoList } from '@/api/mes/baseShiftInfo'; import { getBaseClassTeamInfoList } from '@/api/mes/baseClassTeamInfo'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { + mes_import_flag, + active_flag, + mes_plan_status, + mes_release_type, + mes_finish_flag, + mes_model_code +} = toRefs(proxy?.useDict('mes_import_flag', 'active_flag', 'mes_plan_status', 'mes_release_type', 'mes_finish_flag', 'mes_model_code')); const reportList = ref<[]>([]); const loading = ref(true); diff --git a/src/views/mes/reportWorkHour/index2.vue b/src/views/mes/reportWorkHour/index2.vue new file mode 100644 index 0000000..c66cae0 --- /dev/null +++ b/src/views/mes/reportWorkHour/index2.vue @@ -0,0 +1,232 @@ + + + diff --git a/src/views/mes/reportWorkHour/index3.vue b/src/views/mes/reportWorkHour/index3.vue new file mode 100644 index 0000000..92bcae6 --- /dev/null +++ b/src/views/mes/reportWorkHour/index3.vue @@ -0,0 +1,232 @@ + + + diff --git a/src/views/mes/wipTrackingReport/index.vue b/src/views/mes/wipTrackingReport/index.vue index 6afef52..094183f 100644 --- a/src/views/mes/wipTrackingReport/index.vue +++ b/src/views/mes/wipTrackingReport/index.vue @@ -89,9 +89,9 @@ @@ -172,7 +172,7 @@ let processChart: echarts.ECharts | null = null; // 列显隐信息 const columns = ref([ { key: 0, label: '生产订单号', visible: true }, - { key: 1, label: '物料编号', visible: true }, + { key: 1, label: '物料编号', visible: false }, { key: 2, label: '物料名称', visible: true }, { key: 3, label: '规格型号', visible: true }, { key: 4, label: '计划总数量', visible: true }, @@ -405,7 +405,12 @@ function updateProcessChart() { trigger: 'axis', formatter: function(params: any) { const data = params[0].data.value; - return `订单号: ${data[0]}
+ // return `订单号: ${data[0]}
+ // 进度: ${data[1]}%
+ // 状态: ${data[2]}
+ // 在制工序: ${data[3]}
+ // 剩余工序: ${data[4]}`; + return ` 进度: ${data[1]}%
状态: ${data[2]}
在制工序: ${data[3]}
diff --git a/src/views/qms/report/incoming.vue b/src/views/qms/report/incoming.vue new file mode 100644 index 0000000..80689da --- /dev/null +++ b/src/views/qms/report/incoming.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/views/wms/inventoryDifference/index.vue b/src/views/wms/inventoryDifference/index.vue index 7448336..71dc810 100644 --- a/src/views/wms/inventoryDifference/index.vue +++ b/src/views/wms/inventoryDifference/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -166,10 +159,10 @@ const getList = async () => { const res = await getInventoryDifference(queryParams.value); reportList.value = res.data; loading.value = false; - + // 计算统计数据 calculateStats(); - + // 更新图表 nextTick(() => { updateCharts(); @@ -182,8 +175,8 @@ const calculateStats = () => { noDifference: reportList.value.filter(item => item.differenceType === '无差异').length, profit: reportList.value.filter(item => item.differenceType === '盘盈').length, loss: reportList.value.filter(item => item.differenceType === '盘亏').length, - avgRate: reportList.value.length > 0 - ? reportList.value.reduce((sum, item) => sum + (item.differenceRate || 0), 0) / reportList.value.length + avgRate: reportList.value.length > 0 + ? reportList.value.reduce((sum, item) => sum + (item.differenceRate || 0), 0) / reportList.value.length : 0 }; }; @@ -384,4 +377,4 @@ onUnmounted(() => { font-size: 0.9rem; color: #666; } - \ No newline at end of file + diff --git a/src/views/wms/inventoryTrendAnalysis/index.vue b/src/views/wms/inventoryTrendAnalysis/index.vue index b15cafc..931e918 100644 --- a/src/views/wms/inventoryTrendAnalysis/index.vue +++ b/src/views/wms/inventoryTrendAnalysis/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -102,7 +95,7 @@ const getList = async () => { const res = await getInventoryTrendAnalysis(queryParams.value); reportList.value = res.data; loading.value = false; - + // 更新图表 nextTick(() => { updateChart(); @@ -243,4 +236,4 @@ onUnmounted(() => { .el-card { margin-bottom: 20px; } - \ No newline at end of file + diff --git a/src/views/wms/inventoryTurnover/index.vue b/src/views/wms/inventoryTurnover/index.vue index 5bc9493..3c4169f 100644 --- a/src/views/wms/inventoryTurnover/index.vue +++ b/src/views/wms/inventoryTurnover/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -156,10 +149,10 @@ const getList = async () => { const res = await getInventoryTurnover(queryParams.value); reportList.value = res.data; loading.value = false; - + // 计算统计数据 calculateStats(); - + // 更新图表 nextTick(() => { updateCharts(); @@ -365,4 +358,4 @@ onUnmounted(() => { font-size: 0.9rem; color: #666; } - \ No newline at end of file + diff --git a/src/views/wms/returnReasonAnalysis/index.vue b/src/views/wms/returnReasonAnalysis/index.vue index 30a925d..5b166ff 100644 --- a/src/views/wms/returnReasonAnalysis/index.vue +++ b/src/views/wms/returnReasonAnalysis/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -105,7 +98,7 @@ const getList = async () => { const res = await getReturnReasonAnalysis(queryParams.value); reportList.value = res.data; loading.value = false; - + // 更新图表 nextTick(() => { updateCharts(); @@ -255,4 +248,4 @@ onUnmounted(() => { .el-card { margin-bottom: 20px; } - \ No newline at end of file + diff --git a/src/views/wms/safetyStockAlert/index.vue b/src/views/wms/safetyStockAlert/index.vue index f624355..f95eaa8 100644 --- a/src/views/wms/safetyStockAlert/index.vue +++ b/src/views/wms/safetyStockAlert/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -87,7 +80,7 @@ - + @@ -146,10 +139,10 @@ const getList = async () => { const res = await getSafetyStockAlert(queryParams.value); reportList.value = res.data; loading.value = false; - + // 计算统计数据 calculateStats(); - + // 更新图表 nextTick(() => { updateChart(); @@ -318,4 +311,4 @@ onUnmounted(() => { font-size: 0.9rem; color: #666; } - \ No newline at end of file + diff --git a/src/views/wms/stagnantInventory/index.vue b/src/views/wms/stagnantInventory/index.vue index 0be0de8..e8f295c 100644 --- a/src/views/wms/stagnantInventory/index.vue +++ b/src/views/wms/stagnantInventory/index.vue @@ -5,17 +5,10 @@
- - - - - + - 搜索 - 重置 + 刷新 + @@ -147,10 +140,10 @@ const getList = async () => { const res = await getStagnantInventory(queryParams.value); reportList.value = res.data; loading.value = false; - + // 计算统计数据 calculateStats(); - + // 更新图表 nextTick(() => { updateCharts(); @@ -356,4 +349,4 @@ onUnmounted(() => { font-size: 0.9rem; color: #666; } - \ No newline at end of file +