| | |
| | | <template #leftBlock2> |
| | | <ChannelCollapse :channels="channels"></ChannelCollapse> |
| | | </template> |
| | | <template #middleBlock1>标题</template> |
| | | <template #middleBlock1> |
| | | <DashboardTitle></DashboardTitle> |
| | | </template> |
| | | <template #middleBlock2> |
| | | <el-tabs v-model="activeMainTabName" class="main-info-tabs"> |
| | | <el-tab-pane label="加工信息" name="加工信息"> |
| | |
| | | </template> |
| | | <template #middleBlock4> |
| | | <SubTitle>人员信息</SubTitle> |
| | | <PersonInfo :person="person"></PersonInfo> |
| | | <PersonInfo v-for="worker in workers" :key="worker.workerId" :person="worker"></PersonInfo> |
| | | </template> |
| | | <template #rightBlock1> |
| | | <div class="date-time"> |
| | |
| | | </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> |
| | | <SubTitle>知识库</SubTitle> |
| | | <KnowledgeInfo></KnowledgeInfo> |
| | | <BigButton class="btn" bg-color="red">红灯呼叫</BigButton> |
| | | </template> |
| | | </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 ProcessInfo from '@/views/dashboard/components/ProcessInfo.vue' |
| | | import ColorInfo from '@/views/dashboard/components/ColorInfo.vue' |
| | | import DeviceStatusInfo from '@/views/dashboard/components/DeviceStatusInfo.vue' |
| | | import DeviceNumberInfo from '@/views/dashboard/components/DeviceNumberInfo.vue' |
| | | import KnowledgeInfo from '@/views/dashboard/components/KnowledgeInfo.vue' |
| | | import BigButton from '@/views/dashboard/components/BigButton.vue' |
| | | import type { LabelValue } from '@/views/dashboard/components/TaskTabs.vue' |
| | | import TaskTabs from '@/views/dashboard/components/TaskTabs.vue' |
| | | import CurrentDateTime from '@/views/dashboard/components/CurrentDateTime.vue' |
| | |
| | | import ProcessingInfo from '@/views/dashboard/components/ProcessingInfo.vue' |
| | | 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' |
| | | }) |
| | | |
| | | const person = computed(() => { |
| | | return { |
| | | workerName: '姓名', |
| | | phone: '111' |
| | | } as unknown as Worker |
| | | // 获取当前高亮任务的值班人信息 |
| | | const taskStore = useTasksStore() |
| | | const workers = computed(() => { |
| | | return taskStore.activeTask?.Procedure?.procedure?.workers ?? [] |
| | | }) |
| | | |
| | | const process = computed(() => { |
| | | return { product: '产品名称', number: '111', procedure: '工艺名称', isUpdate: true } as any |
| | | }) |
| | |
| | | function reloadAllData(task: Task) { |
| | | tasksStore.reload(task.Channel) |
| | | } |
| | | |
| | | const plcStore = usePLCStore() |
| | | // 启动plc 轮询 |
| | | plcStore.startPollingPLC() |
| | | |
| | | const deviceStore = useDevicesStore() |
| | | deviceStore.startPollingDevice() |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | :deep(.el-tabs__nav-wrap::after) { |
| | | height: 1px; |
| | | } |
| | | .btn { |
| | | width: 100%; |
| | | font-size: 20px; |
| | | } |
| | | </style> |