quanyawei
2024-06-18 6b7604951f61b7033cc643afe0e4ca67565a1a36
fix: bug修改
3 files modified
253 ■■■■ changed files
src/layout/components/Sidebar/index.vue 8 ●●●● patch | view | raw | blame | history
src/views/UVA/index.vue 241 ●●●● patch | view | raw | blame | history
src/views/statement/index.vue 4 ●●●● patch | view | raw | blame | history
src/layout/components/Sidebar/index.vue
@@ -1,6 +1,9 @@
<template>
  <div :class="{ 'has-logo': showLogo }">
    <logo v-if="showLogo" :collapse="isCollapse" />
    <logo
      v-if="showLogo"
      :collapse="isCollapse"
    />
    <!-- <div class="logo" style="display:flex;background: #0f4567;">
      <img
        style="width: 20px; height: 30px;margin: 8px 0 11px 18px"
@@ -49,10 +52,11 @@
      'sidebar'
    ]),
    sidebar() {
      console.log('左边sidebar', this.$store.state.app.sidebar)
      return this.$store.state.app.sidebar
    },
    routes() {
      // console.log(this.$router.options.routes)
      console.log('左边routes', this.$router.options.routes)
      return this.$router.options.routes
    },
    activeMenu() {
src/views/UVA/index.vue
@@ -19,30 +19,15 @@
            @focus="chooseDate2"
          />
        </div>
        <!-- <el-card class="box-card" style="width: 274px; margin: 13px auto"> -->
        <!-- <div v-else style="height: 180px; width: 274px; overflow-x: hidden">
            <div
              style="
                width: 272px;
                text-align: center;
                height: 180px;
                line-height: 140px;
                font-size: 14px;
                color: #5a5c60;
              "
            >
              无飞行记录
            </div>
          </div> -->
        <!-- </el-card> -->
        <div
          style="width: 274px; margin: 10px auto; border-radius: 8px"
          class="coll"
        >
          <!--accordion 手风琴模式-->
          <el-collapse v-show="shou1 === true" v-loading="loading">
          <el-collapse
            v-show="shou1 === true"
            v-loading="loading"
          >
            <el-collapse-item
              style="text-indent: 2em; position: relative; padding-botton: 10px"
            >
@@ -50,12 +35,11 @@
                <img
                  style="position: absolute; left: 18px"
                  src="../../assets/images/uav/uav.png"
                />
                >
                <span
                  style="display: inline-block; position: absolute; left: 20px"
                >
                  该日期暂无无人机数据</span
                >
                  该日期暂无无人机数据</span>
              </template>
            </el-collapse-item>
          </el-collapse>
@@ -78,12 +62,11 @@
                <img
                  style="position: absolute; left: 18px"
                  src="../../assets/images/uav/uav.png"
                />
                >
                <span
                  style="display: inline-block; position: absolute; left: 20px"
                >
                  {{ item1.name }}</span
                >
                  {{ item1.name }}</span>
              </template>
              <el-scrollbar style="height: 200px; overflow-x: hidden">
                <div
@@ -138,12 +121,23 @@
              <el-radio-button label="03" />
              <el-radio-button label="TVOC" />
            </el-radio-group>
            <div v-if="selecttrue === 2" class="Duo">
            <div
              v-if="selecttrue === 2"
              class="Duo"
            >
              <div class="spantuu">
                <span>无人机飞行高度范围(米): </span>
                <el-input ref="uvas" v-model="tallone" class="inputtu" />
                <el-input
                  ref="uvas"
                  v-model="tallone"
                  class="inputtu"
                />
                --
                <el-input ref="uvas" v-model="talltwo" class="inputtu" />
                <el-input
                  ref="uvas"
                  v-model="talltwo"
                  class="inputtu"
                />
              </div>
              <!-- <el-select v-model="Duovalue" placeholder="其他因子" class="slee">
                <el-option
@@ -155,8 +149,7 @@
                </el-option>
              </el-select> -->
              <div class="spantu">
                <span>图形边长(米): </span
                ><el-input
                <span>图形边长(米): </span><el-input
                  ref="uvas"
                  v-model="uvasize"
                  class="inputtu"
@@ -164,7 +157,11 @@
                  placeholder="请输入内容"
                />
              </div>
              <el-select v-model="Duovalue" placeholder="其他因子" class="slee">
              <el-select
                v-model="Duovalue"
                placeholder="其他因子"
                class="slee"
              >
                <el-option
                  v-for="item in optionsduo"
                  :key="item.code"
@@ -187,8 +184,15 @@
                ></el-input>
              </div> -->
            </div>
            <div v-if="selecttrue === 1" style="margin-left: 10px">
              <el-button type="primary" style="margin-top: 10px" @click="gengD">
            <div
              v-if="selecttrue === 1"
              style="margin-left: 10px"
            >
              <el-button
                type="primary"
                style="margin-top: 10px"
                @click="gengD"
              >
                更多条件
              </el-button>
            </div>
@@ -204,8 +208,18 @@
              >
                6参设定
              </el-button>
              <el-button class="gengD" @click="shou"> 收起 </el-button>
              <el-button type="primary" @click="selectDuo"> 查询 </el-button>
              <el-button
                class="gengD"
                @click="shou"
              >
                收起
              </el-button>
              <el-button
                type="primary"
                @click="selectDuo"
              >
                查询
              </el-button>
            </div>
          </div>
          <!-- <div class="Duo" v-if="selecttrue === 2">
@@ -237,11 +251,45 @@
          </div> -->
        </div>
        <!-- <div v-if="noneData" class="noneData">当前时间没有飞行数据</div> -->
        <div id="map_container" v-loading="loading1" />
        <div
          id="map_container"
          v-loading="loading1"
        />
        <div class="dataParameter">
          <dir class="item">
            <div
              v-for="(item, index) in temMergeDataList"
              v-show="index < 3"
              :key="index"
            >
              <p> {{ item.name }}:{{ item.value }}</p>
            </div>
          </dir>
          <div
            class="item1"
            style="margin-left: 10px;"
          >
            <div
              v-for="(item, index) in temMergeDataList"
              v-show="index > 2"
              :key="index"
            >
              <p> {{ item.name }}:{{ item.value }}</p>
            </div>
          </div>
        </div>
      </el-main>
    </el-container>
    <el-dialog title="6参设定" :visible.sync="dialogFormVisible" width="1000px">
      <el-descriptions title="国控6参" :column="3" border>
    <el-dialog
      title="6参设定"
      :visible.sync="dialogFormVisible"
      width="1000px"
    >
      <el-descriptions
        title="国控6参"
        :column="3"
        border
      >
        <el-descriptions-item
          label="PM2.5 | ug/m³"
          label-class-name="my-label"
@@ -249,11 +297,21 @@
        >
          22
        </el-descriptions-item>
        <el-descriptions-item label="PM10 | ug/m³"> 34 </el-descriptions-item>
        <el-descriptions-item label="SO2 | ug/m³"> 4 </el-descriptions-item>
        <el-descriptions-item label="NO2 | ug/m³"> 16 </el-descriptions-item>
        <el-descriptions-item label="CO | mg/m³"> 0.5 </el-descriptions-item>
        <el-descriptions-item label="O3 | ug/m³"> 149 </el-descriptions-item>
        <el-descriptions-item label="PM10 | ug/m³">
          34
        </el-descriptions-item>
        <el-descriptions-item label="SO2 | ug/m³">
          4
        </el-descriptions-item>
        <el-descriptions-item label="NO2 | ug/m³">
          16
        </el-descriptions-item>
        <el-descriptions-item label="CO | mg/m³">
          0.5
        </el-descriptions-item>
        <el-descriptions-item label="O3 | ug/m³">
          149
        </el-descriptions-item>
      </el-descriptions>
      <!-- <el-descriptions title="设备标准值"  border>
      </el-descriptions> -->
@@ -269,44 +327,81 @@
      >
        设备标准值
      </div>
      <el-table :data="sensorTableData" border>
        <el-table-column prop="sensorName" label="名称" />
        <el-table-column prop="unit" label="单位" />
      <el-table
        :data="sensorTableData"
        border
      >
        <el-table-column
          prop="sensorName"
          label="名称"
        />
        <el-table-column
          prop="unit"
          label="单位"
        />
        <el-table-column label="一级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab1" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab1"
              placeholder="请输入内容"
            />
            <!-- <span v-show="!scope.row.show">{{ scope.row.tab1 }}</span> -->
          </template>
        </el-table-column>
        <el-table-column label="二级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab2" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab2"
              placeholder="请输入内容"
            />
          </template>
        </el-table-column>
        <el-table-column label="三级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab3" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab3"
              placeholder="请输入内容"
            />
          </template>
        </el-table-column>
        <el-table-column label="四级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab4" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab4"
              placeholder="请输入内容"
            />
          </template>
        </el-table-column>
        <el-table-column label="五级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab5" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab5"
              placeholder="请输入内容"
            />
          </template>
        </el-table-column>
        <el-table-column label="六级">
          <template slot-scope="scope">
            <el-input v-model="scope.row.tab6" placeholder="请输入内容" />
            <el-input
              v-model="scope.row.tab6"
              placeholder="请输入内容"
            />
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false"> 取 消 </el-button>
        <el-button type="primary" @click="customLevel"> 确 定 </el-button>
      <div
        slot="footer"
        class="dialog-footer"
      >
        <el-button @click="dialogFormVisible = false">
          取 消
        </el-button>
        <el-button
          type="primary"
          @click="customLevel"
        >
          确 定
        </el-button>
      </div>
    </el-dialog>
  </div>
@@ -868,6 +963,7 @@
          tab6: '50000',
        },
      ],
      temMergeDataList: []
    }
  },
  watch: {
@@ -1230,9 +1326,29 @@
        }
      })
    },
    initDataParams (res) {
      let options = {TemMergeAvg: '合并范围均值', TemMergedHighest: '合并范围最高值', TemMergedLowest: '合并范围最低值', TemNotMergedAvg: '未合并范围均值', TemNotMergedHighest: '未合并范围最高值', TemNotMergedLowest: '未合并范围最低值'}
      let optionKeys = Object.keys(options)
      this.temMergeDataList = optionKeys.reduce((acc, key) => {
        // 使用正则表达式匹配data对象的键
        let regex = new RegExp(key, 'i')
        let matchedDataKey = Object.keys(res).find(k => regex.test(k))
        if (matchedDataKey) {
          acc.push({
            name: options[key],
            value: res[matchedDataKey]
          })
        }
        return acc
      }, [])
      console.log(this.temMergeDataList)
    },
    initStart(res) {
      console.log('res', res)
      this.abc += 1
      const that = this
      if (res) this.initDataParams(res[0])
      if (!res) {
        that.map = new BMapGL.Map('map_container')
        console.log('BMapGL', BMapGL)
@@ -2271,6 +2387,20 @@
.el-scrollbar__wrap {
  overflow-x: hidden;
}
.dataParameter{
  background-color: rgba(192, 192, 192, 0.4);
  position: absolute;
  bottom: 0px;
  padding: 10px;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  .item{
    margin: 0px;
    padding: 0px;
  }
}
</style>
<style >
.jlpMySelectPopper.el-picker-panel {
@@ -2294,4 +2424,5 @@
  z-index: 999;
  background-color: #f40;
}
</style>
src/views/statement/index.vue
@@ -31,6 +31,7 @@
          <el-table
            :data="tableData"
            style="width: 100%"
            max-height="600"
            @row-click="rowClick"
          >
            <el-table-column
@@ -442,4 +443,7 @@
  align-items: center;
  padding: 10px;
}
.pagina{
  margin-top: 10px;
}
</style>