From 223ab3367c379fdc204e0c493868e3b914a0604b Mon Sep 17 00:00:00 2001 From: hwj Date: Tue, 21 Apr 2026 15:41:06 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=94=9F=E4=BA=A7=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E8=B4=A8=E6=A3=80=E4=BF=A1=E6=81=AF=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductionReportQualityInfo.vue | 151 ++++++++++++++++-- src/views/mes/productionReport/index.vue | 25 ++- src/views/mes/tasksummary/index.vue | 2 - 3 files changed, 152 insertions(+), 26 deletions(-) diff --git a/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue b/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue index eb5eb9cf..64e422c2 100644 --- a/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue +++ b/src/views/mes/productionReport/components/ProductionReportQualityInfo.vue @@ -5,39 +5,68 @@ 刷新 - - - - + + - - + + + + + + + + - + - - + - + - + import dayjs from 'dayjs' -import { DICT_TYPE } from '@/utils/dict' import { ZjTaskApi } from '@/api/mes/zjtask' defineOptions({ name: 'ProductionReportQualityInfo' }) +interface ZjTaskResult { + id: number + zjType: number + zjTypeName: string + name: string + remark?: string + tool?: string + standardVal?: number + unit?: string + unitName?: string + upperVal?: number + lowerVal?: number + zjResult: number // 0-待检测 1-检测通过 2-检测不通过 + images?: string + zjTime?: string + taskId: number + createTime: string + deviceId: number + textInput?: string +} + +interface ZjTaskWithResults { + id: number + code: string + name?: string + type: string + schemaId: number + schemaName: string + remark?: string + ticket: number + ticketCode?: string + orgType: string + managerId?: number + managerName?: string + executorId?: number + executorName?: string + status: number + result?: string + resultName?: string + createTime: string + executeTime: string + cancelReason?: string + ticketType?: number + results: ZjTaskResult[] +} + const props = defineProps<{ taskId?: number }>() const loading = ref(false) -const qualityList = ref([]) +const qualityList = ref([]) const total = ref(0) const queryParams = reactive({ ticket: undefined as number | undefined, @@ -105,6 +179,47 @@ const handleRefresh = () => { getList() } +const handleExpandChange = (row: ZjTaskWithResults, expandedRows: any[]) => { + // 展开行变化处理 +} + +const handlePreviewImage = (imagePath: string) => { + // 预览图片的处理 + window.open(imagePath, '_blank') +} + +/** 获取检验结果标签 */ +const getResultLabel = (result: number): string => { + const labelMap: Record = { + 0: '待检测', + 1: '检测通过', + 2: '检测不通过' + } + return labelMap[result] || '未知' +} + +/** 获取状态标签 */ +const getStatusLabel = (status: number): string => { + const labelMap: Record = { + 0: '未开始', + 1: '进行中', + 2: '已完成', + 3: '已取消' + } + return labelMap[status] || '未知' +} + +/** 获取状态类型 */ +const getStatusType = (status: number): string => { + const typeMap: Record = { + 0: 'info', + 1: 'warning', + 2: 'success', + 3: 'danger' + } + return typeMap[status] || 'info' +} + /** 格式化日期时间 */ const formatDateTime = (value: string | Date | null) => { if (!value) return '-' @@ -125,4 +240,8 @@ const formatDateTime = (value: string | Date | null) => { font-weight: 600; color: #333; } + +.expand-content { + padding: 12px; +} diff --git a/src/views/mes/productionReport/index.vue b/src/views/mes/productionReport/index.vue index 98a460b7..8d4efa6e 100644 --- a/src/views/mes/productionReport/index.vue +++ b/src/views/mes/productionReport/index.vue @@ -115,17 +115,16 @@ {{ scope.row.isScheduled ? '是' : '否' }} - + @@ -279,7 +278,17 @@ onMounted(() => { justify-content: center; } -.production-progress-bar { - width: 180px; +.production-progress-cell :deep(.el-progress-circle) { + display: flex; + align-items: center; + justify-content: center; +} + +.production-progress-cell :deep(.el-progress__text) { + display: flex; + align-items: center; + justify-content: center; + font-size: 10px !important; + min-width: auto !important; } diff --git a/src/views/mes/tasksummary/index.vue b/src/views/mes/tasksummary/index.vue index 581955e0..3460001f 100644 --- a/src/views/mes/tasksummary/index.vue +++ b/src/views/mes/tasksummary/index.vue @@ -88,7 +88,6 @@ v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" hi