fix(data-process): 收准结构化预处理能力文案
This commit is contained in:
@@ -352,8 +352,16 @@ assert.match(viewSource, /function resetSourceDataForProcessTypeChange\(\)[\s\S]
|
||||
assert.match(taskSetupSource, /v-if="processType === 'structured'"/, '结构化配置必须仅在结构化数据类型下显示')
|
||||
const expectedStructuredOptions = [
|
||||
['clean_invalid', '清理无效数据', '清理全空列,并剔除关键字段残缺的数据行'],
|
||||
['detect_structure', '识别表格结构', '识别多级表头与合并单元格,并将嵌套字段展平'],
|
||||
['deduplicate', '重复数据去重', '基于整行精确匹配和关键字段组合删除重复记录'],
|
||||
[
|
||||
'detect_structure',
|
||||
'嵌套结构展平',
|
||||
'展平嵌套对象和可解析的 JSON 字段;Excel 表头与合并单元格在上传时自动解析',
|
||||
],
|
||||
[
|
||||
'deduplicate',
|
||||
'重复记录去重',
|
||||
'按整行内容或 id、uuid、key、code、*_id 等身份字段去重,暂不支持自定义组合字段',
|
||||
],
|
||||
['normalize_format', '数据格式标准化', '按所选规则统一编码、空白、字段名及 JSON 序列化格式'],
|
||||
['filter_anomaly', '异常数据过滤', '使用 IQR 识别数值离群值,并过滤乱码等异常记录'],
|
||||
['desensitize', '敏感信息脱敏', '识别并脱敏姓名、手机号、邮箱和身份证号'],
|
||||
@@ -363,7 +371,7 @@ for (const [value, label, description] of expectedStructuredOptions) {
|
||||
assert.ok(structuredOptionsSource.includes(`label: '${label}'`), `结构化预处理缺少标签:${label}`)
|
||||
assert.ok(structuredOptionsSource.includes(`description: '${description}'`), `结构化预处理语义不准确:${value}`)
|
||||
}
|
||||
const structuredOptionValues = [...structuredOptionsSource.matchAll(/\{ value: '([^']+)', label:/g)]
|
||||
const structuredOptionValues = [...structuredOptionsSource.matchAll(/\{\s*value: '([^']+)',\s*label:/g)]
|
||||
.map((match) => match[1])
|
||||
assert.deepEqual(structuredOptionValues, expectedStructuredOptions.map(([value]) => value), '结构化预处理值集合不准确')
|
||||
assert.equal(new Set(structuredOptionValues).size, structuredOptionValues.length, '结构化预处理 value 必须唯一')
|
||||
|
||||
Reference in New Issue
Block a user