From 83be7ca0c138b64b3447cc207b63c7933690f6ec Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 25 二月 2025 09:08:58 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/CNAS/systemManagement/correctiveAction/index.vue |  203 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 203 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/systemManagement/correctiveAction/index.vue b/src/views/CNAS/systemManagement/correctiveAction/index.vue
new file mode 100644
index 0000000..6e92fbd
--- /dev/null
+++ b/src/views/CNAS/systemManagement/correctiveAction/index.vue
@@ -0,0 +1,203 @@
+<template>
+  <div>
+    <div class="search-background">
+      <span class="search-group">
+        <span style="width: 150px">涓嶅悎鏍兼弿杩帮細</span>
+        <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input>
+      </span>
+      <span class="search-group">
+        <el-button size="small" @click="resetSearchForm">閲� 缃�</el-button>
+        <el-button size="small" type="primary" @click="searchList">鏌� 璇�</el-button>
+      </span>
+    </div>
+    <div class="table">
+      <div>
+        <TableCard :showForm="false" :showTitle="false">
+          <template v-slot:table>
+            <limsTable :column="tableColumn" :height="'calc(100vh - 17em)'" :table-data="tableData"
+              :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"
+              :page="page">
+            </limsTable>
+          </template>
+        </TableCard>
+      </div>
+    </div>
+    <corrective-info v-if="correctiveInfo" ref="correctiveInfo"></corrective-info>
+    <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord>
+  </div>
+</template>
+
+<script>
+import TableCard from '@/components/TableCard/index.vue';
+import limsTable from "@/components/Table/lims-table.vue";
+import CorrectiveInfo from './components/correctiveInfo.vue';
+// import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue';
+import ViewTestRecord from './components/ViewTestRecord.vue';
+import {
+  pageSuperviseDetailCorrect,
+  exportSuperviseDetaillCorrect,
+} from '@/api/cnas/systemManagement/correctiveAction.js'
+
+export default {
+  name: 'a8-corrective-action',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: {
+    // QualityInfo, 
+    CorrectiveInfo,
+    limsTable,
+    TableCard,
+    ViewTestRecord
+  },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      searchForm: {
+        raiseResult: '',
+      },
+      tableColumn: [
+        {
+          label: '涓嶅悎鏍兼垨鍋忕浜嬪疄鐨勬弿杩�',
+          prop: 'raiseResult',
+          minWidth: '100'
+        },
+        {
+          label: '鍘熷洜鍒嗘瀽',
+          prop: 'causeResult',
+          minWidth: '100'
+        },
+        {
+          label: '绾犳鎺柦',
+          prop: 'correctResult',
+          minWidth: '100'
+        },
+        {
+          label: '瀹炴柦楠岃瘉缁撴灉',
+          prop: 'validationResult',
+          minWidth: '100'
+        },
+        {
+          dataType: 'action',
+          minWidth: '60',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '鏌ョ湅',
+              type: 'text',
+              clickFun: (row) => {
+                this.viewInfo(row);
+              },
+            },
+            {
+              name: '瀵煎嚭',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDown(row)
+              }
+            },
+            {
+              name: '鏌ョ湅闄勪欢',
+              type: 'text',
+              clickFun: (row) => {
+                this.viewFiles(row);
+              },
+            },
+          ]
+        }
+      ],
+      tableData: [],
+      tableLoading: false,
+      page: {
+        size: 20,
+        current: 1,
+      },
+      total: 0,
+      correctiveInfo: false,
+      viewTestRecordDialog: false,
+    };
+  },
+  mounted() {
+    this.searchList()
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    // 鏌ヨ鍒楄〃
+    searchList() {
+      const entity = {
+        raiseResult: this.searchForm.raiseResult,
+      }
+      const page = this.page
+      this.tableLoading = true
+      pageSuperviseDetailCorrect({ ...entity, ...page }).then(res => {
+        this.tableLoading = false
+        if (res.code === 201) return
+        this.tableData = res.data.records
+        this.total = res.data.total
+      }).catch(err => {
+        console.log('err---', err);
+        this.tableLoading = false
+      })
+    },
+    // 瀵煎嚭
+    handleDown(row) {
+      exportSuperviseDetaillCorrect({ superviseDetailsCorrectId: row.superviseDetailsCorrectId }).then(res => {
+        this.outLoading = false
+        this.$message.success('瀵煎嚭鎴愬姛')
+        const blob = new Blob([res], { type: 'application/msword' });
+        this.$download.saveAs(blob, '鐩戠潱绾犳鎺柦' + '.docx');
+      })
+    },
+    // 閲嶇疆鏌ヨ鏉′欢
+    resetSearchForm() {
+      this.searchForm.raiseResult = '';
+      this.searchList()
+    },
+    // 鏌ョ湅璇︽儏
+    viewInfo(row) {
+      this.correctiveInfo = true
+      this.$nextTick(() => {
+        this.$refs.correctiveInfo.openDia(row)
+      })
+    },
+    // 鏌ョ湅闄勪欢
+    viewFiles(row) {
+      this.viewTestRecordDialog = true
+      this.$nextTick(() => {
+        this.$refs.viewTestRecordDialog.openDia(row)
+      })
+    },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.searchList();
+    },
+  }
+};
+</script>
+
+<style scoped>
+.view-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 60px;
+  padding-left: 20px;
+}
+
+.search-background {
+  width: 100%;
+  height: 80px;
+  line-height: 80px;
+  background-color: #ffffff;
+  display: flex;
+}
+
+.search-group {
+  display: flex;
+  align-items: center;
+  margin: 0 20px;
+}
+
+.table {
+  background-color: #ffffff;
+}
+</style>

--
Gitblit v1.9.3