2024-11-13 09:42:42 +08:00
|
|
|
<template>
|
2025-12-18 17:53:20 +08:00
|
|
|
<view :style="{height:'100vh',overflow:'hidden'}">
|
2024-11-13 09:42:42 +08:00
|
|
|
<u-status-bar></u-status-bar>
|
|
|
|
|
<u-navbar title="ai告警" :autoBack="true" :titleStyle="{
|
|
|
|
|
fontSize:'18px'
|
|
|
|
|
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
|
|
|
|
</u-navbar>
|
2025-12-18 17:53:20 +08:00
|
|
|
<view class="" style="margin-top: 44px;">
|
|
|
|
|
<u-tabs class="tabsClass" :list="tabs" :scrollable="true" :activeStyle="{color: 'rgb(37, 157, 255)',fontSize: '16px'}" :inactiveStyle="{color: '#606266',fontSize: '16px'}" lineColor="transparent" itemStyle="height: 44px" @click="onTab"></u-tabs>
|
|
|
|
|
<div class="tableHead">
|
|
|
|
|
<div class="td t1">视频点</div>
|
|
|
|
|
<div class="td t2">告警时间</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tableBody">
|
|
|
|
|
<div class="tableRow" v-for="(item, index) in currentList" :key="index">
|
|
|
|
|
<div class="td t1">{{ item.stnm || '-' }}</div>
|
|
|
|
|
<div class="td t2">{{ item.warningTime || '-' }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div :style="{height:'80px'}"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</view>
|
2024-11-13 09:42:42 +08:00
|
|
|
<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
|
2025-12-18 17:53:20 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
show: false,
|
|
|
|
|
model: {
|
|
|
|
|
stm: '',
|
|
|
|
|
etm: ''
|
|
|
|
|
},
|
|
|
|
|
tabs: [],
|
|
|
|
|
cur: 0,
|
|
|
|
|
map: {}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
currentList(){
|
|
|
|
|
if (!this.tabs.length) return []
|
|
|
|
|
const k = this.tabs[this.cur].key
|
|
|
|
|
const arr = this.map[k]
|
|
|
|
|
return Array.isArray(arr) ? arr : []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options){
|
|
|
|
|
const { map } = options || {}
|
|
|
|
|
this.map = map ? JSON.parse(decodeURIComponent(map)) : {}
|
|
|
|
|
this.tabs = Object.keys(this.map).map(k => ({ name: k, key: k }))
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onTab(item, index){
|
|
|
|
|
this.cur = item.index
|
|
|
|
|
},
|
|
|
|
|
confirm(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
this.model.stm = e[0]
|
|
|
|
|
this.model.etm = e[1]
|
|
|
|
|
this.show = false
|
2024-11-13 09:42:42 +08:00
|
|
|
},
|
|
|
|
|
cancel() {
|
|
|
|
|
this.show = false
|
|
|
|
|
},
|
|
|
|
|
toDetail(){
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:'/pages/wtcl/detail/index'
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-12-18 17:53:20 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-11-13 09:42:42 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-12-18 17:53:20 +08:00
|
|
|
.myTitleStyle {
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
background-color: red;
|
|
|
|
|
height: 200px;
|
|
|
|
|
}
|
2024-11-13 09:42:42 +08:00
|
|
|
|
|
|
|
|
.tabsClass {
|
|
|
|
|
margin-top: 44px;
|
|
|
|
|
height: 44px;
|
|
|
|
|
padding: 0 40px;
|
|
|
|
|
border-top: 1px solid #eee;
|
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-18 17:53:20 +08:00
|
|
|
.tabsClass{
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
height: 44px;
|
|
|
|
|
padding: 0 40px;
|
|
|
|
|
border-top: 1px solid #eee;
|
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
|
}
|
|
|
|
|
.tabsClass /deep/ .u-tabs__wrapper__nav__item__text{
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
.tableHead{
|
|
|
|
|
width: 97%;
|
|
|
|
|
margin: 5px auto 0;
|
|
|
|
|
height: 50px;
|
|
|
|
|
background-color: #e4f2fe;
|
|
|
|
|
display: flex;
|
|
|
|
|
color: #208FEE;
|
|
|
|
|
}
|
|
|
|
|
.tableBody{
|
|
|
|
|
width: 97%;
|
|
|
|
|
height: calc(100vh - 180px);
|
|
|
|
|
background-color: #f7f7f7;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
.tableRow{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 46px;
|
|
|
|
|
display: flex;
|
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
}
|
|
|
|
|
.td{
|
|
|
|
|
text-align: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
|
|
|
|
.t1{width: 60%}
|
|
|
|
|
.t2{width: 40%}
|
|
|
|
|
</style>
|