调整app页面图标样式
This commit is contained in:
@@ -22,17 +22,17 @@
|
||||
></view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
所属工程:<view>{{ engineeringName }}</view>
|
||||
所属工程:<view>{{ device.engineeringName }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
所属项目:<view>{{ equipmentName }}</view>
|
||||
所属项目:<view>{{ device.equipmentName }}</view>
|
||||
</view>
|
||||
|
||||
<view class="info-item status">
|
||||
通讯状态:<view
|
||||
class="status-normal"
|
||||
:style="{ color: runStatus == 1 ? '#ff3b30' : '#00ff88' }"
|
||||
>{{ runStatus == 1 ? '离线' : '在线' }}
|
||||
:style="{ color: device.runStatus == 1 ? '#ff3b30' : '#00ff88' }"
|
||||
>{{ device.runStatus == 1 ? '离线' : '在线' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -69,7 +69,7 @@
|
||||
@finished="initChart('echartV3', 'echartsDataV3')"
|
||||
></l-echart>
|
||||
</view>
|
||||
<view class="text"> 电压有效值(kV) </view>
|
||||
<view class="text" style="left: 20rpx"> 电压有效值(kV) </view>
|
||||
</view>
|
||||
<view class="middle" style="width: 100%">
|
||||
<l-echart
|
||||
@@ -103,7 +103,7 @@
|
||||
@finished="initChart('echartA3', 'echartsDataA3')"
|
||||
></l-echart>
|
||||
</view>
|
||||
<view class="text"> 电流有效值(A) </view>
|
||||
<view class="text" style="right: 20rpx"> 电流有效值(A) </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -135,13 +135,15 @@ import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
|
||||
import mqtt from 'mqtt/dist/mqtt.js'
|
||||
import { getBaseRealData } from '@/common/api/harmonic.js'
|
||||
import hoverMenu from '@/hover-menu/components/hover-menu/hover-menu.vue'
|
||||
import { queryTopologyDiagram, deleteDevice, cancelDebug, finishDebug } from '@/common/api/device'
|
||||
export default {
|
||||
components: { hoverMenu },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
devId: '',
|
||||
|
||||
deviceInfo: {},
|
||||
// 使用上面定义的图表配置项
|
||||
option: {},
|
||||
echartsData0: {},
|
||||
@@ -182,32 +184,25 @@ export default {
|
||||
lineId: '00B78D00A87A1',
|
||||
lineKey: 0,
|
||||
lineList: [],
|
||||
engineeringName: '',
|
||||
equipmentName: '',
|
||||
runStatus: 1,
|
||||
connection: false,
|
||||
content: [
|
||||
{
|
||||
iconPath: '/static/report.png',
|
||||
text: '详情',
|
||||
iconPath: '/static/tongji.png',
|
||||
text: '事件',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/about.png',
|
||||
text: '关于',
|
||||
},
|
||||
],
|
||||
isPrimaryUser: 0,
|
||||
device: {},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.device= JSON.parse(options.device)
|
||||
this.lineKey = 0
|
||||
this.devId = options.id
|
||||
this.lineList = JSON.parse(options.lineList)
|
||||
this.lineList = this.device.lineList
|
||||
this.lineId = this.lineList[0].lineId
|
||||
this.engineeringName = options.engineeringName
|
||||
this.equipmentName = options.equipmentName
|
||||
this.runStatus = options.runStatus
|
||||
this.isPrimaryUser = options.isPrimaryUser
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
this.echartsData0 = this.initEcharts0()
|
||||
this.echartsData1 = this.initEcharts1()
|
||||
@@ -222,7 +217,7 @@ export default {
|
||||
this.setMqtt(0)
|
||||
this.initMqtt()
|
||||
})
|
||||
if (this.isPrimaryUser == 1) {
|
||||
if (this.device.isPrimaryUser == 1) {
|
||||
this.content.splice(
|
||||
0,
|
||||
0,
|
||||
@@ -230,10 +225,7 @@ export default {
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/feedback.png',
|
||||
text: '编辑',
|
||||
},
|
||||
|
||||
{
|
||||
iconPath: '/static/delate.png',
|
||||
text: '删除',
|
||||
@@ -715,21 +707,21 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
// this.client.subscribe(`/zl/devData/${this.devId}/${id}`, (err) => {
|
||||
// this.client.subscribe(`/zl/devData/${this.device.equipmentId}/${id}`, (err) => {
|
||||
// if (!err) {
|
||||
// console.log(`订阅成功:/zl/devData/${this.devId}/${id}`)
|
||||
// console.log(`订阅成功:/zl/devData/${this.device.equipmentId}/${id}`)
|
||||
|
||||
// // 默认推送
|
||||
// this.client.publish(`/zl/askDevData/${this.devId}/${id}`)
|
||||
// this.client.publish(`/zl/askTemperData/${this.devId}`)
|
||||
// this.client.publish(`/zl/askDevData/${this.device.equipmentId}/${id}`)
|
||||
// this.client.publish(`/zl/askTemperData/${this.device.equipmentId}`)
|
||||
// if (this.timer) {
|
||||
// clearInterval(this.timer)
|
||||
// this.timer = null
|
||||
// }
|
||||
// this.timer = setInterval(() => {
|
||||
// console.log('askDevData')
|
||||
// this.client.publish(`/zl/askDevData/${this.devId}/${id}`)
|
||||
// this.client.publish(`/zl/askTemperData/${this.devId}`)
|
||||
// this.client.publish(`/zl/askDevData/${this.device.equipmentId}/${id}`)
|
||||
// this.client.publish(`/zl/askTemperData/${this.device.equipmentId}`)
|
||||
// }, 1000 * 60)
|
||||
// }
|
||||
// })
|
||||
@@ -936,7 +928,7 @@ export default {
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
deleteDevice(this.devId).then((res) => {
|
||||
deleteDevice(this.device.equipmentId).then((res) => {
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'none',
|
||||
@@ -952,16 +944,30 @@ export default {
|
||||
})
|
||||
} else if (e.text === '记录') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/record' })
|
||||
} else if (e.text === '详情') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
|
||||
} else if (e.text === '事件') {
|
||||
uni.setStorageSync('messageParams', {
|
||||
engineeringName: this.device.engineeringName,
|
||||
engineeringId: this.device.engineeringId, //工程ID
|
||||
projectName: this.device.projectName,
|
||||
projectId: this.device.projectId, //項目ID
|
||||
deviceName: this.device.equipmentName,
|
||||
deviceId: this.device.equipmentId, //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: 0,
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message1',
|
||||
})
|
||||
// uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.device.equipmentId })
|
||||
} else if (e.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.device.equipmentId })
|
||||
} else if (e.text === '移交') {
|
||||
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
|
||||
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.device.equipmentId })
|
||||
} else if (e.text === '反馈') {
|
||||
uni.navigateTo({ url: '/pages/device/feedback' })
|
||||
} else if (e.text === '用户') {
|
||||
uni.navigateTo({ url: '/pages/device/user?id=' + this.devId + '&isPrimaryUser=' + this.isPrimaryUser })
|
||||
uni.navigateTo({ url: '/pages/device/user?id=' + this.device.equipmentId + '&isPrimaryUser=' + this.device.isPrimaryUser })
|
||||
}
|
||||
// this.$refs.fab.close()
|
||||
},
|
||||
@@ -994,9 +1000,9 @@ export default {
|
||||
margin-bottom: 10rpx;
|
||||
view {
|
||||
// font-size: 28rpx;
|
||||
.nav-menu {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
// .nav-menu {
|
||||
// font-size: 32rpx;
|
||||
// }
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 0rpx;
|
||||
@@ -1058,6 +1064,7 @@ export default {
|
||||
background-color: #fff;
|
||||
padding: 0 0rpx 20rpx;
|
||||
display: flex;
|
||||
padding-bottom: 55rpx;
|
||||
.middle {
|
||||
display: flex;
|
||||
position: relative;
|
||||
@@ -1078,10 +1085,10 @@ export default {
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
}
|
||||
.text_center {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
bottom: -5px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(50%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user