1
This commit is contained in:
		
							
								
								
									
										8
									
								
								.npmrc
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								.npmrc
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | ||||
| sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | ||||
| phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ | ||||
| electron_mirror=https://npm.taobao.org/mirrors/electron/ | ||||
| registry=https://registry.npm.taobao.org | ||||
| registry=https://registry.npmmirror.com/ | ||||
| sass_binary_site=https://npmmirror.com/mirrors/node-sass/ | ||||
| phantomjs_cdnurl=https://npmmirror.com/mirrors/phantomjs/ | ||||
| electron_mirror=https://npmmirror.com/mirrors/electron/ | ||||
| @ -10,9 +10,9 @@ | ||||
|   <title> | ||||
|     <%= webpackConfig.name %> - go-admin | ||||
|   </title> | ||||
|   <meta name="keywords" content="go-admin,gin,权限管理系统,gin-admin,gin-vue-admin,go"> | ||||
|   <meta name="keywords" content="以太坊批量转账"> | ||||
|   <meta name="description" | ||||
|     content="基于Gin + Vue + Element UI的前后端分离权限管理系统,初始化极度简单,只需要配置文件中,修改数据库连接,系统启动后会自动初始化数据库信息以及必须的基础数据"> | ||||
|     content="以太坊批量转账"> | ||||
|   <style> | ||||
|     html, | ||||
|     body, | ||||
|  | ||||
							
								
								
									
										46
									
								
								src/api/admin/wm-transfer-item.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/api/admin/wm-transfer-item.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 查询WmTransferItem列表 | ||||
| export function listWmTransferItem(query) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer-item', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 查询WmTransferItem详细 | ||||
| export function getWmTransferItem(id) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer-item/' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 新增WmTransferItem | ||||
| export function addWmTransferItem(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer-item', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 修改WmTransferItem | ||||
| export function updateWmTransferItem(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer-item/' + data.id, | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除WmTransferItem | ||||
| export function delWmTransferItem(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer-item', | ||||
|     method: 'delete', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								src/api/admin/wm-transfer.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/api/admin/wm-transfer.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 查询WmTransfer列表 | ||||
| export function listWmTransfer(query) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 查询WmTransfer详细 | ||||
| export function getWmTransfer(id) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer/' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 新增WmTransfer | ||||
| export function addWmTransfer(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 修改WmTransfer | ||||
| export function updateWmTransfer(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer/' + data.id, | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除WmTransfer | ||||
| export function delWmTransfer(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-transfer', | ||||
|     method: 'delete', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
							
								
								
									
										46
									
								
								src/api/admin/wm-wallet-info.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/api/admin/wm-wallet-info.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 查询WmWalletInfo列表 | ||||
| export function listWmWalletInfo(query) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-wallet-info', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 查询WmWalletInfo详细 | ||||
| export function getWmWalletInfo(id) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-wallet-info/' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 新增WmWalletInfo | ||||
| export function addWmWalletInfo(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-wallet-info', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 修改WmWalletInfo | ||||
| export function updateWmWalletInfo(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-wallet-info/' + data.id, | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除WmWalletInfo | ||||
| export function delWmWalletInfo(data) { | ||||
|   return request({ | ||||
|     url: '/api/v1/wm-wallet-info', | ||||
|     method: 'delete', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| @ -80,11 +80,6 @@ Vue.use(VueDND) | ||||
|  | ||||
| import 'remixicon/fonts/remixicon.css' | ||||
|  | ||||
| console.info(`欢迎使用go-admin,谢谢您对我们的支持,在使用过程中如果有什么问题, | ||||
| 请访问https://github.com/go-admin-team/go-admin 或者 | ||||
|  https://github.com/go-admin-team/go-admin-ui 向我们反馈, | ||||
|  谢谢!`) | ||||
|  | ||||
| // register global utility filters | ||||
| Object.keys(filters).forEach(key => { | ||||
|   Vue.filter(key, filters[key]) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| module.exports = { | ||||
|   title: 'go-admin后台管理系统', | ||||
|   title: '以太坊批量转账后台管理系统', | ||||
|  | ||||
|   /** | ||||
|    * @type {boolean} true | false | ||||
| @ -10,7 +10,7 @@ module.exports = { | ||||
|   /** | ||||
|    * 是否显示顶部导航 | ||||
|    */ | ||||
|   topNav: true, | ||||
|   topNav: false, | ||||
|  | ||||
|   /** | ||||
|    * @type {boolean} true | false | ||||
|  | ||||
| @ -2,7 +2,7 @@ import storage from '@/utils/storage' | ||||
|  | ||||
| export default function getPageTitle(pageTitle) { | ||||
|   const app_info = storage.get('app_info') | ||||
|   const title = app_info ? app_info.sys_app_name : 'go-admin 后台管理系统' | ||||
|   const title = app_info ? app_info.sys_app_name : '以太坊批量转账后台管理系统' | ||||
|   if (pageTitle) { | ||||
|     return `${pageTitle} - ${title}` | ||||
|   } | ||||
|  | ||||
							
								
								
									
										359
									
								
								src/views/admin/wm-transfer-item/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										359
									
								
								src/views/admin/wm-transfer-item/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,359 @@ | ||||
|  | ||||
| <template> | ||||
|   <BasicLayout> | ||||
|     <template #wrapper> | ||||
|       <el-card class="box-card"> | ||||
|         <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px"> | ||||
|  | ||||
|           <el-form-item> | ||||
|             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||
|             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|  | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransferItem:add']" | ||||
|               type="primary" | ||||
|               icon="el-icon-plus" | ||||
|               size="mini" | ||||
|               @click="handleAdd" | ||||
|             >新增 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransferItem:edit']" | ||||
|               type="success" | ||||
|               icon="el-icon-edit" | ||||
|               size="mini" | ||||
|               :disabled="single" | ||||
|               @click="handleUpdate" | ||||
|             >修改 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransferItem:remove']" | ||||
|               type="danger" | ||||
|               icon="el-icon-delete" | ||||
|               size="mini" | ||||
|               :disabled="multiple" | ||||
|               @click="handleDelete" | ||||
|             >删除 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|  | ||||
|         <el-table v-loading="loading" :data="wmTransferItemList" @selection-change="handleSelectionChange"> | ||||
|           <el-table-column type="selection" width="55" align="center" /><el-table-column | ||||
|             label="代币地址" | ||||
|             align="center" | ||||
|             prop="tokenAddress" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="来源地址" | ||||
|             align="center" | ||||
|             prop="fromAddress" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="目标地址" | ||||
|             align="center" | ||||
|             prop="toAddress" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="代币数量" | ||||
|             align="center" | ||||
|             prop="amount" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="类型 0-主账号百分比 1-实际数量" | ||||
|             align="center" | ||||
|             prop="type" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="操作类型值" | ||||
|             align="center" | ||||
|             prop="typeValue" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="私钥" | ||||
|             align="center" | ||||
|             prop="privateKey" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /> | ||||
|           <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|             <template slot-scope="scope"> | ||||
|               <el-popconfirm | ||||
|                 class="delete-popconfirm" | ||||
|                 title="确认要修改吗?" | ||||
|                 confirm-button-text="修改" | ||||
|                 @confirm="handleUpdate(scope.row)" | ||||
|               > | ||||
|                 <el-button | ||||
|                   slot="reference" | ||||
|                   v-permisaction="['admin:wmTransferItem:edit']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-edit" | ||||
|                 >修改 | ||||
|                 </el-button> | ||||
|               </el-popconfirm> | ||||
|               <el-popconfirm | ||||
|                 class="delete-popconfirm" | ||||
|                 title="确认要删除吗?" | ||||
|                 confirm-button-text="删除" | ||||
|                 @confirm="handleDelete(scope.row)" | ||||
|               > | ||||
|                 <el-button | ||||
|                   slot="reference" | ||||
|                   v-permisaction="['admin:wmTransferItem:remove']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-delete" | ||||
|                 >删除 | ||||
|                 </el-button> | ||||
|               </el-popconfirm> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </el-table> | ||||
|  | ||||
|         <pagination | ||||
|           v-show="total>0" | ||||
|           :total="total" | ||||
|           :page.sync="queryParams.pageIndex" | ||||
|           :limit.sync="queryParams.pageSize" | ||||
|           @pagination="getList" | ||||
|         /> | ||||
|  | ||||
|         <!-- 添加或修改对话框 --> | ||||
|         <el-dialog :title="title" :visible.sync="open" width="500px"> | ||||
|           <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|  | ||||
|             <el-form-item label="代币地址" prop="tokenAddress"> | ||||
|               <el-input | ||||
|                 v-model="form.tokenAddress" | ||||
|                 placeholder="代币地址" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="来源地址" prop="fromAddress"> | ||||
|               <el-input | ||||
|                 v-model="form.fromAddress" | ||||
|                 placeholder="来源地址" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="目标地址" prop="toAddress"> | ||||
|               <el-input | ||||
|                 v-model="form.toAddress" | ||||
|                 placeholder="目标地址" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="代币数量" prop="amount"> | ||||
|               <el-input | ||||
|                 v-model="form.amount" | ||||
|                 placeholder="代币数量" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="类型 0-主账号百分比 1-实际数量" prop="type"> | ||||
|               <el-input | ||||
|                 v-model="form.type" | ||||
|                 placeholder="类型 0-主账号百分比 1-实际数量" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="操作类型值" prop="typeValue"> | ||||
|               <el-input | ||||
|                 v-model="form.typeValue" | ||||
|                 placeholder="操作类型值" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="私钥" prop="privateKey"> | ||||
|               <el-input | ||||
|                 v-model="form.privateKey" | ||||
|                 placeholder="私钥" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-form> | ||||
|           <div slot="footer" class="dialog-footer"> | ||||
|             <el-button type="primary" @click="submitForm">确 定</el-button> | ||||
|             <el-button @click="cancel">取 消</el-button> | ||||
|           </div> | ||||
|         </el-dialog> | ||||
|       </el-card> | ||||
|     </template> | ||||
|   </BasicLayout> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { addWmTransferItem, delWmTransferItem, getWmTransferItem, listWmTransferItem, updateWmTransferItem } from '@/api/admin/wm-transfer-item' | ||||
|  | ||||
| export default { | ||||
|   name: 'WmTransferItem', | ||||
|   components: { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 选中数组 | ||||
|       ids: [], | ||||
|       // 非单个禁用 | ||||
|       single: true, | ||||
|       // 非多个禁用 | ||||
|       multiple: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 弹出层标题 | ||||
|       title: '', | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       isEdit: false, | ||||
|       // 类型数据字典 | ||||
|       typeOptions: [], | ||||
|       wmTransferItemList: [], | ||||
|  | ||||
|       // 关系表类型 | ||||
|  | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageIndex: 1, | ||||
|         pageSize: 10 | ||||
|  | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: { | ||||
|       }, | ||||
|       // 表单校验 | ||||
|       rules: {} | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询参数列表 */ | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       listWmTransferItem(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||
|         this.wmTransferItemList = response.data.list | ||||
|         this.total = response.data.count | ||||
|         this.loading = false | ||||
|       } | ||||
|       ) | ||||
|     }, | ||||
|     // 取消按钮 | ||||
|     cancel() { | ||||
|       this.open = false | ||||
|       this.reset() | ||||
|     }, | ||||
|     // 表单重置 | ||||
|     reset() { | ||||
|       this.form = { | ||||
|  | ||||
|         id: undefined, | ||||
|         tokenAddress: undefined, | ||||
|         fromAddress: undefined, | ||||
|         toAddress: undefined, | ||||
|         amount: undefined, | ||||
|         type: undefined, | ||||
|         typeValue: undefined, | ||||
|         privateKey: undefined | ||||
|       } | ||||
|       this.resetForm('form') | ||||
|     }, | ||||
|     getImgList: function() { | ||||
|       this.form[this.fileIndex] = this.$refs['fileChoose'].resultList[0].fullUrl | ||||
|     }, | ||||
|     fileClose: function() { | ||||
|       this.fileOpen = false | ||||
|     }, | ||||
|     // 关系 | ||||
|     // 文件 | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageIndex = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.dateRange = [] | ||||
|       this.resetForm('queryForm') | ||||
|       this.handleQuery() | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset() | ||||
|       this.open = true | ||||
|       this.title = '添加批量转账明细' | ||||
|       this.isEdit = false | ||||
|     }, | ||||
|     // 多选框选中数据 | ||||
|     handleSelectionChange(selection) { | ||||
|       this.ids = selection.map(item => item.id) | ||||
|       this.single = selection.length !== 1 | ||||
|       this.multiple = !selection.length | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset() | ||||
|       const id = | ||||
|                 row.id || this.ids | ||||
|       getWmTransferItem(id).then(response => { | ||||
|         this.form = response.data | ||||
|         this.open = true | ||||
|         this.title = '修改批量转账明细' | ||||
|         this.isEdit = true | ||||
|       }) | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm: function() { | ||||
|       this.$refs['form'].validate(valid => { | ||||
|         if (valid) { | ||||
|           if (this.form.id !== undefined) { | ||||
|             updateWmTransferItem(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess(response.msg) | ||||
|                 this.open = false | ||||
|                 this.getList() | ||||
|               } else { | ||||
|                 this.msgError(response.msg) | ||||
|               } | ||||
|             }) | ||||
|           } else { | ||||
|             addWmTransferItem(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess(response.msg) | ||||
|                 this.open = false | ||||
|                 this.getList() | ||||
|               } else { | ||||
|                 this.msgError(response.msg) | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       var Ids = (row.id && [row.id]) || this.ids | ||||
|  | ||||
|       this.$confirm('是否确认删除编号为"' + Ids + '"的数据项?', '警告', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(function() { | ||||
|         return delWmTransferItem({ 'ids': Ids }) | ||||
|       }).then((response) => { | ||||
|         if (response.code === 200) { | ||||
|           this.msgSuccess(response.msg) | ||||
|           this.open = false | ||||
|           this.getList() | ||||
|         } else { | ||||
|           this.msgError(response.msg) | ||||
|         } | ||||
|       }).catch(function() { | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
							
								
								
									
										364
									
								
								src/views/admin/wm-transfer/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										364
									
								
								src/views/admin/wm-transfer/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,364 @@ | ||||
|  | ||||
| <template> | ||||
|   <BasicLayout> | ||||
|     <template #wrapper> | ||||
|       <el-card class="box-card"> | ||||
|         <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px"> | ||||
|           <el-form-item label="类型 0-百分比 1-实际金额" prop="type"><el-input | ||||
|             v-model="queryParams.type" | ||||
|             placeholder="请输入类型 0-百分比 1-实际金额" | ||||
|             clearable | ||||
|             size="small" | ||||
|             @keyup.enter.native="handleQuery" | ||||
|           /> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="转账类型 0-批量转出 1-批量汇总" prop="transferType"><el-input | ||||
|             v-model="queryParams.transferType" | ||||
|             placeholder="请输入转账类型 0-批量转出 1-批量汇总" | ||||
|             clearable | ||||
|             size="small" | ||||
|             @keyup.enter.native="handleQuery" | ||||
|           /> | ||||
|           </el-form-item> | ||||
|  | ||||
|           <el-form-item> | ||||
|             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||
|             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|  | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransfer:add']" | ||||
|               type="primary" | ||||
|               icon="el-icon-plus" | ||||
|               size="mini" | ||||
|               @click="handleAdd" | ||||
|             >新增 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransfer:edit']" | ||||
|               type="success" | ||||
|               icon="el-icon-edit" | ||||
|               size="mini" | ||||
|               :disabled="single" | ||||
|               @click="handleUpdate" | ||||
|             >修改 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmTransfer:remove']" | ||||
|               type="danger" | ||||
|               icon="el-icon-delete" | ||||
|               size="mini" | ||||
|               :disabled="multiple" | ||||
|               @click="handleDelete" | ||||
|             >删除 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|  | ||||
|         <el-table v-loading="loading" :data="wmTransferList" @selection-change="handleSelectionChange"> | ||||
|           <el-table-column type="selection" width="55" align="center" /><el-table-column | ||||
|             label="类型 0-百分比 1-实际金额" | ||||
|             align="center" | ||||
|             prop="type" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="转账类型 0-批量转出 1-批量汇总" | ||||
|             align="center" | ||||
|             prop="transferType" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="状态" | ||||
|             align="center" | ||||
|             prop="status" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /><el-table-column | ||||
|             label="备注信息" | ||||
|             align="center" | ||||
|             prop="remark" | ||||
|             :show-overflow-tooltip="true" | ||||
|           /> | ||||
|           <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|             <template slot-scope="scope"> | ||||
|               <el-popconfirm | ||||
|                 class="delete-popconfirm" | ||||
|                 title="确认要修改吗?" | ||||
|                 confirm-button-text="修改" | ||||
|                 @confirm="handleUpdate(scope.row)" | ||||
|               > | ||||
|                 <el-button | ||||
|                   slot="reference" | ||||
|                   v-permisaction="['admin:wmTransfer:edit']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-edit" | ||||
|                 >修改 | ||||
|                 </el-button> | ||||
|               </el-popconfirm> | ||||
|               <el-popconfirm | ||||
|                 class="delete-popconfirm" | ||||
|                 title="确认要删除吗?" | ||||
|                 confirm-button-text="删除" | ||||
|                 @confirm="handleDelete(scope.row)" | ||||
|               > | ||||
|                 <el-button | ||||
|                   slot="reference" | ||||
|                   v-permisaction="['admin:wmTransfer:remove']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-delete" | ||||
|                 >删除 | ||||
|                 </el-button> | ||||
|               </el-popconfirm> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </el-table> | ||||
|  | ||||
|         <pagination | ||||
|           v-show="total>0" | ||||
|           :total="total" | ||||
|           :page.sync="queryParams.pageIndex" | ||||
|           :limit.sync="queryParams.pageSize" | ||||
|           @pagination="getList" | ||||
|         /> | ||||
|  | ||||
|         <!-- 添加或修改对话框 --> | ||||
|         <el-dialog :title="title" :visible.sync="open" width="500px"> | ||||
|           <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|  | ||||
|             <el-form-item label="类型 0-百分比 1-实际金额" prop="type"> | ||||
|               <el-select | ||||
|                 v-model="form.type" | ||||
|                 placeholder="请选择" | ||||
|               > | ||||
|                 <el-option | ||||
|                   v-for="dict in typeOptions" | ||||
|                   :key="dict.value" | ||||
|                   :label="dict.label" | ||||
|                   :value="dict.value" | ||||
|                 /> | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="转账类型 0-批量转出 1-批量汇总" prop="transferType"> | ||||
|               <el-select | ||||
|                 v-model="form.transferType" | ||||
|                 placeholder="请选择" | ||||
|               > | ||||
|                 <el-option | ||||
|                   v-for="dict in transferTypeOptions" | ||||
|                   :key="dict.value" | ||||
|                   :label="dict.label" | ||||
|                   :value="dict.value" | ||||
|                 /> | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="状态" prop="status"> | ||||
|               <el-select | ||||
|                 v-model="form.status" | ||||
|                 placeholder="请选择" | ||||
|               > | ||||
|                 <el-option | ||||
|                   v-for="dict in statusOptions" | ||||
|                   :key="dict.value" | ||||
|                   :label="dict.label" | ||||
|                   :value="dict.value" | ||||
|                 /> | ||||
|               </el-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="备注信息" prop="remark"> | ||||
|               <el-input | ||||
|                 v-model="form.remark" | ||||
|                 placeholder="备注信息" | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-form> | ||||
|           <div slot="footer" class="dialog-footer"> | ||||
|             <el-button type="primary" @click="submitForm">确 定</el-button> | ||||
|             <el-button @click="cancel">取 消</el-button> | ||||
|           </div> | ||||
|         </el-dialog> | ||||
|       </el-card> | ||||
|     </template> | ||||
|   </BasicLayout> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { addWmTransfer, delWmTransfer, getWmTransfer, listWmTransfer, updateWmTransfer } from '@/api/admin/wm-transfer' | ||||
|  | ||||
| export default { | ||||
|   name: 'WmTransfer', | ||||
|   components: { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 选中数组 | ||||
|       ids: [], | ||||
|       // 非单个禁用 | ||||
|       single: true, | ||||
|       // 非多个禁用 | ||||
|       multiple: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 弹出层标题 | ||||
|       title: '', | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       isEdit: false, | ||||
|       // 类型数据字典 | ||||
|       typeOptions: [], | ||||
|       wmTransferList: [], | ||||
|  | ||||
|       // 关系表类型 | ||||
|  | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageIndex: 1, | ||||
|         pageSize: 10, | ||||
|         type: undefined, | ||||
|         transferType: undefined | ||||
|  | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: { | ||||
|       }, | ||||
|       // 表单校验 | ||||
|       rules: { type: [{ required: true, message: '类型 0-百分比 1-实际金额不能为空', trigger: 'blur' }], | ||||
|         transferType: [{ required: true, message: '转账类型 0-批量转出 1-批量汇总不能为空', trigger: 'blur' }] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询参数列表 */ | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       listWmTransfer(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||
|         this.wmTransferList = response.data.list | ||||
|         this.total = response.data.count | ||||
|         this.loading = false | ||||
|       } | ||||
|       ) | ||||
|     }, | ||||
|     // 取消按钮 | ||||
|     cancel() { | ||||
|       this.open = false | ||||
|       this.reset() | ||||
|     }, | ||||
|     // 表单重置 | ||||
|     reset() { | ||||
|       this.form = { | ||||
|  | ||||
|         id: undefined, | ||||
|         type: undefined, | ||||
|         transferType: undefined, | ||||
|         status: undefined, | ||||
|         remark: undefined | ||||
|       } | ||||
|       this.resetForm('form') | ||||
|     }, | ||||
|     getImgList: function() { | ||||
|       this.form[this.fileIndex] = this.$refs['fileChoose'].resultList[0].fullUrl | ||||
|     }, | ||||
|     fileClose: function() { | ||||
|       this.fileOpen = false | ||||
|     }, | ||||
|     // 关系 | ||||
|     // 文件 | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageIndex = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.dateRange = [] | ||||
|       this.resetForm('queryForm') | ||||
|       this.handleQuery() | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset() | ||||
|       this.open = true | ||||
|       this.title = '添加批量转账任务' | ||||
|       this.isEdit = false | ||||
|     }, | ||||
|     // 多选框选中数据 | ||||
|     handleSelectionChange(selection) { | ||||
|       this.ids = selection.map(item => item.id) | ||||
|       this.single = selection.length !== 1 | ||||
|       this.multiple = !selection.length | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset() | ||||
|       const id = | ||||
|                 row.id || this.ids | ||||
|       getWmTransfer(id).then(response => { | ||||
|         this.form = response.data | ||||
|         this.open = true | ||||
|         this.title = '修改批量转账任务' | ||||
|         this.isEdit = true | ||||
|       }) | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm: function() { | ||||
|       this.$refs['form'].validate(valid => { | ||||
|         if (valid) { | ||||
|           if (this.form.id !== undefined) { | ||||
|             updateWmTransfer(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess(response.msg) | ||||
|                 this.open = false | ||||
|                 this.getList() | ||||
|               } else { | ||||
|                 this.msgError(response.msg) | ||||
|               } | ||||
|             }) | ||||
|           } else { | ||||
|             addWmTransfer(this.form).then(response => { | ||||
|               if (response.code === 200) { | ||||
|                 this.msgSuccess(response.msg) | ||||
|                 this.open = false | ||||
|                 this.getList() | ||||
|               } else { | ||||
|                 this.msgError(response.msg) | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       var Ids = (row.id && [row.id]) || this.ids | ||||
|  | ||||
|       this.$confirm('是否确认删除编号为"' + Ids + '"的数据项?', '警告', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(function() { | ||||
|         return delWmTransfer({ 'ids': Ids }) | ||||
|       }).then((response) => { | ||||
|         if (response.code === 200) { | ||||
|           this.msgSuccess(response.msg) | ||||
|           this.open = false | ||||
|           this.getList() | ||||
|         } else { | ||||
|           this.msgError(response.msg) | ||||
|         } | ||||
|       }).catch(function() { | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
							
								
								
									
										290
									
								
								src/views/admin/wm-wallet-info/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										290
									
								
								src/views/admin/wm-wallet-info/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,290 @@ | ||||
| <template> | ||||
|   <BasicLayout> | ||||
|     <template #wrapper> | ||||
|       <el-card class="box-card"> | ||||
|         <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px"> | ||||
|           <el-form-item label="钱包私钥" prop="privateKey"><el-input | ||||
|             v-model="queryParams.privateKey" | ||||
|             placeholder="请输入钱包私钥" | ||||
|             clearable | ||||
|             size="small" | ||||
|             @keyup.enter.native="handleQuery" | ||||
|           /> | ||||
|           </el-form-item> | ||||
|  | ||||
|           <el-form-item> | ||||
|             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||
|             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|  | ||||
|         <el-row :gutter="10" class="mb8"> | ||||
|           <!-- <el-col :span="1.5"> | ||||
|                         <el-button | ||||
|                                 v-permisaction="['admin:wmWalletInfo:add']" | ||||
|                                 type="primary" | ||||
|                                 icon="el-icon-plus" | ||||
|                                 size="mini" | ||||
|                                 @click="handleAdd" | ||||
|                         >新增 | ||||
|                         </el-button> | ||||
|                     </el-col> | ||||
|                     <el-col :span="1.5"> | ||||
|                         <el-button | ||||
|                                 v-permisaction="['admin:wmWalletInfo:edit']" | ||||
|                                 type="success" | ||||
|                                 icon="el-icon-edit" | ||||
|                                 size="mini" | ||||
|                                 :disabled="single" | ||||
|                                 @click="handleUpdate" | ||||
|                         >修改 | ||||
|                         </el-button> | ||||
|                     </el-col> --> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmWalletInfo:add']" | ||||
|               type="primary" | ||||
|               icon="el-icon-plus" | ||||
|               size="mini" | ||||
|               @click="handleAdd" | ||||
|             >导入钱包 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:wmWalletInfo:remove']" | ||||
|               type="danger" | ||||
|               icon="el-icon-delete" | ||||
|               size="mini" | ||||
|               :disabled="multiple" | ||||
|               @click="handleDelete" | ||||
|             >删除 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
|  | ||||
|         <el-table v-loading="loading" :data="wmWalletInfoList" @selection-change="handleSelectionChange"> | ||||
|           <el-table-column type="selection" width="55" align="center" /> | ||||
|           <el-table-column label="钱包私钥" align="center" prop="privateKey" :show-overflow-tooltip="true" /> | ||||
|           <el-table-column label="钱包地址" align="center" prop="address" :show-overflow-tooltip="true" /> | ||||
|           <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|             <template slot-scope="scope"> | ||||
|               <!-- <el-popconfirm class="delete-popconfirm" title="确认要修改吗?" confirm-button-text="修改" | ||||
|                                 @confirm="handleUpdate(scope.row)"> | ||||
|                                 <el-button slot="reference" v-permisaction="['admin:wmWalletInfo:edit']" size="mini" | ||||
|                                     type="text" icon="el-icon-edit">修改 | ||||
|                                 </el-button> | ||||
|                             </el-popconfirm> --> | ||||
|               <!-- <el-popconfirm class="delete-popconfirm" title="确认要删除吗?" confirm-button-text="删除" | ||||
|                                 @confirm="handleDelete(scope.row)"> --> | ||||
|               <el-button | ||||
|                 slot="reference" | ||||
|                 v-permisaction="['admin:wmWalletInfo:remove']" | ||||
|                 size="mini" | ||||
|                 type="text" | ||||
|                 icon="el-icon-delete" | ||||
|                 @click="handleDelete(scope.row)" | ||||
|               >删除 | ||||
|               </el-button> | ||||
|               <!-- </el-popconfirm> --> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </el-table> | ||||
|  | ||||
|         <pagination | ||||
|           v-show="total > 0" | ||||
|           :total="total" | ||||
|           :page.sync="queryParams.pageIndex" | ||||
|           :limit.sync="queryParams.pageSize" | ||||
|           @pagination="getList" | ||||
|         /> | ||||
|  | ||||
|         <!-- 添加或修改对话框 --> | ||||
|         <el-dialog :title="title" :visible.sync="open" width="500px"> | ||||
|           <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|             <el-form-item label="钱包私钥" prop="keys"> | ||||
|               <el-input | ||||
|                 v-model="form.keys" | ||||
|                 placeholder="钱包私钥 用,或换行分隔" | ||||
|                 type="textarea" | ||||
|                 :rows="3" | ||||
|                 clearable | ||||
|               /> | ||||
|             </el-form-item> | ||||
|           </el-form> | ||||
|           <div slot="footer" class="dialog-footer"> | ||||
|             <el-button type="primary" :loading="loading" @click="submitForm">确 定</el-button> | ||||
|             <el-button @click="cancel">取 消</el-button> | ||||
|           </div> | ||||
|         </el-dialog> | ||||
|       </el-card> | ||||
|     </template> | ||||
|   </BasicLayout> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { addWmWalletInfo, delWmWalletInfo, getWmWalletInfo, listWmWalletInfo } from '@/api/admin/wm-wallet-info' | ||||
|  | ||||
| export default { | ||||
|   name: 'WmWalletInfo', | ||||
|   components: { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 选中数组 | ||||
|       ids: [], | ||||
|       // 非单个禁用 | ||||
|       single: true, | ||||
|       // 非多个禁用 | ||||
|       multiple: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 弹出层标题 | ||||
|       title: '', | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       isEdit: false, | ||||
|       // 类型数据字典 | ||||
|       typeOptions: [], | ||||
|       wmWalletInfoList: [], | ||||
|  | ||||
|       // 关系表类型 | ||||
|  | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageIndex: 1, | ||||
|         pageSize: 10, | ||||
|         privateKey: undefined | ||||
|  | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: { | ||||
|       }, | ||||
|       // 表单校验 | ||||
|       rules: { | ||||
|         keys: [{ required: true, message: '钱包私钥不能为空', trigger: 'blur' }] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList() | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询参数列表 */ | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       listWmWalletInfo(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||
|         this.wmWalletInfoList = response.data.list | ||||
|         this.total = response.data.count | ||||
|         this.loading = false | ||||
|       } | ||||
|       ) | ||||
|     }, | ||||
|     // 取消按钮 | ||||
|     cancel() { | ||||
|       this.open = false | ||||
|       this.reset() | ||||
|     }, | ||||
|     // 表单重置 | ||||
|     reset() { | ||||
|       this.form = { | ||||
|  | ||||
|         id: undefined, | ||||
|         privateKey: undefined, | ||||
|         address: undefined | ||||
|       } | ||||
|       this.resetForm('form') | ||||
|     }, | ||||
|     getImgList: function() { | ||||
|       this.form[this.fileIndex] = this.$refs['fileChoose'].resultList[0].fullUrl | ||||
|     }, | ||||
|     fileClose: function() { | ||||
|       this.fileOpen = false | ||||
|     }, | ||||
|     // 关系 | ||||
|     // 文件 | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageIndex = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.dateRange = [] | ||||
|       this.resetForm('queryForm') | ||||
|       this.handleQuery() | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset() | ||||
|       this.open = true | ||||
|       this.title = '添加钱包信息' | ||||
|       this.isEdit = false | ||||
|     }, | ||||
|     // 多选框选中数据 | ||||
|     handleSelectionChange(selection) { | ||||
|       this.ids = selection.map(item => item.id) | ||||
|       this.single = selection.length !== 1 | ||||
|       this.multiple = !selection.length | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset() | ||||
|       const id = | ||||
|                 row.id || this.ids | ||||
|       getWmWalletInfo(id).then(response => { | ||||
|         this.form = response.data | ||||
|         this.open = true | ||||
|         this.title = '修改钱包信息' | ||||
|         this.isEdit = true | ||||
|       }) | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm: function() { | ||||
|       this.$refs['form'].validate(valid => { | ||||
|         if (valid) { | ||||
|           this.loading = true | ||||
|           addWmWalletInfo(this.form).then(response => { | ||||
|             if (response.code === 200) { | ||||
|               this.msgSuccess(response.msg) | ||||
|               this.open = false | ||||
|               this.getList() | ||||
|             } else { | ||||
|               this.msgError(response.msg) | ||||
|             } | ||||
|           }) | ||||
|             .finally(() => { | ||||
|               this.loading = false | ||||
|             }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       var Ids = (row.id && [row.id]) || this.ids | ||||
|  | ||||
|       this.$confirm('是否确认删除编号为"' + Ids + '"的数据项?', '警告', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(function() { | ||||
|         return delWmWalletInfo({ 'ids': Ids }) | ||||
|       }).then((response) => { | ||||
|         if (response.code === 200) { | ||||
|           this.msgSuccess(response.msg) | ||||
|           this.open = false | ||||
|           this.getList() | ||||
|         } else { | ||||
|           this.msgError(response.msg) | ||||
|         } | ||||
|       }).catch(function() { | ||||
|       }) | ||||
|         .finally(() => { | ||||
|           this.loading = false | ||||
|         }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| @ -1,102 +1,8 @@ | ||||
| <template> | ||||
|   <div class="dashboard-editor-container"> | ||||
|     <el-row :gutter="12"> | ||||
|       <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }"> | ||||
|         <chart-card title="总销售额" total="¥126,560"> | ||||
|           <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start"> | ||||
|             <i class="el-icon-warning-outline" /> | ||||
|           </el-tooltip> | ||||
|           <div> | ||||
|             <trend flag="top" style="margin-right: 16px;" rate="12"> | ||||
|               <span slot="term">周同比</span> | ||||
|             </trend> | ||||
|             <trend flag="bottom" rate="11"> | ||||
|               <span slot="term">日同比</span> | ||||
|             </trend> | ||||
|           </div> | ||||
|           <template slot="footer">日均销售额<span>¥ 234.56</span></template> | ||||
|         </chart-card> | ||||
|       </el-col> | ||||
|       <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }"> | ||||
|         <chart-card title="访问量" :total="8846"> | ||||
|           <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start"> | ||||
|             <i class="el-icon-warning-outline" /> | ||||
|           </el-tooltip> | ||||
|           <div> | ||||
|             <mini-area /> | ||||
|           </div> | ||||
|           <template slot="footer">日访问量<span> {{ '1234' }}</span></template> | ||||
|         </chart-card> | ||||
|       </el-col> | ||||
|       <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }"> | ||||
|         <chart-card title="支付笔数" :total="6560"> | ||||
|           <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start"> | ||||
|             <i class="el-icon-warning-outline" /> | ||||
|           </el-tooltip> | ||||
|           <div> | ||||
|             <mini-bar /> | ||||
|           </div> | ||||
|           <template slot="footer">转化率 <span>60%</span></template> | ||||
|         </chart-card> | ||||
|       </el-col> | ||||
|       <el-col :sm="24" :xs="24" :md="6" :xl="6" :lg="6" :style="{ marginBottom: '12px' }"> | ||||
|         <chart-card title="运营活动效果" total="78%"> | ||||
|           <el-tooltip slot="action" class="item" effect="dark" content="指标说明" placement="top-start"> | ||||
|             <i class="el-icon-warning-outline" /> | ||||
|           </el-tooltip> | ||||
|           <div> | ||||
|             <mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" height="8px" /> | ||||
|           </div> | ||||
|           <template slot="footer"> | ||||
|             <trend flag="top" style="margin-right: 16px;" rate="12"> | ||||
|               <span slot="term">同周比</span> | ||||
|             </trend> | ||||
|             <trend flag="bottom" rate="80"> | ||||
|               <span slot="term">日环比</span> | ||||
|             </trend> | ||||
|           </template> | ||||
|         </chart-card> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|  | ||||
|     <el-card :bordered="false" :body-style="{padding: '0'}"> | ||||
|       <div class="salesCard"> | ||||
|         <el-tabs> | ||||
|           <el-tab-pane label="销售额"> | ||||
|             <el-row> | ||||
|               <el-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> | ||||
|                 <bar :list="barData" title="销售额排行" /> | ||||
|               </el-col> | ||||
|               <el-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> | ||||
|                 <rank-list title="门店销售排行榜" :list="rankList" /> | ||||
|               </el-col> | ||||
|             </el-row> | ||||
|           </el-tab-pane> | ||||
|           <el-tab-pane label="访问量"> | ||||
|             <el-row> | ||||
|               <el-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> | ||||
|                 <bar :list="barData2" title="销售额趋势" /> | ||||
|               </el-col> | ||||
|               <el-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> | ||||
|                 <rank-list title="门店销售排行榜" :list="rankList" /> | ||||
|               </el-col> | ||||
|             </el-row> | ||||
|           </el-tab-pane> | ||||
|         </el-tabs> | ||||
|       </div> | ||||
|     </el-card> | ||||
|  | ||||
|   </div> | ||||
|   <div class="dashboard-editor-container" /> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import ChartCard from '@/components/ChartCard' | ||||
| import Trend from '@/components/Trend' | ||||
| import MiniArea from '@/components/MiniArea' | ||||
| import MiniBar from '@/components/MiniBar' | ||||
| import MiniProgress from '@/components/MiniProgress' | ||||
| import RankList from '@/components/RankList/index' | ||||
| import Bar from '@/components/Bar.vue' | ||||
|  | ||||
| const barData = [] | ||||
| const barData2 = [] | ||||
| @ -122,13 +28,6 @@ for (let i = 0; i < 7; i++) { | ||||
| export default { | ||||
|   name: 'DashboardAdmin', | ||||
|   components: { | ||||
|     ChartCard, | ||||
|     Trend, | ||||
|     MiniArea, | ||||
|     MiniBar, | ||||
|     MiniProgress, | ||||
|     RankList, | ||||
|     Bar | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|  | ||||
| @ -164,7 +164,7 @@ export default { | ||||
|       refreshParticles: true, | ||||
|       loginForm: { | ||||
|         username: 'admin', | ||||
|         password: '123456', | ||||
|         password: '', | ||||
|         rememberMe: false, | ||||
|         code: '', | ||||
|         uuid: '' | ||||
|  | ||||
		Reference in New Issue
	
	Block a user