6 Commits

4 changed files with 13 additions and 6 deletions

View File

@ -99,13 +99,13 @@
<div class="text-[14px]">
<div class="mb-2.5 last:mb-0">
<span class="text-[#717c8e] mr-2.5">属性值</span>
<span class="text-[#0b1d30] font-600">
<span class="text-[var(--el-text-color-primary)] font-600">
{{ formatValueWithUnit(item) }}
</span>
</div>
<div class="mb-2.5 last:mb-0">
<span class="text-[#717c8e] mr-2.5">更新时间</span>
<span class="text-[#0b1d30] text-[12px]">
<span class="text-[var(--el-text-color-primary)] text-[12px]">
{{ item.updateTime ? formatDate(item.updateTime) : '-' }}
</span>
</div>

View File

@ -210,7 +210,7 @@
<div class="mb-2.5 last:mb-0">
<span class="text-[#717c8e] mr-2.5">备注名称</span>
<span
class="text-[#0b1d30] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[130px]"
class="text-[var(--el-text-color-primary)] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[130px]"
>
{{ item.nickname || item.deviceName }}
</span>
@ -384,6 +384,7 @@ defineOptions({ name: 'IoTDevice' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const route = useRoute() // 路由对象
const loading = ref(true) // 列表加载中
const list = ref<DeviceVO[]>([]) // 列表的数据
@ -392,7 +393,7 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
deviceName: undefined,
productId: undefined,
productId: undefined as number | undefined,
deviceType: undefined,
nickname: undefined,
status: undefined,
@ -513,6 +514,12 @@ const handleImport = () => {
/** 初始化 **/
onMounted(async () => {
// 处理路由参数中的 productId
const productId = route.query.productId
if (productId) {
queryParams.productId = Number(productId)
}
getList()
// 获取产品列表

View File

@ -72,7 +72,7 @@ const copyToClipboard = async (text: string) => {
/** 路由跳转到设备管理 */
const { push } = useRouter()
const goToDeviceList = (productId: number) => {
push({ name: 'IoTDevice', params: { productId } })
push({ name: 'IoTDevice', query: { productId } })
}
/** 修改操作 */

View File

@ -97,7 +97,7 @@
</div>
<div class="mb-2.5 last:mb-0">
<span class="text-[#717c8e] mr-2.5">产品标识</span>
<span class="text-[#0b1d30] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[140px]">
<span class="text-[var(--el-text-color-primary)] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[140px]">
{{ item.productKey }}
</span>
</div>