合入 W1-c 目录方言与 Excel 期 5:剖析方言修正(IN 两边类型族、列类型存方言完整写法与 ENUM 码值、Oracle 小写引号名、统计过期复核、无效日期、按存储顺序取前 N 行的说法)、方言金样与 sqlglot 校验、本机容器集成脚本;Excel 列表按期累积、穿插小计、表格对象起草、CSV 走配方

This commit is contained in:
ThearchyHelios
2026-10-16 12:51:43 +08:00
51 changed files with 4061 additions and 214 deletions
+28 -10
View File
@@ -1246,8 +1246,6 @@ export const UPLOAD_TEXT = {
shapeTitle: '该表格不是一行一条记录的明细表',
shapeLead: '检测到以下结构,默认不导入:',
shapeRecipe: '这类表格可以按配方导入:指定表头、分段和合计行的处理方式,试运行核对、逐条确认后再启用。',
/** CSV 没有配方这条路(配方只认 Excel 的工作表结构) */
shapeRecipeCsv: '按配方导入目前只支持 Excel(.xlsx)文件:可另存为 .xlsx 后再按配方导入。',
shapeHeader: (row: number) => `如果表头不在第 ${row} 行,请取消后修改表头行号,再重新上传。`,
/** 结构问题之外,预告的混合列:选按原样导入以后还要再选一次 */
shapeMixedLead: '另外,以下各列以数字为主,但混有非数字的值。选择按原样导入后,还需要选择这些值的处理方式:',
@@ -1515,9 +1513,9 @@ export const RECIPE_TEXT = {
descriptionLabel: '说明(供助手参考)',
pickDrop: '拖入文件,或点击选择',
/** 与选择框的 accept 一致 */
pickFormats: '支持 Excel(.xlsx、.xlsm)',
pickFormats: '支持 Excel(.xlsx、.xlsm)和 CSV / TSV',
pickAria: '选择表格文件',
pickWrongType: (name: string) => `「${name}」不是 Excel 文件:按配方导入只支持 .xlsx、.xlsm`,
pickWrongType: (name: string) => `「${name}」不是 Excel 或 CSV 文件:按配方导入支持 .xlsx、.xlsm、.csv、.tsv`,
cancelUpload: '取消上传',
cancel: '取消',
close: '关闭',
@@ -1652,6 +1650,20 @@ export const RECIPE_TEXT = {
totalLabelColumn: '合计标签所在的列',
totalPick: '合计行以此开头',
totalKeep: '原表合计另存为表(留空则只核对)',
// 期 5:穿插的小计行(ListRows.subtotals)、列表每期怎么更新(ListBlock.period)
subtotals: '小计行',
subtotalsOn: '有小计行',
subtotalsHint: '夹在明细中间的小计不进数据,按它所管的那组明细逐列求和核对',
subtotalLabelColumn: '小计标签所在的列',
subtotalPick: '小计行以此开头',
subtotalScope: '一行小计管哪些明细',
subtotalGroupColumn: '按哪一列分组',
subtotalKeep: '原表小计另存为表(留空则只核对)',
/** 人确认过列表里没有小计(ListRows.no_subtotals):像小计的行照常是数据,不再每期报「像小计的行」要人确认 */
noSubtotals: '没有小计行(以合计字样开头的行也是数据,不再提醒)',
listPeriod: '按期累积时每一行属于哪一期',
listPeriodColumn: '按哪个日期列核对',
listPeriodHint: '列表要按期累积,每一行都要说得出属于哪一期;所在工作表要配置统计期(表内没有时,每期试运行时录入)。导入模式另在「导入模式」中选',
hiddenRows: '隐藏行',
hiddenCols: '隐藏列',
fallback: '工作表改名时',
@@ -1864,6 +1876,7 @@ export const FIX_KIND_LABEL: Record<string, string> = {
edit_members: '更新关系成员',
rename_title: '改分段标题',
declare_total: '改作合计核对',
declare_subtotals: '改作小计核对',
ignore_cells: '按文字忽略',
declare_placeholder: '声明占位符',
declare_hidden: '设置隐藏行处理',
@@ -2009,6 +2022,7 @@ export const RECEIPT_BLOCK_TEXT = {
ignored_outside: '按配方忽略了区域外数字的行',
after_stop: '列表结束之后的文字行',
total_not_kept: '只核对、不另存的合计行',
subtotal: '穿插的小计行(核对后不进数据)',
} as Record<string, string>,
excludedOther: '其他原因',
excludedTitle: '排除的行',
@@ -2122,6 +2136,8 @@ export const RECIPE_CHOICE_LABEL = {
colType: { TEXT: '文字', INTEGER: '整数', REAL: '小数', DATE: '日期' } as Record<string, string>,
colStore: { '': '默认', canonical: '规范写法', raw: '原文' } as Record<string, string>,
axisChecks: { contiguous: '逐日连续', covers_context: '恰好覆盖统计期' } as Record<string, string>,
subtotalScope: { since_previous: '上一行小计之后的全部明细', group_column: '紧挨在上面、分组列取值相同的明细' } as Record<string, string>,
listPeriod: { none: '不区分(只能每期替换)', column: '按日期列核对每行都在本期统计期内', synthesize: '每行加上本期统计期的起止两列' } as Record<string, string>,
}
// ===========================================================================
@@ -2786,7 +2802,7 @@ export const SCHEMA_PARTIAL_TEXT = {
// - 剖析是后台任务:逐张表进行,每张表剖析完就写进目录;查询一条一条地发,可以随时停止。关掉对话框照常进行。
// 目录只在整张表结束时写一次:停止、关停服务时正在做的那张来得及收尾,做完的项照常写进去;进程被杀时那张表没来得及收尾,
// 这次做完的项一项都没写进去。说停下以后写进了什么,按逐表的状态照实说(cancelledNote / interruptedNote),不一律说「已写进」。
// - 预算按表算:「每张表最多查询数」「每张表时长上限」用完只停这张表,下一张表重新计数;另有单条查询时限、抽样键值数、
// - 预算按表算:「每张表最多查询数」「每张表时长上限」用完只停这张表,下一张表重新计数;另有单条查询时限、核对键值数、
// 整表统计行数上限。标签和服务端校验报错里的叫法一致(catalog_profile._NUMBER_FIELDS),保存被拒时按机读码认出是哪一项。
// - 没有整次总量上限:任务自己在连续失败、多数超时时停下(止损),写明原因。
// - 「没查成」≠ 结论错了:因为次数、时长、超时、出错没查成的项保留剖析以前的结论,可以「重试没做完的表」。
@@ -2798,7 +2814,7 @@ export const PROFILE_FIELD_LABEL: Record<'enabled' | CatalogProfileNumberKey, st
table_max_queries: '每张表最多查询数',
table_max_s: '每张表时长上限',
query_timeout_s: '单条查询时限',
sample_size: '抽样键值数',
sample_size: '核对键值数',
max_scan_rows: '整表统计行数上限',
}
@@ -2814,7 +2830,7 @@ export const PROFILE_FIELD_HINT: Record<CatalogProfileNumberKey, string> = {
table_max_queries: '剖析一张表最多发出的查询条数,用完只停这张表,下一张表重新计数',
table_max_s: '剖析一张表最多用的时长,到时只停这张表,下一张表重新计时',
query_timeout_s: '超过即中断这条查询;不超过数据源自身的查询时限,也不超过这张表剩下的时长',
sample_size: '核对一条关联关系时,从本表抽取的不同键值个数',
sample_size: '核对一条关联关系时,从本表取的不同键值个数:取的是数据库先给出的那些,不是随机抽样',
max_scan_rows: '不超过此行数的表才做去重计数、最小值和最大值等整表统计',
}
@@ -2878,7 +2894,7 @@ export const PROFILE_TEXT = {
budgetPerTable: (queries: number, secs: number) =>
`每张表最多 ${formatNumber(queries)} 条查询、${formatNumber(secs)} 秒,用完只停这张表,下一张表重新计数`,
budgetQuery: (secs: number) => `单条查询不超过 ${formatNumber(secs)} 秒`,
budgetSample: (n: number) => `每条关联关系抽样 ${formatNumber(n)} 个键值`,
budgetSample: (n: number) => `每条关联关系取 ${formatNumber(n)} 个不同键值核对`,
budgetScan: (n: number) => (n > 0 ? `行数超过 ${formatNumber(n)} 的表不做整表统计` : '不做整表统计'),
/** 上限的估算:表数 × 每张表的上限 */
budgetTotal: (tables: number, queries: number, span: string) =>
@@ -3017,7 +3033,7 @@ export const PROFILE_TEXT = {
relationLowCoverage: '覆盖率不足,可能不是这条关系',
relationNotUnique: '被指向列未核实唯一',
coverage: (pct: string) => `覆盖率 ${pct}`,
sampled: (sample: number, matched: number) => `抽样 ${formatNumber(sample)} 个键值,对上 ${formatNumber(matched)} 个`,
sampled: (sample: number, matched: number) => `取了 ${formatNumber(sample)} 个不同键值,对上 ${formatNumber(matched)} 个`,
cardinalityUnknown: '基数未核实',
codeRows: (n: number) => `${formatNumber(n)} 行`,
codesSummary: (values: number, rows: number) => `${formatNumber(values)} 个取值,共 ${formatNumber(rows)} 行`,
@@ -3027,10 +3043,12 @@ export const PROFILE_TEXT = {
dateProposal: (col: string) => `提议按 ${col} 作为业务日期`,
dateSpan: (min: string, max: string) => `取值从 ${min} 到 ${max}`,
dateRanges: '日期列的取值范围',
/** 日期列的最小值、最大值不计入的值(catalog_profile.VALID_DATE_FROM):零日期、0001-01-01、9999-12-31、无穷大 */
dateInvalid: (n: number) => `另有 ${formatNumber(n)} 个无效日期未计入(零日期或占位日期)`,
skippedTitle: (n: number) => `跳过 ${formatNumber(n)} 项`,
moreSkipped: (n: number) => `…另有 ${formatNumber(n)} 项`,
queriesTitle: (n: number) => `看发过的查询(${formatNumber(n)} 条)`,
queriesHint: 'SQL 里的取值都换成了「?」:抽样到的键值不保存在 AgentLab 中;遮罩的列不出现在任何查询里',
queriesHint: 'SQL 里的取值都换成了「?」:取到的键值不保存在 AgentLab 中;遮罩的列不出现在任何查询里',
queryKind: { row_estimate: '行数估算', relation: '关系', codes: '码值', date: '日期' } as Record<string, string>,
queryOutcome: { ok: '成功', timeout: '超时', error: '失败', rejected: '未通过只读守卫' } as Record<string, string>,
queryRows: (n: number) => `${formatNumber(n)} 行`,
+2 -2
View File
@@ -1773,7 +1773,7 @@ function UploadDecisionBody({ decision, choices, headerRow, sheetNoun, onRecipe
</div>
)}
<div className="flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg border bg-bg px-2.5 py-2" data-shape-recipe>
<p className="min-w-0 flex-1 text-xs leading-relaxed text-dim">{onRecipe ? UPLOAD_TEXT.shapeRecipe : UPLOAD_TEXT.shapeRecipeCsv}</p>
<p className="min-w-0 flex-1 text-xs leading-relaxed text-dim">{UPLOAD_TEXT.shapeRecipe}</p>
{onRecipe && (
<button type="button" className="btn btn-sm btn-primary shrink-0" onClick={onRecipe} data-shape-recipe-start>
<Layers size={12} aria-hidden /> {RECIPE_TEXT.entry}
@@ -2098,7 +2098,7 @@ function TableUploader({ initialName, taken, sqliteTaken, onClose, onImported, o
)}
>
<UploadDecisionBody decision={decision} choices={choices} headerRow={headerRow} sheetNoun={sheetNoun}
onRecipe={file && sheetNoun === '工作表' ? () => onRecipe(file, name, description) : undefined} />
onRecipe={file ? () => onRecipe(file, name, description) : undefined} />
</Modal>
)
}
@@ -780,6 +780,10 @@ export function ProfileTaskBody({ detail: d, mode, filled = {}, focusAfter = nul
<StatusChip status={date.status} className="mr-1.5 align-middle" />
{PT.dateProposal(date.column)}
<span className="tnum text-dim">,{PT.dateSpan(date.min.slice(0, 19), date.max.slice(0, 19))}</span>
{(() => {
const invalid = d.date_ranges.find((r) => r.column === date.column)?.invalid
return invalid ? <span className="tnum text-dim">,{PT.dateInvalid(invalid)}</span> : null
})()}
</li>
</Group>
)}
@@ -788,6 +792,7 @@ export function ProfileTaskBody({ detail: d, mode, filled = {}, focusAfter = nul
{d.date_ranges.map((r) => (
<li key={r.column} className="tnum text-xs text-dim" data-profile-date-range={r.column}>
<span className="mono text-fg">{r.column}</span>:{PT.dateSpan(r.min.slice(0, 19), r.max.slice(0, 19))}
{r.invalid ? `,${PT.dateInvalid(r.invalid)}` : null}
</li>
))}
</Group>
@@ -14,7 +14,7 @@ import type { ProfileForm } from './profile'
// 数据剖析的设置:开关、五项预算、风险说明。数据源编辑框里是其中一段;导入表格的源没有编辑框,数据目录页在
// 剖析被拒(未开启)时也要就地打开它,所以另有一个只改这一项的弹窗(options 的其余键原样带上)。
// 剖析会对业务库发查询,开关默认关着;开启后五项预算才展开,风险说明写的是此刻填的数。
// 预算按表算:每张表最多查询数、每张表时长上限(用完只停这张表),另有单条查询时限、抽样键值数、整表统计行数上限;
// 预算按表算:每张表最多查询数、每张表时长上限(用完只停这张表),另有单条查询时限、核对键值数、整表统计行数上限;
// 没有整次剖析的总量上限(任务自己在连续失败、多数超时时停下)。
// ===========================================================================
+2 -1
View File
@@ -55,7 +55,8 @@ const NAME_RE = /^[a-z][a-z0-9_]{0,40}$/
/** 提交时遇到这些:试运行库已被消耗、作废或被改过,回到配方步骤重新试运行(期 3 加了并集、各期被改过的两种) */
const RERUN_CODES = new Set(['trial_required', 'trial_tampered', 'base_changed', 'name_taken', 'union_tampered', 'part_tampered'])
/** 选择框收的扩展名,与 RECIPE_TEXT.pickFormats 的说法一致 */
const PICK_ACCEPT = '.xlsx,.xlsm'
// CSV / TSV 也走配方(服务端 csv_grid 把它适配成一张「工作表」,名字固定为 CSV)
const PICK_ACCEPT = '.xlsx,.xlsm,.csv,.tsv'
const ENDED = new Set(['committed', 'discarded', 'expired'])
/** 文件名里的两个日期(「月报导出_2026-09-01_2026-09-30.xlsx」):只作统计期录入框的建议,服务端会再核对 */
+111 -4
View File
@@ -72,8 +72,13 @@ export function fillRecipeDefaults(input: Recipe | null | undefined): Recipe | n
block.extra_columns ??= 'reject'
block.ignore_columns ??= []
block.merged_data ??= 'reject'
block.rows = { blank_rows: 'stop', total_row: null, ...(isObj(block.rows) ? block.rows : {}) }
block.rows = { blank_rows: 'stop', total_row: null, subtotals: null, no_subtotals: false, ...(isObj(block.rows) ? block.rows : {}) }
if (isObj(block.rows.total_row)) block.rows.total_row.keep_as ??= null
if (isObj(block.rows.subtotals)) {
block.rows.subtotals = { scope: 'since_previous', group_column: null, keep_as: null, ...block.rows.subtotals }
}
block.period ??= null
if (isObj(block.period)) block.period = { column: null, check: 'within_context', synthesize: null, ...block.period }
block.values = {
blank: 'null', text_number: 'reject', formula: 'accept_cached', ...(isObj(block.values) ? block.values : {}),
}
@@ -97,6 +102,10 @@ export interface RecipeColumn { name: string; type: string; role: string; header
/** 列表合计行另存的表固定有这一列(契约 LIST_TOTAL_DIM) */
const LIST_TOTAL_DIM = '合计项'
/** 期 5:列表小计另存的表固定有这一列(契约 LIST_SUBTOTAL_DIM) */
const LIST_SUBTOTAL_DIM = '小计项'
/** 期 5:列表每行加统计期时的两列(契约 LIST_PERIOD_START / LIST_PERIOD_END) */
const LIST_PERIOD_COLUMNS = ['统计期起', '统计期止']
/**
* 由配方推出每张表的列,照服务端 derive_tables 的顺序:宽表 = 轴、各指标;长表 = 轴、维度、常量(按列名排序)、
@@ -140,11 +149,18 @@ export function tableColumns(recipe: Recipe | null): Map<string, RecipeColumn[]>
name: String(c?.name ?? ''), type: c?.type === 'DATE' ? 'TEXT' : String(c?.type ?? 'TEXT'),
role: c?.type === 'INTEGER' || c?.type === 'REAL' ? 'measure' : 'text', header: c?.header,
}))
put(block.table, cols)
const synth = isObj(block.period) && block.period.synthesize
? LIST_PERIOD_COLUMNS.map((name) => ({ name, type: 'TEXT', role: 'period' })) : []
put(block.table, [...cols, ...synth])
const numeric = cols.filter((c) => c.type === 'INTEGER' || c.type === 'REAL').map((c) => ({ ...c, role: 'value' }))
const total = block.rows?.total_row
if (isObj(total) && total.keep_as) {
put(total.keep_as, [{ name: LIST_TOTAL_DIM, type: 'TEXT', role: 'dim' },
...cols.filter((c) => c.type === 'INTEGER' || c.type === 'REAL').map((c) => ({ ...c, role: 'value' }))])
put(total.keep_as, [{ name: LIST_TOTAL_DIM, type: 'TEXT', role: 'dim' }, ...numeric])
}
const sub = block.rows?.subtotals
if (isObj(sub) && sub.keep_as) {
const group = sub.scope === 'group_column' && sub.group_column ? [{ name: String(sub.group_column), type: 'TEXT', role: 'dim' }] : []
put(sub.keep_as, [{ name: LIST_SUBTOTAL_DIM, type: 'TEXT', role: 'dim' }, ...group, ...numeric])
}
}
}
@@ -164,6 +180,7 @@ export function renameTable(r: Recipe, old: string, nu: string) {
if (!isObj(block)) continue
if (block.table === old) block.table = nu
if (isObj(block.rows?.total_row) && block.rows.total_row.keep_as === old) block.rows.total_row.keep_as = nu
if (isObj(block.rows?.subtotals) && block.rows.subtotals.keep_as === old) block.rows.subtotals.keep_as = nu
for (const seg of arr(block.segments)) {
if (!isObj(seg)) continue
if (seg.table === old) seg.table = nu
@@ -205,6 +222,11 @@ function renameRefs(r: Recipe, table: string, old: string, nu: string) {
if (block.table === table && isObj(block.rows?.total_row) && block.rows.total_row.label_column === old) {
block.rows.total_row.label_column = nu
}
if (block.table === table && isObj(block.rows?.subtotals)) {
if (block.rows.subtotals.label_column === old) block.rows.subtotals.label_column = nu
if (block.rows.subtotals.group_column === old) block.rows.subtotals.group_column = nu
}
if (block.table === table && isObj(block.period) && block.period.column === old) block.period.column = nu
for (const seg of arr(block.segments)) {
if (isObj(seg?.verify) && seg.verify.against_table === table && seg.verify.value === old) seg.verify.value = nu
}
@@ -736,6 +758,10 @@ function ListEditor({ s, b, block, edit }: { s: number; b: number; block: any; e
const at = (r: Recipe) => r.sheets[s].blocks[b]
const columns: any[] = arr(block.columns)
const total = isObj(block.rows?.total_row) ? block.rows.total_row : null
const subtotals = isObj(block.rows?.subtotals) ? block.rows.subtotals : null
const period = isObj(block.period) ? block.period : null
const periodKind = period?.synthesize ? 'synthesize' : period?.column ? 'column' : 'none'
const dateColumns = columns.filter((c) => c?.type === 'DATE').map((c) => String(c?.name ?? ''))
return (
<Group title={RECIPE_TEXT.listBlock(String(block.id))} attr={{ 'data-list-block': String(block.id) }}>
<div className="grid grid-cols-1 gap-2 md:grid-cols-2">
@@ -857,6 +883,87 @@ function ListEditor({ s, b, block, edit }: { s: number; b: number; block: any; e
</div>
)}
</FieldWrap>
<FieldWrap path={`${base}/rows/subtotals`} label={RECIPE_TEXT.subtotals} hint={RECIPE_TEXT.subtotalsHint}>
<Check path={`${base}/rows/subtotals`} checked={!!subtotals}
onChange={(on) => edit((r) => {
const x = at(r)
x.rows = isObj(x.rows) ? x.rows : {}
x.rows.subtotals = on
? { label_column: arr(x.columns)[0]?.name ?? '', pick: '小计', scope: 'since_previous', group_column: null, keep_as: null }
: null
// 有小计和「没有小计行」只能二选一(后端静态校验 subtotals_conflict)
if (on) x.rows.no_subtotals = false
})}>
{RECIPE_TEXT.subtotalsOn}
</Check>
{!subtotals && (
<div className="mt-1">
<Check path={`${base}/rows/no_subtotals`} checked={block.rows?.no_subtotals === true}
onChange={(on) => edit((r) => {
const x = at(r)
x.rows = isObj(x.rows) ? x.rows : {}
x.rows.no_subtotals = on
})}>
{RECIPE_TEXT.noSubtotals}
</Check>
</div>
)}
{subtotals && (
<div className="mt-1 grid grid-cols-1 gap-2 md:grid-cols-3" data-list-subtotals={String(block.id)}>
<FieldWrap path={`${base}/rows/subtotals/label_column`} label={RECIPE_TEXT.subtotalLabelColumn}>
<Select path={`${base}/rows/subtotals/label_column`} value={subtotals.label_column ?? ''} label={RECIPE_TEXT.subtotalLabelColumn}
options={columns.map((c) => String(c?.name ?? ''))}
onChange={(v) => edit((r) => { at(r).rows.subtotals.label_column = v })} />
</FieldWrap>
<FieldWrap path={`${base}/rows/subtotals/pick`} label={RECIPE_TEXT.subtotalPick}>
<TextInput path={`${base}/rows/subtotals/pick`} value={subtotals.pick ?? ''} label={RECIPE_TEXT.subtotalPick}
onCommit={(v) => edit((r) => { at(r).rows.subtotals.pick = v })} />
</FieldWrap>
<FieldWrap path={`${base}/rows/subtotals/keep_as`} label={RECIPE_TEXT.subtotalKeep}>
<TextInput path={`${base}/rows/subtotals/keep_as`} value={subtotals.keep_as ?? ''} allowEmpty label={RECIPE_TEXT.subtotalKeep}
onCommit={(v) => edit((r) => {
const old = at(r).rows.subtotals.keep_as
if (old && v) renameTable(r, old, v)
else at(r).rows.subtotals.keep_as = v || null
})} />
</FieldWrap>
<FieldWrap path={`${base}/rows/subtotals/scope`} label={RECIPE_TEXT.subtotalScope} className="md:col-span-2">
<Radios path={`${base}/rows/subtotals/scope`} value={subtotals.scope ?? 'since_previous'} label={RECIPE_TEXT.subtotalScope}
choices={RECIPE_CHOICE_LABEL.subtotalScope}
onChange={(v) => edit((r) => {
const x = at(r).rows.subtotals
x.scope = v
x.group_column = v === 'group_column' ? (x.group_column ?? arr(at(r).columns)[0]?.name ?? null) : null
})} />
</FieldWrap>
{subtotals.scope === 'group_column' && (
<FieldWrap path={`${base}/rows/subtotals/group_column`} label={RECIPE_TEXT.subtotalGroupColumn}>
<Select path={`${base}/rows/subtotals/group_column`} value={subtotals.group_column ?? ''} label={RECIPE_TEXT.subtotalGroupColumn}
options={columns.map((c) => String(c?.name ?? ''))}
onChange={(v) => edit((r) => { at(r).rows.subtotals.group_column = v })} />
</FieldWrap>
)}
</div>
)}
</FieldWrap>
<FieldWrap path={`${base}/period`} label={RECIPE_TEXT.listPeriod} hint={RECIPE_TEXT.listPeriodHint}>
<Radios path={`${base}/period`} value={periodKind} label={RECIPE_TEXT.listPeriod}
choices={RECIPE_CHOICE_LABEL.listPeriod}
onChange={(v) => edit((r) => {
const x = at(r)
x.period = v === 'none' ? null
: v === 'synthesize' ? { column: null, check: 'within_context', synthesize: '统计期' }
: { column: dateColumns[0] ?? '', check: 'within_context', synthesize: null }
})} />
{periodKind === 'column' && (
<div className="mt-1 max-w-xs">
<FieldWrap path={`${base}/period/column`} label={RECIPE_TEXT.listPeriodColumn}>
<Select path={`${base}/period/column`} value={period?.column ?? ''} label={RECIPE_TEXT.listPeriodColumn}
options={dateColumns} onChange={(v) => edit((r) => { at(r).period.column = v })} />
</FieldWrap>
</div>
)}
</FieldWrap>
<IgnoreRules path={`${base}/ignore_columns`} items={arr(block.ignore_columns)} edit={edit}
text={(x) => RECIPE_TEXT.ignoreColumn(String(x?.header ?? ''))}
remove={(r, k) => { at(r).ignore_columns.splice(k, 1) }} />
+3 -1
View File
@@ -943,6 +943,7 @@ export interface PriorAcceptance {
/** 排除的行的原因(契约 ExcludedRows.reason) */
export type ExcludedReason =
| 'hidden_excluded' | 'blank_skipped' | 'ignored_rows' | 'ignored_outside' | 'after_stop' | 'total_not_kept'
| 'subtotal'
| (string & {})
/** 回执里的「排除的行」(契约 ExcludedRows)。按表头忽略的列不在这里(记在回执的 ignored_columns) */
@@ -3541,7 +3542,8 @@ export interface CatalogProfileTaskDetail extends CatalogProfileTaskRow {
findings: CatalogProfileFinding[]
skipped: CatalogProfileSkip[]
/** 日期类列的取值范围 */
date_ranges: { column: string; min: string; max: string }[]
/** invalid:零日期、占位日期这类不计入最小值和最大值的个数(没有时不给) */
date_ranges: { column: string; min: string; max: string; invalid?: number }[]
query_log: CatalogProfileQuery[]
}