Archived
数据工单有了自己的面孔;件上四处样式对齐;缺库不再问人;5173 反代改回本机
用户在工作台上连报六条(2026-08-27):
- 对话区把数据工单摆成「执行工单」→ 契约 ExecutionWorkOrder.variant:'data'(引擎侧与执行工单无异,
只换面孔),归一层从卡上带下来,web 新增 DataForm(同一套办法、另一副面孔:色/图标/「数据工单」/「确认写入」),
办结卡与治理台人类工具目录同步;活动的两张数据工单卡骨架标 variant:"data"。
- 表显示不全不能右滑 → 目标件把 overflow-x:auto 写在 .tbl-wrap,平台包装是 .jc-tbl-wrap,谁都没管到;补一条。
- 表头只留中文 → 三张数据工单表去英文列名与 .thd 小字。
- 编辑态内部料号「只读字 + 输入框」并排 → 目标件 #tbl1 .jc-vcell{display:inline}(id 特异度)盖过
table.on 的隐藏规则,表 1 每格其实都并排,PN 那格恰好有字;用 id 特异度覆盖回去。
- input 与 select 没对齐 → 徽标从前包 .ro 编辑态留着、压在下拉框头上把那格顶低 13px,改成随只读格一起藏;
input/select 钉同一高度。
- 第一步「派数据工单还是放弃候选」不该问人 → 决策卡退役(覆盖规格「候选 ≥2 可放弃」那一条,用户定),
查无记录一律自动派;剧本/说明书/测试/e2e 同步(e2e 新增 expectAsks.max 断言「不该问的没问」)。
顺带:5173 的 /api 反代默认指向一条公网隧道(150.158.83.131:46100 → nps → npc → 本机 :8787),
浏览器每次请求先出公网再绕回来;默认改回本机,要远端的显式给 API_PROXY_TARGET。
静态渲染实证:900px 宽的框里横向能滑 200px;编辑态同一行 3 input + 1 select 全部 32px 同一 y;
只读 PN 格 display:none。活动包 1.4.0;2097 测 / typecheck / lint / depcruise 绿。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FJcX8A6TWp4GRs41TYryEh
This commit is contained in:
@@ -29,6 +29,14 @@ import { D } from '../constants.ts';
|
||||
* 绑定层公共开关 —— 五张模版共用,与目标件自己的样式表分开存(那份要保持逐字节可比)
|
||||
* ==================================================================================== */
|
||||
const BIND_COMMON = `
|
||||
/* ── 2026-08-27 用户四连指出的件上毛病,病根三处都在「目标件的样式与平台的编辑态没对上」 ── */
|
||||
/* ① 表宽超出就得能横着滑(E04/I01 08-23 同款):目标件把 overflow-x:auto 写在 .tbl-wrap 上,而平台包装是 .jc-tbl-wrap,谁都没管到 */
|
||||
.jc-tbl-wrap { overflow-x: auto; overflow-y: hidden; }
|
||||
/* ② 编辑态只留输入格:目标件 #tbl1 .jc-vcell{display:inline}(id 特异度)盖过了 table.on td>.jc-vcell{display:none},
|
||||
于是表 1 每格都是「只读字 + 输入框」并排 —— 内部料号那格恰好有字,人看见的就是它 */
|
||||
#tbl1.on td > .jc-vcell:not(.ro) { display: none; }
|
||||
/* ③ 一行里的 input 与 select 同高同线:select 天生比 input 矮 4px,编辑态里一排格子高低不齐 */
|
||||
input.jc-cell, select.jc-cell { height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; vertical-align: middle; }
|
||||
/* 只在「待处理」这一态露面;归档 / 验收只读态即便 HTML 里还带着 data-edit 也不摆闸和加行钮
|
||||
(目标件是静态 demo,不区分这两态;html.editable 是平台在 iframe 根节点上真开的关) */
|
||||
html:not(.editable) .jc-editgate, html:not(.editable) .jc-addrow { display: none !important; }
|
||||
@@ -305,10 +313,14 @@ const cell = (col: string, cls = ''): string => `<span class="jc-vcell${cls ===
|
||||
const ro = (col: string, cls = ''): string => `<span class="jc-vcell ro${cls === '' ? '' : ` ${cls}`}" data-slot="${col}" data-blank></span>`;
|
||||
const select = (col: string, options: ReadonlyArray<readonly [string, string]>, required = false): string =>
|
||||
`<select class="jc-cell" data-col="${col}"${required ? ' required' : ''}><option value=""></option>${options.map(([v, l]) => `<option value="${v}">${l}</option>`).join('')}</select>`;
|
||||
/** 枚举徽标(可改表里用,旁边挨着 `.jc-cell` 孪生件时要包一层 `.ro` 才不被编辑态藏起来) */
|
||||
const badge = (klass: string, col: string, wrapRo = false): string => {
|
||||
/**
|
||||
* 枚举徽标。可改表里挨着 `<select class="jc-cell">` 孪生件时包一层 `.jc-vcell`(不带 `.ro`):
|
||||
* 看的时候摆徽标,**编辑态随只读格一起藏起来,只留下拉框** —— 从前包的是 `.ro`(编辑态留着),
|
||||
* 徽标压在下拉框头上把那一格顶低 13px,一排格子高低不齐(2026-08-27 用户指出)。
|
||||
*/
|
||||
const badge = (klass: string, col: string, wrapTwin = false): string => {
|
||||
const inner = `<span class="${klass}" data-class-of="${col}"></span>`;
|
||||
return wrapRo ? `<span class="jc-vcell ro">${inner}</span>` : inner;
|
||||
return wrapTwin ? `<span class="jc-vcell">${inner}</span>` : inner;
|
||||
};
|
||||
|
||||
/* ==================== 局面 0 · 数据工单 P-08(搬自「数据工单-01」)==================== */
|
||||
@@ -316,17 +328,17 @@ const badge = (klass: string, col: string, wrapRo = false): string => {
|
||||
const P08_TABLE = `<div class="jc-tbl-wrap"><table id="tbl1">
|
||||
<thead><tr>
|
||||
<th style="width:38px">#</th>
|
||||
<th class="req" data-h="内部料号">内部料号 internal_pn<span class="thd">全链路统一基准,不可自由文本</span></th>
|
||||
<th class="req" data-h="品牌名称">品牌 brand_name<span class="thd">与制造商、供应商分开</span></th>
|
||||
<th data-h="制造商名称">制造商 manufacturer_name<span class="thd">与品牌不一致时分开记录</span></th>
|
||||
<th class="req" data-h="规格描述">规格描述 specification_description<span class="thd">按原厂资料口径</span></th>
|
||||
<th class="req" data-h="封装">封装 package<span class="thd">影响硬约束比对</span></th>
|
||||
<th data-h="工艺">工艺 process_technology<span class="thd">硬约束比较项</span></th>
|
||||
<th class="req" data-h="生命周期状态">生命周期 lifecycle_status<span class="thd">Active/NRND/EOL/停产/风险</span></th>
|
||||
<th data-h="EOL/PCN状态">EOL/PCN eol_pcn_status<span class="thd">通知/影响/生效时间</span></th>
|
||||
<th data-h="Datasheet引用">Datasheet 引用 datasheet_ref</th>
|
||||
<th data-h="Datasheet版本">Datasheet 版本 datasheet_version<span class="thd">与引用成对</span></th>
|
||||
<th data-h="适配应用场景">适配场景 application_scenarios<span class="thd">判断实际适用性</span></th>
|
||||
<th class="req" data-h="内部料号">内部料号</th>
|
||||
<th class="req" data-h="品牌名称">品牌</th>
|
||||
<th data-h="制造商名称">制造商</th>
|
||||
<th class="req" data-h="规格描述">规格描述</th>
|
||||
<th class="req" data-h="封装">封装</th>
|
||||
<th data-h="工艺">工艺</th>
|
||||
<th class="req" data-h="生命周期状态">生命周期</th>
|
||||
<th data-h="EOL/PCN状态">EOL/PCN</th>
|
||||
<th data-h="Datasheet引用">Datasheet 引用</th>
|
||||
<th data-h="Datasheet版本">Datasheet 版本</th>
|
||||
<th data-h="适配应用场景">适配场景</th>
|
||||
</tr></thead>
|
||||
<tbody data-rows="mine:parts.profile" data-edit="parts.profile"><tr>
|
||||
<td class="rn"><span class="jc-rn-num"></span><button class="jc-rowdel" type="button" title="删除此行" data-edit-del="parts.profile">×</button></td>
|
||||
@@ -354,7 +366,7 @@ const P08_TABLE = `<div class="jc-tbl-wrap"><table id="tbl1">
|
||||
const P08_PARAMS_TABLE = `<div class="jc-tbl-wrap"><table id="tbl2">
|
||||
<thead><tr>
|
||||
<th style="width:38px">#</th>
|
||||
<th class="req" data-h="所属料号">所属料号 internal_pn<span class="thd">归属表 1 哪条记录</span></th>
|
||||
<th class="req" data-h="所属料号">所属料号</th>
|
||||
<th class="req" data-h="参数名">参数名</th>
|
||||
<th class="req" data-h="值">值</th>
|
||||
<th data-h="单位">单位</th>
|
||||
@@ -408,15 +420,15 @@ export const P08_MASTER_CREATE = doc({
|
||||
const P10_TABLE = `<div class="jc-tbl-wrap"><table>
|
||||
<thead><tr>
|
||||
<th style="width:38px">#</th>
|
||||
<th class="req" data-h="关联料号">关联料号 internal_pn<span class="thd">对应 P-08 那条记录</span></th>
|
||||
<th class="req" data-h="资料序号">资料序号 doc_seq<span class="thd">同一料号下 01/02… 自己续</span></th>
|
||||
<th class="req" data-h="资料类型">资料类型 document_type</th>
|
||||
<th data-h="品牌名称">品牌 brand_name</th>
|
||||
<th class="req" data-h="资料标题">资料标题 document_title</th>
|
||||
<th class="req" data-h="资料版本">资料版本 document_version</th>
|
||||
<th class="req" data-h="文件链接">文件链接 document_ref</th>
|
||||
<th data-h="证据定位">证据定位 citation_locator<span class="thd">页码/章节/表格</span></th>
|
||||
<th class="req" data-h="资料状态">资料状态 document_status</th>
|
||||
<th class="req" data-h="关联料号">关联料号</th>
|
||||
<th class="req" data-h="资料序号">资料序号</th>
|
||||
<th class="req" data-h="资料类型">资料类型</th>
|
||||
<th data-h="品牌名称">品牌</th>
|
||||
<th class="req" data-h="资料标题">资料标题</th>
|
||||
<th class="req" data-h="资料版本">资料版本</th>
|
||||
<th class="req" data-h="文件链接">文件链接</th>
|
||||
<th data-h="证据定位">证据定位</th>
|
||||
<th class="req" data-h="资料状态">资料状态</th>
|
||||
</tr></thead>
|
||||
<tbody data-rows="mine:parts.document" data-edit="parts.document"><tr>
|
||||
<td class="rn"><span class="jc-rn-num"></span><button class="jc-rowdel" type="button" title="删除此行" data-edit-del="parts.document">×</button></td>
|
||||
|
||||
Reference in New Issue
Block a user