<!--
 * @Author: your name
 * @Date: 2021-10-13 16:45:48
 * @LastEditTime: 2021-11-08 17:27:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /data-show/src/views/TailInsightDetails/rearWingPropagationSituation/index.vue
-->
<template>
    <div class="rwps-outter" v-loading="load">
      <v-label-div title="尾翼传播态势"></v-label-div>
      <div class="rwps-inner">
          <v-echarts :opt="opt"></v-echarts> 
      </div>
    </div>
</template>

<script>
import {getWeiYiVolumeTime} from '@/api/TailInsightdetails'
import createOpt from "./opt"
export default {
    name: "rearWingPropagationSituation",
    data() {
        return {
            load: false,
            opt: {},
            form: {
                sBrand: "",
                token: "",
            }
        }
    },
    created() {
        this.form.token = this.getToken;
        this.form.sBrand = this.getBrand.brandname || '奥迪';
        this.getDdta();
    }, 
    methods: {
       getDdta(){
             let obj = Object.assign({}, this.getCtime2, this.form);
             this.load = true;
            getWeiYiVolumeTime(obj).then(res => {
                let data = res.data || [];
                let dx = [];
                let ds = [];
                data.forEach((ele) => {
                    let time = ele.Time;
                    let value = ele.value;
                    dx.push(time);
                    ds.push(value);
                });
                this.opt = createOpt(dx, ds);
                this.load = false;
            })
        },
    }
}
</script>

<style lang="less" scoped>
.rwps-outter {
    width: 460px;
    height: 460px;
    border: 2px solid #0F2A4D;
    .rwps-inner {
        width: 100%;
        height: calc(100% - 48px);
    }
}
</style>