1、导出钱包白名单
This commit is contained in:
		| @ -51,3 +51,13 @@ export function batchInsertMmWalletWhiteList(data) { | ||||
|     data: data, | ||||
|   }); | ||||
| } | ||||
|  | ||||
| // 导出MmWalletWhiteList | ||||
| export function exportMmWalletWhiteList(query) { | ||||
|   return request({ | ||||
|     url: "/api/v1/mm-wallet-white-list/export", | ||||
|     method: "get", | ||||
|     params: query, | ||||
|     responseType: "blob", | ||||
|   }); | ||||
| } | ||||
| @ -105,7 +105,7 @@ export default { | ||||
|  | ||||
|       needGoolAuth() | ||||
|         .then(response => { | ||||
|           console.log("needGoogleAuth", response) | ||||
|            | ||||
|           if (response.code === 200) { | ||||
|             if (response.data.needGooglAuth) { | ||||
|               this.needGoolAuthData.otpAuthUrl = response.data.otpAuthUrl | ||||
|  | ||||
| @ -48,7 +48,6 @@ service.interceptors.response.use( | ||||
|       return response.data | ||||
|     } | ||||
|     const code = response.data.code | ||||
|     console.log("xx",code) | ||||
|  | ||||
|     if (code === 401) { | ||||
|       store.dispatch('user/resetToken') | ||||
|  | ||||
| @ -8,8 +8,8 @@ | ||||
|                     </el-form-item> | ||||
|                     <el-form-item label="是否启用" prop="status"> | ||||
|                         <el-select v-model="queryParams.status" placeholder="请选择" clearable> | ||||
|                             <el-option v-for="dict in statusOptions" :key="'query_status'+dict.value" :label="dict.label" | ||||
|                                 :value="dict.value" /> | ||||
|                             <el-option v-for="dict in statusOptions" :key="'query_status' + dict.value" | ||||
|                                 :label="dict.label" :value="dict.value" /> | ||||
|                         </el-select> | ||||
|                     </el-form-item> | ||||
|  | ||||
| @ -26,8 +26,8 @@ | ||||
|                         </el-button> | ||||
|                     </el-col> | ||||
|                     <el-col :span="1.5"> | ||||
|                         <el-button v-permisaction="['admin:mmWalletWhiteList:add']" type="primary" | ||||
|                             icon="el-icon-plus" size="mini" @click="handleBatchAdd">批量新增 | ||||
|                         <el-button v-permisaction="['admin:mmWalletWhiteList:add']" type="primary" icon="el-icon-plus" | ||||
|                             size="mini" @click="handleBatchAdd">批量新增 | ||||
|                         </el-button> | ||||
|                     </el-col> | ||||
|                     <el-col :span="1.5"> | ||||
| @ -40,6 +40,15 @@ | ||||
|                             icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除 | ||||
|                         </el-button> | ||||
|                     </el-col> | ||||
|  | ||||
|                     <el-col :span="1.5"> | ||||
|                         <el-popconfirm class="delete-popconfirm" title="确定要导出记录吗?" confirm-button-text="确定" | ||||
|                             @confirm="handleExport"> | ||||
|                             <el-button slot="reference" v-permisaction="['admin:mmWalletWhiteList:export']" | ||||
|                                 icon="el-icon-files" :loading="loading" size="mini">导出 | ||||
|                             </el-button> | ||||
|                         </el-popconfirm> | ||||
|                     </el-col> | ||||
|                 </el-row> | ||||
|  | ||||
|                 <el-table v-loading="loading" :data="mmWalletWhiteListList" @selection-change="handleSelectionChange"> | ||||
| @ -47,7 +56,8 @@ | ||||
|                     <el-table-column label="钱包地址" align="center" prop="address" :show-overflow-tooltip="true" /> | ||||
|                     <el-table-column label="是否启用" align="center" prop="status" :show-overflow-tooltip="true"> | ||||
|                         <template slot-scope="scope"> | ||||
|                             <el-tag :type="scope.row.status===1?'success':'danger'">{{ statusFormat(scope.row.status) }}</el-tag> | ||||
|                             <el-tag :type="scope.row.status === 1 ? 'success' : 'danger'">{{ statusFormat(scope.row.status) | ||||
|                                 }}</el-tag> | ||||
|                         </template> | ||||
|                     </el-table-column> | ||||
|                     <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
| @ -98,8 +108,9 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { addMmWalletWhiteList, delMmWalletWhiteList, getMmWalletWhiteList, listMmWalletWhiteList, updateMmWalletWhiteList } from '@/api/admin/mm-wallet-white-list' | ||||
| import { addMmWalletWhiteList, delMmWalletWhiteList, getMmWalletWhiteList, listMmWalletWhiteList, updateMmWalletWhiteList, exportMmWalletWhiteList } from '@/api/admin/mm-wallet-white-list' | ||||
| import BatchAdd from './batch-add.vue' | ||||
| import { resolveBlob } from '@/utils/zipdownload' | ||||
|  | ||||
| export default { | ||||
|     name: 'MmWalletWhiteList', | ||||
| @ -286,6 +297,22 @@ export default { | ||||
|         }, | ||||
|         handleBatchAdd() { | ||||
|             this.showBatch = true | ||||
|         }, | ||||
|         handleExport() { | ||||
|             this.loading = true | ||||
|  | ||||
|             exportMmWalletWhiteList(this.queryParams) | ||||
|                 .then(response => { | ||||
|                     console.log(response) | ||||
|                     resolveBlob(response, '钱包白名单.xlsx') | ||||
|                     this.msgSuccess('导出成功') | ||||
|                 }) | ||||
|                 .catch(err => { | ||||
|                     console.log(err) | ||||
|                 }) | ||||
|                 .finally(() => { | ||||
|                     this.loading = false | ||||
|                 }) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user