fix: 引导页定位
This commit is contained in:
parent
cccdf73d54
commit
3c16469ea4
|
@ -276,7 +276,7 @@
|
||||||
@ok="submitData"
|
@ok="submitData"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
>
|
>
|
||||||
<j-advanced-search
|
<pro-search
|
||||||
:columns="query.columns"
|
:columns="query.columns"
|
||||||
target="deviceModal"
|
target="deviceModal"
|
||||||
@search="search"
|
@search="search"
|
||||||
|
@ -589,9 +589,9 @@ const search = (e: any) => {
|
||||||
//引导页数据
|
//引导页数据
|
||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
element: '.device-detail-metadata',
|
element: '#rc-tabs-0-tab-Metadata',
|
||||||
popover: {
|
popover: {
|
||||||
className: 'driver',
|
id: 'driver',
|
||||||
title: `<div id='title'>配置物模型</div><div id='guide'>1/3</div>`,
|
title: `<div id='title'>配置物模型</div><div id='guide'>1/3</div>`,
|
||||||
description: `配置产品物模型,实现设备在云端的功能描述。`,
|
description: `配置产品物模型,实现设备在云端的功能描述。`,
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
|
|
|
@ -43,11 +43,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 10px">
|
<div style="padding-top: 10px">
|
||||||
<j-descriptions size="small" :column="4">
|
<j-descriptions size="small" :column="4">
|
||||||
<j-descriptions-item label="设备数量">{{
|
<j-descriptions-item
|
||||||
|
label="设备数量"
|
||||||
|
style="cursor: pointer"
|
||||||
|
><span @click="jumpDevice">{{
|
||||||
productStore.current?.count
|
productStore.current?.count
|
||||||
? productStore.current?.count
|
? productStore.current?.count
|
||||||
: 0
|
: 0
|
||||||
}}</j-descriptions-item>
|
}}</span></j-descriptions-item
|
||||||
|
>
|
||||||
</j-descriptions>
|
</j-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -103,6 +107,8 @@ import {
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import encodeQuery from '@/utils/encodeQuery';
|
import encodeQuery from '@/utils/encodeQuery';
|
||||||
|
import { useMenuStore } from '@/store/menu';
|
||||||
|
const menuStory = useMenuStore();
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const checked = ref<boolean>(true);
|
const checked = ref<boolean>(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(() => {
|
onMounted(() => {
|
||||||
getProtocol();
|
getProtocol();
|
||||||
|
if(history.state?.params?.tab){
|
||||||
|
productStore.tabActiveKey = history.state?.params?.tab
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container>
|
<page-container>
|
||||||
<j-advanced-search
|
<pro-search
|
||||||
:columns="query.columns"
|
:columns="query.columns"
|
||||||
target="product-manage"
|
target="product-manage"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
|
@ -85,7 +85,11 @@
|
||||||
</div>
|
</div>
|
||||||
<Ellipsis
|
<Ellipsis
|
||||||
><div>
|
><div>
|
||||||
{{ slotProps?.accessName ? slotProps?.accessName : '未接入' }}
|
{{
|
||||||
|
slotProps?.accessName
|
||||||
|
? slotProps?.accessName
|
||||||
|
: '未接入'
|
||||||
|
}}
|
||||||
</div></Ellipsis
|
</div></Ellipsis
|
||||||
>
|
>
|
||||||
</j-col>
|
</j-col>
|
||||||
|
@ -179,11 +183,11 @@ import { omit } from 'lodash-es';
|
||||||
import { typeOptions } from '@/components/Search/util';
|
import { typeOptions } from '@/components/Search/util';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
/**
|
/**
|
||||||
* 表格数据
|
* 表格数据
|
||||||
*/
|
*/
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
const router = useRouter();
|
|
||||||
const isAdd = ref<number>(0);
|
const isAdd = ref<number>(0);
|
||||||
const title = ref<string>('');
|
const title = ref<string>('');
|
||||||
const params = ref<Record<string, any>>({});
|
const params = ref<Record<string, any>>({});
|
||||||
|
@ -603,6 +607,12 @@ const saveRef = ref();
|
||||||
const handleSearch = (e: any) => {
|
const handleSearch = (e: any) => {
|
||||||
params.value = e;
|
params.value = e;
|
||||||
};
|
};
|
||||||
|
const route = useRoute();
|
||||||
|
onMounted(() => {
|
||||||
|
if(history.state?.params?.save){
|
||||||
|
add();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -116,9 +116,7 @@
|
||||||
@click="i.onClick"
|
@click="i.onClick"
|
||||||
type="link"
|
type="link"
|
||||||
style="padding: 0px"
|
style="padding: 0px"
|
||||||
:hasPermission="
|
:hasPermission="'rule-engine/Instance:' + i.key"
|
||||||
'rule-engine/Instance:' + i.key
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<template #icon
|
<template #icon
|
||||||
><AIcon :type="i.icon"
|
><AIcon :type="i.icon"
|
||||||
|
@ -306,11 +304,11 @@ const getActions = (
|
||||||
return actions;
|
return actions;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
current.value = {
|
(current.value = {
|
||||||
name: '',
|
name: '',
|
||||||
description:''
|
description: '',
|
||||||
},
|
}),
|
||||||
visiable.value = true
|
(visiable.value = true);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 刷新数据
|
* 刷新数据
|
||||||
|
@ -328,7 +326,12 @@ const openRuleEditor = (item: any) => {
|
||||||
};
|
};
|
||||||
const closeSave = () => {
|
const closeSave = () => {
|
||||||
visiable.value = false;
|
visiable.value = false;
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
if (history.state?.params) {
|
||||||
|
add();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue