feat: 卡和设备实名状态筛选
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m40s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m40s
This commit is contained in:
@@ -349,6 +349,16 @@ export class CardService extends BaseService {
|
||||
return this.getPage<StandaloneIotCard>('/api/admin/iot-cards/standalone', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 IoT 卡列表
|
||||
* @param params 查询参数
|
||||
*/
|
||||
static getIotCards(
|
||||
params?: StandaloneCardQueryParams
|
||||
): Promise<PaginationResponse<StandaloneIotCard>> {
|
||||
return this.getPage<StandaloneIotCard>('/api/admin/iot-cards', params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量分配单卡
|
||||
* @param data 分配参数
|
||||
|
||||
@@ -346,6 +346,7 @@ export enum StandaloneCardStatus {
|
||||
export interface StandaloneCardQueryParams extends PaginationParams {
|
||||
keyword?: string // 通用关键字搜索
|
||||
has_active_package?: boolean // has active package filter
|
||||
real_name_status?: 0 | 1 // 实名状态:0 未实名 / 1 已实名
|
||||
carrier_name?: string // carrier name filter
|
||||
is_standalone?: boolean // standalone filter
|
||||
status?: StandaloneCardStatus // 状态
|
||||
@@ -384,7 +385,8 @@ export interface StandaloneIotCard {
|
||||
status: StandaloneCardStatus // 状态
|
||||
activation_status: number // 激活状态 (0:未激活, 1:已激活)
|
||||
network_status: number // 网络状态 (0:停机, 1:开机)
|
||||
real_name_status: number // 实名状态 (0:未实名, 1:已实名)
|
||||
real_name_status: 0 | 1 // 实名状态 (0:未实名, 1:已实名)
|
||||
real_name_status_name: string // 实名状态名称
|
||||
generation?: number // 资产世代编号(初始值1,每次换货转新后+1)
|
||||
asset_status?: AssetStatus // 业务状态 (1:在库, 2:已销售, 3:已换货, 4:已停用)
|
||||
asset_status_name?: string // 业务状态名称(中文)
|
||||
|
||||
@@ -65,6 +65,8 @@ export interface Device {
|
||||
imei?: string // IMEI(设备国际移动设备识别码)
|
||||
sn?: string // 设备序列号
|
||||
realname_policy?: string // 实名认证策略
|
||||
real_name_status: 0 | 1 // 实名状态 (0:未实名, 1:已实名)
|
||||
real_name_status_name: string // 实名状态名称
|
||||
authorized_enterprise_id?: number | null // 当前有效授权企业ID
|
||||
authorized_enterprise_name?: string | null // 当前有效授权企业名称
|
||||
}
|
||||
@@ -72,6 +74,7 @@ export interface Device {
|
||||
// 设备查询参数
|
||||
export interface DeviceQueryParams extends PaginationParams {
|
||||
has_active_package?: boolean // has active package filter
|
||||
real_name_status?: 0 | 1 // 实名状态:0 未实名 / 1 已实名
|
||||
virtual_no?: string // 虚拟号(模糊查询,原 device_no)
|
||||
device_name?: string // 设备名称(模糊查询)
|
||||
status?: DeviceStatus // 状态
|
||||
|
||||
@@ -1337,6 +1337,7 @@
|
||||
device_name: '',
|
||||
status: undefined as DeviceStatus | undefined,
|
||||
activation_status: undefined as number | undefined,
|
||||
real_name_status: undefined as 0 | 1 | undefined,
|
||||
batch_no: '',
|
||||
device_type: '',
|
||||
manufacturer: '',
|
||||
@@ -1447,6 +1448,19 @@
|
||||
{ label: '已激活', value: 1 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '实名状态',
|
||||
prop: 'real_name_status',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '全部'
|
||||
},
|
||||
options: () => [
|
||||
{ label: '已实名', value: 1 },
|
||||
{ label: '未实名', value: 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '批次号',
|
||||
prop: 'batch_no',
|
||||
@@ -1599,6 +1613,7 @@
|
||||
{ label: '资产世代', prop: 'generation' },
|
||||
{ label: '业务状态', prop: 'asset_status' },
|
||||
{ label: '激活状态', prop: 'activation_status_name' },
|
||||
{ label: '实名状态', prop: 'real_name_status_name' },
|
||||
{ label: '在线状态', prop: 'online_status' },
|
||||
{ label: '实名策略', prop: 'realname_policy' },
|
||||
{ label: '切卡模式', prop: 'switch_mode' },
|
||||
@@ -1934,6 +1949,12 @@
|
||||
width: 120,
|
||||
formatter: (row: Device) => row.activation_status_name || '-'
|
||||
},
|
||||
{
|
||||
prop: 'real_name_status_name',
|
||||
label: '实名状态',
|
||||
width: 100,
|
||||
formatter: (row: Device) => row.real_name_status_name || '-'
|
||||
},
|
||||
{
|
||||
prop: 'online_status',
|
||||
label: '在线状态',
|
||||
@@ -2126,6 +2147,7 @@
|
||||
device_name: searchForm.device_name || undefined,
|
||||
status: searchForm.status,
|
||||
activation_status: searchForm.activation_status ?? undefined,
|
||||
real_name_status: searchForm.real_name_status ?? undefined,
|
||||
batch_no: searchForm.batch_no || undefined,
|
||||
device_type: searchForm.device_type || undefined,
|
||||
manufacturer: searchForm.manufacturer || undefined,
|
||||
@@ -2156,6 +2178,7 @@
|
||||
device_name: searchForm.device_name || undefined,
|
||||
status: searchForm.status,
|
||||
activation_status: searchForm.activation_status ?? undefined,
|
||||
real_name_status: searchForm.real_name_status ?? undefined,
|
||||
batch_no: searchForm.batch_no || undefined,
|
||||
device_type: searchForm.device_type || undefined,
|
||||
manufacturer: searchForm.manufacturer || undefined,
|
||||
|
||||
@@ -1556,6 +1556,7 @@
|
||||
const initialSearchState: {
|
||||
status: undefined | number
|
||||
network_status: undefined | number
|
||||
real_name_status: undefined | 0 | 1
|
||||
iccid: string
|
||||
carrier_name: string
|
||||
msisdn: string
|
||||
@@ -1572,6 +1573,7 @@
|
||||
} = {
|
||||
status: undefined,
|
||||
network_status: undefined,
|
||||
real_name_status: undefined,
|
||||
iccid: '',
|
||||
carrier_name: '',
|
||||
msisdn: '',
|
||||
@@ -1743,6 +1745,19 @@
|
||||
{ label: '正常', value: 1 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '实名状态',
|
||||
prop: 'real_name_status',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '全部'
|
||||
},
|
||||
options: () => [
|
||||
{ label: '已实名', value: 1 },
|
||||
{ label: '未实名', value: 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '卡虚拟号',
|
||||
prop: 'virtual_no',
|
||||
@@ -2156,11 +2171,7 @@
|
||||
prop: 'real_name_status',
|
||||
label: '实名状态',
|
||||
width: 100,
|
||||
formatter: (row: StandaloneIotCard) => {
|
||||
const type = row.real_name_status === 1 ? 'success' : 'warning'
|
||||
const text = row.real_name_status === 1 ? '已实名' : '未实名'
|
||||
return h(ElTag, { type }, () => text)
|
||||
}
|
||||
formatter: (row: StandaloneIotCard) => row.real_name_status_name || '-'
|
||||
},
|
||||
{
|
||||
prop: 'realname_policy',
|
||||
@@ -2338,7 +2349,7 @@
|
||||
}
|
||||
})
|
||||
|
||||
const res = await CardService.getStandaloneIotCards(params)
|
||||
const res = await CardService.getIotCards(params)
|
||||
if (res.code === 0) {
|
||||
cardList.value = res.data.items || []
|
||||
pagination.total = res.data.total || 0
|
||||
|
||||
Reference in New Issue
Block a user