2025-04-10 18:21:02 +08:00
|
|
|
<template>
|
|
|
|
|
<div style="height: 100%">
|
|
|
|
|
<ChartsBox :boxTitle="`报警信息`">
|
2025-04-18 10:39:53 +08:00
|
|
|
<div class="container" v-if="config.data.length > 0">
|
2025-04-10 18:21:02 +08:00
|
|
|
<!-- <div class="feel-box"></div> -->
|
|
|
|
|
<dv-scroll-board class="dv-scr-board" :config="config" />
|
|
|
|
|
</div>
|
2025-04-18 10:39:53 +08:00
|
|
|
|
|
|
|
|
<div class="container" v-else>
|
|
|
|
|
<EmptyModel />
|
|
|
|
|
</div>
|
2025-04-10 18:21:02 +08:00
|
|
|
</ChartsBox>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import ChartsBox from '@/components/ChartsBox/index'
|
2025-04-18 10:39:53 +08:00
|
|
|
import EmptyModel from '@/components/EmptyModel/index.vue'
|
|
|
|
|
import { getConcreteAlarmListAPI } from '@/api/home-foundation-pit.js'
|
2025-04-10 18:21:02 +08:00
|
|
|
export default {
|
2025-04-18 10:39:53 +08:00
|
|
|
components: { ChartsBox, EmptyModel },
|
|
|
|
|
|
2025-04-10 18:21:02 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
config: {
|
2025-04-18 10:39:53 +08:00
|
|
|
data: [],
|
|
|
|
|
rowNum: 5, //表格行数
|
|
|
|
|
headerHeight: 35,
|
2025-04-10 18:21:02 +08:00
|
|
|
headerBGC: 'rgba(21, 53, 81, 0.2)', //表头
|
|
|
|
|
oddRowBGC: '', //奇数行
|
|
|
|
|
evenRowBGC: '', //偶数行
|
|
|
|
|
align: ['center'],
|
|
|
|
|
hoverPause: true,
|
2025-04-18 10:39:53 +08:00
|
|
|
waitTime: 3000,
|
2025-04-10 18:21:02 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-04-18 10:39:53 +08:00
|
|
|
methods: {
|
|
|
|
|
async getConcreteAlarmListData() {
|
|
|
|
|
const { data: res } = await getConcreteAlarmListAPI({
|
2025-04-24 18:05:15 +08:00
|
|
|
typeCode: '9000300',
|
2025-04-18 10:39:53 +08:00
|
|
|
})
|
|
|
|
|
console.log(
|
|
|
|
|
`%c🔍 深基坑监测 ----> 报警信息(右二) 数据出参 %c`,
|
|
|
|
|
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
|
|
|
|
'',
|
|
|
|
|
res,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (res.length > 0) {
|
|
|
|
|
console.log('996')
|
|
|
|
|
|
|
|
|
|
const newData = res.map((e) => [
|
|
|
|
|
`<img src="${require('@/assets/image/pro-view/blue.png')}" class="table-img">`,
|
|
|
|
|
`<span class="colorBlue">${e.remark}</span>`,
|
|
|
|
|
`<span class="colorBlue">${e.devName}</span>`,
|
|
|
|
|
`<span class="time-box colorBlue">${e.createTime}</span>`,
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
// 替换整个 config 对象,触发组件更新
|
|
|
|
|
this.config = {
|
|
|
|
|
...this.config, // 保留原有配置
|
|
|
|
|
data: newData, // 更新数据
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
this.getConcreteAlarmListData()
|
|
|
|
|
},
|
2025-04-10 18:21:02 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.container {
|
|
|
|
|
height: 100%;
|
2025-04-18 10:39:53 +08:00
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 12px;
|
2025-04-10 18:21:02 +08:00
|
|
|
|
|
|
|
|
.dv-scr-board {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom right,
|
|
|
|
|
rgba(21, 53, 81, 0.2),
|
|
|
|
|
rgba(6, 30, 66, 0.7)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .img-box {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.three-img {
|
|
|
|
|
transform: translateX(10px);
|
|
|
|
|
}
|
|
|
|
|
.red-img {
|
|
|
|
|
transform: translateX(3px);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
::v-deep .dv-scroll-board .rows .ceil {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
2025-04-18 10:39:53 +08:00
|
|
|
|
|
|
|
|
::v-deep .colorBlue {
|
|
|
|
|
color: #6aaef3 !important;
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep.colorRed {
|
|
|
|
|
color: #ff5534;
|
|
|
|
|
font-size: 12px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .time-box {
|
|
|
|
|
font-family: 'DS-TITle';
|
|
|
|
|
display: block;
|
|
|
|
|
flex: 1;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .dv-scroll-board .rows .ceil {
|
|
|
|
|
width: auto !important;
|
|
|
|
|
min-width: 80px; /* 最小宽度 */
|
|
|
|
|
}
|
2025-04-10 18:21:02 +08:00
|
|
|
</style>
|