475 lines
11 KiB
Vue
475 lines
11 KiB
Vue
<template>
|
|
<view>
|
|
<view class="topTab">
|
|
<tabHeader title="吊车监控"></tabHeader>
|
|
</view>
|
|
<view class="select-box">
|
|
<eselect class="select" :disabled="false" v-model="searchData.team" :options="options" @change="change"></eselect>
|
|
</view>
|
|
<view class="map-box">
|
|
<image src="@/static/img/monitor.png" mode="" style="width: 100%;height: 100%;"></image>
|
|
</view>
|
|
<view class="page-content">
|
|
<view class="search-box">
|
|
<view class="search">
|
|
<!-- <eselect class="search-people" :disabled="false" v-model="searchData.team" :options="options" @change="change"></eselect> -->
|
|
<u--input
|
|
v-model="searchName" type="text" placeholder="全部班组"
|
|
suffixIcon="search" suffixIconStyle="font-size:22px;color: #909399"
|
|
maxlength="15" border="surround" shape="circle"clearable></u--input>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 设备列表 -->
|
|
<view class="devices-box">
|
|
<!-- <u-list @scrolltolower="scrolltolower" enableFlex="true" height="30vh" class="list-box">
|
|
<u-list-item class="list-item" v-for="(item, index) in listData" :key="index"> -->
|
|
<view class="list-box">
|
|
<view class="list-item" v-for="(item, index) in listData" :key="index">
|
|
<view class="item-content">
|
|
<view class="image-box">
|
|
<image src="@/static/img/carIcon.jpg" mode="" style="width: 100%;height: 100%;"></image>
|
|
</view>
|
|
<view class="content-box">
|
|
<view class="item-text">
|
|
<text class="label">周江 18953264867</text>
|
|
</view>
|
|
<view class="item-text">
|
|
<text class="label">1号吊装预警设备</text>
|
|
</view>
|
|
<view class="item-text">
|
|
<text class="label">234234134231424</text>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="bottom-box">
|
|
<view class="tab-box">
|
|
<view class="tab-item" :class="currentTabIndex == 0 ? 'active' : ''" @click="currentTabIndex = 0">
|
|
视频监控
|
|
<view class="activeLine" v-if="currentTabIndex == 0"></view>
|
|
</view>
|
|
<view class="tab-item" :class="currentTabIndex == 1 ? 'active' : ''" @click="currentTabIndex = 1">
|
|
近电预警
|
|
<view class="activeLine" v-if="currentTabIndex == 1"></view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="video-box" v-if="currentTabIndex == 0">
|
|
<view class="video-item">
|
|
<image src="@/static/img/monitor2.jpg" mode="" style="width: 100%;height: 100%;"></image>
|
|
|
|
</view>
|
|
<view class="video-item">
|
|
<image src="@/static/img/monitor2.jpg" mode="" style="width: 100%;height: 100%;"></image>
|
|
|
|
</view>
|
|
<view class="video-item">
|
|
<image src="@/static/img/monitor2.jpg" mode="" style="width: 100%;height: 100%;"></image>
|
|
|
|
</view>
|
|
<view class="video-item">
|
|
<image src="@/static/img/monitor2.jpg" mode="" style="width: 100%;height: 100%;"></image>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
<view class="alarm-box" v-if="currentTabIndex == 1">
|
|
<view class="alarm-devices">
|
|
<view class="devices-item" v-for="(item, index) in devicesData" :key="index">
|
|
<view style="display: flex;align-items: center;">
|
|
<image src="@/static/img/devicesIcon.png" mode="" style="width: 40rpx;height: 30rpx;margin:0rpx 10rpx;"></image>
|
|
<text>近电感应设备{{index}}</text>
|
|
</view>
|
|
<view style="display: flex;align-items: center;">
|
|
<image src="@/static/img/electrical1.png" mode="" style="width: 40rpx;height: 20rpx;margin-left: 30rpx;"></image>
|
|
<text style="margin-left: 20rpx;">90%</text>
|
|
</view>
|
|
<view class="">
|
|
<image src="@/static/img/setting.png" mode="" style="width: 30rpx;height: 30rpx;margin-left: 30rpx;"></image>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view class="alarm-list">
|
|
<view class="alarm-item" v-for="(item, index) in devicesData" :key="index">
|
|
<view class="">近电感应设备DX-J431</view>
|
|
<view class="">2024-06-30 05:40:38</view>
|
|
<view class="">低于安全 施工距离{{index}}</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
<!-- 确认 -->
|
|
<u-modal :show="showModal" :title="modalTitle" width="450rpx"
|
|
@cancel="cancel" @confirm="confirm" :content='content'
|
|
:showCancelButton="true" :buttonReverse="true"></u-modal>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { getInformation,getWarnData } from '@/service/url.js';
|
|
import tabHeader from '@/components/tab-Header.vue';
|
|
import eselect from '@/components/eselect.vue';
|
|
import AES from "@/utils/cryptoJs/aes.js";
|
|
export default {
|
|
components: {
|
|
tabHeader,
|
|
eselect
|
|
},
|
|
data() {
|
|
return {
|
|
item:{
|
|
name1:"XXXXXXXXXXXXXXXXX",
|
|
name2:"张三班组",
|
|
name3:"621124195205171288",
|
|
name4:"15918198822",
|
|
name5:"1号智能安全帽",
|
|
name6:"8号马甲",
|
|
},
|
|
searchData:{
|
|
team:"",
|
|
box:""
|
|
},
|
|
options: [{
|
|
value: "",
|
|
label: "xxx工程"
|
|
}, {
|
|
value: "2",
|
|
label: "1工程"
|
|
}, {
|
|
value: "3",
|
|
label: "2工程",
|
|
}],
|
|
searchName: "",
|
|
currentTabIndex:0,
|
|
showModal:false,
|
|
modalTitle:'发起验证',
|
|
content:'确定发起验证?',
|
|
listData:[],
|
|
devicesData:[],
|
|
page:1,
|
|
filterForm: {
|
|
temporaryName:'',
|
|
userPhone: '',
|
|
userUnit: '',
|
|
userName: '',
|
|
IntervieweeDepartment: '',
|
|
temporaryTime: '',
|
|
reason: '',
|
|
remarks:'',
|
|
imageUrl:'',
|
|
|
|
},
|
|
};
|
|
},
|
|
watch: {
|
|
currentTabIndex: function(newVal, oldVal) {
|
|
this.currentTabIndex = newVal;
|
|
if (this.currentTabIndex==0) {
|
|
|
|
|
|
}else if (this.currentTabIndex==1) {
|
|
|
|
this.getDevices();
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
onLoad(options) {
|
|
this.currentTabIndex = options.currentTabIndex || 0;
|
|
this.loadmore()
|
|
},
|
|
methods: {
|
|
loadmore() {
|
|
// let obj = {
|
|
// "keyWord":this.searchValue,
|
|
// "userPhone":this.userPhone,
|
|
// "page":this.page,
|
|
// "limit":"10"
|
|
// }
|
|
// let param = {
|
|
// encryptedData: AES.encrypt(JSON.stringify(obj))
|
|
// }
|
|
// console.log(obj)
|
|
// let option = {
|
|
// contentType:'form',
|
|
// header:{
|
|
// Authorization:'',
|
|
// }
|
|
// }
|
|
// this.$http.post(getVisitorPageList,param,false,option).then(res => {
|
|
// if (res) {
|
|
// console.log(res)
|
|
// if(res.code == 200){
|
|
// console.log(res.data)
|
|
// if(res.data?.length>0){
|
|
// if(this.page == 1){
|
|
// this.listData = res.data;
|
|
// }else{
|
|
// this.listData = [...this.listData, ...res.data];
|
|
// }
|
|
// }else{
|
|
// console.log("没有更多了")
|
|
// }
|
|
// }
|
|
// }
|
|
// }).catch(error => {
|
|
// console.log(error)
|
|
// // this.$utils.showHttpError(error)
|
|
// })
|
|
for (let i = 0; i < 8; i++) {
|
|
this.listData.push(
|
|
this.item
|
|
)
|
|
}
|
|
console.log(this.listData)
|
|
},
|
|
//获取近电设备
|
|
getDevices(){
|
|
for (let i = 0; i < 5; i++) {
|
|
this.devicesData.push(
|
|
this.item
|
|
)
|
|
}
|
|
},
|
|
//按钮触发
|
|
backBracelet(){
|
|
console.log("页面")
|
|
uni.navigateTo({
|
|
url: "/pages/bracelet/braceletBack"
|
|
})
|
|
},
|
|
//确认modal
|
|
backDevice(item){
|
|
console.log("open")
|
|
this.showModal = true;
|
|
},
|
|
cancel() {
|
|
this.showModal = false
|
|
console.log('close');
|
|
},
|
|
confirm() {
|
|
this.showModal = false
|
|
console.log('确认');
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.select-box{
|
|
width: 100%;
|
|
height: 60rpx;
|
|
position: absolute;
|
|
top:8vh;
|
|
z-index: 999;
|
|
display: flex;
|
|
// justify-content: center;
|
|
padding:10rpx;
|
|
.select{
|
|
width: 40%;
|
|
margin-right: 40rpx;
|
|
}
|
|
}
|
|
.map-box{
|
|
width: 100%;
|
|
height: 24vh;
|
|
z-index: 9;
|
|
position: absolute;
|
|
top:8vh;
|
|
}
|
|
.page-content{
|
|
width: 100%;
|
|
height: 65vh;
|
|
position: absolute;
|
|
overflow:hidden;
|
|
top:33vh;
|
|
z-index: 99;
|
|
border-radius:40rpx;
|
|
|
|
.search-box{
|
|
width: 100%;
|
|
height: auto;
|
|
background:#fff;
|
|
.search{
|
|
width: 94%;
|
|
height: 80rpx;
|
|
padding-top: 20rpx;
|
|
margin: 0rpx auto;
|
|
.search-people{
|
|
width: 100%;
|
|
margin:0rpx auto;
|
|
}
|
|
}
|
|
}
|
|
|
|
.devices-box{
|
|
width: 100%;
|
|
height: auto;
|
|
background:#fff;
|
|
margin-bottom: 40rpx;
|
|
.list-box{
|
|
width: 96%;
|
|
height: 23vh;
|
|
overflow-y: auto;
|
|
// border: 1px solid #000;
|
|
margin: 0rpx auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
// margin-top: 40rp x;
|
|
|
|
.list-item{
|
|
width: 47%;
|
|
height: auto;
|
|
background-color: #fff;
|
|
border-radius: 10rpx;
|
|
border: 1px solid #D9D9D9;
|
|
margin: 10rpx;
|
|
|
|
|
|
.item-content{
|
|
width: 100%;
|
|
height: 160rpx;
|
|
font-size: 24rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 14rpx 10rpx;
|
|
.image-box{
|
|
width: 30%;
|
|
height: 60%;
|
|
}
|
|
.content-box{
|
|
width: 65%;
|
|
height: 100%;
|
|
font-size: 24rpx;
|
|
|
|
.item-text{
|
|
margin-left: 0rpx;
|
|
margin-top: 15rpx;
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.bottom-box{
|
|
width: 95%;
|
|
height: 42vh;
|
|
background:#fff;
|
|
padding: 20rpx 20rpx;
|
|
|
|
.tab-box {
|
|
overflow: hidden;
|
|
height: 60rpx;
|
|
.tab-item {
|
|
float: left;
|
|
height: 60rpx;
|
|
width: 20%;
|
|
font-size: 24rpx;
|
|
line-height: 20rpx;
|
|
}
|
|
.active {
|
|
// background: #fff;
|
|
color: #333;
|
|
border-radius: 10rpx 10rpx 0 0;
|
|
font-weight: bold;
|
|
}
|
|
.activeLine{
|
|
background: linear-gradient( 90deg, #3888FF 0%, rgba(255,255,255,0) 100%);
|
|
border-radius: 10rpx;
|
|
width: 60rpx;
|
|
height: 10rpx;
|
|
}
|
|
}
|
|
.video-box{
|
|
width: 100%;
|
|
height: 80%;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
|
|
.video-item{
|
|
width: 48%;
|
|
height: 220rpx;
|
|
border-radius: 10rpx;
|
|
overflow: hidden;
|
|
// padding: 10rpx;
|
|
}
|
|
|
|
}
|
|
|
|
.alarm-box{
|
|
width: 100%;
|
|
height: 100%;
|
|
// background-color: #3888FF;
|
|
font-size: 24rpx;
|
|
.alarm-devices{
|
|
width: 94%;
|
|
height: 10vh;
|
|
background-color: #fff;
|
|
border-radius: 8rpx;
|
|
border: 1px solid #D9D9D9;
|
|
overflow-y: auto;
|
|
padding: 10rpx 20rpx;
|
|
padding-bottom: 4rpx;
|
|
margin-bottom: 40rpx;
|
|
.devices-item{
|
|
width: 98%;
|
|
display: flex;
|
|
padding: 10rpx 0;
|
|
justify-content: space-between;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
}
|
|
|
|
.alarm-list{
|
|
width: 94%;
|
|
height: 15vh;
|
|
background-color: #fff;
|
|
overflow-y: auto;
|
|
padding: 10rpx 20rpx;
|
|
margin-bottom: 20rpx;
|
|
.alarm-item{
|
|
width: 98%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 18rpx;
|
|
padding-bottom: 12rpx;
|
|
padding-top: 8rpx;
|
|
border-bottom: 1px solid #D9D9D9;;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
</style>
|