Commit a78ca7bf authored by 罗林杰's avatar 罗林杰

导出为空报错修改

parent 0f96b135
...@@ -812,6 +812,17 @@ export default { ...@@ -812,6 +812,17 @@ export default {
handleExport() { handleExport() {
// 获取选中的用户 ID // 获取选中的用户 ID
const userIds = this.ids; const userIds = this.ids;
if (userIds.length === 0) {
// 如果没有选中的数据,显示提示信息
this.$message({
message: '请至少选择一条数据进行导出。',
type: 'warning'
});
return;
}
// 如果有选中的数据,则继续导出操作
this.download('system/user/export', userIds, `user_${new Date().getTime()}.xlsx`); this.download('system/user/export', userIds, `user_${new Date().getTime()}.xlsx`);
}, },
/** 导入按钮操作 */ /** 导入按钮操作 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment