| | |
| | | <template> |
| | | <div class="sys-user-container" style="overflow: hidden;"> |
| | | <div class="sys-user-container"> |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <el-collapse v-model="activeName"> |
| | |
| | | <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> |
| | | <el-switch v-model="state.boDrumReversal" active-text="" inactive-text="滚动反转" |
| | | @change="handleSwitchChange('boDrumReversal', $event)"></el-switch> |
| | | </el-card> |
| | | <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> |
| | | <el-switch v-model="state.boOutLock" active-text="" inactive-text="出库锁定" |
| | | @change="handleSwitchChange('boOutLock', $event)"></el-switch> |
| | | </el-card> |
| | | <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> |
| | | <el-switch v-model="state.boEnterLock" active-text="" inactive-text="入库锁定" |
| | | @change="handleSwitchChange('boEnterLock', $event)"></el-switch> |
| | | </el-card> |
| | | </el-collapse-item> |
| | | |
| | |
| | | <el-button type="primary" :plain="floorStates.isPlain3" |
| | | @click="floorTogglePlain(3)">三层平面</el-button> |
| | | </div> |
| | | <div style="margin: 40px; height: 50%;"> |
| | | <div style="margin: 40px; height: 58%;"> |
| | | <div class="grid-container-line"> |
| | | <div v-for="cell in cellsDataLine" :key="cell.Id"> |
| | | <div v-if="cell.IsShow === 0" class="grid-item-line"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="margin: 10px 40px;height: 30%; width: 100%; "> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <div > |
| | | <el-form label-position="right" label-width="40px" style=""> |
| | | <el-form-item label="工位"> |
| | | <el-input v-model="stationValue.LocatNo" style="width: 200px; margin-right: 10px;"></el-input> |
| | | <el-button @click="write('zidong',stationValue)">自动</el-button> |
| | | <el-button @click="write('shoudong',stationValue)">手动</el-button> |
| | | <el-button @click="write('huifu',stationValue)">报警恢复</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button size="large" @mousedown="writeDown('1diandong',stationValue)" @mouseup="writeUp('1diandong',stationValue)">1点动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('2diandong',stationValue)" @mouseup="writeUp('2diandong',stationValue)">2点动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('3diandong',stationValue)" @mouseup="writeUp('3diandong',stationValue)">3点动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('4diandong',stationValue)" @mouseup="writeUp('4diandong',stationValue)">4点动</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button size="large" @mousedown="writeDown('1liandong',stationValue)" @mouseup="writeUp('1liandong',stationValue)">1联动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('2liandong',stationValue)" @mouseup="writeUp('2liandong',stationValue)">2联动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('3liandong',stationValue)" @mouseup="writeUp('3liandong',stationValue)">3联动</el-button> |
| | | <el-button size="large" @mousedown="writeDown('4liandong',stationValue)" @mouseup="writeUp('4liandong',stationValue)">4联动</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button size="large" @mousedown="writeDown('yizaisheng',stationValue)" @mouseup="writeUp('yizaisheng',stationValue)">移栽上升</el-button> |
| | | <el-button size="large" @mousedown="writeDown('fanzhuansheng',stationValue)" @mouseup="writeUp('fanzhuansheng',stationValue)">翻转机上升</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button size="large" @mousedown="writeDown('yizaijiang',stationValue)" @mouseup="writeUp('yizaijiang',stationValue)">移栽下降</el-button> |
| | | <el-button size="large" @mousedown="writeDown('fanzhuanjiang',stationValue)" @mouseup="writeUp('fanzhuanjiang',stationValue)">翻转机下降</el-button> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="15"> |
| | | <div > |
| | | <el-form label-position="right" label-width="60px" style="" :inline="true"> |
| | | <el-row :gutter="23"> |
| | | <el-col :span="8"> |
| | | <el-form-item > |
| | | <el-button @click="write('UpTask',stationValue)">更改任务</el-button> |
| | | <el-button @click="writeTaskInfo('writeTask',stationValue)">任务写入</el-button> |
| | | <el-button @click="writeTaskInfo('writeTaskDelete',stationValue)">任务清空</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="任务号" > |
| | | <el-input v-model="stationValue.TaskNo" style="width: 200px; "></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="托盘号"> |
| | | <el-input v-model="stationValue.PalletNo" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="起始工位"> |
| | | <el-input v-model="stationValue.StartLoction" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="目标工位"> |
| | | <el-input v-model="stationValue.EndLoction" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="起始排"> |
| | | <el-input v-model="stationValue.StartPai" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="起始列"> |
| | | <el-input v-model="stationValue.StartLie" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="起始层"> |
| | | <el-input v-model="stationValue.StartCeng" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="目标排"> |
| | | <el-input v-model="stationValue.EndPai" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="目标列"> |
| | | <el-input v-model="stationValue.EndLie" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="目标层"> |
| | | <el-input v-model="stationValue.EndCeng" style="width: 200px; margin-right: 10px;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | <script lang="ts" setup> |
| | | import { ref, reactive, onMounted } from 'vue'; |
| | | import { listStatus, listPosition } from '/@/api/wcs/wcsPlc'; |
| | | import { WriteInfo,WriteTaskInfo } from '/@/api/wcs/wcsDevice'; |
| | | import { signalR } from './signalR'; |
| | | import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data'; |
| | | import { ElMessage } from "element-plus"; |
| | |
| | | const state = ref<any>({}); |
| | | const stackers = ref<any>({}); |
| | | const conveyors = ref<any>({}); |
| | | const stationValue = ref<any>({ |
| | | LocatNo: '',//工位 |
| | | Layer:'',//楼层 |
| | | TypeName:'',//操作类型名称 |
| | | FuncName:'',//事件结果 true/false |
| | | |
| | | TaskNo:'', |
| | | PalletNo:'', |
| | | StartLoction:'', |
| | | EndLoction:'', |
| | | StartPai:'', |
| | | StartLie:'', |
| | | StartCeng:'', |
| | | EndPai:'', |
| | | EndLie:'', |
| | | EndCeng:'', |
| | | }); |
| | | |
| | | |
| | | // 查询状态 |
| | | const handleQuery = async () => { |
| | | var res = await listStatus(); |
| | |
| | | cellsData = floorData[index]; |
| | | } |
| | | } |
| | | |
| | | const write = async (type: string,row: any) => { |
| | | if (floorStates.value.isPlain1 == false) { |
| | | row.Layer = 1; |
| | | }else if(floorStates.value.isPlain2 == false){ |
| | | row.Layer = 2; |
| | | } |
| | | else if(floorStates.value.isPlain3 == false){ |
| | | row.Layer = 3; |
| | | } |
| | | row.TypeName = type; |
| | | |
| | | console.log(row); |
| | | var res = await WriteInfo(row); |
| | | console.log(res.data.result); |
| | | ElMessage.success(res.data.result); |
| | | } |
| | | |
| | | const writeDown = async (type: string,row: any) => { |
| | | if (floorStates.value.isPlain1 == false) { |
| | | row.Layer = 1; |
| | | }else if(floorStates.value.isPlain2 == false){ |
| | | row.Layer = 2; |
| | | } |
| | | else if(floorStates.value.isPlain3 == false){ |
| | | row.Layer = 3; |
| | | } |
| | | row.TypeName = type; |
| | | row.FuncName = "true"; |
| | | var res = await WriteInfo(row); |
| | | console.log(type+"按下事件"); |
| | | |
| | | // ElMessage.success(res.data.result); |
| | | } |
| | | const writeUp = async (type: string,row: any) => { |
| | | if (floorStates.value.isPlain1 == false) { |
| | | row.Layer = 1; |
| | | }else if(floorStates.value.isPlain2 == false){ |
| | | row.Layer = 2; |
| | | } |
| | | else if(floorStates.value.isPlain3 == false){ |
| | | row.Layer = 3; |
| | | } |
| | | row.TypeName = type; |
| | | row.FuncName = "false"; |
| | | var res = await WriteInfo(row); |
| | | console.log(type+"抬起事件"); |
| | | |
| | | // ElMessage.success('asdf'+ res.data.result); |
| | | } |
| | | |
| | | const writeTaskInfo = async (type: string,row: any) => { |
| | | if (floorStates.value.isPlain1 == false) { |
| | | row.Layer = 1; |
| | | }else if(floorStates.value.isPlain2 == false){ |
| | | row.Layer = 2; |
| | | } |
| | | else if(floorStates.value.isPlain3 == false){ |
| | | row.Layer = 3; |
| | | } |
| | | row.TypeName = type; |
| | | var res = await WriteTaskInfo(row); |
| | | console.log(type+"抬起事件"); |
| | | |
| | | // ElMessage.success('asdf'+ res.data.result); |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .box-card { |
| | | height: 30px; |
| | | padding: 0; |