fix
guoshipeng
2023-07-13 6923da6e4a6e5f34d610a6bb70f14f9ffe02cee0
fix
8 files modified
593 ■■■■ changed files
src/components/Wind/Map.vue 5 ●●●●● patch | view | raw | blame | history
src/utils/request.js 1 ●●●● patch | view | raw | blame | history
src/views/Listdata/index.vue 103 ●●●●● patch | view | raw | blame | history
src/views/UVA/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/air/index.vue 433 ●●●●● patch | view | raw | blame | history
src/views/car/index.vue 45 ●●●●● patch | view | raw | blame | history
src/views/charts/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/dailyreport/index.vue 2 ●●● patch | view | raw | blame | history
src/components/Wind/Map.vue
@@ -1368,6 +1368,11 @@
              },
            })
            .then((res) => {
              if (res.message == '操作目标不存在') {
                var datafalse = '暂无五分钟数据'
                this.bindPopup(datafalse).openPopup()
                return
              }
              for (const key in res.data) {
                var tempDecimal = res.data[key]
                  .replace(/[^\d.]/g, '')
src/utils/request.js
@@ -8,6 +8,7 @@
// const baseUrl = 'http://192.168.0.25:8081' // jj
// const baseUrl = 'http://192.168.0.28:8081/'// cjl
// const baseUrl = 'http://192.168.0.11:8081/' // new swb
// const baseUrl = 'http://47.96.171.62:8081/'//测试环境
// const baseUrl = 'http://121.43.179.139:8080'
// const baseUrl = 'http://192.168.0.33:8085/'
// const baseUrl = 'http://192.168.0.33:8081/'
src/views/Listdata/index.vue
@@ -55,10 +55,30 @@
        class="select11"
      />
      <el-button type="primary" @click="toExcel()" style="margin-left: 20px"
      <!-- <el-button type="primary" @click="toExcel()" style="margin-left: 20px"
        >导出</el-button
      > -->
      <!-- <el-dropdown @command="handleCommand">
        <el-button type="primary" @click="toExcel()" style="margin-left: 20px"
          >导出<i class="el-icon-arrow-down el-icon--right"></i
        ></el-button>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item command="expNew">导出(新)</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown> -->
      <el-dropdown
        split-button
        type="primary"
        @click="toExcel()"
        @command="handleCommand"
        style="margin-left: 20px"
      >
      <el-button @click="exportMon">查询</el-button>
        导出
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item command="expNew">导出(新)</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      <el-button @click="exportMon" style="margin-left: 10px">查询</el-button>
    </div>
    <el-table
      :data="dateList"
@@ -75,6 +95,14 @@
        :key="item"
      >
      </el-table-column>
      <!-- <el-table-column
        v-for="item in columnList"
        :prop="item.props"
        :label="item.label"
        width="180px"
        :key="item.label"
      >
      </el-table-column> -->
    </el-table>
  </div>
</template>
@@ -175,9 +203,6 @@
  // 生命周期 - 创建完成(可以访问当前 this 实例)
  created() {
    this.getData()
    // for (let key in this.timess[0]) {
    //   this.columnList.push(key)
    // }
  },
  // 生命周期 - 挂载完成(可以访问 DOM 元素)
  // mounted() {
@@ -192,6 +217,53 @@
  activated() {},
  // 方法集合
  methods: {
    handleCommand(command) {
      if (this.newMac1 == '') {
        this.$message.warning('请选择站点')
        return
      }
      if (this.value == '') {
        this.$message.warning('请选择因子')
        return
      }
      this.dateList = []
      this.columnList = []
      this.$request({
        url: 'monitorPoint/exlOut',
        method: 'post',
        data: {
          macs: this.newMac1,
          sensors: this.value.toString(),
          // startTime: this.timevalue[0],
          // endTime: this.timevalue[1],
          type: this.unit,
          times: this.newData instanceof Array ? this.newData : [this.newData],
        },
        responseType: 'blob',
      }).then((res) => {
        console.log('导出成功', res)
        this.getOutExcel('列表数据导出.xlsx', res)
      })
    },
    getOutExcel(fileName, res) {
      let blob = new Blob([res], { type: 'application/x-xls' })
      if (window.navigator.msSaveOrOpenBlob) {
        //兼容 IE & EDGE
        navigator.msSaveBlob(blob, fileName)
      } else {
        var link = document.createElement('a')
        // 兼容不同浏览器的URL对象
        const url = window.URL || window.webkitURL || window.moxURL
        // 创建下载链接
        link.href = url.createObjectURL(blob)
        //命名下载名称
        link.download = fileName
        //点击触发下载
        link.click()
        //下载完成进行释放
        url.revokeObjectURL(link.href)
      }
    },
    showPickerChild(data) {
      this.newData = data
    },
@@ -251,7 +323,6 @@
        })
    },
    exportMon() {
      console.log(this.timevalue)
      if (this.newMac1 == '') {
        this.$message.warning('请选择站点')
        return
@@ -274,15 +345,31 @@
          times: this.newData instanceof Array ? this.newData : [this.newData],
        },
      }).then((res) => {
        console.log(res, 11)
        //console.log(res, 11)
        this.tableData = res.data
        // console.log(this.tableData, 'this.tableData')
        for (let key in this.tableData[0]) {
          this.columnList.push(key)
        }
        for (let item of this.tableData) {
          this.dateList.push(item)
        }
        // this.tableData = res.data
        // for (let key in this.tableData[0]) {
        //   let prop = key
        //   if (String(key).indexOf('.') > -1) {
        //     prop = key.replace(/\./g, '')
        //   }
        //   this.columnList.push({ label: key, props: prop })
        // }
        // for (let item of this.tableData) {
        //   for (let key in this.tableData[0]) {
        //     if (String(key).indexOf('.') > -1) {
        //       let newKey = key.replace(/\./g, '')
        //       item[newKey] = item[key]
        //     }
        //   }
        //   this.dateList.push(item)
        // }
      })
    },
    toExcel() {
src/views/UVA/index.vue
@@ -21,7 +21,7 @@
                  margin-left: 10px;
                "
                >无人机飞行日期</span
              >
              >zzzz
            </div>
          </div>
          <el-scrollbar
@@ -1687,3 +1687,4 @@
  font-family: '微软雅黑';
}
</style>
src/views/air/index.vue
@@ -8,7 +8,8 @@
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
@@ -17,7 +18,8 @@
          style="margin-right: 5%"
          align="right"
          type="date"
          placeholder="选择日期">
        placeholder="选择日期"
      >
      </el-date-picker>
      <el-upload
          v-if="value==='gx'"
@@ -31,9 +33,14 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        <div slot="tip" class="el-upload__tip" v-if="value==='gx'">上传四国控及市区均值</div>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip" v-if="value === 'gx'">
          上传四国控及市区均值
        </div>
        <div slot="tip" class="el-upload__tip" v-else></div>
      </el-upload>
      <el-upload
@@ -48,9 +55,14 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        <div slot="tip" class="el-upload__tip" v-if="value==='gx'">上传乡镇街道日数据</div>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip" v-if="value === 'gx'">
          上传乡镇街道日数据
        </div>
        <div slot="tip" class="el-upload__tip" v-else></div>
      </el-upload>
      <el-upload
@@ -65,9 +77,14 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        <div slot="tip" class="el-upload__tip" v-if="value==='gx'">上传乡镇街道月累计</div>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip" v-if="value === 'gx'">
          上传乡镇街道月累计
        </div>
        <div slot="tip" class="el-upload__tip" v-else></div>
      </el-upload>
      <el-upload
@@ -82,9 +99,14 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        <div slot="tip" class="el-upload__tip" v-if="value==='gx'">上传乡镇街道改善数据</div>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip" v-if="value === 'gx'">
          上传乡镇街道改善数据
        </div>
        <div slot="tip" class="el-upload__tip" v-else></div>
      </el-upload>
      <el-upload
@@ -99,9 +121,14 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        <div slot="tip" class="el-upload__tip" v-if="value==='gx'">上传国控改善数据</div>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip" v-if="value === 'gx'">
          上传国控改善数据
        </div>
        <div slot="tip" class="el-upload__tip" v-else></div>
      </el-upload>
      <el-upload
@@ -116,8 +143,11 @@
          :limit="1"
          :on-exceed="handleExceed"
          multiple
          :auto-upload="false">
        <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
        :auto-upload="false"
      >
        <el-button slot="trigger" type="primary" size="small"
          >选取文件</el-button
        >
        <div slot="tip" class="el-upload__tip">上传餐饮油烟超标数据</div>
      </el-upload>
      <div v-if="value==='hn'" style="position: relative">
@@ -132,11 +162,23 @@
            :limit="1"
            :on-exceed="handleExceed"
            multiple
            :auto-upload="false">
          <el-button slot="trigger" type="primary" size="small">选取文件</el-button>
          <div slot="tip" class="el-upload__tip">请上传国控点位日污染物浓度及AQI文件</div>
          :auto-upload="false"
        >
          <el-button slot="trigger" type="primary" size="small"
            >选取文件</el-button
          >
          <div slot="tip" class="el-upload__tip">
            请上传国控点位日污染物浓度及AQI文件
          </div>
        </el-upload>
        <el-button type="success" @click="submitUpload" :disabled="idDisabled" size="small" style="position: absolute;right: 20%;bottom: -100%">提交文件</el-button>
        <el-button
          type="success"
          @click="submitUpload"
          :disabled="idDisabled"
          size="small"
          style="position: absolute; right: 20%; bottom: -100%"
          >提交文件</el-button
        >
      </div>
<!--      <el-upload
          v-if="value==='gx'"
@@ -155,13 +197,19 @@
        <div slot="tip" class="el-upload__tip">上传数据</div>
      </el-upload>-->
<!--      <div style="position: absolute; bottom: 2%; right: 20%">-->
      <div style="position: absolute; right: 20%;padding-top: 20px;">
        <el-button v-if="value==='gx'" type="success" @click="submitUpload" size="small">提交文件</el-button>
      <div style="position: absolute; right: 20%; padding-top: 20px">
        <el-button
          v-if="value === 'gx'"
          type="success"
          @click="submitUpload"
          size="small"
          >提交文件</el-button
        >
      </div>
    </div>
    <div class="exDown">
      <el-card class="box-card" style="position: relative">
        <div class="block" style="margin-bottom: 30px;">
        <div class="block" style="margin-bottom: 30px">
          <el-date-picker
              v-model="value2"
              type="daterange"
@@ -170,23 +218,29 @@
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :picker-options="pickerOptions">
            :picker-options="pickerOptions"
          >
          </el-date-picker>
          <el-select v-model="valueSelect" clearable placeholder="请选择地区">
            <el-option
                v-for="item in optionsSelect"
                :key="item.valueSelect"
                :label="item.label"
                :value="item.valueSelect">
              :value="item.valueSelect"
            >
            </el-option>
          </el-select>
          <el-button type="primary" @click="selectReport(1)" size="small" class="selectBtn">查询</el-button>
          <el-button
            type="primary"
            @click="selectReport(1)"
            size="small"
            class="selectBtn"
            >查询</el-button
          >
<!--          <el-button type="primary" @click="selectReport" size="small" class="selectBtn">下载多个</el-button>-->
        </div>
        <div style="overflow-y: auto; height: 82%;margin-bottom: 2%;">
          <el-table
              :data="tableData"
              style="width: 100%">
        <div style="overflow-y: auto; height: 82%; margin-bottom: 2%">
          <el-table :data="tableData" style="width: 100%">
            <!--          <el-table-column
                      width="100"
                      align="center">
@@ -202,28 +256,34 @@
                              @change="handleCheckOneChange(scope.row)"></el-checkbox>
                        </template>
                      </el-table-column>-->
            <el-table-column
                prop="name"
                label="报告名称"
            >
            </el-table-column>
            <el-table-column
                prop="time"
                label="提交时间"
            >
            </el-table-column>
            <el-table-column
                prop="date"
                label="创建时间"
            >
            </el-table-column>
            <el-table-column prop="name" label="报告名称"> </el-table-column>
            <el-table-column prop="time" label="提交时间"> </el-table-column>
            <el-table-column prop="date" label="创建时间"> </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-button type="text" size="medium" v-if="valueSelect==='gx'" @click="expReport(scope.row)">下载</el-button>
                <el-button
                  type="text"
                  size="medium"
                  v-if="valueSelect === 'gx'"
                  @click="expReport(scope.row)"
                  >下载</el-button
                >
                <!--导出excel-->
                <img src="../../assets/icon/hn_excel.png" alt="蓝天计划excel" v-if="valueSelect==='hn'" @click="hnExcel(scope.row)" style="margin-left:0; cursor:pointer;">
                <img
                  src="../../assets/icon/hn_excel.png"
                  alt="蓝天计划excel"
                  v-if="valueSelect === 'hn'"
                  @click="hnExcel(scope.row)"
                  style="margin-left: 0; cursor: pointer"
                />
                <!--导出word -->
                              <img src="../../assets/icon/hn_word.png" alt="浑南区环境空气质量报告" v-if="valueSelect==='hn'" @click="hnExpReport(scope.row)" style="cursor:pointer;">
                <img
                  src="../../assets/icon/hn_word.png"
                  alt="浑南区环境空气质量报告"
                  v-if="valueSelect === 'hn'"
                  @click="hnExpReport(scope.row)"
                  style="cursor: pointer"
                />
              </template>
            </el-table-column>
          </el-table>
@@ -236,7 +296,8 @@
              :current-page.sync="currentPage3"
              :page-size="onePageCount"
              layout="total, prev, pager, next, jumper"
              :total="totalNumber">
            :total="totalNumber"
          >
          </el-pagination>
        </div>
      </el-card>
@@ -266,42 +327,47 @@
      file7: null,
      file8: null,
      pickerOptions: {
        shortcuts: [{
        shortcuts: [
          {
          text: '最近一周',
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
            picker.$emit('pick', [start, end])
          }
        }, {
            },
          },
          {
          text: '最近一个月',
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
            picker.$emit('pick', [start, end])
          }
        }, {
            },
          },
          {
          text: '最近三个月',
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
            picker.$emit('pick', [start, end])
          }
        }]
            },
          },
        ],
      },
      value2: [new Date(), new Date()], // 查询报告日期时间
      value3: new Date(), // 提交文件的时间日期
      options: [
        {
          value: 'hn',
          label: '浑南区'
        }, {
          label: '浑南区',
        },
        {
          value: 'gx',
          label: '高新区'
        }
          label: '高新区',
        },
      ],
      value: 'gx', // 地区
      valueSelect: 'gx',
@@ -309,11 +375,12 @@
      optionsSelect: [
        {
          valueSelect: 'hn',
          label: '浑南区'
        }, {
          label: '浑南区',
        },
        {
          valueSelect: 'gx',
          label: '高新区'
        }
          label: '高新区',
        },
      ],
      tableData: [],
      sensorTime: [], // 提交文件的日期
@@ -331,7 +398,7 @@
      currentPage3: 1, // 前往第几页
      totalNumber: 0, // 总条数
      onePageCount: 8, // 一页多少条
      isDisplay: false // 是否显示分页
      isDisplay: false, // 是否显示分页
    }
  },
  watch: {
@@ -342,7 +409,7 @@
    },
    valueSelect(newName, oldName) {
      this.tableData = []
    }
    },
  },
  methods: {
    // 分页
@@ -355,7 +422,10 @@
    },
    // 上传
    handleChange(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
      if (
        file.raw.type !==
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
      ) {
        this.$refs.upload1.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -368,7 +438,10 @@
      this.file1 = fileList[0]
    },
    handleChange2(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
      if (
        file.raw.type !==
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
      ) {
        this.$refs.upload2.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -381,7 +454,10 @@
      this.file2 = fileList[0]
    },
    handleChange3(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
      if (
        file.raw.type !==
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
      ) {
        this.$refs.upload3.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -394,7 +470,10 @@
      this.file3 = fileList[0]
    },
    handleChange4(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
      if (
        file.raw.type !==
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
      ) {
        this.$refs.upload4.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -407,7 +486,10 @@
      this.file4 = fileList[0]
    },
    handleChange5(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
      if (
        file.raw.type !==
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
      ) {
        this.$refs.upload5.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -420,7 +502,11 @@
      this.file5 = fileList[0]
    },
    handleChange6(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' && file.raw.type !== 'application/vnd.ms-excel') {
      if (
        file.raw.type !==
          'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' &&
        file.raw.type !== 'application/vnd.ms-excel'
      ) {
        this.$refs.upload6.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -433,7 +519,11 @@
      this.file6 = fileList[0]
    },
    handleChange7(file, fileList) {
      if (file.raw.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' && file.raw.type !== 'application/vnd.ms-excel') {
      if (
        file.raw.type !==
          'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' &&
        file.raw.type !== 'application/vnd.ms-excel'
      ) {
        this.$refs.upload7.handleRemove(file)
        this.$message.warning(`上传文件格式不符合`)
        return
@@ -446,26 +536,39 @@
      this.file7 = fileList[0]
    },
    handleExceed(files, fileList) {
      this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
      this.$message.warning(
        `当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
          files.length + fileList.length
        } 个文件`
      )
    },
    submitUpload() {
      this.formData2 = []
      if (!this.value3) {
        this.$message({
          message: '请选择时间',
          type: 'warning'
          type: 'warning',
        })
        return
      }
      if (this.value === 'gx') { // 高新区表格导入
      if (this.value === 'gx') {
        // 高新区表格导入
        this.gxSubmit()
      } else { // 浑南区表格导入
      } else {
        // 浑南区表格导入
        this.hnSubmit()
      }
    },
    // 提交高新区表格数据
    gxSubmit() {
      if (this.file1 && this.file2 && this.file3 && this.file4 && this.file5 && this.file6) {
      if (
        this.file1 &&
        this.file2 &&
        this.file3 &&
        this.file4 &&
        this.file5 &&
        this.file6
      ) {
        const formData = new FormData()
        formData.append(`code`, this.value)
        this.sensorTime = this.newTime(this.value3, 'submit')
@@ -482,20 +585,24 @@
        // formData.append(`file7`, this.file7.raw)
        // formData.append(`file8`, this.file8.raw)
        // 后端上传接口
        this.MultipartFile(formData).then(res => {
        this.MultipartFile(formData)
          .then((res) => {
          if (res.code === 0) {
            var reportInfo = res.data
            this.value2 = [this.value3, this.value3]
            reportInfo.name = '高新区空气质量研判总结报告' + reportInfo.time.split('-').join('')
              reportInfo.name =
                '高新区空气质量研判总结报告' +
                reportInfo.time.split('-').join('')
            this.tableData = [reportInfo]
          }
        }).catch(err => {
          })
          .catch((err) => {
          console.log(err)
        })
      } else {
        this.$message({
          message: '提交文件数量不符合',
          type: 'warning'
          type: 'warning',
        })
      }
    },
@@ -511,27 +618,30 @@
        formData.append(`date`, date)
        formData.append(`files`, this.file7.raw)
        // 后端上传接口
        this.MultipartFile(formData).then(res => {
        this.MultipartFile(formData)
          .then((res) => {
          this.idDisabled = false
          if (res.code === 0) {
            this.$message({
              message: '提交成功!',
              type: 'success'
                type: 'success',
            })
            var reportInfo = res.data
            this.value2 = [this.value3, this.value3]
            reportInfo.name = '浑南区报告' + reportInfo.time.split('-').join('')
              reportInfo.name =
                '浑南区报告' + reportInfo.time.split('-').join('')
            this.tableData = [reportInfo]
          } else {
            this.$message.error('提交失败!')
          }
        }).catch(err => {
          })
          .catch((err) => {
          console.log(err)
        })
      } else {
        this.$message({
          message: '提交文件数量不符合',
          type: 'warning'
          type: 'warning',
        })
      }
    },
@@ -543,14 +653,14 @@
          url: '/excel/excelImport',
          method: 'post',
          headers: { 'Content-Type': 'multipart/form-data' }, // 多文件上传这一句必须加
          data
          data,
        })
      } else {
        return this.$request({
          url: '/excel/syExcelImport',
          method: 'post',
          headers: { 'Content-Type': 'multipart/form-data' }, // 多文件上传这一句必须加
          data
          data,
        })
      }
    },
@@ -566,7 +676,7 @@
        return y + '-' + m + '-' + d
      } else {
        var arr = []
        timeArr.map(v => {
        timeArr.map((v) => {
          var date = new Date(v)
          var y = date.getFullYear()
          var m = date.getMonth() + 1
@@ -597,7 +707,7 @@
    handleCheckAllChange(val) {
      // console.info('check all change is ', val)
      this.isIndeterminate = false
      this.tableData.forEach(item => {
      this.tableData.forEach((item) => {
        item.checked = val
        this.dateArr.push(item.date)
      })
@@ -612,7 +722,7 @@
    handleCheckOneChange(obj) {
      // console.info('check one change is ', obj)
      if (obj.checked === false) {
        this.dateArr = this.dateArr.filter(v => {
        this.dateArr = this.dateArr.filter((v) => {
          return v !== obj.date
        })
      } else {
@@ -620,13 +730,14 @@
      }
      var totalCount = this.tableData.length
      let someStatusCount = 0
      this.tableData.forEach(item => {
      this.tableData.forEach((item) => {
        if (item.checked === obj.checked) {
          someStatusCount++
        }
      })
      this.count = someStatusCount
      this.checkAll = totalCount === someStatusCount ? obj.checked : !obj.checked
      this.checkAll =
        totalCount === someStatusCount ? obj.checked : !obj.checked
      this.isIndeterminate = someStatusCount > 0 && someStatusCount < totalCount
    },
    // 高新区报告下载
@@ -635,10 +746,11 @@
        url: '/excel/excelExport',
        method: 'get',
        params: {
          id: obj.id
        }
      }).then(res => {
        console.log(res,'xia');
          id: obj.id,
        },
      })
        .then((res) => {
          console.log(res, 'xia')
        var getData = {}
        getData = res.data
        // 苏州市区放最后
@@ -668,24 +780,46 @@
        if (arr[1].substr(0, 1) === '0') {
          arr[1] = arr[1].substr(1)
        }
        this.airData.currentTime = arr[0] + '年' + arr[1] + '月' + arr[2] + '日'
          this.airData.currentTime =
            arr[0] + '年' + arr[1] + '月' + arr[2] + '日'
        this.airData.currentYear = arr[0]
        var time1DayZero = ''
        var time1MonthZero = ''
        if (res.data.time1.split('年')[1].split('月')[0].substr(0, 1) === '0') {
          time1MonthZero = res.data.time1.split('年')[1].split('月')[0].substr(1)
          if (
            res.data.time1.split('年')[1].split('月')[0].substr(0, 1) === '0'
          ) {
            time1MonthZero = res.data.time1
              .split('年')[1]
              .split('月')[0]
              .substr(1)
        } else {
          time1MonthZero = res.data.time1.split('年')[1].split('月')[0]
        }
        if (res.data.time1.split('月')[1].split('日')[0].substr(0, 1) === '0') {
          time1DayZero = res.data.time1.split('月')[1].split('日')[0].substr(1)
          if (
            res.data.time1.split('月')[1].split('日')[0].substr(0, 1) === '0'
          ) {
            time1DayZero = res.data.time1
              .split('月')[1]
              .split('日')[0]
              .substr(1)
        } else {
          time1DayZero = res.data.time1.split('月')[1].split('日')[0]
        }
        this.airData.time1 = res.data.time1.split('年')[0] + '年' + time1MonthZero + '月' + time1DayZero + '日'
        ExportBriefDataDocx('/airQuality.docx', this.airData, `${obj.name}.docx`)
      }).catch(err => {
          this.airData.time1 =
            res.data.time1.split('年')[0] +
            '年' +
            time1MonthZero +
            '月' +
            time1DayZero +
            '日'
          ExportBriefDataDocx(
            '/airQuality1.docx',
            this.airData,
            `${obj.name}.docx`
          )
        })
        .catch((err) => {
        console.log(err)
      })
    },
@@ -741,10 +875,11 @@
        url: '/excel/hnExcelExport',
        method: 'get',
        params: {
          id: obj.id
          id: obj.id,
          // id: 68
        }
      }).then(res => {
        },
      })
        .then((res) => {
        // console.log(res)
        this.hunNanAirData = res.data
        // currentTime时间
@@ -764,8 +899,13 @@
          day = day.substr(1)
        }
        this.hunNanAirData.day = day
        ExportBriefDataDocx('/hunnan.docx', this.hunNanAirData, `浑南区${arr[1]}月${arr[2]}日环境空气质量报告.docx`)
      }).catch(err => {
          ExportBriefDataDocx(
            '/hunnan.docx',
            this.hunNanAirData,
            `浑南区${arr[1]}月${arr[2]}日环境空气质量报告.docx`
          )
        })
        .catch((err) => {
        console.log(err)
      })
    },
@@ -775,13 +915,30 @@
        url: '/excel/syExcelExport',
        method: 'get',
        params: {
          id: obj.id
        }
      }).then(res => {
        var code2 = res.data.code2.substr(0, 2) + '\n' + res.data.code2.substr(2)
        var code4 = res.data.code4.substr(0, 2) + '\n' + res.data.code4.substr(2)
        var table1Data = [['', '目标值', '进度', '进度', '同比'], ['', '', '', '', ''], ['优良天', '300', res.data.code1, '', code2], ['', '', '', '', ''], ['PM2.5', '41', res.data.code3, '', code4], ['', '', '', '', '']]
        var table3Data = [['', '目标值', '目标值', '进度', '进度'], ['', '目标值', '目标值', '进度', '进度'], ['优良天', '69', '69', res.data.code5, ''], ['', '', '', '', ''], ['PM2.5', '40', '40', res.data.code6, ''], ['', '', '', '', '']]
          id: obj.id,
        },
      })
        .then((res) => {
          var code2 =
            res.data.code2.substr(0, 2) + '\n' + res.data.code2.substr(2)
          var code4 =
            res.data.code4.substr(0, 2) + '\n' + res.data.code4.substr(2)
          var table1Data = [
            ['', '目标值', '进度', '进度', '同比'],
            ['', '', '', '', ''],
            ['优良天', '300', res.data.code1, '', code2],
            ['', '', '', '', ''],
            ['PM2.5', '41', res.data.code3, '', code4],
            ['', '', '', '', ''],
          ]
          var table3Data = [
            ['', '目标值', '目标值', '进度', '进度'],
            ['', '目标值', '目标值', '进度', '进度'],
            ['优良天', '69', '69', res.data.code5, ''],
            ['', '', '', '', ''],
            ['PM2.5', '40', '40', res.data.code6, ''],
            ['', '', '', '', ''],
          ]
        var table2Data = [
          res.data.list.sy1,
          res.data.list.sy2,
@@ -790,13 +947,21 @@
          res.data.list.xxj1,
          res.data.list.xxj2,
          res.data.list.hnq1,
          res.data.list.hnq2
            res.data.list.hnq2,
        ]
        var data = new Date()
        var currentYearData = data.getFullYear()
        var jd = res.data.season
        ExportHunnanExcel(`蓝天计划挂图作战${obj.time.split('-').join('')}`, table1Data, table3Data, table2Data, currentYearData, jd)
      }).catch(err => {
          ExportHunnanExcel(
            `蓝天计划挂图作战${obj.time.split('-').join('')}`,
            table1Data,
            table3Data,
            table2Data,
            currentYearData,
            jd
          )
        })
        .catch((err) => {
        console.log(err)
      })
    },
@@ -815,9 +980,10 @@
          startTime: this.sensorTime2[0],
          endTime: this.sensorTime2[1],
          code: this.valueSelect,
          pageCount: page
        }
      }).then(res => {
          pageCount: page,
        },
      })
        .then((res) => {
        if (res.code === 0) {
          var info = []
          if (this.isDisplay) {
@@ -826,21 +992,24 @@
          } else {
            info = res.data
          }
          info.map(v => {
            info.map((v) => {
            if (this.valueSelect === 'gx') {
              v.name = '高新区空气质量分析报告' + v.time.split('-').join('')
            } else {
              v.name = '浑南区报告' + v.time.split('-').join('')
            }
          })
          info.sort((a, b) => { return b.time.split('-').join('') - a.time.split('-').join('') })
            info.sort((a, b) => {
              return b.time.split('-').join('') - a.time.split('-').join('')
            })
          this.tableData = info
        }
      }).catch(err => {
        })
        .catch((err) => {
        console.log(err)
      })
    }
  }
    },
  },
}
</script>
src/views/car/index.vue
@@ -496,7 +496,7 @@
  components: { index },
  data() {
    return {
      inputnum: 0,
      inputnum: 50,
      tableData: [],
      fileList: [],
      file: '',
@@ -1260,34 +1260,21 @@
              point.a21005 = parseFloat(value.a21005).toFixed(3)
              point.a05024 = parseInt(value.a05024)
              point.a99054 = parseFloat(value.a99054).toFixed(3)
              //   if (
              //     value.dustld - 0 !== 0 &&
              //     value.dustld - 0 < 150 &&
              //     (that.carMac === 'p5dnd7a0243622' ||
              //       that.carMac === 'p5dnd7a0243625')
              //   ) {
              //     point.dustld = 200
              //   } else if (
              //     value.dustld - 0 !== 0 &&
              //     value.dustld - 0 >= 150 &&
              //     value.dustld - 0 <= 180 &&
              //     (that.carMac === 'p5dnd7a0243622' ||
              //       that.carMac === 'p5dnd7a0243625')
              //   ) {
              //     point.dustld = 220
              //   } else if (
              //     value.dustld - 0 !== 0 &&
              //     value.dustld - 0 > 180 &&
              //     value.dustld - 0 <= 200 &&
              //     (that.carMac === 'p5dnd7a0243622' ||
              //       that.carMac === 'p5dnd7a0243625')
              //   ) {
              //     point.dustld = 230
              //   } else {
              //     point.dustld = value.dustld - 0
              //   }
            }
              if (value.dustld - 0 >= 0 && value.dustld - 0 < 40) {
                point.dustld = value.dustld - 0 + 170
              } else if (value.dustld - 0 >= 40 && value.dustld - 0 < 60) {
                point.dustld = value.dustld - 0 + 130
              } else if (value.dustld - 0 >= 60 && value.dustld - 0 < 100) {
                point.dustld = value.dustld - 0 + 110
              } else if (value.dustld - 0 >= 100 && value.dustld - 0 < 150) {
                point.dustld = value.dustld - 0 + 70
              } else if (value.dustld - 0 >= 150 && value.dustld - 0 < 180) {
                point.dustld = value.dustld - 0 + 30
              } else {
            point.dustld = value.dustld - 0
              }
            }
            // point.dustld = value.dustld - 0
            point.times = value.time
            trackPoints.push(point)
          }
@@ -1982,7 +1969,7 @@
      this.$nextTick(()=>{
        this.getStart()
      })
      this.initStart();
      this.initStart()
    },
    changeCode1(index) {
      this.changeColor1 = index
src/views/charts/index.vue
@@ -347,6 +347,7 @@
    },
    // 通过设备号获得因子数据
    getSensor() {
      this.newSensor = []
      // stringMacs.su
      // var newMac = this.newMac[this.newMac.length - 1][this.newMac[this.newMac.length - 1].length - 1]
      // this.newMac1 = this.newMac[this.newMac.length - 1][this.newMac[this.newMac.length - 1].length - 1]
src/views/dailyreport/index.vue
@@ -973,7 +973,7 @@
        } else {
          this.sailingReport.city = '浑南区'
        }
        exportDocx('/sailingReport.docx', this.sailingReport, `${obj.name}.docx`)
        exportDocx('/sailingReport1.docx', this.sailingReport, `${obj.name}.docx`)
      }).catch(err => {
        console.log(err)
      })