1
This commit is contained in:
		| @ -45,3 +45,10 @@ export function delLineUser(data) { | ||||
|     }) | ||||
| } | ||||
|  | ||||
| export function reloadProperty(data){ | ||||
|     return request({ | ||||
|         url: '/api/v1/line-user/property', | ||||
|         method: 'put', | ||||
|         data: data | ||||
|     }) | ||||
| } | ||||
| @ -195,8 +195,8 @@ export default { | ||||
|         pageIndex: 1, | ||||
|         pageSize: 10, | ||||
|         symbol: undefined, | ||||
|         type: undefined | ||||
|  | ||||
|         type: undefined, | ||||
|         idOrder:"desc", | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: { | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
|  | ||||
| <template> | ||||
|   <BasicLayout> | ||||
|     <template #wrapper> | ||||
| @ -22,25 +21,13 @@ | ||||
|             </el-button> | ||||
|           </el-col> --> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button | ||||
|               v-permisaction="['admin:lineUser:edit']" | ||||
|               type="success" | ||||
|               icon="el-icon-edit" | ||||
|               size="mini" | ||||
|               :disabled="single" | ||||
|               @click="handleUpdate" | ||||
|             >修改 | ||||
|             <el-button v-permisaction="['admin:lineUser: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:lineUser:remove']" | ||||
|               type="danger" | ||||
|               icon="el-icon-delete" | ||||
|               size="mini" | ||||
|               :disabled="multiple" | ||||
|               @click="handleDelete" | ||||
|             >删除 | ||||
|             <el-button v-permisaction="['admin:lineUser:remove']" type="danger" icon="el-icon-delete" size="mini" | ||||
|               :disabled="multiple" @click="handleDelete">删除 | ||||
|             </el-button> | ||||
|           </el-col> | ||||
|         </el-row> | ||||
| @ -52,58 +39,48 @@ | ||||
|           <el-table-column label="保证金" prop="money" align="center" /> | ||||
|           <el-table-column label="邮箱" prop="email" align="center" /> | ||||
|           <el-table-column label="状态" prop="status" align="center"> | ||||
|             <template #default="{row}"> | ||||
|               <el-tag size="mini" :type="row.status==='normal'?'success':'danger'">{{ {normal:'正常',verify:'未验证'}[row.status] || '未知' }}</el-tag> | ||||
|             <template #default="{ row }"> | ||||
|               <el-tag size="mini" :type="row.status === 'normal' ? 'success' : 'danger'">{{ | ||||
|                 { normal: '正常', verify: '未验证' }[row.status] || '未知' }}</el-tag> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column label="最小下单金额" prop="minOrderAmount" align="center" /> | ||||
|           <el-table-column label="现货可用U" prop="spotFreeAmount" align="center" /> | ||||
|           <el-table-column label="合约可用U" prop="futureFreeAmount" align="center" /> | ||||
|           <el-table-column label="更新时间" align="center" prop="assetUpdateTime" width="150" :show-overflow-tooltip="true"> | ||||
|             <template #default="{ row }">{{ parseTime(row.assetUpdateTime) }}</template> | ||||
|           </el-table-column> | ||||
|           <el-table-column label="启动状态" prop="open_status" align="center"> | ||||
|             <template #default="{row}"> | ||||
|               <el-tag size="mini" :type="row.open_status?'success':'danger'">{{ ['停止','启动'][row.open_status] || '未知' }}</el-tag> | ||||
|             <template #default="{ row }"> | ||||
|               <el-tag size="mini" :type="row.open_status ? 'success' : 'danger'">{{ ['停止', '启动'][row.open_status] || '未知' | ||||
|                 }}</el-tag> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <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:lineUser:edit']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-edit" | ||||
|                 >修改 | ||||
|               <el-popconfirm v-if="scope.row.open_status===1" class="delete-popconfirm" title="确认要新资产吗?" confirm-button-text="更新" | ||||
|                 @confirm="handleReload(scope.row)"> | ||||
|                 <el-button slot="reference" 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:lineUser:remove']" | ||||
|                   size="mini" | ||||
|                   type="text" | ||||
|                   icon="el-icon-delete" | ||||
|                 >删除 | ||||
|               <el-popconfirm class="delete-popconfirm" title="确认要修改吗?" confirm-button-text="修改" | ||||
|                 @confirm="handleUpdate(scope.row)"> | ||||
|                 <el-button slot="reference" v-permisaction="['admin:lineUser: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:lineUser: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" | ||||
|         /> | ||||
|         <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"> | ||||
| @ -175,10 +152,7 @@ | ||||
|               /> | ||||
|             </el-form-item> --> | ||||
|             <el-form-item label="保证金" prop="money"> | ||||
|               <el-input | ||||
|                 v-model="form.money" | ||||
|                 placeholder="保证金" | ||||
|               /> | ||||
|               <el-input v-model="form.money" placeholder="保证金" /> | ||||
|             </el-form-item> | ||||
|             <!-- <el-form-item label="积分" prop="score"> | ||||
|               <el-input | ||||
| @ -259,7 +233,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { addLineUser, delLineUser, getLineUser, listLineUser, updateLineUser } from '@/api/admin/line-user' | ||||
| import { addLineUser, delLineUser, getLineUser, listLineUser, updateLineUser, reloadProperty } from '@/api/admin/line-user' | ||||
|  | ||||
| export default { | ||||
|   name: 'LineUser', | ||||
| @ -291,7 +265,8 @@ export default { | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageIndex: 1, | ||||
|         pageSize: 10 | ||||
|         pageSize: 10, | ||||
|         idOrder: "desc" | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: { | ||||
| @ -351,10 +326,10 @@ export default { | ||||
|       } | ||||
|       this.resetForm('form') | ||||
|     }, | ||||
|     getImgList: function() { | ||||
|     getImgList: function () { | ||||
|       this.form[this.fileIndex] = this.$refs['fileChoose'].resultList[0].fullUrl | ||||
|     }, | ||||
|     fileClose: function() { | ||||
|     fileClose: function () { | ||||
|       this.fileOpen = false | ||||
|     }, | ||||
|     // 关系 | ||||
| @ -387,7 +362,7 @@ export default { | ||||
|     handleUpdate(row) { | ||||
|       this.reset() | ||||
|       const id = | ||||
|                 row.id || this.ids | ||||
|         row.id || this.ids | ||||
|       getLineUser(id).then(response => { | ||||
|         this.form = response.data | ||||
|         this.open = true | ||||
| @ -396,7 +371,7 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm: function() { | ||||
|     submitForm: function () { | ||||
|       this.$refs['form'].validate(valid => { | ||||
|         if (valid) { | ||||
|           if (this.form.id !== undefined) { | ||||
| @ -431,7 +406,7 @@ export default { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(function() { | ||||
|       }).then(function () { | ||||
|         return delLineUser({ 'ids': Ids }) | ||||
|       }).then((response) => { | ||||
|         if (response.code === 200) { | ||||
| @ -441,8 +416,27 @@ export default { | ||||
|         } else { | ||||
|           this.msgError(response.msg) | ||||
|         } | ||||
|       }).catch(function() { | ||||
|       }).catch(function () { | ||||
|       }) | ||||
|     }, | ||||
|     /* | ||||
|     更新资产  | ||||
|      */ | ||||
|     handleReload(row) { | ||||
|       this.loading = true | ||||
|  | ||||
|       reloadProperty({ userId: row.id }) | ||||
|         .then(response => { | ||||
|           if (response.code === 200) { | ||||
|             this.msgSuccess(response.msg) | ||||
|             this.getList() | ||||
|           } else { | ||||
|             this.msgError(response.msg) | ||||
|           } | ||||
|         }) | ||||
|         .finally(() => { | ||||
|           this.loading = false | ||||
|         }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| <template> | ||||
|     <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :close-on-click-modal="false" @closed="closeDialog"> | ||||
|     <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :close-on-click-modal="false" | ||||
|         @closed="closeDialog"> | ||||
|         <el-form ref="form" :model="form" :rules="rules" label-width="90px"> | ||||
|             <el-form-item label="网络名称" prop="networkName"> | ||||
|                 {{ form.networkName }} | ||||
| @ -11,7 +12,7 @@ | ||||
|                 {{ form.amount }} | ||||
|             </el-form-item> | ||||
|             <el-form-item label="提现状态" prop="statusName"> | ||||
|                {{form.statusName}} | ||||
|                 {{ form.statusName }} | ||||
|             </el-form-item> | ||||
|             <!-- <el-form-item label="确认时间" prop="confirmTime"> | ||||
|                 <el-date-picker v-model="form.confirmTime" type="datetime" placeholder="选择日期"> | ||||
| @ -131,7 +132,7 @@ export default { | ||||
|                 this.loading = false | ||||
|             } | ||||
|         }, | ||||
|         closeDialog(){   | ||||
|         closeDialog() { | ||||
|             this.form = {} | ||||
|             this.loading = false | ||||
|             this.$emit('update:open', false) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user