|
@@ -10,7 +10,7 @@
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleQuery">查找</el-button>
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleQuery">查找</el-button>
|
|
|
<el-button class="filter-item" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
<el-button class="filter-item" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-plus">添加</el-button>
|
|
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-plus">添加</el-button>
|
|
|
- <el-button class="filter-item" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
|
|
|
|
|
|
|
+ <el-button class="filter-item" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 查询结果 -->
|
|
<!-- 查询结果 -->
|
|
@@ -424,13 +424,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
handleDownload() {
|
|
handleDownload() {
|
|
|
- this.downloadLoading = true
|
|
|
|
|
- import('@/vendor/Export2Excel').then(excel => {
|
|
|
|
|
- const tHeader = ['用户ID', '用户名称','用户昵称', '用户头像']
|
|
|
|
|
- const filterVal = ['id', 'username', 'nickname', 'avatar']
|
|
|
|
|
- excel.export_json_to_excel2(tHeader, this.list, filterVal, '用户信息')
|
|
|
|
|
- this.downloadLoading = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ window.location.href = process.env.BASE_API + '/admin/export';
|
|
|
},
|
|
},
|
|
|
getRoleList() {
|
|
getRoleList() {
|
|
|
roleList({ page: 1, limit: 100 })
|
|
roleList({ page: 1, limit: 100 })
|