From 721f6ec69e796fd5c9807eaf68ec25df2bcf4e66 Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期四, 29 二月 2024 11:53:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/index/right-center.vue | 76 +++++++++++++++++++++++++++++++++++-- 1 files changed, 71 insertions(+), 5 deletions(-) diff --git a/src/views/index/right-center.vue b/src/views/index/right-center.vue index 7df5872..d068198 100644 --- a/src/views/index/right-center.vue +++ b/src/views/index/right-center.vue @@ -1,13 +1,79 @@ -<script setup lang='ts'> +<script setup lang="ts"> +import {ref, reactive, onMounted} from "vue"; +import CapsuleChart from "@/components/datav/capsule-chart"; +import { currentGET } from "@/api"; +const config = ref({ + showValue: true, + unit: "娆�", +}); +const data= ref([]) +const getData = () => { + currentGET("rightCenter").then((res) => { + console.log("鎶ヨ鎺掑悕", res); + if (res.success) { + data.value =res.data; + console.log("data", res.data) + } else { + window["$message"]({ + text: res.msg, + type: "warning", + }); + } + }); +}; + +onMounted(() =>{ + // getData(); + let obj=[ + { + "value": 942, + "name": "甯稿痉甯�" + }, + { + "value": 889, + "name": "寮犲鍙e競" + }, + { + "value": 691, + "name": "鍛ㄥ彛甯�" + }, + { + "value": 621, + "name": "婢抽棬鍗婂矝" + }, + { + "value": 520, + "name": "鍖呭ご甯�" + }, + { + "value": 207, + "name": "涔屾捣甯�" + }, + { + "value": 157, + "name": "闈掑矝甯�" + }, + { + "value": 86, + "name": "钀ュ彛甯�" + } + ] + data.value = obj +}) </script> <template> - <div class=''> - + <div class="right_bottom"> + <CapsuleChart :config="config" style="width: 100%; height: 260px" :data="data"/> </div> </template> -<style scoped lang='scss'> +<style scoped lang="scss"> -</style> \ No newline at end of file +.right_bottom { + box-sizing: border-box; + padding: 0 16px; + height: 100%; +} +</style> -- Gitblit v1.8.0