From b26933c801fbf69df56fd81df3e127e39a14b31d Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 05 二月 2024 19:18:18 +0800 Subject: [PATCH] 存token的问题 --- src/views/dashboard/index.vue | 50 +++++++++++++++++++++++++++++++++++--------------- 1 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index e8c7ee5..32c8153 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -45,11 +45,11 @@ </el-tab-pane> <el-tab-pane label="鐗╂枡娓呭崟" name="鐗╂枡娓呭崟"> <InputMaterialsList - :material-list="activeTask?.Procedure.procedure.inputMaterials" + :material-list="activeTask?.Procedure?.procedure?.inputMaterials" @detail-click="showMaterialDetailModal" ></InputMaterialsList> <OutputMaterialsList - :material-list="activeTask?.Procedure.procedure.outputMaterials" + :material-list="activeTask?.Procedure?.procedure?.outputMaterials" @detail-click="showMaterialDetailModal" ></OutputMaterialsList> </el-tab-pane> @@ -58,10 +58,12 @@ <template #middleBlock3> <SubTitle>浠诲姟璇︽儏</SubTitle> <div class="task-detail"> - <TaskControl :task="activeTask" :workers="currentWorkers" @should-reload="reloadChannel"></TaskControl> + <el-scrollbar always class="scroller"> + <TaskControl :task="activeTask" :workers="currentWorkers" @should-reload="reloadChannel"></TaskControl> + <ColorInfo :type="1"></ColorInfo> + <ColorInfo :type="2"></ColorInfo> + </el-scrollbar> </div> - <ColorInfo :type="1"></ColorInfo> - <ColorInfo :type="2"></ColorInfo> </template> <template #middleBlock4> <SubTitle>浜哄憳淇℃伅</SubTitle> @@ -73,13 +75,17 @@ </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> + <DeviceNumberInfo></DeviceNumberInfo> </template + >褰撳墠浠诲姟: <template #rightBlock3> <SubTitle>鐭ヨ瘑搴�</SubTitle> - <KnowledgeInfo></KnowledgeInfo> + <div class="task-detail-right-3"> + <el-scrollbar always class="scroller"> + <KnowledgeInfo></KnowledgeInfo> + </el-scrollbar> + </div> <BigButton class="btn" bg-color="red">绾㈢伅鍛煎彨</BigButton> </template> </DashboardLayout> @@ -116,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' @@ -167,19 +173,22 @@ */ function reloadChannel(task: Task) { tasksStore.reloadChannel(task.Channel).then(() => { - plcStore.startPollingPLC() + // plcStore.startPollingPLC() }) } function reloadAllData() { tasksStore.reloadAllData() + location.reload() } // 鍚姩plc 杞 -const plcStore = usePLCStore() -plcStore.startPollingPLC() +// const plcStore = usePLCStore() +// plcStore.startPollingPLC() // 鍚姩 璁惧 杞 const deviceStore = useDevicesStore() deviceStore.startPollingDevice() +// console.log(deviceStore, '1111') +// localStorage.setItem('currentDeviceID', deviceStore.deviceInfo.currentDeviceID) // 鍒囨崲浠诲姟鏃惰幏鍙栧搴斾换鍔$殑宸ヨ壓妯″瀷淇℃伅 const craftModelStore = useCraftModelStore() @@ -242,7 +251,9 @@ const currentWorkers = computed(() => { const channel = activeTask.value?.Channel if (isNumber(channel)) { - return channels.value[channel].workers ?? [] + console.log(activeTask.value?.Procedure?.procedure?.workers, '99999') + // return [] + return activeTask.value?.Procedure?.procedure?.workers ?? [] } else { return [] } @@ -304,6 +315,15 @@ justify-content: center; } .scroller { - padding: 4px 16px; + padding: 4px 10px; +} +.task-detail { + width: 100%; + height: calc(100% - 32px); + padding-right: 5px; +} +.task-detail-right-3 { + width: 100%; + height: calc(100% - 32px - 50px); } </style> -- Gitblit v1.8.0