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/auditInspection.vue | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 253 insertions(+), 0 deletions(-)
diff --git a/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
new file mode 100644
index 0000000..8b851ca
--- /dev/null
+++ b/src/views/CNAS/systemManagement/internalAuditManagement/components/auditInspection.vue
@@ -0,0 +1,253 @@
+<template>
+ <div>
+ <div class="search-background">
+ <span class="search-group">
+ <span style="width: 160px">鍙楀閮ㄩ棬锛�</span>
+ <el-input v-model="searchForm.department" 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-inspection-dia v-if="auditInspectionDia" ref="auditInspectionDia"
+ @closeImplementDia="closeImplementDia"></audit-inspection-dia>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import AuditInspectionDia from './auditInspectionDia.vue';
+import {
+ pageInternalCheck,
+ delInternalCheck,
+ exportInternalCheck
+} from '@/api/cnas/systemManagement/internalAuditManagement.js'
+
+export default {
+ name: 'auditInspection',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { AuditInspectionDia, limsTable },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ searchForm: {
+ department: '',
+ },
+ tableColumn: [
+ {
+ label: '鍙楀閮ㄩ棬',
+ prop: 'department',
+ },
+ {
+ label: '閮ㄩ棬璐熻矗浜�',
+ prop: 'departmentHead',
+ },
+ {
+ label: '瀹℃牳鍛�',
+ prop: 'auditor',
+ },
+ {
+ label: '瀹℃牳鏃ユ湡',
+ prop: 'reviewDate',
+ }, {
+ dataType: 'tag',
+ label: '鎵瑰噯鐘舵��',
+ prop: 'ratifyStatus',
+ 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: 'ratifyRemark',
+ minWidth: '140'
+ },
+ {
+ dataType: 'action',
+ minWidth: '220',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDown(row)
+ },
+ disabled: (row) => {
+ if (row.ratifyStatus === 1) {
+ return false
+ } else {
+ return true
+ }
+ },
+ },
+ {
+ name: '缂栬緫',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('edit', row);
+ },
+ disabled: (row) => {
+ if (row.ratifyStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ },
+ {
+ name: '鎵瑰噯',
+ type: 'text',
+ clickFun: (row) => {
+ this.openFormDia('ratify', row);
+ },
+ disabled: (row) => {
+ if (row.ratifyStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ },
+ {
+ name: '鍒犻櫎',
+ type: 'text',
+ color: '#f56c6c',
+ clickFun: (row) => {
+ this.delPlan(row)
+ },
+ disabled: (row) => {
+ if (row.ratifyStatus === 1) {
+ return true
+ } else {
+ return false
+ }
+ },
+ }
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ auditInspectionDia: false
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = this.searchForm
+ const page = this.page
+ this.tableLoading = true
+ pageInternalCheck({ ...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.auditInspectionDia = true
+ this.$nextTick(() => {
+ this.$refs.auditInspectionDia.openDia(type, row)
+ })
+ },
+ closeImplementDia() {
+ this.auditInspectionDia = false
+ this.searchList()
+ },
+ // 閲嶇疆鏌ヨ鏉′欢
+ resetSearchForm() {
+ this.searchForm.department = '';
+ this.searchList()
+ },
+ // 鍒犻櫎
+ delPlan(row) {
+ this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.tableLoading = true
+ delInternalCheck({ checkId: row.checkId }).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) {
+ exportInternalCheck({ checkId: row.checkId }).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