jinglun-cloud
2 天以前 53aad5698fb113201e79b5cca981bdfb13d23d97
src/main/webapp/static/js/basMap/editor.js
@@ -2108,13 +2108,13 @@
          barCodeStart: 0,
          barCodeEnd: 100000,
          deviceList: [
            {
              valueKey: '',
              deviceNo: '',
              progress: 0,
              deviceLength: '',
              deviceWidth: ''
            }
            // {
            //   valueKey: '',
            //   deviceNo: '',
            //   progress: 0,
            //   deviceLength: '',
            //   deviceWidth: ''
            // }
          ]
        };
      },
@@ -2176,11 +2176,11 @@
      },
      getDeviceLengthPlaceholder: function () {
        var box = this.getAutoTrackDeviceBox();
        return box && box.along ? '默认: ' + box.along : '';
        return box && box.along ? '参考: ' + box.along : '';
      },
      getDeviceWidthPlaceholder: function () {
        var box = this.getAutoTrackDeviceBox();
        return box && box.across ? '默认: ' + box.across : '';
        return box && box.across ? '参考: ' + box.across : '';
      },
      loadDeviceForm: function (type, value) {
        this.resetDeviceForm();
@@ -2193,13 +2193,13 @@
          barCodeStart: 0,
          barCodeEnd: 100000,
          deviceList: [
            {
              valueKey: '',
              deviceNo: '',
              progress: 0,
              deviceLength: '',
              deviceWidth: ''
            }
            // {
            //   valueKey: '',
            //   deviceNo: '',
            //   progress: 0,
            //   deviceLength: '',
            //   deviceWidth: ''
            // }
          ],
          ...json
        };
@@ -2326,12 +2326,13 @@
        });
      },
      addDeviceForm: function () {
        const defaultDeviceBox = this.getAutoTrackDeviceBox();
        this.deviceForm.deviceList.push({
          valueKey: '',
          deviceNo: '',
          progress: 0,
          deviceLength: '',
          deviceWidth: ''
          deviceLength: "",
          deviceWidth: ""
        });
      },
      applyDeviceForm: function () {
@@ -2348,7 +2349,7 @@
        if (
          !this.deviceForm.deviceList ||
          this.deviceForm.deviceList.length === 0 ||
          this.deviceForm.deviceList.some((item) => item.deviceNo === '')
          this.deviceForm.deviceList.some((item) => item.deviceNo === '' || item.deviceLength === '' || item.deviceWidth === '')
        ) {
          this.showMessage('warning', '设备列表不能为空');
          return;
@@ -2361,19 +2362,6 @@
          delete payload.rgvNo;
          self.deviceForm.deviceList.forEach((item) => {
            item.valueKey = valueKey;
            // 允许通过属性面板覆盖默认设备像素尺寸(沿轨道/垂直轨道)
            var deviceLength = toInt(item.deviceLength, 0);
            var deviceWidth = toInt(item.deviceWidth, 0);
            if (deviceLength > 0) {
              item.deviceLength = String(deviceLength);
            } else {
              delete item.deviceLength;
            }
            if (deviceWidth > 0) {
              item.deviceWidth = String(deviceWidth);
            } else {
              delete item.deviceWidth;
            }
          });
          self.deviceForm.trackId = String(trackId);
          self.deviceForm.barCodeStart = toInt(self.deviceForm.barCodeStart, 0);
@@ -4595,11 +4583,11 @@
              newElement.value = JSON.stringify({
                trackId: this.getNextDeviceTrackId(null),
                deviceList: [
                  {
                    valueKey: '',
                    deviceNo: '',
                    progress: 0
                  }
                  // {
                  //   valueKey: '',
                  //   deviceNo: '',
                  //   progress: 0
                  // }
                ]
              });
            }