quanyawei
2024-01-15 c9fc948cfa3cf91c072a13787aed5cb50fb31669
src/views/reportForm/sensorday.vue
@@ -12,7 +12,10 @@
          style="width: 21rem"
        />
        <div>
          <el-radio-group v-model="select1" style="margin-left: 20px">
          <el-radio-group
            v-model="select1"
            style="margin-left: 20px"
          >
            <el-radio-button label="日报" />
            <el-radio-button label="周报" />
            <el-radio-button label="月报" />
@@ -22,8 +25,8 @@
        <component
          :is="dataType"
          style="padding-left: 0; margin-left: 30px"
          @sendPickerChild="showPickerChild"
          class="select11"
          @sendPickerChild="showPickerChild"
        />
        <el-date-picker
          v-if="dateDisplay"
@@ -37,28 +40,46 @@
        />
        <el-button
          type="primary"
          @click="getReportForm()"
          style="margin-left: 10px"
          >查询</el-button
          @click="getReportForm()"
        >
        <el-button type="primary" @click="exportExcel()">报表导出</el-button>
          查询
        </el-button>
        <el-button
          type="primary"
          @click="exportExcel()"
        >
          报表导出
        </el-button>
      </div>
    </div>
    <div class="topTitle">
      <el-table
        :data="tableData"
        id="exportTabs"
        :data="tableData"
        max-height="730"
        @sort-change="changeTableSort"
        style="width: 100%"
        @sort-change="changeTableSort"
      >
        <el-table-column prop="name" label="站点名称" align="center">
        </el-table-column>
        <el-table-column label="综合指数" align="center">
          <el-table-column prop="composite" label="指数" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          prop="name"
          label="站点名称"
          align="center"
        />
        <el-table-column
          label="综合指数"
          align="center"
        >
          <el-table-column
            prop="composite"
            label="指数"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.composite !== 0 ? scope.row.composite : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column
            label="排名"
@@ -66,93 +87,207 @@
            prop="compositeNum"
            sortable
          >
            <template slot-scope="scope">{{
            <template slot-scope="scope">
              {{
              scope.row.compositeNum !== 0 ? scope.row.compositeNum : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="PM2.5" align="center">
          <el-table-column prop="pm25" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="PM2.5"
          align="center"
        >
          <el-table-column
            prop="pm25"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.pm25 !== 0 ? scope.row.pm25 : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="pm25Num" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="pm25Num"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.pm25Num !== 0 ? scope.row.pm25Num : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="PM10" align="center">
          <el-table-column prop="pm10" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="PM10"
          align="center"
        >
          <el-table-column
            prop="pm10"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.pm10 !== 0 ? scope.row.pm10 : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="pm10Num" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="pm10Num"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.pm10Num !== 0 ? scope.row.pm10Num : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="SO2" align="center">
          <el-table-column prop="so2" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="SO2"
          align="center"
        >
          <el-table-column
            prop="so2"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.so2 !== 0 ? scope.row.so2 : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="so2Num" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="so2Num"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.so2Num !== 0 ? scope.row.so2Num : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="NO2" align="center">
          <el-table-column prop="no2" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="NO2"
          align="center"
        >
          <el-table-column
            prop="no2"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.no2 !== 0 ? scope.row.no2 : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="no2Num" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="no2Num"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.no2Num !== 0 ? scope.row.no2Num : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="CO" align="center">
          <el-table-column prop="co" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="CO"
          align="center"
        >
          <el-table-column
            prop="co"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.co !== 0 ? scope.row.co : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="conum" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="conum"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.conum !== 0 ? scope.row.conum : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="O3" align="center">
          <el-table-column prop="o3" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="O3"
          align="center"
        >
          <el-table-column
            prop="o3"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.o3 !== 0 ? scope.row.o3 : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="o3Num" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="o3Num"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.o3Num !== 0 ? scope.row.o3Num : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="TVOC" align="center">
          <el-table-column prop="tovc" label="浓度" align="center">
            <template slot-scope="scope">{{
        <el-table-column
          label="TVOC"
          align="center"
        >
          <el-table-column
            prop="tovc"
            label="浓度"
            align="center"
          >
            <template slot-scope="scope">
              {{
              scope.row.tovc !== 0 ? scope.row.tovc : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
          <el-table-column label="排名" align="center" prop="tovcnum" sortable>
            <template slot-scope="scope">{{
          <el-table-column
            label="排名"
            align="center"
            prop="tovcnum"
            sortable
          >
            <template slot-scope="scope">
              {{
              scope.row.tovcnum !== 0 ? scope.row.tovcnum : '--'
            }}</template>
              }}
            </template>
          </el-table-column>
        </el-table-column>
      </el-table>
@@ -325,6 +460,7 @@
              label: this.defaultData[i].name,
            })
            this.options[i].children = []
            if (this.defaultData[i].devices) {
            for (let j = 0; j < this.defaultData[i].devices.length; j++) {
              this.options[i].children.push({
                value: [
@@ -335,6 +471,7 @@
              })
            }
          }
          }
        })
        .catch((error) => {
          console.log(error)