修改 echart替换组件 完成置菜单按钮需要重新设计

This commit is contained in:
GGJ
2024-09-04 09:45:49 +08:00
parent fd55306d1a
commit d7c3069755
12 changed files with 1346 additions and 351 deletions

View File

@@ -10,9 +10,9 @@
<view class="item item-title">功率因数</view>
<template v-for="(item, index) in renderData.电网侧">
<view class="item">{{ item.phase }}</view>
<view class="item">{{ (item['Apf_P_Sys(W)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ (item['Apf_Q_Sys(Var)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ (item['Apf_S_Sys(VA)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ item['Apf_P_Sys(W)']=='-'? '-':(item['Apf_P_Sys(W)'] / 1000).toFixed(4) }}</view>
<view class="item">{{item['Apf_Q_Sys(Var)']=='-'? '-':(item['Apf_Q_Sys(Var)'] / 1000).toFixed(4) }}</view>
<view class="item">{{ item['Apf_S_Sys(VA)']=='-'?'-' :(item['Apf_S_Sys(VA)'] / 1000).toFixed(4) }}</view>
<view class="item">{{ item['Apf_PF_Sys(null)'] || '-' }}</view>
</template>
</view>
@@ -27,9 +27,9 @@
<view class="item item-title">功率因数</view>
<template v-for="(item, index) in renderData.负载侧">
<view class="item">{{ item.phase }}</view>
<view class="item">{{ (item['Apf_P_Load(W)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ (item['Apf_Q_Load(Var)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ (item['Apf_S_Load(VA)'] / 1000).toFixed(4) || '-' }}</view>
<view class="item">{{ item['Apf_P_Load(W)']=='-'?'-': (item['Apf_P_Load(W)'] / 1000).toFixed(4) }}</view>
<view class="item">{{ item['Apf_Q_Load(Var)']=='-'? '-':(item['Apf_Q_Load(Var)'] / 1000).toFixed(4) }}</view>
<view class="item">{{ item['Apf_S_Load(VA)']=='-'? '-':(item['Apf_S_Load(VA)'] / 1000).toFixed(4) }}</view>
<view class="item">{{ item['Apf_PF_Load(null)'] || '-' }}</view>
</template>
</view>

View File

@@ -66,7 +66,7 @@ export default {
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
// enableScroll: true,
dataLabel: false,
// dataLabel: false,
color: [
'#1890FF',
'#91CB74',
@@ -78,33 +78,45 @@ export default {
'#9A60B4',
'#ea7ccc',
],
padding: [0, 10, 0, 0],
padding: [0, 20, 0, 0],
legend: {
position: 'top',
float: 'left',
},
xAxis: {
disableGrid: true,
// disableGrid: true,
boundaryGap: "justify",
itemCount: 8,
// scrollShow: true,
data: [
{
min: 0,
},
],
min: 0,
max: 10,
position: 'top',
formatter:(value,index,opts)=>{
console.log(123,value,index,opts);
}
},
yAxis: {},
yAxis: {
},
extra: {
bar: {
type: 'group',
width: 30,
meterBorde: 1,
meterBorde: 1 ,
meterFillColor: '#FFFFFF',
activeBgColor: '#000000',
activeBgOpacity: 0.08,
seriesGap: 1,
categoryGap: 4,
barBorderCircle: true,
seriesGap: 2,
categoryGap: 6,
},
},
},