设备消息
This commit is contained in:
@@ -2,14 +2,14 @@
|
|||||||
"version": "2",
|
"version": "2",
|
||||||
"prompt": "template",
|
"prompt": "template",
|
||||||
"title": "服务协议和隐私政策",
|
"title": "服务协议和隐私政策",
|
||||||
"message": " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
"message": " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://pqmcn.com:8092/#/agreement\">《服务协议》</a>和<a href=\"https://pqmcn.com:8092/#/policy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||||
"buttonAccept": "同意并接受",
|
"buttonAccept": "同意并接受",
|
||||||
"buttonRefuse": "暂不同意",
|
"buttonRefuse": "暂不同意",
|
||||||
"hrefLoader": "system|default",
|
"hrefLoader": "system|default",
|
||||||
"backToExit":"false",
|
"backToExit":"false",
|
||||||
"second": {
|
"second": {
|
||||||
"title": "确认提示",
|
"title": "确认提示",
|
||||||
"message": " 进入应用前,你需先同意<a href=\"\">《用户协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
|
"message": " 进入应用前,你需先同意<a href=\"https://pqmcn.com:8092/#/agreement\">《用户协议》</a>和<a href=\"https://pqmcn.com:8092/#/policy\">《隐私政策》</a>,否则将退出应用。",
|
||||||
"buttonAccept": "同意并继续",
|
"buttonAccept": "同意并继续",
|
||||||
"buttonRefuse": "退出应用"
|
"buttonRefuse": "退出应用"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ export default {
|
|||||||
access_token: 'access_token', // token
|
access_token: 'access_token', // token
|
||||||
refresh_token: 'refresh_token', // 刷新token
|
refresh_token: 'refresh_token', // 刷新token
|
||||||
dictData: 'dictData', // 字典数据
|
dictData: 'dictData', // 字典数据
|
||||||
|
messageCount: 'messageCount', // 消息数量
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
],
|
||||||
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios" : {
|
||||||
|
|||||||
11
pages.json
11
pages.json
@@ -222,7 +222,13 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/message/run",
|
"path": "pages/message/run",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "系统消息"
|
"navigationBarTitleText": "运行事件"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/message/runDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "运行事件详情"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -468,9 +474,8 @@
|
|||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "灿能电力",
|
"navigationBarTitleText": "灿能电力",
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
"backgroundColor": "#f3f4f5"
|
"backgroundColor": "#f3f4f5",
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
,
|
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
engineeringList: [],
|
engineeringList: [],
|
||||||
navTabHeight: 0,
|
navTabHeight: 0,
|
||||||
|
timer: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -142,6 +143,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDevCount() {
|
getDevCount() {
|
||||||
|
if (!this.select.engineeringId) return
|
||||||
getDevCount(this.select.engineeringId).then((res) => {
|
getDevCount(this.select.engineeringId).then((res) => {
|
||||||
// Object.assign(this.devCount, res.data)
|
// Object.assign(this.devCount, res.data)
|
||||||
this.devCount = res.data
|
this.devCount = res.data
|
||||||
@@ -152,7 +154,24 @@ export default {
|
|||||||
item.runStatus = 1
|
item.runStatus = 1
|
||||||
})
|
})
|
||||||
this.devCount.engineeringListLength = this.engineeringList.length
|
this.devCount.engineeringListLength = this.engineeringList.length
|
||||||
console.log(this.devCount)
|
uni.setStorage({
|
||||||
|
key: this.$cacheKey.messageCount,
|
||||||
|
data: this.devCount,
|
||||||
|
})
|
||||||
|
let messagePage =
|
||||||
|
this.devCount.runCount +
|
||||||
|
this.devCount.eventCount +
|
||||||
|
this.devCount.alarmCount +
|
||||||
|
this.devCount.harmonicCount
|
||||||
|
let minePage = this.devCount.harmonicCount
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: 1,
|
||||||
|
text: messagePage ? messagePage + '' : '',
|
||||||
|
})
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: 2,
|
||||||
|
text: minePage ? minePage + '' : '',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -184,19 +203,13 @@ export default {
|
|||||||
url: `/pages/user/login`,
|
url: `/pages/user/login`,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (
|
|
||||||
this.userInfo.authorities === 'app_vip_user' ||
|
|
||||||
this.userInfo.authorities == 5 ||
|
|
||||||
this.userInfo.authorities === 'tourist'
|
|
||||||
) {
|
|
||||||
// uni.setTabBarBadge({
|
|
||||||
// index: 1,
|
|
||||||
// text: '6',
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
this.init()
|
this.init()
|
||||||
|
this.timer = setInterval(this.getDevCount, 10000) // 定时请求
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onHide() {
|
||||||
|
clearInterval(this.timer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -4,24 +4,25 @@
|
|||||||
<view class="message-nav" @click="jump('run')">
|
<view class="message-nav" @click="jump('run')">
|
||||||
<image mode="aspectFill" class="message-nav-icon" src="/static/message3.png" />
|
<image mode="aspectFill" class="message-nav-icon" src="/static/message3.png" />
|
||||||
<view class="message-nav-label">运行事件</view>
|
<view class="message-nav-label">运行事件</view>
|
||||||
|
<uni-badge :text="messageCount.runCount"></uni-badge>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="message-nav" @click="jump('transient')">
|
<view class="message-nav" @click="jump('transient')">
|
||||||
<image mode="aspectFill" class="message-nav-icon" src="/static/incident.png" />
|
<image mode="aspectFill" class="message-nav-icon" src="/static/incident.png" />
|
||||||
<view class="message-nav-label">暂态事件</view>
|
<view class="message-nav-label">暂态事件</view>
|
||||||
<!-- <uni-badge text="2"></uni-badge>-->
|
<uni-badge :text="messageCount.eventCount"></uni-badge>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="message-nav" @click="jump('steady')">
|
<view class="message-nav" @click="jump('steady')">
|
||||||
<image mode="aspectFill" class="message-nav-icon" src="/static/report.png" />
|
<image mode="aspectFill" class="message-nav-icon" src="/static/report.png" />
|
||||||
<view class="message-nav-label">稳态事件</view>
|
<view class="message-nav-label">稳态事件</view>
|
||||||
<!-- <uni-badge text="3"></uni-badge>-->
|
<uni-badge :text="messageCount.harmonicCount"></uni-badge>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="message-nav" @click="jump('report')">
|
<view class="message-nav" @click="jump('report')">
|
||||||
<image mode="aspectFill" class="message-nav-icon" src="/static/term.png" />
|
<image mode="aspectFill" class="message-nav-icon" src="/static/term.png" />
|
||||||
<view class="message-nav-label">设备告警</view>
|
<view class="message-nav-label">设备告警</view>
|
||||||
<!-- <uni-badge text="1"></uni-badge>-->
|
<uni-badge :text="messageCount.alarmCount"></uni-badge>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -34,6 +35,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
messageCount: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -70,8 +72,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
setInterval(() => {
|
||||||
|
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||||
|
}, 10000) // 定时请求
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.init()
|
this.init()
|
||||||
|
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<view :loading="loading">
|
<view :loading="loading">
|
||||||
<view class="mine">
|
<view class="mine">
|
||||||
<view class="mine-header" @click="jump('basic')">
|
<view class="mine-header" @click="jump('basic')">
|
||||||
<image mode="aspectFill" class="mine-header-head" :src="userInfo.avatar" v-if="userInfo.avatar"/>
|
<image mode="aspectFill" class="mine-header-head" :src="userInfo.avatar" v-if="userInfo.avatar" />
|
||||||
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" v-else/>
|
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" v-else />
|
||||||
<view class="mine-header-name hide-txt">
|
<view class="mine-header-name hide-txt">
|
||||||
<view>{{ userInfo.nickname }}</view>
|
<view>{{ userInfo.nickname }}</view>
|
||||||
<view></view>
|
<view></view>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<uni-icons type="forward" color="#aaa" size="16"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" v-if="userInfo.authorities === 'tourist'" @click="jump('upgrade')">
|
<view class="mine-nav" v-if="userInfo.authorities === 'tourist'" @click="jump('upgrade')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png" />
|
||||||
<view class="mine-nav-label">角色升级</view>
|
<view class="mine-nav-label">角色升级</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,24 +37,25 @@
|
|||||||
@click="jump('scan')"
|
@click="jump('scan')"
|
||||||
v-if="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'"
|
v-if="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'"
|
||||||
>
|
>
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/scan.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/scan.png" />
|
||||||
<view class="mine-nav-label">扫一扫</view>
|
<view class="mine-nav-label">扫一扫</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('engineering')">
|
<view class="mine-nav" @click="jump('engineering')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
|
||||||
<view class="mine-nav-label">工程列表</view>
|
<view class="mine-nav-label">工程列表</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mine-nav" @click="jump('project')">
|
<view class="mine-nav" @click="jump('project')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
|
||||||
<view class="mine-nav-label">项目列表</view>
|
<view class="mine-nav-label">项目列表</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('feedback')">
|
<view class="mine-nav" @click="jump('feedback')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/feedback.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/feedback.png" />
|
||||||
<view class="mine-nav-label">反馈列表</view>
|
<view class="mine-nav-label">反馈列表</view>
|
||||||
|
<uni-badge :text="messageCount.feedBackCount"></uni-badge>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view
|
<!-- <view
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="mine-nav" @click="jump('setupMessage')">
|
<view class="mine-nav" @click="jump('setupMessage')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/message4.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/message4.png" />
|
||||||
<view class="mine-nav-label">消息配置</view>
|
<view class="mine-nav-label">消息配置</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@@ -76,17 +77,17 @@
|
|||||||
@click="jump('engineering/setting')"
|
@click="jump('engineering/setting')"
|
||||||
v-if="userInfo.authorities === 'engineering_user'"
|
v-if="userInfo.authorities === 'engineering_user'"
|
||||||
>
|
>
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png" />
|
||||||
<view class="mine-nav-label">关注工程配置</view>
|
<view class="mine-nav-label">关注工程配置</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('setupServer')">
|
<view class="mine-nav" @click="jump('setupServer')">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server2.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/server2.png" />
|
||||||
<view class="mine-nav-label">服务内容配置</view>
|
<view class="mine-nav-label">服务内容配置</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('setup')" style="border-bottom: none">
|
<view class="mine-nav" @click="jump('setup')" style="border-bottom: none">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png"/>
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png" />
|
||||||
<view class="mine-nav-label">设置</view>
|
<view class="mine-nav-label">设置</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@@ -104,14 +105,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {roleUpdate, autoLogin} from '@/common/api/user'
|
import { roleUpdate, autoLogin } from '@/common/api/user'
|
||||||
import {transferDevice, shareDevice} from '@/common/api/device'
|
import { transferDevice, shareDevice } from '@/common/api/device'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
messageCount: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -139,10 +141,12 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.init()
|
this.init()
|
||||||
|
setInterval(() => {
|
||||||
|
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||||
|
}, 10000) // 定时请求
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {},
|
||||||
},
|
|
||||||
upgrade(code) {
|
upgrade(code) {
|
||||||
console.log(code)
|
console.log(code)
|
||||||
roleUpdate({
|
roleUpdate({
|
||||||
@@ -231,18 +235,19 @@ export default {
|
|||||||
},
|
},
|
||||||
transferDevice(id) {
|
transferDevice(id) {
|
||||||
transferDevice(id).then((res) => {
|
transferDevice(id).then((res) => {
|
||||||
uni.navigateTo({url: '/pages/mine/result?type=transferDevice&id=' + id})
|
uni.navigateTo({ url: '/pages/mine/result?type=transferDevice&id=' + id })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
shareDevice(id) {
|
shareDevice(id) {
|
||||||
shareDevice(id).then((res) => {
|
shareDevice(id).then((res) => {
|
||||||
uni.navigateTo({url: '/pages/mine/result?type=shareDevice&id=' + id})
|
uni.navigateTo({ url: '/pages/mine/result?type=shareDevice&id=' + id })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
this.store.params.type = 3
|
this.store.params.type = 3
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach(item => {
|
this.store.data.forEach(item => {
|
||||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
||||||
})
|
})
|
||||||
console.log(this.store.data)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<Cn-page :loading='loading'>
|
<Cn-page :loading="loading">
|
||||||
<view slot='body'>
|
<view class="content" slot="body">
|
||||||
<view class='index'>
|
<uni-card
|
||||||
<uni-list>
|
:title="item.equipmentName"
|
||||||
<uni-list-item title="登录成功" rightText="9-18" />
|
:extra="item.status === '1' ? '' : '未读'"
|
||||||
<uni-list-item title="登录成功" rightText="9-18" />
|
:sub-title="item.startTime"
|
||||||
<uni-list-item title="登录成功" note="新用户" rightText="9-18" />
|
@click="jump(item)"
|
||||||
</uni-list>
|
v-for="(item, index) in store.data"
|
||||||
<uni-load-more status="nomore"></uni-load-more>
|
:key="index"
|
||||||
|
>
|
||||||
|
<view class="term-list-bottom">
|
||||||
|
<view class="term-list-bottom-item">
|
||||||
|
{{ item.engineeringName +' ' + item.projectName }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
|
||||||
|
{{ item2.showName + ':' + 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.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,7 +44,7 @@ export default {
|
|||||||
this.store.params.type = 2
|
this.store.params.type = 2
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach(item => {
|
this.store.data.forEach(item => {
|
||||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
||||||
})
|
})
|
||||||
console.log(this.store.data)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -42,7 +53,7 @@ export default {
|
|||||||
},
|
},
|
||||||
jump(item) {
|
jump(item) {
|
||||||
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||||
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
uni.navigateTo({url: '/pages/message/runDetail?detail=' + encodeURIComponent(str)})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
68
pages/message/runDetail.vue
Normal file
68
pages/message/runDetail.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading="loading">
|
||||||
|
<view class="detail" slot="body">
|
||||||
|
<view class="detail-content" style="font-size: 32rpx">
|
||||||
|
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
||||||
|
<view>{{ detail.startTime }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="detail-content">
|
||||||
|
<view class="detail-content-title mb20">基础信息</view>
|
||||||
|
<view class="mb10">{{ detail.title }}</view>
|
||||||
|
<view>
|
||||||
|
{{ detail.engineeringName + '' + detail.projectName }}
|
||||||
|
</view>
|
||||||
|
<view v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||||
|
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
||||||
|
</view>
|
||||||
|
<!-- <view class="space-between">请您评价本次事件是否对设备造成影响
|
||||||
|
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="detail-content">
|
||||||
|
<view class="detail-content-title mb20">瞬时波形图</view>
|
||||||
|
<image style="width: 100%" src="/static/boxing1.jpeg" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
<view class="detail-content">
|
||||||
|
<view class="detail-content-title mb20">RMS波形图</view>
|
||||||
|
<image style="width: 100%" src="/static/boxing2.jpeg" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { updateStatus } from '@/common/api/message'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
detail: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
console.log(options.detail)
|
||||||
|
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||||
|
this.loading = false
|
||||||
|
updateStatus([this.detail.id])
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.detail {
|
||||||
|
padding: 20rpx 0;
|
||||||
|
|
||||||
|
.detail-content {
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #fff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
|
||||||
|
.detail-content-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #111;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,57 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<Cn-page :loading="loading">
|
||||||
<uni-list :border="false">
|
<view class="content" slot="body">
|
||||||
<uni-list-item
|
<uni-card
|
||||||
show-badge
|
:title="item.equipmentName"
|
||||||
badgeType="error"
|
:extra="item.status === '1' ? '' : '未读'"
|
||||||
isDot
|
:sub-title="item.startTime"
|
||||||
badge-text="未读"
|
@click="jump(item)"
|
||||||
title="发生稳态越限监测点10个"
|
v-for="(item, index) in store.data"
|
||||||
note="2023-02-03"
|
:key="index"
|
||||||
clickable
|
>
|
||||||
@click="jump"
|
<view class="term-list-bottom">
|
||||||
/>
|
<view class="term-list-bottom-item">
|
||||||
<uni-list-item
|
{{ item.engineeringName +' ' + item.projectName }}
|
||||||
show-badge
|
|
||||||
badgeType="error"
|
|
||||||
isDot
|
|
||||||
badge-text="未读"
|
|
||||||
title="发生稳态越限监测点10个"
|
|
||||||
note="2023-02-02"
|
|
||||||
clickable
|
|
||||||
@click="jump"
|
|
||||||
/>
|
|
||||||
<uni-list-item
|
|
||||||
show-badge
|
|
||||||
badgeType="error"
|
|
||||||
isDot
|
|
||||||
badge-text="未读"
|
|
||||||
title="发生稳态越限监测点10个"
|
|
||||||
note="2023-02-01"
|
|
||||||
clickable
|
|
||||||
@click="jump"
|
|
||||||
/>
|
|
||||||
<uni-list-item
|
|
||||||
badgeType="error"
|
|
||||||
isDot
|
|
||||||
badge-text="未读"
|
|
||||||
title="发生稳态越限监测点10个"
|
|
||||||
note="2023-01-31"
|
|
||||||
clickable
|
|
||||||
@click="jump"
|
|
||||||
/>
|
|
||||||
<uni-list-item
|
|
||||||
badgeType="error"
|
|
||||||
isDot
|
|
||||||
badge-text="未读"
|
|
||||||
title="发生稳态越限监测点10个"
|
|
||||||
note="2023-01-30"
|
|
||||||
clickable
|
|
||||||
@click="jump"
|
|
||||||
/>
|
|
||||||
</uni-list>
|
|
||||||
<uni-load-more status="nomore"></uni-load-more>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
|
||||||
|
{{ item2.showName + ':' + 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.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import list from '@/common/js/list'
|
import list from '@/common/js/list'
|
||||||
@@ -73,8 +43,8 @@ export default {
|
|||||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||||
this.store.params.type = 1
|
this.store.params.type = 1
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach((item) => {
|
this.store.data.forEach(item => {
|
||||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
||||||
})
|
})
|
||||||
console.log(this.store.data)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
this.store.params.type = 0
|
this.store.params.type = 0
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach((item) => {
|
this.store.data.forEach((item) => {
|
||||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag)?.name
|
||||||
})
|
})
|
||||||
console.log(this.store.data)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -199,7 +199,6 @@ export default {
|
|||||||
this.phone = userInfo.user_name
|
this.phone = userInfo.user_name
|
||||||
}
|
}
|
||||||
uni.removeStorageSync(this.$cacheKey.access_token)
|
uni.removeStorageSync(this.$cacheKey.access_token)
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
BIN
static/logo_216.png
Normal file
BIN
static/logo_216.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user