| | |
| | | <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> |
| | |
| | | |
| | | <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: {}, |
| | |
| | | // tree: true, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | selection: false, |
| | | // viewBtn: true, |
| | | menuWidth: 140, |
| | | menu: true, |
| | | dialogClickModal: false, |
| | | height:'auto', |
| | | calcHeight:170, |
| | | column: [ |
| | | |
| | | { |
| | |
| | | prop: 'processEdition' |
| | | }, |
| | | { |
| | | label: '图号版次', |
| | | label: '图纸版次', |
| | | prop: 'drawingNoEdition' |
| | | }, |
| | | { |
| | |
| | | prop: 'craftEdition' |
| | | }, |
| | | { |
| | | label: '偏离单号', |
| | | label: '临时更改单号', |
| | | prop: 'deviation' |
| | | }, |
| | | { |
| | |
| | | hide: false, |
| | | } |
| | | ], |
| | | selection: [], |
| | | }, |
| | | |
| | | selection: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | selectionChange (list) { |
| | | this.selection = list; |
| | | }, |
| | | |
| | | handleExport(row,index) { |
| | | //审批表下载 |
| | | this.$confirm('是否导出审批表?', '提示', { |
| | |
| | | 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(); |
| | | }); |
| | |
| | | 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] || ''; |
| | | |
| | |
| | | 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); |
| | |
| | | /** * 页面加载时获取数据 |
| | | */ |
| | | onLoad(page, params = {}) { |
| | | console.log('onLoad', page, params); |
| | | //console.log('onLoad', page, params); |
| | | const query = { |
| | | ...this.query, |
| | | // category: params.category ? flowCategory(params.category) : null, |
| | |
| | | } 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; |