Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
7c349ee6a8
|
@ -1,3 +1,6 @@
|
||||||
import server from '@/utils/request'
|
import server from '@/utils/request';
|
||||||
|
import { BASE_API_PATH } from '@/utils/variable';
|
||||||
|
|
||||||
export const save = (data) => server.post(`/network/certificate`, data)
|
export const NETWORK_CERTIFICATE_UPLOAD = `${BASE_API_PATH}/network/certificate/upload`;
|
||||||
|
|
||||||
|
export const save = (data) => server.post(`/network/certificate`, data);
|
||||||
|
|
|
@ -3,5 +3,3 @@ export const BASE_API_PATH = import.meta.env.VITE_APP_BASE_API
|
||||||
export const TOKEN_KEY = 'X-Access-Token'
|
export const TOKEN_KEY = 'X-Access-Token'
|
||||||
|
|
||||||
export const Version_Code = 'version_code'
|
export const Version_Code = 'version_code'
|
||||||
|
|
||||||
export const NETWORK_CERTIFICATE_UPLOAD = '/network/certificate/upload'
|
|
|
@ -23,23 +23,16 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { bootConfig } from "../index";
|
||||||
type configItem = {
|
|
||||||
auth: boolean;
|
|
||||||
link: string;
|
|
||||||
english: string;
|
|
||||||
label: string;
|
|
||||||
params?: object;
|
|
||||||
};
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
cardData: Array<configItem>,
|
cardData: Array<bootConfig>,
|
||||||
cardTitle: String,
|
cardTitle: String,
|
||||||
});
|
});
|
||||||
const { cardData, cardTitle } = toRefs(props);
|
const { cardData, cardTitle } = toRefs(props);
|
||||||
|
|
||||||
const jumpPage = (row: configItem): void => {
|
const jumpPage = (row: bootConfig): void => {
|
||||||
if (row.auth && row.link) {
|
if (row.auth && row.link) {
|
||||||
router.push(`${row.link}${objToParams(row.params || {})}`);
|
router.push(`${row.link}${objToParams(row.params || {})}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,24 +28,16 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { bootConfig } from "../index";
|
||||||
type configItem = {
|
|
||||||
auth: boolean;
|
|
||||||
link: string;
|
|
||||||
english: string;
|
|
||||||
label: string;
|
|
||||||
params?: object;
|
|
||||||
image: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
cardData: Array<configItem>,
|
cardData: Array<bootConfig>,
|
||||||
cardTitle: String,
|
cardTitle: String,
|
||||||
});
|
});
|
||||||
const { cardData, cardTitle } = toRefs(props);
|
const { cardData, cardTitle } = toRefs(props);
|
||||||
|
|
||||||
const jumpPage = (row: configItem): void => {
|
const jumpPage = (row: bootConfig): void => {
|
||||||
if (row.auth && row.link) {
|
if (row.auth && row.link) {
|
||||||
router.push(`${row.link}${objToParams(row.params || {})}`);
|
router.push(`${row.link}${objToParams(row.params || {})}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<a-row :gutter="24" class="top" style="margin-bottom: 24px">
|
<a-row :gutter="24" class="top" style="margin-bottom: 24px">
|
||||||
<a-col :span="6" class="left">
|
<a-col :span="6" class="left">
|
||||||
<BootCardSmall
|
<BootCardSmall
|
||||||
:cardData="devBootConfig"
|
:cardData="deviceBootConfig"
|
||||||
cardTitle="物联网引导"
|
cardTitle="物联网引导"
|
||||||
/>
|
/>
|
||||||
<div style="width: 100%; height: 24px"></div>
|
<div style="width: 100%; height: 24px"></div>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<StepCard
|
<StepCard
|
||||||
cardTitle="设备接入推荐步骤"
|
cardTitle="设备接入推荐步骤"
|
||||||
tooltip="不同的设备因为通信协议的不同,存在接入步骤的差异"
|
tooltip="不同的设备因为通信协议的不同,存在接入步骤的差异"
|
||||||
:dataList="devStepDetails"
|
:dataList="deviceStepDetails"
|
||||||
style="margin-bottom: 24px"
|
style="margin-bottom: 24px"
|
||||||
/>
|
/>
|
||||||
<StepCard
|
<StepCard
|
||||||
|
@ -39,152 +39,26 @@ import BootCardSmall from '../BootCardSmall.vue';
|
||||||
import DeviceCountCard from '../DeviceCountCard.vue';
|
import DeviceCountCard from '../DeviceCountCard.vue';
|
||||||
import BasicCountCard from '../BasicCountCard.vue';
|
import BasicCountCard from '../BasicCountCard.vue';
|
||||||
import PlatformPicCard from '../PlatformPicCard.vue';
|
import PlatformPicCard from '../PlatformPicCard.vue';
|
||||||
import { recommendList } from '../../index';
|
|
||||||
|
|
||||||
import StepCard from '../StepCard.vue';
|
import StepCard from '../StepCard.vue';
|
||||||
|
|
||||||
// 物联网引导-数据
|
import {
|
||||||
const devBootConfig = [
|
deviceBootConfig as _deviceBootConfig,
|
||||||
{
|
deviceStepDetails,
|
||||||
english: 'STEP1',
|
opsBootConfig as _opsBootConfig,
|
||||||
label: '创建产品',
|
opsStepDetails,
|
||||||
link: '/a',
|
} from '../../modules/config';
|
||||||
auth: true,
|
|
||||||
save: true,
|
const deviceImages = [
|
||||||
image: '/images/home/guide-home1.png',
|
'/images/home/guide-home1.png',
|
||||||
},
|
'/images/home/guide-home2.png',
|
||||||
{
|
'/images/home/guide-home3.png',
|
||||||
english: 'STEP2',
|
|
||||||
label: '创建设备',
|
|
||||||
link: '/b',
|
|
||||||
auth: true,
|
|
||||||
save: true,
|
|
||||||
image: '/images/home/guide-home2.png',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP3',
|
|
||||||
label: '规则引擎',
|
|
||||||
link: '/c',
|
|
||||||
auth: false,
|
|
||||||
save: true,
|
|
||||||
image: '/images/home/guide-home3.png',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
// 运维管理引导-数据
|
const opsImages = [
|
||||||
const opsBootConfig = [
|
'/images/home/guide-home4.png',
|
||||||
{
|
'/images/home/guide-home5.png',
|
||||||
english: 'STEP1',
|
'/images/home/guide-home6.png',
|
||||||
label: '创建产品',
|
|
||||||
link: '/a',
|
|
||||||
auth: true,
|
|
||||||
save: true,
|
|
||||||
image: '/images/home/guide-home4.png',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP2',
|
|
||||||
label: '创建设备',
|
|
||||||
link: '/b',
|
|
||||||
auth: true,
|
|
||||||
save: true,
|
|
||||||
image: '/images/home/guide-home5.png',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP3',
|
|
||||||
label: '规则引擎',
|
|
||||||
link: '/c',
|
|
||||||
auth: false,
|
|
||||||
save: true,
|
|
||||||
image: '/images/home/guide-home6.png',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
// 设备接入推荐步骤-数据
|
|
||||||
const devStepDetails = [
|
const deviceBootConfig = _deviceBootConfig.map((item,i) => ({...item, image: deviceImages[i]}));
|
||||||
{
|
const opsBootConfig = _opsBootConfig.map((item,i) => ({...item, image: opsImages[i]}));
|
||||||
title: '创建产品',
|
|
||||||
details:
|
|
||||||
'产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。',
|
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '配置产品接入方式',
|
|
||||||
details:
|
|
||||||
'通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。',
|
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
dialogTag: 'accessMethod',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '添加测试设备',
|
|
||||||
details: '添加单个设备,用于验证产品模型是否配置正确。',
|
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '功能调试',
|
|
||||||
details:
|
|
||||||
'对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。',
|
|
||||||
iconUrl: '/images/home/bottom-2.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
dialogTag: 'funcTest',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '批量添加设备',
|
|
||||||
details: '批量添加同一产品下的设备',
|
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: false,
|
|
||||||
},
|
|
||||||
] as recommendList[];
|
|
||||||
// 运维管理推荐步骤-数据
|
|
||||||
const opsStepDetails = [
|
|
||||||
{
|
|
||||||
title: '协议管理',
|
|
||||||
details:
|
|
||||||
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
params: {
|
|
||||||
a: 1,
|
|
||||||
save: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '证书管理',
|
|
||||||
details: '统一维护平台内的证书,用于数据通信加密。',
|
|
||||||
iconUrl: '/images/home/bottom-6.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
params: {
|
|
||||||
a: 1,
|
|
||||||
save: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网络组件',
|
|
||||||
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备接入网关',
|
|
||||||
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '日志管理',
|
|
||||||
details: '监控系统日志,及时处理系统异常。',
|
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: false,
|
|
||||||
},
|
|
||||||
] as recommendList[];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="device-home-container">
|
<div class="device-home-container">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :span="14">
|
<a-col :span="14">
|
||||||
<BootCard :cardData="bootConfig" cardTitle="运维引导" />
|
<BootCard :cardData="opsBootConfig" cardTitle="运维引导" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<BasicCountCard />
|
<BasicCountCard />
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<StepCard
|
<StepCard
|
||||||
cardTitle="运维管理推荐步骤"
|
cardTitle="运维管理推荐步骤"
|
||||||
tooltip="请根据业务需要对下述步骤进行选择性操作。"
|
tooltip="请根据业务需要对下述步骤进行选择性操作。"
|
||||||
:dataList="stepDetails"
|
:dataList="opsStepDetails"
|
||||||
/>
|
/>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,74 +27,8 @@ import BasicCountCard from '../BasicCountCard.vue';
|
||||||
import PlatformPicCard from '../PlatformPicCard.vue';
|
import PlatformPicCard from '../PlatformPicCard.vue';
|
||||||
import StepCard from '../StepCard.vue';
|
import StepCard from '../StepCard.vue';
|
||||||
|
|
||||||
import {recommendList} from '../../index'
|
import { opsBootConfig, opsStepDetails } from '../../modules/config';
|
||||||
// import {getImage} from '@/utils/comm'
|
|
||||||
|
|
||||||
// 运维引导-数据
|
|
||||||
const bootConfig = [
|
|
||||||
{
|
|
||||||
english: 'STEP1',
|
|
||||||
label: '设备接入配置',
|
|
||||||
link: '/a',
|
|
||||||
auth: true,
|
|
||||||
save: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP2',
|
|
||||||
label: '日志排查',
|
|
||||||
link: '/b',
|
|
||||||
auth: true,
|
|
||||||
save: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP3',
|
|
||||||
label: '实时监控',
|
|
||||||
link: '/c',
|
|
||||||
auth: false,
|
|
||||||
save: true,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
// 运维管理推荐步骤-数据
|
|
||||||
const stepDetails = [
|
|
||||||
{
|
|
||||||
title: '创建产品',
|
|
||||||
details:
|
|
||||||
'产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。',
|
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '配置产品接入方式',
|
|
||||||
details:
|
|
||||||
'通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。',
|
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '添加测试设备',
|
|
||||||
details: '添加单个设备,用于验证产品模型是否配置正确。',
|
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '功能调试',
|
|
||||||
details:
|
|
||||||
'对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。',
|
|
||||||
iconUrl: '/images/home/bottom-2.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '批量添加设备',
|
|
||||||
details: '批量添加同一产品下的设备',
|
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: false,
|
|
||||||
},
|
|
||||||
] as recommendList[];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="device-home-container">
|
<div class="device-home-container">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :span="14">
|
<a-col :span="14">
|
||||||
<BootCard :cardData="bootConfig" cardTitle="物联网引导" />
|
<BootCard :cardData="deviceBootConfig" cardTitle="物联网引导" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="10">
|
<a-col :span="10">
|
||||||
<DeviceCountCard />
|
<DeviceCountCard />
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<StepCard
|
<StepCard
|
||||||
cardTitle="设备接入推荐步骤"
|
cardTitle="设备接入推荐步骤"
|
||||||
tooltip="不同的设备因为通信协议的不同,存在接入步骤的差异"
|
tooltip="不同的设备因为通信协议的不同,存在接入步骤的差异"
|
||||||
:dataList="stepDetails"
|
:dataList="deviceStepDetails"
|
||||||
/>
|
/>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,73 +27,7 @@ import DeviceCountCard from '../DeviceCountCard.vue';
|
||||||
import PlatformPicCard from '../PlatformPicCard.vue';
|
import PlatformPicCard from '../PlatformPicCard.vue';
|
||||||
import StepCard from '../StepCard.vue';
|
import StepCard from '../StepCard.vue';
|
||||||
|
|
||||||
import {recommendList} from '../../index'
|
import { deviceBootConfig, deviceStepDetails } from '../../modules/config';
|
||||||
|
|
||||||
// import {getImage} from '@/utils/comm'
|
|
||||||
|
|
||||||
// 物联网引导-数据
|
|
||||||
const bootConfig = [
|
|
||||||
{
|
|
||||||
english: 'STEP1',
|
|
||||||
label: '创建产品',
|
|
||||||
link: '/a',
|
|
||||||
auth: true,
|
|
||||||
params: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP2',
|
|
||||||
label: '创建设备',
|
|
||||||
link: '/b',
|
|
||||||
auth: true,
|
|
||||||
params: {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
english: 'STEP3',
|
|
||||||
label: '规则引擎',
|
|
||||||
link: '/c',
|
|
||||||
auth: false,
|
|
||||||
params: {},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
// 设备接入推荐步骤-数据
|
|
||||||
const stepDetails = [
|
|
||||||
{
|
|
||||||
title: '协议管理',
|
|
||||||
details:
|
|
||||||
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
|
||||||
iconUrl: '/images/home/bottom-1.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '证书管理',
|
|
||||||
details: '统一维护平台内的证书,用于数据通信加密。',
|
|
||||||
iconUrl: '/images/home/bottom-6.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '网络组件',
|
|
||||||
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
|
||||||
iconUrl: '/images/home/bottom-3.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备接入网关',
|
|
||||||
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
|
||||||
iconUrl: '/images/home/bottom-4.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '日志管理',
|
|
||||||
details: '监控系统日志,及时处理系统异常。',
|
|
||||||
iconUrl: '/images/home/bottom-5.png',
|
|
||||||
linkUrl: '/a',
|
|
||||||
auth: false,
|
|
||||||
},
|
|
||||||
] as recommendList[];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -8,43 +8,20 @@
|
||||||
:getContainer="getContainer"
|
:getContainer="getContainer"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
>
|
>
|
||||||
<div class="search">
|
<Search />
|
||||||
<a-select
|
|
||||||
v-model:value="form.key"
|
|
||||||
style="width: 100px;margin-right: 20px;"
|
|
||||||
:options="productList"
|
|
||||||
/>
|
|
||||||
<a-select
|
|
||||||
v-model:value="form.relation"
|
|
||||||
style="width: 100px;margin-right: 20px;"
|
|
||||||
:options="productList"
|
|
||||||
/>
|
|
||||||
<a-input v-model:value="form.keyValue" allow-clear style="width: 230px;margin-right: 50px;" />
|
|
||||||
|
|
||||||
<a-button type="primary" @click="clickSearch" style="margin-right: 10px;">
|
|
||||||
<template #icon><SearchOutlined /></template>
|
|
||||||
搜索
|
|
||||||
</a-button>
|
|
||||||
<a-button @click="clickReset">
|
|
||||||
<template #icon><reload-outlined /></template>
|
|
||||||
重置
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
<JTable :columns="columns" model="TABLE"> </JTable>
|
<JTable :columns="columns" model="TABLE"> </JTable>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button key="back" @click="visible = false
|
<a-button key="back" @click="visible = false">取消</a-button>
|
||||||
">取消</a-button>
|
<a-button key="submit" type="primary" @click="handleOk"
|
||||||
<a-button key="submit" type="primary" @click="handleOk">确认</a-button>
|
>确认</a-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ComponentInternalInstance } from 'vue';
|
import { ComponentInternalInstance } from 'vue';
|
||||||
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
import { productItem, deviceInfo } from '../../index';
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const emits = defineEmits(['confirm']);
|
const emits = defineEmits(['confirm']);
|
||||||
|
@ -64,7 +41,6 @@ watch(
|
||||||
() => {
|
() => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
clickReset();
|
clickReset();
|
||||||
getOptions();
|
|
||||||
clickSearch();
|
clickSearch();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -75,10 +51,7 @@ const form = ref({
|
||||||
relation: '',
|
relation: '',
|
||||||
keyValue: '',
|
keyValue: '',
|
||||||
});
|
});
|
||||||
const productList = ref<[productItem] | []>([]);
|
|
||||||
const getOptions = () => {
|
|
||||||
productList.value = [];
|
|
||||||
};
|
|
||||||
const clickSearch = () => {};
|
const clickSearch = () => {};
|
||||||
const clickReset = () => {
|
const clickReset = () => {
|
||||||
Object.entries(form.value).forEach(([prop]) => {
|
Object.entries(form.value).forEach(([prop]) => {
|
||||||
|
@ -114,9 +87,6 @@ const columns = [
|
||||||
key: 'status',
|
key: 'status',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableData = ref<deviceInfo[]>([]);
|
|
||||||
const selectItem: deviceInfo | {} = {};
|
|
||||||
const getList = () => {};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@ -125,5 +95,4 @@ const getList = () => {};
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -8,11 +8,6 @@ export interface recommendList {
|
||||||
auth: boolean;
|
auth: boolean;
|
||||||
dialogTag?: 'accessMethod' | 'funcTest';
|
dialogTag?: 'accessMethod' | 'funcTest';
|
||||||
}
|
}
|
||||||
// 产品列表里的每项
|
|
||||||
export interface productItem {
|
|
||||||
label: string;
|
|
||||||
value: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface deviceInfo {
|
export interface deviceInfo {
|
||||||
deviceId: string,
|
deviceId: string,
|
||||||
|
@ -21,3 +16,12 @@ export interface deviceInfo {
|
||||||
createTime: string,
|
createTime: string,
|
||||||
status: boolean
|
status: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface bootConfig {
|
||||||
|
english: string,
|
||||||
|
label: string,
|
||||||
|
link: string,
|
||||||
|
auth: boolean,
|
||||||
|
image?:string,
|
||||||
|
params?: object,
|
||||||
|
}
|
|
@ -0,0 +1,176 @@
|
||||||
|
// import {getImage} from '@/utils/comm'
|
||||||
|
import { usePermissionStore } from "@/store/permission";
|
||||||
|
import { recommendList, bootConfig } from "../index";
|
||||||
|
|
||||||
|
|
||||||
|
// 权限控制
|
||||||
|
const hasPermission = usePermissionStore().hasPermission;
|
||||||
|
const productPermission = (action: string) =>
|
||||||
|
hasPermission(`device/Product:${action}"`);
|
||||||
|
const devicePermission = (action: string) =>
|
||||||
|
hasPermission(`device/Instance:${action}"`);
|
||||||
|
const rulePermission = (action: string) =>
|
||||||
|
hasPermission(`rule-engine/Instance:${action}"`);
|
||||||
|
|
||||||
|
|
||||||
|
// 物联网引导-数据
|
||||||
|
export const deviceBootConfig: bootConfig[] = [
|
||||||
|
{
|
||||||
|
english: 'STEP1',
|
||||||
|
label: '创建产品',
|
||||||
|
link: '/a',
|
||||||
|
auth: productPermission('add'),
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
english: 'STEP2',
|
||||||
|
label: '创建设备',
|
||||||
|
link: '/b',
|
||||||
|
auth: devicePermission('add'),
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
english: 'STEP3',
|
||||||
|
label: '规则引擎',
|
||||||
|
link: '/c',
|
||||||
|
auth: rulePermission('add'),
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
// 设备接入推荐步骤-数据
|
||||||
|
export const deviceStepDetails: recommendList[] = [
|
||||||
|
{
|
||||||
|
title: '创建产品',
|
||||||
|
details:
|
||||||
|
'产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。',
|
||||||
|
iconUrl: '/images/home/bottom-4.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: productPermission('add'),
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '配置产品接入方式',
|
||||||
|
details:
|
||||||
|
'通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。',
|
||||||
|
iconUrl: '/images/home/bottom-1.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: productPermission('update'),
|
||||||
|
dialogTag: 'accessMethod',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '添加测试设备',
|
||||||
|
details: '添加单个设备,用于验证产品模型是否配置正确。',
|
||||||
|
iconUrl: '/images/home/bottom-5.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: devicePermission('add'),
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '功能调试',
|
||||||
|
details:
|
||||||
|
'对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。',
|
||||||
|
iconUrl: '/images/home/bottom-2.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: devicePermission('update'),
|
||||||
|
dialogTag: 'funcTest',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '批量添加设备',
|
||||||
|
details: '批量添加同一产品下的设备',
|
||||||
|
iconUrl: '/images/home/bottom-3.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: devicePermission('import'),
|
||||||
|
params: {
|
||||||
|
import: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// 运维管理引导-数据
|
||||||
|
export const opsBootConfig: bootConfig[] = [
|
||||||
|
{
|
||||||
|
english: 'STEP1',
|
||||||
|
label: '设备接入配置',
|
||||||
|
link: '/a',
|
||||||
|
auth: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
english: 'STEP2',
|
||||||
|
label: '日志排查',
|
||||||
|
link: '/b',
|
||||||
|
auth: true,
|
||||||
|
params: {
|
||||||
|
key: 'system',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
english: 'STEP3',
|
||||||
|
label: '实时监控',
|
||||||
|
link: '/c',
|
||||||
|
auth: false,
|
||||||
|
params: {
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
// 运维管理推荐步骤-数据
|
||||||
|
export const opsStepDetails: recommendList[] = [
|
||||||
|
{
|
||||||
|
title: '协议管理',
|
||||||
|
details:
|
||||||
|
'根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。',
|
||||||
|
iconUrl: '/images/home/bottom-1.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: true,
|
||||||
|
params: {
|
||||||
|
a: 1,
|
||||||
|
save: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '证书管理',
|
||||||
|
details: '统一维护平台内的证书,用于数据通信加密。',
|
||||||
|
iconUrl: '/images/home/bottom-6.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: true,
|
||||||
|
params: {
|
||||||
|
a: 1,
|
||||||
|
save: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '网络组件',
|
||||||
|
details: '根据不同的传输类型配置平台底层网络组件相关参数。',
|
||||||
|
iconUrl: '/images/home/bottom-3.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '设备接入网关',
|
||||||
|
details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。',
|
||||||
|
iconUrl: '/images/home/bottom-4.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '日志管理',
|
||||||
|
details: '监控系统日志,及时处理系统异常。',
|
||||||
|
iconUrl: '/images/home/bottom-5.png',
|
||||||
|
linkUrl: '/a',
|
||||||
|
auth: false,
|
||||||
|
params: {
|
||||||
|
key: 'system',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
];
|
|
@ -16,13 +16,13 @@
|
||||||
}}</a-tooltip>
|
}}</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div class="checked-icon">
|
<div class="checked-icon">
|
||||||
<div><a-icon type="check" /></div>
|
<div><CheckOutlined /></div>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessCard">
|
<script lang="ts" setup name="AccessCard">
|
||||||
|
import { CheckOutlined } from '@ant-design/icons-vue';
|
||||||
|
|
||||||
const emit = defineEmits(['checkedChange']);
|
const emit = defineEmits(['checkedChange']);
|
||||||
|
|
||||||
|
@ -36,13 +36,10 @@ const props = defineProps({
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(1112,props);
|
|
||||||
|
|
||||||
const checkedChange=(id:string)=>{
|
const checkedChange = (id: string) => {
|
||||||
emit('checkedChange', id);
|
emit('checkedChange', id);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -1,11 +1,85 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-top: 10px">
|
<div class="container">
|
||||||
111
|
<div v-if="channel==='fixed-media'" class="card-last">
|
||||||
|
<a-row :gutter="[24, 24]">
|
||||||
|
<a-col :span="12">
|
||||||
|
<title-component data="基本信息" />
|
||||||
|
<div>
|
||||||
|
<a-form
|
||||||
|
:model="formState"
|
||||||
|
name="basic"
|
||||||
|
autocomplete="off"
|
||||||
|
layout="vertical"
|
||||||
|
@finish="onFinish"
|
||||||
|
>
|
||||||
|
<a-form-item
|
||||||
|
label="名称"
|
||||||
|
name="name"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入证书名称',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{ max: 64, message: '最多可输入64个字符' },
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<a-input v-model:value="formState.name" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="说明" name="description">
|
||||||
|
<a-textarea
|
||||||
|
placeholder="请输入说明"
|
||||||
|
:rows="4"
|
||||||
|
v-model:value="formState.description"
|
||||||
|
show-count
|
||||||
|
:maxlength="200"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item>
|
||||||
|
<a-button type="primary" html-type="submit"
|
||||||
|
>保存</a-button
|
||||||
|
>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="config-right">
|
||||||
|
<div class="config-right-item">
|
||||||
|
<div class="config-right-item-title">接入方式</div>
|
||||||
|
<div class="config-right-item-context">
|
||||||
|
{{ provider.name }}
|
||||||
|
</div>
|
||||||
|
<div class="config-right-item-context">
|
||||||
|
{{ provider.description }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="config-right-item">
|
||||||
|
<div class="config-right-item-title">消息协议</div>
|
||||||
|
<div class="config-right-item-context">
|
||||||
|
{{
|
||||||
|
provider.id === 'fixed-media'
|
||||||
|
? 'URL'
|
||||||
|
: 'SIP'
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<div v-else>123</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessMedia">
|
<script lang="ts" setup name="AccessMedia">
|
||||||
|
import { message, Form } from 'ant-design-vue';
|
||||||
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
|
||||||
|
interface FormState {
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
provider: {
|
provider: {
|
||||||
|
@ -18,13 +92,47 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const channel = ref(props.provider.channel)
|
const channel = ref(props.provider.channel);
|
||||||
|
console.log(211, channel.value, props);
|
||||||
console.log(211,props);
|
|
||||||
|
|
||||||
|
const formState = reactive<FormState>({
|
||||||
|
name: '',
|
||||||
|
description: '',
|
||||||
|
});
|
||||||
|
const onFinish = (values: any) => {
|
||||||
|
console.log('Success:', values);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.container {
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-last {
|
||||||
|
padding-right: 5px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.config-right {
|
||||||
|
padding: 20px;
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
background: rgba(0, 0, 0, 0.04);
|
||||||
|
|
||||||
|
.config-right-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.config-right-item-title {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-right-item-context {
|
||||||
|
margin: 5px 0;
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -126,7 +126,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="steps-box" v-else>
|
<div class="steps-box" v-else>
|
||||||
<div class="card-last">
|
<div
|
||||||
|
class="card-last"
|
||||||
|
:style="`max-height:${
|
||||||
|
clientHeight > 900 ? 750 : clientHeight * 0.7
|
||||||
|
}px`"
|
||||||
|
>
|
||||||
<a-row :gutter="[24, 24]">
|
<a-row :gutter="[24, 24]">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<title-component data="基本信息" />
|
<title-component data="基本信息" />
|
||||||
|
@ -190,7 +195,6 @@
|
||||||
v-if="config.document"
|
v-if="config.document"
|
||||||
>
|
>
|
||||||
<Markdown :source="config.document" />
|
<Markdown :source="config.document" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -255,8 +259,13 @@
|
||||||
:scroll="{ y: 300 }"
|
:scroll="{ y: 300 }"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
#stream
|
#bodyCell="{ column, text, record }"
|
||||||
slot-scope="text, record"
|
>
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
column.dataIndex ===
|
||||||
|
'stream'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
|
@ -265,13 +274,18 @@
|
||||||
"
|
"
|
||||||
>上行、下行</span
|
>上行、下行</span
|
||||||
>
|
>
|
||||||
<span v-else-if="record.upstream"
|
<span
|
||||||
|
v-else-if="record.upstream"
|
||||||
>上行</span
|
>上行</span
|
||||||
>
|
>
|
||||||
<span v-else-if="record.downstream"
|
<span
|
||||||
|
v-else-if="
|
||||||
|
record.downstream
|
||||||
|
"
|
||||||
>下行</span
|
>下行</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -314,10 +328,9 @@ import {
|
||||||
} from '../Detail/data';
|
} from '../Detail/data';
|
||||||
import AccessCard from './AccessCard/index.vue';
|
import AccessCard from './AccessCard/index.vue';
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { message, Form } from 'ant-design-vue';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
||||||
import Markdown from 'vue3-markdown-it';
|
import Markdown from 'vue3-markdown-it';
|
||||||
|
|
||||||
|
|
||||||
//测试数据1
|
//测试数据1
|
||||||
const resultList1 = [
|
const resultList1 = [
|
||||||
{
|
{
|
||||||
|
@ -363,13 +376,158 @@ const resultList1 = [
|
||||||
// metadata: '',
|
// metadata: '',
|
||||||
// };
|
// };
|
||||||
const result2 = {
|
const result2 = {
|
||||||
"id": "MQTT",
|
id: 'MQTT',
|
||||||
"name": "MQTT",
|
name: 'MQTT',
|
||||||
"features": [],
|
features: [
|
||||||
"routes": [],
|
{
|
||||||
"document": "# MQTT认证说明\r\nCONNECT报文:\r\n```text\r\nclientId: 设备ID\r\nusername: secureId+\"|\"+timestamp\r\npassword: md5(secureId+\"|\"+timestamp+\"|\"+secureKey)\r\n ```\r\n\r\n说明: secureId以及secureKey在创建设备产品或设备实例时进行配置. \r\ntimestamp为当前系统时间戳(毫秒),与系统时间不能相差5分钟.\r\nmd5为32位,不区分大小写.",
|
id: 'supportFirmware',
|
||||||
"metadata": "{\"functions\":[],\"name\":\"test\",\"description\":\"测试用\",\"id\":\"test\",\"properties\":[{\"valueType\":{\"round\":\"HALF_UP\",\"type\":\"double\"},\"name\":\"温度\",\"id\":\"t\"},{\"valueType\":{\"round\":\"HALF_UP\",\"type\":\"int\"},\"name\":\"状态\",\"id\":\"state\"}],\"events\":[],\"tags\":[]}"
|
name: '支持固件升级',
|
||||||
}
|
},
|
||||||
|
],
|
||||||
|
routes: [
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/properties/report',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '属性上报',
|
||||||
|
description: '上报物模型属性数据',
|
||||||
|
example: '{"properties":{"属性ID":"属性值"}}',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/properties/report',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/properties/read',
|
||||||
|
upstream: false,
|
||||||
|
downstream: true,
|
||||||
|
qos: 0,
|
||||||
|
group: '读取属性',
|
||||||
|
description: '平台下发读取物模型属性数据指令',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,回复时需要一致.","properties":["属性ID"]}',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/properties/read',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/properties/read/reply',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '读取属性',
|
||||||
|
description: '对平台下发的读取属性指令进行响应',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,与读取指令中的ID一致.","properties":{"属性ID":"属性值"}}',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/properties/read/reply',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/properties/write',
|
||||||
|
upstream: false,
|
||||||
|
downstream: true,
|
||||||
|
qos: 0,
|
||||||
|
group: '修改属性',
|
||||||
|
description: '平台下发修改物模型属性数据指令',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,回复时需要一致.","properties":{"属性ID":"属性值"}}',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/properties/write',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/properties/write/reply',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '修改属性',
|
||||||
|
description: '对平台下发的修改属性指令进行响应',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,与修改指令中的ID一致.","properties":{"属性ID":"属性值"}}',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/properties/write/reply',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/event/{eventId:事件ID}',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '事件上报',
|
||||||
|
description: '上报物模型事件数据',
|
||||||
|
example: '{"data":{"key":"value"}}',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/event/{eventId:事件ID}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/function/invoke',
|
||||||
|
upstream: false,
|
||||||
|
downstream: true,
|
||||||
|
qos: 0,
|
||||||
|
group: '调用功能',
|
||||||
|
description: '平台下发功能调用指令',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,回复时需要一致.","functionId":"功能标识","inputs":[{"name":"参数名","value":"参数值"}]}',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/function/invoke',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/function/invoke/reply',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '调用功能',
|
||||||
|
description: '设备响应平台下发的功能调用指令',
|
||||||
|
example:
|
||||||
|
'{"messageId":"消息ID,与下发指令中的messageId一致.","output":"输出结果,格式与物模型中定义的类型一致"',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/function/invoke/reply',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/child/{childDeviceId:子设备ID}/{#:子设备相应操作的topic}',
|
||||||
|
upstream: true,
|
||||||
|
downstream: true,
|
||||||
|
qos: 0,
|
||||||
|
group: '子设备消息',
|
||||||
|
description: '网关上报或者平台下发子设备消息',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/child/{childDeviceId:子设备ID}/{#:子设备相应操作的topic}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/child-reply/{childDeviceId:子设备ID}/{#:子设备相应操作的topic}',
|
||||||
|
upstream: true,
|
||||||
|
downstream: true,
|
||||||
|
qos: 0,
|
||||||
|
group: '子设备消息',
|
||||||
|
description: '网关回复平台下发给子设备的指令结果',
|
||||||
|
address:
|
||||||
|
'/{productId:产品ID}/{deviceId:设备ID}/child-reply/{childDeviceId:子设备ID}/{#:子设备相应操作的topic}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/tags',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '更新标签',
|
||||||
|
description: '更新标签数据',
|
||||||
|
example: '{"tags":{"key","value"}}',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/tags',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/online',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '状态管理',
|
||||||
|
description: '设备上线',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/online',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
topic: '/{productId:产品ID}/{deviceId:设备ID}/offline',
|
||||||
|
upstream: true,
|
||||||
|
downstream: false,
|
||||||
|
qos: 0,
|
||||||
|
group: '状态管理',
|
||||||
|
description: '设备离线',
|
||||||
|
address: '/{productId:产品ID}/{deviceId:设备ID}/offline',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
document:
|
||||||
|
'### 认证说明\r\n\r\nCONNECT报文:\r\n```text\r\nclientId: 设备ID\r\nusername: secureId+"|"+timestamp\r\npassword: md5(secureId+"|"+timestamp+"|"+secureKey)\r\n ```\r\n\r\n说明: secureId以及secureKey在创建设备产品或设备实例时进行配置. \r\ntimestamp为当前时间戳(毫秒),与服务器时间不能相差5分钟.\r\nmd5为32位,不区分大小写.',
|
||||||
|
metadata: '',
|
||||||
|
};
|
||||||
|
|
||||||
function generateUUID() {
|
function generateUUID() {
|
||||||
var d = new Date().getTime();
|
var d = new Date().getTime();
|
||||||
|
@ -400,6 +558,8 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const clientHeight = document.body.clientHeight;
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
|
|
||||||
|
@ -412,7 +572,7 @@ const allProcotolList = ref([]);
|
||||||
const networkCurrent = ref('');
|
const networkCurrent = ref('');
|
||||||
const procotolCurrent = ref('');
|
const procotolCurrent = ref('');
|
||||||
let config = ref({});
|
let config = ref({});
|
||||||
let columnsMQTT = ref([]);
|
let columnsMQTT = ref(<TableColumnType>[]);
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
name: '',
|
name: '',
|
||||||
description: '',
|
description: '',
|
||||||
|
@ -576,7 +736,7 @@ const next = async () => {
|
||||||
//使用测试数据2
|
//使用测试数据2
|
||||||
config.value = result2;
|
config.value = result2;
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
columnsMQTT = [
|
columnsMQTT.value = [
|
||||||
{
|
{
|
||||||
title: '分组',
|
title: '分组',
|
||||||
dataIndex: 'group',
|
dataIndex: 'group',
|
||||||
|
@ -584,20 +744,24 @@ const next = async () => {
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: (value, row, index) => {
|
customCell: (record: object, rowIndex: number) => {
|
||||||
const obj = {
|
const obj = {
|
||||||
children: value,
|
children: record,
|
||||||
attrs: {},
|
rowSpan: 0,
|
||||||
};
|
};
|
||||||
const list = (config && config.routes) || [];
|
const list =
|
||||||
const arr = list.filter((res) => {
|
(config.value && config.value.routes) || [];
|
||||||
return res.group == row.group;
|
|
||||||
});
|
const arr = list.filter(
|
||||||
if (index == 0 || list[index - 1].group !== row.group) {
|
(res: object) => res.group == record.group,
|
||||||
obj.attrs.rowSpan = arr.length;
|
);
|
||||||
} else {
|
|
||||||
obj.attrs.rowSpan = 0;
|
if (
|
||||||
}
|
rowIndex == 0 ||
|
||||||
|
list[rowIndex - 1].group !== record.group
|
||||||
|
)
|
||||||
|
obj.rowSpan = arr.length;
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -605,6 +769,7 @@ const next = async () => {
|
||||||
title: 'topic',
|
title: 'topic',
|
||||||
dataIndex: 'topic',
|
dataIndex: 'topic',
|
||||||
key: 'topic',
|
key: 'topic',
|
||||||
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -614,7 +779,6 @@ const next = async () => {
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'stream' },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '说明',
|
title: '说明',
|
||||||
|
@ -755,7 +919,6 @@ watch(
|
||||||
}
|
}
|
||||||
.card-last {
|
.card-last {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
max-height: 580px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<a-upload
|
<a-upload
|
||||||
accept=".pem"
|
accept=".pem"
|
||||||
listType="text"
|
listType="text"
|
||||||
:action="`${BASE_API_PATH}${NETWORK_CERTIFICATE_UPLOAD}`"
|
:action="NETWORK_CERTIFICATE_UPLOAD"
|
||||||
:headers="{
|
:headers="{
|
||||||
[TOKEN_KEY]: LocalStore.get(TOKEN_KEY),
|
[TOKEN_KEY]: LocalStore.get(TOKEN_KEY),
|
||||||
}"
|
}"
|
||||||
|
@ -31,11 +31,8 @@ import { UploadOutlined } from '@ant-design/icons-vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import {
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
BASE_API_PATH,
|
import { NETWORK_CERTIFICATE_UPLOAD } from '@/api/link/certificate';
|
||||||
TOKEN_KEY,
|
|
||||||
NETWORK_CERTIFICATE_UPLOAD,
|
|
||||||
} from '@/utils/variable';
|
|
||||||
import type { UploadProps } from 'ant-design-vue';
|
import type { UploadProps } from 'ant-design-vue';
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change']);
|
const emit = defineEmits(['update:modelValue', 'change']);
|
||||||
|
|
|
@ -97,12 +97,6 @@ import { message, Form } from 'ant-design-vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import CertificateFile from './CertificateFile.vue';
|
import CertificateFile from './CertificateFile.vue';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { LocalStore } from '@/utils/comm';
|
|
||||||
import {
|
|
||||||
BASE_API_PATH,
|
|
||||||
TOKEN_KEY,
|
|
||||||
NETWORK_CERTIFICATE_UPLOAD,
|
|
||||||
} from '@/utils/variable';
|
|
||||||
import { save } from '@/api/link/certificate';
|
import { save } from '@/api/link/certificate';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
Loading…
Reference in New Issue