细节优化

This commit is contained in:
仲么了
2023-11-02 13:40:48 +08:00
parent a60cdc066e
commit f01f764fcf
8 changed files with 82 additions and 50 deletions

View File

@@ -2,7 +2,7 @@
<uni-card <uni-card
:title="device.equipmentName" :title="device.equipmentName"
:sub-title="device.mac" :sub-title="device.mac"
:extra="device.isPrimaryUser == 1 ? '主用户' : '分享用户'" :extra="device.isPrimaryUser == 1 ? '主设备' : '分享设备'"
padding="0" padding="0"
@click="jump(device)" @click="jump(device)"
:thumbnail="deviceIcon(device.runStatus)" :thumbnail="deviceIcon(device.runStatus)"

View File

@@ -2,8 +2,8 @@
"name" : "灿能物联", "name" : "灿能物联",
"appid" : "__UNI__88BC25B", "appid" : "__UNI__88BC25B",
"description" : "", "description" : "",
"versionName" : "1.3.9", "versionName" : "1.4.1",
"versionCode" : 139, "versionCode" : 141,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -6,7 +6,7 @@
<view class="about-text">设备类型{{ deviceInfo.devTypeName }}</view> <view class="about-text">设备类型{{ deviceInfo.devTypeName }}</view>
<view class="about-text">设备型号{{ deviceInfo.devModelName }}</view> <view class="about-text">设备型号{{ deviceInfo.devModelName }}</view>
<view class="about-text" <view class="about-text"
>设备接入方式{{ deviceInfo.devAccessMethod === 'cloud' ? '云直连' : 'MQTT' }}</view >设备接入方式{{ deviceInfo.devAccessMethod === 'cloud' ? 'CLD' : 'MQTT' }}</view
> >
<!-- <view class="about-text">设备注册时间永久使用</view> --> <!-- <view class="about-text">设备注册时间永久使用</view> -->
<view class="about-text">程序版本{{ deviceInfo.programVersionName }}</view> <view class="about-text">程序版本{{ deviceInfo.programVersionName }}</view>

View File

@@ -1,8 +1,22 @@
<template> <template>
<view> <view>
<uni-data-checkbox v-model="parity" :localdata="parityOption" @change="initEcharts"></uni-data-checkbox> <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-checkbox v-model="dataRadio" :localdata="dataOptions" @change="initEcharts"></uni-data-checkbox> -->
<uni-data-select v-model="dataRadio" :localdata="dataOptions" @change="initEcharts"></uni-data-select> <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"> <view class="charts-box">
<qiun-data-charts type="bar" :ontouch="true" :opts="opts" :chartData="chartData" /> <qiun-data-charts type="bar" :ontouch="true" :opts="opts" :chartData="chartData" />
</view> </view>
@@ -59,7 +73,9 @@ export default {
'#ea7ccc', '#ea7ccc',
], ],
padding: [20, 10, 0, 0], padding: [20, 10, 0, 0],
legend: {}, legend: {
position: 'top',
},
xAxis: { xAxis: {
disableGrid: true, disableGrid: true,
itemCount: 8, itemCount: 8,
@@ -69,6 +85,7 @@ export default {
min: 0, min: 0,
}, },
], ],
position: 'top',
}, },
yAxis: {}, yAxis: {},
extra: { extra: {
@@ -166,6 +183,7 @@ export default {
}, },
methods: { methods: {
initEcharts() { initEcharts() {
setTimeout(() => {
let obj = JSON.parse( let obj = JSON.parse(
JSON.stringify( JSON.stringify(
this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]], this.renderData['电网侧']['Apf_HarmI'][Object.keys(this.renderData['电网侧']['Apf_HarmI'])[0]],
@@ -199,6 +217,7 @@ export default {
}, },
], ],
} }
}, 100)
}, },
}, },
} }
@@ -209,4 +228,7 @@ export default {
margin-top: 20rpx; margin-top: 20rpx;
height: 100vh; height: 100vh;
} }
.header-form {
display: flex;
}
</style> </style>

View File

@@ -20,7 +20,9 @@
<view class="header-item-label">告警数量</view> <view class="header-item-label">告警数量</view>
</view> </view>
<view class="header-item"> <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 class="header-item-label">事件数量</view>
</view> </view>
<view class="header-item" @click="projectNum"> <view class="header-item" @click="projectNum">
@@ -51,7 +53,9 @@
<view class="header-item-label">告警数量</view> <view class="header-item-label">告警数量</view>
</view> </view>
<view class="header-item"> <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 class="header-item-label">事件数量</view>
</view> </view>
<view class="header-item" @click="projectNum"> <view class="header-item" @click="projectNum">
@@ -87,8 +91,7 @@ export default {
}, },
jump(type) { jump(type) {
uni.navigateTo({ uni.navigateTo({
url: url: '/pages/device/list?type=' + type,
'/pages/device/list?type=' + type
}) })
}, },
}, },

View File

@@ -20,7 +20,9 @@
<view class="header-item-label">告警数量</view> <view class="header-item-label">告警数量</view>
</view> </view>
<view class="header-item"> <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 class="header-item-label">事件数量</view>
</view> </view>
<view class="header-item" @click="projectNum(false)"> <view class="header-item" @click="projectNum(false)">
@@ -52,7 +54,9 @@
<view class="header-item-label">告警数量</view> <view class="header-item-label">告警数量</view>
</view> </view>
<view class="header-item"> <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 class="header-item-label">事件数量</view>
</view> </view>
<view class="header-item" @click="projectNum(true)"> <view class="header-item" @click="projectNum(true)">

View File

@@ -193,6 +193,9 @@ export default {
index: 2, index: 2,
}) })
} }
// #ifdef APP-PLUS
plus.runtime.setBadgeNumber(messagePage + minePage)
// #endif
}) })
}, },
}, },

View File

@@ -4,7 +4,7 @@
<view class='about'> <view class='about'>
<image src="/static/logo.png" class="logo"></image> <image src="/static/logo.png" class="logo"></image>
<view class="name">灿能物联</view> <view class="name">灿能物联</view>
<view class="version">Version 1.0.0</view> <view class="version">Version 1.0.1</view>
</view> </view>
</view> </view>
</Cn-page> </Cn-page>