From 56538e602b927c232ac5b991ef84175edd2ce3ce Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 24 四月 2026 14:20:20 +0800
Subject: [PATCH] feat(WMS/WCS): 增加机器人历史信息记录 fix(WMS/WCS): 修复前端bug
---
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue | 229 +++++++++++++++++++++++++++++++++-----------------------
1 files changed, 134 insertions(+), 95 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue b/Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue
index 462827e..c76c871 100644
--- a/Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue
+++ b/Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue
@@ -1,15 +1,7 @@
<template>
- <view-grid
- ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend"
- >
+ <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
+ :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
+ :table="table" :extend="extend">
</view-grid>
</template>
@@ -20,154 +12,201 @@
export default defineComponent({
setup() {
const table = ref({
- key: "Id",
+ key: "id",
footer: "Foots",
cnName: "鏈烘鎵嬬姸鎬佺鐞�",
name: "robotState",
- url: "/robotState/",
- sortName: "IPAddress",
+ url: "/RobotState/",
+ sortName: "CreateDate",
});
// 缂栬緫琛ㄥ崟瀛楁
const editFormFields = ref({
- IPAddress: "",
- Version: "",
- IsEventSubscribed: false,
- RobotRunMode: "",
- RobotControlMode: "",
- RobotArmObject: "",
- Homed: "",
- CurrentAction: "",
- OperStatus: "",
- RobotTaskTotalNum: 0,
- IsSplitPallet: false,
- IsGroupPallet: false,
- IsInFakeBatteryMode: false,
- CurrentBatchIndex: 1,
- ChangePalletPhase: 0,
- IsScanNG: false,
- BatteryArrived: false,
+ id: "",
+ ipAddress: "",
+ version: "",
+ isEventSubscribed: false,
+ robotRunMode: "",
+ robotControlMode: "",
+ robotArmObject: "",
+ homed: "",
+ currentAction: "",
+ operStatus: "",
+ robotTaskTotalNum: 0,
+ isSplitPallet: false,
+ isGroupPallet: false,
+ isInFakeBatteryMode: false,
+ currentBatchIndex: 1,
+ changePalletPhase: 0,
+ isScanNG: false,
+ batteryArrived: false,
});
// 缂栬緫琛ㄥ崟閰嶇疆
const editFormOptions = ref([
- [
- { title: "IP鍦板潃", field: "IPAddress", type: "string", readonly: true },
- { title: "鐗堟湰鍙�", field: "Version", type: "int", readonly: true },
- ],
+ // [
+ // { title: "IP鍦板潃", field: "ipAddress", type: "string", readonly: true },
+ // { title: "鐗堟湰鍙�", field: "version", type: "int", readonly: true },
+ // ],
[
{
title: "杩愯妯″紡",
- field: "RobotRunMode",
+ field: "robotRunMode",
type: "select",
data: [
{ key: 1, value: "鎵嬪姩妯″紡" },
{ key: 2, value: "鑷姩妯″紡" },
],
},
+ // {
+ // title: "鎺у埗妯″紡",
+ // field: "robotControlMode",
+ // type: "select",
+ // data: [
+ // { key: 1, value: "瀹㈡埛绔帶鍒�" },
+ // { key: 2, value: "鍏朵粬" },
+ // ],
+ // },
+ // {
+ // title: "鎵嬭噦鐘舵��",
+ // field: "robotArmObject",
+ // type: "select",
+ // data: [
+ // { key: 0, value: "绌洪棽" },
+ // { key: 1, value: "鏈夌墿鏂�" },
+ // ],
+ // },
{
- title: "鎺у埗妯″紡",
- field: "RobotControlMode",
- type: "select",
+ title: "鍥為浂鐘舵��", field: "homed", type: "select",
data: [
- { key: 1, value: "瀹㈡埛绔帶鍒�" },
- { key: 2, value: "鍏朵粬" },
- ],
+ { key: "Homed", value: "宸茬粡鍥為浂" },
+ { key: "Homing", value: "姝e湪鍥為浂" },
+ ]
},
{
- title: "鎵嬭噦鐘舵��",
- field: "RobotArmObject",
- type: "select",
+ title: "褰撳墠鍔ㄤ綔", field: "currentAction", type: "select",
data: [
- { key: 0, value: "绌洪棽" },
- { key: 1, value: "鏈夌墿鏂�" },
- ],
+ { key: "Picking", value: "姝e湪鍙栬揣" },
+ { key: "Putting", value: "姝e湪鏀捐揣" },
+ { key: "AllPickFinished", value: "鍏ㄩ儴鍙栬揣瀹屾垚" },
+ { key: "AllPutFinished", value: "鍏ㄩ儴鏀捐揣瀹屾垚" },
+ { key: "PickFinished", value: "鍙栬揣瀹屾垚" },
+ { key: "PutFinished", value: "鏀捐揣瀹屾垚" },
+ ]
},
+ // ],
+ // [
+
+ // { title: "杩愯鐘舵��", field: "operStatus", type: "string" },
],
[
- { title: "鍥為浂鐘舵��", field: "Homed", type: "string" },
- { title: "褰撳墠鍔ㄤ綔", field: "CurrentAction", type: "string" },
- { title: "杩愯鐘舵��", field: "OperStatus", type: "string" },
- ],
- [
- { title: "浠诲姟鎬绘暟", field: "RobotTaskTotalNum", type: "int" },
- { title: "褰撳墠鎵规", field: "CurrentBatchIndex", type: "int" },
- { title: "鎹㈢洏闃舵", field: "ChangePalletPhase", type: "int" },
+ { title: "浠诲姟鎬绘暟", field: "robotTaskTotalNum", type: "int" },
+ { title: "褰撳墠鎵规", field: "currentBatchIndex", type: "int" },
+ { title: "鎹㈢洏闃舵", field: "changePalletPhase", type: "int" },
],
[
{
title: "鏄惁鎷嗙洏",
- field: "IsSplitPallet",
- type: "checkbox",
+ field: "isSplitPallet",
+ type: "select",
+ dataKey: "isTrue",
+ data: [],
},
{
title: "鏄惁缁勭洏",
- field: "IsGroupPallet",
- type: "checkbox",
+ field: "isGroupPallet",
+ type: "select",
+ dataKey: "isTrue",
+ data: [],
},
{
title: "鍋囩數鑺ā寮�",
- field: "IsInFakeBatteryMode",
- type: "checkbox",
+ field: "isInFakeBatteryMode",
+ type: "select",
+ dataKey: "isTrue",
+ data: [],
},
],
[
{
title: "鏄惁鎵爜NG",
- field: "IsScanNG",
- type: "checkbox",
+ field: "isScanNG",
+ type: "select",
+ dataKey: "isTrue",
+ data: [],
},
{
title: "鐢佃姱鏄惁鍒颁綅",
- field: "BatteryArrived",
- type: "checkbox",
+ field: "batteryArrived",
+ type: "select",
+ dataKey: "isTrue",
+ data: [],
},
- {
- title: "娑堟伅宸茶闃�",
- field: "IsEventSubscribed",
- type: "checkbox",
- },
+ // {
+ // title: "娑堟伅宸茶闃�",
+ // field: "isEventSubscribed",
+ // type: "select",
+ // dataKey: "isTrue",
+ // data: [],
+ // },
],
]);
// 鎼滅储琛ㄥ崟瀛楁
const searchFormFields = ref({
- IPAddress: "",
- CurrentAction: "",
- OperStatus: "",
+ ipAddress: "",
+ currentAction: "",
+ operStatus: "",
});
// 鎼滅储琛ㄥ崟閰嶇疆
const searchFormOptions = ref([
[
- { title: "IP鍦板潃", field: "IPAddress", type: "string" },
- { title: "褰撳墠鍔ㄤ綔", field: "CurrentAction", type: "string" },
- { title: "杩愯鐘舵��", field: "OperStatus", type: "string" },
+ { title: "IP鍦板潃", field: "ipAddress", type: "like" },
+ { title: "褰撳墠鍔ㄤ綔", field: "currentAction", type: "string" },
+ {
+ title: "杩愯鐘舵��", field: "operStatus", type: "select",
+ data: [
+ { key: "Picking", value: "姝e湪鍙栬揣" },
+ { key: "Putting", value: "姝e湪鏀捐揣" },
+ { key: "AllPickFinished", value: "鍏ㄩ儴鍙栬揣瀹屾垚" },
+ { key: "AllPutFinished", value: "鍏ㄩ儴鏀捐揣瀹屾垚" },
+ { key: "PickFinished", value: "鍙栬揣瀹屾垚" },
+ { key: "PutFinished", value: "鏀捐揣瀹屾垚" },
+ ]
+ },
],
]);
// 鍒楀畾涔�
const columns = ref([
- { field: "IPAddress", title: "IP鍦板潃", type: "string", width: 140, align: "left" },
- { field: "Version", title: "鐗堟湰", type: "int", width: 80, align: "left" },
- { field: "RobotRunMode", title: "杩愯妯″紡", type: "int", width: 100, bind: { key: "robotRunMode", data: [] }, align: "center" },
- { field: "RobotControlMode", title: "鎺у埗妯″紡", type: "int", width: 100, bind: { key: "robotControlMode", data: [] }, align: "center" },
- { field: "RobotArmObject", title: "鎵嬭噦鐘舵��", type: "int", width: 90, bind: { key: "robotArmObject", data: [] }, align: "center" },
- { field: "Homed", title: "鍥為浂鐘舵��", type: "string", width: 100, align: "center" },
- { field: "CurrentAction", title: "褰撳墠鍔ㄤ綔", type: "string", width: 100, align: "center" },
- { field: "OperStatus", title: "杩愯鐘舵��", type: "string", width: 100, align: "center" },
- { field: "RobotTaskTotalNum", title: "浠诲姟鎬绘暟", type: "int", width: 90, align: "center" },
- { field: "IsSplitPallet", title: "鎷嗙洏", type: "byte", width: 60, align: "center" },
- { field: "IsGroupPallet", title: "缁勭洏", type: "byte", width: 60, align: "center" },
- { field: "IsInFakeBatteryMode", title: "鍋囩數鑺�", type: "byte", width: 70, align: "center" },
- { field: "CurrentBatchIndex", title: "鎵规", type: "int", width: 60, align: "center" },
- { field: "ChangePalletPhase", title: "鎹㈢洏闃舵", type: "int", width: 80, align: "center" },
- { field: "IsScanNG", title: "鎵爜NG", type: "byte", width: 80, align: "center" },
- { field: "BatteryArrived", title: "鐢佃姱鍒颁綅", type: "byte", width: 80, align: "center" },
- { field: "IsEventSubscribed", title: "宸茶闃�", type: "byte", width: 70, align: "center" },
+ { field: "id", title: "Id", type: "int", width: 90, hidden: true, readonly: true, require: true, align: "left" },
+ { field: "ipAddress", title: "IP鍦板潃", type: "string", width: 160, align: "left" },
+ { field: "version", title: "鐗堟湰", type: "int", width: 80, align: "left" },
+ { field: "robotRunMode", title: "杩愯妯″紡", type: "int", width: 100, bind: { key: "robotRunMode", data: [{ key: 1, value: "鎵嬪姩妯″紡" }, { key: 2, value: "鑷姩妯″紡" }] }, align: "center" },
+ // { field: "robotControlMode", title: "鎺у埗妯″紡", type: "int", width: 100, bind: { key: "robotControlMode", data: [{ key: 1, value: "瀹㈡埛绔帶鍒�" }, { key: 2, value: "鍏朵粬" }] }, align: "center" },
+ // { field: "robotArmObject", title: "鎵嬭噦鐘舵��", type: "int", width: 90, bind: { key: "robotArmObject", data: [{ key: 0, value: "绌洪棽" }, { key: 1, value: "鏈夌墿鏂�" }] }, align: "center" },
+ { field: "homed", title: "鍥為浂鐘舵��", type: "string", width: 100, align: "center", bind: { key: "homed", data: [{ key: "Homed", value: "鍥為浂" }, { key: "Homing", value: "鍥為浂涓�" }] }, },
+ { field: "currentAction", title: "褰撳墠鍔ㄤ綔", type: "string", width: 100, align: "center", bind: { key: "currentAction", data: [{ key: "Picking", value: "姝e湪鍙栬揣" }, { key: "Putting", value: "姝e湪鏀捐揣" }, { key: "AllPickFinished", value: "鍏ㄩ儴鍙栬揣瀹屾垚" }, { key: "AllPutFinished", value: "鍏ㄩ儴鏀捐揣瀹屾垚" }, { key: "PickFinished", value: "鍙栬揣瀹屾垚" }, { key: "PutFinished", value: "鏀捐揣瀹屾垚" }] }, },
+ // { field: "operStatus", title: "杩愯鐘舵��", type: "string", width: 100, align: "center", hidden: true },
+ { field: "robotTaskTotalNum", title: "浠诲姟鎬绘暟", type: "int", width: 90, align: "center" },
+ { field: "isSplitPallet", title: "鎷嗙洏", type: "byte", width: 60, align: "center", bind: { key: "isTrue", data: [] }, },
+ { field: "isGroupPallet", title: "缁勭洏", type: "byte", width: 60, align: "center", bind: { key: "isTrue", data: [] }, },
+ { field: "isInFakeBatteryMode", title: "鍋囩數鑺�", type: "byte", width: 70, align: "center", bind: { key: "isTrue", data: [] }, },
+ { field: "currentBatchIndex", title: "鎵规", type: "int", width: 60, align: "center" },
+ { field: "changePalletPhase", title: "鎹㈢洏闃舵", type: "int", width: 80, align: "center" },
+ { field: "isScanNG", title: "鎵爜NG", type: "byte", width: 80, align: "center", bind: { key: "isTrue", data: [] }, },
+ { field: "batteryArrived", title: "鐢佃姱鍒颁綅", type: "byte", width: 80, align: "center", bind: { key: "isTrue", data: [] }, },
+ // { field: "isEventSubscribed", title: "宸茶闃�", type: "byte", width: 70, align: "center", bind: { key: "isTrue", data: [] }, },
]);
- const detail = ref({});
+ const detail = ref({
+ cnName: "",
+ table: "",
+ columns: [],
+ sortName: "",
+ key: "",
+ });
return {
table,
--
Gitblit v1.9.3