|
@@ -512,11 +512,13 @@ function onChangeTab(tab) {
|
|
clearTimeout(timer1);
|
|
clearTimeout(timer1);
|
|
clearTimeout(timer);
|
|
clearTimeout(timer);
|
|
if (activeKey.value == 'device') {
|
|
if (activeKey.value == 'device') {
|
|
- getSubStationList();
|
|
|
|
getMonitor()
|
|
getMonitor()
|
|
- } else if (activeKey.value == 'history') {
|
|
|
|
getSubStationList();
|
|
getSubStationList();
|
|
|
|
+ getStationList1();
|
|
|
|
+ } else if (activeKey.value == 'history') {
|
|
getMonitor()
|
|
getMonitor()
|
|
|
|
+ getSubStationList();
|
|
|
|
+ getStationList();
|
|
} else {
|
|
} else {
|
|
getStationList();
|
|
getStationList();
|
|
getMonitor1();
|
|
getMonitor1();
|
|
@@ -711,11 +713,6 @@ async function getSubStationList() {
|
|
stationId.value = stationId.value ? stationId.value : cardList.value[0].id
|
|
stationId.value = stationId.value ? stationId.value : cardList.value[0].id
|
|
openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
|
|
openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
|
|
clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
|
|
clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
|
|
- if (activeKey.value == 'device') {
|
|
|
|
- getStationList1();
|
|
|
|
- } else if (activeKey.value == 'history') {
|
|
|
|
- getStationList();
|
|
|
|
- }
|
|
|
|
} else {
|
|
} else {
|
|
cardList.value = [];
|
|
cardList.value = [];
|
|
}
|
|
}
|
|
@@ -978,13 +975,15 @@ async function handleDelStation() {
|
|
console.log(res, '删除左侧分站')
|
|
console.log(res, '删除左侧分站')
|
|
if (res) {
|
|
if (res) {
|
|
getSubStationList();
|
|
getSubStationList();
|
|
|
|
+ getStationList1();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//取消删除左侧分站
|
|
//取消删除左侧分站
|
|
function handleCancelDelStation() { }
|
|
function handleCancelDelStation() { }
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getSubStationList();
|
|
|
|
getMonitor()
|
|
getMonitor()
|
|
|
|
+ getSubStationList();
|
|
|
|
+ getStationList1();
|
|
});
|
|
});
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
if (timer) {
|
|
if (timer) {
|