调整app页面图标样式
This commit is contained in:
@@ -1,62 +1,76 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="about">
|
||||
<view class="about-title">{{ deviceInfo.name }}</view>
|
||||
<view class="about-text">设备类型:{{ deviceInfo.devTypeName }}</view>
|
||||
<view class="about-text">设备型号:{{ deviceInfo.devModelName }}</view>
|
||||
<view class="about-text"
|
||||
>设备接入方式:{{ deviceInfo.devAccessMethod === 'cloud' ? 'CLD' : 'MQTT' }}</view
|
||||
>
|
||||
<!-- <view class="about-text">设备注册时间:永久使用</view> -->
|
||||
<view class="about-text">程序版本:{{ deviceInfo.programVersionName }}</view>
|
||||
<view class="about-text">网络设备ID:{{ deviceInfo.ndid }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { queryDeivceById } from '@/common/api/device'
|
||||
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
deviceInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
onLoad(options) {
|
||||
queryDeivceById(options.id).then((res) => {
|
||||
console.log(res)
|
||||
this.deviceInfo = res.data[0]
|
||||
queryByCode('Device_Type').then((res) => {
|
||||
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then((resp) => {
|
||||
console.log(resp)
|
||||
this.deviceInfo.devTypeName = resp[0].data.find((item) => item.id === this.deviceInfo.devType)?.name
|
||||
this.deviceInfo.devModelName = resp[1].data.find(
|
||||
(item) => item.id === this.deviceInfo.devModel,
|
||||
)?.name
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.about {
|
||||
padding: 34rpx;
|
||||
.about-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
.about-text {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="about">
|
||||
<view class="about-title">{{ deviceInfo.name }}</view>
|
||||
<view class="about-text">设备类型:{{ deviceInfo.devTypeName }}</view>
|
||||
<view class="about-text">设备型号:{{ deviceInfo.devModelName }}</view>
|
||||
<view class="about-text">设备接入方式:{{ deviceInfo.devAccessMethod }}</view>
|
||||
<!-- <view class="about-text">设备注册时间:永久使用</view> -->
|
||||
<view class="about-text">程序版本:{{ deviceInfo.programVersionName }}</view>
|
||||
<view class="about-text">网络设备ID:{{ deviceInfo.ndid }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { queryDeivceById } from '@/common/api/device'
|
||||
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
deviceInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
onLoad(options) {
|
||||
queryDeivceById(options.id).then((res) => {
|
||||
this.deviceInfo = res.data[0]
|
||||
if (this.deviceInfo.devAccessMethod == 'MQTT') {
|
||||
queryByCode('Device_Type').then((res) => {
|
||||
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then(
|
||||
(resp) => {
|
||||
this.deviceInfo.devTypeName = resp[0].data.find(
|
||||
(item) => item.id === this.deviceInfo.devType,
|
||||
)?.name
|
||||
this.deviceInfo.devModelName = resp[1].data.find(
|
||||
(item) => item.id === this.deviceInfo.devModel,
|
||||
)?.name
|
||||
this.loading = false
|
||||
},
|
||||
)
|
||||
})
|
||||
} else {
|
||||
queryByCode('DEV_CLD').then((res) => {
|
||||
this.deviceInfo.devTypeName = res.data.name
|
||||
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then(
|
||||
(resp) => {
|
||||
this.deviceInfo.devModelName = resp[1].data.find(
|
||||
(item) => item.id === this.deviceInfo.devModel,
|
||||
)?.name
|
||||
this.loading = false
|
||||
},
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.about {
|
||||
padding: 34rpx;
|
||||
.about-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
.about-text {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -159,6 +159,7 @@ export default {
|
||||
domLoading: true,
|
||||
loading: true,
|
||||
deviceInfo: {},
|
||||
device: {},
|
||||
navMenuActive: 0,
|
||||
navHeight: 0,
|
||||
img: '',
|
||||
@@ -185,8 +186,8 @@ export default {
|
||||
],
|
||||
content: [
|
||||
{
|
||||
iconPath: '/static/report.png',
|
||||
text: '详情',
|
||||
iconPath: '/static/tongji.png',
|
||||
text: '事件',
|
||||
},
|
||||
// {
|
||||
// iconPath: '/static/record.png',
|
||||
@@ -243,8 +244,22 @@ export default {
|
||||
this.$util.toast('下载成功')
|
||||
} 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.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
|
||||
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',
|
||||
})
|
||||
} else if (e.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||
} else if (e.text === '移交') {
|
||||
@@ -526,6 +541,8 @@ export default {
|
||||
|
||||
onLoad(options) {
|
||||
this.pageOptions = options
|
||||
this.device = JSON.parse(options.device)
|
||||
console.log('🚀 ~ options:', options)
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
this.devId = options.id
|
||||
this.isPrimaryUser = options.isPrimaryUser
|
||||
|
||||
@@ -12,17 +12,16 @@
|
||||
style="margin-top: 30rpx"
|
||||
>
|
||||
<view class="content-item-header-icon">
|
||||
<image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image>
|
||||
<!-- <image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image> -->
|
||||
<Cn-icon-transient :name="`运行告警`" />
|
||||
</view>
|
||||
</uni-badge>
|
||||
<view class="content-item-header-right">
|
||||
<view class="content-item-header-right-title">{{ item.equipmentName }}</view>
|
||||
<!-- <view class="content-item-header-right-des">{{ item.engineeringName }} {{ item.projectName }}</view> -->
|
||||
|
||||
<view class="content-item-header-right-des">工程名称:{{ item.engineeringName }}</view>
|
||||
<view class="content-item-header-right-des">项目名称:{{ item.projectName }}</view>
|
||||
<!-- <view class="content-item-header-right-des">监测点名称:{{ item.lineName }}</view> -->
|
||||
<!-- <view class="content-item-header-right-des">暂态类型:{{ item.showName }}</view> -->
|
||||
<!-- <view class="content-item-header-right-des">{{ item.subTitle }}</view> -->
|
||||
|
||||
</view>
|
||||
<view class="ml10" v-if="type === '0' || item.status != '1'">
|
||||
<uni-icons type="search" size="25" color="#376cf3"></uni-icons
|
||||
@@ -30,21 +29,7 @@
|
||||
</view>
|
||||
<view class="content-item-footer">{{ item.subTitle }}</view>
|
||||
</view>
|
||||
<!-- <uni-card
|
||||
:title="item.equipmentName"
|
||||
:extra="item.status == '1' ? '' : '未读'"
|
||||
:sub-title="item.subTitle"
|
||||
thumbnail="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png"
|
||||
@click="jump(item)"
|
||||
v-for="(item, index) in store.data"
|
||||
:key="index"
|
||||
>
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
|
||||
{{ item2.showName + ':' + (item2.value == 3.1415926 ? '-' : item2.value) + (item2.unit || '') }}
|
||||
</view>
|
||||
</view>
|
||||
</uni-card> -->
|
||||
|
||||
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||
@@ -143,17 +128,17 @@ export default {
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
if (this.type === '0') {
|
||||
// if (this.type === '0') {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/messageDetail?detail=' + encodeURIComponent(str) })
|
||||
} else {
|
||||
if (item.status != '1') {
|
||||
item.status = '1'
|
||||
updateStatus({
|
||||
eventIds: [item.id],
|
||||
})
|
||||
}
|
||||
}
|
||||
// } else {
|
||||
// if (item.status != '1') {
|
||||
// item.status = '1'
|
||||
// updateStatus({
|
||||
// eventIds: [item.id],
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -178,10 +163,11 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 8rpx;
|
||||
background: $uni-theme-color;
|
||||
// background: $uni-theme-color;
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.content-item-header-right {
|
||||
|
||||
Reference in New Issue
Block a user