细节优化
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<uni-card
|
||||
:title="device.equipmentName"
|
||||
:sub-title="device.mac"
|
||||
:extra="device.isPrimaryUser == 1 ? '主用户' : '分享用户'"
|
||||
:extra="device.isPrimaryUser == 1 ? '主设备' : '分享设备'"
|
||||
padding="0"
|
||||
@click="jump(device)"
|
||||
:thumbnail="deviceIcon(device.runStatus)"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "灿能物联",
|
||||
"appid" : "__UNI__88BC25B",
|
||||
"description" : "",
|
||||
"versionName" : "1.3.9",
|
||||
"versionCode" : 139,
|
||||
"versionName" : "1.4.1",
|
||||
"versionCode" : 141,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<view class="about-text">设备类型:{{ deviceInfo.devTypeName }}</view>
|
||||
<view class="about-text">设备型号:{{ deviceInfo.devModelName }}</view>
|
||||
<view class="about-text"
|
||||
>设备接入方式:{{ deviceInfo.devAccessMethod === 'cloud' ? '云直连' : 'MQTT' }}</view
|
||||
>设备接入方式:{{ deviceInfo.devAccessMethod === 'cloud' ? 'CLD' : 'MQTT' }}</view
|
||||
>
|
||||
<!-- <view class="about-text">设备注册时间:永久使用</view> -->
|
||||
<view class="about-text">程序版本:{{ deviceInfo.programVersionName }}</view>
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-data-checkbox v-model="parity" :localdata="parityOption" @change="initEcharts"></uni-data-checkbox>
|
||||
<!-- <uni-data-checkbox v-model="dataRadio" :localdata="dataOptions" @change="initEcharts"></uni-data-checkbox> -->
|
||||
<uni-data-select v-model="dataRadio" :localdata="dataOptions" @change="initEcharts"></uni-data-select>
|
||||
<div class="header-form">
|
||||
<uni-data-select
|
||||
v-model="parity"
|
||||
:localdata="parityOption"
|
||||
@change="initEcharts"
|
||||
style="flex: 1"
|
||||
:clear="false"
|
||||
></uni-data-select>
|
||||
<!-- <uni-data-checkbox v-model="dataRadio" :localdata="dataOptions" @change="initEcharts"></uni-data-checkbox> -->
|
||||
<uni-data-select
|
||||
v-model="dataRadio"
|
||||
:localdata="dataOptions"
|
||||
@change="initEcharts"
|
||||
style="flex: 2; margin-left: 20rpx"
|
||||
:clear="false"
|
||||
></uni-data-select>
|
||||
</div>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="bar" :ontouch="true" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
@@ -46,7 +60,7 @@ export default {
|
||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||
opts: {
|
||||
// enableScroll: true,
|
||||
dataLabel:false,
|
||||
dataLabel: false,
|
||||
color: [
|
||||
'#1890FF',
|
||||
'#91CB74',
|
||||
@@ -59,7 +73,9 @@ export default {
|
||||
'#ea7ccc',
|
||||
],
|
||||
padding: [20, 10, 0, 0],
|
||||
legend: {},
|
||||
legend: {
|
||||
position: 'top',
|
||||
},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
itemCount: 8,
|
||||
@@ -69,6 +85,7 @@ export default {
|
||||
min: 0,
|
||||
},
|
||||
],
|
||||
position: 'top',
|
||||
},
|
||||
yAxis: {},
|
||||
extra: {
|
||||
@@ -166,39 +183,41 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initEcharts() {
|
||||
let obj = JSON.parse(
|
||||
JSON.stringify(
|
||||
this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]],
|
||||
),
|
||||
)
|
||||
let key = this.dataOptions[this.dataRadio].pointer.split('_')
|
||||
console.log(key)
|
||||
let name1 = key[0] + '_' + key[1]
|
||||
let name2 = key[2]
|
||||
this.chartData = {
|
||||
categories: Object.keys(obj)
|
||||
.map((item) => {
|
||||
// Apf_HarmI_Sys_36(A) 匹配36
|
||||
return Number(item.match(/\d+/)[0])
|
||||
})
|
||||
.filter((item) => {
|
||||
return item % 2 === this.parity - 1
|
||||
}),
|
||||
series: [
|
||||
{
|
||||
name: '电网侧',
|
||||
data: Object.values(this.renderData['电网侧'][name1][name2]).filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
setTimeout(() => {
|
||||
let obj = JSON.parse(
|
||||
JSON.stringify(
|
||||
this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]],
|
||||
),
|
||||
)
|
||||
let key = this.dataOptions[this.dataRadio].pointer.split('_')
|
||||
console.log(key)
|
||||
let name1 = key[0] + '_' + key[1]
|
||||
let name2 = key[2]
|
||||
this.chartData = {
|
||||
categories: Object.keys(obj)
|
||||
.map((item) => {
|
||||
// Apf_HarmI_Sys_36(A) 匹配36
|
||||
return Number(item.match(/\d+/)[0])
|
||||
})
|
||||
.filter((item) => {
|
||||
return item % 2 === this.parity - 1
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: '负载侧',
|
||||
data: Object.values(this.renderData['负载侧'][name1][name2]).filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
}),
|
||||
},
|
||||
],
|
||||
}
|
||||
series: [
|
||||
{
|
||||
name: '电网侧',
|
||||
data: Object.values(this.renderData['电网侧'][name1][name2]).filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: '负载侧',
|
||||
data: Object.values(this.renderData['负载侧'][name1][name2]).filter((item, index) => {
|
||||
return index % 2 === this.parity - 1
|
||||
}),
|
||||
},
|
||||
],
|
||||
}
|
||||
}, 100)
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -209,4 +228,7 @@ export default {
|
||||
margin-top: 20rpx;
|
||||
height: 100vh;
|
||||
}
|
||||
.header-form {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
@@ -20,7 +20,9 @@
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum">
|
||||
@@ -32,7 +34,7 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}</view>
|
||||
@@ -51,7 +53,9 @@
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum">
|
||||
@@ -87,8 +91,7 @@ export default {
|
||||
},
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=' + type
|
||||
url: '/pages/device/list?type=' + type,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(false)">
|
||||
@@ -52,7 +54,9 @@
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
|
||||
@@ -193,6 +193,9 @@ export default {
|
||||
index: 2,
|
||||
})
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.setBadgeNumber(messagePage + minePage)
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class='about'>
|
||||
<image src="/static/logo.png" class="logo"></image>
|
||||
<view class="name">灿能物联</view>
|
||||
<view class="version">Version 1.0.0</view>
|
||||
<view class="version">Version 1.0.1</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
|
||||
Reference in New Issue
Block a user