<!-- * @Author: your name * @Date: 2021-10-12 18:35:53 * @LastEditTime: 2021-10-26 16:12:51 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /data-show/src/views/BrandInsight/rearWingPropagationSituation/index.vue --> <template> <div class="rwps-outter" v-loading="load"> <v-label-div title="尾翼传播态势" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div> <div class="rwps-inner"> <v-echarts :opt="opt"></v-echarts> </div> </div> </template> <script> import {getWeiYiVolumeTime} from "@/api/BrandInsight"; import createOpt from "./opt" export default { name: "rearWingPropagationSituation", props: ["brand"], data() { return { load: false, form: { token: "", sBrand: "奥迪", }, opt: {} } }, created() { this.form.token = this.getToken; this.form.sBrand = this.brand; this.getData(); }, methods: { getData() { let obj = Object.assign({}, this.getCommTime, this.form); this.load = true; getWeiYiVolumeTime(obj).then(res => { let data = res.data || []; let dx = []; let ds = []; data.forEach(ele => { let key = ele.Time; let value = ele.value; dx.push(key); ds.push(value); }) this.opt = createOpt(dx, ds) this.load = false; }) } } } </script> <style lang="less" scoped> .rwps-outter { width: 630px; height: 412px; .rwps-inner { width: 100%; height: calc(100% - 48px); } } </style>