zhouwx
2025-06-16 bdd99a4f6edb84d8eebe6afc38c2c2f86fb4a52c
src/views/monitorData/gasData/index.vue
@@ -11,8 +11,9 @@
                range-separator="~"
                start-placeholder="开始时间"
                end-placeholder="结束时间"
                @change = "chooseTime"
            />
            <!--                @change = "chooseTime"-->
          </el-form-item>
          <el-form-item label="气体:">
            <el-select
@@ -57,7 +58,7 @@
          </vue3-json-excel>
        </el-form>
      </div>
      <div :id="gasChart" style="height: 500px;width: auto"></div>
      <div :id="gasChart" style="height: 500px;width: auto" v-loading="picLoading"></div>
      <el-table :data="state.tableData.data" style="width: 100%;margin-top: 20px" v-loading="loading">
        <el-table-column type="index" label="序号" width="80" />
        <el-table-column align="center" prop="time" label="采集时间"/>
@@ -178,6 +179,7 @@
  }
}
const loading = ref(false);
const picLoading = ref(false);
const dataZoomEnd = ref();
const xData = ref([]);
const yData = ref([]);
@@ -199,6 +201,7 @@
}
const initInfoData = async () => {
  await exportGasData();
  picLoading.value = true;
  //折线图
  const chartParam = {
    startTime: moment(state.tableData.listQuery.searchParams.time[0]).format('YYYY-MM-DD HH:mm:ss'),
@@ -208,6 +211,7 @@
  }
  let resChart = await gasDataApi().getGasLineChart(chartParam);
  if(resChart.data.code == 100) {
    picLoading.value = false;
    if (resChart.data.data) {
      xData.value = resChart.data.data.map((item: any) => {
        return item.time;