refactor(Charts): 统一调整集成能源图表尺寸并添加背景组件
- 将FeeOverview、ConsumptionProportion和ConstructionIndex图表的宽度调整为450,高度调整为320 - 为ConstructionIndex图表添加缺失的attr配置 - 在各图表组件中用Background组件替换原有容器,并添加标题 - 调整ConstructionIndex列表项的样式
This commit is contained in:
parent
10128c3498
commit
8ce15ac064
@ -1,6 +1,7 @@
|
|||||||
import { PublicConfigClass } from '@/packages/public'
|
import { PublicConfigClass } from '@/packages/public'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { ConstructionIndexConfig } from './index'
|
import { ConstructionIndexConfig } from './index'
|
||||||
|
import { chartInitConfig } from '@/settings/designSetting'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
|
|
||||||
//导入数据
|
//导入数据
|
||||||
@ -14,4 +15,5 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
|||||||
public key = ConstructionIndexConfig.key
|
public key = ConstructionIndexConfig.key
|
||||||
public chartConfig = cloneDeep(ConstructionIndexConfig)
|
public chartConfig = cloneDeep(ConstructionIndexConfig)
|
||||||
public option = cloneDeep(option)
|
public option = cloneDeep(option)
|
||||||
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 320, zIndex: 1 }
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contruction-index">
|
<Background title-text="开工指数" :select-option-mode="0">
|
||||||
<div class="contruction-index-title">
|
<div class="contruction-index-title">
|
||||||
<img class="contruction-index-title_tag" src="./assets/tag.png" alt="">
|
<img class="contruction-index-title_tag" src="./assets/tag.png" alt="">
|
||||||
<div class="contruction-index-title_title">
|
<div class="contruction-index-title_title">
|
||||||
<div>开工指数</div>
|
<div>开工指数</div>
|
||||||
@ -26,13 +26,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Background>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PropType, computed } from 'vue'
|
import { PropType, computed } from 'vue'
|
||||||
import { option as configOption } from './config'
|
import { option as configOption } from './config'
|
||||||
|
import Background from '../Background/index.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
@ -95,8 +96,8 @@ const calculateWidth = (value: number) => {
|
|||||||
width:90%;
|
width:90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
.contruction-index-list_item {
|
.contruction-index-list_item {
|
||||||
height: 30px;
|
height: 25px;
|
||||||
margin: 15px 0px;
|
margin-top: 13px;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -95,5 +95,5 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
|||||||
public key: string = ConsumptionProportionConfig.key
|
public key: string = ConsumptionProportionConfig.key
|
||||||
public chartConfig = cloneDeep(ConsumptionProportionConfig)
|
public chartConfig = cloneDeep(ConsumptionProportionConfig)
|
||||||
public option = echartOptionProfixHandle(option, includes)
|
public option = echartOptionProfixHandle(option, includes)
|
||||||
public attr = { ...chartInitConfig, x: 0, y: 0, w: 420, h: 280, zIndex: 1 }
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 320, zIndex: 1 }
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="go-border-box">
|
<Background title-text="能耗占比" :select-option-mode="0">
|
||||||
<!-- <img src="./assets/title.svg" class="svg" />
|
<!-- <img src="./assets/title.svg" class="svg" />
|
||||||
<div class="header-title">有限空间分布情况</div> -->
|
<div class="header-title">有限空间分布情况</div> -->
|
||||||
<div class="title-value">
|
<div class="title-value">
|
||||||
@ -7,8 +7,7 @@
|
|||||||
<div class="title-value_unit">/万元</div>
|
<div class="title-value_unit">/万元</div>
|
||||||
</div>
|
</div>
|
||||||
<v-chart ref="vChartRef" autoresize :init-options="initOptions" :theme="themeColor" :option="option"></v-chart>
|
<v-chart ref="vChartRef" autoresize :init-options="initOptions" :theme="themeColor" :option="option"></v-chart>
|
||||||
</div>
|
</Background>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -29,6 +28,7 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore
|
|||||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, TitleComponent } from 'echarts/components'
|
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, TitleComponent } from 'echarts/components'
|
||||||
import dataJson from './data.json'
|
import dataJson from './data.json'
|
||||||
import { getPie3D } from './3dPie'
|
import { getPie3D } from './3dPie'
|
||||||
|
import Background from '../Background/index.vue'
|
||||||
import axiosInstance from '@/api/axios';
|
import axiosInstance from '@/api/axios';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -95,5 +95,5 @@ export default class Config extends PublicConfigClass implements CreateComponent
|
|||||||
public key: string = FeeOverviewConfig.key
|
public key: string = FeeOverviewConfig.key
|
||||||
public chartConfig = cloneDeep(FeeOverviewConfig)
|
public chartConfig = cloneDeep(FeeOverviewConfig)
|
||||||
public option = echartOptionProfixHandle(option, includes)
|
public option = echartOptionProfixHandle(option, includes)
|
||||||
public attr = { ...chartInitConfig, x: 0, y: 0, w: 420, h: 280, zIndex: 1 }
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 450, h: 320, zIndex: 1 }
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="go-border-box">
|
<Background title-text="费用概况" :select-option-mode="0">
|
||||||
<!-- <img src="./assets/title.svg" class="svg" />
|
<!-- <img src="./assets/title.svg" class="svg" />
|
||||||
<div class="header-title">有限空间分布情况</div> -->
|
<div class="header-title">有限空间分布情况</div> -->
|
||||||
<div class="title-value">
|
<div class="title-value">
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<div class="title-value_unit">/万元</div>
|
<div class="title-value_unit">/万元</div>
|
||||||
</div>
|
</div>
|
||||||
<v-chart ref="vChartRef" autoresize :init-options="initOptions" :theme="themeColor" :option="option"></v-chart>
|
<v-chart ref="vChartRef" autoresize :init-options="initOptions" :theme="themeColor" :option="option"></v-chart>
|
||||||
</div>
|
</Background>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -29,6 +29,7 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore
|
|||||||
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, TitleComponent } from 'echarts/components'
|
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent, TitleComponent } from 'echarts/components'
|
||||||
import dataJson from './data.json'
|
import dataJson from './data.json'
|
||||||
import { getPie3D } from './3dPie'
|
import { getPie3D } from './3dPie'
|
||||||
|
import Background from '../Background/index.vue'
|
||||||
import axiosInstance from '@/api/axios';
|
import axiosInstance from '@/api/axios';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
Loading…
Reference in New Issue
Block a user