longyvfengyun
2024-08-05 d918b882232c823bd1ac1ef601b89646baac9f90
历史数据清洗功能
2个文件已修改
176 ■■■■ 已修改文件
src/views/dataTest/history.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/js/history.js 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataTest/history.vue
@@ -103,6 +103,12 @@
        </el-select>
      </div>
      <div slot="box-tools" class="box-tools" v-if="showParams">
        <el-button size="mini" type="danger" @click="clearDirtyData"
          >清洗</el-button
        >
        <el-button size="mini" type="primary" @click="recoveryDirtyData"
          >恢复</el-button
        >
        <el-tooltip
          class="item"
          effect="dark"
@@ -525,6 +531,8 @@
  addStandardLine,
  getTestParam,
  exportReport,
  clearDirtyDataAPI,
  recoveryDirtyDataAPI,
} from "./js/history";
import { searchParam as searchParam1 } from "@/views/pageSetting/js/api";
@@ -2508,6 +2516,38 @@
        }
      });
    },
    async clearDirtyData() {
      let testRecord = this.getTestRecord();
      if (testRecord === -1) {
        this.$layer.msg("请选择测试记录");
      } else {
        let res = await clearDirtyDataAPI(
          testRecord.battGroupId,
          testRecord.testRecordCount
        );
        let rs = res.data;
        if (rs.code === 1 && rs.data) {
          this.$layer.msg("清洗成功");
        }
        this.testRecordChange();
      }
    },
    async recoveryDirtyData() {
      let testRecord = this.getTestRecord();
      if (testRecord === -1) {
        this.$layer.msg("请选择测试记录");
      } else {
        let res = await recoveryDirtyDataAPI(
          testRecord.battGroupId,
          testRecord.testRecordCount
        );
        let rs = res.data;
        if (rs.code === 1 && rs.data) {
          this.$layer.msg("恢复成功");
        }
        this.testRecordChange();
      }
    },
    // 添加标准曲线
    confirmAddStandardLine() {
      // 电池信息
src/views/dataTest/js/history.js
@@ -10,18 +10,18 @@
  return axios({
    method: "POST",
    url: "Batttestdata_infAction/searchBattLastHrDataById",
    params
    params,
  });
}
};
/**
 * Batt_param_lowAction_searchAll // 旧
 */
export const searchAll_lowAction = () => {
  return axios({
    method: "GET",
    url: "Batt_param_lowAction/searchAll"
    url: "Batt_param_lowAction/searchAll",
  });
}
};
/**
 * 添加标准曲线
 * Battmon_testcapAction!add // 旧
@@ -29,10 +29,10 @@
export const addStandardLine = (data) => {
  return axios({
    method: "POST",
    url: 'Battmon_testcapAction/add',
    data
    url: "Battmon_testcapAction/add",
    data,
  });
}
};
/**
 * 查询内阻信息
 * Batt_rtdataAction!serchResById // 旧
@@ -42,10 +42,10 @@
    method: "GET",
    url: "Batt_rtdataAction/serchResById",
    params: {
      battGroupId
    }
      battGroupId,
    },
  });
}
};
/**
 * 获取充放电记录
 * Batttestdata_infAction_searchBattTestInfDataById // 旧
@@ -62,9 +62,9 @@
  return axios({
    method: "POST",
    url: "Batttestdata_infAction/searchBattTestInfDataById",
    params
  })
}
    params,
  });
};
/**
 * 查询历史数据
 * BatttestdataAction!findhistory // 旧
@@ -75,9 +75,9 @@
  return axios({
    method: "GET",
    url: "BatttestdataAction/findhistory",
    params
  })
}
    params,
  });
};
/**
 * 历史内阻数据查询
@@ -86,12 +86,12 @@
export const historyResData = (battGroupId) => {
  return axios({
    method: "GET",
    url: 'BattresdataAction/getResInfoByBattGroupId',
    url: "BattresdataAction/getResInfoByBattGroupId",
    params: {
      battGroupId
    }
      battGroupId,
    },
  });
}
};
/**
 * 查询机房名称 落后单体电压等
 * {pageNum, pageSize}
@@ -103,9 +103,9 @@
    method: "POST",
    url: "battTestData/calcTestData",
    params,
    data
  })
}
    data,
  });
};
/**
 * 历史数据管理数据删除
 * BattTest_ResAction!delete // 旧
@@ -120,9 +120,9 @@
  return axios({
    method: "POST",
    url: "battTestData/delete",
    params
  })
}
    params,
  });
};
/**
 * 查询标准曲线
 * Battmon_testcapAction!serchByCondition // 旧
@@ -130,10 +130,10 @@
export const searchStandardLine = (data) => {
  return axios({
    method: "POST",
    url: 'Battmon_testcapAction/testCapList',
    data
    url: "Battmon_testcapAction/testCapList",
    data,
  });
}
};
/**
 * 查询所有的标准曲线
 * {pageNum, pageSize}
@@ -142,10 +142,10 @@
export const searchStandardLines = (params) => {
  return axios({
    method: "GET",
    url: 'battMonStandardCure/page',
    params
    url: "battMonStandardCure/page",
    params,
  });
}
};
/**
 * 查询LD9测试数据列表
 * {battGroupId}
@@ -155,9 +155,9 @@
  return axios({
    method: "GET",
    url: "Ld9testdata_infAction/searchInfList",
    params
    params,
  });
}
};
/**
 * 查询LD9 单体测试数据
@@ -168,9 +168,9 @@
  return axios({
    method: "GET",
    url: "Ld9testdataAction/serchByCondition",
    params
    params,
  });
}
};
/**
 * 查询LD9测试组端数据
@@ -181,9 +181,9 @@
  return axios({
    method: "GET",
    url: "Ld9testdatastopAction/serchByInfo",
    params
    params,
  });
}
};
/**
 * 查询LD9 一次测试中所有单体的实际容量
@@ -194,9 +194,9 @@
  return axios({
    method: "GET",
    url: "Ld9testdatastopAction/serchByCondition",
    params
    params,
  });
}
};
/**
 * 查询LD9 一次测试中所有单体的数据
 * Ld9testdataAction_ld9action_serchLD9AllGroupByTestRecordCount  // 旧
@@ -206,9 +206,9 @@
  return axios({
    method: "POST",
    url: "Ld9testdataAction/getLD9AllGroupByTestRecordCount",
    data
    data,
  });
}
};
/**
 * LD9 上传echart图片
 * Ld9testdataAction_ld9action_filePicUpload // 旧
@@ -218,9 +218,9 @@
  return axios({
    method: "POST",
    url: "Ld9testdataAction/filePicUpload",
    data
    data,
  });
}
};
/**
 * 历史数据查看测试参数
@@ -230,9 +230,9 @@
  return axios({
    method: "GET",
    url: "BattTestparamController/searchBattTestparam",
    params
    params,
  });
}
};
/**
 * 获取电源主合和备合
@@ -248,10 +248,10 @@
    params: {
      pageCurr,
      pageSize,
      powerDeviceId
    }
      powerDeviceId,
    },
  });
}
};
/**
 * 导出数据
@@ -264,7 +264,41 @@
    url: "poIWordExport",
    responseType: "blob",
    params: {
      json: JSON.stringify(data)
      json: JSON.stringify(data),
    },
  });
}
};
/**
 * 清洗数据
 * @param battGroupId 电池组id
 * @param testRecordCount 测试记录
 * @return {AxiosPromise}
 */
export const clearDirtyDataAPI = (battGroupId, testRecordCount) => {
  return axios({
    method: "GET",
    url: "BatttestdataAction/clearTdata",
    params: {
      battGroupId,
      testRecordCount,
    },
  });
};
/**
 * 恢复数据
 * @param battGroupId 电池组id
 * @param testRecordCount 测试记录
 * @return {AxiosPromise}
 */
export const recoveryDirtyDataAPI = (battGroupId, testRecordCount) => {
  return axios({
    method: "GET",
    url: "BatttestdataAction/recoverTdata",
    params: {
      battGroupId,
      testRecordCount,
    },
  });
};