fetch(modify):修改bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m20s

This commit is contained in:
sexygoat
2026-01-31 16:33:21 +08:00
parent 16d53709ef
commit ecb79dae43
20 changed files with 1369 additions and 649 deletions

View File

@@ -30,7 +30,6 @@
<ElButton type="info" @click="handleBatchSetSeries" :disabled="!selectedDevices.length">
批量设置套餐系列
</ElButton>
<ElButton @click="handleImportDevice">导入设备</ElButton>
</template>
</ArtTableHeader>
@@ -300,22 +299,13 @@
{{ currentDeviceDetail.status_name }}
</ElTag>
</ElDescriptionsItem>
<ElDescriptionsItem label="店铺名称">{{
currentDeviceDetail.shop_name || '--'
}}</ElDescriptionsItem>
<ElDescriptionsItem label="批次号">{{
<ElDescriptionsItem label="批次号" :span="2">{{
currentDeviceDetail.batch_no || '--'
}}</ElDescriptionsItem>
<ElDescriptionsItem label="激活时间">{{
currentDeviceDetail.activated_at || '--'
}}</ElDescriptionsItem>
<ElDescriptionsItem label="创建时间">{{
<ElDescriptionsItem label="创建时间" :span="3">{{
currentDeviceDetail.created_at || '--'
}}</ElDescriptionsItem>
<ElDescriptionsItem label="更新时间">{{
currentDeviceDetail.updated_at || '--'
}}</ElDescriptionsItem>
</ElDescriptions>
</ElDialog>
</ElCard>
@@ -385,12 +375,9 @@
device_no: '',
device_name: '',
status: undefined as DeviceStatus | undefined,
shop_id: undefined as number | undefined,
batch_no: '',
device_type: '',
manufacturer: '',
created_at_start: '',
created_at_end: ''
manufacturer: ''
}
// 搜索表单
@@ -478,9 +465,7 @@
{ label: '最大插槽数', prop: 'max_sim_slots' },
{ label: '已绑定卡数', prop: 'bound_card_count' },
{ label: '状态', prop: 'status' },
{ label: '店铺', prop: 'shop_name' },
{ label: '批次号', prop: 'batch_no' },
{ label: '激活时间', prop: 'activated_at' },
{ label: '创建时间', prop: 'created_at' },
{ label: '操作', prop: 'operation' }
]
@@ -610,24 +595,12 @@
return h(ElTag, { type: status.type }, () => status.text)
}
},
{
prop: 'shop_name',
label: '店铺',
minWidth: 120,
formatter: (row: Device) => row.shop_name || '-'
},
{
prop: 'batch_no',
label: '批次号',
minWidth: 120,
minWidth: 160,
formatter: (row: Device) => row.batch_no || '-'
},
{
prop: 'activated_at',
label: '激活时间',
width: 180,
formatter: (row: Device) => (row.activated_at ? formatDateTime(row.activated_at) : '-')
},
{
prop: 'created_at',
label: '创建时间',
@@ -637,14 +610,10 @@
{
prop: 'operation',
label: '操作',
width: 150,
width: 100,
fixed: 'right',
formatter: (row: Device) => {
return h('div', { style: 'display: flex; gap: 8px;' }, [
h(ArtButtonTable, {
type: 'view',
onClick: () => viewDeviceDetail(row)
}),
h(ArtButtonTable, {
type: 'delete',
onClick: () => deleteDevice(row)
@@ -681,16 +650,13 @@
device_no: searchForm.device_no || undefined,
device_name: searchForm.device_name || undefined,
status: searchForm.status,
shop_id: searchForm.shop_id,
batch_no: searchForm.batch_no || undefined,
device_type: searchForm.device_type || undefined,
manufacturer: searchForm.manufacturer || undefined,
created_at_start: searchForm.created_at_start || undefined,
created_at_end: searchForm.created_at_end || undefined
manufacturer: searchForm.manufacturer || undefined
}
const res = await DeviceService.getDevices(params)
if (res.code === 0 && res.data) {
deviceList.value = res.data.list || []
deviceList.value = res.data.items || []
pagination.total = res.data.total || 0
}
} catch (error) {
@@ -735,14 +701,6 @@
selectedDevices.value = selection
}
// 查看设备详情
const viewDeviceDetail = (row: Device) => {
router.push({
path: '/asset-management/device-detail',
query: { id: row.id }
})
}
// 删除设备
const deleteDevice = (row: Device) => {
ElMessageBox.confirm(`确定删除设备 ${row.device_no} 吗?删除后将自动解绑所有卡。`, '删除确认', {
@@ -869,11 +827,6 @@
recallForm.remark = ''
}
// 导入设备
const handleImportDevice = () => {
router.push('/batch/device-import')
}
// 批量设置套餐系列
const handleBatchSetSeries = async () => {
if (selectedDevices.value.length === 0) {