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/auditReport.vue | 311 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 311 insertions(+), 0 deletions(-)
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
new file mode 100644
index 0000000..6909f5e
--- /dev/null
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditReport.vue
@@ -0,0 +1,311 @@
+<template>
+ <div>
+ <div class="search-background">
+ <span class="search-group">
+ <span style="width: 160px">瀹℃牳鐩殑锛�</span>
+ <el-input v-model="searchForm.purposes" 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>
+ <audit-report-dia v-if="auditReportDia" ref="auditReportDia"
+ @closeImplementDia="closeImplementDia"></audit-report-dia>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import AuditReportDia from './auditReportDia.vue';
+import {
+ delInternalReport,
+ pageInternalReport,
+ exportInternalReport,
+} from '@/api/cnas/systemManagement/internalAuditManagement.js'
+export default {
+ name: 'auditReport',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { AuditReportDia, limsTable },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ searchForm: {
+ purposes: '',
+ },
+ tableColumn: [
+ {
+ label: '瀹℃牳鐩殑',
+ prop: 'purposes',
+ },
+ {
+ label: '瀹℃牳渚濇嵁',
+ prop: 'basis',
+ },
+ {
+ label: '瀹℃牳鏃ユ湡',
+ prop: 'reviewDate',
+ },
+ {
+ label: '瀹℃牳鏂规硶',
+ prop: 'method',
+ },
+ {
+ label: '瀹℃牳鑼冨洿',
+ prop: 'scope',
+ },
+ {
+ label: '瀹℃牳璐d换鑰�',
+ prop: 'responsible',
+ },
+ {
+ label: '瀹℃牳缁勯暱',
+ prop: 'leader',
+ },
+ {
+ label: '瀹℃牳鍛�',
+ prop: 'auditor',
+ },
+ {
+ label: '瀹℃牳缁勫垎宸ユ儏鍐�',
+ prop: 'division',
+ },
+ {
+ dataType: 'tag',
+ label: '瀹℃牳鐘舵��',
+ prop: 'examineStatus',
+ minWidth: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '涓嶉�氳繃';
+ } else if (params === 1) {
+ return '閫氳繃';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return 'danger';
+ } else if (params === 1) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },
+ {
+ label: '瀹℃牳鍐呭',
+ prop: 'examineRemark',
+ minWidth: '140'
+ },
+ {
+ dataType: 'tag',
+ label: '璐ㄩ噺璐熻矗浜虹姸鎬�',
+ prop: 'qualityStatus',
+ minWidth: '100',
+ formatData: (params) => {
+ if (params === 0) {
+ return '涓嶉�氳繃';
+ } else if (params === 1) {
+ return '閫氳繃';
+ } else {
+ return null;
+ }
+ },
+ formatType: (params) => {
+ if (params === 0) {
+ return 'danger';
+ } else if (params === 1) {
+ return 'success';
+ } else {
+ return null;
+ }
+ }
+ },
+ {
+ label: '璐ㄩ噺璐熻矗浜烘剰瑙�',
+ prop: 'qualityRemark',
+ minWidth: '140'
+ },
+ {
+ dataType: 'action',
+ minWidth: '220',
+ fixed: 'right',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDown(row)
+ }
+ },
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('edit', row);
+ },
+ disabled: (row) => {
+ if (row.examineStatus === 1 || row.examineStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ },
+ {
+ name: '瀹℃牳',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('examine', row);
+ },
+ disabled: (row) => {
+ if (row.examineStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ },
+ {
+ name: '鎰忚',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('ratify', row);
+ },
+ disabled: (row) => {
+ if (row.qualityStatus === 1 || row.examineStatus === 0 || row.examineStatus === null) {
+ return true
+ } else {
+ return false
+ }
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: '#f56c6c',
+ clickFun: (row) => {
+ this.delPlan(row)
+ },
+ disabled: (row) => {
+ if (row.qualityStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ }
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ auditReportDia: false
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = this.searchForm
+ const page = this.page
+ this.tableLoading = true
+ pageInternalReport({ ...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
+ })
+ },
+ // 鏂板锛岀紪杈戯紝鎵瑰噯寮规
+ openFormDia(type, row) {
+ this.auditReportDia = true
+ this.$nextTick(() => {
+ this.$refs.auditReportDia.openDia(type, row)
+ })
+ },
+ closeImplementDia() {
+ this.auditReportDia = false
+ this.searchList()
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.purposes = '';
+ this.searchList()
+ },
+ // 鍒犻櫎
+ delPlan(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delInternalReport({ reportId: row.reportId }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }).catch(err => {
+ this.tableLoading = false
+ console.log('err---', err);
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ // 瀵煎嚭
+ handleDown(row) {
+ exportInternalReport({ reportId: row.reportId }).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '鍐呭鎶ュ憡' + '.docx');
+ })
+ },
+ 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