Merge branch 'master' of http://gitea.zianxin.com:8418/zianxin/biz-pc-cloud
This commit is contained in:
commit
e50453010e
4 files changed
+81
-4
No files matched your search
@@ -65,7 +65,7 @@ const onSubmit = async () => {
|
||||
if (!valid) return false
|
||||
try {
|
||||
loading.value = true
|
||||
// fastCreateCard(form)
|
||||
await walletActiveApi.adminBindCard(form)
|
||||
useMessage().success("绑定成功")
|
||||
visible.value = false
|
||||
emit("refresh")
|
||||
|
||||
@@ -74,10 +74,33 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.isActiveHardware == 1" icon="Postcard" text type="primary" @click="doRefreshAvatar(row)"
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_refresh_active'"
|
||||
v-if="row.isActiveHardware == 1"
|
||||
icon="Postcard"
|
||||
text
|
||||
type="primary"
|
||||
@click="doRefreshAvatar(row)"
|
||||
>重新激活</el-button
|
||||
>
|
||||
<el-button icon="Postcard" text type="primary" @click="bindUserFormDialogRef.openDialog(row.id)">绑定用户</el-button>
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_bind_card'"
|
||||
v-if="!row.userId"
|
||||
icon="Paperclip"
|
||||
text
|
||||
type="primary"
|
||||
@click="bindUserFormDialogRef.openDialog(row.id)"
|
||||
>绑定用户</el-button
|
||||
>
|
||||
<el-button
|
||||
v-auth="'wallet_walletActive_cancel_bind_card'"
|
||||
v-if="row.userId"
|
||||
icon="Scissor"
|
||||
text
|
||||
type="primary"
|
||||
@click="doCancelBind(row)"
|
||||
>取消绑定</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
@@ -101,7 +124,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemWalletActive">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { refreshAvatar, pageJoin, delObjs } from "/@/api/wallet/wallet-active"
|
||||
import { refreshAvatar, cancelAdminBindCard, pageJoin, delObjs } from "/@/api/wallet/wallet-active"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { ElLoading } from "element-plus"
|
||||
@@ -165,6 +188,24 @@ const doRefreshAvatar = async (row: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 取消绑定
|
||||
const doCancelBind = async (row: any) => {
|
||||
let loading: any = null
|
||||
try {
|
||||
await useMessage().delConfirm("是否取消绑定")
|
||||
loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: "提交中",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
})
|
||||
await cancelAdminBindCard({ activeId: row.id })
|
||||
useMessage().success("取消绑定成功")
|
||||
getDataList()
|
||||
} finally {
|
||||
setTimeout(() => loading.close(), 1000)
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user