From f97351a6f1fdc679f4956030d179dca843bbeb0c Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 27 十一月 2025 14:09:04 +0800
Subject: [PATCH] 审批界面增加pdf,图片预览功能

---
 src/views/statreport/approveTablePrint.vue |   43 +++++++++++++++++++------------------------
 1 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/src/views/statreport/approveTablePrint.vue b/src/views/statreport/approveTablePrint.vue
index 634ba29..f6fa2c5 100644
--- a/src/views/statreport/approveTablePrint.vue
+++ b/src/views/statreport/approveTablePrint.vue
@@ -8,7 +8,7 @@
     <basic-container>
         <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
             @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
-            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
+            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
             <template #menu-left>
                <!--
                 <el-button type="primary" :disabled="this.selection.length==0" plain @click="handleDelBatch">鎵归噺鍒犻櫎</el-button>
@@ -27,19 +27,18 @@
 
 <script>
 import { getDispatchTaskList } from '@/api/statreport/approvetable.js';
-import { exportBlob } from '@/api/common';
 import { exportBlobPost } from '@/api/common';
 import { downloadFile } from '@/utils/util';
 import { getToken } from '@/utils/auth';
 import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 export default {
-    name: 'MachineReturnFileOp',
+    name: 'approveTablePrint',
     data() {
         return {
             page: {
-                size: 10,
-                current: 1,
+                pageSize: 10,//
+                currentPage: 1,
                 total: 0,
             },
             form: {},
@@ -59,11 +58,13 @@
                 // tree: true,
                 border: true,
                 index: true,
-                selection: true,
+                selection: false,
                 // viewBtn: true,
                 menuWidth: 140,
                 menu: true,
                 dialogClickModal: false,
+                height:'auto',
+                calcHeight:170,
                 column: [
                     
 					{
@@ -81,7 +82,7 @@
                         prop: 'processEdition'
                     },
                     {
-                        label: '鍥惧彿鐗堟',
+                        label: '鍥剧焊鐗堟',
                         prop: 'drawingNoEdition'
                     },
                     {
@@ -99,7 +100,7 @@
                         prop: 'craftEdition'
                     },
                     {
-                        label: '鍋忕鍗曞彿',
+                        label: '涓存椂鏇存敼鍗曞彿',
                         prop: 'deviation'
                     },
 					{
@@ -116,17 +117,12 @@
                         hide: false,
                     }
                 ],
-                selection: [],
             },
 
             selection: [],
         }
     },
     methods: {
-        selectionChange (list) {
-            this.selection = list;
-        },
-        
         handleExport(row,index) {
             //瀹℃壒琛ㄤ笅杞�
             this.$confirm('鏄惁瀵煎嚭瀹℃壒琛�?', '鎻愮ず', {
@@ -142,7 +138,7 @@
                     let name = res.headers['content-disposition'].split('filename=')[1]
                     //console.log(res.headers['content-disposition'].split('filename=')[1]);
                     name = decodeURI(name)
-                    console.log(name)
+                    //console.log(name)
                     downloadFile(res.data, `${name}`);
                     NProgress.done();
                 });
@@ -152,8 +148,8 @@
         searchChange(params, done) {
             let data = {}
             this.query = params;
-            this.page.currentPage = 1;
-            console.log('searchChange', params);
+            this.page.current = 1;
+            //console.log('searchChange', params);
             params.createTimeBegin = params?.createTime?.[0] || '';
             params.createTimeEnd = params?.createTime?.[1] || '';
             
@@ -178,12 +174,11 @@
             this.onLoad(this.page, data);
             done();
         },
-        currentChange(currentPage) {
-            this.page.currentPage = currentPage;
-            // this.onLoad();
+        currentChange(current) {
+            this.page.currentPage = current;
         },
-        sizeChange(pageSize) {
-            this.page.pageSize = pageSize;
+        sizeChange(size) {
+            this.page.pageSize = size;
         },
         refreshChange() {
             this.onLoad(this.page, this.query);
@@ -191,7 +186,7 @@
         /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
          */
         onLoad(page, params = {}) {
-            console.log('onLoad', page, params);
+            //console.log('onLoad', page, params);
             const query = {
                 ...this.query,
                 // category: params.category ? flowCategory(params.category) : null,
@@ -202,9 +197,9 @@
             } catch (error) {
                 console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
             }
-
+            //alert(page.size)
             this.loading = true;
-            getDispatchTaskList(page.current, page.size, Object.assign(query, params)).then(res => {
+            getDispatchTaskList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
                 const data = res.data.data;
                 this.page.total = data.total;
                 this.data = data.records;

--
Gitblit v1.9.3