From fd7586c8d91473d2850af1e48b12f1a289e6b8d1 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期四, 13 六月 2024 00:10:43 +0800 Subject: [PATCH] 新增文件 --- src/views/mdc/components/Time.vue | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/mdc/components/Time.vue b/src/views/mdc/components/Time.vue index 13b11da..17d160d 100644 --- a/src/views/mdc/components/Time.vue +++ b/src/views/mdc/components/Time.vue @@ -1,14 +1,14 @@ <!-- * @Date: 2024-04-18 21:52:18 * @LastEditors: Sneed - * @LastEditTime: 2024-04-20 20:50:02 + * @LastEditTime: 2024-04-27 23:30:06 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue --> <template> <el-row> <el-col> <el-button-group> - <el-button @click="statisticalMethod = item.value" + <el-button size="small" @click="statisticalMethod = item.value" :type="statisticalMethod == item.value ? 'primary' : ''" v-for="item in btnList" :key="item.value">{{ item.label }}</el-button> @@ -41,8 +41,10 @@ import scEcharts from '@/components/scEcharts'; export default { props: { - url: '/api/blade-mdc/efficiency-analysis', - type: String, + url: { + default: '/api/blade-mdc/efficiency-analysis', + type: String, + } }, components: { scEcharts @@ -138,11 +140,16 @@ xAxis: { type: 'category', axisLabel: { - interval: 'auto' + interval: 'auto', } }, yAxis: { - type: 'value' + type: 'value', + axisLabel: { + formatter: (value) => { + return value + '%' + } + }, }, dataZoom: [ { type: 'slider' } @@ -164,7 +171,7 @@ res.data.items.records.forEach(v => { let current = [v.id] Object.keys(v.nameData).forEach(key => { - current.push(row.data[key] - 0) + current.push((v.data[key] - 0) * 100) }) option2.dataset.source.push(current) }); -- Gitblit v1.9.3