From 251be8fd4f49aff56e277ea238d5b6461c79428a Mon Sep 17 00:00:00 2001 From: linbin <495561397@qq.com> Date: Tue, 21 Oct 2025 09:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E8=BF=B0:=20=E4=B8=BA=E8=8F=9C?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9D=83=E9=99=90=E9=85=8D=E7=BD=AE=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在新增菜市场模态框中,在经营者信息下方增加权限配置区域,支持树形结构展示和选择权限 - 新增权限树相关样式,包括节点展开/收起、选中状态、悬停效果、滚动条美化等 - 实现完整的权限管理逻辑: * 支持树形结构动态构建,包含菜市场管理、摊位管理、商品管理、订单管理、财务管理等模块 * 选中子权限时自动选中所有父级权限 * 选中父权限时自动选中所有子权限 * 取消选择时智能处理父子权限联动关系 - 在表单提交时包含权限数据验证和收集,未选择权限时给予友好提示 - 关闭模态框时自动重置权限选择状态 - 修复展开按钮点击导致弹窗关闭的问题,设置按钮类型为button并阻止默认行为 --- 平台端web/菜市场管理/菜市场列表.html | 466 ++++++++++++++++++++++++++- 1 file changed, 465 insertions(+), 1 deletion(-) diff --git a/平台端web/菜市场管理/菜市场列表.html b/平台端web/菜市场管理/菜市场列表.html index f7fb199..a156846 100644 --- a/平台端web/菜市场管理/菜市场列表.html +++ b/平台端web/菜市场管理/菜市场列表.html @@ -486,6 +486,114 @@ .hidden { display: none !important; } + + /* 权限配置样式 */ + .permissions-container { + max-height: 400px; + overflow-y: auto; + } + + .permission-tree { + list-style: none; + padding: 0; + margin: 0; + } + + .permission-item { + margin-bottom: 8px; + } + + .permission-node { + display: flex; + align-items: center; + padding: 10px 12px; + border-radius: 4px; + transition: all 0.3s; + cursor: pointer; + background-color: #fafafa; + border: 1px solid #ebeef5; + } + + .permission-node:hover { + background-color: #f0f7ff; + border-color: #409eff; + } + + .permission-node.selected { + background-color: #e6f4ff; + border-color: #409eff; + } + + .permission-checkbox { + margin-right: 10px; + width: 16px; + height: 16px; + cursor: pointer; + } + + .expand-btn { + background: none; + border: none; + cursor: pointer; + padding: 2px; + margin-right: 8px; + color: #409eff; + font-size: 12px; + transition: all 0.3s; + min-width: 20px; + border-radius: 3px; + } + + .expand-btn:hover { + background: #e6f4ff; + } + + .expand-btn.collapsed { + transform: rotate(-90deg); + } + + .permission-label { + font-size: 14px; + color: #606266; + user-select: none; + flex: 1; + } + + .permission-children { + margin-left: 32px; + margin-top: 8px; + border-left: 2px solid #e6f4ff; + padding-left: 12px; + display: none; + } + + .permission-children.expanded { + display: block; + } + + .permission-item.parent > .permission-node { + background-color: #f5f7fa; + font-weight: 500; + } + + /* 权限容器滚动条样式 */ + .permissions-container::-webkit-scrollbar { + width: 6px; + } + + .permissions-container::-webkit-scrollbar-track { + background: #f5f7fa; + border-radius: 3px; + } + + .permissions-container::-webkit-scrollbar-thumb { + background: #dcdfe6; + border-radius: 3px; + } + + .permissions-container::-webkit-scrollbar-thumb:hover { + background: #c0c4cc; + } @@ -728,6 +836,18 @@ + +
+
权限配置
+
+
+
    + +
+
+
+
+
基础配置
@@ -911,6 +1031,116 @@