混料统计导出

This commit is contained in:
shijing 2024-03-19 17:32:52 +08:00
parent b7cb025304
commit c0def9482e
1 changed files with 21 additions and 5 deletions

View File

@ -25,8 +25,9 @@
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never">
<el-table :data="tableData7">
<el-card shadow="never" style="position: relative;">
<el-button @click="handleExport('1')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData7" id="exportDiv1">
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名">
</el-table-column>
@ -56,8 +57,9 @@
</el-card>
</el-col>
<el-col :lg="12">
<el-card shadow="never">
<el-table :data="tableData10">
<el-card shadow="never" style="position: relative;">
<el-button @click="handleExport('2')" class="tables" type="primary">导出</el-button>
<el-table :data="tableData10" id="exportDiv2">
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="物料名">
</el-table-column>
@ -321,8 +323,22 @@ export default {
this.getData7();
this.getData10();
},
handleExport(val) {
this.exportLoading = true;
let id = '#exportDiv' + val;
let name = val == '1' ? '混料统计' : '混料消耗统计';
this.$XLSX(id, name);
this.exportLoading = false;
},
},
}
</script>
<style></style>
<style scoped>
.tables{
position: absolute;
top:6px;
right: 8px;
z-index: 10;
}
</style>