| | |
| | | <!--文仓管理页面--> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="logCrud" |
| | | ref="crud" |
| | | v-model="form" |
| | | :data="tableData" |
| | | :option="option" |
| | |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @row-del="rowDeleteHandler" |
| | | @row-click="rowClickHandler" |
| | | @selection-change="selectionChange" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出</el-button> |
| | |
| | | leftRoleData: [], // 分配成员穿梭框左侧初始数据 |
| | | rightRoleData: [], // 分配成员穿梭框右侧初始数据 |
| | | transferTitle: ['文件柜外成员', '文件柜内成员'], |
| | | selectionList: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | // 导出 |
| | | exportClickHandler() { |
| | | if(this.ids == null || this.ids == ""){ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请勾选要导出的数据!' |
| | | }); |
| | | return; |
| | | } |
| | | const loading = this.$loading({}); |
| | | exportPvolumes().then(res => { |
| | | exportPvolumes({"pvolumeIds": this.ids}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.createdLoading = false |
| | | this.$message.success('导出成功'); |
| | |
| | | this.getTableList(); |
| | | }) |
| | | }, |
| | | //选择的行 |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | |
| | | // 行单选 |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectionList = []; } |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | | </script> |