From 82e27d0cadbddfc73e8b978e778b802dc8e51fa1 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 29 三月 2024 10:51:36 +0800 Subject: [PATCH] 报工入参修改和工序ID修改 --- src/views/dashboard/index.vue | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index fea5c74..3798c36 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> @@ -75,10 +75,10 @@ </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> <div class="task-detail-right-3"> @@ -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' @@ -131,6 +131,8 @@ import { updateCraftParams } from '@/api' import { Loading } from '@element-plus/icons-vue' import { isNumber } from 'lodash-es' +import { getToken } from '@/common/utils/index' +const token = getToken() defineOptions({ name: 'DashboardView' @@ -172,9 +174,11 @@ * @param task */ function reloadChannel(task: Task) { - tasksStore.reloadChannel(task.Channel).then(() => { - plcStore.startPollingPLC() - }) + // if (token !== null || token !== '' || token !== 'undefined') { + // tasksStore.reloadChannel(task.Channel).then(() => { + // // plcStore.startPollingPLC() + // }) + // } } function reloadAllData() { @@ -182,11 +186,13 @@ 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() @@ -249,7 +255,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 [] } -- Gitblit v1.8.0