| | |
| | | @pagination="pagination" |
| | | :total="page.total" |
| | | > |
| | | <template #reasonAnalysis="{ row }"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openTextPreviewDialog('原因分析', row?.reasonAnalysis)" |
| | | > |
| | | {{ row?.reasonAnalysis}} |
| | | </el-button> |
| | | </template> |
| | | <template #preventiveCorrective="{ row }"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | @click="openTextPreviewDialog('预防与纠正措施', row?.preventiveCorrective)" |
| | | > |
| | | {{ row?.preventiveCorrective}} |
| | | </el-button> |
| | | </template> |
| | | <template #lossWorking="{ row }"> |
| | | <span>{{ row?.lossWorking ?? '-' }}</span> |
| | | </template> |
| | | <template #lossMaterial="{ row }"> |
| | | <span>{{ row?.lossMaterial ?? '-' }}</span> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <el-dialog v-model="textPreviewDialogVisible" :title="textPreviewTitle" width="600px"> |
| | | <div class="text-preview-content">{{ textPreviewContent || "暂无内容" }}</div> |
| | | </el-dialog> |
| | | <DetailDia ref="detailDiaRef" /> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | </div> |
| | |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue"; |
| | | import DetailDia from "@/views/qualityManagement/nonconformingManagement/components/detailDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const data = reactive({ |
| | |
| | | { |
| | | label: "原因分析", |
| | | prop: "reasonAnalysis", |
| | | dataType: "slot", |
| | | slot: "reasonAnalysis", |
| | | width: 160 |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "预防与纠正措施", |
| | | prop: "preventiveCorrective", |
| | | dataType: "slot", |
| | | slot: "preventiveCorrective", |
| | | width: 180 |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "工时损失", |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 100, |
| | | width: 140, |
| | | operation: [ |
| | | { |
| | | name: "详情", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openDetailDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "处理", |
| | | type: "text", |
| | |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const textPreviewDialogVisible = ref(false); |
| | | const textPreviewTitle = ref(""); |
| | | const textPreviewContent = ref(""); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | |
| | | }); |
| | | const formDia = ref() |
| | | const inspectionFormDia = ref() |
| | | const detailDiaRef = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const changeDaterange = (value) => { |
| | |
| | | inspectionFormDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | // 查看字段详情 |
| | | const openTextPreviewDialog = (title, content) => { |
| | | textPreviewTitle.value = title; |
| | | textPreviewContent.value = content || ""; |
| | | textPreviewDialogVisible.value = true; |
| | | // 打开详情弹框 |
| | | const openDetailDialog = (row) => { |
| | | detailDiaRef.value?.openDialog(row); |
| | | }; |
| | | |
| | | // 删除 |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .text-preview-content { |
| | | white-space: pre-wrap; |
| | | line-height: 1.6; |
| | | color: #606266; |
| | | word-break: break-word; |
| | | max-height: 60vh; |
| | | overflow-y: auto; |
| | | .text-ellipsis { |
| | | display: inline-block; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | </style> |