| | |
| | | var checkTask = await _wcsCheckTaskRep.Context.Queryable<WcsCheckTask>().Where(w => w.Status == "1").ToListAsync(); |
| | | if (checkTask.Count > 0) |
| | | { |
| | | throw Oops.Oh("分拣码垛已绑定任务,不支持开启演示模式!"); |
| | | await _plcHubContext.Clients.All.UpdateService( |
| | | new PLCServiceModel() |
| | | { |
| | | BoRunningState = PLCTaskAction.boRunningState, |
| | | BoRefresh = PLCTaskAction.boRefresh, |
| | | BoOffline = PLCTaskAction.boOffline, |
| | | BoDemo = PLCTaskAction.boDemo, |
| | | BoDrumReversal = PLCTaskAction.boDrumReversal, |
| | | Error = "分拣码垛已绑定任务,不支持开启演示模式!" |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | //PLC连接 |
| | |
| | | public bool? BoDemo { get; set; } |
| | | |
| | | public bool? BoDrumReversal { get; set; } |
| | | /// <summary> |
| | | /// 错误信息 |
| | | /// </summary> |
| | | public string Error { get; set; } |
| | | } |
| | |
| | | import { listStatus, listPosition } from '/@/api/wcs/wcsPlc'; |
| | | import { signalR } from './signalR'; |
| | | import { cellsDataLine, cellsDataOne, cellsDataTwo, cellsDataThree } from './data'; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | const state = ref<any>({}); |
| | | const stackers = ref<any>({}); |
| | |
| | | signalR.off('UpdateService'); |
| | | signalR.on('UpdateService', (data: any) => { |
| | | state.value = data; |
| | | if (data.error) { |
| | | ElMessage({ |
| | | message: data.error, |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | signalR.off('PublicPosition'); |
| | | signalR.on('PublicPosition', (data: any) => { |