| | |
| | | |
| | | <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> |
| | | </template> |
| | |
| | | }, |
| | | { |
| | | label: '异常信息', |
| | | prop: 'exceptionType', |
| | | prop: 'exceptionMsg', |
| | | /* |
| | | render: ({row}) => { |
| | | |
| | | var txt = '未知'; |
| | |
| | | txt = '未知'; |
| | | } |
| | | return txt; |
| | | } |
| | | }*/ |
| | | }, |
| | | { |
| | | label: '时间', //文件到达时间 |
| | |
| | | }, |
| | | |
| | | exportExcel() { |
| | | /* |
| | | if (this.selectedList.length === 0) { |
| | | this.$message.warning('请先选择需要导出的数据'); |
| | | return; |
| | | } |
| | | }*/ |
| | | this.$confirm('是否导出?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | }).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(); |
| | | }); |
| | | }); |