diff --git a/src/components/Layout/components/Notice.vue b/src/components/Layout/components/Notice.vue index 509c502a..07423bc1 100644 --- a/src/components/Layout/components/Notice.vue +++ b/src/components/Layout/components/Notice.vue @@ -1,6 +1,6 @@ - + diff --git a/src/components/Layout/components/NoticeInfo.vue b/src/components/Layout/components/NoticeInfo.vue index 1ea0b308..f07eec74 100644 --- a/src/components/Layout/components/NoticeInfo.vue +++ b/src/components/Layout/components/NoticeInfo.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Layout/components/UserInfo.vue b/src/components/Layout/components/UserInfo.vue index e0a2b4dc..68bfc63e 100644 --- a/src/components/Layout/components/UserInfo.vue +++ b/src/components/Layout/components/UserInfo.vue @@ -1,6 +1,6 @@ diff --git a/src/router/menu.ts b/src/router/menu.ts index 3e2b8935..a0f22e16 100644 --- a/src/router/menu.ts +++ b/src/router/menu.ts @@ -8,7 +8,7 @@ export const AccountMenu = { meta: { title: '个人中心', icon: '', - hideInMenu: true + hideInMenu: false }, children: [ { diff --git a/src/views/account/Center/components/EditInfoDialog.vue b/src/views/account/Center/components/EditInfoDialog.vue index da63fb32..fbbbd69d 100644 --- a/src/views/account/Center/components/EditInfoDialog.vue +++ b/src/views/account/Center/components/EditInfoDialog.vue @@ -1,79 +1,79 @@ diff --git a/src/views/system/Department/components/EditPermissionDialog.vue b/src/views/system/Department/components/EditPermissionDialog.vue index 42182b6f..11038ada 100644 --- a/src/views/system/Department/components/EditPermissionDialog.vue +++ b/src/views/system/Department/components/EditPermissionDialog.vue @@ -1,22 +1,21 @@ diff --git a/src/views/system/Department/components/LeftTree.vue b/src/views/system/Department/components/LeftTree.vue index 7057903b..bdc1dd9b 100644 --- a/src/views/system/Department/components/LeftTree.vue +++ b/src/views/system/Department/components/LeftTree.vue @@ -1,6 +1,6 @@ - +
{{ name }} - - - - - @@ -109,8 +73,10 @@
@@ -215,9 +181,24 @@ function refresh(id: string) { } // 弹窗 -const editDialogRef = ref(); // 新增弹窗实例 +const dialog = reactive({ + visible: false, + selectItem: {}, +}); const openDialog = (row: any = {}) => { - editDialogRef.value.openDialog(true, row); + // 计算默认排序值,为子列表中最大的排序值+1 + let sortIndex = row.sortIndex || 1; + if (!row.id) { + let childrens = [] as any[]; + if (row.parentId) { + childrens = row.children; + } else childrens = treeData.value; + sortIndex = + Math.max(...(childrens?.map((item) => item.sortIndex) || [0])) + 1; + } + + dialog.selectItem = { ...row, sortIndex }; + dialog.visible = true; }; init(); function init() { @@ -236,6 +217,7 @@ function init() { diff --git a/src/views/system/Department/device/index.vue b/src/views/system/Department/device/index.vue index cc474d9f..6927ba59 100644 --- a/src/views/system/Department/device/index.vue +++ b/src/views/system/Department/device/index.vue @@ -13,7 +13,7 @@ @cancelSelect="table.cancelSelect" >