riku
2024-03-13 9130536f57daccec183fa203fe2d666667fd42e1
2024.3.13
已修改6个文件
39 ■■■■ 文件已修改
componet/chartutil.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
componet/checkbox.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dataprocesser.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
history.mode.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
httpservice.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
underway.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
componet/chartutil.js
@@ -285,7 +285,7 @@
    const progress = i / (this._xAxis.length - this._size + 1);
    for (const iterator of this._series) {
      if (iterator.name == factorName || (iterator.name == 'TVOC' || factorName == 'VOC')) {
      // if (iterator.name == factorName || (iterator.name == 'TVOC' || factorName == 'VOC')) {
        iterator.markLine = {
          symbol: 'none',
          data: [
@@ -301,9 +301,9 @@
            },
          ],
        };
      } else {
        iterator.markLine = undefined;
      }
      // } else {
      //   iterator.markLine = undefined;
      // }
    }
    this.lineChartOnPage2({
      chart,
componet/checkbox.js
@@ -16,7 +16,7 @@
      label.css('margin-left', '4px')
      // label.css('background-color', 'black')
      // checkbox.css('background-color', 'white')
      checkbox.attr('checked', checked)
      checkbox.prop('checked', checked)
      checkbox.on('click', onclickListener)
      var item = $('<div></div>')
@@ -27,6 +27,19 @@
      item.append(label)
      check.append(item)
    }
  },
  /**
   * 刷新复选框组的选择状态
   * @param {*} elementId
   * @param {*} checkedList
   */
  refreshCheckBox(elementId, checkedList){
    var checkboxList = $(`#${elementId}`).find('input')
    for (let i = 0; i < checkboxList.length; i++) {
      const box = checkboxList[i];
      $(box).prop('checked', checkedList.indexOf(i) != -1)
    }
  },
@@ -47,7 +60,7 @@
      label.css('margin-left', '4px')
      // label.css('background-color', 'black')
      // radiobox.css('background-color', 'white')
      radiobox.attr('checked', checked)
      radiobox.prop('checked', checked)
      radiobox.on('click', onclickListener)
      radioboxlist.push(radiobox)
dataprocesser.js
@@ -18,7 +18,7 @@
    var range = _range == undefined ? DataUtil._hMap.get(type) : _range
    var min = range[0]
    var max = range[1]
    var scale = (DataUtil._hRange[1] - DataUtil._hRange[0]) / (max - min)
    var scale = (max - min == 0) ? 0 : (DataUtil._hRange[1] - DataUtil._hRange[0]) / (max - min)
    var offset = min
    // console.log("height:" + (data - offset) * scale * 10);
    if (data < range[0]) {
history.mode.js
@@ -196,7 +196,7 @@
      this.drawMesh(false, this, this.factorDatas);
    }
    // 折线图选中对应因子
    this.choseOneFactorLineChart(factorType)
    this.choseOneFactorLineChart(factorType);
    // 表格选中对应因子
  },
  setFactorMode: function (factorMode) {
@@ -335,6 +335,10 @@
    this.historyDatas.datas[index].show = true;
    this.historyDatas.physicalQuantity[index].show = true;
    this.lineChartFactorType = [index];
    CheckBox.refreshCheckBox(
      'history_chart_factorbox',
      this.lineChartFactorType
    );
    this.refreshLineChartData();
  },
  // 创建初始折线图
httpservice.js
@@ -1,8 +1,8 @@
var appConfig = {
  baseUrl: "http://114.215.109.124:8805/",
  // baseUrl: "http://114.215.109.124:8805/",
  // baseUrl: "http://47.100.191.150:9029/",
  // baseUrl: "http://localhost:8080/",
  // baseUrl: 'http://192.168.0.138:8084/',
  baseUrl: 'http://192.168.0.138:8084/',
};
var service = {
underway.js
@@ -54,7 +54,7 @@
function onCheckMap(obj) {
  var o = obj.value.split(',');
  var factorType = parseInt(o[0]) - 1;
  var factorType = parseInt(o[0]);
  mapController.setFactorType(factorType, this.factorMode, o[1]);
}