From 66f77fbbd46f462ed286757a1299eddad1d5edf4 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Wed, 1 Feb 2023 11:00:20 +0800 Subject: [PATCH 01/16] =?UTF-8?q?update:=20=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/Menu/Detail/ButtonMange.vue | 16 +++++----- src/views/system/Menu/Detail/index.vue | 5 ++++ .../Menu/components/ButtonAddDialog.vue | 30 +++++++++++++++---- .../system/Menu/components/PermissChoose.vue | 6 +++- src/views/system/Menu/index.vue | 8 ++++- 5 files changed, 49 insertions(+), 16 deletions(-) diff --git a/src/views/system/Menu/Detail/ButtonMange.vue b/src/views/system/Menu/Detail/ButtonMange.vue index ec037a7d..861b510f 100644 --- a/src/views/system/Menu/Detail/ButtonMange.vue +++ b/src/views/system/Menu/Detail/ButtonMange.vue @@ -4,13 +4,13 @@ ref="tableRef" :columns="table.columns" model="TABLE" - :dataSource="table.data" + :dataSource="table.tableData" > @@ -21,7 +21,7 @@ @@ -31,7 +31,7 @@ @@ -81,8 +81,8 @@ const routeParams = { const dialogRef = ref(null); const dialog = { // 打开弹窗 - openDialog: (row?: object) => { - dialogRef.value && dialogRef.value.openDialog(row); + openDialog: (mode: string, row?: object) => { + dialogRef.value && dialogRef.value.openDialog(mode, row); }, confirm: () => {}, }; @@ -114,11 +114,11 @@ const table = reactive({ width: 240, }, ], - data: [] as tableDataItem[], + tableData: [] as tableDataItem[], getList: () => { routeParams.id && getMenuInfo_api(routeParams.id).then((resp: any) => { - table.data = resp.result.buttons as tableDataItem[]; + table.tableData = resp.result.buttons as tableDataItem[]; }); }, }); diff --git a/src/views/system/Menu/Detail/index.vue b/src/views/system/Menu/Detail/index.vue index 08de6fd6..9c40f0e1 100644 --- a/src/views/system/Menu/Detail/index.vue +++ b/src/views/system/Menu/Detail/index.vue @@ -17,6 +17,11 @@ const activeKey = ref('basic'); + From 15e19f87146fa0123687f14db80c5e9dcefca86a Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 1 Feb 2023 11:38:22 +0800 Subject: [PATCH 02/16] =?UTF-8?q?fix:=20=E8=AE=BE=E5=A4=87=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E7=BD=91=E5=85=B3/=E8=AF=81=E4=B9=A6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/link/AccessConfig/Detail/index.vue | 82 ++++---- .../AccessConfig/components/Channel/index.vue | 10 +- .../AccessConfig/components/Cloud/Ctwing.vue | 18 +- .../AccessConfig/components/Cloud/OneNet.vue | 17 +- .../AccessConfig/components/Edge/index.vue | 14 +- .../AccessConfig/components/Media/GB28181.vue | 10 +- .../AccessConfig/components/Media/index.vue | 10 +- .../link/AccessConfig/components/Network.vue | 40 ++-- src/views/link/AccessConfig/index.vue | 33 +-- src/views/link/Certificate/Detail/index.vue | 196 +++++++++--------- src/views/link/Certificate/index.vue | 40 ++-- 11 files changed, 238 insertions(+), 232 deletions(-) diff --git a/src/views/link/AccessConfig/Detail/index.vue b/src/views/link/AccessConfig/Detail/index.vue index 3211fd75..f15fcdf3 100644 --- a/src/views/link/AccessConfig/Detail/index.vue +++ b/src/views/link/AccessConfig/Detail/index.vue @@ -1,42 +1,44 @@ + From c8b94bf439e7b03a32bc0ee86fd0f5e3daf80115 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 1 Feb 2023 15:39:13 +0800 Subject: [PATCH 03/16] =?UTF-8?q?feat:=20=E8=A7=86=E9=A2=91=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E9=A6=96=E9=A1=B5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/components/StepCard.vue | 9 ++- src/views/media/DashBoard/index.less | 38 +++++++++ src/views/media/DashBoard/index.vue | 7 ++ src/views/media/Home/index.vue | 104 +++++++++++++++++++++++++ src/views/media/Home/typings.d.ts | 24 ++++++ 5 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 src/views/media/DashBoard/index.less create mode 100644 src/views/media/DashBoard/index.vue create mode 100644 src/views/media/Home/index.vue create mode 100644 src/views/media/Home/typings.d.ts diff --git a/src/views/home/components/StepCard.vue b/src/views/home/components/StepCard.vue index 661de226..fdeabe9d 100644 --- a/src/views/home/components/StepCard.vue +++ b/src/views/home/components/StepCard.vue @@ -117,11 +117,14 @@ const objToParams = (source: object): string => { } .box-list { - grid-template-columns: repeat(5, 1fr); - display: grid; - grid-column-gap: 66px; + // grid-template-columns: repeat(5, 1fr); + // display: grid; + // grid-column-gap: 66px; + display: flex; + gap: 66px; .list-item { + flex: 1; position: relative; .box-top { position: relative; diff --git a/src/views/media/DashBoard/index.less b/src/views/media/DashBoard/index.less new file mode 100644 index 00000000..870c54fe --- /dev/null +++ b/src/views/media/DashBoard/index.less @@ -0,0 +1,38 @@ +.media-dash-board { + .top-card-items { + margin-bottom: 12px; + + .top-card-item { + width: 25%; + padding: 6px 24px; + border: 1px solid #e3e3e3; + + .top-card-top { + display: flex; + padding: 12px 0; + + .top-card-top-left { + width: 80px; + } + + .top-card-top-right { + .top-card-total { + font-weight: bold; + font-size: 20px; + } + } + } + + .top-card-bottom { + display: flex; + justify-content: space-between; + padding: 12px 0; + border-top: 1px solid #e3e3e3; + } + } + } + + .media-dash-board-body { + border: 1px solid #f0f0f0; + } +} diff --git a/src/views/media/DashBoard/index.vue b/src/views/media/DashBoard/index.vue new file mode 100644 index 00000000..0bd9d297 --- /dev/null +++ b/src/views/media/DashBoard/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/views/media/Home/index.vue b/src/views/media/Home/index.vue new file mode 100644 index 00000000..1de094fd --- /dev/null +++ b/src/views/media/Home/index.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/views/media/Home/typings.d.ts b/src/views/media/Home/typings.d.ts new file mode 100644 index 00000000..995964b8 --- /dev/null +++ b/src/views/media/Home/typings.d.ts @@ -0,0 +1,24 @@ +type BaseItem = { + id: string; + name: string; +}; +type State = { + value: string; + text: string; +}; + +export type DeviceItem = { + photoUrl?: string; + channelNumber: number; + createTime: number; + firmware: string; + gatewayId: string; + host: string; + manufacturer: string; + model: string; + port: number; + provider: string; + state: State; + streamMode: string; + transport: string; +} & BaseItem; From 6879397b778d540f71fa0244c45c923178700d65 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 1 Feb 2023 15:52:15 +0800 Subject: [PATCH 04/16] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=9A=84=E7=89=B9=E6=AE=8A=E5=8F=82=E6=95=B0column?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/comm.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/utils/comm.ts b/src/utils/comm.ts index e7b4363f..26d09dd9 100644 --- a/src/utils/comm.ts +++ b/src/utils/comm.ts @@ -76,3 +76,23 @@ export function getSlotVNode(slots: Slots, props: Record, pr } return (props[prop] || slots[prop]?.()) as T; } + + +/** + * 修改Select参数column的值 + * @param e // 查询参数 e + * @param column {Object} {需要修改的值: 修改后的值} + * { + username: 'context.username', + } + */ +export const modifySearchColumnValue = (e: any, column: object) => { + e.terms.forEach((item: any) => { + item.terms.forEach((t: any) => { + if (column[t.column]) { + t.column = column[t.column]; + } + }); + }); + return e; +}; \ No newline at end of file From 59e4bacd74833abf5725590af5d41a8133df51c3 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 1 Feb 2023 15:59:53 +0800 Subject: [PATCH 05/16] =?UTF-8?q?feat:=20=E5=9F=BA=E7=A1=80=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=BB=84=E4=BB=B6=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/media/home.ts | 9 ++ .../media/Home/components/BasicCountCard.vue | 117 ++++++++++++++++++ src/views/media/Home/index.vue | 4 +- 3 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 src/api/media/home.ts create mode 100644 src/views/media/Home/components/BasicCountCard.vue diff --git a/src/api/media/home.ts b/src/api/media/home.ts new file mode 100644 index 00000000..8385fd80 --- /dev/null +++ b/src/api/media/home.ts @@ -0,0 +1,9 @@ +import server from '@/utils/request' + +export default { + // 设备数量 + deviceCount: () => server.get(`/media/device/_count`), + // 通道数量 + channelCount: () => server.post(`/media/channel/_count`), + +} \ No newline at end of file diff --git a/src/views/media/Home/components/BasicCountCard.vue b/src/views/media/Home/components/BasicCountCard.vue new file mode 100644 index 00000000..024f1b19 --- /dev/null +++ b/src/views/media/Home/components/BasicCountCard.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/views/media/Home/index.vue b/src/views/media/Home/index.vue index 1de094fd..a0f26df9 100644 --- a/src/views/media/Home/index.vue +++ b/src/views/media/Home/index.vue @@ -8,7 +8,7 @@ /> - + @@ -26,9 +26,9 @@ diff --git a/src/views/Log/System/index.vue b/src/views/Log/System/index.vue new file mode 100644 index 00000000..982cc922 --- /dev/null +++ b/src/views/Log/System/index.vue @@ -0,0 +1,246 @@ + + + + diff --git a/src/views/Log/index.vue b/src/views/Log/index.vue new file mode 100644 index 00000000..9193b21f --- /dev/null +++ b/src/views/Log/index.vue @@ -0,0 +1,28 @@ + + diff --git a/src/views/Log/typings.d.ts b/src/views/Log/typings.d.ts new file mode 100644 index 00000000..bccebed0 --- /dev/null +++ b/src/views/Log/typings.d.ts @@ -0,0 +1,31 @@ +export type AccessLogItem = { + id: string; + context: any; + describe: string; + exception: string; + httpHeaders: any; + httpMethod: string; + ip: string; + method: string; + parameters: any; + requestTime: number; + responseTime: number; + target: string; + url: string; + action: string; +}; + +export type SystemLogItem = { + id: string; + className: string; + context: any; + createTime: number; + exceptionStack: string; + level: string; + lineNumber: number; + message: string; + methodName: string; + name: string; + threadId: string; + threadName: string; +}; diff --git a/src/views/link/Log/Access/index.vue b/src/views/link/Log/Access/index.vue deleted file mode 100644 index 9c87e8c8..00000000 --- a/src/views/link/Log/Access/index.vue +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/src/views/link/Log/System/index.vue b/src/views/link/Log/System/index.vue deleted file mode 100644 index 1fd97c0d..00000000 --- a/src/views/link/Log/System/index.vue +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/src/views/link/Log/index.vue b/src/views/link/Log/index.vue deleted file mode 100644 index 4fbaf127..00000000 --- a/src/views/link/Log/index.vue +++ /dev/null @@ -1,17 +0,0 @@ - - From 1eda294d480eba1f8a369acdef03daca7d27615f Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 1 Feb 2023 17:34:15 +0800 Subject: [PATCH 07/16] =?UTF-8?q?feat:=20=E8=A7=86=E9=A2=91=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E4=BB=AA=E8=A1=A8=E7=9B=98=E5=8D=A1=E7=89=87=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/media/dashboard.ts | 10 ++ src/views/media/DashBoard/components/Card.vue | 7 ++ .../media/DashBoard/components/TopCard.vue | 94 +++++++++++++++++++ src/views/media/DashBoard/index.vue | 92 +++++++++++++++++- src/views/media/DashBoard/typings.d.ts | 16 ++++ .../media/Home/components/BasicCountCard.vue | 5 +- 6 files changed, 219 insertions(+), 5 deletions(-) create mode 100644 src/api/media/dashboard.ts create mode 100644 src/views/media/DashBoard/components/Card.vue create mode 100644 src/views/media/DashBoard/components/TopCard.vue create mode 100644 src/views/media/DashBoard/typings.d.ts diff --git a/src/api/media/dashboard.ts b/src/api/media/dashboard.ts new file mode 100644 index 00000000..9e8a2e40 --- /dev/null +++ b/src/api/media/dashboard.ts @@ -0,0 +1,10 @@ +import server from '@/utils/request' +import type { Agg, AggPlaying } from '@/views/media/DashBoard/typings' + +export default { + // 录像数量 + agg: () => server.get(`/media/record/file/agg`), + // 播放中数量 + aggPlaying: () => server.get(`/media/channel/playing/agg`), + +} \ No newline at end of file diff --git a/src/views/media/DashBoard/components/Card.vue b/src/views/media/DashBoard/components/Card.vue new file mode 100644 index 00000000..498d600a --- /dev/null +++ b/src/views/media/DashBoard/components/Card.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/src/views/media/DashBoard/components/TopCard.vue b/src/views/media/DashBoard/components/TopCard.vue new file mode 100644 index 00000000..8e7469a4 --- /dev/null +++ b/src/views/media/DashBoard/components/TopCard.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/views/media/DashBoard/index.vue b/src/views/media/DashBoard/index.vue index 0bd9d297..94dcb0f2 100644 --- a/src/views/media/DashBoard/index.vue +++ b/src/views/media/DashBoard/index.vue @@ -1,7 +1,93 @@ - + + + diff --git a/src/views/media/DashBoard/typings.d.ts b/src/views/media/DashBoard/typings.d.ts new file mode 100644 index 00000000..2a2a62f2 --- /dev/null +++ b/src/views/media/DashBoard/typings.d.ts @@ -0,0 +1,16 @@ +export type Agg = { + duration: number + total: number +} + +export type AggPlaying = { + playerTotal: number + playingTotal: number +} + +export type Footer = { + title: string; + value: number; + status?: "default" | "error" | "success" | "warning" | "processing" +} + diff --git a/src/views/media/Home/components/BasicCountCard.vue b/src/views/media/Home/components/BasicCountCard.vue index 024f1b19..53cb6d36 100644 --- a/src/views/media/Home/components/BasicCountCard.vue +++ b/src/views/media/Home/components/BasicCountCard.vue @@ -13,12 +13,12 @@
设备数量
{{ deviceCount }}
- +
通道数量
{{ channelCount }}
- +
@@ -26,6 +26,7 @@ \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Info/components/Config/index.vue b/src/views/device/Instance/Detail/Info/components/Config/index.vue index 4d7b0d78..6909b405 100644 --- a/src/views/device/Instance/Detail/Info/components/Config/index.vue +++ b/src/views/device/Instance/Detail/Info/components/Config/index.vue @@ -1,6 +1,6 @@ @@ -34,6 +35,7 @@ import { useInstanceStore } from "@/store/instance" import { ConfigMetadata } from "@/views/device/Product/typings" import { getConfigMetadata, _deploy, configurationReset } from '@/api/device/instance' import { message } from "ant-design-vue" +import Save from './Save.vue' const instanceStore = useInstanceStore() const visible = ref(false) @@ -78,4 +80,11 @@ const resetBtn = async () => { } } } + +const saveBtn = () => { + visible.value = false + if(instanceStore.current.id){ + instanceStore.refresh(instanceStore.current.id) + } +} \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Running/Event/index.vue b/src/views/device/Instance/Detail/Running/Event/index.vue new file mode 100644 index 00000000..bb863222 --- /dev/null +++ b/src/views/device/Instance/Detail/Running/Event/index.vue @@ -0,0 +1,68 @@ + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue b/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue new file mode 100644 index 00000000..d21fb23d --- /dev/null +++ b/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Running/Property/ValueRender.vue b/src/views/device/Instance/Detail/Running/Property/ValueRender.vue new file mode 100644 index 00000000..44681001 --- /dev/null +++ b/src/views/device/Instance/Detail/Running/Property/ValueRender.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Running/Property/index.vue b/src/views/device/Instance/Detail/Running/Property/index.vue new file mode 100644 index 00000000..24ed16b6 --- /dev/null +++ b/src/views/device/Instance/Detail/Running/Property/index.vue @@ -0,0 +1,166 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Running/index.vue b/src/views/device/Instance/Detail/Running/index.vue index e2e39b8a..e97db6d1 100644 --- a/src/views/device/Instance/Detail/Running/index.vue +++ b/src/views/device/Instance/Detail/Running/index.vue @@ -1,46 +1,120 @@ + + \ No newline at end of file From d4bf79f802a5d3f605410de933a44a15df6e3fdd Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Wed, 1 Feb 2023 18:10:53 +0800 Subject: [PATCH 09/16] =?UTF-8?q?update:=20=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/menu.ts | 4 +- src/views/system/Menu/Detail/BasicInfo.vue | 97 ++++++++++++------- src/views/system/Menu/Detail/ButtonMange.vue | 37 +++++-- src/views/system/Menu/Setting/index.vue | 16 +++ .../Menu/components/ButtonAddDialog.vue | 84 +++++++++++++--- .../system/Menu/components/PermissChoose.vue | 16 +-- src/views/system/Menu/index.vue | 42 ++++---- 7 files changed, 215 insertions(+), 81 deletions(-) create mode 100644 src/views/system/Menu/Setting/index.vue diff --git a/src/api/system/menu.ts b/src/api/system/menu.ts index a8e6a60e..9f2c8ebd 100644 --- a/src/api/system/menu.ts +++ b/src/api/system/menu.ts @@ -14,4 +14,6 @@ export const getMenuInfo_api = (id:string) => server.get(`/menu/${id}`); // 编辑菜单信息 export const saveMenuInfo_api = (data: object) => server.patch(`/menu`, data); // 新增菜单信息 -export const addMenuInfo_api = (data: object) => server.post(`/menu`, data); \ No newline at end of file +export const addMenuInfo_api = (data: object) => server.post(`/menu`, data); +// 删除菜单信息 +export const delMenuInfo_api = (id: string) => server.remove(`/menu/${id}`); \ No newline at end of file diff --git a/src/views/system/Menu/Detail/BasicInfo.vue b/src/views/system/Menu/Detail/BasicInfo.vue index 790d38b7..ea01abbc 100644 --- a/src/views/system/Menu/Detail/BasicInfo.vue +++ b/src/views/system/Menu/Detail/BasicInfo.vue @@ -181,11 +181,18 @@ - + - 保存 @@ -215,14 +222,17 @@ import { addMenuInfo_api, } from '@/api/system/menu'; +// 路由 const route = useRoute(); const router = useRouter(); const routeParams = { id: route.params.id === ':id' ? undefined : (route.params.id as string), ...route.query, url: route.query.basePath, + parentId: route.query.pid, }; +// 表单 const basicFormRef = ref(); const permissFormRef = ref(); const form = reactive({ @@ -238,15 +248,18 @@ const form = reactive({ indirectMenus: [], ...routeParams, } as formType, - treeData: [], // 关联菜单 assetsType: [] as assetType[], // 资产类型 + saveLoading: false, init: () => { // 获取菜单详情 routeParams.id && - getMenuInfo_api(routeParams.id).then((resp) => { - form.data = resp.result as formType + getMenuInfo_api(routeParams.id).then((resp: any) => { + form.data = { + ...(resp.result as formType), + accessSupport: resp.result.accessSupport.value, + }; }); // 获取关联菜单 getMenuTree_api({ paging: false }).then((resp: any) => { @@ -260,9 +273,52 @@ const form = reactive({ })); }); }, + clickSave: () => { + if (!basicFormRef || !permissFormRef) return; + Promise.all([ + basicFormRef.value?.validate(), + permissFormRef.value?.validate(), + ]) + .then(() => { + const api = routeParams.id ? saveMenuInfo_api : addMenuInfo_api; + form.saveLoading = true; + const accessSupportValue = form.data.accessSupport; + const params = { + ...form.data, + accessSupport: { + value: accessSupportValue, + label: + accessSupportValue === 'unsupported' + ? '不支持' + : accessSupportValue === 'support' + ? '支持' + : '间接控制', + }, + }; + api(params) + .then((resp: any) => { + if (resp.status === 200) { + message.success('操作成功!'); + // 新增后刷新页面,编辑则不需要 + if (!routeParams.id) { + router.push( + `/system/Menu/detail/${resp.result.id}`, + ); + routeParams.id = resp.result.id; + form.init(); + } + } else { + message.error('操作失败!'); + } + }) + .finally(() => (form.saveLoading = false)); + }) + .catch((err) => {}); + }, }); form.init(); +// 弹窗 const ChooseIconRef = ref(null); const dialog = { openDialog: () => { @@ -272,36 +328,6 @@ const dialog = { form.data.icon = typeStr || form.data.icon; }, }; -const saveLoading = ref(false); -const clickSave = () => { - if (!basicFormRef || !permissFormRef) return; - Promise.all([ - basicFormRef.value?.validate(), - permissFormRef.value?.validate(), - ]) - .then(() => { - const api = routeParams.id ? saveMenuInfo_api : addMenuInfo_api; - saveLoading.value = true; - api(form.data) - .then((resp: any) => { - if (resp.status === 200) { - message.success('操作成功!'); - // 新增后刷新页面,编辑则不需要 - if (!routeParams.id) { - router.push( - `/system/Menu/detail/${resp.result.id}`, - ); - routeParams.id = resp.result.id; - form.init(); - } - } else { - message.error('操作失败!'); - } - }) - .finally(() => (saveLoading.value = false)); - }) - .catch((err) => {}); -}; type formType = { name: string; @@ -314,6 +340,7 @@ type formType = { accessSupport: string; assetType: string | undefined; indirectMenus: any[]; + parentId?: string; }; type assetType = { diff --git a/src/views/system/Menu/Detail/ButtonMange.vue b/src/views/system/Menu/Detail/ButtonMange.vue index 861b510f..cc232ce3 100644 --- a/src/views/system/Menu/Detail/ButtonMange.vue +++ b/src/views/system/Menu/Detail/ButtonMange.vue @@ -5,6 +5,7 @@ :columns="table.columns" model="TABLE" :dataSource="table.tableData" + noPagination > @@ -63,12 +68,14 @@ + + diff --git a/src/views/system/Menu/components/ButtonAddDialog.vue b/src/views/system/Menu/components/ButtonAddDialog.vue index 78f9d309..0a54e5df 100644 --- a/src/views/system/Menu/components/ButtonAddDialog.vue +++ b/src/views/system/Menu/components/ButtonAddDialog.vue @@ -4,8 +4,12 @@ :title="form.mode" width="660px" @ok="dialog.handleOk" + :maskClosable="false" + cancelText="取消" + okText="确定" + :confirmLoading="dialog.loading" > - + + + :first-width="8" + max-height="350px" + v-model:value="form.data.permissions" + :disabled="form.mode === '查看'" + /> + + diff --git a/src/views/link/Protocol/index.vue b/src/views/link/Protocol/index.vue new file mode 100644 index 00000000..8798fe9c --- /dev/null +++ b/src/views/link/Protocol/index.vue @@ -0,0 +1,327 @@ + + + diff --git a/src/views/link/Protocol/typings.d.ts b/src/views/link/Protocol/typings.d.ts new file mode 100644 index 00000000..91ac930a --- /dev/null +++ b/src/views/link/Protocol/typings.d.ts @@ -0,0 +1,7 @@ +import type { BaseItem } from '@/utils/typings'; + +type ProtocolItem = { + state: number; + type: string; + configuration: Record; +} & BaseItem; From 9304911139d5b712ccb39f84ae10bb842bf46e1b Mon Sep 17 00:00:00 2001 From: blp <2962632571@qq.com> Date: Wed, 1 Feb 2023 18:15:30 +0800 Subject: [PATCH 11/16] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9page-container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot-card/CardManagement/Detail/index.vue | 6 +++--- src/views/iot-card/CardManagement/index.vue | 11 ++++------- src/views/iot-card/Dashboard/index.vue | 6 +++--- src/views/iot-card/Home/index.vue | 4 ++-- src/views/iot-card/Recharge/index.vue | 6 +++--- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/views/iot-card/CardManagement/Detail/index.vue b/src/views/iot-card/CardManagement/Detail/index.vue index 3e1a330d..fffa20e5 100644 --- a/src/views/iot-card/CardManagement/Detail/index.vue +++ b/src/views/iot-card/CardManagement/Detail/index.vue @@ -1,6 +1,6 @@ diff --git a/src/views/device/Product/DialogTips/index.vue b/src/views/device/Product/DialogTips/index.vue index 6c403056..e2f00d96 100644 --- a/src/views/device/Product/DialogTips/index.vue +++ b/src/views/device/Product/DialogTips/index.vue @@ -22,8 +22,8 @@
产品创建成功
-
产品ID: 12333
-
查看详情
+
产品ID: {{ idValue.value }}
+
查看详情
接下来推荐操作:
1、配置产品接入方式
@@ -47,8 +47,12 @@ diff --git a/src/views/iot-card/Platform/doc/index.vue b/src/views/iot-card/Platform/doc/index.vue new file mode 100644 index 00000000..a47c0aba --- /dev/null +++ b/src/views/iot-card/Platform/doc/index.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/views/iot-card/Platform/index.vue b/src/views/iot-card/Platform/index.vue new file mode 100644 index 00000000..6a611705 --- /dev/null +++ b/src/views/iot-card/Platform/index.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/iot-card/components/PlatformType.vue b/src/views/iot-card/components/PlatformType.vue new file mode 100644 index 00000000..16cde6f7 --- /dev/null +++ b/src/views/iot-card/components/PlatformType.vue @@ -0,0 +1,205 @@ + + + + + +