From 5780b27e303a93d5bc65b5c9f4e163b0f264ca6f Mon Sep 17 00:00:00 2001 From: xiewenjun <88080888@163.com> Date: Mon, 12 Oct 2026 18:02:59 +0800 Subject: [PATCH] style: unify administrator module layouts Co-Authored-By: Craft Agent --- frontend/src/style.css | 15 +++++++++++++++ frontend/src/views/AdminsPanel.vue | 2 +- frontend/src/views/AuditPanel.vue | 10 +++++----- frontend/src/views/InstanceProvisionPanel.vue | 2 +- frontend/src/views/IntegrationPanel.vue | 11 +++++++---- frontend/src/views/OrdersPanel.vue | 10 +++++----- frontend/src/views/Overview.vue | 15 ++++++++++++--- frontend/src/views/SettingsPanel.vue | 14 ++++++++------ frontend/src/views/TrustDeliveryPanel.vue | 6 +++--- 9 files changed, 57 insertions(+), 28 deletions(-) diff --git a/frontend/src/style.css b/frontend/src/style.css index 65a8c43..00bd6b3 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -6,3 +6,18 @@ .admin-workspace{display:flex;min-height:100vh;background:#f6f8fb;color:#17202b}.admin-workspace .sidebar{width:242px;flex:0 0 242px;background:#14202e;color:#fff;padding:23px 14px;display:flex;flex-direction:column}.admin-workspace .brand{display:flex;gap:11px;align-items:center;padding:0 12px 31px;font-size:17px;font-weight:700}.admin-workspace .brand small{display:block;color:#96a5b6;font-size:11px;font-weight:400;margin-top:2px}.brand-mark{width:31px;height:31px;background:#2e83f1;border-radius:8px;display:grid;place-items:center;font-weight:800;color:#fff}.admin-workspace .nav{display:flex;flex-direction:column}.admin-workspace .nav-label{color:#617487;font-size:11px;letter-spacing:.08em;padding:0 13px;margin:13px 0 7px}.admin-workspace .nav a{width:100%;color:#96a5b6;text-decoration:none;text-align:left;padding:10px 13px;border-radius:7px;margin:2px 0;display:flex;gap:11px;align-items:center}.admin-workspace .nav a:hover,.admin-workspace .nav a.active{color:#fff;background:#213247}.admin-workspace .nav .ico{width:18px;text-align:center;font-size:16px}.admin-workspace .sidebar-footer{margin-top:auto;border-top:1px solid #2b3b4e;padding:15px 11px 0;color:#96a5b6;font-size:12px}.admin-workspace .main{flex:1;min-width:0}.admin-workspace .topbar{height:70px;padding:0 32px}.crumb{color:#687586}.crumb strong{color:#17202b;margin-left:7px}.admin-workspace .content{max-width:1440px;padding:30px 34px 46px}.admin-workspace .heading{margin-bottom:27px}.admin-workspace .heading h1{font-size:24px;letter-spacing:-.02em}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:23px}.stat{background:#fff;border:1px solid #e5e9ef;border-radius:8px;padding:19px 20px;position:relative}.stat>span{display:block;color:#687586;font-size:13px}.stat strong{display:block;font-size:28px;margin-top:7px}.stat small{display:block;color:#16845b;font-size:12px;margin-top:7px}.stat i{position:absolute;right:18px;top:19px;width:36px;height:36px;border-radius:8px;display:grid;place-items:center;font-size:18px;font-style:normal}.i-blue{background:#eaf2ff;color:#1769e0}.i-green{background:#e9f8f1;color:#16845b}.i-amber{background:#fff5df;color:#ae6c00}.i-red{background:#fff0f0;color:#c23b3b}.dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;margin-bottom:23px}.panel{background:#fff;border:1px solid #e5e9ef;border-radius:8px;padding:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.panel h2{font-size:16px;margin:0}.panel-head a,.link,.action{color:#1769e0;text-decoration:none;background:none}.chart{height:182px;display:flex;align-items:end;gap:13px;padding:20px 8px 0;border-bottom:1px solid #e5e9ef}.bar-group{flex:1;height:100%;display:flex;align-items:end;justify-content:center;gap:3px;position:relative;min-width:22px}.bar{width:calc(50% - 2px);min-height:0;border-radius:4px 4px 0 0}.bar.issued{background:#4c96ed}.bar.expired{background:#b9d5fa}.bar-group>span{position:absolute;bottom:-25px;font-size:11px;color:#687586}.legend{display:flex;gap:18px;margin-top:26px;color:#687586;font-size:12px}.legend i{display:inline-block;width:8px;height:8px;background:#4c96ed;border-radius:2px;margin-right:5px}.legend i.expired{background:#b9d5fa}.deadline{display:flex;justify-content:space-between;padding:13px 0;border-bottom:1px solid #edf0f4}.deadline:last-of-type{border-bottom:0}.deadline-name{border:0;background:none;padding:0;text-align:left;font-weight:600;color:#17202b}.deadline-name small{display:block;color:#687586;margin-top:3px;font-weight:400}.tag{font-size:12px;border-radius:4px;padding:3px 8px;white-space:nowrap;height:max-content}.tag.green{color:#16845b;background:#e9f8f1}.tag.amber{color:#ae6c00;background:#fff5df}.tag.red{color:#c23b3b;background:#fff0f0}.table-panel{padding:0;overflow:hidden}.table-head{padding:20px 20px 15px;display:flex;justify-content:space-between;align-items:center}.table-head h2{font-size:16px;margin:0}.filters{display:flex;gap:8px;align-items:center}.filters input,.filters select,.search-button{border:1px solid #e5e9ef;border-radius:5px;padding:7px 10px;background:#fff;color:#17202b}.search-button{color:#1769e0;cursor:pointer}.table-scroll{overflow:auto}.table-panel table{width:100%;border-collapse:collapse}.table-panel th,.table-panel td{text-align:left;padding:13px 20px;border-top:1px solid #edf0f4;white-space:nowrap}.table-panel th{font-size:12px;color:#687586;font-weight:500;background:#fbfcfd}.table-panel td{font-size:13px}.avatar{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:9px;border-radius:50%;background:#e6eefc;color:#356db7;font-size:11px;font-weight:700}.license-code{font-family:ui-monospace,monospace;font-size:12px}.empty-state,.muted{color:#687586;text-align:center;padding:24px}.footer-note{text-align:right;color:#8a96a5;font-size:12px;margin-top:13px}.license-detail{display:grid;grid-template-columns:120px 1fr;gap:12px;border-top:1px solid #e5e9ef;padding-top:16px}.license-detail dt{color:#687586}.license-detail dd{margin:0;font-weight:500} @media(max-width:960px){.admin-workspace .sidebar{width:72px;flex-basis:72px;padding:20px 10px}.admin-workspace .brand{padding:0 10px 30px}.admin-workspace .brand>div:last-child,.admin-workspace .nav-label,.admin-workspace .nav a span:not(.ico),.admin-workspace .sidebar-footer>span:last-child{display:none}.admin-workspace .brand-mark{margin:auto}.admin-workspace .nav a{justify-content:center;padding:11px}.admin-workspace .sidebar-footer{text-align:center;padding-left:0;padding-right:0}.stats{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.admin-workspace .content{padding:25px 20px}.admin-workspace .topbar{padding:0 20px}} @media(max-width:620px){.admin-workspace .topbar{height:60px}.stats{gap:10px}.stat{padding:14px}.stat strong{font-size:22px}.table-head{display:block}.filters{margin-top:13px;flex-wrap:wrap}.filters input{width:150px}.admin-workspace .content{padding:20px 13px}.dashboard-grid{gap:12px}.panel{padding:16px}.admin-workspace .heading{display:block}.admin-workspace .heading .el-button{margin-top:15px}} + +/* Management modules share the release workspace's forms, toolbars and tables. */ +.admin-module{--module-line:#e5eaf0;--module-muted:#687586;--module-ink:#17202b;color:var(--module-ink);min-width:0} +.admin-workspace .heading{padding-bottom:21px;border-bottom:1px solid #e5eaf0;margin-bottom:20px}.admin-workspace .heading .eyebrow{color:#1769e0;font-size:11px;margin-bottom:5px}.admin-workspace .heading h1{font-size:20px}.admin-workspace .heading .subheading{font-size:13px;margin-top:5px} +.module-create{padding:18px 20px;background:#f7f9fc;border:1px solid #e5eaf0;border-radius:7px;min-width:0} +.module-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.module-section-heading h2,.module-section-heading h3,.module-list-title h2{margin:0;font-size:14px;font-weight:650}.module-section-heading p{margin:5px 0 0;color:#687586;font-size:13px;line-height:1.6} +.module-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:13px;margin-top:17px}.module-field{display:grid;gap:7px;min-width:0}.module-field>span{color:#526173;font-size:12px;font-weight:600}.module-field :is(.el-input,.el-select,.el-date-editor){width:100%;min-width:0}.module-form>.el-button{min-height:32px;margin-left:0}.customer-create-form{grid-template-columns:1fr 1fr auto}.product-create-form{grid-template-columns:1fr 1fr 1.5fr auto}.module-form.license-form{grid-template-columns:repeat(4,minmax(0,1fr)) auto;width:100%;margin-top:17px}.module-form.license-form>.el-button{grid-column:auto;justify-self:end} +.module-list{margin-top:24px}.module-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:36px;margin-bottom:12px}.module-list-title{display:flex;align-items:center;gap:10px}.module-count{padding:3px 7px;border-radius:4px;background:#f0f3f7;color:#687586;font-size:12px;white-space:nowrap}.module-filter,.module-filters,.module-actions{display:flex;align-items:center;gap:9px}.module-actions{flex-wrap:wrap}.module-actions .el-button+.el-button{margin-left:0}.module-filter>span{color:#526173;font-size:12px}.module-filter .el-input{width:260px}.module-filters .el-input{width:220px}.module-filters .el-select{width:150px}.module-list-note{margin:6px 0 12px;color:#687586;font-size:12px;line-height:1.6}.module-toolbar .module-list-note{margin-bottom:0} +.module-table{border:1px solid #e5eaf0;border-radius:6px;overflow-x:auto;max-width:100%}.module-table .el-table{min-width:650px}.module-table .el-table th.el-table__cell{height:42px;background:#f7f9fc;color:#657387;font-size:12px;font-weight:600}.module-table .el-table td.el-table__cell{height:57px;color:#354255;font-size:13px}.module-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;color:#687586;font-size:12px}.module-pagination .el-pagination{margin-top:0;max-width:100%;overflow-x:auto} +.settings-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;align-items:start}.settings-card{min-width:0}.module-settings-form,.module-account-form{margin-top:18px}.module-settings-form .el-form-item__label,.module-account-form .el-form-item__label{color:#526173;font-size:12px;font-weight:600}.module-settings-form .subheading{font-size:12px;margin:0 0 16px}.module-account-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 14px}.module-account-form>.el-button{grid-column:1/-1;justify-self:end}.module-settings-form .el-input,.module-account-form .el-input{width:100%} +.audit-module .audit-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;background:#f7f9fc;border:1px solid #e5eaf0;border-radius:7px;margin:0 0 20px}.audit-module .audit-filters>input{width:100%;min-width:0;height:34px}.audit-module .audit-filters label{display:grid;gap:7px;min-width:0}.audit-module .audit-filters label input{width:100%;min-width:0}.audit-filter-actions{display:flex;align-items:end;gap:8px}.audit-filter-actions .search-button{height:34px}.audit-filter-actions .el-button{margin-left:0} +.integration-panel>.module-toolbar{padding-bottom:16px;border-bottom:1px solid #e5eaf0}.integration-panel .onboarding-section>h3{margin-top:0}.onboarding-section ol{padding-left:20px;line-height:1.85;font-size:13px;color:#455468}.onboarding-section li+li{margin-top:8px}.onboarding-section .subheading{font-size:12px;line-height:1.7}.integration-panel .integration-controls{padding:16px;background:#f7f9fc;border:1px solid #e5eaf0;border-radius:7px}.integration-panel .integration-controls label{font-size:12px;color:#526173}.integration-panel .integration-meta{padding:13px 0;border-bottom:1px solid #e5eaf0;font-size:12px;overflow-wrap:anywhere}.integration-panel>.module-list>p{font-size:13px;line-height:1.75}.integration-panel .prompt-box,.integration-panel .vector-box{border-color:#e5eaf0;background:#fafbfd}.trust-panel{margin-top:20px}.trust-panel>.subheading,.provision-panel>p{font-size:13px;line-height:1.75}.trust-key-card{padding:15px;margin-top:14px;border:1px solid #e5eaf0;border-radius:6px;background:#fff;font-size:13px;overflow-wrap:anywhere}.trust-key-card p:first-child{margin-top:0}.trust-panel input{border:1px solid #d8e0e8;border-radius:4px;padding:8px;margin-top:7px}.provision-panel h3{margin:0;font-size:14px}.provision-panel .el-input{margin:8px 0 12px}.license-detail dd{min-width:0;overflow-wrap:anywhere} +@media(max-width:1100px){.module-form.license-form{grid-template-columns:repeat(2,minmax(0,1fr))}.module-form.license-form>.el-button{grid-column:1/-1}.product-create-form,.module-account-form{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-grid{grid-template-columns:minmax(0,1fr)}} +@media(max-width:900px){.customer-create-form{grid-template-columns:repeat(2,minmax(0,1fr))}.module-form>.el-button{justify-self:start}.license-toolbar{align-items:flex-start;flex-direction:column}.module-filters{width:100%}.module-filters .el-input{flex:1;width:auto}.audit-module .audit-filters{grid-template-columns:repeat(2,minmax(0,1fr))}} +@media(max-width:620px){.module-create{padding:15px}.module-settings-form>.el-button{width:100%}.integration-panel .onboarding-section{padding:15px}.integration-panel .onboarding-section ol{padding-left:18px}.module-form,.customer-create-form,.product-create-form,.module-form.license-form,.module-account-form{grid-template-columns:minmax(0,1fr);gap:13px}.module-form.license-form>.el-button,.module-account-form>.el-button{grid-column:auto;justify-self:stretch}.module-toolbar,.module-section-heading{align-items:flex-start;flex-direction:column}.module-filter,.module-filters{width:100%;align-items:stretch}.module-filter .el-input,.module-filters .el-input,.module-filters .el-select{width:100%}.module-filters{display:grid;grid-template-columns:1fr}.module-pagination{align-items:flex-start;flex-direction:column}.module-pagination .el-pagination{padding-left:0}.module-table .module-pagination{padding:0 12px 12px}.audit-module .audit-filters{grid-template-columns:minmax(0,1fr)}.module-account-form .el-form-item{margin-bottom:0}.trust-key-card{padding:12px}.license-detail{grid-template-columns:1fr;gap:6px}.license-detail dd{margin-bottom:10px}} diff --git a/frontend/src/views/AdminsPanel.vue b/frontend/src/views/AdminsPanel.vue index 446f62c..a46ca41 100644 --- a/frontend/src/views/AdminsPanel.vue +++ b/frontend/src/views/AdminsPanel.vue @@ -13,4 +13,4 @@ async function toggle(item:AdminAccount) { if(item.username===props.currentUsern async function reset(item:AdminAccount) { if(item.username===props.currentUsername) { error.value='请在系统设置中修改自己的密码,以保留当前登录会话'; return }; try { const result=await ElMessageBox.prompt(`为 ${item.username} 设置新密码`,`重置管理员密码`,{inputType:'password',inputPlaceholder:'最多 72 个 UTF-8 字节'}); if(!result.value || new TextEncoder().encode(result.value).length>72) { error.value='密码不能为空,且 UTF-8 编码不得超过 72 字节'; return }; await resetAdminPassword(item.id,result.value); notice.value='密码已重置,该管理员的全部会话已撤销' } catch(e) { if(e!=='cancel' && e!=='close') error.value=e instanceof Error?e.message:'密码重置失败' } } onMounted(refresh) - + diff --git a/frontend/src/views/AuditPanel.vue b/frontend/src/views/AuditPanel.vue index c08bf30..c4f8c45 100644 --- a/frontend/src/views/AuditPanel.vue +++ b/frontend/src/views/AuditPanel.vue @@ -33,26 +33,26 @@ function detail(event:AuditEvent) { selected.value = {...event, details:redactAu onMounted(refresh)