fix(operator): fix operator edit issue
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m51s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m51s
This commit is contained in:
@@ -60,6 +60,21 @@
|
||||
{{ getAssetStatusName(cardInfo?.status) }}
|
||||
</ElTag>
|
||||
</ElDescriptionsItem>
|
||||
|
||||
<template v-if="cardInfo?.bound_device_id">
|
||||
<ElDescriptionsItem label="绑定设备号">
|
||||
<ElButton
|
||||
type="primary"
|
||||
link
|
||||
@click="emit('navigateToDevice', cardInfo!.bound_device_no!)"
|
||||
>
|
||||
{{ cardInfo?.bound_device_no || '-' }}
|
||||
</ElButton>
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="绑定设备名称">
|
||||
{{ cardInfo?.bound_device_name || '-' }}
|
||||
</ElDescriptionsItem>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- 设备专属字段 -->
|
||||
@@ -329,17 +344,7 @@
|
||||
</ElDescriptionsItem>
|
||||
</ElDescriptions>
|
||||
</div>
|
||||
<ElAlert
|
||||
v-else
|
||||
title="设备实时信息不可用"
|
||||
type="warning"
|
||||
:closable="false"
|
||||
style="margin-top: 16px"
|
||||
>
|
||||
<template #default>
|
||||
<div>Gateway 不可达或设备离线,无法获取实时信息</div>
|
||||
</template>
|
||||
</ElAlert>
|
||||
<ElEmpty v-else description="暂无实时信息" :image-size="80" style="margin-top: 16px" />
|
||||
</template>
|
||||
|
||||
<!-- IoT卡操作按钮 -->
|
||||
@@ -377,7 +382,7 @@
|
||||
ElTableColumn,
|
||||
ElButton,
|
||||
ElEmpty,
|
||||
ElAlert
|
||||
ElMessageBox
|
||||
} from 'element-plus'
|
||||
import { useAssetFormatters } from '../composables/useAssetFormatters'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
@@ -415,6 +420,9 @@
|
||||
series_name?: string
|
||||
real_name_at?: string
|
||||
supplier?: string
|
||||
bound_device_id?: number
|
||||
bound_device_no?: string
|
||||
bound_device_name?: string
|
||||
bound_card_count?: number
|
||||
max_sim_slots?: number
|
||||
activated_at?: string
|
||||
@@ -481,6 +489,7 @@
|
||||
(e: 'enableBindingCard', payload: { card: BindingCard }): void
|
||||
(e: 'disableBindingCard', payload: { card: BindingCard }): void
|
||||
(e: 'navigateToCard', iccid: string): void
|
||||
(e: 'navigateToDevice', deviceNo: string): void
|
||||
}
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
@@ -565,11 +574,27 @@
|
||||
|
||||
// 绑定卡操作
|
||||
const handleEnableBindingCard = (card: BindingCard) => {
|
||||
emit('enableBindingCard', { card })
|
||||
ElMessageBox.confirm(`确定要启用此卡(${card.iccid})吗?`, '启用确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
emit('enableBindingCard', { card })
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const handleDisableBindingCard = (card: BindingCard) => {
|
||||
emit('disableBindingCard', { card })
|
||||
ElMessageBox.confirm(`确定要停用此卡(${card.iccid})吗?`, '停用确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
emit('disableBindingCard', { card })
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user