-
+
@@ -18,6 +24,8 @@
From 3e82cc7d5e32d2d0925834615b90d52d819ff021 Mon Sep 17 00:00:00 2001
From: 100011797 <2642441182@qq.com>
Date: Thu, 23 Feb 2023 11:05:48 +0800
Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=A9=BA?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/device/instance.ts | 58 +-
src/components/Empty/assets/nodata.svg | 36 +
src/components/Empty/index.vue | 44 +
src/components/Table/index.tsx | 9 +-
src/components/index.ts | 2 +
.../Instance/Detail/EdgeMap/MSelect.vue | 117 +
.../Instance/Detail/EdgeMap/PatchMapping.vue | 189 +
.../device/Instance/Detail/EdgeMap/index.vue | 92 +-
.../Detail/components/EditTable/index.vue | 6 +-
yarn.lock | 10268 +++++++++-------
10 files changed, 6341 insertions(+), 4480 deletions(-)
create mode 100644 src/components/Empty/assets/nodata.svg
create mode 100644 src/components/Empty/index.vue
create mode 100644 src/views/device/Instance/Detail/EdgeMap/MSelect.vue
create mode 100644 src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue
diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts
index 35907a23..ca3354de 100644
--- a/src/api/device/instance.ts
+++ b/src/api/device/instance.ts
@@ -402,4 +402,60 @@ export const treeMapping = (data?: any) => server.post(`/data-collect/channel/_a
* @param data
* @returns
*/
-export const saveMapping = (thingId: any, provider: string, data?: any) => server.patch(`/things/collector/device/${thingId}/${provider}`, data)
\ No newline at end of file
+export const saveMapping = (thingId: any, provider: string, data?: any) => server.patch(`/things/collector/device/${thingId}/${provider}`, data)
+
+/**
+ * 查询边缘网关通道
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const edgeChannel = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/data-collector-channel-list/invoke`, data)
+
+/**
+ * 查询边缘网关采集器
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const edgeCollector = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/data-collector-list/invoke`, data)
+
+/**
+ * 查询边缘网关点位
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const edgePoint = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/data-collector-point-list/invoke`, data)
+
+/**
+ *
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const getEdgeMap = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/device-collector-list/invoke`, data)
+
+/**
+ *
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const removeEdgeMap = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/device-collector-delete/invoke`, data)
+
+/**
+ *
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const treeEdgeMap = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/data-collector-channel-tree/invoke`, data)
+
+/**
+ *
+ * @param deviceId
+ * @param data
+ * @returns
+ */
+export const saveEdgeMap = (deviceId: string, data?: any) => server.post(`/edge/operations/${deviceId}/device-collector-save/invoke`, data)
\ No newline at end of file
diff --git a/src/components/Empty/assets/nodata.svg b/src/components/Empty/assets/nodata.svg
new file mode 100644
index 00000000..4fb16097
--- /dev/null
+++ b/src/components/Empty/assets/nodata.svg
@@ -0,0 +1,36 @@
+
diff --git a/src/components/Empty/index.vue b/src/components/Empty/index.vue
new file mode 100644
index 00000000..19178587
--- /dev/null
+++ b/src/components/Empty/index.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx
index 3d3054c8..bdf9d073 100644
--- a/src/components/Table/index.tsx
+++ b/src/components/Table/index.tsx
@@ -1,11 +1,12 @@
import { UnorderedListOutlined, AppstoreOutlined } from '@ant-design/icons-vue'
import styles from './index.module.less'
-import { Pagination, Table, Empty, Spin, Alert } from 'ant-design-vue'
+import { Pagination, Table, Spin, Alert } from 'ant-design-vue'
import type { TableProps } from 'ant-design-vue/es/table'
import type { TooltipProps } from 'ant-design-vue/es/tooltip'
import type { PopconfirmProps } from 'ant-design-vue/es/popconfirm'
import { CSSProperties, PropType } from 'vue';
import type { JColumnsProps } from './types'
+import JEmpty from '@/components/Empty/index.vue'
enum ModelEnum {
TABLE = 'TABLE',
@@ -146,7 +147,6 @@ const JTable = defineComponent
({
}
} as any,
setup(props: JTableProps, { slots, emit, expose }) {
- const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE
const _model = ref(props.model ? props.model : ModelEnum.CARD); // 模式切换
const column = ref(props.gridColumn || 4);
const _dataSource = ref[]>([])
@@ -323,7 +323,7 @@ const JTable = defineComponent({
)
}
:
-