yangys
2025-09-22 b311b3cfee0a4635c236eea6c5870d805a29a160
src/views/statreport/machinefileexception.vue
@@ -3,7 +3,6 @@
 * @Date: 2025-06-18 09:17:09
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-08-13 21:23:34
 * @FilePath: /mdmweb/src/views/tasks/machinereturnfileop.vue
-->
<template>
    <basic-container>
@@ -13,11 +12,6 @@
            <template #menu-left>
                
                <el-button type="primary" plain @click="exportExcel">导出到EXCEL</el-button>
            </template>
            <template #menu="scope">
                <el-button type="primary" text size="default"
                    @click.stop="handleAction(scope.row, scope.index)">审批
                </el-button>
            </template>
        </avue-crud>
    </basic-container>
@@ -70,7 +64,8 @@
                    },
                    {
                        label: '异常信息',
                        prop: 'exceptionType',
                        prop: 'exceptionMsg',
                        /*
                        render: ({row}) => {
                            
                            var txt = '未知';
@@ -91,7 +86,7 @@
                                    txt = '未知';
                            }
                            return txt;
                        }
                        }*/
                    },
                    {
                        label: '时间', //文件到达时间
@@ -114,10 +109,11 @@
        },
        
        exportExcel() {
            /*
            if (this.selectedList.length === 0) {
                this.$message.warning('请先选择需要导出的数据');
                return;
            }
            }*/
            this.$confirm('是否导出?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
@@ -125,9 +121,13 @@
            }).then(() => {
                NProgress.start();
                exportBlob(
                    `/blade-mdm/machinefile/filehandle/export-excel?${this.website.tokenHeader}=${getToken()}`
                    `/blade-mdm/statreport/exceptionfile/export-excel?${this.website.tokenHeader}=${getToken()}`
                ).then(res => {
                    downloadXls(res.data, `机床回传程序列表${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
                    let name = res.headers['content-disposition'].split('filename=')[1]
               name = decodeURI(name)
                  //console.log(res.headers['content-disposition'].split('filename=')[1]);
               downloadXls(res.data, `${name}`);
                    //downloadXls(res.data, `机床回传程序列表${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
                    NProgress.done();
                });
            });