| | |
| | | </div> |
| | | </template> |
| | | <template #rightBlock2> |
| | | <DeviceStatusInfo :device="device" :type="1"></DeviceStatusInfo> |
| | | <DeviceStatusInfo :device="device" :type="2"></DeviceStatusInfo> |
| | | <DeviceStatusInfo :plc="plcStore.plcInfo" :type="1"></DeviceStatusInfo> |
| | | <DeviceStatusInfo :device="deviceStore.deviceInfo" :type="2"></DeviceStatusInfo> |
| | | <DeviceNumberInfo></DeviceNumberInfo> |
| | | </template> |
| | | <template #rightBlock3> |
| | |
| | | </DashboardLayout> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { computed, ref } from 'vue' |
| | | import { computed, ref, watch, onUnmounted } from 'vue' |
| | | import ChannelCollapse from '@/views/dashboard/components/ChannelCollapse.vue' |
| | | import type { Worker, Order, Task } from '@/api/task' |
| | | import type { PLCResponse } from '@/api/plc' |
| | |
| | | import TaskControl from '@/views/dashboard/components/TaskControl.vue' |
| | | import SubTitle from '@/views/dashboard/components/SubTitle.vue' |
| | | import DashboardTitle from '@/views/dashboard/components/DashboardTitle.vue' |
| | | import { usePLCStore } from '@/stores/plc' |
| | | import { useDevicesStore } from '@/stores/devices' |
| | | |
| | | defineOptions({ |
| | | name: 'DashboardView' |
| | |
| | | function reloadAllData(task: Task) { |
| | | tasksStore.reload(task.Channel) |
| | | } |
| | | |
| | | const plcStore = usePLCStore() |
| | | // 启动plc 轮询 |
| | | plcStore.startPollingPLC() |
| | | |
| | | const deviceStore = useDevicesStore() |
| | | deviceStore.startPollingDevice() |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |