| | |
| | | <script setup> |
| | | import request from "@/utils/request"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { computed,reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { computed, reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue' |
| | | import { useI18n } from 'vue-i18n' |
| | | import { WebSocketHost, host } from '@/utils/constants' |
| | | import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService'; |
| | |
| | | }); |
| | | //报警提示 |
| | | const errorInfoFuntion = async (info) => { |
| | | let infoScancode='扫码ID:'+info.scanId+' '+info.scanCode; |
| | | let infoScancode = '扫码ID:' + info.scanId + ' ' + info.scanCode; |
| | | ElMessageBox.confirm( |
| | | infoScancode, |
| | | t('delivery.prompt'), |
| | |
| | | }) |
| | | } |
| | | const topLineShow = async () => { |
| | | blind.value = true; |
| | | blind.value = true; |
| | | } |
| | | //领取任务/结束任务 |
| | | const startOrStopTask = async (row,line,isWorking) => { |
| | | const startOrStopTask = async (row, line, isWorking) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else {n |
| | | } else { |
| | | n |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }) |
| | | } |
| | | const handleDialogClose = () => { |
| | | |
| | | const handleDialogClose = () => { |
| | | |
| | | } |
| | | |
| | | |
| | | const fetchData = async () => { |
| | | //扫码回车提交 |
| | | alert(searchs.value); |
| | | searchs.value=""; |
| | | //alert(searchs.value); |
| | | searchs.value = ""; |
| | | } |
| | | const filterTableData = computed(() => |
| | | loadData.value.filter( |
| | | (data) => |
| | | !searchs.value ||data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | ) |
| | | ) |
| | | </script> |
| | |
| | | {{ $t('machine.mechanicalArm') }} |
| | | </div> |
| | | <el-dialog v-model="blind" top="30vh" style="text-align: center;" @close="handleDialogClose"> |
| | | <!-- 未领取的标准任务 --> |
| | | |
| | | <el-table :data="findPrimitiveTask" stripe style="height:260px" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"> |
| | | <!-- 未领取的标准任务 --> |
| | | |
| | | <el-table :data="findPrimitiveTask" stripe style="height:260px" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" |
| | | :cell-style="{ textAlign: 'center' }"> |
| | | <!-- <el-table-column type="selection" min-width="30" /> --> |
| | | |
| | | |
| | | <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" /> |
| | | <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" /> |
| | |
| | | <el-table-column prop="workState" :label="$t('glassInfo.workState')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="70"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row,2,1)">{{ |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 1)">{{ |
| | | $t('functionState.getTask') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <br> |
| | | <div id="search"> |
| | | <!-- 功能 --> |
| | | |
| | | |
| | | <el-button :type="(findMachine['state'] == '暂停' ? 'danger' : 'success')" id="ButtonMachineStatus" |
| | | @click="machineStatus((findMachine['state'] == '暂停' ? '开工' : '暂停'))">{{ findMachine['state'] == '开工' ? |
| | | $t('functionState.start') : $t('functionState.stop') }}</el-button> |
| | | $t('functionState.start') : $t('functionState.stop') }}</el-button> |
| | | <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.getTask') }}</el-button> |
| | | |
| | | <el-button :type="(findMachine['mode'] == '定制' ? 'danger' : 'success')" id="ButtonMachineMode" |
| | | @click="machineMode((findMachine['mode'] == 0 ? 1 : 0))">{{ findMachine['mode'] == 0 ? |
| | | $t('functionState.modeD') : $t('functionState.modeB') }}</el-button> |
| | | $t('functionState.modeD') : $t('functionState.modeB') }}</el-button> |
| | | </div> |
| | | |
| | | |
| | | <div id="main-body" style="min-height:240px;"> |
| | | <!-- 表格内容 --> |
| | | <el-table :data="filterTableData" stripe style="height:260px" |
| | |
| | | <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" /> |
| | | <el-table-column prop="batchNumber" sortable :label="$t('glassInfo.batchNumber')" /> |
| | | <el-table-column prop="taskType" sortable :label="$t('glassInfo.taskType')" /> |
| | | <el-table-column prop="scanId" sortable :label="$t('glassInfo.scanId')" > |
| | | <template #header> |
| | | <el-table-column prop="scanId" :label="$t('glassInfo.scanId')"> |
| | | <template #header> |
| | | <div> |
| | | <div>{{ $t('glassInfo.taskType') }} |
| | | <el-icon @click="fetchData"><CaretTop /></el-icon> |
| | | <el-icon @click="fetchData"><CaretBottom /></el-icon> |
| | | <el-icon color="#409efc"><Filter /></el-icon> |
| | | </div> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | <span>{{ $t('glassInfo.scanId') }}</span> |
| | | <span style="margin-left:10px ;"></span> |
| | | <el-popover placement="bottom" title="筛选" :width="200" trigger="click"> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | <template #reference> |
| | | <el-icon><Filter /></el-icon> |
| | | </template> |
| | | </el-popover> |
| | | <el-icon><CaretTop /></el-icon> |
| | | <el-icon><CaretBottom /></el-icon> |
| | | <!-- <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> --> |
| | | <!-- <el-input size="small" placeholder="Type to search" /> --> |
| | | </div> |
| | | </template> |
| | |
| | | <el-table-column prop="isWorking" sortable :label="$t('glassInfo.isWorking')" /> |
| | | <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row,2,2)">{{ |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">{{ |
| | | $t('functionState.stopTask') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | |
| | | <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;"> |
| | | <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/扫码识别.png"></el-image> |
| | | <img style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../assets/扫码识别.png"> |
| | | <!-- <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/扫码识别.png"></el-image> --> |
| | | <!-- <div style="width: 70%;min-width: 900px; height: 460px;background-image: url(../../src/assets/扫码识别.png) ;background-size: 100% 100%;float: left;"> |
| | | |
| | | </div> --> |
| | |
| | | border: none; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dotClass { |
| | | width:10px; |
| | | height:10px; |
| | | width: 10px; |
| | | height: 10px; |
| | | border-radius: 50%; |
| | | display: block; |
| | | margin-left: 10px; |
| | | margin-left: 10px; |
| | | } |
| | | </style> |