From 0d11525aa58ec5e35ea22ff4b0d6d5863d73649b Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 04 三月 2025 16:43:52 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before-ruoyi
---
src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue | 196 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 196 insertions(+), 0 deletions(-)
diff --git a/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
new file mode 100644
index 0000000..4c0e60b
--- /dev/null
+++ b/src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
@@ -0,0 +1,196 @@
+<template>
+ <div>
+ <div>
+ <div class="search-background">
+ <span class="search-group">
+ <span style="width: 120px">鍙戠敓閮ㄩ棬锛�</span>
+ <el-input v-model="searchForm.occurrenceDepartment" clearable size="small"></el-input>
+ </span>
+ <span class="search-group">
+ <el-button size="medium" @click="resetSearchForm">閲� 缃�</el-button>
+ <el-button size="medium" 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 - 19em)'" :table-data="tableData"
+ :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page"
+ @pagination="pagination">
+ </limsTable>
+ </template>
+ </TableCard>
+ </div>
+ </div>
+ </div>
+ <quality-info v-if="qualityInfo" ref="qualityInfo"></quality-info>
+ </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import TableCard from '@/components/TableCard/index.vue';
+import QualityInfo from './components/qualityInfo.vue';
+import {
+ pageSuperviseDetailAccording,
+ superviseDetailAccordingExport
+} from '@/api/cnas/process/nonconformingWork.js'
+
+export default {
+ name: 'a7-nonconforming-item',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { QualityInfo, TableCard, limsTable },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ searchForm: {
+ occurrenceDepartment: '',
+ },
+ tableColumn: [
+ {
+ label: '鍙戠敓閮ㄩ棬',
+ prop: 'occurrenceDepartment',
+ minWidth: '100'
+ },
+ {
+ label: '閮ㄩ棬璐熻矗浜�',
+ prop: 'headDepartment',
+ minWidth: '100'
+ },
+ {
+ label: '鍙戠幇閫斿緞',
+ prop: 'findWay',
+ minWidth: '100'
+ },
+ {
+ label: '璇︾粏璁板綍',
+ prop: 'recordDetail',
+ minWidth: '100'
+ },
+ {
+ label: '渚濇嵁鍜屾潯娆惧彿',
+ prop: 'recordAccording',
+ minWidth: '100'
+ },
+ {
+ label: '鍙戠幇閮ㄩ棬',
+ prop: 'foundDepartment',
+ minWidth: '100'
+ },
+ {
+ label: '琚洃鐫d汉',
+ prop: 'supervisedUserName',
+ minWidth: '100'
+ },
+ {
+ dataType: 'action',
+ minWidth: '60',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.viewInfo(row);
+ },
+ },
+ {
+ name: '瀵煎嚭',
+ type: 'text',
+ clickFun: (row) => {
+ this.openDownloadDia(row);
+ },
+ },
+ ]
+ }
+ ],
+ tableData: [],
+ tableLoading: false,
+ page: {
+ size: 20,
+ current: 1,
+ total: 0,
+ },
+ qualityInfo: false,
+ };
+ },
+ mounted() {
+ this.searchList()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鏌ヨ鍒楄〃
+ searchList() {
+ const entity = {
+ occurrenceDepartment: this.searchForm.occurrenceDepartment,
+ }
+ const page = this.page
+ this.tableLoading = true
+ pageSuperviseDetailAccording({ ...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.occurrenceDepartment = '';
+ this.searchList()
+ },
+ viewInfo(row) {
+ this.qualityInfo = true
+ this.$nextTick(() => {
+ this.$refs.qualityInfo.openDia(row)
+ })
+ },
+ // 瀵煎嚭
+ openDownloadDia(row) {
+ superviseDetailAccordingExport({ superviseDetailsId: row.superviseDetailsId }).then(res => {
+ const blob = new Blob([res], { type: 'application/msword' });
+ this.$download.saveAs(blob, '涓嶇鍚堥」瀵煎嚭' + '.docx');
+ }).catch(err => {
+ console.log('err---', err);
+ })
+ },
+ // 鍒嗛〉
+ 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