| | |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @selection-change="selectionChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">导出</el-button> |
| | | <!-- el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">导出</el-button> --> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">批量接收</el-button> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-button type="primary" text size="default" icon="el-icon-document-delete" @click.stop="rejectBtn(scope.row, scope.index)">拒绝</el-button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { exportBlob } from '@/api/common'; |
| | | import { downloadXls } from '@/utils/util'; |
| | | import { getToken } from '@/utils/auth'; |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | selection: [], |
| | | search: { |
| | | keyword: "", |
| | | machineGroupCode: "" |
| | |
| | | }, |
| | | option: { |
| | | index: true, |
| | | selection: true, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | |
| | | prop: 'programName', |
| | | hide: true |
| | | }, |
| | | { |
| | | label: '文件编号', |
| | | prop: '' |
| | | { |
| | | label: '文件名称', |
| | | prop: 'name', |
| | | }, |
| | | { |
| | | label: '机床号', |
| | | prop: 'machineCode', |
| | | }, |
| | | { |
| | | label: '文件名称', |
| | | prop: 'name', |
| | | }, |
| | | |
| | | { |
| | | label: '文件固化状态', |
| | | prop: 'isCured', |
| | |
| | | { |
| | | label: '文件到达时间', |
| | | prop: 'arrivedTime', |
| | | }, |
| | | },/* |
| | | { |
| | | label: '文件数据库编号', |
| | | prop: '', |
| | | }, |
| | | },*/ |
| | | { |
| | | label: '关键信息', |
| | | prop: 'keyword', |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | selectionChange(selection) { |
| | | this.selection = selection; |
| | | }, |
| | | receiveBtn() { |
| | | if(this.selection.length == 0) { |
| | | ElMessage({message: '请选择数据',type: 'error'}) |
| | | } |
| | | var ids = []; |
| | | this.selection.forEach(item=> { |
| | | ids.push(item.id); |
| | | }) |
| | | this.$confirm('确定要接收吗?', { //同接收接口相同 |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | //调用接口 |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/machineback/file/accept', |
| | | method: 'post', |
| | | params: {ids: ids.join(',')}, |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.onLoad(); |
| | | } |
| | | ); |
| | | }) |
| | | }, |
| | | acceptBtn(row) { |
| | | this.$confirm('确定要接收吗?', { |
| | | confirmButtonText: '是', |