属性查询面板添加计算值;完善时间轴获取数据的缓存机制;
This commit is contained in:
@@ -28,6 +28,7 @@ import { FlatStyleLike } from "ol/style/flat";
|
||||
import { calculateClassification } from "@utils/breaks_classification";
|
||||
import { parseColor } from "@utils/parseColor";
|
||||
import { VectorTile } from "ol";
|
||||
import { useNotification } from "@refinedev/core";
|
||||
|
||||
interface StyleConfig {
|
||||
property: string;
|
||||
@@ -117,6 +118,8 @@ const StyleEditorPanel: React.FC = () => {
|
||||
setPipeText,
|
||||
} = data;
|
||||
|
||||
const { open, close } = useNotification();
|
||||
|
||||
const [applyJunctionStyle, setApplyJunctionStyle] = useState(false);
|
||||
const [applyPipeStyle, setApplyPipeStyle] = useState(false);
|
||||
const [styleUpdateTrigger, setStyleUpdateTrigger] = useState(0); // 用于触发样式更新的状态
|
||||
@@ -194,7 +197,7 @@ const StyleEditorPanel: React.FC = () => {
|
||||
const finalLegendConfig: LegendStyleConfig = legendConfig || {
|
||||
layerId,
|
||||
layerName,
|
||||
property: styleConfig.property,
|
||||
property: selectedProperty.name,
|
||||
colors: [],
|
||||
type: "point",
|
||||
dimensions: [],
|
||||
@@ -240,15 +243,22 @@ const StyleEditorPanel: React.FC = () => {
|
||||
setShowJunctionText(styleConfig.showLabels);
|
||||
setApplyJunctionStyle(true);
|
||||
saveLayerStyle(layerId);
|
||||
open?.({
|
||||
type: "success",
|
||||
message: "节点图层样式设置成功,等待数据更新。",
|
||||
});
|
||||
}
|
||||
}
|
||||
if (layerId === "pipes") {
|
||||
console.log(styleConfig);
|
||||
if (setPipeText && setShowPipeText) {
|
||||
setPipeText(property);
|
||||
setShowPipeText(styleConfig.showLabels);
|
||||
setApplyPipeStyle(true);
|
||||
saveLayerStyle(layerId);
|
||||
open?.({
|
||||
type: "success",
|
||||
message: "管道图层样式设置成功,等待数据更新。",
|
||||
});
|
||||
}
|
||||
}
|
||||
// 触发样式更新
|
||||
|
||||
Reference in New Issue
Block a user