消息列表优化
@@ -35,6 +35,7 @@ export default {
|
||||
firstCallBack: null,
|
||||
loadedCallback: null,
|
||||
reload() {
|
||||
if(this.status == 'loading') return
|
||||
this.data = []
|
||||
this.status = 'loading'
|
||||
this.empty = false
|
||||
|
||||
@@ -45,10 +45,10 @@ export default {
|
||||
str = '/static/device_bad.png'
|
||||
break
|
||||
case 2:
|
||||
str = '/static/device.png'
|
||||
str = '/static/device_success.png'
|
||||
break
|
||||
default:
|
||||
str = '/static/device.png'
|
||||
str = '/static/device_success.png'
|
||||
break
|
||||
}
|
||||
return str
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "灿能物联",
|
||||
"appid" : "__UNI__88BC25B",
|
||||
"description" : "",
|
||||
"versionName" : "1.4.1",
|
||||
"versionCode" : 141,
|
||||
"versionName" : "1.4.2",
|
||||
"versionCode" : 142,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
103
pages.json
@@ -192,7 +192,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/transient",
|
||||
"path": "pages/message/message",
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
@@ -215,98 +215,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/transientDetail",
|
||||
"path": "pages/message/messageDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "暂态事件详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/report",
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
//关闭窗口回弹效果
|
||||
"titleNView": {
|
||||
"titleText": "设备告警",
|
||||
// 窗口的标题
|
||||
"titleAlign": "center",
|
||||
"padding-right": "20rpx",
|
||||
"buttons": [
|
||||
{
|
||||
"text": "一键已读",
|
||||
"fontSize": "28rpx",
|
||||
"select": false,
|
||||
"width": "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/reportList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "异常设备列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/reportDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设备告警详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/steady",
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
//关闭窗口回弹效果
|
||||
"titleNView": {
|
||||
"titleText": "稳态越限",
|
||||
// 窗口的标题
|
||||
"titleAlign": "center",
|
||||
"padding-right": "20rpx",
|
||||
"buttons": [
|
||||
{
|
||||
"text": "一键已读",
|
||||
"fontSize": "28rpx",
|
||||
"select": false,
|
||||
"width": "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/run",
|
||||
"style": {
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
//关闭窗口回弹效果
|
||||
"titleNView": {
|
||||
"titleText": "运行事件",
|
||||
// 窗口的标题
|
||||
"titleAlign": "center",
|
||||
"padding-right": "20rpx",
|
||||
"buttons": [
|
||||
{
|
||||
"text": "一键已读",
|
||||
"fontSize": "28rpx",
|
||||
"select": false,
|
||||
"width": "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/runDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "运行事件详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/device/transfer",
|
||||
"style": {
|
||||
@@ -451,18 +364,6 @@
|
||||
"navigationBarTitleText": "网关详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/steadyList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "越限监测点列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/steadyDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "稳态事件详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/project/transfer",
|
||||
"style": {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
></uni-data-select>
|
||||
</div>
|
||||
<view class="charts-box">
|
||||
<view class="data-time">{{ time }}</view>
|
||||
<qiun-data-charts type="bar" :ontouch="true" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -30,6 +31,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
dataTime: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -44,6 +49,7 @@ export default {
|
||||
},
|
||||
],
|
||||
parity: 2,
|
||||
time: '',
|
||||
dataOptions: [],
|
||||
dataRadio: 0,
|
||||
renderData: {
|
||||
@@ -72,9 +78,10 @@ export default {
|
||||
'#9A60B4',
|
||||
'#ea7ccc',
|
||||
],
|
||||
padding: [20, 10, 0, 0],
|
||||
padding: [0, 10, 0, 0],
|
||||
legend: {
|
||||
position: 'top',
|
||||
float: 'left',
|
||||
},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
@@ -105,10 +112,10 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
basicData: {
|
||||
handler: function (newVal, oldVal) {
|
||||
handler(newVal, oldVal) {
|
||||
console.log(this.basicData)
|
||||
let basicData = JSON.parse(JSON.stringify(this.basicData))
|
||||
this.dataRadio = 0
|
||||
// this.dataRadio = 0
|
||||
this.renderData = {
|
||||
电网侧: {
|
||||
Apf_HarmI: {},
|
||||
@@ -176,6 +183,8 @@ export default {
|
||||
this.dataOptions = dataOptions
|
||||
console.log(dataOptions)
|
||||
this.initEcharts()
|
||||
console.log(this.dataTime)
|
||||
this.time = this.$util.parseTime(this.dataTime - 8 * 60 * 60)
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
@@ -227,6 +236,12 @@ export default {
|
||||
.charts-box {
|
||||
margin-top: 20rpx;
|
||||
height: 100vh;
|
||||
.data-time {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
margin-top: 18rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.header-form {
|
||||
display: flex;
|
||||
|
||||
@@ -21,21 +21,26 @@
|
||||
<view class="grid-card-content-1">
|
||||
<view class="item">{{ item.label }}</view>
|
||||
<view class="item" v-for="(child, childIndex) in item.value" :key="childIndex">
|
||||
{{ child }}
|
||||
<text>{{ child.label }}</text>
|
||||
<text style="font-weight: 700">{{ child.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="module">
|
||||
<view class="module" v-if="IOData.length">
|
||||
<view class="grid-card">
|
||||
<view class="grid-card-content-2">
|
||||
<view class="grid-card-content-6">
|
||||
<template v-for="(item, index) in IOData">
|
||||
<view class="item">{{ item.clDid }}</view>
|
||||
<view class="item">
|
||||
<view style="width: 30rpx"> {{ item.value || '-' }}</view>
|
||||
<view class="item" style="font-weight: 700">
|
||||
{{ item.value || '-' }}
|
||||
<view v-if="item.value"> °C</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-for="(item, index) in 3 - (IOData.length % 3)">
|
||||
<view class="item"></view>
|
||||
<view class="item"> </view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -61,7 +66,7 @@
|
||||
<basic :basicData="basicData"></basic>
|
||||
</view>
|
||||
<view v-else-if="navMenuActive == 1">
|
||||
<xieBo :basicData="basicData"></xieBo>
|
||||
<xieBo :dataTime="dataTime" :basicData="basicData"></xieBo>
|
||||
</view>
|
||||
<view v-else-if="navMenuActive == 2">
|
||||
<power :basicData="basicData"></power>
|
||||
@@ -100,11 +105,22 @@
|
||||
</uni-popup> -->
|
||||
<!-- 输入框示例 -->
|
||||
<uni-popup ref="inputDialog" type="dialog">
|
||||
<uni-popup-dialog ref="inputClose" type="info" mode="input" :title="dialogType"
|
||||
<uni-popup-dialog
|
||||
ref="inputClose"
|
||||
type="info"
|
||||
mode="input"
|
||||
:title="dialogType"
|
||||
value="对话框预置提示内容!"
|
||||
placeholder="请输入内容" @confirm="dialogInputConfirm">
|
||||
<uni-easyinput type="textarea" :maxlength="250" autoHeight v-model="remarkContent"
|
||||
placeholder="请输入备注"></uni-easyinput>
|
||||
placeholder="请输入内容"
|
||||
@confirm="dialogInputConfirm"
|
||||
>
|
||||
<uni-easyinput
|
||||
type="textarea"
|
||||
:maxlength="250"
|
||||
autoHeight
|
||||
v-model="remarkContent"
|
||||
placeholder="请输入备注"
|
||||
></uni-easyinput>
|
||||
</uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -132,6 +148,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataTime: '',
|
||||
remarkContent: '',
|
||||
dialogType: '',
|
||||
domLoading: true,
|
||||
@@ -426,11 +443,21 @@ export default {
|
||||
data.forEach((item) => {
|
||||
if (item.statisticalName === key && item.phase === 'avg') {
|
||||
if (key === 'Apf_RmsI_TolOut(A)') {
|
||||
arr.push( '总输出电流:' + item.statisticalData + 'A')
|
||||
arr.push({
|
||||
label: '总输出电流:',
|
||||
value: item.statisticalData + 'A',
|
||||
})
|
||||
} else {
|
||||
arr.push( '电流畸变率:' + item.statisticalData + '%')
|
||||
arr.push({
|
||||
label: '电流畸变率:',
|
||||
value: item.statisticalData + '%',
|
||||
})
|
||||
// arr.push('电流畸变率:' + item.statisticalData + '%')
|
||||
}
|
||||
}
|
||||
if (item.time) {
|
||||
this.dataTime = item.time.seconds
|
||||
}
|
||||
})
|
||||
})
|
||||
element.value = arr
|
||||
@@ -582,10 +609,9 @@ export default {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 10rpx;
|
||||
width: 200rpx;
|
||||
opacity: 0.8;
|
||||
|
||||
.grid-card-content-2,
|
||||
.grid-card-content-6,
|
||||
.grid-card-content-1 {
|
||||
font-size: 16rpx;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
@click="select.selectProject = true">
|
||||
{{
|
||||
select.projectName
|
||||
? select.projectName.length > 4
|
||||
? select.projectName.substring(0, 4) + '...'
|
||||
? select.projectName.length > 6
|
||||
? select.projectName.substring(0, 6) + '...'
|
||||
: select.projectName
|
||||
: '全部项目'
|
||||
}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="device">
|
||||
<view class="index-device">
|
||||
<view class="nav" :style="{ top: navTabHeight + 'px' }">
|
||||
<!-- <view class="nav-menu" :class="{ 'nav-menu-active': select.engineeringName }" @click="openDrawer"
|
||||
>{{ select.engineeringName || '工程' }}
|
||||
@@ -15,8 +15,8 @@
|
||||
<view class="nav-menu" :class="{ 'nav-menu-active': select.projectName }" @click="selectProject = true">
|
||||
{{
|
||||
select.projectName
|
||||
? select.projectName.length > 4
|
||||
? select.projectName.substring(0, 4) + '...'
|
||||
? select.projectName.length > 12
|
||||
? select.projectName.substring(0, 12) + '...'
|
||||
: select.projectName
|
||||
: '全部项目'
|
||||
}}
|
||||
@@ -337,4 +337,10 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
<style lang="scss">
|
||||
.index-device{
|
||||
.nav-menu {
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<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">
|
||||
<view class="header-item-value">{{ devCount.projectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
@@ -48,17 +48,17 @@
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<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">
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
@@ -79,15 +79,33 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jumpMessage(){
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message',
|
||||
})
|
||||
},
|
||||
eningerNum(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/list',
|
||||
})
|
||||
},
|
||||
projectWarning() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
projectNum() {
|
||||
console.log(now)
|
||||
if (now) {
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list?engineeringName=' + engineering.name + '&engineeringId=' + engineering.id,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list',
|
||||
})
|
||||
}
|
||||
},
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<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)">
|
||||
<view class="header-item-value">{{ devCount.projectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
@@ -35,9 +35,8 @@
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}
|
||||
<view class="header-item-value"
|
||||
>{{ devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0 }}
|
||||
</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
@@ -49,11 +48,11 @@
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item">
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
@@ -85,6 +84,16 @@ export default {
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
eningerNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/list',
|
||||
})
|
||||
},
|
||||
jumpMessage(){
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message',
|
||||
})
|
||||
},
|
||||
projectNum(now) {
|
||||
console.log(now)
|
||||
if (now) {
|
||||
@@ -100,13 +109,11 @@ export default {
|
||||
},
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=' + type
|
||||
url: '/pages/device/list?type=' + type,
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -74,9 +74,6 @@ export default {
|
||||
timer: null,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log('onPullDownRefresh')
|
||||
},
|
||||
computed: {
|
||||
emptyEngineeringName() {
|
||||
if (this.userInfo.authorities === 'tourist') {
|
||||
|
||||
@@ -52,23 +52,27 @@ export default {
|
||||
},
|
||||
jump(type) {
|
||||
switch (type) {
|
||||
case 'login':
|
||||
case 'run':
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/login`,
|
||||
url: `/pages/message/message?type=${2}`,
|
||||
})
|
||||
break
|
||||
case 'gateway':
|
||||
case 'transient':
|
||||
uni.navigateTo({
|
||||
url: `/pages/gateway/list`,
|
||||
url: `/pages/message/message?type=${0}`,
|
||||
})
|
||||
break
|
||||
case 'upgrade':
|
||||
this.$refs.inputDialog.open()
|
||||
case 'steady':
|
||||
uni.navigateTo({
|
||||
url: `/pages/message/message?type=${1}`,
|
||||
})
|
||||
break
|
||||
case 'report':
|
||||
uni.navigateTo({
|
||||
url: `/pages/message/message?type=${3}`,
|
||||
})
|
||||
break
|
||||
default:
|
||||
uni.navigateTo({
|
||||
url: `/pages/message/${type}`,
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
@@ -79,11 +83,11 @@ export default {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
this.timer = setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
}, 1000) // 定时请求
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -142,9 +142,6 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.init()
|
||||
setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
@@ -251,7 +248,7 @@ export default {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
this.timer = setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
}, 1000) // 定时请求
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(this.timer)
|
||||
|
||||
223
pages/message/message.vue
Normal file
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<view class="content-item" v-for="(item, index) in store.data" :key="index" @click="jump(item)">
|
||||
<view class="content-item-header">
|
||||
<uni-badge
|
||||
class="uni-badge-left-margin"
|
||||
:is-dot="true"
|
||||
:text="item.status == '1' ? 0 : 1"
|
||||
absolute="rightTop"
|
||||
size="small"
|
||||
>
|
||||
<view class="content-item-header-icon">
|
||||
<image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image>
|
||||
</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.subTitle }}</view> -->
|
||||
</view>
|
||||
<view class="ml10" v-if="type === '0' || item.status != '1'">🔍</view>
|
||||
</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.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
type: '',
|
||||
staticIcon: '',
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.type = o.type
|
||||
switch (o.type) {
|
||||
case '0':
|
||||
uni.setNavigationBarTitle({ title: '暂态事件' })
|
||||
this.staticIcon = '/static/zantai2.png'
|
||||
break
|
||||
case '1':
|
||||
uni.setNavigationBarTitle({ title: '稳态事件' })
|
||||
this.staticIcon = '/static/steady2.png'
|
||||
break
|
||||
case '2':
|
||||
uni.setNavigationBarTitle({ title: '运行事件' })
|
||||
this.staticIcon = '/static/run2.png'
|
||||
break
|
||||
case '3':
|
||||
uni.setNavigationBarTitle({ title: '设备告警' })
|
||||
this.staticIcon = '/static/device_bad2.png'
|
||||
break
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.loading = true
|
||||
this.init()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要全部标记为已读吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
updateStatus({
|
||||
type: this.type,
|
||||
eventIds: [],
|
||||
}).then(() => {
|
||||
this.loading = true
|
||||
this.store.reload()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = this.type
|
||||
this.store.loadedCallback = () => {
|
||||
this.store.data.forEach((item) => {
|
||||
if (this.type !== '0') {
|
||||
item.subTitle = `于${item.startTime}发生${item.showName}`
|
||||
} else {
|
||||
item.subTitle =
|
||||
`于${item.startTime}发生${item.showName}。` +
|
||||
item.dataSet
|
||||
.map((item2) => {
|
||||
return (
|
||||
item2.showName +
|
||||
':' +
|
||||
(item2.value == 3.1415926 ? '-' : item2.value) +
|
||||
(item2.unit || '')
|
||||
)
|
||||
})
|
||||
.join(',')
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
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],
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
.content-item {
|
||||
margin: 20rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 6rpx 2rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1px solid #ebeef5;
|
||||
background: #fff;
|
||||
.content-item-header {
|
||||
display: flex;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
.content-item-header-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 8rpx;
|
||||
background: $uni-theme-color;
|
||||
}
|
||||
.content-item-header-right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: 100rpx;
|
||||
margin-left: 20rpx;
|
||||
.content-item-header-right-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.content-item-header-right-des {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-item-footer {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
|
||||
.term-list-bottom-item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-card__header-extra-text {
|
||||
color: #dd524d !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,105 +0,0 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
isDot
|
||||
show-badge
|
||||
badgeType="error"
|
||||
:badge-text="item.status == 1 ? '' : '未读'"
|
||||
:title="'告警代码:'+item.code"
|
||||
:note="item.startTime"
|
||||
@click="jump(item)"
|
||||
clickable
|
||||
v-for="(item, index) in store.data"
|
||||
/>
|
||||
</uni-list>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要全部标记为已读吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
updateStatus({
|
||||
type: 3,
|
||||
eventIds:[]
|
||||
}).then(() => {
|
||||
this.store.reload()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 3
|
||||
this.store.firstCallBack = (res) => {
|
||||
// this.store.data.forEach((item) => {
|
||||
// item.title = dictData.find((item2) => item2.code === item.tag)?.name
|
||||
// })
|
||||
// console.log(this.store.data)
|
||||
this.loading = false
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/reportDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
|
||||
.term-list-bottom-item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-card__header-extra-text {
|
||||
color: #dd524d !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,61 +0,0 @@
|
||||
<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="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 告警代码:{{ detail.code }}</view>
|
||||
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
||||
</view>
|
||||
</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
|
||||
if (this.detail.status != 1) {
|
||||
updateStatus({
|
||||
eventIds: [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,113 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
|
||||
<uni-card title="灿能园区,NPQS_682发生设备状态异常一次" sub-title="2023-02-27 15:13:29" @click="jump">
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备告警</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>通讯设备</view>
|
||||
<view>1次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备流量</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-card title="灿能园区,NPQS_681发生设备状态异常一次" sub-title="2023-02-27 13:13:29" @click="jump">
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备告警</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>通讯设备</view>
|
||||
<view>1次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备流量</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-card title="灿能园区,NPQS_682发生设备状态异常一次" sub-title="2023-02-27 11:13:29" @click="jump">
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备告警</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>通讯设备</view>
|
||||
<view>1次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备流量</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-card title="灿能园区,NPQS_682发生设备状态异常一次" sub-title="2023-02-27 09:13:29" @click="jump">
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备告警</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>通讯设备</view>
|
||||
<view>1次</view>
|
||||
</view>
|
||||
<view class="term-list-bottom-item">
|
||||
<view>设备流量</view>
|
||||
<view>0次</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
title: '灿能'
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
jump () {
|
||||
console.log(123);
|
||||
uni.navigateTo({ url: '/pages/message/termDetail' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item{
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
.term-list-bottom-item:last-of-type{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,82 +0,0 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
isDot
|
||||
show-badge
|
||||
badgeType="error"
|
||||
:badge-text="item.status == 1 ? '' : '未读'"
|
||||
:title="item.showName"
|
||||
:note="item.startTime"
|
||||
@click="jump(item)"
|
||||
clickable
|
||||
v-for="(item, index) in store.data"
|
||||
/>
|
||||
</uni-list>
|
||||
<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>
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要全部标记为已读吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
updateStatus({
|
||||
type: 2,
|
||||
eventIds:[]
|
||||
}).then(() => {
|
||||
this.store.reload()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 2
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.loading = false
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/runDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.content {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
/deep/ .uni-badge {
|
||||
background-color: unset !important;
|
||||
color: #dd524d !important;
|
||||
font-size: 28rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,61 +0,0 @@
|
||||
<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="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 事件名称:{{ detail.showName }}</view>
|
||||
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
||||
</view>
|
||||
</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
|
||||
if (this.detail.status != 1) {
|
||||
updateStatus({
|
||||
eventIds: [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,105 +0,0 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
isDot
|
||||
show-badge
|
||||
badgeType="error"
|
||||
:badge-text="item.status == 1 ? '' : '未读'"
|
||||
:title="item.showName"
|
||||
:note="item.startTime"
|
||||
@click="jump(item)"
|
||||
clickable
|
||||
v-for="(item, index) in store.data"
|
||||
/>
|
||||
</uni-list>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要全部标记为已读吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
updateStatus({
|
||||
type: 1,
|
||||
eventIds:[]
|
||||
}).then(() => {
|
||||
this.store.reload()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 1
|
||||
this.store.firstCallBack = (res) => {
|
||||
// this.store.data.forEach((item) => {
|
||||
// item.title = dictData.find((item2) => item2.code === item.tag)?.name
|
||||
// })
|
||||
// console.log(this.store.data)
|
||||
this.loading = false
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/steadyDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
|
||||
.term-list-bottom-item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-card__header-extra-text {
|
||||
color: #dd524d !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,61 +0,0 @@
|
||||
<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="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 事件名称:{{ detail.showName }}</view>
|
||||
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
||||
</view>
|
||||
</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
|
||||
if (this.detail.status != 1) {
|
||||
updateStatus({
|
||||
eventIds: [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,54 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="detail-content " style="font-size:32rpx">
|
||||
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
||||
<view>2023-02-14</view>
|
||||
</view>
|
||||
<uni-list :border="false">
|
||||
<uni-list-item title="灿能园区,CN_NPQS682发生稳态越线" note="电压谐波畸变率越限45分钟,5次电压谐波含有率越限5分钟" clickable @click="jump" />
|
||||
<uni-list-item title="灿能园区,CN_NPQS682发生稳态越线" note="电压谐波畸变率越限27分钟,5次电压谐波含有率越限3分钟" clickable @click="jump" />
|
||||
<uni-list-item title="灿能园区,CN_NPQS682发生稳态越线" note="电压谐波畸变率越限45分钟,5次电压谐波含有率越限5分钟" clickable @click="jump" />
|
||||
<uni-list-item title="灿能园区,CN_NPQS682发生稳态越线" note="电压谐波畸变率越限45分钟,5次电压谐波含有率越限5分钟" clickable @click="jump" />
|
||||
<uni-list-item title="灿能园区,CN_NPQS682发生稳态越线" note="电压谐波畸变率越限45分钟,5次电压谐波含有率越限5分钟" clickable @click="jump" />
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
title: '灿能'
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
jump () {
|
||||
uni.navigateTo({ url: '/pages/message/steadyDetail' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
.detail-content{
|
||||
padding: 20rpx 30rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-badge {
|
||||
background-color: unset !important;
|
||||
color: #dd524d !important;
|
||||
font-size: 28rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,106 +0,0 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-card
|
||||
:title="item.showName"
|
||||
:extra="item.status == '1' ? '' : '未读'"
|
||||
:sub-title="item.startTime"
|
||||
@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.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要全部标记为已读吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
updateStatus({
|
||||
type: 0,
|
||||
eventIds:[]
|
||||
}).then(() => {
|
||||
this.store.reload()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 0
|
||||
this.store.firstCallBack = (res) => {
|
||||
// this.store.data.forEach((item) => {
|
||||
// item.title = dictData.find((item2) => item2.code === item.tag)?.name
|
||||
// })
|
||||
// console.log(this.store.data)
|
||||
this.loading = false
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
|
||||
.term-list-bottom-item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-card__header-extra-text {
|
||||
color: #dd524d !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
break
|
||||
case 'book':
|
||||
uni.openDocument({
|
||||
filePath: "/static/user_manual.docx",
|
||||
filePath: '/static/user_manual.docx',
|
||||
success: function (res) {
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
@@ -92,6 +92,10 @@ export default {
|
||||
content: '是否确认退出登录?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync(this.$cacheKey.messageCount)
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.setBadgeNumber(0)
|
||||
// #endif
|
||||
uni.reLaunch({
|
||||
url: `/pages/user/login`,
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="content device" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
|
||||
<view v-show="navMenuActive == 0">
|
||||
<uni-card
|
||||
<!-- <uni-card
|
||||
:title="item.equipmentName"
|
||||
:sub-title="'创建时间:' + item.createTime"
|
||||
:extra="item.mac"
|
||||
@@ -31,7 +31,9 @@
|
||||
padding="0"
|
||||
:thumbnail="deviceIcon(item.runStatus)"
|
||||
>
|
||||
</uni-card>
|
||||
</uni-card> -->
|
||||
<Cn-device-card v-for="(item, index) in store.data" :device="item" :key="index">
|
||||
</Cn-device-card>
|
||||
<Cn-empty v-if="store.empty"></Cn-empty>
|
||||
<uni-load-more
|
||||
v-if="store.data && store.data.length > 0"
|
||||
@@ -297,7 +299,7 @@ export default {
|
||||
}, 1000)
|
||||
console.log(option.project)
|
||||
this.project = JSON.parse(decodeURIComponent(option.project))
|
||||
this.project.topologyDiagramPaths.forEach(item=>{
|
||||
this.project.topologyDiagramPaths.forEach((item) => {
|
||||
item.filePath = this.$config.static + item.filePath
|
||||
})
|
||||
this.init()
|
||||
|
||||
BIN
static/deivce_success.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/device_bad2.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
static/run2.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/steady2.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
static/zantai2.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |