This commit is contained in:
@@ -89,7 +89,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取资产分配详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -107,8 +106,8 @@
|
||||
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
padding-bottom: 16px;
|
||||
|
||||
.detail-title {
|
||||
@@ -122,10 +121,10 @@
|
||||
.loading-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 60px 20px;
|
||||
gap: 12px;
|
||||
color: var(--el-text-color-secondary);
|
||||
|
||||
.el-icon {
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取分配记录列表失败')
|
||||
console.log('获取分配记录列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -382,8 +382,10 @@
|
||||
const handleContextMenuSelect = (item: MenuItemType) => {
|
||||
if (!currentRow.value) return
|
||||
|
||||
switch (item.key) {
|
||||
switch (
|
||||
item.key
|
||||
// No cases available
|
||||
) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取授权记录详情失败')
|
||||
console.log('获取授权记录详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -112,8 +112,8 @@
|
||||
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
padding-bottom: 16px;
|
||||
|
||||
.detail-title {
|
||||
@@ -127,10 +127,10 @@
|
||||
.loading-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 60px 20px;
|
||||
gap: 12px;
|
||||
color: var(--el-text-color-secondary);
|
||||
|
||||
.el-icon {
|
||||
|
||||
@@ -343,7 +343,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取授权记录列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -417,7 +416,6 @@
|
||||
getTableData()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('备注修改失败')
|
||||
} finally {
|
||||
remarkLoading.value = false
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
|
||||
<!-- 设备详情弹窗 -->
|
||||
<ElDialog v-model="deviceDetailDialogVisible" title="设备详情" width="1000px">
|
||||
<div v-if="deviceDetailLoading" style="text-align: center; padding: 40px 0">
|
||||
<div v-if="deviceDetailLoading" style=" padding: 40px 0;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
</div>
|
||||
<div v-else-if="currentDeviceDetail">
|
||||
@@ -398,14 +398,16 @@
|
||||
</ElCard>
|
||||
|
||||
<!-- 已绑定卡片列表 -->
|
||||
<div v-if="deviceCardsLoading" style="text-align: center; padding: 40px 0">
|
||||
<div v-if="deviceCardsLoading" style=" padding: 40px 0;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
</div>
|
||||
<div v-else>
|
||||
<ElTable :data="deviceCards" border style="width: 100%">
|
||||
<ElTableColumn prop="slot_position" label="插槽位置" width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex; align-items: center; justify-content: center; gap: 4px">
|
||||
<div
|
||||
style="display: flex; gap: 4px; align-items: center; justify-content: center"
|
||||
>
|
||||
<span>{{ row.slot_position }}</span>
|
||||
<ElTag v-if="row.is_current" type="success" size="small">当前</ElTag>
|
||||
</div>
|
||||
@@ -435,7 +437,7 @@
|
||||
</ElTable>
|
||||
<div
|
||||
v-if="deviceCards.length === 0"
|
||||
style="text-align: center; padding: 20px; color: #909399"
|
||||
style=" padding: 20px; color: #909399;text-align: center"
|
||||
>
|
||||
暂无设备绑定的卡
|
||||
</div>
|
||||
@@ -451,7 +453,7 @@
|
||||
/>
|
||||
|
||||
<!-- 设置限速对话框 -->
|
||||
<ElDialog v-model="speedLimitDialogVisible" title="设置限速" width="500px">
|
||||
<ElDialog v-model="speedLimitDialogVisible" title="设置限速" width="50%">
|
||||
<ElForm
|
||||
ref="speedLimitFormRef"
|
||||
:model="speedLimitForm"
|
||||
@@ -469,7 +471,7 @@
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div style="color: #909399; font-size: 12px; margin-top: 4px">单位: KB/s</div>
|
||||
<div style=" margin-top: 4px; font-size: 12px;color: #909399">单位: KB/s</div>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="上行速率" prop="upload_speed">
|
||||
<ElInputNumber
|
||||
@@ -479,7 +481,7 @@
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<div style="color: #909399; font-size: 12px; margin-top: 4px">单位: KB/s</div>
|
||||
<div style=" margin-top: 4px; font-size: 12px;color: #909399">单位: KB/s</div>
|
||||
</ElFormItem>
|
||||
</ElForm>
|
||||
<template #footer>
|
||||
@@ -492,7 +494,7 @@
|
||||
|
||||
<!-- 切换SIM卡对话框 -->
|
||||
<ElDialog v-model="switchCardDialogVisible" title="切换SIM卡" width="600px">
|
||||
<div v-if="loadingDeviceCards" style="text-align: center; padding: 40px">
|
||||
<div v-if="loadingDeviceCards" style=" padding: 40px;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
<div style="margin-top: 16px">加载设备绑定的卡列表中...</div>
|
||||
</div>
|
||||
@@ -534,9 +536,11 @@
|
||||
:label="`${card.iccid} - 插槽${card.slot_position} - ${card.carrier_name}${card.is_current ? ' (当前)' : ''}`"
|
||||
:value="card.iccid"
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<span>{{ card.iccid }}</span>
|
||||
<ElTag size="small" style="margin-left: 10px">插槽{{ card.slot_position }}</ElTag>
|
||||
<ElTag size="small" style="margin-left: 10px"
|
||||
>插槽{{ card.slot_position }}</ElTag
|
||||
>
|
||||
</div>
|
||||
</ElOption>
|
||||
</ElSelect>
|
||||
@@ -1042,7 +1046,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('解绑卡失败:', error)
|
||||
ElMessage.error(error?.message || '解绑失败')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -1214,13 +1217,15 @@
|
||||
prop: 'last_online_time',
|
||||
label: '最后在线时间',
|
||||
width: 180,
|
||||
formatter: (row: Device) => row.last_online_time ? formatDateTime(row.last_online_time) : '-'
|
||||
formatter: (row: Device) =>
|
||||
row.last_online_time ? formatDateTime(row.last_online_time) : '-'
|
||||
},
|
||||
{
|
||||
prop: 'last_gateway_sync_at',
|
||||
label: '最后同步时间',
|
||||
width: 180,
|
||||
formatter: (row: Device) => row.last_gateway_sync_at ? formatDateTime(row.last_gateway_sync_at) : '-'
|
||||
formatter: (row: Device) =>
|
||||
row.last_gateway_sync_at ? formatDateTime(row.last_gateway_sync_at) : '-'
|
||||
},
|
||||
{
|
||||
prop: 'batch_no',
|
||||
@@ -1310,7 +1315,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取设备列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -1368,7 +1372,6 @@
|
||||
await getTableData()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('删除失败')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -1416,7 +1419,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('分配失败')
|
||||
} finally {
|
||||
allocateLoading.value = false
|
||||
}
|
||||
@@ -1467,7 +1469,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('回收失败')
|
||||
} finally {
|
||||
recallLoading.value = false
|
||||
}
|
||||
@@ -1510,7 +1511,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取套餐系列列表失败:', error)
|
||||
ElMessage.error('获取套餐系列列表失败')
|
||||
} finally {
|
||||
seriesLoading.value = false
|
||||
}
|
||||
@@ -1711,7 +1711,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('重启设备失败:', error)
|
||||
ElMessage.error(error?.message || '重启失败')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -1740,7 +1739,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('恢复出厂设置失败:', error)
|
||||
ElMessage.error(error?.message || '操作失败')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -1776,7 +1774,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('设置限速失败:', error)
|
||||
ElMessage.error(error?.message || '设置失败')
|
||||
} finally {
|
||||
speedLimitLoading.value = false
|
||||
}
|
||||
@@ -1818,7 +1815,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载设备绑定卡列表失败:', error)
|
||||
ElMessage.error('加载卡列表失败')
|
||||
} finally {
|
||||
loadingDeviceCards.value = false
|
||||
}
|
||||
@@ -1843,7 +1839,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('切换SIM卡失败:', error)
|
||||
ElMessage.error(error?.message || '切换失败')
|
||||
} finally {
|
||||
switchCardLoading.value = false
|
||||
}
|
||||
@@ -1881,7 +1876,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('设置WiFi失败:', error)
|
||||
ElMessage.error(error?.message || '设置失败')
|
||||
} finally {
|
||||
setWiFiLoading.value = false
|
||||
}
|
||||
@@ -1915,12 +1909,12 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (hasAuth('device:set_speed_limit')) {
|
||||
items.push({
|
||||
key: 'speed-limit',
|
||||
label: '设置限速'
|
||||
})
|
||||
}
|
||||
// if (hasAuth('device:set_speed_limit')) {
|
||||
// items.push({
|
||||
// key: 'speed-limit',
|
||||
// label: '设置限速'
|
||||
// })
|
||||
// }
|
||||
|
||||
if (hasAuth('device:switch_sim')) {
|
||||
items.push({
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询设备详情失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败,请检查设备号是否正确')
|
||||
console.log(error?.message || '查询失败,请检查设备号是否正确')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -506,7 +506,6 @@
|
||||
ElMessage.success('设备导入模板下载成功')
|
||||
} catch (error) {
|
||||
console.error('下载模板失败:', error)
|
||||
ElMessage.error('下载模板失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,7 +594,6 @@
|
||||
})
|
||||
} catch (error: any) {
|
||||
console.error('设备导入失败:', error)
|
||||
ElMessage.error(error.message || '设备导入失败')
|
||||
} finally {
|
||||
uploading.value = false
|
||||
}
|
||||
@@ -645,7 +643,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('下载失败数据失败:', error)
|
||||
ElMessage.error('下载失败数据失败')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -539,7 +539,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error(t('enterpriseDevices.messages.loadFailed'))
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -607,7 +606,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取设备列表失败')
|
||||
} finally {
|
||||
availableDevicesLoading.value = false
|
||||
}
|
||||
@@ -699,7 +697,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error(t('enterpriseDevices.messages.allocateFailed'))
|
||||
} finally {
|
||||
allocateLoading.value = false
|
||||
}
|
||||
@@ -799,8 +796,8 @@
|
||||
.device-selection-info {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 12px;
|
||||
color: var(--el-color-info);
|
||||
font-size: 14px;
|
||||
color: var(--el-color-info);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<span>加载中...</span>
|
||||
</div>
|
||||
</ElCard>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -64,8 +63,7 @@
|
||||
{ label: '换货单号', prop: 'exchange_no' },
|
||||
{
|
||||
label: '状态',
|
||||
render: (data) =>
|
||||
h(ElTag, { type: getStatusType(data.status) }, () => data.status_text)
|
||||
render: (data) => h(ElTag, { type: getStatusType(data.status) }, () => data.status_text)
|
||||
},
|
||||
{
|
||||
label: '换货原因',
|
||||
@@ -80,11 +78,7 @@
|
||||
{
|
||||
label: '新资产类型',
|
||||
formatter: (_, data) =>
|
||||
data.new_asset_type
|
||||
? data.new_asset_type === 'iot_card'
|
||||
? 'IoT卡'
|
||||
: '设备'
|
||||
: '--'
|
||||
data.new_asset_type ? (data.new_asset_type === 'iot_card' ? 'IoT卡' : '设备') : '--'
|
||||
},
|
||||
{
|
||||
label: '新资产标识符',
|
||||
|
||||
@@ -13,16 +13,9 @@
|
||||
|
||||
<ElCard shadow="never" class="art-table-card">
|
||||
<!-- 表格头部 -->
|
||||
<ArtTableHeader
|
||||
v-model:columns="columnChecks"
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<ArtTableHeader v-model:columns="columnChecks" @refresh="handleRefresh">
|
||||
<template #left>
|
||||
<ElButton
|
||||
type="primary"
|
||||
@click="showCreateDialog"
|
||||
v-permission="'exchange:create'"
|
||||
>
|
||||
<ElButton type="primary" @click="showCreateDialog" v-permission="'exchange:create'">
|
||||
创建换货单
|
||||
</ElButton>
|
||||
</template>
|
||||
@@ -68,12 +61,7 @@
|
||||
:close-on-click-modal="false"
|
||||
@closed="handleCloseCreateDialog"
|
||||
>
|
||||
<ElForm
|
||||
ref="createFormRef"
|
||||
:model="createForm"
|
||||
:rules="createRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<ElForm ref="createFormRef" :model="createForm" :rules="createRules" label-width="120px">
|
||||
<ElFormItem label="换货原因" prop="exchange_reason">
|
||||
<ElInput
|
||||
v-model="createForm.exchange_reason"
|
||||
@@ -83,7 +71,11 @@
|
||||
/>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="旧资产类型" prop="old_asset_type">
|
||||
<ElSelect v-model="createForm.old_asset_type" placeholder="请选择旧资产类型" style="width: 100%">
|
||||
<ElSelect
|
||||
v-model="createForm.old_asset_type"
|
||||
placeholder="请选择旧资产类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<ElOption label="IoT卡" value="iot_card" />
|
||||
<ElOption label="设备" value="device" />
|
||||
</ElSelect>
|
||||
@@ -122,12 +114,7 @@
|
||||
:close-on-click-modal="false"
|
||||
@closed="handleCloseShipDialog"
|
||||
>
|
||||
<ElForm
|
||||
ref="shipFormRef"
|
||||
:model="shipForm"
|
||||
:rules="shipRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<ElForm ref="shipFormRef" :model="shipForm" :rules="shipRules" label-width="120px">
|
||||
<ElFormItem label="新资产标识符" prop="new_identifier">
|
||||
<ElInput
|
||||
v-model="shipForm.new_identifier"
|
||||
@@ -142,7 +129,7 @@
|
||||
</ElFormItem>
|
||||
<ElFormItem label="是否迁移数据">
|
||||
<ElSwitch v-model="shipForm.migrate_data" />
|
||||
<div style="font-size: 12px; color: #909399; margin-top: 4px">
|
||||
<div style=" margin-top: 4px;font-size: 12px; color: #909399">
|
||||
开启后将迁移钱包余额、套餐记录到新资产
|
||||
</div>
|
||||
</ElFormItem>
|
||||
@@ -185,12 +172,8 @@
|
||||
const router = useRouter()
|
||||
|
||||
// 右键菜单相关
|
||||
const {
|
||||
showContextMenuHint,
|
||||
hintPosition,
|
||||
handleCellMouseEnter,
|
||||
handleCellMouseLeave
|
||||
} = useTableContextMenu()
|
||||
const { showContextMenuHint, hintPosition, handleCellMouseEnter, handleCellMouseLeave } =
|
||||
useTableContextMenu()
|
||||
|
||||
const contextMenuRef = ref<InstanceType<typeof ArtMenuRight>>()
|
||||
const currentExchangeRow = ref<ExchangeResponse | null>(null)
|
||||
@@ -334,15 +317,14 @@
|
||||
prop: 'status',
|
||||
label: '状态',
|
||||
width: 130,
|
||||
formatter: (row: any) =>
|
||||
h(ElTag, { type: getStatusType(row.status) }, () => row.status_text)
|
||||
formatter: (row: any) => h(ElTag, { type: getStatusType(row.status) }, () => row.status_text)
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建时间',
|
||||
width: 180,
|
||||
formatter: (row: any) => formatDateTime(row.created_at)
|
||||
},
|
||||
}
|
||||
])
|
||||
|
||||
const getStatusType = (status: number) => {
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
<!-- 卡详情对话框 -->
|
||||
<ElDialog v-model="cardDetailDialogVisible" title="卡片详情" width="900px">
|
||||
<div v-if="cardDetailLoading" style="text-align: center; padding: 40px">
|
||||
<div v-if="cardDetailLoading" style=" padding: 40px;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
<div style="margin-top: 16px">加载中...</div>
|
||||
</div>
|
||||
@@ -465,7 +465,7 @@
|
||||
|
||||
<!-- 流量使用查询对话框 -->
|
||||
<ElDialog v-model="flowUsageDialogVisible" title="流量使用查询" width="500px">
|
||||
<div v-if="flowUsageLoading" style="text-align: center; padding: 40px">
|
||||
<div v-if="flowUsageLoading" style=" padding: 40px;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
<div style="margin-top: 16px">查询中...</div>
|
||||
</div>
|
||||
@@ -494,7 +494,7 @@
|
||||
|
||||
<!-- 实名状态查询对话框 -->
|
||||
<ElDialog v-model="realnameStatusDialogVisible" title="实名认证状态" width="500px">
|
||||
<div v-if="realnameStatusLoading" style="text-align: center; padding: 40px">
|
||||
<div v-if="realnameStatusLoading" style=" padding: 40px;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
<div style="margin-top: 16px">查询中...</div>
|
||||
</div>
|
||||
@@ -517,7 +517,7 @@
|
||||
|
||||
<!-- 卡实时状态查询对话框 -->
|
||||
<ElDialog v-model="cardStatusDialogVisible" title="卡实时状态" width="500px">
|
||||
<div v-if="cardStatusLoading" style="text-align: center; padding: 40px">
|
||||
<div v-if="cardStatusLoading" style=" padding: 40px;text-align: center">
|
||||
<ElIcon class="is-loading" :size="40"><Loading /></ElIcon>
|
||||
<div style="margin-top: 16px">查询中...</div>
|
||||
</div>
|
||||
@@ -1108,7 +1108,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取单卡列表失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -1364,7 +1363,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('批量回收失败,请重试')
|
||||
} finally {
|
||||
recallLoading.value = false
|
||||
}
|
||||
@@ -1407,7 +1405,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取套餐系列列表失败:', error)
|
||||
ElMessage.error('获取套餐系列列表失败')
|
||||
} finally {
|
||||
seriesLoading.value = false
|
||||
}
|
||||
@@ -1475,7 +1472,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('批量设置套餐系列失败,请重试')
|
||||
} finally {
|
||||
seriesBindingLoading.value = false
|
||||
}
|
||||
@@ -1487,27 +1483,6 @@
|
||||
const moreMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
if (hasAuth('iot_card:network_distribution')) {
|
||||
items.push({
|
||||
key: 'distribution',
|
||||
label: '网卡分销'
|
||||
})
|
||||
}
|
||||
|
||||
if (hasAuth('iot_card:batch_recharge')) {
|
||||
items.push({
|
||||
key: 'recharge',
|
||||
label: '批量充值'
|
||||
})
|
||||
}
|
||||
|
||||
if (hasAuth('iot_card:network_recycle')) {
|
||||
items.push({
|
||||
key: 'recycle',
|
||||
label: '网卡回收'
|
||||
})
|
||||
}
|
||||
|
||||
if (hasAuth('iot_card:batch_download')) {
|
||||
items.push({
|
||||
key: 'download',
|
||||
@@ -1518,7 +1493,7 @@
|
||||
if (hasAuth('iot_card:change_package')) {
|
||||
items.push({
|
||||
key: 'changePackage',
|
||||
label: '变更套餐'
|
||||
label: '其他功能暂定'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1698,7 +1673,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询流量使用失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败')
|
||||
flowUsageDialogVisible.value = false
|
||||
} finally {
|
||||
flowUsageLoading.value = false
|
||||
@@ -1735,7 +1709,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询实名状态失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败')
|
||||
realnameStatusDialogVisible.value = false
|
||||
} finally {
|
||||
realnameStatusLoading.value = false
|
||||
@@ -1755,7 +1728,7 @@
|
||||
// 直接使用 resolveAsset 返回的网络状态
|
||||
cardStatusData.value = {
|
||||
iccid: iccid,
|
||||
cardStatus: res.data. === 1 ? '正常' : '停机',
|
||||
cardStatus: res.data.network_status === 1 ? '正常' : '停机',
|
||||
extend: res.data.extend
|
||||
}
|
||||
} else {
|
||||
@@ -1764,7 +1737,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询卡状态失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败')
|
||||
cardStatusDialogVisible.value = false
|
||||
} finally {
|
||||
cardStatusLoading.value = false
|
||||
@@ -1841,7 +1813,7 @@
|
||||
const res = await CardService.deactivateIotCard(card.id)
|
||||
if (res.code === 0) {
|
||||
ElMessage.success('手动停用成功')
|
||||
getTableData()
|
||||
await getTableData()
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('手动停用失败:', error)
|
||||
|
||||
@@ -131,7 +131,6 @@
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('查询卡片详情失败:', error)
|
||||
ElMessage.error(error?.message || '查询失败,请检查ICCID是否正确')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
align-center
|
||||
destroy-on-close
|
||||
>
|
||||
<div v-if="failDataLoading" style="text-align: center; padding: 40px">
|
||||
<div v-if="failDataLoading" style=" padding: 40px;text-align: center">
|
||||
<ElSkeleton :rows="5" animated />
|
||||
</div>
|
||||
<div v-else-if="failedItems.length > 0">
|
||||
@@ -92,7 +92,7 @@
|
||||
<ElTableColumn prop="message" label="失败原因" min-width="200" show-overflow-tooltip />
|
||||
</ElTable>
|
||||
</div>
|
||||
<div v-else style="text-align: center; padding: 40px">
|
||||
<div v-else style=" padding: 40px;text-align: center">
|
||||
<ElEmpty description="暂无失败数据" />
|
||||
</div>
|
||||
|
||||
@@ -555,7 +555,6 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取失败数据失败:', error)
|
||||
ElMessage.error('获取失败数据失败')
|
||||
} finally {
|
||||
failDataLoading.value = false
|
||||
}
|
||||
@@ -594,7 +593,6 @@
|
||||
ElMessage.success('失败数据下载成功')
|
||||
} catch (error) {
|
||||
console.error('下载失败数据失败:', error)
|
||||
ElMessage.error('下载失败数据失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +651,6 @@
|
||||
ElMessage.success('IoT卡导入模板下载成功')
|
||||
} catch (error) {
|
||||
console.error('下载模板失败:', error)
|
||||
ElMessage.error('下载模板失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,7 +771,6 @@
|
||||
})
|
||||
} catch (error: any) {
|
||||
console.error('IoT卡导入失败:', error)
|
||||
ElMessage.error(error.message || 'IoT卡导入失败')
|
||||
} finally {
|
||||
uploading.value = false
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ElMessage.error('获取任务详情失败')
|
||||
console.log('获取任务详情失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -252,8 +252,8 @@
|
||||
.task-detail-page {
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
padding-bottom: 16px;
|
||||
|
||||
.detail-title {
|
||||
|
||||
Reference in New Issue
Block a user