From 9a7c8d3bc7e2a6be034e83154640585c49e50388 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Tue, 7 Mar 2023 10:21:10 +0800 Subject: [PATCH 01/11] =?UTF-8?q?update:=20=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/Menu/Detail/ButtonMange.vue | 1 + src/views/system/Menu/Setting/index.vue | 237 +++++++++--------- .../Menu/components/ButtonAddDialog.vue | 30 +-- .../system/Menu/components/PermissChoose.vue | 28 +-- 4 files changed, 150 insertions(+), 146 deletions(-) diff --git a/src/views/system/Menu/Detail/ButtonMange.vue b/src/views/system/Menu/Detail/ButtonMange.vue index 0a479912..00c266b6 100644 --- a/src/views/system/Menu/Detail/ButtonMange.vue +++ b/src/views/system/Menu/Detail/ButtonMange.vue @@ -83,6 +83,7 @@ const selectItem = ref({}); const dialogVisible = ref(false); const dialogTitle = ref<'查看' | '新增' | '编辑'>('新增'); const openDialog = (mode: '查看' | '新增' | '编辑', row: object) => { + if(!routeParams.id) return message.warning('请先新增菜单基本信息') selectItem.value = { ...row }; dialogTitle.value = mode; dialogVisible.value = true; diff --git a/src/views/system/Menu/Setting/index.vue b/src/views/system/Menu/Setting/index.vue index 1fed0fda..4e74a953 100644 --- a/src/views/system/Menu/Setting/index.vue +++ b/src/views/system/Menu/Setting/index.vue @@ -1,132 +1,132 @@ @@ -282,6 +282,9 @@ const dialogShow = ref(false); diff --git a/src/views/system/Permission/index.vue b/src/views/system/Permission/index.vue index 1f6bb14d..cf192252 100644 --- a/src/views/system/Permission/index.vue +++ b/src/views/system/Permission/index.vue @@ -1,14 +1,17 @@ @@ -67,105 +75,79 @@ import EditDialog from './components/EditDialog.vue'; const permission = 'system/Relationship'; -const query = { - columns: [ - { - title: '名称', - dataIndex: 'name', - key: 'name', - ellipsis: true, - fixed: 'left', - search: { - type: 'string', - }, +const columns = [ + { + title: '名称', + dataIndex: 'name', + key: 'name', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', }, - { - title: '关联方', - dataIndex: 'objectTypeName', - key: 'objectTypeName', - ellipsis: true, - fixed: 'left', - search: { - type: 'select', - options: [ - { - label: '启用', - value: 1, - }, - { - label: '禁用', - value: 0, - }, - ], - }, - }, - { - title: '被关联方', - dataIndex: 'targetType', - key: 'targetType', - ellipsis: true, - fixed: 'left', - search: { - type: 'select', - options: [ - { - label: '用户', - value: 'user', - }, - ], - }, - }, - { - title: '说明', - dataIndex: 'description', - key: 'description', - ellipsis: true, - fixed: 'left', - search: { - type: 'string', - }, - }, - ], - params: ref({}), - search: (params: object) => { - query.params.value = params; }, -}; + { + title: '关联方', + dataIndex: 'objectTypeName', + key: 'objectTypeName', + ellipsis: true, + fixed: 'left', + search: { + type: 'select', + options: [ + { + label: '用户', + value: '用户', + }, + { + label: '设备', + value: '设备', + }, + ], + }, + }, + { + title: '被关联方', + dataIndex: 'targetTypeName', + key: 'targetTypeName', + ellipsis: true, + fixed: 'left', + search: { + rename: 'targetType', + type: 'select', + options: [ + { + label: '用户', + value: 'user', + }, + ], + }, + }, + { + title: '说明', + dataIndex: 'description', + key: 'description', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', + }, + }, + { + title: '操作', + dataIndex: 'action', + key: 'action', + scopedSlots: true, + }, +]; +const queryParams = ref({}); -const editDialogRef = ref(); // 新增弹窗实例 const tableRef = ref>({}); // 表格实例 const table = { - columns: [ - { - title: '名称', - dataIndex: 'name', - key: 'name', - }, - { - title: '关联方', - dataIndex: 'objectTypeName', - key: 'objectTypeName', - }, - { - title: '被关联方', - dataIndex: 'targetTypeName', - key: 'targetTypeName', - }, - { - title: '说明', - dataIndex: 'description', - key: 'description', - }, - { - title: '操作', - dataIndex: 'action', - key: 'action', - scopedSlots: true, - }, - ], // 打开编辑弹窗 openDialog: (row: object | undefined = {}) => { - editDialogRef.value.openDialog(true, row); + dialog.selectRow = { ...row }; + dialog.visible = true; }, // 删除 clickDel: (row: any) => { @@ -181,6 +163,11 @@ const table = { tableRef.value.reload(); }, }; + +const dialog = reactive({ + selectRow: {} as any, + visible: false, +}); From a0fd58e81909810f7f1d69317edb4f1782fc7ca7 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Tue, 7 Mar 2023 15:56:36 +0800 Subject: [PATCH 05/11] =?UTF-8?q?style:=20=E5=8F=B3=E4=B8=8A=E8=A7=92?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout/BasicLayoutPage.vue | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/components/Layout/BasicLayoutPage.vue b/src/components/Layout/BasicLayoutPage.vue index 7d00fd37..3124977d 100644 --- a/src/components/Layout/BasicLayoutPage.vue +++ b/src/components/Layout/BasicLayoutPage.vue @@ -13,12 +13,12 @@ }} {{ slotProps.route.breadcrumbName }} -