From 1be3383c74a57bdbdbad8f19a888cb212cbb7027 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:06 +0800
Subject: [PATCH] 完成不符合项迁移
---
src/components/view/a7-nonconforming-item.vue | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/components/do/a7-nonconforming-item/qualityInfo.vue | 2
2 files changed, 219 insertions(+), 1 deletions(-)
diff --git a/src/components/do/a7-nonconforming-item/qualityInfo.vue b/src/components/do/a7-nonconforming-item/qualityInfo.vue
index d1e2453..bb334b7 100644
--- a/src/components/do/a7-nonconforming-item/qualityInfo.vue
+++ b/src/components/do/a7-nonconforming-item/qualityInfo.vue
@@ -4,7 +4,7 @@
:visible.sync="formDia"
title="涓嶇鍚堝伐浣滄帶鍒跺崟"
width="80%" @close="closeProcessingDia">
- <div style="height: 660px; overflow-y: auto">
+ <div style="height: 85vh; overflow-y: auto">
<table border="1" cellspacing="10" class="tables">
<tr>
<td class="first-title" rowspan="8">
diff --git a/src/components/view/a7-nonconforming-item.vue b/src/components/view/a7-nonconforming-item.vue
new file mode 100644
index 0000000..d79e0e6
--- /dev/null
+++ b/src/components/view/a7-nonconforming-item.vue
@@ -0,0 +1,218 @@
+<template>
+ <div>
+ <div>
+ <div class="view-title">
+ <span>涓嶇鍚堥」</span>
+ </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>
+ <ZTTable
+ :column="tableColumn"
+ :height="'calc(100vh - 23em)'"
+ :table-data="tableData"
+ :table-loading="tableLoading"
+ style="padding: 0 15px;margin-bottom: 16px">
+ </ZTTable>
+ </template>
+ </TableCard>
+ <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]"
+ :total="total" layout="->,total, sizes, prev, pager, next, jumper"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange">
+ </el-pagination>
+ </div>
+ </div>
+ </div>
+ <quality-info v-if="qualityInfo" ref="qualityInfo"></quality-info>
+ </div>
+</template>
+
+<script>
+import ZTTable from '../caorui/ZTTable/index.vue';
+import TableCard from '../caorui/TableCard/index.vue';
+import QualityInfo from '../do/a7-nonconforming-item/qualityInfo.vue';
+
+export default {
+ name: 'a7-nonconforming-item',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { QualityInfo, TableCard, ZTTable },
+ 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
+ this.$axios.post(this.$api.qualitySupervise.pageSuperviseDetailAccording, { entity, page }, {
+ headers: {
+ "Content-Type": "application/json"
+ },
+ noQs: true
+ }).then(res => {
+ this.tableLoading = false
+ if (res.code === 201) return
+ this.tableData = res.data.records
+ this.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) {
+ this.$axios.get( this.$api.qualitySupervise.superviseDetailAccordingExport+ '?superviseDetailsId=' + row.superviseDetailsId,{responseType: "blob"}).then(res => {
+ this.$message.success('瀵煎嚭鎴愬姛')
+ const blob = new Blob([res],{ type: 'application/msword' });
+ const url = URL.createObjectURL(blob);
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = '涓嶇鍚堥」瀵煎嚭' + '.docx';
+ link.click();
+ }).catch(err => {
+ console.log('err---', err);
+ })
+ },
+ // 鍒嗛〉
+ handleSizeChange(val) {
+ this.page.size = val;
+ this.searchList();
+ },
+ handleCurrentChange(val) {
+ this.page.current = val;
+ 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 {
+ margin-top: 20px;
+ background-color: #ffffff;
+ padding-top: 20px;
+}
+</style>
--
Gitblit v1.9.3