From 098a49b1c94d4c98b23a0878f4ef85d586bad7a0 Mon Sep 17 00:00:00 2001 From: shenzhidan Date: Mon, 20 Jul 2026 16:52:47 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jjb.config.js | 4 +- .../constant/fireResourcePermission.js | 46 +++++++++++++++++++ .../common/fireResourceListToolbar.less | 24 ++++++++++ src/styles/search-actions-right.less | 22 +++++++++ 4 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 src/enumerate/constant/fireResourcePermission.js create mode 100644 src/pages/Container/BranchCompany/common/fireResourceListToolbar.less create mode 100644 src/styles/search-actions-right.less diff --git a/jjb.config.js b/jjb.config.js index 23bd438..5450b84 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -16,7 +16,7 @@ module.exports = { // 应用后端分支名称,部署上线需要 javaGitBranch: "", // 接口服务地址 - API_HOST: "https://gbs-gateway.qhdsafety.com", + API_HOST: "", }, }, // 应用唯一标识符 @@ -25,7 +25,7 @@ module.exports = { contextInject: { // 应用Key appKey: "", - fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", + fileUrl: "", }, // public/index.html注入全局变量 windowInject: { diff --git a/src/enumerate/constant/fireResourcePermission.js b/src/enumerate/constant/fireResourcePermission.js new file mode 100644 index 0000000..e2b24b7 --- /dev/null +++ b/src/enumerate/constant/fireResourcePermission.js @@ -0,0 +1,46 @@ +export const FIRE_RESOURCE_PERMISSION_QUERY_KEYS = { + add: "addPermissionKey", + info: "infoPermissionKey", + update: "updatePermissionKey", + remove: "removePermissionKey", +}; + +export const FIRE_RESOURCE_SUPERVISION_PERMISSION_MAP = { + rescueTeam: { + add: "xfjyd-jgd-add", + info: "xfjyd-jgd-info", + update: "xfjyd-jgd-update", + remove: "xfjyd-jgd-remove", + }, + controlRoom: { + add: "xfkzs-jgd-add", + info: "xfkzs-jgd-info", + update: "xfkzs-jgd-update", + remove: "xfkzs-jgd-remove", + }, + pumpRoom: { + add: "xfbf-jgd-add", + info: "xfbf-jgd-info", + update: "xfbf-jgd-update", + remove: "xfbf-jgd-remove", + }, + waterSource: { + add: "xfsy-jgd-add", + info: "xfsy-jgd-info", + update: "xfsy-jgd-update", + remove: "xfsy-jgd-remove", + }, +}; + +export const getPermissionKey = (query, action, defaultKey) => { + const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action]; + return query?.[queryKey] || defaultKey; +}; + +export const getPermissionKeyFromSearch = (search, action, defaultKey) => { + const queryKey = FIRE_RESOURCE_PERMISSION_QUERY_KEYS[action]; + if (!queryKey) return defaultKey; + + const searchParams = new URLSearchParams(search || ""); + return searchParams.get(queryKey) || defaultKey; +}; diff --git a/src/pages/Container/BranchCompany/common/fireResourceListToolbar.less b/src/pages/Container/BranchCompany/common/fireResourceListToolbar.less new file mode 100644 index 0000000..f4df0a2 --- /dev/null +++ b/src/pages/Container/BranchCompany/common/fireResourceListToolbar.less @@ -0,0 +1,24 @@ +.fire-resource-list-toolbar-flat { + :global([class*="pro-card"]), + :global([class*="pro-card-body"]), + :global([class*="pro-table"]), + :global([class*="pro-table-list-toolbar"]), + :global([class*="pro-table-list-toolbar-container"]) { + background: transparent !important; + border: none !important; + box-shadow: none !important; + } + + :global([class*="pro-table-list-toolbar-container"]) { + padding-top: 0 !important; + padding-bottom: 16px !important; + } + + :global([class*="pro-table-list-toolbar"])::before, + :global([class*="pro-table-list-toolbar"])::after, + :global([class*="pro-table-list-toolbar-container"])::before, + :global([class*="pro-table-list-toolbar-container"])::after { + border: none !important; + box-shadow: none !important; + } +} diff --git a/src/styles/search-actions-right.less b/src/styles/search-actions-right.less new file mode 100644 index 0000000..cac4bb4 --- /dev/null +++ b/src/styles/search-actions-right.less @@ -0,0 +1,22 @@ +.search-layout { + [class*="-row"] > [class*="-col"]:last-child [class*="-form-item"] { + margin-bottom: 0 !important; + } + + [class*="-row"] > [class*="-col"]:last-child [class*="-form-item-label"] { + display: none !important; + } + + [class*="-row"] > [class*="-col"]:last-child [class*="-form-item-control"] { + flex: 0 0 100% !important; + max-width: 100% !important; + } + + [class*="-row"] > [class*="-col"]:last-child [class*="-form-item-control-input-content"] { + display: flex !important; + justify-content: flex-end !important; + align-items: center !important; + gap: 8px !important; + padding-right: 16px; + } +}