yyb
22 小时以前 d2fb1300564eaa8166f4db1184c521e468cd2ed3
src/views/qualityManagement/nonconformingManagement/index.vue
@@ -1,3 +1,4 @@
// 不合格管理
<template>
  <div class="app-container">
    <div class="search_form">
@@ -51,8 +52,36 @@
          :tableLoading="tableLoading"
          @pagination="pagination"
          :total="page.total"
      ></PIMTable>
      >
        <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>
    <FormDia ref="formDia" @close="handleQuery"></FormDia>
    <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
  </div>
@@ -173,6 +202,30 @@
    width: 120
  },
  {
    label: "原因分析",
    prop: "reasonAnalysis",
    dataType: "slot",
    slot: "reasonAnalysis",
    width: 160
  },
  {
    label: "预防与纠正措施",
    prop: "preventiveCorrective",
    dataType: "slot",
    slot: "preventiveCorrective",
    width: 180
  },
  {
    label: "工时损失",
    prop: "lossWorking",
    width: 140
  },
  {
    label: "材料费损失",
    prop: "lossMaterial",
    width: 140
  },
  {
    dataType: "action",
    label: "操作",
    align: "center",
@@ -193,6 +246,9 @@
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,
@@ -259,6 +315,12 @@
    inspectionFormDia.value?.openDialog(type, row)
  })
};
// 查看字段详情
const openTextPreviewDialog = (title, content) => {
  textPreviewTitle.value = title;
  textPreviewContent.value = content || "";
  textPreviewDialogVisible.value = true;
};
// 删除
const handleDelete = () => {
@@ -303,4 +365,13 @@
});
</script>
<style scoped></style>
<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;
}
</style>