1.用import异常图标
2.修改飞行巡检的时间格式
3.修改了部分网络请求为api函数形式
已修改6个文件
已删除1个文件
已重命名1个文件
2044 ■■■■■ 文件已修改
src/api/exceptionApi.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/sfc/ExceptionType.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/sfc/InputSearch.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exception/FlightInspection.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exception/components/CompFlightInspection.vue 129 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exception/components/SubFlightInspection.vue 1852 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/risk_assessment/components/SiteDetail.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/exceptionApi.js
@@ -63,7 +63,11 @@
  },
  
/**
 * èŽ·å–æ‰€æœ‰çš„ç‚¹ä½åç§°å’Œå¯¹åº”çš„è®¾å¤‡ç¼–å·
 * @param:
 * @returns:
 */
  getSitesNum() {
    return $http.get('/dust/sitename')
  },
@@ -79,5 +83,16 @@
      params.exceptionType = temp
    }
    return $http.get('/dust/exceptionsSiteName', { params: params })
  },
  /**
   * æŸ¥è¯¢ä¸åŒçš„异常类型
   * @param:
   * @returns:
   */
  queryExceptionType(){
    return $http.get('/dust/exceptiontype')
  }
  ,
}
src/api/index.js
@@ -1,9 +1,9 @@
import axios from 'axios';
import { setInterceptors } from './config';
const url = 'http://localhost:8081/';
// const url = 'http://localhost:8081/';
// éƒ¨ç½²
// const url = 'http://114.215.109.124:8803/';
const url = 'http://114.215.109.124:8803/';
// const url = 'http://192.168.1.8:8081/';
//飞羽监管
src/sfc/ExceptionType.vue
@@ -8,6 +8,7 @@
-->
<script>
import exceptionApi from '@/api/exceptionApi.js'
export default {
  props: {
    // ç¦ç”¨
@@ -37,7 +38,6 @@
  mounted() {
    this.$watch(() => [this.exception], () => {
      if (this.exception != -1) {
        console.log('异常类型:',this.exception)
        this.checkedList.push(this.exception) 
      }
      
@@ -47,19 +47,23 @@
  methods: {
    // èŽ·å–ä¸åŒçš„å¼‚å¸¸åç§°
    getExceptionType() {
      this.$http.get('/dust/exceptiontype').then((response) => {
        // this.exceptionType = response.data.data
        response.data.data.forEach((item) => {
          this.exceptionType.push(item.exceptionType)
        })
        // console.log('获取到的异常类型:',this.exceptionType);
      // exceptionApi.queryExceptionType().then((response) => {
      //   response.data.data.forEach((item) => {
      //     this.exceptionType.push(item.exceptionType)
      //   })
      //   let a = ['0', '1', '2', '3', '4', '5', '6', '7','8']
      //   a.forEach((item) => {
      //     if (this.exceptionType.indexOf(item) == -1) {
      //       this.exceptionType.push(item)
      //     }
      //   })
      // })
        let a = ['0', '1', '2', '3', '4', '5', '6', '7','8']
        a.forEach((item) => {
          if (this.exceptionType.indexOf(item) == -1) {
            this.exceptionType.push(item)
          }
        })
      })
    },
    handleCheckAllChange(val) {
      this.checkedList = val ? this.exceptionType : []
src/sfc/InputSearch.vue
@@ -138,7 +138,7 @@
        })
    }else if(this.isNeedRealTimeAdvice == '0'){
      this.$http.get('/dust/sitename').then((response) => {
      exceptionApi.getSitesNum().then((response) => {
        const sites = response.data.data
        sites.filter((item) => {
          this.siteNames.push(item['name'])
src/views/exception/FlightInspection.vue
@@ -1,12 +1,12 @@
<script>
  import FlightInspection1 from '@/views/exception/components/FlightInspection1.vue'
  import CompFlightInspection from '@/views/exception/components/CompFlightInspection.vue'
  export default {
    components: {
    FlightInspection1
      CompFlightInspection
  },
    data() {
      return{
      }
    },
    mounted() {
@@ -19,7 +19,7 @@
</script>
<template>
  <FlightInspection1  :show-all="true"> </FlightInspection1>
  <CompFlightInspection  :show-all="true"> </CompFlightInspection>
</template>
<style  scoped>
src/views/exception/components/CompFlightInspection.vue
ÎļþÃû´Ó src/views/exception/components/FlightInspection1.vue ÐÞ¸Ä
@@ -5,6 +5,7 @@
import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'
import ButtonClick from '@/sfc/ButtonClick.vue'
import index from '@/utils/exception_common_function/index.js'
//  å¼‚常图形异步组件
const DustLineChart = defineAsyncComponent(() =>  import('@/views/exception/components/DustLineChart.vue'))
import exceptionApi from '@/api/exceptionApi.js'
@@ -17,6 +18,14 @@
import time from '@/utils/time.js'
import lineChart from '@/utils/chartFunction/lineChart.js'
import exceptionOption from '@/utils/chartFunction/exceptionOption.js'
import exception0 from '@/assets/exception/exception0.png'
import exception1 from '@/assets/exception/exception1.png'
import exception2 from '@/assets/exception/exception2.png'
import exception3 from '@/assets/exception/exception3.png'
import exception4 from '@/assets/exception/exception4.png'
import exception5 from '@/assets/exception/exception5.png'
import exception6 from '@/assets/exception/exception6.png'
import exception7 from '@/assets/exception/exception7.png'
export default {
  props: {
    // ç‚¹ä½åå­—
@@ -219,8 +228,8 @@
        this.getShopNames()
    },
    month(){
        this.beginTime = dayjs(this.month).startOf('month')
        this.endTime = dayjs(this.month).endOf('month')
        this.beginTime = dayjs(this.month).startOf('month').format('YYYY-MM-DD HH:mm:ss')
        this.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss')
        this.backExceptionDataAWeekAgo()
        this.getShopNames()
    }
@@ -277,7 +286,7 @@
          siteName: this.exception.exception4,
          exceptionType: '4',
          exceptionName: '量级突变',
          iconSrc: '../../../assets/exception/exception4.png',
          iconSrc: exception4,
          siteNum: this.exception.exception4.length,
          exceptionNum: this.exception.exception4Num,
          isNoDataStatus: this.isNoData.exception4,
@@ -287,17 +296,27 @@
          siteName: this.exception.exception5,
          exceptionType: '5',
          exceptionName: '临近超标异常',
          iconSrc: '@/assets/exception/exception5.png',
          iconSrc: exception5,
          siteNum: this.exception.exception5.length,
          exceptionNum: this.exception.exception5Num,
          isNoDataStatus: this.isNoData.exception5,
          span: 5
        },
        {
          siteName: this.exception.exception8,
          exceptionType: '8',
          exceptionName: '有效率异常',
          iconSrc: exception0,
          siteNum: this.exception.exception8.length,
          exceptionNum: this.exception.exception8Num,
          isNoDataStatus: this.isNoData.exception8,
          span: 5
        },
        {
          siteName: this.exception.exception6,
          exceptionType: '6',
          exceptionName: '单日超标次数临界异常',
          iconSrc: '@/assets/exception/exception6.png',
          iconSrc: exception6,
          siteNum: this.exception.exception6.length,
          exceptionNum: this.exception.exception6Num,
          isNoDataStatus: this.isNoData.exception6,
@@ -308,27 +327,27 @@
          siteName: this.exception.exception7,
          exceptionType: '7',
          exceptionName: '变化趋势异常',
          iconSrc: '@/assets/exception/exception7.png',
          iconSrc: exception7,
          siteNum: this.exception.exception7.length,
          exceptionNum: this.exception.exception7Num,
          isNoDataStatus: this.isNoData.exception7,
          span: 5
          span: 4
        },
        {
          siteName: this.exception.exception0,
          exceptionType: '0',
          exceptionName: '数据缺失异常',
          iconSrc: '@/assets/exception/exception0.png',
          iconSrc: exception0,
          siteNum: this.exception.exception0.length,
          exceptionNum: this.exception.exception0Num,
          isNoDataStatus: this.isNoData.exception0,
          span: 4
          span: 6
        },
        {
          siteName: this.exception.exception1,
          exceptionType: '1',
          exceptionName: '数据超低',
          iconSrc: '@/assets/exception/exception1.png',
          iconSrc: exception1,
          siteNum: this.exception.exception1.length,
          exceptionNum: this.exception.exception1Num,
          isNoDataStatus: this.isNoData.exception1,
@@ -338,7 +357,7 @@
          siteName: this.exception.exception2,
          exceptionType: '2',
          exceptionName: '超标',
          iconSrc: '@/assets/exception/exception2.png',
          iconSrc: exception2,
          siteNum: this.exception.exception2.length,
          exceptionNum: this.exception.exception2Num,
          isNoDataStatus: this.isNoData.exception2,
@@ -348,92 +367,17 @@
          siteName: this.exception.exception3,
          exceptionType: '3',
          exceptionName: '数据长时段无波动',
          iconSrc: '@/assets/exception/exception3.png',
          iconSrc: exception3,
          siteNum: this.exception.exception3.length,
          exceptionNum: this.exception.exception3Num,
          isNoDataStatus: this.isNoData.exception3,
          span: 6
        },
        {
          siteName: this.exception.exception8,
          exceptionType: '8',
          exceptionName: '有效率异常',
          iconSrc: '@/assets/exception/exception3.png',
          siteNum: this.exception.exception8.length,
          exceptionNum: this.exception.exception8Num,
          isNoDataStatus: this.isNoData.exception8,
          span: 6
        }
      ]
    },
    cardRow2() {
      return [
        {
          siteName: this.exception.exception7,
          exceptionType: '7',
          exceptionName: '变化趋势异常',
          iconSrc: '@/assets/exception/exception7.png',
          siteNum: this.exception.exception7.length,
          exceptionNum: this.exception.exception7Num,
          isNoDataStatus: this.isNoData.exception7
        },
        {
          siteName: this.exception.exception0,
          exceptionType: '0',
          exceptionName: '数据缺失异常',
          iconSrc: '@/assets/exception/exception0.png',
          siteNum: this.exception.exception0.length,
          exceptionNum: this.exception.exception0Num,
          isNoDataStatus: this.isNoData.exception0
        },
        {
          siteName: this.exception.exception1,
          exceptionType: '1',
          exceptionName: '数据超低',
          iconSrc: '@/assets/exception/exception1.png',
          siteNum: this.exception.exception1.length,
          exceptionNum: this.exception.exception1Num,
          isNoDataStatus: this.isNoData.exception1
        }
      ]
    },
    cardRow3() {
      return [
        {
          siteName: this.exception.exception2,
          exceptionType: '2',
          exceptionName: '超标',
          iconSrc: '@/assets/exception/exception2.png',
          siteNum: this.exception.exception2.length,
          exceptionNum: this.exception.exception2Num,
          isNoDataStatus: this.isNoData.exception2
        },
        {
          siteName: this.exception.exception3,
          exceptionType: '3',
          exceptionName: '数据长时段无波动',
          iconSrc: '@/assets/exception/exception3.png',
          siteNum: this.exception.exception3.length,
          exceptionNum: this.exception.exception3Num,
          isNoDataStatus: this.isNoData.exception3
        },
        {
          siteName: this.exception.exception8,
          exceptionType: '8',
          exceptionName: '有效率异常',
          iconSrc: '@/assets/exception/exception3.png',
          siteNum: this.exception.exception8.length,
          exceptionNum: this.exception.exception8Num,
          isNoDataStatus: this.isNoData.exception8
        }
      ]
    }
  },
  mounted() {
    // this.backExceptionDataAWeekAgo()
    // æŸ¥è¯¢æ—¶é—´æ®µçš„各异常的站点,查询该时间区间的各异常数量
    // this.getShopNames()
    this.getSiteNume()
  },
@@ -916,9 +860,6 @@
      if (this.siteName) {
        params['siteName'] = this.siteName
      }
      if (this.form.exceptionName.length != 0) {
        params['exceptionType'] = this.form.exceptionName.join()
      }
      if (this.form.street.length != 0) {
        params['street'] = this.form.street.join()
      }
@@ -955,22 +896,22 @@
      if (this.siteName) {
        params['siteName'] = this.siteName
      }
      if (this.form.exceptionName) {
        params['exceptionType'] = this.form.exceptionName
      }
      params['beginTime'] = this.beginTime
      params['endTime'] = this.endTime
      console.log('name',this.siteName)
      this.$http.get('/dust/exceptiondata', { params: params }).then((response) => {
        // ä¿å­˜è¿”回的
        // this.tableData = response.data.data.rows;
        this.displayData = response.data.data.rows
        this.loading.tableLoading = false
        if (response.data.data.total == 0) {
          ElMessage('该时段无数据')
          this.isTableShow = false
          return
        }
        this.isTableShow = true
        this.total = response.data.data.total
      })
src/views/exception/components/SubFlightInspection.vue
ÎļþÒÑɾ³ý
src/views/risk_assessment/components/SiteDetail.vue
@@ -1,9 +1,9 @@
<!--点击站点 è·³è½¬è‡³é£Žé™©æ¨¡åž‹é¡µé¢  -->
<script>
import FlightInspection1 from '@/views/exception/components/FlightInspection1.vue'
import CompFlightInspection from '@/views/exception/components/CompFlightInspection.vue'
export default {
  components: {
    FlightInspection1
    CompFlightInspection
  },
  data() {
    return {
@@ -21,7 +21,6 @@
      vm.siteName = to.params.siteName
      vm.month = to.params.month
      vm.$nextTick(()  =>  {
      //  console.log('midd11',  vm.siteName,  vm.month);
     })
    })
  },
@@ -41,7 +40,8 @@
    </template>
  </el-page-header>
  <FlightInspection1 :site-name="siteName" :month="month" :show-all="false"> </FlightInspection1>
  <CompFlightInspection :site-name="siteName" :month="month" :show-all="false"> </CompFlightInspection>
</template>
<style scoped>