Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
shenmuApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
shenmuApp
Commits
f389e2b7
Commit
f389e2b7
authored
Nov 02, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2023-11-2 zjb需求-接口联调 实时报警 历史报警
parent
47ceb393
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
13 deletions
+70
-13
main.js
shenmu/main.js
+5
-0
logAlarm.nvue
shenmu/pages/tabBar/monitor/logAlarm.nvue
+32
-6
realAlarm.nvue
shenmu/pages/tabBar/monitor/realAlarm.nvue
+33
-7
No files found.
shenmu/main.js
View file @
f389e2b7
...
@@ -3,6 +3,11 @@ import store from './store'
...
@@ -3,6 +3,11 @@ import store from './store'
// #ifndef VUE3
// #ifndef VUE3
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
// const BASEURL = 'http://117.34.103.191:8086' // 生产环境url
const
BASEURL
=
'
http://192.168.3.23:8086
'
// 研发环境url
Vue
.
prototype
.
$BASEURL
=
BASEURL
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$store
=
store
Vue
.
prototype
.
$store
=
store
Vue
.
prototype
.
$adpid
=
"
1111111111
"
Vue
.
prototype
.
$adpid
=
"
1111111111
"
...
...
shenmu/pages/tabBar/monitor/logAlarm.nvue
View file @
f389e2b7
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
<uni-search-bar v-model="query.name" class="uni-mt-10 margin0" radius="5" placeholder="输入设备名查询" clearButton="auto"
<uni-search-bar v-model="query.name" class="uni-mt-10 margin0" radius="5" placeholder="输入设备名查询" clearButton="auto"
cancelButton="none" @confirm="loadData" />
cancelButton="none" @confirm="loadData" />
</view>
</view>
<uni-card v-for="(item,index) in dataList" :title="item.
n
ame" :key='index' :isFull="true"
<uni-card v-for="(item,index) in dataList" :title="item.
deviceN
ame" :key='index' :isFull="true"
:sub-title="'检测项:'+item.
type" :extra="'检测值:'+item.value
" :thumbnail="iconList[2]">
:sub-title="'检测项:'+item.
item" :extra="'检测值:'+item.data
" :thumbnail="iconList[2]">
<uni-row class="demo-uni-row">
<uni-row class="demo-uni-row">
<uni-col :span="8">
<uni-col :span="8">
<view class="demo-uni-col">状态:{{item.
status
}}</view>
<view class="demo-uni-col">状态:{{item.
flg
}}</view>
</uni-col>
</uni-col>
<uni-col :span="16">
<uni-col :span="16">
<view class="demo-uni-col" style="font-size: 16upx;text-align: right;">解除时间:{{item.
t
ime}}</view>
<view class="demo-uni-col" style="font-size: 16upx;text-align: right;">解除时间:{{item.
jcT
ime}}</view>
</uni-col>
</uni-col>
</uni-row>
</uni-row>
</uni-card>
</uni-card>
...
@@ -32,11 +32,13 @@
...
@@ -32,11 +32,13 @@
query: {
query: {
name: ''
name: ''
},
},
page: 0,
pageSize: 10,
devInfo: {
devInfo: {
onNum: 26,
onNum: 26,
offNum: 13,
offNum: 13,
},
},
dataList: [{
dataList: [
/*
{
name: '气象站7号',
name: '气象站7号',
type: '温度',
type: '温度',
value: '39.7℃',
value: '39.7℃',
...
@@ -72,7 +74,7 @@
...
@@ -72,7 +74,7 @@
value: '39.7℃',
value: '39.7℃',
status: '解除',
status: '解除',
time: '2023-10-18 10:03:58'
time: '2023-10-18 10:03:58'
}]
}
*/
]
}
}
},
},
onReady() {
onReady() {
...
@@ -81,6 +83,10 @@
...
@@ -81,6 +83,10 @@
onShow() {
onShow() {
this.loadData()
this.loadData()
},
},
onReachBottom() {
this.pageSize += 10
this.loadData()
},
methods: {
methods: {
loadData() {
loadData() {
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
...
@@ -88,6 +94,26 @@
...
@@ -88,6 +94,26 @@
uni.setNavigationBarTitle({
uni.setNavigationBarTitle({
title: `历史报警-${this.currProInfo.text}`
title: `历史报警-${this.currProInfo.text}`
});
});
uni.request({
url: `${this.$BASEURL}/api/historyAlarm/loadHistoryAlarmByProId`,
method: "get",
header: {
'Accept':'application/json, text/plain, */*',
'Authorization':'Bearer '+this.userInfo.token
},
data: {
page: this.page,
pageSize: this.pageSize,
proId: this.currProInfo.value,
deviceName: this.query.name||''
}
}).then(result => {
let [error, res] = result
if (res.data && res.data.code==200) {
this.dataList = res.data.data.dataList
}
})
},
},
}
}
}
}
...
...
shenmu/pages/tabBar/monitor/realAlarm.nvue
View file @
f389e2b7
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<uni-search-bar v-model="query.name" class="uni-mt-10 margin0" radius="5" placeholder="输入设备名查询" clearButton="auto"
<uni-search-bar v-model="query.name" class="uni-mt-10 margin0" radius="5" placeholder="输入设备名查询" clearButton="auto"
cancelButton="none" @confirm="loadData" />
cancelButton="none" @confirm="loadData" />
</view>
</view>
<uni-card v-for="(item,index) in dataList" :title="item.
n
ame" :key='index' :isFull="true"
<uni-card v-for="(item,index) in dataList" :title="item.
deviceN
ame" :key='index' :isFull="true"
:sub-title="'检测项:'+item.
type" :extra="'检测值:'+item.value
" :thumbnail="iconList[2]">
:sub-title="'检测项:'+item.
item" :extra="'检测值:'+item.data
" :thumbnail="iconList[2]">
<uni-row class="demo-uni-row">
<uni-row class="demo-uni-row">
<uni-col :span="16">
<uni-col :span="16">
<view class="demo-uni-col">状态:{{item.
status
}}</view>
<view class="demo-uni-col">状态:{{item.
flg
}}</view>
</uni-col>
</uni-col>
<uni-col :span="8">
<uni-col :span="8">
<view class="demo-uni-col">
<view class="demo-uni-col">
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
export default {
export default {
data() {
data() {
return {
return {
baseUrl: "http://1
92.168.3.23
:8086",
baseUrl: "http://1
17.34.103.191
:8086",
userInfo: {},
userInfo: {},
currProInfo: {},
currProInfo: {},
iconList: [online, offline, wendu],
iconList: [online, offline, wendu],
...
@@ -43,11 +43,13 @@
...
@@ -43,11 +43,13 @@
query: {
query: {
name: ''
name: ''
},
},
page: 0,
pageSize: 10,
devInfo: {
devInfo: {
onNum: 26,
onNum: 26,
offNum: 13,
offNum: 13,
},
},
dataList: [{
dataList: [
/*
{
name: '气象站7号',
name: '气象站7号',
type: '温度',
type: '温度',
value: '39.7℃',
value: '39.7℃',
...
@@ -83,7 +85,7 @@
...
@@ -83,7 +85,7 @@
value: '39.7℃',
value: '39.7℃',
status: '报警',
status: '报警',
time: '2023-10-18 10:03:58'
time: '2023-10-18 10:03:58'
}]
}
*/
]
}
}
},
},
onReady() {
onReady() {
...
@@ -99,6 +101,26 @@
...
@@ -99,6 +101,26 @@
uni.setNavigationBarTitle({
uni.setNavigationBarTitle({
title: `实时报警-${this.currProInfo.text}`
title: `实时报警-${this.currProInfo.text}`
});
});
uni.request({
url: `${this.$BASEURL}/api/nowAlarm/loadNowAlarmByProId`,
method: "get",
header: {
'Accept':'application/json, text/plain, */*',
'Authorization':'Bearer '+this.userInfo.token
},
data: {
page: this.page,
pageSize: this.pageSize,
proId: this.currProInfo.value,
deviceName: this.query.name||''
}
}).then(result => {
let [error, res] = result
if (res.data && res.data.code==200) {
this.dataList = res.data.data.dataList
}
})
},
},
dialogClose() {
dialogClose() {
this.msgType = 'error',
this.msgType = 'error',
...
@@ -112,7 +134,11 @@
...
@@ -112,7 +134,11 @@
},
},
removeAlarm(item) {
removeAlarm(item) {
this.$refs.alertDialog.open()
this.$refs.alertDialog.open()
}
},
onReachBottom() {
this.pageSize += 10
this.loadData()
},
}
}
}
}
</script>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment