From cd1e08c055a4941c3b9876ae8a633a394167870b Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Thu, 23 Feb 2023 10:58:50 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/Product/index.vue | 5 ++-- src/views/iot-card/CardManagement/index.vue | 11 +++---- src/views/iot-card/Home/index.vue | 33 +++++++++++++-------- src/views/iot-card/Platform/index.vue | 9 +++--- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue index 215066a5..9bdd0020 100644 --- a/src/views/device/Product/index.vue +++ b/src/views/device/Product/index.vue @@ -195,10 +195,11 @@ import { isNoCommunity, downloadObject } from '@/utils/utils'; import { omit } from 'lodash-es'; import { typeOptions } from '@/components/Search/util'; import Save from './Save/index.vue'; +import { useMenuStore } from 'store/menu' /** * 表格数据 */ - + const menuStory = useMenuStore() const router = useRouter(); const isAdd = ref(0); const title = ref(''); @@ -426,7 +427,7 @@ const beforeUpload = (file: any) => { * 查看 */ const handleView = (id: string) => { - router.push('/iot/device/product/detail/' + id); + menuStory.jumpPage('device/Product/Detail',{id}) }; /** diff --git a/src/views/iot-card/CardManagement/index.vue b/src/views/iot-card/CardManagement/index.vue index fd04811a..886e23cb 100644 --- a/src/views/iot-card/CardManagement/index.vue +++ b/src/views/iot-card/CardManagement/index.vue @@ -348,9 +348,9 @@ import BindDevice from './BindDevice.vue'; import Import from './Import.vue'; import Export from './Export.vue'; import Save from './Save.vue'; - +import { useMenuStore } from 'store/menu' const router = useRouter(); - +const menuStory = useMenuStore() const cardManageRef = ref>({}); const params = ref>({}); const _selectedRowKeys = ref([]); @@ -536,9 +536,10 @@ const getActions = ( }, icon: 'EyeOutlined', onClick: () => { - router.push({ - path: `/iot-card/CardManagement/detail/${data.id}`, - }); + // router.push({ + // path: `/iot-card/CardManagement/detail/${data.id}`, + // }); + menuStory.jumpPage('iot-card/CardManagement/Detail',{id:data.id}) }, }, { diff --git a/src/views/iot-card/Home/index.vue b/src/views/iot-card/Home/index.vue index d95e98d3..e5300d1f 100644 --- a/src/views/iot-card/Home/index.vue +++ b/src/views/iot-card/Home/index.vue @@ -109,7 +109,7 @@ interface GuideItemProps { index?: number; auth: boolean; } - +const menuStory = useMenuStore(); const menuHasPermission = useMenuStore().hasPermission; const btnHasPermission = usePermissionStore().hasPermission; @@ -134,14 +134,16 @@ const guideList = [ name: '平台对接', english: 'STEP1', auth: paltformPermission, - url: platformUrl, + // url: platformUrl, + url: 'iot-card/Platform/Detail', }, { key: 'SCREEN', name: '物联卡管理', english: 'STEP2', auth: !!cardPermission, - url: cardUrl, + // url: cardUrl, + url: 'iot-card/CardManagement', param: { save: true }, }, { @@ -149,7 +151,8 @@ const guideList = [ name: '操作记录', english: 'STEP3', auth: !!recordUrl, - url: recordUrl, + // url: recordUrl, + url: 'iot-card/Record', }, ]; @@ -177,19 +180,25 @@ const pieChartData = ref([ ]); const jumpPage = (data: GuideItemProps) => { - if (data.url && data.auth) { - router.push({ path: `${data.url}`, ...data.param }); + // if (data.url && data.auth) { + // router.push({ path: `${data.url}`, ...data.param }); + // } else { + // message.warning('暂无权限,请联系管理员'); + // } + if (data.key === 'EQUIPMENT') { + menuStory.jumpPage(data.url, { id: 'add' }); } else { - message.warning('暂无权限,请联系管理员'); + menuStory.jumpPage(data.url); } }; const jumpDashboard = () => { - if (dashBoardUrl) { - router.push(`${dashBoardUrl}`); - } else { - message.warning('暂无权限,请联系管理员'); - } + // if (dashBoardUrl) { + // router.push(`${dashBoardUrl}`); + // } else { + // message.warning('暂无权限,请联系管理员'); + // } + menuStory.jumpPage('iot-card/Dashboard'); }; /** diff --git a/src/views/iot-card/Platform/index.vue b/src/views/iot-card/Platform/index.vue index a3f57d5a..f07d700d 100644 --- a/src/views/iot-card/Platform/index.vue +++ b/src/views/iot-card/Platform/index.vue @@ -145,9 +145,9 @@ import { getImage } from '@/utils/comm'; import type { ActionsType } from '@/components/Table'; import { message } from 'ant-design-vue'; import { queryList, update, del } from '@/api/iot-card/platform'; - +import { useMenuStore } from 'store/menu' +const menuStory = useMenuStore() const router = useRouter() - const platformRef = ref>({}); const params = ref>({}); @@ -225,7 +225,8 @@ const getActions = ( }, icon: 'EditOutlined', onClick: () => { - router.push(`/iot-card/Platform/detail/${data.id}`); + // router.push(`/iot-card/Platform/detail/${data.id}`); + menuStory.jumpPage('iot-card/Platform/Detail',{id:data.id}); }, }, { @@ -298,7 +299,7 @@ const handleSearch = (e: any) => { * 新增 */ const handleAdd = () => { - router.push(`/iot-card/Platform/detail/:id`) + menuStory.jumpPage('iot-card/Platform/Detail',{id:'add'}) }; 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 2/7] =?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({ ) } : -
+
} :
@@ -343,7 +343,8 @@ const JTable = defineComponent({ } else { return record?.[column?.dataIndex] || '' } - } + }, + emptyText: () => }} />
diff --git a/src/components/index.ts b/src/components/index.ts index 2c47f28a..28d5bdb1 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -11,6 +11,7 @@ import FileFormat from './FileFormat/index.vue' import JUpload from './JUpload/index.vue' import { BasicLayoutPage, BlankLayoutPage, PageContainer } from './Layout' import Ellipsis from './Ellipsis/index.vue' +import JEmpty from './Empty/index.vue' export default { install(app: App) { @@ -28,5 +29,6 @@ export default { .component('BlankLayoutPage', BlankLayoutPage) .component('PageContainer', PageContainer) .component('Ellipsis', Ellipsis) + .component('JEmpty', JEmpty) } } diff --git a/src/views/device/Instance/Detail/EdgeMap/MSelect.vue b/src/views/device/Instance/Detail/EdgeMap/MSelect.vue new file mode 100644 index 00000000..1b66df49 --- /dev/null +++ b/src/views/device/Instance/Detail/EdgeMap/MSelect.vue @@ -0,0 +1,117 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue new file mode 100644 index 00000000..7a112a28 --- /dev/null +++ b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/EdgeMap/index.vue b/src/views/device/Instance/Detail/EdgeMap/index.vue index bc1bd5fa..cb193cb8 100644 --- a/src/views/device/Instance/Detail/EdgeMap/index.vue +++ b/src/views/device/Instance/Detail/EdgeMap/index.vue @@ -1,5 +1,5 @@ @@ -85,6 +87,7 @@ - + :edgeId="instanceStore.current.parentId" + /> + + + - + From 7000ccd85b0a20b4998760adca3c1e7687cb9e80 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Thu, 23 Feb 2023 13:46:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20=E9=80=9A=E7=9F=A5=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=B0=83=E8=AF=95=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice/template.ts | 4 +- src/views/notice/Template/Debug/index.vue | 93 +++++++++++++---------- vite.config.ts | 4 +- 3 files changed, 55 insertions(+), 46 deletions(-) diff --git a/src/api/notice/template.ts b/src/api/notice/template.ts index 088f37aa..712ed67b 100644 --- a/src/api/notice/template.ts +++ b/src/api/notice/template.ts @@ -11,8 +11,8 @@ export default { // 修改 update: (data: any) => patch(`/notifier/template`, data), del: (id: any) => remove(`/notifier/template/${id}`), - getConfig: (data: any) => post(`/notifier/config/_query/no-paging?paging=false`, data), - getTemplateDetail: (id: string) => get(`/notifier/template/${id}/detail`), + getConfig: (data: any) => post(`/notifier/config/_query/no-paging?paging=false`, data), + getTemplateDetail: (id: string) => get(`/notifier/template/${id}/detail`), debug: (data: any, configId: string, templateId: string) => post(`/notifier/${configId}/${templateId}/_send`, data), getHistory: (data: any, id: string) => post(`/notify/history/template/${id}/_query`, data), // 钉钉/微信, 根据配置获取部门和用户 diff --git a/src/views/notice/Template/Debug/index.vue b/src/views/notice/Template/Debug/index.vue index 90b43d00..c1d50f77 100644 --- a/src/views/notice/Template/Debug/index.vue +++ b/src/views/notice/Template/Debug/index.vue @@ -8,8 +8,12 @@ @cancel="handleCancel" :confirmLoading="btnLoading" > - - + + - - + diff --git a/vite.config.ts b/vite.config.ts index aa5f4420..c27f4b93 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -85,8 +85,8 @@ export default defineConfig(({ mode}) => { // target: 'http://192.168.33.22:8800', // target: 'http://192.168.32.244:8881', // target: 'http://47.112.135.104:5096', // opcua - // target: 'http://120.77.179.54:8844', // 120测试 - target: 'http://47.108.63.174:8845', // 测试 + target: 'http://120.77.179.54:8844', // 120测试 + // target: 'http://47.108.63.174:8845', // 测试 // target: 'http://120.77.179.54:8844', ws: 'ws://120.77.179.54:8844', changeOrigin: true, From b239bfc8b2bfeaf027ad77fd23517a80c0e490cf Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Thu, 23 Feb 2023 14:30:03 +0800 Subject: [PATCH 5/7] =?UTF-8?q?update:=20=E8=AE=BE=E5=A4=87=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E8=B0=83=E8=AF=95,=20=E7=B2=BE=E7=AE=80=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/Function/components/Simple.vue | 173 ++++++++++-------- 1 file changed, 101 insertions(+), 72 deletions(-) diff --git a/src/views/device/Instance/Detail/Function/components/Simple.vue b/src/views/device/Instance/Detail/Function/components/Simple.vue index 44cd3f40..ba00bdac 100644 --- a/src/views/device/Instance/Detail/Function/components/Simple.vue +++ b/src/views/device/Instance/Detail/Function/components/Simple.vue @@ -14,60 +14,79 @@ > - -