😎1、超管可以获取样式 2、调整样式

This commit is contained in:
zuohuaijun 2024-07-10 22:55:19 +08:00
parent 3eb2fe86f3
commit 775b284c37
5 changed files with 14 additions and 10 deletions

View File

@ -14,12 +14,15 @@ public class SysConfigService : IDynamicApiController, ITransient
{ {
private readonly SysCacheService _sysCacheService; private readonly SysCacheService _sysCacheService;
private readonly SqlSugarRepository<SysConfig> _sysConfigRep; private readonly SqlSugarRepository<SysConfig> _sysConfigRep;
private readonly UserManager _userManager;
public SysConfigService(SysCacheService sysCacheService, public SysConfigService(SysCacheService sysCacheService,
SqlSugarRepository<SysConfig> sysConfigRep) SqlSugarRepository<SysConfig> sysConfigRep,
UserManager userManager)
{ {
_sysCacheService = sysCacheService; _sysCacheService = sysCacheService;
_sysConfigRep = sysConfigRep; _sysConfigRep = sysConfigRep;
_userManager = userManager;
} }
/// <summary> /// <summary>
@ -31,7 +34,7 @@ public class SysConfigService : IDynamicApiController, ITransient
public async Task<SqlSugarPagedList<SysConfig>> Page(PageConfigInput input) public async Task<SqlSugarPagedList<SysConfig>> Page(PageConfigInput input)
{ {
return await _sysConfigRep.AsQueryable() return await _sysConfigRep.AsQueryable()
.Where(u => u.GroupCode != "WebConfig") // 不显示 WebConfig 分组 .WhereIF(!_userManager.SuperAdmin, u => u.GroupCode != "WebConfig") // 若非超管,不显示 WebConfig 分组
.WhereIF(!string.IsNullOrWhiteSpace(input.Name?.Trim()), u => u.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrWhiteSpace(input.Name?.Trim()), u => u.Name.Contains(input.Name))
.WhereIF(!string.IsNullOrWhiteSpace(input.Code?.Trim()), u => u.Code.Contains(input.Code)) .WhereIF(!string.IsNullOrWhiteSpace(input.Code?.Trim()), u => u.Code.Contains(input.Code))
.WhereIF(!string.IsNullOrWhiteSpace(input.GroupCode?.Trim()), u => u.GroupCode.Equals(input.GroupCode)) .WhereIF(!string.IsNullOrWhiteSpace(input.GroupCode?.Trim()), u => u.GroupCode.Equals(input.GroupCode))

View File

@ -68,7 +68,7 @@
"vue-signature-pad": "^3.0.2", "vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2", "vue3-tree-org": "^4.2.2",
"vuedraggable": "4.0.3", "vuedraggable": "4.0.3",
"vxe-pc-ui": "^4.0.57", "vxe-pc-ui": "^4.0.58",
"vxe-table": "^4.7.47", "vxe-table": "^4.7.47",
"vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.5", "vxe-table-plugin-export-xlsx": "^4.0.5",
@ -94,7 +94,7 @@
"prettier": "^3.3.2", "prettier": "^3.3.2",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.77.7", "sass": "^1.77.7",
"terser": "^5.31.1", "terser": "^5.31.2",
"typescript": "^5.5.3", "typescript": "^5.5.3",
"vite": "^5.3.3", "vite": "^5.3.3",
"vite-plugin-cdn-import": "^1.0.1", "vite-plugin-cdn-import": "^1.0.1",

View File

@ -376,13 +376,13 @@
/* Table 表格 element plus 2.2.0 版本 /* Table 表格 element plus 2.2.0 版本
------------------------------- */ ------------------------------- */
.el-table { .el-table {
// 表头背景色
--el-table-header-bg-color: var(--next-bg-main-color);
.el-button.is-text { .el-button.is-text {
padding: 0; padding: 0;
} }
// 表头背景色
--el-table-header-bg-color: var(--next-bg-main-color);
// 表头字体颜色 // 表头字体颜色
thead { thead {
color: var(--el-text-color-regular); color: var(--el-text-color-regular);

View File

@ -36,10 +36,11 @@
.vxe-cell { .vxe-cell {
padding-left: 5px !important; padding-left: 5px !important;
padding-right: 5px !important; padding-right: 5px !important;
user-select: text !important;
.el-button { .el-button {
padding: 0 !important; padding: 0 !important;
} }
user-select: text !important;
} }
.vxe-pager.size--mini { .vxe-pager.size--mini {

View File

@ -283,6 +283,8 @@ defineExpose({ saveTokenAndInitRoutes });
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-header { .dialog-header {
:deep(.el-dialog) { :deep(.el-dialog) {
width: unset !important;
.el-dialog__header { .el-dialog__header {
display: none; display: none;
} }
@ -294,8 +296,6 @@ defineExpose({ saveTokenAndInitRoutes });
.v-modal { .v-modal {
position: absolute !important; position: absolute !important;
} }
width: unset !important;
} }
} }