| | |
| | | { label: "条码", value: this.orDash(item.barcode), code: true, type: "barcode" }, |
| | | { label: "重量", value: this.orDash(item.weight) }, |
| | | { label: "任务可写区", value: this.orDash(item.taskWriteIdx) }, |
| | | { label: "缓存区数据", value: this.formatTaskBufferItems(item.taskBufferItems), code: true }, |
| | | { label: "故障代码", value: this.orDash(item.error) }, |
| | | { label: "故障信息", value: this.orDash(item.errorMsg) }, |
| | | { label: "系统告警", value: this.orDash(item.systemWarning) }, |
| | | { label: "扩展数据", value: this.orDash(item.extend) } |
| | | ]; |
| | | }, |
| | | formatTaskBufferItems: function (items) { |
| | | if (!Array.isArray(items) || items.length === 0) { |
| | | return "--"; |
| | | } |
| | | return items.map(function (item) { |
| | | var slotIdx = item && item.slotIdx != null ? item.slotIdx : "?"; |
| | | var taskNo = item && item.taskNo != null ? item.taskNo : 0; |
| | | var targetStaNo = item && item.targetStaNo != null ? item.targetStaNo : 0; |
| | | if (!taskNo && !targetStaNo) { |
| | | return slotIdx + ": 空"; |
| | | } |
| | | return slotIdx + ": " + taskNo + " -> " + targetStaNo; |
| | | }).join(" | "); |
| | | }, |
| | | postControl: function (url, payload) { |
| | | $.ajax({ |
| | | url: baseUrl + url, |