| | |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public int BoxHeight { get; set; } |
| | | /// <summary> |
| | | /// 目的工位 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public string EndLocat { get; set; } |
| | | } |
| | |
| | | public bool BoHaveItem { get; set; } |
| | | public PLCTypeEnum Type { get; set; } |
| | | public int BoxHeight { get; set; } |
| | | public string EndLocat { get; set; } |
| | | } |
| | | } |
| | |
| | | { |
| | | var value = Convert.ToInt32(item.Value); |
| | | var height = Math.Round(value / 790000d * 200).ToInt(); |
| | | if (modDevice.BoxHeight != height) |
| | | var modPosition = listPlcPosition.FirstOrDefault(s => s.DeviceId == modDevice.Id && s.Text == "目的工位"); |
| | | string EndLocat = ""; |
| | | if (modPosition != null) |
| | | { |
| | | var (result2, value2) = modPlcUtil.GetPlcDBValue(modPosition.PosType, modDevice.DbNumber, modPosition.PlcPos); |
| | | if (result2.IsSucceed) |
| | | EndLocat = Convert.ToString(value2); |
| | | } |
| | | if (modDevice.BoxHeight != height || modDevice.EndLocat != EndLocat) |
| | | { |
| | | modDevice.EndLocat = EndLocat; |
| | | modDevice.BoxHeight = Math.Round(value / 790000d * 200).ToInt(); |
| | | var modInfo = new PlcPositionInfo() |
| | | { |
| | | Type = modPlc.Type, |
| | | StationNum = modDevice.StationNum, |
| | | BoxHeight = modDevice.BoxHeight |
| | | BoxHeight = modDevice.BoxHeight, |
| | | EndLocat = EndLocat, |
| | | }; |
| | | HubUtil.PublicPosition(modInfo); |
| | | UpdatePosition(modInfo); |
| | |
| | | //堆垛机数据 |
| | | const cellsDataLine = ref<any>([ |
| | | { Id: 1, Code: '001', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 2, Code: '10', LineCode: '01', EndLocat: '01010101', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 2, Code: '10', LineCode: '01', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 3, Code: '003', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 4, Code: '004', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 5, Code: '005', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | |
| | | if (foundCell) { |
| | | //修改高度 |
| | | foundCell.BoxHeight = s.boxHeight; |
| | | foundCell.EndLocat = s.endLocat; |
| | | } |
| | | } |
| | | else if (s.type == 1) { |
| | |
| | | debugger; |
| | | const foundCell = cellsDataLine.value.find(cell => cell.Code === data.stationNum); |
| | | if (foundCell) { |
| | | foundCell.EndLocat = data.endLocat; |
| | | const startHeight = foundCell.BoxHeight; |
| | | const targetHeight = data.boxHeight; |
| | | const duration = 1000; // 动画持续时间(毫秒) |