基质喷涂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
544 B

6 months ago
6 months ago
  1. <script setup lang="ts">
  2. import { RouterView } from "vue-router";
  3. import { createWebSocket, sharedWsUrl } from "./services/socket";
  4. import { useEquipmentStatusStore } from "@/stores/equipmentStatus";
  5. const equipmentStatusStore = useEquipmentStatusStore()
  6. const wsClient = createWebSocket(sharedWsUrl);
  7. wsClient.dataOb.subscribe((data:any) => {
  8. if (data.type === "status") {
  9. equipmentStatusStore.setEquipmentStatus(data['data'])
  10. }
  11. });
  12. wsClient.connect();
  13. </script>
  14. <template>
  15. <RouterView />
  16. </template>
  17. <style scoped>
  18. </style>