Commit bb93830b authored by 张烨's avatar 张烨

fix: 站点管理bug修复

parent b0875ab5
......@@ -59,6 +59,11 @@ const SiteManage = () => {
setTreeData(stations);
if (!currentStation.stationID) {
setCurrentStation(stations[0]);
} else {
setCurrentStation(
stations.find(s => s.stationID === currentStation.stationID) ||
stations[0],
);
}
}
})
......@@ -259,7 +264,7 @@ const SiteManage = () => {
onClick={() => {
handleEdit();
}}
disabled={!currentStation.stationID}
disabled={!currentStation.stationID || spinLoading}
>
编辑
</Button>
......@@ -268,7 +273,7 @@ const SiteManage = () => {
onClick={() => {
handleDel(currentStation.stationID);
}}
disabled={!currentStation.stationID}
disabled={!currentStation.stationID || spinLoading}
>
删除
</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