zmc
2023-11-23 0825e9e96a6f2d4b71a51d32dae1302f2496c4d1
src/views/risk_assessment/components/DustRadarChart.vue
@@ -14,9 +14,9 @@
    },
    // 数据
    yData: {
      type: Array,
      type: Object,
      default: () => {
        return [100,0,0,0,100];
        return {};
      }
    }
  },
@@ -26,8 +26,11 @@
    };
  },
  watch: {
    yData() {
      this.set();
    yData: {
      handler() {
        this.set()
      },
      deep:true
    }
  },
  mounted() {
@@ -36,22 +39,24 @@
  },
  computed:{
    valid(){
      return (100-this.yData[0]).toFixed(2)
      return (this.yData.validRisk*100).toFixed(2)
    },
    exceptionRecurrence(){
      return this.yData[1]*100
      return (this.yData.exceptionTypeAggregation*100).toFixed(2)
    },
    exceptionTypeAggregation(){
      return this.yData[2]*100
      return (this.yData.exceptionTypeAggregation*100).toFixed(2)
    },
    exceeding(){
      return  this.yData[3]
      return  (this.yData.exceedRisk*100).toFixed(2)
    },
    online(){
      return   (100-this.yData[4]).toFixed(2)
      return   (this.yData.onlineRisk*100).toFixed(2)
    }
  },
  methods: {
    initRadarChart() {
      this.chart = echarts.init(document.getElementById('main'));
    },
@@ -92,11 +97,11 @@
            data: [
              {
                value: [
                  (1 - this.yData[0]/100).toFixed(4),
                  this.yData[1],
                  this.yData[2],
                 (this.yData[3]/100).toFixed(4),
                  (1-this.yData[4]/100).toFixed(4)
                  this.yData.validRisk.toFixed(4),
                  this.yData.typicalExceptionRepetitionRate,
                 this.yData.exceptionTypeAggregation,
                 this.yData.exceedRisk.toFixed(4),
                  this.yData.onlineRisk.toFixed(4)
                ],
   
                name: '异常分析'