327 lines
12 KiB
Vue
Raw Normal View History

2024-04-20 17:26:03 +08:00
<template>
2024-04-21 14:15:04 +08:00
<div class="centerBottom">
2024-04-26 18:06:30 +08:00
<div class="cbHeader">
<div class="cbHeaderInfo">
<div class="cubeIcon"></div>
2024-05-11 20:50:20 +08:00
<div class="cLeft">公告提示</div>
2024-04-26 18:06:30 +08:00
</div>
<div class="cbHeaderLine"></div>
</div>
<div class="cbContent">
2024-05-13 02:00:37 +08:00
<div v-if="listData.length < 10 && listData.length !== 0">
2024-05-11 20:50:20 +08:00
<div class="item" v-for="(item, index) in listData" :key="index">
2024-04-26 18:06:30 +08:00
<div class="itemHead">
2024-05-13 02:00:37 +08:00
<div v-if="JSON.parse(item.payload).level">
<div class="itemHeadInner1" v-if="JSON.parse(item.payload).level === 1">重大风险</div>
<div class="itemHeadInner2" v-if="JSON.parse(item.payload).level === 2">较大风险</div>
<div class="itemHeadInner3" v-if="JSON.parse(item.payload).level === 3">一般风险</div>
<div class="itemHeadInner4" v-if="JSON.parse(item.payload).level === 4">低风险</div>
</div>
<div v-else>
<!-- <div class="itemHeadInner" v-if="JSON.parse(item.payload).isSuperDanger !== undefined && JSON.parse(item.payload).isSuperDanger === true">超危工程</div> -->
<div class="itemHeadInner5" v-if="JSON.parse(item.payload).isSuperDanger === true">超危工程</div>
<div class="itemHeadInner6" v-if="JSON.parse(item.payload).isSuperDanger === false">危大工程</div>
</div>
2024-04-26 18:06:30 +08:00
<div class="itemContent">
2024-05-13 02:00:37 +08:00
<el-tooltip class="box-item" effect="dark" :content="item.msg" placement="top-start">
<text style="margin-left:10px">{{ item.msg }}</text>
2024-04-26 18:06:30 +08:00
</el-tooltip>
</div>
</div>
<!-- <div class="itemContent">
<el-tooltip class="box-item" effect="dark" :content="item.content" placement="top-start">
{{item.content}}
</el-tooltip>
</div> -->
<div class="itemTime">
2024-05-13 02:00:37 +08:00
<text class="timeInfo">{{ JSON.parse(item.payload).time }}</text>
</div>
</div>
</div>
<div v-else>
<vue3-seamless-scroll v-if="listData.length>0" :speed="1" :list="listData" :limitScrollNum="10" :step="0.3" :hover="true" class="scroll">
<div class="item" v-for="(item, index) in listData" :key="index">
<div class="itemHead">
<div v-if="JSON.parse(item.payload).level">
<div class="itemHeadInner1" v-if="JSON.parse(item.payload).level === 1">重大风险</div>
<div class="itemHeadInner2" v-if="JSON.parse(item.payload).level === 2">较大风险</div>
<div class="itemHeadInner3" v-if="JSON.parse(item.payload).level === 3">一般风险</div>
<div class="itemHeadInner4" v-if="JSON.parse(item.payload).level === 4">低风险</div>
</div>
<div v-else>
<!-- <div class="itemHeadInner" v-if="JSON.parse(item.payload).isSuperDanger !== undefined && JSON.parse(item.payload).isSuperDanger === true">超危工程</div> -->
<div class="itemHeadInner5" v-if="JSON.parse(item.payload).isSuperDanger === true">超危工程</div>
<div class="itemHeadInner6" v-if="JSON.parse(item.payload).isSuperDanger === false">危大工程</div>
</div>
<div class="itemContent">
<el-tooltip class="box-item" effect="dark" :content="item.msg" placement="top-start">
<text style="margin-left:10px">{{ item.msg }}</text>
</el-tooltip>
</div>
</div>
<!-- <div class="itemContent">
<el-tooltip class="box-item" effect="dark" :content="item.content" placement="top-start">
{{item.content}}
</el-tooltip>
</div> -->
<div class="itemTime">
<text class="timeInfo">{{ JSON.parse(item.payload).time }}</text>
2024-04-26 18:06:30 +08:00
</div>
</div>
2024-05-11 20:50:20 +08:00
</vue3-seamless-scroll>
2024-05-13 02:00:37 +08:00
</div>
<div class="notoDta" v-if="listData.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
2024-04-26 18:06:30 +08:00
</div>
2024-04-20 17:26:03 +08:00
</div>
</template>
<script setup lang="ts">
2024-05-13 02:00:37 +08:00
import {
getNoticeListApi
} from "@/api/modules/projectOverview";
2024-05-11 20:50:20 +08:00
import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
2024-04-20 17:26:03 +08:00
import Card from "@/components/card.vue";
import { ref, watch, onMounted } from "vue";
import { getStageOption } from "@/api/modules/projectOverview";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
2024-04-26 18:06:30 +08:00
let listData = ref([
2024-05-13 02:00:37 +08:00
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: '重大风险', type: 1, content: '正处于吊装施工重大风险作业阶段,请注意在操作前,应对吊装设备进行安全把控...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
// { header: 'AI报警', type: 3, content: '1#塔吊报警频次较上周增长60%,塔吊间各个设之间的衔接进行全面检查,以防止...', startTime: '2024-04-01', endTime: "2024-04-20" },
2024-04-26 18:06:30 +08:00
])
2024-04-20 17:26:03 +08:00
2024-05-13 02:00:37 +08:00
const getNoticeList = async () => {
// const res: any = await getNoticeListApi({ projectSn: store.sn, type: 10, pageNo: 1, pageSize: 99999, });
const res: any = await getNoticeListApi({ isBigScreen: 1 ,type:32});
console.log('隐患智能分析', res);
listData.value = res.result.records;
// listData.value.push({
// accountId:"1779721457571291137",
// id:"1789601398432559107",
// imageUrl:null,
// isRead:0,
// msg:"区域1检查到一条四川成润智慧科技的雨落管安全隐患问题请注意监督整改",
// payload:"{\"level\":4,\"time\":\"2024-05-12 18:19:40\"}",
// sendTime: "2024-05-12 18:19:57",
// title: "大屏通知",
// type: "31",
// })
console.log("================center================",listData.value)
}
2024-04-26 18:06:30 +08:00
2024-05-13 02:00:37 +08:00
onMounted(async () => {
await getNoticeList();
2024-04-20 17:26:03 +08:00
});
</script>
<style lang="scss" scoped>
2024-05-13 02:00:37 +08:00
.notoDta {
top: 30%;
width: 50%;
// left: 40%;
position: absolute;
text-align: center;
left:50%;
transform: translateX(-50%);
img {
width: 30%;
margin: 5% 22%;
}
p {
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -6% 30%;
}
}
2024-05-11 20:50:20 +08:00
.scroll {
height: 100%;
2024-05-13 02:00:37 +08:00
width: 100%;
2024-05-11 20:50:20 +08:00
overflow: hidden;
}
.centerBottom {
2024-04-21 14:15:04 +08:00
background: url("@/assets/images/commandScreen/card-center-bottom.png") no-repeat;
// background: #fff;
background-size: 100% 100%;
2024-04-26 18:06:30 +08:00
// width: 100%;
// height: 60%;
// background-color: #fff;
padding: 10px 20px;
position: relative;
2024-05-11 20:50:20 +08:00
2024-04-26 18:06:30 +08:00
// padding-top: 15px;
2024-05-11 20:50:20 +08:00
.cbHeader {
width: 100%;
2024-04-26 18:06:30 +08:00
height: 40px;
2024-05-11 20:50:20 +08:00
2024-04-26 18:06:30 +08:00
// background-color: darkred;
2024-05-11 20:50:20 +08:00
.cbHeaderInfo {
2024-04-26 18:06:30 +08:00
color: #fff;
display: flex;
justify-content: flex-start;
align-items: center;
2024-05-11 20:50:20 +08:00
.cLeft {
width: 50%;
font-size: 20px;
font-weight: bold;
background-image: linear-gradient(to bottom left, #c8E3FF, #007AFF);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.cubeIcon {
2024-04-26 18:06:30 +08:00
width: 36px;
height: 36px;
// background-color: #fff;
background: url("@/assets/images/commandScreen/head-cube.png") no-repeat;
background-size: 100% 100%;
// margin-left: -5px;
margin: 0 3px 0 -5px;
}
}
2024-05-11 20:50:20 +08:00
.cbHeaderLine {
2024-04-26 18:06:30 +08:00
height: 4px;
width: 100%;
// background-color: darkblue;
background: url("@/assets/images/commandScreen/head-line.png") no-repeat;
background-size: 100% 100%;
}
}
2024-05-11 20:50:20 +08:00
.cbContent {
2024-04-26 18:06:30 +08:00
width: 100%;
height: calc(100% - 40px);
2024-05-13 20:46:26 +08:00
overflow: hidden;
2024-05-11 20:50:20 +08:00
2024-04-26 18:06:30 +08:00
// background: #fff;
2024-05-11 20:50:20 +08:00
.item {
2024-04-26 18:06:30 +08:00
width: 100%;
2024-05-13 02:00:37 +08:00
line-height: 110%;
2024-04-26 18:06:30 +08:00
display: flex;
align-items: center;
// justify-content: flex-start;
justify-content: space-between;
// background-color: green;
color: #fff;
2024-05-11 20:50:20 +08:00
.itemHead {
2024-04-26 18:06:30 +08:00
white-space: nowrap;
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 75%;
2024-05-11 20:50:20 +08:00
2024-05-13 02:00:37 +08:00
.itemHeadInner1 {
border: 1px solid #e02020;
box-shadow: 0 0 0 1px #e02020;
background: rgba(224,32,32, 0.4);
2024-04-26 18:06:30 +08:00
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
2024-05-11 20:50:20 +08:00
.itemHeadInner2 {
2024-04-26 18:06:30 +08:00
font-size: 16px;
2024-05-13 02:00:37 +08:00
border: 1px solid #f46649;
box-shadow: 0 0 0 1px #f46649;
background: rgba(244,102,73, 0.4);
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
.itemHeadInner3 {
font-size: 16px;
border: 1px solid #ecbe45;
box-shadow: 0 0 0 1px #ecbe45;
background: rgba(236,190,69, 0.4);
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
.itemHeadInner4 {
font-size: 16px;
border: 1px solid #5394f7;
box-shadow: 0 0 0 1px #5394f7;
background: rgba(83,148,247, 0.4);
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
.itemHeadInner5 {
font-size: 16px;
border: 1px solid #9400D3;
box-shadow: 0 0 0 1px #9400D3;
background: rgba(148,0,211, 0.4);
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
.itemHeadInner6 {
font-size: 16px;
border: 1px solid #00CED1;
box-shadow: 0 0 0 1px #00CED1;
background: rgba( 0,206,209, 0.4);
2024-04-26 18:06:30 +08:00
border-radius: 3px;
padding: 0 15px;
margin: 9px 0;
margin-left: 2px;
}
2024-05-11 20:50:20 +08:00
.itemContent {
2024-04-26 18:06:30 +08:00
margin-left: 10px;
font-size: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
2024-05-13 20:46:26 +08:00
line-height: 30px;
2024-04-26 18:06:30 +08:00
}
}
2024-05-11 20:50:20 +08:00
.itemTime {
2024-04-26 18:06:30 +08:00
// background-color: #fff;
width: 25%;
font-size: 16px;
2024-05-11 20:50:20 +08:00
.timeInfo {
2024-04-26 18:06:30 +08:00
display: flex;
2024-05-13 20:46:26 +08:00
justify-content: flex-start;
2024-04-26 18:06:30 +08:00
margin-right: 10px;
}
}
}
}
2024-04-20 17:26:03 +08:00
}
</style>