| | |
| | | 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: "运行模式", |
| | |
| | | { 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: "正在回零" }, |
| | | ] |
| | | }, |
| | | { |
| | | title: "手臂状态", |
| | | field: "robotArmObject", |
| | | type: "select", |
| | | title: "当前动作", field: "currentAction", type: "select", |
| | | data: [ |
| | | { key: 0, value: "空闲" }, |
| | | { key: 1, value: "有物料" }, |
| | | ], |
| | | { key: "Picking", value: "正在取货" }, |
| | | { key: "Putting", value: "正在放货" }, |
| | | { key: "AllPickFinished", value: "全部取货完成" }, |
| | | { key: "AllPutFinished", value: "全部放货完成" }, |
| | | { key: "PickFinished", value: "取货完成" }, |
| | | { key: "PutFinished", value: "放货完成" }, |
| | | ] |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "回零状态", field: "homed", type: "string" }, |
| | | { title: "当前动作", field: "currentAction", type: "string" }, |
| | | { title: "运行状态", field: "operStatus", type: "string" }, |
| | | // ], |
| | | // [ |
| | | |
| | | // { title: "运行状态", field: "operStatus", type: "string" }, |
| | | ], |
| | | [ |
| | | { title: "任务总数", field: "robotTaskTotalNum", type: "int" }, |
| | |
| | | dataKey: "isTrue", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "消息已订阅", |
| | | field: "isEventSubscribed", |
| | | type: "select", |
| | | dataKey: "isTrue", |
| | | data: [], |
| | | }, |
| | | // { |
| | | // 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: "IP地址", field: "ipAddress", type: "like" }, |
| | | { title: "当前动作", field: "currentAction", type: "string" }, |
| | | { title: "运行状态", field: "operStatus", type: "string" }, |
| | | { |
| | | title: "运行状态", field: "operStatus", type: "select", |
| | | data: [ |
| | | { key: "Picking", value: "正在取货" }, |
| | | { key: "Putting", value: "正在放货" }, |
| | | { 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: "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: "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: "正在取货" }, { key: "Putting", value: "正在放货" }, { key: "AllPickFinished", value: "全部取货完成" }, { key: "AllPutFinished", value: "全部放货完成" }, { key: "PickFinished", value: "取货完成" }, { key: "PutFinished", value: "放货完成" }] }, }, |
| | | { field: "operStatus", title: "运行状态", type: "string", width: 100, align: "center", hidden: true }, |
| | | // { 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: "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: [] }, }, |
| | | { 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({ |