From e888346ebcd8e3e099a15c7edd7bf367c057193a Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 04 三月 2025 15:33:33 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev'
---
src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue | 181 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 181 insertions(+), 0 deletions(-)
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
new file mode 100644
index 0000000..58b1b4b
--- /dev/null
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/correctiveAction.vue
@@ -0,0 +1,181 @@
+<template>
+ <div>
+ <div class="search-background">
+ <span class="search-group">
+ <span style="width: 200px">涓嶅悎鏍兼弿杩帮細</span>
+ <el-input v-model="searchForm.raiseResult" clearable size="small"></el-input>
+ <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">閲� 缃�</el-button>
+ <el-button size="medium" type="primary" @click="searchList">鏌� 璇�</el-button>
+ </span>
+ <span class="search-group">
+ <el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
+ </span>
+ </div>
+ <div class="table">
+ <limsTable :column="tableColumn" :height="'calc(100vh - 23em)'" :table-data="tableData"
+ :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
+ </limsTable>
+ </div>
+ <corrective-action-d-ia v-if="correctiveActionDIa" ref="correctiveActionDIa"
+ @closeRectifyDia="closeRectifyDia"></corrective-action-d-ia>
+ <view-test-record v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></view-test-record>
+ </div>
+</template>
+
+<script>
+import TableCard from '@/components/TableCard/index.vue';
+import limsTable from "@/components/Table/lims-table.vue";
+import CorrectiveActionDIa from './correctiveActionDIa.vue';
+import ViewTestRecord from './ViewTestRecord.vue';
+import {
+ pageInternalCorrect,
+ exportInternalCorrect,
+} from '@/api/cnas/systemManagement/internalAuditManagement.js'
+
+export default {
+ name: 'correctiveAction',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { CorrectiveActionDIa, 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: '220',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDown(row)
+ }
+ },
+ {
+ name: '绾犳',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('rectify', row);
+ },
+ },
+ {
+ name: '鏌ョ湅闄勪欢',
+ type: 'text',
+ clickFun: (row) => {
+ this.viewFiles(row);
+ },
+ },
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ correctiveActionDIa: false,
+ viewTestRecordDialog: false,
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = {
+ raiseResult: this.searchForm.raiseResult,
+ }
+ const page = this.page
+ this.tableLoading = true
+ pageInternalCorrect({ ...entity, ...page }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }).catch(err => {
+ console.log('err---', err);
+ this.tableLoading = false
+ })
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.raiseResult = '';
+ this.searchList()
+ },
+ // 鏌ョ湅闄勪欢
+ viewFiles(row) {
+ this.viewTestRecordDialog = true
+ this.$nextTick(() => {
+ this.$refs.viewTestRecordDialog.openDia(row)
+ })
+ },
+ openFormDia(type, row) {
+ this.correctiveActionDIa = true
+ this.$nextTick(() => {
+ this.$refs.correctiveActionDIa.openDia(type, row)
+ })
+ },
+ // 瀵煎嚭
+ handleDown(row) {
+ exportInternalCorrect({ correctId: row.correctId }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鍐呭绾犳鎺柦' + '.docx');
+ })
+ },
+ closeRectifyDia() {
+ this.correctiveActionDIa = false
+ this.searchList()
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.searchList();
+ },
+ }
+};
+</script>
+
+<style scoped>
+.search-background {
+ width: 100%;
+ height: 60px;
+ line-height: 60px;
+ display: flex;
+ justify-content: space-between;
+}
+
+.search-group {
+ display: flex;
+ align-items: center;
+ margin: 0 20px;
+}
+</style>
--
Gitblit v1.9.3