| | |
| | | ...deviceInfo |
| | | }; |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:92", "Failed to fetch device info:", error); |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:95", "Failed to fetch device info:", error); |
| | | } |
| | | }); |
| | | const startGetPosition = () => { |
| | | common_vendor.index.showLoading({ |
| | | title: "正在操作设备", |
| | | mask: true |
| | | }); |
| | | if (positionInterval) { |
| | | clearInterval(positionInterval); |
| | | } |
| | | common_vendor.index.showToast({ |
| | | title: "操作设备中", |
| | | icon: "loading", |
| | | mask: true, |
| | | duration: 3500 |
| | | }); |
| | | positionInterval = setInterval(() => { |
| | | api_index.getControlInfo(state.value.facilityCode).then((res) => { |
| | | if (res.data.position >= 100) { |
| | | flag.value = false; |
| | | clearInterval(positionInterval); |
| | | common_vendor.index.hideLoading(); |
| | | } |
| | | }).catch((error) => { |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:115", "Error fetching control info:", error); |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:116", "Error fetching control info:", error); |
| | | clearInterval(positionInterval); |
| | | }); |
| | | }, 2e3); |
| | |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:144", "Failed to delete device:", error); |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:145", "Failed to delete device:", error); |
| | | } |
| | | }; |
| | | const handleControlChange = (e) => { |
| | |
| | | startGetPosition(); |
| | | } |
| | | }).catch((error) => { |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:161", "Failed to control device:", error); |
| | | common_vendor.index.__f__("error", "at pages/router/deviceInfo/index.vue:162", "Failed to control device:", error); |
| | | }); |
| | | }; |
| | | const getOpeHistory = () => { |
| | |
| | | logEntry.value = res.data; |
| | | } |
| | | }).catch((e) => { |
| | | common_vendor.index.__f__("log", "at pages/router/deviceInfo/index.vue:175", "fail info", e); |
| | | common_vendor.index.__f__("log", "at pages/router/deviceInfo/index.vue:176", "fail info", e); |
| | | }); |
| | | }; |
| | | const getControlData = () => { |