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/managementReview/components/reviewReport.vue |  266 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 266 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue b/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue
new file mode 100644
index 0000000..1599da1
--- /dev/null
+++ b/src/views/CNAS/systemManagement/managementReview/components/reviewReport.vue
@@ -0,0 +1,266 @@
+<template>
+  <div>
+    <div class="search-background">
+      <span class="search-group">
+        <span style="width: 160px">鍦扮偣锛�</span>
+        <el-input v-model="searchForm.place" 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>
+    <review-report-dia v-if="reviewReportDia" ref="reviewReportDia" @closeYearDia="closeYearDia"></review-report-dia>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import ReviewReportDia from './reviewReportDia.vue';
+import {
+  getPageReviewReport,
+  deleteReviewReport,
+  exportReviewReport,
+  modifyReviewReport,
+} from '@/api/cnas/systemManagement/managementReview.js'
+import { mapGetters } from "vuex";
+export default {
+  name: 'reviewReport',
+  // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+  components: { ReviewReportDia, limsTable },
+  data() {
+    // 杩欓噷瀛樻斁鏁版嵁
+    return {
+      searchForm: {
+        place: '',
+      },
+      tableColumn: [
+        {
+          label: '鐩殑',
+          prop: 'objective',
+          minWidth: '100'
+        },
+        {
+          label: '鍦扮偣',
+          prop: 'place',
+          minWidth: '100'
+        },
+        {
+          label: '涓绘寔浜�',
+          prop: 'compere',
+          minWidth: '100'
+        },
+        {
+          label: '璁板綍浜�',
+          prop: 'recordPeople',
+          minWidth: '100'
+        },
+        {
+          label: '鏃ユ湡',
+          prop: 'date',
+          minWidth: '100'
+        },
+        {
+          label: '椤垫',
+          prop: 'page',
+          minWidth: '100'
+        },
+        {
+          label: '璇勫鏂瑰紡',
+          prop: 'judgingMethod',
+          minWidth: '100'
+        },
+        {
+          label: '璇勫渚濇嵁',
+          prop: 'reviewBasis',
+          minWidth: '100'
+        },
+        {
+          dataType: 'action',
+          minWidth: '160',
+          label: '鎿嶄綔',
+          operation: [
+            {
+              name: '缂栬緫',
+              type: 'text',
+              clickFun: (row) => {
+                this.openFormDia('edit', row);
+              },
+              disabled: (row) => {
+                return !!row.audit || !!row.approval
+              }
+            },
+            {
+              name: '瀹℃牳',
+              type: 'text',
+              clickFun: (row) => {
+                this.$confirm('纭畾瀹℃牳閫氳繃?', '鎻愮ず', {
+                  confirmButtonText: '纭畾',
+                  cancelButtonText: '鍙栨秷',
+                  type: 'warning'
+                }).then(() => {
+                  this.submit('audit', row)
+                }).catch(() => {
+                });
+              },
+              disabled: (row) => {
+                return !!row.audit
+              }
+            },
+            {
+              name: '鎵瑰噯',
+              type: 'text',
+              clickFun: (row) => {
+                this.$confirm('纭畾鎵瑰噯閫氳繃?', '鎻愮ず', {
+                  confirmButtonText: '纭畾',
+                  cancelButtonText: '鍙栨秷',
+                  type: 'warning'
+                }).then(() => {
+                  this.submit('approval', row)
+                }).catch(() => {
+                });
+              },
+              disabled: (row) => {
+                return !row.audit || !!row.approval
+              }
+            },
+            {
+              name: '鍒犻櫎',
+              type: 'text',
+              color: '#f56c6c',
+              clickFun: (row) => {
+                this.delPlan(row)
+              }
+            },
+            {
+              name: '涓嬭浇',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDown(row)
+              }
+            },
+          ]
+        }
+      ],
+      tableData: [],
+      tableLoading: false,
+      page: {
+        size: 20,
+        current: 1,
+        total: 0,
+      },
+      reviewReportDia: false,
+    };
+  },
+  computed: {
+    ...mapGetters(['nickName'])
+  },
+  mounted() {
+    this.searchList()
+  },
+  // 鏂规硶闆嗗悎
+  methods: {
+    // 鏌ヨ鍒楄〃
+    searchList() {
+      this.tableLoading = true
+      getPageReviewReport({ place: this.searchForm.place, pages: this.page.current, size: this.page.size }).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.reviewReportDia = true
+      this.$nextTick(() => {
+        this.$refs.reviewReportDia.openDia(type, row)
+      })
+    },
+    closeYearDia() {
+      this.reviewReportDia = false
+      this.searchList()
+    },
+    // 閲嶇疆鏌ヨ鏉′欢
+    resetSearchForm() {
+      this.searchForm.place = '';
+      this.searchList()
+    },
+    // 鍒犻櫎
+    delPlan(row) {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        this.tableLoading = true
+        deleteReviewReport({ id: row.id }).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: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.searchList();
+    },
+    handleDown(row) {
+      exportReviewReport({ id: row.id }).then(res => {
+        if (res.code == 201) {
+          this.$message.error(res.message)
+          return
+        }
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '璇勫鎶ュ憡.docx');
+      })
+    },
+    submit(type, row) {
+      let obj = row
+      obj[type] = this.nickNamee;
+      modifyReviewReport(obj).then(res => {
+        if (res.code === 201) return
+        this.$message.success('鎿嶄綔鎴愬姛')
+        this.searchList()
+      }).catch(err => {
+        console.log('err---', err);
+      })
+    }
+  }
+};
+</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