zmc
2023-11-23 cc890f987b770e5a73f5ef12d41b25f6bb448fcd
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: {
@@ -179,7 +185,6 @@
    }
  },
  setup() {
    // provide('search',readonly(form))
    const { isExceedOneMonth } = useCommonFunction()
    return {
      isExceedOneMonth
@@ -221,15 +226,24 @@
            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')
    // 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()
    }
@@ -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
      )
    },
@@ -535,6 +558,7 @@
          startIndex,
          endIndex,
          this.tableCurrentRowData.exception,
          '',
          '',
          this.tableCurrentRowData.exceptionType
        )
@@ -1201,10 +1225,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 +1239,20 @@
              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>
        <!-- <el-text class="mx-1" type="warning">Warning</el-text> -->
      </div>
      </template>
    </el-dialog>
  </div>
@@ -1359,9 +1391,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>