From 3c16469ea47bc51912395cafeae4268f379a47ad Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Mon, 13 Mar 2023 15:15:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=95=E5=AF=BC=E9=A1=B5=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Product/Detail/DeviceAccess/index.vue | 8 ++--- src/views/device/Product/Detail/index.vue | 34 ++++++++++++++++--- src/views/device/Product/index.vue | 18 +++++++--- src/views/rule-engine/Instance/index.vue | 23 +++++++------ 4 files changed, 60 insertions(+), 23 deletions(-) diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue index 014243f3..024c7de9 100644 --- a/src/views/device/Product/Detail/DeviceAccess/index.vue +++ b/src/views/device/Product/Detail/DeviceAccess/index.vue @@ -276,7 +276,7 @@ @ok="submitData" @cancel="cancel" > - { //引导页数据 const steps = [ { - element: '.device-detail-metadata', + element: '#rc-tabs-0-tab-Metadata', popover: { - className: 'driver', + id: 'driver', title: `
配置物模型
1/3
`, description: `配置产品物模型,实现设备在云端的功能描述。`, position: 'bottom', @@ -1042,7 +1042,7 @@ const submitDevice = async () => { const result: any = {}; flatObj(values, result); const { storePolicy, ...extra } = result; - console.log({...extra}); + console.log({ ...extra }); const id = productStore.current?.id; const resp = await modify(id || '', { id: id, diff --git a/src/views/device/Product/Detail/index.vue b/src/views/device/Product/Detail/index.vue index 6d743c83..5101ef4f 100644 --- a/src/views/device/Product/Detail/index.vue +++ b/src/views/device/Product/Detail/index.vue @@ -43,11 +43,15 @@
- {{ - productStore.current?.count - ? productStore.current?.count - : 0 - }} + {{ + productStore.current?.count + ? productStore.current?.count + : 0 + }}
@@ -103,6 +107,8 @@ import { import { message } from 'ant-design-vue'; import { getImage } from '@/utils/comm'; import encodeQuery from '@/utils/encodeQuery'; +import { useMenuStore } from '@/store/menu'; +const menuStory = useMenuStore(); const route = useRoute(); const checked = ref(true); @@ -220,8 +226,26 @@ const getProtocol = async () => { } } }; +/** + * 详情页跳转到设备页 + */ +const jumpDevice = () => { + console.log(productStore.current?.id); + const searchParams = { + column: 'productId', + termType: 'eq', + value: productStore.current?.id, + }; + menuStory.jumpPage('device/Instance',{},{ + target: 'device-instance', + q: JSON.stringify({ terms: [{ terms: [{searchParams}] }] }), + }); +}; onMounted(() => { getProtocol(); + if(history.state?.params?.tab){ + productStore.tabActiveKey = history.state?.params?.tab + } }); \ No newline at end of file