mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
Fix model field update (#2343)
This commit is contained in:
@@ -435,17 +435,17 @@ const ClassDimensionTable: React.FC<Props> = ({}) => {
|
||||
queryDimensionList({ ...filterParams, ...currentPagin });
|
||||
}}
|
||||
toolBarRender={() => [
|
||||
<Button
|
||||
key="create"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
toDimensionEditPage(domainId, modelId!, 0);
|
||||
// setDimensionItem(undefined);
|
||||
// setCreateModalVisible(true);
|
||||
}}
|
||||
>
|
||||
创建维度
|
||||
</Button>,
|
||||
// <Button
|
||||
// key="create"
|
||||
// type="primary"
|
||||
// onClick={() => {
|
||||
// toDimensionEditPage(domainId, modelId!, 0);
|
||||
// // setDimensionItem(undefined);
|
||||
// // setCreateModalVisible(true);
|
||||
// }}
|
||||
// >
|
||||
// 创建维度
|
||||
// </Button>,
|
||||
<BatchCtrlDropDownButton
|
||||
key="ctrlBtnList"
|
||||
extenderList={['batchSensitiveLevel', 'exportTagButton']}
|
||||
|
||||
@@ -367,6 +367,15 @@ const MetricInfoCreateForm: React.FC<CreateFormProps> = ({
|
||||
message.error('请输入度量表达式');
|
||||
return;
|
||||
}
|
||||
|
||||
if (defineType === METRIC_DEFINE_TYPE.MEASURE) {
|
||||
const { bizName, name, metricDefineByMeasureParams } = queryParams;
|
||||
queryParams[queryParamsTypeParamsKey[METRIC_DEFINE_TYPE.MEASURE]].measures =
|
||||
metricDefineByMeasureParams.measures.map((item: ISemantic.IMeasure) => {
|
||||
return item.bizName === bizName && name ? { ...item, name } : item;
|
||||
});
|
||||
}
|
||||
|
||||
if (!dataFormatType) {
|
||||
delete queryParams.dataFormat;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,14 @@ const MetricMeasuresFormTable: React.FC<Props> = ({
|
||||
return tableData;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (measuresParams?.measures) {
|
||||
setSelectedKeys(measuresParams.measures.map((item: ISemantic.IMeasure) => item.bizName));
|
||||
}
|
||||
typeParams?.expr && setExprString(typeParams.expr);
|
||||
}, [measuresParams, typeParams?.expr]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setTableData(getTableData());
|
||||
}, [measuresList, measuresParams]);
|
||||
@@ -211,8 +219,8 @@ const MetricMeasuresFormTable: React.FC<Props> = ({
|
||||
<Divider style={{ marginBottom: 0 }} />
|
||||
<ProCard
|
||||
title={<FormLabelRequire title="表达式" />}
|
||||
// tooltip="由于度量已自带聚合函数,因此通过度量创建指标时,表达式中无需再写聚合函数,如
|
||||
// 通过度量a和度量b来创建指标,由于建模的时候度量a和度量b被指定了聚合函数SUM,因此创建指标时表达式只需要写成 a+b, 而不需要带聚合函数"
|
||||
// tooltip="由于度量已自带聚合函数,因此通过度量创建指标时,表达式中无需再写聚合函数,如
|
||||
// 通过度量a和度量b来创建指标,由于建模的时候度量a和度量b被指定了聚合函数SUM,因此创建指标时表达式只需要写成 a+b, 而不需要带聚合函数"
|
||||
>
|
||||
<p
|
||||
className={styles.desc}
|
||||
|
||||
Reference in New Issue
Block a user