[update] 修改bug83160

This commit is contained in:
lideqin
2024-03-28 18:01:08 +08:00
parent f6e5358d3f
commit 717c292b5c
@@ -116,7 +116,7 @@
<a-button type="danger" icon="delete" @click="batchDel" v-has="'safeguardStardsMember:batchDel'">批量删除</a-button>
<a-button type="primary" icon="copy" @click="handleMemberBatchCopy" v-has="'safeguardStardsMember:batchCopy'">批量复制</a-button>
<a-button type="primary" icon="download" @click="downTemplate('标协会员成员导入模板')" v-has="'safeguardStardsMember:downloadTemplate'">下载模板</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" :data="importData"
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" :data="importData" :beforeUpload="beforeUpload"
@change="handleImportExcel" v-has="'safeguardStardsMember:import'">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
@@ -442,6 +442,18 @@ export default {
// 编辑会员权益
handleMemberEquity (record) {
this.$refs.memberEquityModal.edit(record)
},
beforeUpload(file) {
this.uploadGoOn = true
file.uploadGoOn = true
const fileSize = file.size // 上传的文件大小
if (fileSize > 1024 * 1024 * 100) {
this.$message.warning('文件大小限制为100M')
this.uploadGoOn = false
file.uploadGoOn = false
return false
}
return true
}
}
}