diff --git a/client/dist/index.html b/client/dist/index.html
index 9772179..3c4dacb 100644
--- a/client/dist/index.html
+++ b/client/dist/index.html
@@ -1 +1 @@
-
标签并设置href属性为Blob URL
+ const link = document.createElement('a');
+ link.href = blobUrl;
+ link.target = '_blank';
+ link.download = `${name}.xlsx`;
+ // 触发点击操作,开始下载文件
+ link.click();
+ // 释放Blob URL
+ URL.revokeObjectURL(blobUrl);
+};
\ No newline at end of file
diff --git a/client/src/views/login/index.vue b/client/src/views/login/index.vue
index af952a6..571de2b 100644
--- a/client/src/views/login/index.vue
+++ b/client/src/views/login/index.vue
@@ -229,7 +229,7 @@ export default {
getTimer() {
const TIME_COUNT = 60;
if (!this.timer) {
- this.count = TIME_COUNT;
+ this.count = COUNT;
this.disabled = true;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
diff --git a/client/src/views/system/user.vue b/client/src/views/system/user.vue
index b0cbab5..72e6c12 100644
--- a/client/src/views/system/user.vue
+++ b/client/src/views/system/user.vue
@@ -68,16 +68,22 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
- >搜索
+ >搜索
重置
+ >重置
+ 导出
{});
});
},
+ //导出
+ exportExcel(){
+ let that = this;
+ this.listLoading = true;
+ //获取全部人员数据
+ let promises = [1,2, 3, 4].map(function (page) {
+ return getUserList({page:page,page_size:500}).then((res)=>{return res.data.results})
+ });
+ Promise.all(promises).then(function (posts) {
+ let data = JSON.parse(JSON.stringify(posts))
+ let list = [...data[0], ...data[1],...data[2], ...data[3]];
+ let exportData = [];
+ for(let i=0;i{
+ return item.name;
+ })
+ obj.roles=roles.toString();
+ exportData.push(obj)
+ }
+ generateExcel(that.columns,exportData,'账号清单');
+ that.listLoading = false;
+ }).catch(function(reason){
+ console.log('出错了',reason)
+ that.listLoading = false;
+ });
+ },
},
};