mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-24 16:02:20 +00:00
证据面板的分析结论:结果表的格写列名,总数那一格的值按服务端的写法显示。①「这一处引用的是 结果表第 1 行『share』」原来写的是列 id,现在服务端在 cited 上另给 column_label(结果表记的 labels,如「占变化的比重」),目录条目也带上 labels,证据面板、读屏的出处、导出页、可验证报告都照列名写;② 输入里「总数那一格 … = 159175.18」和同一节的闭合核对「159,175.18」两个写法并排,现在服务端另给 value_rendered(render_cell,千分位、NULL 写「—」,和闭合核对同一个写法),三处界面照原样显示。结果表数的换算(比率、空格)不在这次改动里
This commit is contained in:
@@ -1461,6 +1461,7 @@
|
||||
const loc = isObj(cite.locator) ? cite.locator : {}
|
||||
if (cite.kind === 'metric') return T.srcMetric(own(entry, 'name') || loc.metric || cite.ref || '')
|
||||
if (cite.kind === 'cell' && own(entry, 'kind') === 'analysis' && Number.isInteger(loc.row)) {
|
||||
// 结果表的格写列名:核对到结论之后换成结论记的列名(checkAnalysis 的 info.source),这里先照引用里的列 id 说
|
||||
return T.srcAnalysisCell(cite.alias, loc.row, String(loc.column ?? ''))
|
||||
}
|
||||
if (cite.kind === 'cell') {
|
||||
@@ -1573,6 +1574,9 @@
|
||||
const [raw, column, key] = locateCell(table, loc.row, loc.column)
|
||||
info.row = loc.row
|
||||
info.column = column
|
||||
// 出处面板写结果表记的列名(labels),不把列 id 当叫法;目录条目和文档引用里带的那份先认,没有再查这份结论
|
||||
info.columnLabel = analysisColumnLabel(table, column)
|
||||
info.source = T.srcAnalysisCell(cite.alias, loc.row, info.columnLabel)
|
||||
info.truth = cellValue(raw, columnKind(table, column))
|
||||
info.truthToken = tokenAt(tokensOf(art), ['table', 'rows', loc.row, key])
|
||||
if (typeof raw === 'string' && typeof info.truth === 'number') info.truthText = pyStrip(raw)
|
||||
@@ -1600,6 +1604,14 @@
|
||||
return checkShown(info, seg, () => renderCell(result.phrase, null, null, 'text', 1))
|
||||
}
|
||||
|
||||
/** 分析结论结果表的一格写给人看的列名:结论结果表记的 labels(「占变化的比重」),没起名字的列才写列 id。
|
||||
* 文档里的引用只记列 id(引用就这么写),列名照随文件附带的结论认 */
|
||||
function analysisColumnLabel(table, column) {
|
||||
const id = String(column ?? '')
|
||||
const labels = isObj(table.labels) ? table.labels : {}
|
||||
return own(labels, id) ? String(labels[id]) : id
|
||||
}
|
||||
|
||||
/** 口径卡的单位:服务端是 str(unit or ""),不是文字的本页不认 */
|
||||
function unitOf(unit) {
|
||||
if (!unit) return ''
|
||||
|
||||
Reference in New Issue
Block a user