2022-08-02 15:11:04 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view class="barBox">
|
2024-06-11 18:46:40 +08:00
|
|
|
|
<headers class="fixedheader" :themeType="'white'" :showBack="true">
|
|
|
|
|
|
<view class="headerName">
|
|
|
|
|
|
告警提示
|
2024-04-29 21:19:18 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</headers>
|
|
|
|
|
|
</view>
|
2024-06-14 20:05:51 +08:00
|
|
|
|
<view class="" :style="{paddingTop: mobileTopHeight + 50 + 'px'}">
|
2024-04-29 21:19:18 +08:00
|
|
|
|
<!-- <view class="alarm-item" v-for="(item,index) in listData" :key="index" @click="goHiidden()"> -->
|
|
|
|
|
|
<view class="alarm-item" v-for="(item,index) in listData" :key="index">
|
|
|
|
|
|
<view class="item-header">
|
|
|
|
|
|
<view class="header-left">
|
|
|
|
|
|
<view class="logo">
|
|
|
|
|
|
<image src="/static/aiWarn/aiWarn.png"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="header-info">未戴安全帽</view> -->
|
|
|
|
|
|
<!-- <view class="header-info">{{}}</view> -->
|
|
|
|
|
|
<view class="header-info">AI报警</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="header-right" v-if="!item.handleResult">
|
|
|
|
|
|
<image src="/static/aiWarn/aiWarn2.png"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="header-right" v-else>
|
|
|
|
|
|
<image src="/static/aiWarn/correct.png"></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="textCss">抓拍时间: {{item.createTime}}</view>
|
|
|
|
|
|
<view class="textCss">来源: {{item.alarmDesc}}</view>
|
|
|
|
|
|
<view class="item-bottom">
|
|
|
|
|
|
<view class="bottom-left">
|
|
|
|
|
|
<!-- <image mode="heightFix" @click="saveImage(url_config+'image/'+item.imageUrl,index)" class="accessoryImg"
|
|
|
|
|
|
src="/static/bg1.png"></image> -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <image mode="heightFix" @click="saveImage(url_config+'image/'+item.imageUrl,index)" class="accessoryImg"
|
|
|
|
|
|
:src="item.imageUrl"></image> -->
|
|
|
|
|
|
|
|
|
|
|
|
<image v-if="item.imageUrl" mode="heightFix" class="accessoryImg"
|
2024-04-30 19:24:12 +08:00
|
|
|
|
:src="item.imageUrl?url_config+'image/'+item.imageUrl:''"
|
|
|
|
|
|
@click="previewImg(url_config+'image/'+item.imageUrl)"></image>
|
|
|
|
|
|
<!-- @click="previewImg(item.imageUrl)"></image> -->
|
2024-04-29 21:19:18 +08:00
|
|
|
|
</view>
|
2024-05-28 15:58:10 +08:00
|
|
|
|
<view class="bottom-right" @click="goDisposition(item)" v-if="!item.handleResult" v-show="btnAuth">
|
2024-04-29 21:19:18 +08:00
|
|
|
|
去处置
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bottom-right" @click="goShutting(item)" style="background-color: #b0b0b0;" v-else>
|
|
|
|
|
|
已闭合
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2022-08-02 15:11:04 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-06-14 20:05:51 +08:00
|
|
|
|
mobileTopHeight: 0,
|
2022-08-02 15:11:04 +08:00
|
|
|
|
listData: [],
|
|
|
|
|
|
projectSn: '',
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: 7,
|
|
|
|
|
|
systemInfo: {
|
|
|
|
|
|
statusBarHeight: 0
|
|
|
|
|
|
},
|
2024-04-29 21:19:18 +08:00
|
|
|
|
showType: [
|
|
|
|
|
|
{ id: 1, value: '安全帽报警', },
|
|
|
|
|
|
{ id: 2, vlaue: '明火报警' },
|
|
|
|
|
|
{ id: 3, value: '聚众报警' },
|
|
|
|
|
|
{ id: 4, value: '未戴安全帽报警' },
|
|
|
|
|
|
{ id: 5, value: '越界报警' },
|
|
|
|
|
|
{ id: 6, value: '闯入报警' },
|
|
|
|
|
|
{ id: 7, value: '反光衣报警' },
|
|
|
|
|
|
{ id: 8, value: '未穿反光衣' },
|
2024-05-28 15:58:10 +08:00
|
|
|
|
],
|
|
|
|
|
|
btnAuth: true
|
2022-08-02 15:11:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-05-28 15:58:10 +08:00
|
|
|
|
onLoad() {
|
2024-05-28 20:01:14 +08:00
|
|
|
|
this.btnAuth = this.checkBtnPermission({key: 'ai_disposition', menuPath: '/project/aiAnalysis/warningList'})
|
2024-05-28 15:58:10 +08:00
|
|
|
|
},
|
2024-05-11 03:00:50 +08:00
|
|
|
|
onShow(){
|
2022-08-02 15:11:04 +08:00
|
|
|
|
this.systemInfo = uni.getStorageSync('systemInfo')
|
|
|
|
|
|
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
|
|
|
|
|
this.getListData()
|
|
|
|
|
|
},
|
|
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
|
this.getListData()
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
|
|
}, 1000)
|
|
|
|
|
|
},
|
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
// console.log("============================")
|
|
|
|
|
|
this.pageNo++;
|
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
title: '加载中'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.getListData()
|
|
|
|
|
|
},
|
2024-06-14 20:05:51 +08:00
|
|
|
|
mounted() {
|
|
|
|
|
|
var that = this
|
|
|
|
|
|
uni.getSystemInfo({
|
|
|
|
|
|
success(res) {
|
|
|
|
|
|
that.mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
|
|
|
|
|
|
uni.setStorageSync('systemInfo',res)
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
console.log('this.mobileTopHeight',this.mobileTopHeight)
|
|
|
|
|
|
},
|
2022-08-02 15:11:04 +08:00
|
|
|
|
methods: {
|
|
|
|
|
|
//获取列表数据
|
|
|
|
|
|
getListData() {
|
|
|
|
|
|
this.sendRequest({
|
|
|
|
|
|
url: 'xmgl/aiAnalyseHardWareAlarmRecord/selectPageList',
|
|
|
|
|
|
method: "post",
|
|
|
|
|
|
data: {
|
|
|
|
|
|
projectSn: this.projectSn,
|
|
|
|
|
|
pageNo: this.pageNo,
|
|
|
|
|
|
pageSize: this.pageSize,
|
2024-05-12 01:52:34 +08:00
|
|
|
|
isPushed: 1
|
2022-08-02 15:11:04 +08:00
|
|
|
|
},
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
console.log('res', res)
|
2024-04-29 21:19:18 +08:00
|
|
|
|
// res.result.records.forEach((item) => {
|
|
|
|
|
|
// const result = this.showType.find((item2) => {
|
|
|
|
|
|
// return item2.id == item.alarmType
|
|
|
|
|
|
// })
|
|
|
|
|
|
// // item.alarmType = result.value
|
|
|
|
|
|
// item.alarmType = result.alarmType
|
|
|
|
|
|
// })
|
2022-08-02 15:11:04 +08:00
|
|
|
|
if (this.pageNo == 1) {
|
|
|
|
|
|
this.listData = []
|
|
|
|
|
|
}
|
|
|
|
|
|
// console.log('--------')
|
|
|
|
|
|
// this.listData = res.result.records
|
|
|
|
|
|
this.listData = [...this.listData, ...res.result.records]
|
|
|
|
|
|
uni.hideLoading() //关闭加载中
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
goBack() {
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: "/pages/projectEnd/projectIndex/projectIndex"
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 点击跳转
|
2024-04-29 21:19:18 +08:00
|
|
|
|
goDisposition(item) {
|
|
|
|
|
|
console.log("=================================================");
|
2022-08-02 15:11:04 +08:00
|
|
|
|
uni.navigateTo({
|
2024-04-29 21:19:18 +08:00
|
|
|
|
url: "/pages/alarmPage/disposition/disposition?item="+ encodeURIComponent(JSON.stringify(item))
|
2022-08-02 15:11:04 +08:00
|
|
|
|
});
|
|
|
|
|
|
},
|
2024-04-29 21:19:18 +08:00
|
|
|
|
// 点击跳转
|
|
|
|
|
|
goShutting(item) {
|
|
|
|
|
|
console.log("=================================================");
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
// url: "/pages/alarmPage/disposition/disposition?item="+ encodeURIComponent(JSON.stringify(item))
|
|
|
|
|
|
url: "/pages/alarmPage/shutting/shutting?item="+ encodeURIComponent(JSON.stringify(item))
|
2022-08-02 15:11:04 +08:00
|
|
|
|
});
|
2024-04-29 21:19:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
previewImg(imgUrl){
|
|
|
|
|
|
console.log(imgUrl)
|
|
|
|
|
|
//urls为数组,数据里有多少图片链接则显示多少张,若只想预览一张的话,直接传只有一个图片地址的数组即可
|
|
|
|
|
|
let imgurl=imgUrl
|
|
|
|
|
|
let imgArr=[]
|
|
|
|
|
|
imgArr[0] = imgurl
|
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
|
current:0,
|
|
|
|
|
|
urls: imgArr
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// saveImage(url) {
|
|
|
|
|
|
// uni.showLoading({
|
|
|
|
|
|
// title: "保存中..."
|
|
|
|
|
|
// })
|
|
|
|
|
|
// uni.downloadFile({
|
|
|
|
|
|
// url: url, //网络路径,下载下来
|
|
|
|
|
|
// success: (res) => {
|
|
|
|
|
|
// if (res.statusCode === 200) {
|
|
|
|
|
|
// uni.saveImageToPhotosAlbum({
|
|
|
|
|
|
// filePath: res.tempFilePath, //下载后的临时路径
|
|
|
|
|
|
// success: res => { //下载完成后在相册里压根找不到
|
|
|
|
|
|
// uni.hideLoading()
|
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
|
// title: "保存成功!"
|
|
|
|
|
|
// })
|
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
|
// url: "/pages/projectEnd/safeManage/addExamine"
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
2022-08-02 15:11:04 +08:00
|
|
|
|
|
2024-04-29 21:19:18 +08:00
|
|
|
|
// }
|
2022-08-02 15:11:04 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2024-04-29 21:19:18 +08:00
|
|
|
|
.item-bottom{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
|
// height: 100px;
|
|
|
|
|
|
.bottom-left{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
.bottom-right{
|
|
|
|
|
|
width: 25%;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
background-color: #5181f6;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 5px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-radius: 5px;
|
2024-06-11 18:46:40 +08:00
|
|
|
|
z-index: 5;
|
2024-04-29 21:19:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.accessoryImg {
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
// width: 100%;
|
|
|
|
|
|
max-width: 150px;
|
|
|
|
|
|
max-height: 75px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.item-header{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
.header-left{
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
width: 40%;
|
|
|
|
|
|
// background-color: darkred;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
.logo{
|
|
|
|
|
|
width: 20%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
::v-deep uni-image>div, uni-image>img{
|
|
|
|
|
|
width: 7%;
|
|
|
|
|
|
height: 10%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-info{
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-right{
|
|
|
|
|
|
width: 10%;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
// background-color: #5181F6;
|
|
|
|
|
|
::v-deep uni-image>div, uni-image>img{
|
|
|
|
|
|
width: 11.5%;
|
|
|
|
|
|
height: 15%;
|
|
|
|
|
|
}
|
|
|
|
|
|
transform: translateY(-10px);
|
|
|
|
|
|
// position: absolute;
|
|
|
|
|
|
// right: 10%;
|
|
|
|
|
|
// top: 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.textCss{
|
|
|
|
|
|
letter-spacing: 1px;
|
|
|
|
|
|
color: #a9a9a9;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
2022-08-02 15:11:04 +08:00
|
|
|
|
.barBox {
|
|
|
|
|
|
background-color: #5181F6;
|
2024-06-11 18:46:40 +08:00
|
|
|
|
height: 100%;
|
|
|
|
|
|
background-color: #f6f6f6;
|
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
.fixedheader{
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
z-index: 999;
|
|
|
|
|
|
.headerName{
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-08-02 15:11:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
height: 44px;
|
|
|
|
|
|
line-height: 44px;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
|
background-color: #5181F6;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.backBtn {
|
2024-04-29 21:19:18 +08:00
|
|
|
|
// display: flex;
|
|
|
|
|
|
// justify-content: flex-start;
|
2022-08-02 15:11:04 +08:00
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
position: absolute;
|
2023-03-20 18:43:57 +08:00
|
|
|
|
left: 20%;
|
2022-08-02 15:11:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.back {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
2024-04-29 21:19:18 +08:00
|
|
|
|
|
|
|
|
|
|
.tip {
|
2023-03-20 18:43:57 +08:00
|
|
|
|
margin-left: 5rem;
|
2022-08-02 15:11:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.contain2 {
|
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
|
content: " ";
|
|
|
|
|
|
// background-color: #f8f8f8;
|
|
|
|
|
|
// height: calc(100vh - 44px);
|
|
|
|
|
|
// overflow: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.alarm-item {
|
|
|
|
|
|
width: 650rpx;
|
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
box-sizing: border-box;
|
2024-04-29 21:19:18 +08:00
|
|
|
|
border-radius: 10px;
|
2022-08-02 15:11:04 +08:00
|
|
|
|
box-shadow: 0 0 5px #ccc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.alarm-lable {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.alarm-lable-1 {
|
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.alarm-lable-2 {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
color: #888;
|
|
|
|
|
|
}
|
2024-04-29 21:19:18 +08:00
|
|
|
|
</style>
|