| | |
| | | <ProcessingInfo style="margin-top: 6px" :task="activeTask"></ProcessingInfo> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="工艺信息" name="工艺信息"> |
| | | <ProcessInfo :process="process"></ProcessInfo> |
| | | <ProcessInfo |
| | | v-for="item in craftModelStore.craftModelList" |
| | | :key="item.ID" |
| | | :craft-model="item" |
| | | @detail="openCraftModelDetailModal" |
| | | ></ProcessInfo> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="物料清单" name="物料清单"> |
| | | <InputMaterialsList></InputMaterialsList> |
| | |
| | | <BigButton class="btn" bg-color="red">红灯呼叫</BigButton> |
| | | </template> |
| | | </DashboardLayout> |
| | | <CraftDetailModal v-model="showCraftModelDetail" @close="showCraftModelDetail = false"></CraftDetailModal> |
| | | </template> |
| | | <script setup lang="ts"> |
| | | import { computed, ref, watch, onUnmounted } from 'vue' |
| | | import { computed, ref, watch } 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 PersonInfo from '@/views/dashboard/components/PersonInfo.vue' |
| | | import ProcessInfo from '@/views/dashboard/components/ProcessInfo.vue' |
| | | import ColorInfo from '@/views/dashboard/components/ColorInfo.vue' |
| | |
| | | import DashboardTitle from '@/views/dashboard/components/DashboardTitle.vue' |
| | | import { usePLCStore } from '@/stores/plc' |
| | | import { useDevicesStore } from '@/stores/devices' |
| | | import { useCraftModelStore } from '@/stores/craftModel' |
| | | import CraftDetailModal from '@/views/dashboard/components/CraftDetailModal.vue' |
| | | |
| | | defineOptions({ |
| | | name: 'DashboardView' |
| | |
| | | amount: '10' |
| | | } as unknown as Order |
| | | }) |
| | | const device = computed(() => { |
| | | return { |
| | | plcStatus: 1, |
| | | plcNotConnected: false |
| | | } as unknown as PLCResponse |
| | | }) |
| | | |
| | | const taskTabsList = [ |
| | | { |
| | | label: '未完成', |
| | |
| | | tasksStore.getChannels(tab.value) |
| | | } |
| | | |
| | | /** |
| | | * 完成任务或者下发参数成功后要刷新通道数据 |
| | | * @param task |
| | | */ |
| | | function reloadAllData(task: Task) { |
| | | tasksStore.reload(task.Channel) |
| | | } |
| | | |
| | | const plcStore = usePLCStore() |
| | | // 启动plc 轮询 |
| | | const plcStore = usePLCStore() |
| | | plcStore.startPollingPLC() |
| | | |
| | | // 启动 设备 轮询 |
| | | const deviceStore = useDevicesStore() |
| | | deviceStore.startPollingDevice() |
| | | |
| | | // 切换任务时获取对应任务的工艺模型信息 |
| | | const craftModelStore = useCraftModelStore() |
| | | watch(activeTask, () => { |
| | | craftModelStore.getCraftModelList() |
| | | }) |
| | | |
| | | const showCraftModelDetail = ref(false) |
| | | function openCraftModelDetailModal() { |
| | | console.log(1) |
| | | showCraftModelDetail.value = true |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |