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