src/views/exception/components/CompFlightInspection.vue
@@ -33,8 +33,8 @@
      type: String,
      default: ''
    },
    // 月份
    month:{
    // 日时间或者月时间
    time:{
        type:String,
        default:''
    },
@@ -42,6 +42,12 @@
    showAll: {
      type: Boolean,
      default: true
    },
    // 0代表日时间,1代表月时间
    timeType:{
      type:Number,
      default:-1
    }
  },
  components: {
@@ -170,7 +176,7 @@
      // 标记位
      flag: {
        // 加载时 上下条按钮不能再点击
        // 数据加载时 上下条按钮不能再点击
        banTouch: 0,
        // 0代表分页,1代表不分页
        originClick: 0
@@ -179,7 +185,6 @@
    }
  },
  setup() {
    // provide('search',readonly(form))
    const { isExceedOneMonth } = useCommonFunction()
    return {
      isExceedOneMonth
@@ -221,17 +226,26 @@
            this.backExceptionDataAWeekAgo()
        }
    },
    siteName(){
        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()
    },
    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()
    // siteName(){
    //   if(this.siteName!=''){
    //     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()
    //   }
    // },
    timeType(){
      if(this.timeType == '0'){
        this.beginTime = dayjs(this.time).format('YYYY-MM-DD 00:00:00')
        this.endTime = dayjs(this.time).format('YYYY-MM-DD 23:59:59')
      }else if(this.timeType == '1'){
        this.beginTime = dayjs(this.time).startOf('month').format('YYYY-MM-DD HH:mm:ss')
        this.endTime = dayjs(this.time).endOf('month').format('YYYY-MM-DD HH:mm:ss')
      }
      this.backExceptionDataAWeekAgo()
      this.getShopNames()
    }
  },
  computed: {
@@ -379,6 +393,12 @@
  mounted() {
    this.getSiteNume()
    // 飞行巡检页面,进去加载
    if(this.showAll == true){
      this.backExceptionDataAWeekAgo()
      this.getShopNames()
    }
  },
  methods: {
@@ -413,7 +433,9 @@
      // let rangeTime_1 = time.splitTime(rangeTime)
      // 得到背景区间的配置
      let areaObj = lineChart.getMarkArea(rangeTime, '异常')
      // let lineColor = lineChart.getLineColor(rangeTime,xList)
      let lineColor = []
      // console.log('线段',lineColor);
      // 传入参数
      this.dialog.option = exceptionOption.setExceptionChartOption(
        xList,
@@ -424,6 +446,7 @@
        '',
        this.tableCurrentRowData.exception,
        areaObj,
        lineColor,
        this.tableCurrentRowData.exceptionType
      )
    },
@@ -526,7 +549,6 @@
        let endIndex = dateList.findIndex((item) => item === exceptionET)
        // 设置折线图配置项
        // this.reSetChart(dateList, dustValue, exceptionBT, exceptionET, startIndex, endIndex)
        this.dialog.option = exceptionOption.setExceptionChartOption(
          dateList,
          dustValue,
@@ -535,6 +557,7 @@
          startIndex,
          endIndex,
          this.tableCurrentRowData.exception,
          '',
          '',
          this.tableCurrentRowData.exceptionType
        )
@@ -899,7 +922,6 @@
      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;
@@ -1201,10 +1223,11 @@
            align="center"
            show-overflow-tooltip
          />
          <el-table-column prop="flag" label="flag" align="center" show-overflow-tooltip />
          <el-table-column prop="flag" label="数据标识" align="center" show-overflow-tooltip />
        </el-table>
      </div>
      <template #footer>
        <div class="dialog-footer">
        <el-tag type="success" class="mx-1" effect="dark" round
          ><span class="table-line-lable" v-show="tableCurrentRowData.exceptionType == '0'"
            >缺失数据:
@@ -1214,13 +1237,19 @@
              tableCurrentRowData.exceptionType == '1' ||
              tableCurrentRowData.exceptionType == '2' ||
              tableCurrentRowData.exceptionType == '3' ||
              tableCurrentRowData.exceptionType == '4'
              tableCurrentRowData.exceptionType == '4' ||
              tableCurrentRowData.exceptionType == '5' ||
              tableCurrentRowData.exceptionType == '6' ||
              tableCurrentRowData.exceptionType == '7' ||
              tableCurrentRowData.exceptionType == '8'
            "
            >异常数据:</span
          >
          <span class="table-line-num">{{ dialog.exceptionTotal }}条</span>
          <span v-show="tableCurrentRowData.exceptionType == '0'"> (逻辑计算)</span>
        </el-tag>
        <el-text v-show="tableCurrentRowData.exceptionType == '8'" type="warning" class="dialog-footer-text">数据标识A为数据长期缺失,系统自动补全</el-text>
      </div>
      </template>
    </el-dialog>
  </div>
@@ -1332,6 +1361,8 @@
}
/* 表格模块结束 */
/* 查看详情对话框模块的样式 */
.diag-head {
@@ -1359,9 +1390,19 @@
}
.mx-1 {
  position: absolute;
  /* position: absolute;
  left: 10px;
  bottom: 10px;
  bottom: 10px; */
  justify-content: flex-start;
}
.dialog-footer{
  display: flex;
}
.dialog-footer-text {
  justify-content: flex-end;
  margin-left: auto;
  font-size: 14px;
  /* color: #333333; */
}
/* 查看详情对话框模块结束 */
</style>