yangfeng
2024-02-02 3a4b094461e11002287a667b8bea49b362a2fc6f
src/views/dashboard/index.vue
@@ -75,7 +75,7 @@
      </div>
    </template>
    <template #rightBlock2>
      <DeviceStatusInfo :plc="plcStore.plcInfo" :type="1"></DeviceStatusInfo>
      <DeviceStatusInfo :type="1"></DeviceStatusInfo>
      <DeviceStatusInfo :device="deviceStore.deviceInfo" :type="2"></DeviceStatusInfo>
      <DeviceNumberInfo></DeviceNumberInfo>
    </template>
@@ -122,7 +122,7 @@
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 { usePLCStore } from '@/stores/plc'
import { useDevicesStore } from '@/stores/devices'
import { useCraftModelStore } from '@/stores/craftModel'
import CraftDetailModal from '@/views/dashboard/components/CraftDetailModal.vue'
@@ -173,7 +173,7 @@
 */
function reloadChannel(task: Task) {
  tasksStore.reloadChannel(task.Channel).then(() => {
    plcStore.startPollingPLC()
    // plcStore.startPollingPLC()
  })
}
@@ -182,8 +182,8 @@
  location.reload()
}
// 启动plc 轮询
const plcStore = usePLCStore()
plcStore.startPollingPLC()
// const plcStore = usePLCStore()
// plcStore.startPollingPLC()
// 启动 设备 轮询
const deviceStore = useDevicesStore()
deviceStore.startPollingDevice()