chore: [workflow] 提交工作区改动

This commit is contained in:
wangyunlong committed 2026-09-07 15:14:54 +08:00
1 parent 485e77ee74
commit 2ff588a65d
27 files changed
+373 -138

No files matched your search

+5 -5
View File
@@ -1291,14 +1291,14 @@
const platforms = Array.isArray(record.platforms) ? record.platforms : [];
const enabledPlatforms = platforms.filter((platform) => platform.enabled !== false);
const itemCount = enabledPlatforms.reduce((total, platform) => total + (Array.isArray(platform.item_ids) ? platform.item_ids.length : 0), 0);
const platformRows = enabledPlatforms.slice(0, 4).map((platform) => `<span class="config-platform-chip"><b>${esc(platform.platform || "未填写平台")}</b><small>${Array.isArray(platform.item_ids) && platform.item_ids.length ? `${platform.item_ids.length} 个 ID` : "待补 ID"}</small></span>`).join("");
const platformRows = enabledPlatforms.slice(0, 4).map((platform) => `<span class="config-platform-chip"><b>${esc(platform.platform || "未填写平台")}</b><small>${Array.isArray(platform.item_ids) && platform.item_ids.length ? `${platform.item_ids.length} 个兼容 ID` : "由生命进程维护"}</small></span>`).join("");
const morePlatforms = enabledPlatforms.length > 4 ? `<span class="config-platform-chip config-platform-chip--more">+${enabledPlatforms.length - 4}</span>` : "";
const destinationNames = dynamicConfigDestinations(record).filter((item) => item.enabled && item.url).slice(0, 3).map((item) => `<span>${esc(item.label)}</span>`).join("");
const moreTargets = targetCount > 3 ? `<span class="config-target-more">+${targetCount - 3}</span>` : "";
return `<article class="dynamic-config-record" role="listitem" data-config-id="${Number(record.id)}">
<div class="dynamic-config-record__identity" data-label="款式身份"><span class="dynamic-config-record__avatar">${esc(configInitial(style))}</span><div><strong>${esc(style)}</strong><small>${esc(brand)}${record.note ? ` · ${esc(record.note)}` : ""}</small><span class="dynamic-config-record__id">配置 #${Number(record.id)}</span></div></div>
<div class="dynamic-config-record__platforms" data-label="平台商品"><div class="dynamic-config-record__metric"><strong>${enabledPlatforms.length}</strong><span>个平台 · ${itemCount} 个商品 ID</span></div><div class="config-platform-list">${platformRows || '<span class="muted">暂无平台映射</span>'}${morePlatforms}</div></div>
<div class="dynamic-config-record__targets" data-label="ERP / 业务目标"><div class="dynamic-config-record__erp"><span>ERP</span>${configCodeList(record.erp_codes)}</div><div class="config-target-list">${destinationNames || '<span class="muted">尚未配置目标地址</span>'}${moreTargets}</div></div>
<div class="dynamic-config-record__platforms" data-label="平台目标"><div class="dynamic-config-record__metric"><strong>${enabledPlatforms.length}</strong><span>个平台 · ${itemCount} 个兼容 ID</span></div><div class="config-platform-list">${platformRows || '<span class="muted">暂无平台目标</span>'}${morePlatforms}</div></div>
<div class="dynamic-config-record__targets" data-label="业务目标"><div class="dynamic-config-record__erp"><span>身份</span><span class="muted">产品生命进程</span></div><div class="config-target-list">${destinationNames || '<span class="muted">尚未配置目标地址</span>'}${moreTargets}</div></div>
<div class="dynamic-config-record__status" data-label="状态"><span class="config-state-pill config-state-pill--${record.enabled ? "enabled" : "disabled"}">${record.enabled ? "启用" : "停用"}</span><small>${targetCount} 个目标已接入</small></div>
<div class="dynamic-config-record__action"><button class="dynamic-config-edit" type="button" data-action="edit-dynamic-config" data-config-id="${Number(record.id)}">编辑配置<span aria-hidden="true">→</span></button></div>
</article>`;
@@ -1335,9 +1335,9 @@
function dynamicConfigPlatformRow(platform = {}) {
const enabled = platform.enabled !== false;
return `<article class="dynamic-config-platform-row" data-platform-row>
<div class="dynamic-config-platform-row__header"><span class="dynamic-config-platform-row__mark" aria-hidden="true">台</span><div><strong data-platform-preview>${esc(platform.platform || "新平台")}</strong><small>平台级商品身份</small></div><label class="dynamic-config-platform-toggle"><input data-platform-field="enabled" type="checkbox" ${enabled ? "checked" : ""}><span>启用</span></label><button class="dynamic-config-platform-remove" data-action="remove-platform" type="button" aria-label="删除平台">×</button></div>
<div class="dynamic-config-platform-row__header"><span class="dynamic-config-platform-row__mark" aria-hidden="true">台</span><div><strong data-platform-preview>${esc(platform.platform || "新平台")}</strong><small>平台画像与启停</small></div><label class="dynamic-config-platform-toggle"><input data-platform-field="enabled" type="checkbox" ${enabled ? "checked" : ""}><span>启用</span></label><button class="dynamic-config-platform-remove" data-action="remove-platform" type="button" aria-label="删除平台">×</button></div>
<div class="dynamic-config-platform-row__fields"><label class="field"><span>平台名称 <i>必填</i></span><input data-platform-field="platform" list="config-platform-options" maxlength="80" value="${esc(platform.platform || "")}" placeholder="例如:天猫" required></label>
<label class="field"><span>商品 ID / SPU / SKU <small>多个用逗号或换行分隔</small></span><textarea data-platform-field="item_ids" rows="2" placeholder="例如:1074059145982">${esc((platform.item_ids || []).join(", "))}</textarea></label>
<label class="field"><span>商品 ID / SPU / SKU <small>只读,前往产品生命进程维护</small></span><textarea data-platform-field="item_ids" rows="2" placeholder="由产品生命进程提供" readonly>${esc((platform.item_ids || []).join(", "))}</textarea></label>
<label class="field field--full"><span>本平台人群画像表 <small>不采集画像可留空</small></span><input data-platform-field="persona_bitable_url" type="url" value="${esc(platform.persona_bitable_url || "")}" placeholder="https://…"></label></div>
</article>`;
}
+10 -10
View File
@@ -74,7 +74,7 @@
</button>
<button class="module-nav__item sidebar-config__item" id="dynamic-config-nav-button" type="button" data-view="dynamic-configs" aria-controls="dynamic-config-view">
<span class="module-nav__glyph sidebar-config__glyph dynamic-config-nav__glyph" aria-hidden="true">配</span>
<span class="module-nav__copy"><strong>款式平台配置</strong><small>ERP、平台商品 ID 与目标表</small></span>
<span class="module-nav__copy"><strong>款式目标配置</strong><small>业务目标、画像表与启停</small></span>
<span class="module-nav__count" id="dynamic-config-nav-count">…</span>
</button>
</div>
@@ -351,7 +351,7 @@
<div class="dynamic-config-header__copy">
<span class="eyebrow">STYLE CONFIGURATION WORKSPACE</span>
<h1 id="dynamic-config-title">款式配置中心</h1>
<p>一款一条配置,集中维护 ERP、飞书业务目标和各平台商品身份。</p>
<p>一款一条配置,集中维护飞书业务目标、平台画像和启停;商品身份请在产品生命进程维护。</p>
</div>
<div class="dynamic-config-header__actions">
<div class="dynamic-config-source-note"><span class="config-source-dot" aria-hidden="true"></span><span><small>配置来源</small><strong>云端 PostgreSQL</strong></span></div>
@@ -362,7 +362,7 @@
<section class="dynamic-config-source-bar" aria-label="款式配置读取范围">
<div class="dynamic-config-source-bar__lead"><span class="config-source-icon" aria-hidden="true">↗</span><div><strong>统一配置,按款式生效</strong><p>新启动的工作流会读取这里的最新版本。</p></div></div>
<div class="dynamic-config-source-bar__items"><span><b>01</b>ERP 款式编码</span><span><b>02</b>业务目标地址</span><span><b>03</b>平台商品身份</span></div>
<div class="dynamic-config-source-bar__items"><span><b>01</b>业务目标地址</span><span><b>02</b>平台画像表</span><span><b>03</b>启停状态</span></div>
</section>
<section class="dynamic-config-summary" aria-label="配置统计">
@@ -386,7 +386,7 @@
<div class="dynamic-config-feedback" id="dynamic-config-feedback" role="status" aria-live="polite" hidden></div>
<div class="dynamic-config-table-wrap">
<div class="dynamic-config-table" role="list" aria-label="款式配置列表">
<div class="dynamic-config-table-head" aria-hidden="true"><span>款式身份</span><span>平台商品</span><span>ERP / 业务目标</span><span>状态</span><span>操作</span></div>
<div class="dynamic-config-table-head" aria-hidden="true"><span>款式身份</span><span>平台目标</span><span>业务目标</span><span>状态</span><span>操作</span></div>
<div id="dynamic-config-table-body"><div class="dynamic-config-loading">正在读取云端配置…</div></div>
</div>
</div>
@@ -560,7 +560,7 @@
<div class="overlay__backdrop" data-close="dynamic-config" aria-hidden="true"></div>
<section class="modal dynamic-config-modal" id="dynamic-config-modal" role="dialog" aria-modal="true" aria-labelledby="dynamic-config-form-title" aria-hidden="true">
<header class="modal__header dynamic-config-modal__header">
<div class="dynamic-config-modal__heading"><div class="dynamic-config-modal__eyebrow"><span class="config-modal-mark" aria-hidden="true">款</span><span class="eyebrow">STYLE CONFIGURATION</span></div><h2 id="dynamic-config-form-title">新增款式</h2><p id="dynamic-config-form-subtitle">一次维护款式公共配置与全部平台商品身份。</p></div>
<div class="dynamic-config-modal__heading"><div class="dynamic-config-modal__eyebrow"><span class="config-modal-mark" aria-hidden="true">款</span><span class="eyebrow">STYLE CONFIGURATION</span></div><h2 id="dynamic-config-form-title">新增目标配置</h2><p id="dynamic-config-form-subtitle">身份在产品生命进程维护;这里配置业务目标与平台画像。</p></div>
<div class="dynamic-config-modal__header-actions"><span class="dynamic-config-revision" id="dynamic-config-editor-revision">新配置</span><button class="icon-button" id="dynamic-config-form-close" type="button" aria-label="关闭配置编辑">×</button></div>
</header>
<form id="dynamic-config-form" novalidate>
@@ -569,20 +569,20 @@
<aside class="dynamic-config-form-rail" aria-label="编辑页导航">
<div class="dynamic-config-form-identity"><span class="dynamic-config-editor-avatar" id="dynamic-config-editor-avatar">款</span><div><small>当前款式</small><strong id="dynamic-config-editor-style">新款式</strong><span class="dynamic-config-form-identity__status" id="dynamic-config-editor-status">准备创建</span><span class="dynamic-config-form-identity__summary" id="dynamic-config-editor-summary">新配置 · 1 个平台 · 1 个目标</span></div></div>
<nav class="dynamic-config-form-nav" aria-label="配置分区">
<button type="button" data-config-section-nav="identity" class="is-active"><span>01</span><strong>基础信息</strong><small>款式与 ERP 编码</small></button>
<button type="button" data-config-section-nav="identity" class="is-active"><span>01</span><strong>基础信息</strong><small>款式与状态</small></button>
<button type="button" data-config-section-nav="destinations"><span>02</span><strong>业务目标</strong><small>可扩展飞书表格地址</small></button>
<button type="button" data-config-section-nav="platforms"><span>03</span><strong>平台映射</strong><small>商品 ID 与画像表</small></button>
<button type="button" data-config-section-nav="platforms"><span>03</span><strong>平台目标</strong><small>画像表与启停</small></button>
</nav>
<div class="dynamic-config-form-rail__tip"><span aria-hidden="true">✦</span><div><strong>为下一条逻辑留位置</strong><p>新分析逻辑只需新增一条业务目标,使用稳定的逻辑标识读取对应地址。</p></div></div>
</aside>
<div class="modal__body dynamic-config-form-body">
<p class="form-error" id="dynamic-config-form-error" role="alert" hidden></p>
<section class="dynamic-config-form-section" id="dynamic-config-identity-section" data-config-section="identity" aria-labelledby="dynamic-config-identity-title">
<header><span>01</span><div><h3 id="dynamic-config-identity-title">款式基本信息</h3><p>ERP 编码和款式身份只维护一次,所有平台共享。</p></div></header>
<header><span>01</span><div><h3 id="dynamic-config-identity-title">款式基本信息</h3><p>款式身份只在产品生命进程维护;这里仅关联目标配置。</p></div></header>
<div class="dynamic-config-form-grid">
<label class="field"><span>款式名称 <i>必填</i></span><input id="config-style-name" maxlength="120" placeholder="例如:云栖" required></label>
<label class="field"><span>品牌</span><input id="config-brand" maxlength="120" placeholder="例如:光影行星"></label>
<label class="field field--full"><span>ERP 款式编码 <small>多个编码用逗号或换行分隔</small></span><textarea id="config-erp-codes" rows="2" placeholder="例如:10521, 10522"></textarea></label>
<label class="field field--full"><span>ERP 款式编码 <small>只读,前往产品生命进程维护</small></span><textarea id="config-erp-codes" rows="2" placeholder="由产品生命进程提供" readonly></textarea></label>
<label class="field dynamic-config-enabled-field"><span><strong>参与工作流</strong><small>停用后保留记录,但整款不再被工作流解析。</small></span><input id="config-enabled" type="checkbox" checked><i aria-hidden="true"></i></label>
<label class="field field--full"><span>备注</span><input id="config-note" maxlength="500" placeholder="记录这款的业务说明、特殊规则或负责人"></label>
<input id="config-style-content" type="hidden">
@@ -596,7 +596,7 @@
</section>
<section class="dynamic-config-form-section dynamic-config-platform-section" id="dynamic-config-platforms-section" data-config-section="platforms" aria-labelledby="dynamic-config-platforms-title">
<header><span>03</span><div><h3 id="dynamic-config-platforms-title">平台商品身份</h3><p>一个平台一行:填写商品 ID;需要画像采集时再填本平台人群画像表。</p></div><button class="button button--secondary" id="dynamic-config-add-platform" type="button"><span aria-hidden="true">+</span>添加平台</button></header>
<header><span>03</span><div><h3 id="dynamic-config-platforms-title">平台目标</h3><p>商品编码由产品生命进程提供;这里维护平台画像表和启停。</p></div><button class="button button--secondary" id="dynamic-config-add-platform" type="button"><span aria-hidden="true">+</span>添加平台</button></header>
<div class="dynamic-config-platform-editor" id="dynamic-config-platform-editor"></div>
<datalist id="config-platform-options"><option value="天猫"><option value="京东旗舰店"><option value="京东自营"><option value="抖音"><option value="拼多多"><option value="拼多多光影行星GYXX箱包专卖店"><option value="拼多多光影行星箱包官方旗舰店"><option value="拼多多光影行星官方旗舰店"></datalist>
</section>