feat: 解绑设备
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
parent
5169a8c50d
commit
883a556ab5
@ -1,6 +1,14 @@
|
|||||||
|
import { post } from '#/api/http'
|
||||||
|
|
||||||
import { BasicService } from '../basic'
|
import { BasicService } from '../basic'
|
||||||
|
|
||||||
class ClassStudentService extends BasicService {
|
class ClassStudentService extends BasicService {
|
||||||
|
async unbindDevice(userId: any) {
|
||||||
|
await post(
|
||||||
|
`/org/student/unbindDevice?userId=${encodeURIComponent(userId)}`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
protected findPageUrl(): string {
|
protected findPageUrl(): string {
|
||||||
return '/org/student/list'
|
return '/org/student/list'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { useAccessStore, useUserStore } from '@vben/stores'
|
|||||||
import { classStudentService } from '#/api/service/org/class-student'
|
import { classStudentService } from '#/api/service/org/class-student'
|
||||||
import { mj_form_text } from '#/components/mj/mj-table'
|
import { mj_form_text } from '#/components/mj/mj-table'
|
||||||
import { cellClassName } from '#/hooks/user'
|
import { cellClassName } from '#/hooks/user'
|
||||||
|
import hud from '#/utils/hud'
|
||||||
import obj from '#/utils/obj'
|
import obj from '#/utils/obj'
|
||||||
|
|
||||||
import CoinAccounts from '../common/coin-accounts.vue'
|
import CoinAccounts from '../common/coin-accounts.vue'
|
||||||
@ -123,6 +124,10 @@ const grid = {
|
|||||||
field: 'account',
|
field: 'account',
|
||||||
title: '学员账号',
|
title: '学员账号',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'simSerialNumber',
|
||||||
|
title: '设备编码',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'diamond',
|
field: 'diamond',
|
||||||
title: '钻石',
|
title: '钻石',
|
||||||
@ -168,6 +173,18 @@ function checkCoin(row: any) {
|
|||||||
selectUser.value = row
|
selectUser.value = row
|
||||||
showCoinAccount.value = true
|
showCoinAccount.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 解绑设备
|
||||||
|
function unbindDevice(row: any) {
|
||||||
|
hud.confirmLoad(`确定解绑【${row.userName}】的设备吗?`, {
|
||||||
|
task: async () => {
|
||||||
|
await classStudentService.unbindDevice(row.userId)
|
||||||
|
gridRef.value?.reload()
|
||||||
|
},
|
||||||
|
hideError: true,
|
||||||
|
option: '解绑',
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -189,6 +206,7 @@ function checkCoin(row: any) {
|
|||||||
<el-button type="success" :icon="IcomoonCoin" @click="checkCoin(row)">
|
<el-button type="success" :icon="IcomoonCoin" @click="checkCoin(row)">
|
||||||
乐贝账户
|
乐贝账户
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="danger" @click="unbindDevice(row)"> 解绑 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</MjTable>
|
</MjTable>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user