#
Junjie
4 天以前 d16c9af7bb89a7e3abb4071003c63b3a6f6b9e4b
src/main/webapp/components/DevpCard.js
@@ -27,12 +27,18 @@
            <span class="mc-field-label">工作号</span>
            <input class="mc-input" v-model="controlParam.taskNo" placeholder="输入工作号" />
          </label>
          <label class="mc-field">
            <span class="mc-field-label">slotIdx</span>
            <input class="mc-input" v-model="controlParam.slotIdx" placeholder="输入缓存索引" />
          </label>
          <label class="mc-field mc-span-2">
            <span class="mc-field-label">目标站</span>
            <input class="mc-input" v-model="controlParam.targetStationId" placeholder="输入目标站号" />
          </label>
          <div class="mc-action-row">
            <button type="button" class="mc-btn" @click="controlCommand">下发</button>
            <button type="button" class="mc-btn mc-btn-soft" @click="clearPathByTaskNoCommand">工作号清路径</button>
            <button type="button" class="mc-btn mc-btn-soft" @click="clearPathBySlotCommand">站点清路径</button>
            <button type="button" class="mc-btn mc-btn-soft" @click="resetCommand">复位</button>
            <button type="button" class="mc-btn mc-btn-ghost" @click="openStationTracePage">运行轨迹</button>
            <button v-if="showFakeTraceEntry" type="button" class="mc-btn mc-btn-ghost" @click="openFakeTracePage">仿真轨迹</button>
@@ -114,6 +120,7 @@
      controlParam: {
        stationId: "",
        taskNo: "",
        slotIdx: "",
        targetStationId: ""
      },
      barcodePreviewCache: {},
@@ -174,6 +181,15 @@
  methods: {
    orDash: function (value) {
      return MonitorCardKit.orDash(value);
    },
    formatIoMode: function (value) {
      if (value === 1 || value === "1") {
        return "入库";
      }
      if (value === 2 || value === "2") {
        return "出库";
      }
      return "--";
    },
    getStatusLabel: function (item) {
      return item && item.autoing ? "自动" : "手动";
@@ -264,6 +280,7 @@
        { label: "工作号", value: this.orDash(item.taskNo) },
        { label: "目标站", value: this.orDash(item.targetStaNo) },
        { label: "模式", value: item.autoing ? "自动" : "手动" },
        { label: "出入库模式", value: this.formatIoMode(item.ioMode) },
        { label: "有物", value: MonitorCardKit.yesNo(item.loading) },
        { label: "可入", value: MonitorCardKit.yesNo(item.inEnable) },
        { label: "可出", value: MonitorCardKit.yesNo(item.outEnable) },
@@ -271,6 +288,7 @@
        { label: "满板信号", value: MonitorCardKit.yesNo(item.fullPlt) },
        { label: "运行阻塞", value: MonitorCardKit.yesNo(item.runBlock) },
        { label: "启动入库", value: MonitorCardKit.yesNo(item.enableIn) },
        { label: "入库条码站异常", value: MonitorCardKit.yesNo(item.inBarcodeError) },
        { label: "托盘高度", value: this.orDash(item.palletHeight) },
        { label: "条码", value: this.orDash(item.barcode), code: true, type: "barcode" },
        { label: "重量", value: this.orDash(item.weight) },
@@ -484,6 +502,12 @@
    controlCommand: function () {
      this.postControl("/station/command/move", this.controlParam);
    },
    clearPathByTaskNoCommand: function () {
      this.postControl("/station/command/clearPath", this.controlParam);
    },
    clearPathBySlotCommand: function () {
      this.postControl("/station/command/clearPathBySlot", this.controlParam);
    },
    resetCommand: function () {
      this.postControl("/station/command/reset", this.controlParam);
    }