| | |
| | | PLCTaskAction.boDemo = context.BoDemo.Value; |
| | | await _sysConfigService.UpdateConfigValue("sys_demo", context.BoDemo.Value); |
| | | } |
| | | //滚筒反转 |
| | | if (context.BoDrumReversal.HasValue) |
| | | { |
| | | PLCTaskAction.boDrumReversal = context.BoDrumReversal.Value; |
| | | await _sysConfigService.UpdateConfigValue("sys_DrumReversal", context.BoDrumReversal.Value); |
| | | } |
| | | await _plcHubContext.Clients.All.UpdateService(new PLCServiceModel() { BoRunningState = PLCTaskAction.boRunningState, BoRefresh = PLCTaskAction.boRefresh, BoOffline = PLCTaskAction.boOffline, BoDemo = PLCTaskAction.boDemo}); |
| | | } |
| | | } |
| | |
| | | public bool? BoRefresh { get; set; } |
| | | |
| | | public bool? BoDemo { get; set; } |
| | | |
| | | public bool? BoDrumReversal { get; set; } |
| | | } |
| | |
| | | public static bool boRefresh = false; |
| | | //演示模式 |
| | | public static bool boDemo = false; |
| | | //滚筒反转 |
| | | public static bool boDrumReversal = false; |
| | | |
| | | public static List<PlcPositionInfo> listPositionInfo = new List<PlcPositionInfo>(); |
| | | |
| | |
| | | boOffline = _sysConfigService.GetConfigValue<bool>("sys_Offline").Result; |
| | | boRefresh = _sysConfigService.GetConfigValue<bool>("sys_Refresh").Result; |
| | | boDemo = _sysConfigService.GetConfigValue<bool>("sys_demo").Result; |
| | | boDrumReversal = _sysConfigService.GetConfigValue<bool>("sys_DrumReversal").Result; |
| | | } |
| | | /// <summary> |
| | | /// 初始化PLC连接 |
| | |
| | | } |
| | | } |
| | | //服务状态 |
| | | var modService = new { PLCTaskAction.boRunningState, PLCTaskAction.boOffline, PLCTaskAction.boRefresh, PLCTaskAction.boDemo }; |
| | | var modService = new { PLCTaskAction.boRunningState, PLCTaskAction.boOffline, PLCTaskAction.boRefresh, PLCTaskAction.boDemo, PLCTaskAction.boDrumReversal }; |
| | | return new { listPlc, modService }; |
| | | } |
| | | /// <summary> |
| | |
| | | <el-switch v-model="state.boDemo" active-text="" inactive-text="演示模式" |
| | | @change="handleSwitchChange('boDemo', $event)"></el-switch> |
| | | </el-card> |
| | | <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-collapse-item> |
| | | |
| | | <el-collapse-item title="堆垛机" name="2"> |