From c60410c1d49bde6c50593457256a41da6d4e1808 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Mon, 27 Feb 2023 14:40:49 +0800 Subject: [PATCH 01/23] =?UTF-8?q?feat:=20=E9=80=9A=E9=81=93=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/media/channel.ts | 15 ++ src/components/AIcon/index.tsx | 4 +- src/views/media/Device/Channel/index.vue | 254 ++++++++++++------- src/views/media/Device/Playback/index.vue | 7 + src/views/media/Device/Playback/typings.d.ts | 15 ++ 5 files changed, 200 insertions(+), 95 deletions(-) create mode 100644 src/api/media/channel.ts create mode 100644 src/views/media/Device/Playback/index.vue create mode 100644 src/views/media/Device/Playback/typings.d.ts diff --git a/src/api/media/channel.ts b/src/api/media/channel.ts new file mode 100644 index 00000000..3c4a67bd --- /dev/null +++ b/src/api/media/channel.ts @@ -0,0 +1,15 @@ +import server from '@/utils/request' + +export default { + // 列表 + list: (data: any, id: string) => server.post(`/media/device/${id}/channel/_query`, data), + // 详情 + detail: (id: string): any => server.get(`/media/channel/${id}`), + // 验证通道ID是否存在 + validateField: (params: string): any => server.get(`/media/channel/channelId/_validate`, params), + // 新增 + save: (data: any) => server.post(`/media/channel`, data), + // 修改 + update: (data: any) => server.put(`/media/channel`, data), + del: (id: string) => server.remove(`media/channel/${id}`), +} \ No newline at end of file diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx index 1c119785..b723fbde 100644 --- a/src/components/AIcon/index.tsx +++ b/src/components/AIcon/index.tsx @@ -55,7 +55,9 @@ const iconKeys = [ 'LikeOutlined', 'ArrowLeftOutlined', 'DownloadOutlined', - 'PauseOutlined' + 'PauseOutlined', + 'VideoCameraOutlined', + 'HistoryOutlined', ] const Icon = (props: {type: string}) => { diff --git a/src/views/media/Device/Channel/index.vue b/src/views/media/Device/Channel/index.vue index 4ef66e6d..6ca977e2 100644 --- a/src/views/media/Device/Channel/index.vue +++ b/src/views/media/Device/Channel/index.vue @@ -8,106 +8,129 @@ /> - - - - + + - + /> + + + + + + + 定时读取所选属性值 + + + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/Device/ReportEvent.vue b/src/views/rule-engine/Scene/Save/Device/ReportEvent.vue new file mode 100644 index 00000000..c127df2d --- /dev/null +++ b/src/views/rule-engine/Scene/Save/Device/ReportEvent.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/Device/Type.vue b/src/views/rule-engine/Scene/Save/Device/Type.vue index 7d1e0c23..a6d84d3a 100644 --- a/src/views/rule-engine/Scene/Save/Device/Type.vue +++ b/src/views/rule-engine/Scene/Save/Device/Type.vue @@ -7,23 +7,33 @@ > - + + + + + diff --git a/src/views/rule-engine/Scene/Save/Device/WriteProperty.vue b/src/views/rule-engine/Scene/Save/Device/WriteProperty.vue new file mode 100644 index 00000000..e75f2071 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/Device/WriteProperty.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/FunctionCall/FunctionCall.vue b/src/views/rule-engine/Scene/Save/components/FunctionCall/FunctionCall.vue new file mode 100644 index 00000000..74c99134 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/FunctionCall/FunctionCall.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/FunctionCall/index.ts b/src/views/rule-engine/Scene/Save/components/FunctionCall/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/views/rule-engine/Scene/Save/components/Timer/WhenOption.vue b/src/views/rule-engine/Scene/Save/components/Timer/WhenOption.vue new file mode 100644 index 00000000..345f3fb1 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/Timer/WhenOption.vue @@ -0,0 +1,98 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/Timer/index.ts b/src/views/rule-engine/Scene/Save/components/Timer/index.ts new file mode 100644 index 00000000..79dacbf1 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/Timer/index.ts @@ -0,0 +1,3 @@ +import Timer from './index.vue' + +export default Timer \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/Timer.vue b/src/views/rule-engine/Scene/Save/components/Timer/index.vue similarity index 68% rename from src/views/rule-engine/Scene/Save/components/Timer.vue rename to src/views/rule-engine/Scene/Save/components/Timer/index.vue index 5f4977f6..03054f3e 100644 --- a/src/views/rule-engine/Scene/Save/components/Timer.vue +++ b/src/views/rule-engine/Scene/Save/components/Timer/index.vue @@ -17,12 +17,26 @@ button-style='solid' /> - - + + @@ -151,11 +160,15 @@ +
+ +
+ + diff --git a/src/views/media/Device/Channel/index.vue b/src/views/media/Device/Channel/index.vue index 6ca977e2..0e17cec7 100644 --- a/src/views/media/Device/Channel/index.vue +++ b/src/views/media/Device/Channel/index.vue @@ -76,6 +76,12 @@ + + @@ -84,6 +90,7 @@ import ChannelApi from '@/api/media/channel'; import type { ActionsType } from '@/components/Table/index.vue'; import { useMenuStore } from 'store/menu'; import { message } from 'ant-design-vue'; +import Save from './Save.vue'; const menuStory = useMenuStore(); const route = useRoute(); @@ -163,6 +170,8 @@ const handleAdd = () => { const listRef = ref(); const playVis = ref(false); +const channelData = ref(); + const getActions = ( data: Partial>, type: 'card' | 'table', @@ -178,6 +187,7 @@ const getActions = ( icon: 'EditOutlined', onClick: () => { saveVis.value = true; + channelData.value = data; }, }, { From 9189d8a212d6c6310fcda95a75aa0370a7ba7555 Mon Sep 17 00:00:00 2001 From: wangshuaiswim Date: Mon, 27 Feb 2023 19:24:14 +0800 Subject: [PATCH 06/23] =?UTF-8?q?fix:=20=E7=89=A9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Metadata/Base/Edit/ExpandsForm.vue | 25 ++++- .../Metadata/Base/Edit/PropertyForm.vue | 91 ++++++++++++------- .../Metadata/Base/Edit/ValueTypeForm.vue | 9 +- .../components/Metadata/Base/Edit/index.vue | 31 +++++-- .../device/components/Metadata/Base/index.vue | 35 +++---- 5 files changed, 131 insertions(+), 60 deletions(-) diff --git a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue index 7377c4d0..d4061d54 100644 --- a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue +++ b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue @@ -2,20 +2,33 @@ - + - + + + + + + + + + \ No newline at end of file diff --git a/src/components/Metadata/BooleanParam/index.vue b/src/components/Metadata/BooleanParam/index.vue index 4e14a89a..4b93bf4d 100644 --- a/src/components/Metadata/BooleanParam/index.vue +++ b/src/components/Metadata/BooleanParam/index.vue @@ -77,5 +77,8 @@ onMounted(() => { } } } + :deep(input) { + height: 22px; + } } \ No newline at end of file diff --git a/src/components/Metadata/ConfigParam/index.vue b/src/components/Metadata/ConfigParam/index.vue new file mode 100644 index 00000000..802d3c99 --- /dev/null +++ b/src/components/Metadata/ConfigParam/index.vue @@ -0,0 +1,74 @@ + + + \ No newline at end of file diff --git a/src/components/Metadata/EnumParam/index.vue b/src/components/Metadata/EnumParam/index.vue index bb9daf5d..a67eac0b 100644 --- a/src/components/Metadata/EnumParam/index.vue +++ b/src/components/Metadata/EnumParam/index.vue @@ -157,4 +157,8 @@ const handleAdd = () => { :deep(.ant-select) { font-size: 12px; } + +:deep(input) { + height: 22px; +} \ No newline at end of file diff --git a/src/components/Metadata/JsonParam/index.vue b/src/components/Metadata/JsonParam/index.vue index 868b44fa..f28dc516 100644 --- a/src/components/Metadata/JsonParam/index.vue +++ b/src/components/Metadata/JsonParam/index.vue @@ -19,8 +19,8 @@ { required: true, message: '请输入标识' }, { max: 64, message: '最多可输入64个字符' }, { - pattern: /^[a-zA-Z0-9_]+$/, - message: '请输入英文或者数字或者-或者_', + pattern: /^[a-zA-Z0-9_\-]+$/, + message: 'ID只能由数字、字母、下划线、中划线组成', }, ]"> @@ -169,4 +169,8 @@ const handleAdd = () => { :deep(.ant-select) { font-size: 12px; } + +:deep(input) { + height: 22px; +} \ No newline at end of file diff --git a/src/components/Metadata/MetricsParam/index.vue b/src/components/Metadata/MetricsParam/index.vue new file mode 100644 index 00000000..954e6be9 --- /dev/null +++ b/src/components/Metadata/MetricsParam/index.vue @@ -0,0 +1,202 @@ + + + \ No newline at end of file diff --git a/src/views/device/components/Metadata/Base/Edit/index.vue b/src/views/device/components/Metadata/Base/Edit/index.vue index 81111112..2ae6b5ff 100644 --- a/src/views/device/components/Metadata/Base/Edit/index.vue +++ b/src/views/device/components/Metadata/Base/Edit/index.vue @@ -33,6 +33,11 @@ const props = defineProps({ type: String } }) +interface Emits { + (e: 'refresh'): void; +} +const emit = defineEmits() + const route = useRoute() const instanceStore = useInstanceStore() @@ -95,6 +100,7 @@ const save = reactive({ detail.metadata = metadata productStore.setCurrent(detail) } + emit('refresh') } const _data = updateMetadata(type, [formValue], _detail, updateStore) const result = await asyncUpdateMetadata(props.type, _data) diff --git a/src/views/device/components/Metadata/Base/index.vue b/src/views/device/components/Metadata/Base/index.vue index 0671faf0..04be78d2 100644 --- a/src/views/device/components/Metadata/Base/index.vue +++ b/src/views/device/components/Metadata/Base/index.vue @@ -13,7 +13,7 @@ 新增 - + diff --git a/src/views/rule-engine/Alarm/Log/index.vue b/src/views/rule-engine/Alarm/Log/index.vue index d9e0a826..da7e6983 100644 --- a/src/views/rule-engine/Alarm/Log/index.vue +++ b/src/views/rule-engine/Alarm/Log/index.vue @@ -1,9 +1,70 @@ \ No newline at end of file From 18b0f25993e005852352ae7075bc5fe70a58d572 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Tue, 28 Feb 2023 13:41:04 +0800 Subject: [PATCH 11/23] fix: bug#10231 --- src/views/notice/Config/index.vue | 4 +++- src/views/notice/Template/index.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/notice/Config/index.vue b/src/views/notice/Config/index.vue index cd89502e..2ac2df0e 100644 --- a/src/views/notice/Config/index.vue +++ b/src/views/notice/Config/index.vue @@ -70,7 +70,9 @@
说明
-
{{ slotProps.description }}
+ + {{ slotProps.description }} +
diff --git a/src/views/notice/Template/index.vue b/src/views/notice/Template/index.vue index f5ecbb08..e18ec895 100644 --- a/src/views/notice/Template/index.vue +++ b/src/views/notice/Template/index.vue @@ -70,7 +70,9 @@
说明
-
{{ slotProps.description }}
+ + {{ slotProps.description }} +
From 7dbf13888f8c2fbdf5ac709378cfd8b62d482a14 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Tue, 28 Feb 2023 14:25:38 +0800 Subject: [PATCH 12/23] =?UTF-8?q?feat:=20=E5=9C=B0=E5=9B=BE=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AMapComponent/PathSimplifier.vue | 106 ++++++++++++++ src/components/AMapComponent/index.vue | 71 ++++++++++ src/components/AMapComponent/types.d.ts | 130 ++++++++++++++++++ src/components/AMapComponent/utils.ts | 26 ++++ src/components/index.ts | 4 + .../Detail/Running/Property/Detail/AMap.vue | 54 -------- .../Running/Property/Detail/PropertyAMap.vue | 23 +++- .../Detail/Running/Property/Detail/index.vue | 2 +- 8 files changed, 356 insertions(+), 60 deletions(-) create mode 100644 src/components/AMapComponent/PathSimplifier.vue create mode 100644 src/components/AMapComponent/index.vue create mode 100644 src/components/AMapComponent/types.d.ts create mode 100644 src/components/AMapComponent/utils.ts delete mode 100644 src/views/device/Instance/Detail/Running/Property/Detail/AMap.vue diff --git a/src/components/AMapComponent/PathSimplifier.vue b/src/components/AMapComponent/PathSimplifier.vue new file mode 100644 index 00000000..a34d05d1 --- /dev/null +++ b/src/components/AMapComponent/PathSimplifier.vue @@ -0,0 +1,106 @@ + + + \ No newline at end of file diff --git a/src/components/AMapComponent/index.vue b/src/components/AMapComponent/index.vue new file mode 100644 index 00000000..03e9befd --- /dev/null +++ b/src/components/AMapComponent/index.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/src/components/AMapComponent/types.d.ts b/src/components/AMapComponent/types.d.ts new file mode 100644 index 00000000..db4f66b6 --- /dev/null +++ b/src/components/AMapComponent/types.d.ts @@ -0,0 +1,130 @@ +export type PathDataType = number[][]; + +export type PathSimplifierOptions = { + map?: any; + zIndex?: number; + data?: number[][]; + getPath?: (pathData: {}, pathIndex: number) => PathDataType; + getZIndex?: (pathData: any, pathIndex: number) => number; + getHoverTitle?: (pathData: any, pathIndex: number, pointIndex: number) => string; + autoSetFitView?: boolean; + clickToSelectPath?: boolean; + onTopWhenSelected?: boolean; + renderConstructor?: Function; + renderOptions?: {}; +}; + +export type PathDataItemType = { + name?: string; + path: PathDataType; +}; + +export interface PathSimplifier { + new (options: PathSimplifierOptions); + + readonly supportCanvas: boolean; + + getZIndexOfPath: (pathIndex: number) => number; + + setZIndexOfPath: (pathIndex: number, zIndex: number) => void; + + /** + * 是否置顶显示pathIndex对应的轨迹 + * @param pathIndex + * @param isTop isTop为真,设置 zIndex 为 现存最大zIndex+1; isTop为假,设置 zIndex 为 构造参数中 getZIndex 的返回值 + */ + toggleTopOfPath: (pathIndex: number, isTop: boolean) => void; + + getPathData: (pathIndex: number) => any; + + createPathNavigator: (pathIndex: number, options: {}) => PathNavigator; + + getPathNavigators: () => any[]; + + clearPathNavigators: () => void; + + getSelectedPathData: () => any; + + getSelectedPathIndex: () => number; + + isSelectedPathIndex: (pathIndex: number) => boolean; + + setSelectedPathIndex: (pathIndex: number) => void; + + render: () => void; + + renderLater: (delay: number[]) => void; + + setData: (data: any[]) => void; + + setFitView: (pathIndex: number) => void; + + on: (eventName: string, handler: Function) => void; + + off: (eventName: string, handler: Function) => void; + + hide: () => void; + + show: () => void; + + isHidden: () => boolean; + + getRender: () => boolean; + + getRenderOptions: () => any; +} + +export interface PathNavigatorOptions { + loop?: boolean; + speed?: number; + pathNavigatorStyle?: {}; + animInterval?: number; + dirToPosInMillsecs?: number; + range?: [number, number]; +} + +export interface PathNavigator { + new (options: PathNavigatorOptions); + + start: (pointIndex?: number) => void; + + pause: () => void; + + resume: () => void; + + stop: () => void; + + destroy: () => void; + + getCursor: () => any; + + getNaviStatus: () => string; + + getPathIndex: () => number; + + getPosition: () => [number, number]; + + getSpeed: () => number; + + getMovedDistance: () => number; + + getPathStartIdx: () => number; + + getPathEndIdx: () => number; + + moveByDistance: (distance: number) => void; + + moveToPoint: (idx: number, tail: number) => void; + + isCursorAtPathEnd: () => boolean; + + isCursorAtPathStart: () => boolean; + + setSpeed: (speed: number) => void; + + setRange: (startIndex: number, endIndex: number) => void; + + on: (eventName: string, handler: Function) => void; + + off: (eventName: string, handler: Function) => void; +} diff --git a/src/components/AMapComponent/utils.ts b/src/components/AMapComponent/utils.ts new file mode 100644 index 00000000..dd7f91ec --- /dev/null +++ b/src/components/AMapComponent/utils.ts @@ -0,0 +1,26 @@ +const protocol = window.location.protocol; + +const buildScriptTag = (src: string): HTMLScriptElement => { + const script = document.createElement('script'); + script.type = 'text/javascript'; + script.async = true; + script.defer = true; + script.src = src; + return script; +}; + +export const getAMapUiPromise = (version: string = '1.0'): Promise => { + if ((window as any).AMapUI) { + return Promise.resolve(); + } + const script = buildScriptTag(`${protocol}//webapi.amap.com/ui/${version}/main-async.js`); + const pro = new Promise((resolve) => { + script.onload = () => { + (window as any).initAMapUI(); + resolve(true); + }; + }); + + document.body.append(script); + return pro; +}; \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 28d5bdb1..fe3c80f6 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -12,6 +12,8 @@ import JUpload from './JUpload/index.vue' import { BasicLayoutPage, BlankLayoutPage, PageContainer } from './Layout' import Ellipsis from './Ellipsis/index.vue' import JEmpty from './Empty/index.vue' +import AMapComponent from './AMapComponent/index.vue' +import PathSimplifier from './AMapComponent/PathSimplifier.vue' export default { install(app: App) { @@ -30,5 +32,7 @@ export default { .component('PageContainer', PageContainer) .component('Ellipsis', Ellipsis) .component('JEmpty', JEmpty) + .component('AMapComponent', AMapComponent) + .component('PathSimplifier', PathSimplifier) } } diff --git a/src/views/device/Instance/Detail/Running/Property/Detail/AMap.vue b/src/views/device/Instance/Detail/Running/Property/Detail/AMap.vue deleted file mode 100644 index e0656cec..00000000 --- a/src/views/device/Instance/Detail/Running/Property/Detail/AMap.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - diff --git a/src/views/device/Instance/Detail/Running/Property/Detail/PropertyAMap.vue b/src/views/device/Instance/Detail/Running/Property/Detail/PropertyAMap.vue index b7860f91..e6380a17 100644 --- a/src/views/device/Instance/Detail/Running/Property/Detail/PropertyAMap.vue +++ b/src/views/device/Instance/Detail/Running/Property/Detail/PropertyAMap.vue @@ -3,12 +3,14 @@
- 开始动画 - 停止动画 + 开始动画 + 停止动画
- + + + @@ -16,7 +18,6 @@ import { getPropertyData } from '@/api/device/instance'; import { useInstanceStore } from '@/store/instance'; import encodeQuery from '@/utils/encodeQuery'; -import AMap from './AMap.vue'; const instanceStore = useInstanceStore(); @@ -33,6 +34,15 @@ const prop = defineProps({ const geoList = ref([]); const loading = ref(false); +const amapPath = ref() + +const onStart = () => { + amapPath.value.start() +} + +const onStop = () => { + amapPath.value.stop() +} const query = async () => { loading.value = true; @@ -53,7 +63,10 @@ const query = async () => { ((resp.result as any)?.data || []).forEach((item: any) => { list.push([item.value.lon, item.value.lat]); }); - geoList.value = list + geoList.value = [{ + name: prop?.data?.name, + path: list + }] } }; diff --git a/src/views/device/Instance/Detail/Running/Property/Detail/index.vue b/src/views/device/Instance/Detail/Running/Property/Detail/index.vue index 6bdb9c4b..39d3d376 100644 --- a/src/views/device/Instance/Detail/Running/Property/Detail/index.vue +++ b/src/views/device/Instance/Detail/Running/Property/Detail/index.vue @@ -2,7 +2,7 @@
- + From e0be36fe33b9567ed6296de497fc084d15e72e7f Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Tue, 28 Feb 2023 15:01:16 +0800 Subject: [PATCH 13/23] =?UTF-8?q?feat:=20=E9=80=9A=E9=81=93=E6=96=B0?= =?UTF-8?q?=E5=A2=9E/=E7=BC=96=E8=BE=91/=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/media/channel.ts | 5 +- src/views/media/Device/Channel/Save.vue | 172 +++++++++++++++++++---- src/views/media/Device/Channel/index.vue | 13 +- 3 files changed, 157 insertions(+), 33 deletions(-) diff --git a/src/api/media/channel.ts b/src/api/media/channel.ts index 3c4a67bd..da64173a 100644 --- a/src/api/media/channel.ts +++ b/src/api/media/channel.ts @@ -6,10 +6,11 @@ export default { // 详情 detail: (id: string): any => server.get(`/media/channel/${id}`), // 验证通道ID是否存在 - validateField: (params: string): any => server.get(`/media/channel/channelId/_validate`, params), + validateField: (params: any): any => server.get(`/media/channel/channelId/_validate`, params), // 新增 save: (data: any) => server.post(`/media/channel`, data), // 修改 - update: (data: any) => server.put(`/media/channel`, data), + update: (id: string, data: any) => server.put(`/media/channel/${id}`, data), + // 删除 del: (id: string) => server.remove(`media/channel/${id}`), } \ No newline at end of file diff --git a/src/views/media/Device/Channel/Save.vue b/src/views/media/Device/Channel/Save.vue index 51762e16..3a6de43c 100644 --- a/src/views/media/Device/Channel/Save.vue +++ b/src/views/media/Device/Channel/Save.vue @@ -12,7 +12,18 @@ - + - + - + - - - - - - + + + + + + - + @@ -88,13 +128,18 @@ - - diff --git a/src/views/media/Device/Channel/index.vue b/src/views/media/Device/Channel/index.vue index 0e17cec7..a01bb5ae 100644 --- a/src/views/media/Device/Channel/index.vue +++ b/src/views/media/Device/Channel/index.vue @@ -1,3 +1,4 @@ + @@ -62,7 +62,6 @@ import { useInstanceStore } from '@/store/instance' import { useProductStore } from '@/store/product' import { useMetadataStore } from '@/store/metadata' import PermissionButton from '@/components/PermissionButton/index.vue' -import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons-vue' import { message } from 'ant-design-vue/es' import { SystemConst } from '@/utils/consts' import { Store } from 'jetlinks-store' diff --git a/src/views/device/components/Metadata/Import/index.vue b/src/views/device/components/Metadata/Import/index.vue index eb5de412..7d8867b1 100644 --- a/src/views/device/components/Metadata/Import/index.vue +++ b/src/views/device/components/Metadata/Import/index.vue @@ -3,7 +3,7 @@ @ok="handleImport" :confirm-loading="loading">

- + 导入的物模型会覆盖原来的属性、功能、事件、标签,请谨慎操作。

@@ -37,8 +37,7 @@ - - + @@ -62,9 +61,8 @@ import { Store } from 'jetlinks-store'; import { SystemConst } from '@/utils/consts'; import { useInstanceStore } from '@/store/instance' import { useProductStore } from '@/store/product'; -import { UploadOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { FILE_UPLOAD } from '@/api/comm'; -import { LocalStore, getToken } from '@/utils/comm'; +import { getToken } from '@/utils/comm'; import MonacoEditor from '@/components/MonacoEditor/index.vue' const route = useRoute() @@ -258,13 +256,15 @@ const handleImport = async () => { if (resp.status === 200) { if (props?.type === 'device') { const metadata: DeviceMetadata = JSON.parse(paramsDevice || '{}') + // TODO导入 // MetadataAction.insert(metadata); - instanceStore.setCurrent(metadata) + // instanceStore.setCurrent(metadata) message.success('导入成功') } else { const metadata: ProductItem = JSON.parse(params?.metadata || '{}') + // TODO导入 // MetadataAction.insert(metadata); - productStore.setCurrent(metadata) + // productStore.setCurrent(metadata) message.success('导入成功') } } diff --git a/src/views/device/components/Metadata/index.vue b/src/views/device/components/Metadata/index.vue index 42f3d46d..36ea3747 100644 --- a/src/views/device/components/Metadata/index.vue +++ b/src/views/device/components/Metadata/index.vue @@ -6,7 +6,7 @@ ? '该设备已脱离产品物模型,修改产品物模型对该设备无影响' : '设备会默认继承产品的物模型,修改设备物模型后将脱离产品物模型'">
- + {{ instanceStore.detail?.independentMetadata && type === 'device' ? '该设备已脱离产品物模型,修改产品物模型对该设备无影响' @@ -47,7 +47,6 @@ + + diff --git a/src/views/system/Apply/index.vue b/src/views/system/Apply/index.vue index 153eebba..967e61de 100644 --- a/src/views/system/Apply/index.vue +++ b/src/views/system/Apply/index.vue @@ -390,7 +390,13 @@ const table = { title: '查看API', }, icon: 'icon-chakanAPI', - onClick: () => {}, + onClick: () => { + menuStory.jumpPage( + 'system/Apply/View', + {}, + { code: data.id }, + ); + }, }, ); // 其他不为空 diff --git a/src/views/system/Platforms/Api/components/HomePage.vue b/src/views/system/Platforms/Api/components/HomePage.vue index e39b1d1f..8576eb8d 100644 --- a/src/views/system/Platforms/Api/components/HomePage.vue +++ b/src/views/system/Platforms/Api/components/HomePage.vue @@ -60,9 +60,10 @@

示例数据

-
+ -
+

验签说明

使用和签名相同的算法(不需要对响应结果排序)

-
@@ -122,19 +119,19 @@

添加 SDK 依赖

将以下Maven依赖加入到pom.xml文件中
-

SDK 客户端的初始化和请求方式

-
@@ -144,7 +141,7 @@ diff --git a/src/views/system/Platforms/Api/components/LeftTree.vue b/src/views/system/Platforms/Api/components/LeftTree.vue index 7c63f1bd..7420a355 100644 --- a/src/views/system/Platforms/Api/components/LeftTree.vue +++ b/src/views/system/Platforms/Api/components/LeftTree.vue @@ -2,6 +2,7 @@ @@ -14,17 +15,23 @@ diff --git a/src/views/media/Cascade/index.vue b/src/views/media/Cascade/index.vue index a5eb66c0..21ac2e94 100644 --- a/src/views/media/Cascade/index.vue +++ b/src/views/media/Cascade/index.vue @@ -2,17 +2,19 @@ + + + + + @@ -131,6 +198,7 @@ \ No newline at end of file diff --git a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue index cf6d62a3..d3376921 100644 --- a/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue +++ b/src/views/device/components/Metadata/Base/Edit/ExpandsForm.vue @@ -10,7 +10,7 @@ - + @@ -24,7 +24,7 @@