| | |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleEdit">导出</el-button> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">导出</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { exportBlob } from '@/api/common'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import NProgress from 'nprogress'; |
| | | import { downloadXls } from '@/utils/util'; |
| | | import 'nprogress/nprogress.css'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | this.onLoad(params); |
| | | done(); |
| | | }, |
| | | handleEdit(row,index) { |
| | | |
| | | handleExport() { |
| | | this.$confirm('是否导出?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | NProgress.start(); |
| | | exportBlob( |
| | | `/blade-mdm/flow/mgr/overtime-export?${this.website.tokenHeader}=${getToken()}` |
| | | ).then(res => { |
| | | downloadXls(res.data, `超时导出${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`); |
| | | NProgress.done(); |
| | | }); |
| | | }); |
| | | }, |
| | | searchReset() { |
| | | //this.onLoad(this.mypage); |
| | |
| | | this.searchForm.createTimeBegin = this.searchForm.daterange[0]; |
| | | this.searchForm.createTimeEnd = this.searchForm.daterange[1]; |
| | | } |
| | | console.log(this.searchForm,111) |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/flow/mgr/overtime-list', |