| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | @selection-change="selectionChange" |
| | | > |
| | | <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="handleEdit">入库</el-button> |
| | | <div style="display: flex;"> |
| | | <el-upload action="/blade-mdm/program/dncsendback/upload"> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus">导入</el-button> |
| | | </el-upload> |
| | | <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleWarehouse" style="margin-left: 12px;">入库</el-button> |
| | | </div> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | selection: [], |
| | | search: {}, |
| | | loading: true, |
| | | mypage: { |
| | |
| | | labelWidth: 120, |
| | | emptyBtn: false, |
| | | searchSpan: 8, |
| | | selection: true, |
| | | menu: false, |
| | | selection: true, |
| | | column: [ |
| | | { |
| | | label: '文件路径', |
| | |
| | | }, |
| | | { |
| | | label: '任务编号', |
| | | prop: '' |
| | | prop: 'programNo' |
| | | }, |
| | | { |
| | | label: '程序名称', |
| | | prop: '', |
| | | prop: 'programName', |
| | | }, |
| | | { |
| | | label: '文件到达时间', |
| | | prop: '', |
| | | prop: 'fileBackTime', |
| | | }, |
| | | { |
| | | label: '文件数据库编号', |
| | |
| | | }, |
| | | { |
| | | label: 'MD5值', |
| | | prop: '' |
| | | prop: 'md5 ' |
| | | } |
| | | ], |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleEdit(row,index) { |
| | | |
| | | selectionChange(selection) { |
| | | this.selection = selection; |
| | | }, |
| | | handleWarehouse(row,index) { |
| | | if(this.selection.length == 0) { |
| | | this.$message.error("请选择数据") |
| | | }else { |
| | | var selection = []; |
| | | this.selection.forEach(item=> { |
| | | selection.push(item.id); |
| | | }) |
| | | this.loading = true; |
| | | var obj = { |
| | | ids: selection.join(","), |
| | | } |
| | | axios({ |
| | | url: '/blade-mdm/program/dncsendback/accept', |
| | | method: 'get', |
| | | params: obj, |
| | | }).then( |
| | | res => { |
| | | this.$message.success("操作成功"); |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | searchReset() { |
| | | //this.onLoad(this.mypage); |
| | |
| | | size: this.mypage.size, |
| | | } |
| | | axios({ |
| | | url: '/program/dncsendback/page', |
| | | url: '/blade-mdm/program/dncsendback/page', |
| | | method: 'get', |
| | | params: obj, |
| | | }).then( |
| | |
| | | |
| | | } |
| | | ); |
| | | |
| | | } |
| | | }, |
| | | }; |