Commit bb93830b authored by 张烨's avatar 张烨

fix: 站点管理bug修复

parent b0875ab5
...@@ -59,6 +59,11 @@ const SiteManage = () => { ...@@ -59,6 +59,11 @@ const SiteManage = () => {
setTreeData(stations); setTreeData(stations);
if (!currentStation.stationID) { if (!currentStation.stationID) {
setCurrentStation(stations[0]); setCurrentStation(stations[0]);
} else {
setCurrentStation(
stations.find(s => s.stationID === currentStation.stationID) ||
stations[0],
);
} }
} }
}) })
...@@ -259,7 +264,7 @@ const SiteManage = () => { ...@@ -259,7 +264,7 @@ const SiteManage = () => {
onClick={() => { onClick={() => {
handleEdit(); handleEdit();
}} }}
disabled={!currentStation.stationID} disabled={!currentStation.stationID || spinLoading}
> >
编辑 编辑
</Button> </Button>
...@@ -268,7 +273,7 @@ const SiteManage = () => { ...@@ -268,7 +273,7 @@ const SiteManage = () => {
onClick={() => { onClick={() => {
handleDel(currentStation.stationID); handleDel(currentStation.stationID);
}} }}
disabled={!currentStation.stationID} disabled={!currentStation.stationID || spinLoading}
> >
删除 删除
</Button> </Button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment