Quellcode durchsuchen

重分配运营商表格列宽并调轻名称字重

sy vor 1 Tag
Ursprung
Commit
c45bc3d305

+ 3 - 3
web-scaffold/src/pages/OrganizationPages.tsx

@@ -1062,10 +1062,10 @@ export function OperatorManagementPage() {
   const data = useOrganizationData(["regions", "operators"]);
   useOrganizationDemand(["enterprises"]);
   const tableOverflow = useHorizontalOverflow();
-  const minimumWidths = [122, 98, 140, 80, 80, 86, 108, 188];
+  const minimumWidths = [112, 88, 130, 76, 88, 92, 116, 200];
   const minimumTableWidth = minimumWidths.reduce((sum, width) => sum + width, 0);
   const extraWidth = Math.max(0, tableOverflow.width - minimumTableWidth);
-  const extraShares = [.43, .33, 0, 0, .24, 0, 0, 0];
+  const extraShares = [.18, .12, 0, 0, .29, .10, .15, .16];
   const columnWidths = minimumWidths.map((width, index) => width + extraWidth * extraShares[index]);
   const [query, setQuery] = useState("");
   const regionIds = useMemo(() => new Set(data.regions.map((item) => item.id)), [data.regions]);
@@ -1160,7 +1160,7 @@ export function OperatorManagementPage() {
             const shareLabel = o.sharePending ? "未配置" : `${shareText(o)} · ${o.shareMode}`;
             const accountOpened = o.account !== "未开通";
             return <tr className={selected === o.id ? "selected" : ""} key={o.id} tabIndex={0} aria-label={`查看${regionPath(data, o.region)}${o.name}档案`} onKeyDown={(event) => { if (event.key === "Enter" && event.target === event.currentTarget) setSelected(o.id); }} onClick={() => setSelected(o.id)}>
-              <td className="org-operator-identity"><strong title={o.name}>{o.name}</strong>{o.brand && <small>{o.brand}</small>}</td>
+              <td className="org-operator-identity"><span className="org-operator-name" title={o.name}>{o.name}</span>{o.brand && <small>{o.brand}</small>}</td>
               <td title={regionPath(data, o.region)}>{regionPath(data, o.region)}</td>
               <td><span className="org-operator-value" title={reconcileDayTitle(o, defaultDay)}>{reconcileDayText(o, defaultDay)}</span></td>
               <td title={o.payCycle || undefined}>{o.payCycle || "未配置"}</td>

+ 2 - 2
web-scaffold/src/styles/organization.css

@@ -648,13 +648,13 @@ a.org-overview-card{text-decoration:none;color:inherit}
 .org-operator-ledger td{background:var(--card)}
 .org-operator-ledger th{font-weight:600;background:var(--org-soft);white-space:nowrap}
 .org-operator-ledger thead th{position:sticky;top:0;z-index:1}
-.org-operator-ledger td:not(:last-child),.org-operator-ledger td strong,.org-operator-ledger td small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.org-operator-ledger td:not(:last-child),.org-operator-ledger .org-operator-name,.org-operator-ledger td small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .org-operator-sort { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; font: inherit; color: inherit; cursor: pointer; }
 .org-operator-sort svg { flex: none; color: var(--icon); }
 .org-operator-ledger th[aria-sort] .org-operator-sort svg, .org-operator-sort:hover { color: var(--primary); }
 .org-operator-sort:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
 .org-operator-ledger .org-operator-identity { position: relative; }
-.org-operator-ledger .org-operator-identity strong { font-weight: 600; }
+.org-operator-name { display: block; color: var(--foreground); font-weight: 500; }
 .org-operator-ledger .org-operator-value + small,
 .org-operator-ledger .org-operator-identity small { margin-top: 3px; font-size: var(--type-meta); }
 .org-operator-value { display: block; overflow: hidden; color: var(--foreground); font-weight: 550; font-variant-numeric: tabular-nums; text-overflow: ellipsis; }