first commit

This commit is contained in:
仲么了
2023-11-16 15:13:28 +08:00
commit 6023eac4fe
209 changed files with 34095 additions and 0 deletions

119
pages/terminal/terminal.css Normal file
View File

@@ -0,0 +1,119 @@
page{
background: #F0F0F0;
}
/* 主体开始 */
.terminal-body{
background: #F0F0F0;
}
/* 内容开始 */
.terminal-content{
display: flex;
flex-direction: column;
justify-content: flex-start;
height: 522rpx;
background: #FFFFFF;
margin-bottom: 20rpx;
}
.terminal-content-line-one{
height: 166rpx;
color: #000000;
font-size: 30rpx;
margin: 0 40rpx;
display: flex;
flex-direction: row;
align-items: center;
}
.terminal-content-line{
height: 2rpx;
background: #F0F0F0;
}
.terminal-content-line-two{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
height: 78rpx;
}
.terminal-content-line-two-left{
width: 6rpx;
height: 34rpx;
margin-left: 40rpx;
}
.terminal-content-line-two-right{
margin-left: 14rpx;
font-size: 30rpx;
font-weight:500;
}
.terminal-content-line-three{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin: 0 40rpx;
height: 92rpx;
}
.terminal-content-line-three-left{
height: 42rpx;
font-size: 30rpx;
color: #303233;
}
.terminal-content-line-three-right{
height: 36rpx;
font-size: 26rpx;
color: #999999;
}
.terminal-content-line-four{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin: 0 40rpx;
height: 92rpx;
}
.terminal-content-line-four-left{
height: 42rpx;
font-size: 30rpx;
color: #303233;
}
.terminal-content-line-four-right{
height: 36rpx;
font-size: 26rpx;
color: #999999;
}
.terminal-content-line-five{
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin: 0 40rpx;
height: 92rpx;
}
.terminal-content-line-five-left{
height: 42rpx;
font-size: 30rpx;
color: #303233;
}
.terminal-content-line-five-right{
height: 36rpx;
font-size: 26rpx;
color: #999999;
}
/* 内容结束 */
/* 重试页面开始 */
.error-block{
height: 60%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: absolute;
top: -10%;
margin-top: 300rpx;
}
.retry_button{
margin-top: 10rpx;
border-radius: 10%;
}
/* 重试页面结束 */
/* 主体结束 */

129
pages/terminal/terminal.vue Normal file
View File

@@ -0,0 +1,129 @@
<template>
<view>
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
<view class="terminal-body" v-if="errorFlag==0">
<view class="terminal-content" @click="jumpToTerminalDetails(device.timeID,device.devIndex)" v-for="device in deviceList">
<view class="terminal-content-line-one">
{{showTime}}{{device.bdzName}}{{device.devName}}发生终端状态异常{{device.allNum}}
</view>
<view class="terminal-content-line"></view>
<view class="terminal-content-line-two">
<image src="/static/pic/rectangle.png" class="terminal-content-line-two-left"></image>
<view class="terminal-content-line-two-right">
异常详情
</view>
</view>
<view class="terminal-content-line-three">
<view class="terminal-content-line-three-left">
终端告警
</view>
<view class="terminal-content-line-three-right">
{{device.alarmNum}}
</view>
</view>
<view class="terminal-content-line"></view>
<view class="terminal-content-line-four">
<view class="terminal-content-line-four-left">
通讯中断
</view>
<view class="terminal-content-line-four-right">
{{device.comOutNum}}
</view>
</view>
<view class="terminal-content-line"></view>
<view class="terminal-content-line-five">
<view class="terminal-content-line-five-left">
终端流量
</view>
<view class="terminal-content-line-five-right">
{{device.flowNum}}%
</view>
</view>
</view>
</view>
<view class="error-block" v-else>
<view class="error-text">
网络出错请重试
</view>
<button class="retry_button" @click="retry">重试</button>
</view>
</view>
</template>
<script>
import back from '../../components/back.vue';
export default {
data() {
return {
pageNameFlag:1,
showFlag:0,
pageName:'异常终端列表',
radioFlag:0,
devMsgIndex:'',
deviceList:[],
page:1,
showTime:'',
errorFlag:0
}
},
methods: {
queryDeviceList(){
var that = this;
uni.request({
url: that.serverUrl+'/deviceMsg/deviceList',
method: 'POST',
data: {
devMsgIndex: that.devMsgIndex,
page:that.page++,
num:20
},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
sslVerify: false,
success: (res) => {
uni.hideLoading();
if (res.data.resultCode == '10000') {
var list = eval(res.data.data)
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
that.deviceList = that.deviceList.concat(list);
}
} else {
that.errorFlag = 1
}
},
fail: (re) => {
that.errorFlag = 1
}
});
},
jumpToTerminalDetails(timeID,devIndex){
var that = this;
uni.navigateTo({
url:'../terminalDetails/terminalDetails?devIndex='+devIndex+"&timeID="+timeID+"&showTime="+that.showTime
})
},
retry(){
this.errorFlag=0;
this.page=1;
this.queryDeviceList();
}
},
onLoad(e) {
this.devMsgIndex = e.devMsgIndex;
this.showTime=e.showTime;
this.queryDeviceList();
},
onReachBottom(){
this.queryDeviceList();
},
components:{
back
}
}
</script>
<style>
@import url("terminal.css");
</style>