在前后端开发联调前 的提交20260223
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* 功能:
|
||||
* - 同步检查:工具栏右侧 Badge 指示,点击展示差异 Modal
|
||||
* - 全选常用 / 全选 / 反选 / 清空 按钮
|
||||
* - DWD 表选中 = 过滤 DWD_LOAD_FROM_ODS 的装载范围
|
||||
* - DWD 表勾选 = 选择要装载的 DWD 表(正向选择,和 ODS/DWS 一致)
|
||||
*/
|
||||
|
||||
import React, { useEffect, useState, useMemo, useCallback } from "react";
|
||||
@@ -151,6 +151,16 @@ const TaskSelector: React.FC<TaskSelectorProps> = ({
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [registry]);
|
||||
|
||||
/* CHANGE [2026-02-19] intent: DWD 表正向勾选,加载后默认全选 */
|
||||
useEffect(() => {
|
||||
if (!onDwdTablesChange) return;
|
||||
const allTables = Object.values(dwdTableGroups).flat().map((t) => t.table_name);
|
||||
if (allTables.length > 0 && selectedDwdTables.length === 0) {
|
||||
onDwdTablesChange(allTables);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [dwdTableGroups]);
|
||||
|
||||
const domainGroups = useMemo(
|
||||
() => buildDomainGroups(registry, dwdTableGroups, layers),
|
||||
[registry, dwdTableGroups, layers],
|
||||
@@ -251,9 +261,9 @@ const TaskSelector: React.FC<TaskSelectorProps> = ({
|
||||
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 4 }}>
|
||||
<Space size={4}>
|
||||
<TableOutlined style={{ color: "#52c41a", fontSize: 12 }} />
|
||||
<Text style={{ fontSize: 12, fontWeight: 500 }}>DWD 表过滤</Text>
|
||||
<Text style={{ fontSize: 12, fontWeight: 500 }}>DWD 装载表</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>
|
||||
{domainDwdSelected.length === 0 ? "(未选 = 全部装载)" : `${domainDwdSelected.length}/${dwdTables.length}`}
|
||||
{`${domainDwdSelected.length}/${dwdTables.length}`}
|
||||
</Text>
|
||||
</Space>
|
||||
<Space size={4}>
|
||||
@@ -370,6 +380,9 @@ const TaskSelector: React.FC<TaskSelectorProps> = ({
|
||||
>
|
||||
<Text strong style={!t.is_common ? { color: "#999" } : undefined}>{t.code}</Text>
|
||||
<Text type="secondary" style={{ marginLeft: 8 }}>{t.name}</Text>
|
||||
{t.description && (t.layer === "DWS" || t.layer === "INDEX") && (
|
||||
<Text type="secondary" style={{ marginLeft: 6, fontSize: 10, color: "#8c8c8c" }}>({t.description})</Text>
|
||||
)}
|
||||
{!t.is_common && <Tag color="default" style={{ marginLeft: 6, fontSize: 11 }}>不常用</Tag>}
|
||||
</Checkbox>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user