|
@@ -556,6 +556,19 @@ function getMonitor2(flag = false) {
|
|
|
flag ? 0 : 3000
|
|
|
);
|
|
|
}
|
|
|
+let timer3: null | NodeJS.Timeout = null;
|
|
|
+function getMonitor3(flag = false) {
|
|
|
+ timer3 = setTimeout(
|
|
|
+ async () => {
|
|
|
+ await getStationListAll();
|
|
|
+ if (timer3) {
|
|
|
+ timer3 = null;
|
|
|
+ }
|
|
|
+ getMonitor3();
|
|
|
+ },
|
|
|
+ flag ? 0 : 3000
|
|
|
+ );
|
|
|
+}
|
|
|
async function getDeviceList() {
|
|
|
let res = await set158StationRead({ stationId: devStationId.value, deviceId: formEdit.cgq });
|
|
|
if (res) {
|
|
@@ -799,7 +812,7 @@ async function handleClick(data) {
|
|
|
|
|
|
//获取分站实时监测信息
|
|
|
async function getSubStationList() {
|
|
|
- let res = await subStationList({ strtype: 'modbus',reqparam:'158' });
|
|
|
+ let res = await subStationList({ strtype: 'modbus', reqparam: '158' });
|
|
|
if (res.length != 0) {
|
|
|
cardList.value = res;
|
|
|
stationId.value = stationId.value ? stationId.value : cardList.value[0].id
|
|
@@ -811,6 +824,7 @@ async function getSubStationList() {
|
|
|
}
|
|
|
//分站站点选项点击
|
|
|
function cardClick(item, index) {
|
|
|
+ clearTimeout(timer3)
|
|
|
selectedIndex.value = index; // 更新选中索引
|
|
|
activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
|
|
|
stationName.value = item.strname;
|
|
@@ -818,6 +832,7 @@ function cardClick(item, index) {
|
|
|
stationId.value = item.id;
|
|
|
isShow.value = true;
|
|
|
getStationList1();
|
|
|
+ getMonitor()
|
|
|
}
|
|
|
//分站站点名称编辑
|
|
|
function changeName(val) {
|
|
@@ -886,9 +901,9 @@ async function getStationListAll() {
|
|
|
}
|
|
|
//显示全部
|
|
|
function getAllShow() {
|
|
|
- // pagination.current = 1;
|
|
|
- // stationId.value = '';
|
|
|
- getStationListAll();
|
|
|
+ clearTimeout(timer)
|
|
|
+ getStationListAll()
|
|
|
+ getMonitor3()
|
|
|
}
|
|
|
//启动新设备
|
|
|
async function handlerunDeviceMonitor(record, val) {
|