console
<div id="app">
<h3>资产管理二维码生成</h3>
<div class="opear" v-cloak>
<el-button type="primary" class="upload-btn">上传xlsx文件
<input type="file" class="upload-xlsx" @change="uploadFile" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
</el-button>
<el-button type="primary" @click="synthesisQrcode">批量合成二维码</el-button>
<el-button type="primary" @click="downloadQrBatch">批量下载二维码</el-button>
<el-button type="primary" @click="downloadSynthesisBatch">批量下载合成二维码</el-button>
<el-button type="primary" @click="clearData">清空数据</el-button>
</div>
<div class="table-box">
<template>
<el-table
:data="qrcodes"
border
style="width: 100%">
<el-table-column
v-for="(head,index) in tabHeads"
:key="index"
:prop="head.prop"
:label="head.label"
width="180">
<template slot-scope="scope">
<span>{{scope.row[head.prop]}}</span>
</template>
</el-table-column>
<el-table-column
prop="qrcode"
label="二维码">
<template slot-scope="scope">
<img :src="scope.row.qrcode">
</template>
</el-table-column>
<el-table-column
prop="synthesis"
label="合成二维码">
<template slot-scope="scope">
<img v-if="scope.row.synthesis" :src="scope.row.synthesis">
</template>
</el-table-column>
<el-table-column
label="下载">
<template slot-scope="scope">
<el-button type="primary" @click="downloadQr(scope.row)">二维码</el-button>
<el-button type="primary" @click="downloadSynthesis(scope.row)">合成二维码</el-button>
</template>
</el-table-column>
</el-table>
</template>
</div>
</div>