浏览代码

区域概况细节修正:运营商卡片数字对齐下钻列表,未引用节点显示删除图标

运营商为全局主数据,卡片大数字改为与下钻列表一致的总数,区域相关数量移入副文案;概况头部在节点未被负责范围引用时显示删除图标按钮,复用既有名称确认与阻塞校验流程。

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
cg 1 月之前
父节点
当前提交
4d8f72f59b
共有 1 个文件被更改,包括 4 次插入 和 4 次删除
  1. 4 4
      prototype/app.js

+ 4 - 4
prototype/app.js

@@ -789,13 +789,13 @@ function regionOverview(ctx) {
     <div class="panel ov-head">
       <div class="row" style="justify-content:space-between;align-items:center">
         <h2 style="margin:0">区域概况</h2>
-        <span class="note">${esc(regionPath(db, node.id))}${refs.length ? ` <span class="ref-tag" title="被引用:${esc(refs.join(";"))},不能删除">被引用 · 不可删</span>` : ""}</span>
+        <span class="note">${esc(regionPath(db, node.id))}${refs.length ? ` <span class="ref-tag" title="被引用:${esc(refs.join(";"))},不能删除">被引用 · 不可删</span>` : ` <button class="icon-btn danger" data-region-act="delete" title="删除本节点(需输入名称确认)">🗑</button>`}</span>
       </div>
       <p class="note">点击下方卡片进入对应列表并进行增删改查。</p>
     </div>
     <div class="ov-grid">
       ${ovCard("info", "区域信息", esc(LEVEL_NAMES[node.level]), `下级节点 ${childNodes.length} 个;直属企业 ${directIdx.length} 家,含下级 ${underIdx.length} 家${refs.length ? ";存在范围引用" : ""}`)}
-      ${ovCard("operators", "运营商", opIdx.length, `本区域相关 ${opIdx.length} 家;系统共 ${db.operators.length} 家`)}
+      ${ovCard("operators", "运营商", db.operators.length, `全局主数据共 ${db.operators.length} 家;其中本区域相关 ${opIdx.length} 家`)}
       ${ovCard("partners", "合伙人", partnerIdx.length, preview(partnerIdx, (i) => db.partners[i].name))}
       ${ovCard("regops", "运营团队", regOpsIdx.length, preview(regOpsIdx, (i) => db.regOpsTeams[i].name))}
       ${ovCard("teams", "运维团队", teamIdx.length, preview(teamIdx, (i) => db.teams[i].name))}
@@ -859,10 +859,10 @@ function regionDrill(ctx) {
     }).join("");
     return `<div class="panel">
       <div class="row" style="justify-content:space-between;align-items:center">
-        <h2 style="margin:0">运营商 ${pathNote}</h2>
+        <h2 style="margin:0">运营商(共 ${db.operators.length} 家) ${pathNote}</h2>
         <span>${backBtn} ${canAdmin ? `<button class="btn" data-op-new>+ 新增运营商</button>` : ""}</span>
       </div>
-      <p class="note">运营商为全局主数据;"本区域企业数" 指该运营商下挂在本区域(含下级)的企业数量。</p>
+      <p class="note">运营商为全局主数据,下表列出全部 ${db.operators.length} 家,卡片数字与本列表一致;"本区域企业"指该运营商下挂在本区域(含下级)的企业数量,当前本区域相关运营商 ${opIdx.length} 家。</p>
       <table><thead><tr><th>运营商</th><th>对账日</th><th>付款周期</th><th>通知地址</th><th>本区域企业</th><th>操作</th></tr></thead>
         <tbody>${rows}</tbody></table>
     </div>`;