wanshenmean
14 小时以前 2db17e312a9bf0cff60917104447260b86178ca2
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>
@@ -52,13 +44,13 @@
    // 编辑表单配置
    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: "手动模式" },
@@ -67,7 +59,7 @@
        },
        {
          title: "控制模式",
          field: "RobotControlMode",
          field: "robotControlMode",
          type: "select",
          data: [
            { key: 1, value: "客户端控制" },
@@ -76,7 +68,7 @@
        },
        {
          title: "手臂状态",
          field: "RobotArmObject",
          field: "robotArmObject",
          type: "select",
          data: [
            { key: 0, value: "空闲" },
@@ -85,46 +77,46 @@
        },
      ],
      [
        { title: "回零状态", field: "Homed", type: "string" },
        { title: "当前动作", field: "CurrentAction", type: "string" },
        { 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",
          field: "isSplitPallet",
          type: "checkbox",
        },
        {
          title: "是否组盘",
          field: "IsGroupPallet",
          field: "isGroupPallet",
          type: "checkbox",
        },
        {
          title: "假电芯模式",
          field: "IsInFakeBatteryMode",
          field: "isInFakeBatteryMode",
          type: "checkbox",
        },
      ],
      [
        {
          title: "是否扫码NG",
          field: "IsScanNG",
          field: "isScanNG",
          type: "checkbox",
        },
        {
          title: "电芯是否到位",
          field: "BatteryArrived",
          field: "batteryArrived",
          type: "checkbox",
        },
        {
          title: "消息已订阅",
          field: "IsEventSubscribed",
          field: "isEventSubscribed",
          type: "checkbox",
        },
      ],
@@ -140,34 +132,40 @@
    // 搜索表单配置
    const searchFormOptions = ref([
      [
        { title: "IP地址", field: "IPAddress", type: "string" },
        { title: "当前动作", field: "CurrentAction", type: "string" },
        { title: "运行状态", field: "OperStatus", type: "string" },
        { title: "IP地址", field: "ipAddress", type: "string" },
        { title: "当前动作", field: "currentAction", type: "string" },
        { title: "运行状态", field: "operStatus", type: "string" },
      ],
    ]);
    // 列定义
    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: "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: [{ 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: "正在取货" }, { 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: "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,