修改 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,
},
},
},

View File

@@ -88,6 +88,7 @@
:content="content"
@trigger="trigger"
/>
<uni-popup ref="share" type="share" :safe-area="false">
<uni-popup-share title="分享到"></uni-popup-share>
<view style="height: 40rpx; background: #fff"></view>
@@ -139,7 +140,7 @@ import { manualAccess } from '@/common/api/accessBoot'
import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
import mqtt, { log } from 'mqtt/dist/mqtt.js'
import { base64ToPath, pathToBase64 } from 'image-tools'
// import hoverMenu from '@/components/hover-menu/hover-menu.vue'
export default {
components: {
basic,
@@ -147,6 +148,7 @@ export default {
power,
oscillogram,
IO,
hoverMenu
},
data() {
return {
@@ -206,6 +208,7 @@ export default {
basicData: [],
IOData: [],
pageOptions: {},
}
},
methods: {
@@ -273,6 +276,9 @@ export default {
}
this.$refs.fab.close()
},
clickItem(item) {
console.log(item);
},
// 取消调试
cancelDebug() {
this.dialogType = '取消调试'
@@ -461,12 +467,12 @@ export default {
if (key === 'Apf_RmsI_TolOut(A)') {
arr.push({
label: '总输出电流:',
value: Math.round(item.statisticalData) + 'A',
value: Math.round(item.statisticalData) + 'A',
})
} else {
arr.push({
label: '电流畸变率:',
value:Math.round(item.statisticalData) + '%',
value: Math.round(item.statisticalData) + '%',
})
// arr.push('电流畸变率:' + item.statisticalData + '%')
}
@@ -668,4 +674,28 @@ export default {
background: #f3f4f5;
}
}
</style>
/deep/ .uni-fab__circle--rightBottom {
right: 8px !important;
bottom: 8px !important;
}
/deep/ .uni-fab--rightBottom {
right: 8px !important;
bottom: 8px !important;
}
/deep/ .uni-fab__circle {
width: 40px;
height: 40px;
}
/deep/ .uni-fab__content--flexDirectionEnd {
width: 40px !important;
// height: 50px !important;
}
/deep/.uni-fab__item {
// height: 45px;
width: 40px !important;
}
/deep/.uni-fab__item--first {
height: 40px !important;
}
</style>

View File

@@ -88,7 +88,7 @@ export default {
onNavigationBarButtonTap(e) {
uni.showModal({
title: '提示',
content: '确定要全部标记为已读吗?',
content: '确定要全部标记为已读吗1',
success: (res) => {
if (res.confirm) {
updateStatus({