yangys
2025-11-27 f97351a6f1fdc679f4956030d179dca843bbeb0c
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;