From 81c9b218f7d754d93e1e2916b452d50c6abc82e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Tue, 29 Jun 2021 14:31:20 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Core/Ewide.Core.xml | 10 ++++++ .../Service/Menu/Dto/MenuTreeOutput.cs | 10 ++++++ Api/Ewide.Core/Service/Menu/SysMenuService.cs | 2 ++ .../src/assets/style/lib/authority-view.less | 24 +++++++++++++ .../src/components/authority-view/index.jsx | 36 ++++++++++++------- 5 files changed, 69 insertions(+), 13 deletions(-) diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml index 7e5c095..daef599 100644 --- a/Api/Ewide.Core/Ewide.Core.xml +++ b/Api/Ewide.Core/Ewide.Core.xml @@ -5148,6 +5148,16 @@ 关联显示父级 + + + 权限标识 + + + + + 备注 + + 排序,越小优先级越高 diff --git a/Api/Ewide.Core/Service/Menu/Dto/MenuTreeOutput.cs b/Api/Ewide.Core/Service/Menu/Dto/MenuTreeOutput.cs index 11fe065..c194b11 100644 --- a/Api/Ewide.Core/Service/Menu/Dto/MenuTreeOutput.cs +++ b/Api/Ewide.Core/Service/Menu/Dto/MenuTreeOutput.cs @@ -38,6 +38,16 @@ namespace Ewide.Core.Service /// public bool VisibleParent { get; set; } + /// + /// 权限标识 + /// + public string Permission { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + /// /// 排序,越小优先级越高 /// diff --git a/Api/Ewide.Core/Service/Menu/SysMenuService.cs b/Api/Ewide.Core/Service/Menu/SysMenuService.cs index b9d3572..1e126f5 100644 --- a/Api/Ewide.Core/Service/Menu/SysMenuService.cs +++ b/Api/Ewide.Core/Service/Menu/SysMenuService.cs @@ -460,6 +460,8 @@ namespace Ewide.Core.Service Title = u.Name, Type = u.Type, VisibleParent = u.VisibleParent, + Permission = u.Permission, + Remark = u.Remark, Sort = u.Sort }).ToListAsync(); return new TreeBuildUtil().DoTreeBuild(menus); diff --git a/web-react/src/assets/style/lib/authority-view.less b/web-react/src/assets/style/lib/authority-view.less index 7fd6b37..94c2f71 100644 --- a/web-react/src/assets/style/lib/authority-view.less +++ b/web-react/src/assets/style/lib/authority-view.less @@ -9,7 +9,12 @@ width: 150px; } .ant-descriptions { + clear: both; + margin-bottom: @padding-sm; + .ant-descriptions-view { + overflow: visible; + } &:last-child { margin-bottom: 0; } @@ -26,4 +31,23 @@ } } } + .ant-card-grid { + width: 25%; + margin-bottom: @padding-sm; + padding: @padding-xs; + + cursor: pointer; + } + .ant-card { + margin-bottom: 0; + + background-color: transparent; + &-body { + margin: -1px 0 0 -1px; + padding: 0; + } + .ant-card-grid { + margin-bottom: 0; + } + } } diff --git a/web-react/src/components/authority-view/index.jsx b/web-react/src/components/authority-view/index.jsx index e6c220f..58cf93d 100644 --- a/web-react/src/components/authority-view/index.jsx +++ b/web-react/src/components/authority-view/index.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { Checkbox, Descriptions, Empty, Spin, Tooltip } from 'antd' +import { Card, Checkbox, Descriptions, Empty, Popover, Spin, Tooltip } from 'antd' import { AntIcon } from 'components' import { EMPTY_ID } from 'util/global' @@ -58,7 +58,7 @@ function renderDescriptions(data) { function renderItem(data) { return ( - + } > - {renderDescriptions.call(this, data.children)} + {renderDescriptions.call(this, data.children)} ) @@ -79,16 +79,26 @@ function renderItem(data) { function renderCheckbox(data) { return ( - - this.onChange(e, data)}> - {data.title} - - {data.visibleParent && data.type == 2 && ( - - - - )} - + + 没有说明} + > + this.onChange(e, data)} + > + {data.title} + + {data.visibleParent && data.type == 2 && ( + + + + )} + {data.permission} + + ) }