From 883a556ab5e35d967fa02373fa12ad791882b797 Mon Sep 17 00:00:00 2001 From: shawko Date: Sun, 10 May 2026 16:04:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E7=BB=91=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/service/org/class-student.ts | 8 ++++++++ .../src/views/org/class-student/home.vue | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/playground/src/api/service/org/class-student.ts b/playground/src/api/service/org/class-student.ts index 97a4a02..2ac7fab 100644 --- a/playground/src/api/service/org/class-student.ts +++ b/playground/src/api/service/org/class-student.ts @@ -1,6 +1,14 @@ +import { post } from '#/api/http' + import { BasicService } from '../basic' class ClassStudentService extends BasicService { + async unbindDevice(userId: any) { + await post( + `/org/student/unbindDevice?userId=${encodeURIComponent(userId)}`, + ) + } + protected findPageUrl(): string { return '/org/student/list' } diff --git a/playground/src/views/org/class-student/home.vue b/playground/src/views/org/class-student/home.vue index 7ca4087..950ef1c 100644 --- a/playground/src/views/org/class-student/home.vue +++ b/playground/src/views/org/class-student/home.vue @@ -11,6 +11,7 @@ import { useAccessStore, useUserStore } from '@vben/stores' import { classStudentService } from '#/api/service/org/class-student' import { mj_form_text } from '#/components/mj/mj-table' import { cellClassName } from '#/hooks/user' +import hud from '#/utils/hud' import obj from '#/utils/obj' import CoinAccounts from '../common/coin-accounts.vue' @@ -123,6 +124,10 @@ const grid = { field: 'account', title: '学员账号', }, + { + field: 'simSerialNumber', + title: '设备编码', + }, { field: 'diamond', title: '钻石', @@ -168,6 +173,18 @@ function checkCoin(row: any) { selectUser.value = row showCoinAccount.value = true } + +// 解绑设备 +function unbindDevice(row: any) { + hud.confirmLoad(`确定解绑【${row.userName}】的设备吗?`, { + task: async () => { + await classStudentService.unbindDevice(row.userId) + gridRef.value?.reload() + }, + hideError: true, + option: '解绑', + }) +}