| | |
| | | <!-- |
| | | * @Date: 2025-06-20 20:48:17 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-07-07 22:27:50 |
| | | * @LastEditTime: 2025-07-07 22:51:10 |
| | | * @FilePath: /mdmweb/src/views/flowmgr/programexport.vue |
| | | --> |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset"> |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"> |
| | | <template #menu-left> |
| | | <!-- <el-button type="primary" plain @click="exportWebSite">导出回传涉密网</el-button> --> |
| | | <!-- <el-button type="primary" plain @click="reassign">挂载车床程序库</el-button> --> |
| | | <el-button type="primary" plain @click="exportExcel">导出到EXCEL</el-button> |
| | | <el-button type="primary" plain @click="exportExcel">导出</el-button> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <!-- <el-button type="primary" text size="default" |
| | |
| | | <script> |
| | | import { getList } from '@/api/flowmgr/programexport.js'; |
| | | import NProgress from 'nprogress'; |
| | | import { exportBlob } from '@/api/common'; |
| | | import { exportBlobPost } from '@/api/common'; |
| | | import { getToken } from '@/utils/auth'; |
| | | export default { |
| | | name: 'programexport', |
| | |
| | | query: {}, |
| | | loading: true, |
| | | data: [], |
| | | selection: [], |
| | | option: { |
| | | addBtn: false, |
| | | editBtn: false, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | selectionChange(list) { |
| | | this.selection = list; |
| | | }, |
| | | // Define your methods here |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | console.log(this.selection) |
| | | NProgress.start(); |
| | | exportBlob( |
| | | `/blade-mdm/program/exchange/export-dnc?${this.website.tokenHeader}=${getToken()}` |
| | | exportBlobPost( |
| | | `/blade-mdm/program/exchange/export-dnc`, |
| | | {}, |
| | | {ids: this.selection.map(item => item.id)}, |
| | | ).then(res => { |
| | | downloadXls(res.data, `导出机床回传程序${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`); |
| | | NProgress.done(); |