<!--智慧排水左右侧面板 --> <template> <!-- 风险评估 --> <div class="riskAssessment"> <div class="ListBoxHeader"> <div class="ListBoxHeader_font">监测与分析</div> </div> <div class="Assessmentop"> <div class="subRightBox"> <div class="headcenter" v-for="(item, index) in monitorData" :key="item" :class="monitorname == item.name ? 'activedright' : ''" @click="monitorclick(item, index)" > {{ item.name }} </div> </div> <div class="waterBox" v-if="monitorname == '水位监测(0/4)'"> <div class="waterroll"> <div class="tableHeader"> <span class="tableHeaderList tableList1">序号</span> <span class="tableHeaderList tableList2">河道</span> <span class="tableHeaderList tableList3">当前流量m³/s</span> <span class="tableHeaderList tableList4">警戒流量m³/s</span> <span class="tableHeaderList tableList5">状态</span> </div> <div class="tableBody"> <div class="tableBodyList" v-for="item in FXJCData"> <span class="tableBodyList_span1">{{ item.xh }}</span> <span class="tableBodyList_span2">{{ item.hd }} </span> <span class="tableBodyList_span3">{{ item.dqsw }}</span> <span class="tableBodyList_span4">{{ item.kzsw }} </span> <span class="tableBodyList_span5"> <el-tag type="success" v-if="item.zt == '正常'">正常</el-tag> <el-tag @click="showcswDalog(item)" style="cursor: pointer" type="warning" v-if="item.zt == '超控制常水位'" >超控制常水位</el-tag > </span> </div> </div> </div> <div class="watercontent"> <div class="Titlelarge">河湖简介:延河</div> <div class="Contentdetails"> 延河为黄河右岸一级支流,发源于陕西省靖边县天赐湾乡周山南麓,经安塞县镰刀湾乡杨石寺村附近进人延安境内,自西北流向东南,经安塞、宝塔、延长等县(区),于延长南河沟乡凉水岸汇人黄河。延河全长286.9km,流城面积7725 km?,平均比降3.3%。市内河长248.5 km,市内面积7321 km?,主要支流有杏子河、坪桥川、西川河、南川河、蟠龙川等。 </div> </div> </div> <div class="leftSubTabsBox"> <div class="tabContent" v-if="monitorname == '漫溢监测(1/29)'"> <ul> <li class="listOne curCick" v-for="(i, index) in listData" :key="index" @click="showMapDalog(i)"> <div class="line flex flex-align-center"> <div class="lable">站点名称:</div> <div class="box flex flex-align-center flex-justcontent-center"> {{ i.siteName }} </div> <span class="box_Status" :class="i.onlineStatus == 'online' ? 'green' : 'rad'">{{ i.onlineStatus == 'online' ? '在线' : '离线' }}</span> </div> <div class="line flex flex-align-center"> <div class="lable">水<i></i>深:</div> <div class="box flex flex-align-center flex-justcontent-center">{{ i.z || 0 }}米</div> </div> <div class="line flex flex-align-center"> <div class="lable">风险分析:</div> <div class="box flex flex-align-center flex-justcontent-center" :class="i.riskAnalysis != '无风险' ? 'cRad' : 'cGreen'" > {{ i.riskAnalysis }} </div> </div> </li> </ul> </div> <div class="tabContent" v-if="monitorname == '积水监测(0/16)'"> <ul> <li class="listOne curCick" v-for="(i, index) in listData" :key="index" @click="JSshowMapDalog(i)"> <div class="line flex flex-align-center"> <div class="lable">站点名称:</div> <div class="box flex flex-align-center flex-justcontent-center"> {{ i.siteName }} </div> <span class="box_Status" :class="i.onlineStatus == 'online' ? 'green' : 'rad'">{{ i.onlineStatus == 'online' ? '在线' : '离线' }}</span> </div> <div class="line flex flex-align-center"> <div class="lable">水<i></i>深:</div> <div class="box flex flex-align-center flex-justcontent-center">{{ i.z || 0 }}米</div> </div> <div class="line flex flex-align-center"> <div class="lable">风险分析:</div> <div class="box flex flex-align-center flex-justcontent-center" :class="i.riskAnalysis != '无风险' ? 'cRad' : 'cGreen'" > {{ i.riskAnalysis }} </div> </div> </li> </ul> </div> </div> </div> </div> <!-- 实时预警 --> <div class="WarningSou"> <div class="ListBoxHeader"> <div class="ListBoxHeader_font">实时预警</div> </div> <div class="WarningSouTop"> <div class="tableHeader"> <span class="tableHeaderList tableList1">位置</span> <span class="tableHeaderList tableList2">数据(cm)</span> <span class="tableHeaderList tableList3">状态</span> <span class="tableHeaderList tableList4">操作</span> </div> <Vue3SeamlessScroll :list="SSYJData" :singleHeight="34" :singleWaitTime="1500" :hover="true" class="tableBody"> <div class="tableBodyList" v-for="item in SSYJData"> <span class="tableBodyList_span1">{{ item.wranLocation }}</span> <span class="tableBodyList_span2"> {{ item.riskProfile }}</span> <span class="tableBodyList_span3">{{ item.assessment }}</span> <span class="tableBodyList_span4"> <el-tag style="cursor: pointer" type="danger" v-if="item.distribute == 0" @click="paidan(item)" size="small" >派单</el-tag > <el-tag size="small" type="success" v-if="item.distribute == 1">已派单</el-tag> </span> </div> </Vue3SeamlessScroll> </div> </div> <!-- 预警与处置 --> <div class="WarningAssess"> <div class="ListBoxHeader"> <div class="ListBoxHeader_font">预警与处置</div> </div> <div class="TopProportion"> <div class="WarningSl"> <div class="eachDescribe"> <div class="icon bgcls"></div> <div class="text">预警数量</div> </div> <div class="eachDescribe"> <div class="icon bgcYellow"></div> <div class="text">处置数量</div> </div> </div> <div class="WarningNy"> <div class="head-right" style=""> <div class="head-item" v-for="(item, index) in yearList" :key="index" :class="activedname == item.name ? 'activedright' : ''" @click="yearclick(item, index)" > {{ item.name }} </div> </div> </div> </div> <div class="fxChart"> <AssessmentjsEcharts :data="chartData2" :refresh="chartData2.refresh"></AssessmentjsEcharts> </div> </div> </template> <script setup> import { ref, reactive, toRefs, onMounted, onBeforeUnmount } from 'vue'; import AssessmentjsEcharts from '@/views/oneMap/Echarts/AssessmentjsEcharts.vue'; import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'; import bus from '@/bus'; import { commonWarningList } from '@/api/RQWarning'; import { selectBoxBySiteNo, selectSiteMonitorBySiteType, waterloggingArchiveList } from '@/api/system/tanchuang'; const FXJCData = ref([ { xh: '1', hd: '延河', dqsw: 130, kzsw: 2000, zt: '超控制常水位', siteNo: '2024101614', }, { xh: '2', hd: '杜甫川河', dqsw: 10, kzsw: 300, zt: '正常', siteNo: '2024101615', }, { xh: '3', hd: '西川河', dqsw: 11, kzsw: 700, zt: '正常', siteNo: '2024101616', }, { xh: '4', hd: '南川河', dqsw: 12, kzsw: 700, zt: '正常', siteNo: '2024101617', }, ]); const listData = ref([ { siteName: '东关大街与长青路交叉口', onlineStatus: 'online', riskAnalysis: '无风险', siteNo: '2024101612' }, { siteName: '大桥街与延河西路交叉口', onlineStatus: 'online', riskAnalysis: '无风险', siteNo: '2024101613' }, // { siteName: '文化沟路与延河西路交叉口', siteStatus: '在线', warnInfo: '无风险' }, ]); const jsjcData = ref([ // { siteName: '东关大街与长青路交叉口', siteStatus: '在线', warnInfo: '无风险', siteNo: '2024101612' }, // { siteName: '大桥街与延河西路交叉口', siteStatus: '在线', warnInfo: '无风险', siteNo: '2024101613' }, // // { siteName: '文化沟路与延河西路交叉口', siteStatus: '在线', warnInfo} ]); const SSYJData = ref([ // { // wz: '东大街管网', // sj: 25, // zk: '高水位', // cz: '派单', // value: '004', //语音识别内容编码-前段自己设置的,后期项目有接口就直接替换数据唯一id // }, // { // wz: '枣园南路与枣园五路管网', // sj: 40, // zk: '满管', // cz: '派单', // value: '005', // }, // { // wz: '王家坪旧址门口', // sj: 12, // zk: '积水', // cz: '派单', // value: '006', // }, // { // wz: '金延安路与枣园大道管网 ', // sj: 50, // zk: '满管', // cz: '已派单', // }, // { // wz: '延大路与杨家岭路管网 ', // sj: 50, // zk: '满管', // cz: '已派单', // }, ]); const yearList = ref([ { name: '月', value: 1 }, { name: '年', value: 2 }, ]); const monitorData = ref([ { name: '漫溢监测(1/29)', value: 1 }, { name: '积水监测(0/16)', value: 2 }, { name: '水位监测(0/4)', value: 2 }, ]); const chartData2 = ref({ xAxis: ['12/1', '12/2', '12/3', '12/4', '12/5', '12/6'], refresh: 1, }); const activedname = ref('月'); const monitorname = ref('漫溢监测(1/29)'); function yearclick(val) { activedname.value = val.name; } function monitorclick(val) { monitorname.value = val.name; if (monitorname.value == '漫溢监测(1/29)') { listData.value = [ { siteName: '东关大街与长青路交叉口', onlineStatus: 'online', riskAnalysis: '无风险', siteNo: '2024101612' }, { siteName: '大桥街与延河西路交叉口', onlineStatus: 'online', riskAnalysis: '无风险', siteNo: '2024101613' }, // { siteName: '文化沟路与延河西路交叉口', siteStatus: '在线', warnInfo: '无风险' }, ]; } else if (monitorname.value == '积水监测(0/16)') { listData.value = jsjcData.value; // listData.value = [ // { siteName: '东关大街与长青路交叉口', siteStatus: '在线', warnInfo: '无风险' }, // { siteName: '大桥街与延河西路交叉口', siteStatus: '在线', warnInfo: '无风险' }, // // { siteName: '文化沟路与延河西路交叉口', siteStatus: '在线', warnInfo: '无风险' }, // ]; } else { console.log(monitorname.value, ' monitorname.value'); } } // 弹框 function showMapDalog(val) { console.log('val.siteName', val); let data = { title: val.siteName, // comIDs: ['gwpm', 'jcsj', 'danganInfo'], //满溢监测 comIDs: [], //满溢监测 SiteNo: val.siteNo, }; getTabsList(val.siteNo).then(res => { data.comIDs = res; bus.emit('publicDialog', data); }); // showPipe.value = true; } // 积水弹框 function JSshowMapDalog(val) { console.log("🚀 ~ JSshowMapDalog ~ val:", val) // let data = { // title: val.siteName, // comIDs: ['spjk', 'jcsj', 'danganInfo'], //积水监测 // }; // bus.emit('publicDialog', data); let data = { title: val.siteName, // comIDs: ['gwpm', 'jcsj', 'danganInfo'], //满溢监测 comIDs: [], //满溢监测 SiteNo: val.siteNo, }; getTabsList(val.siteNo).then(res => { // console.log('🚀 ~ getTabsList ~ res:', res); data.comIDs = res; bus.emit('publicDialog', data); }); // showPipe.value = true; } // 派单 const paidan = item => { let data = { title: item.wranLocation, comIDs: ['gdpf'], getSiteId: item.id, }; bus.emit('publicDialog', data); }; // 超控制常水位 function showcswDalog(val) { console.log(val, 'val'); let data = { title: val.hd + '监测点', comIDs: ['PS_ckzcsw'], }; bus.emit('publicDialog', data); // showPipe.value = true; } // 获取实时预警列表 const getRealTimeWarning = async () => { try { const res = await commonWarningList({ moduleType: 'drainage' }); SSYJData.value = res.data; // console.log('🚀 ~ getCommonWarningList ~ res:', res); } catch (error) { console.log('🚀 ~ getCommonWarningList ~ error:', error); } }; // 获取站点弹窗 tab列表 const getTabsList = async siteNo => { try { const res = await selectBoxBySiteNo(siteNo); const tabsList = res.data.boxList.map(item => item.boxId); return tabsList; } catch (error) { console.log('🚀 ~ getTabsList ~ error:', error); } }; // 积水监测 const getWaterlogging = async () => { try { const res = await selectSiteMonitorBySiteType({ monitorTargetType: 'waterlogging', orderBy: 'id desc', siteType: 'water_level', }); jsjcData.value = res.data; // console.log('🚀 ~ getWaterlogging ~ res:', res); } catch (error) { console.log('🚀 ~ getWaterlogging ~ error:', error); } }; onMounted(() => { // 获取预警列表 getRealTimeWarning(); // 积水监测 getWaterlogging(); }); </script> <style lang="scss" scoped> .riskAssessment { width: 450px; height: 43%; .Assessmentop { width: 450px; height: calc(100% - 50px); .subRightBox { // background: #2cfce9; width: 440px; margin: 0 auto; height: 35px; display: flex; cursor: pointer; font-size: 14px; color: #ffffff; line-height: 25px; .headcenter { width: 132px; height: 30px; padding: 2px 3px; background: url('@/assets/images/zhps/fxpgw.png') no-repeat; background-size: 100% 100%; text-align: center; margin-top: 5px; margin-left: 10px; } .activedright { border: 1px solid #2cfce9; color: #e4f5ff; background: url('@/assets/images/zhps/fxpgxz.png') no-repeat; background-size: 100% 100%; } } .leftSubTabsBox { width: 440px; height: calc(100% - 50px); margin: 0 auto; .tabContent { height: calc(100% - 1px); ul { height: 100%; // overflow: hidden; overflow-y: auto; padding: 0 16px; list-style: none; cursor: pointer; .listOne { margin-top: 5px; background: linear-gradient(0deg, #008599 0%, #08596d 100%); border-radius: 4px; padding: 2px 20px; .line { position: relative; padding: 6px 0; overflow: hidden; .lable { width: 80px; font-size: 14px; font-weight: 400; color: #39f7ff; padding-right: 4px; i { display: inline-block; width: 28px; } span { display: inline-block; width: 7px; } } .lable2 { width: 190px; } .box { // height: 26px; width: 240px; padding: 3px 0; line-height: 20px; border-radius: 2px 2px 2px 2px; border: 1px solid #1cf4fc48; text-align: center; font-size: 14px; font-weight: 400; color: #ffffff; } .box_Status { font-size: 16px; } .box2 { width: 120px; } span { display: block; padding: 0 6px; line-height: 18px; margin-left: 10px; font-size: 12px; border: 1px solid #b7b7b7; border-radius: 14px; color: #b7b7b7; background: rgba(183, 183, 183, 0.15); white-space: nowrap; &.rad { border-color: #ff3737; color: #ff3737; background: rgba(255, 55, 55, 0.15); } &.green { border-color: lime; color: lime; background: rgba(12, 134, 24, 0.15); } } } } } } } .waterBox { margin: 5px auto; width: 430px; height: calc(100% - 45px); .waterroll { height: 60%; // background: yellowgreen; .tableHeader { width: 100%; height: 34px; background: linear-gradient(0deg, #00fbffa3 0%, #00fbff00 100%); border-radius: 2px; border: 1px solid #74dde1; display: flex; .tableHeaderList { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; // padding-left: 5px; // text-align: center; } .tableList1 { width: 10%; text-align: center; } .tableList2 { width: 15%; text-align: center; } .tableList3 { width: 25%; text-align: center; // background: red; } .tableList4 { width: 35%; text-align: center; } .tableList5 { width: 20%; text-align: center; } } .tableBody { width: 100%; height: calc(100% - 38px); overflow: auto; // background: red; .tableBodyList { height: 34px; line-height: 34px; width: 100%; display: flex; /* 选择偶数行 */ &:nth-child(even) { background: linear-gradient(0deg, #008599 0%, #08596d 100%); } .tableBodyList_span1 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; text-align: center; width: 10%; // background: red; // padding-left: 5px; } .tableBodyList_span2 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; text-align: center; width: 15%; } .tableBodyList_span3 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; text-align: center; width: 20%; } .tableBodyList_span4 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 43px; text-align: center; width: 33%; } .tableBodyList_span5 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 35px; text-align: center; width: 22%; } } } } .watercontent { height: 40%; .Titlelarge { font-family: PangMenZhengDao; font-weight: 400; font-size: 23px; color: #ebfeff; } .Contentdetails { height: calc(100% - 30px); overflow: auto; // background: red; text-indent: 20px; font-family: Source Han Sans CN; font-weight: 500; font-size: 14px; color: #c1d3d4; } } } } } .WarningSou { width: 450px; height: 26%; .WarningSouTop { margin: 0 auto; width: 430px; height: calc(100% - 50px); .tableHeader { width: 100%; height: 34px; background: linear-gradient(0deg, #00fbffa3 0%, #00fbff00 100%); border-radius: 2px; border: 1px solid #74dde1; display: flex; .tableHeaderList { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; // padding-left: 5px; // text-align: center; } .tableList1 { width: 40%; padding-left: 15px; } .tableList2 { width: 20%; text-align: center; } .tableList3 { width: 20%; text-align: center; } .tableList4 { width: 20%; text-align: center; } } .tableBody { height: calc(100% - 35px); overflow: hidden; .tableBodyList { height: 34px; line-height: 34px; width: 100%; display: flex; /* 选择偶数行 */ &:nth-child(even) { background: linear-gradient(0deg, #008599 0%, #08596d 100%); } .tableBodyList_span1 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; width: 40%; padding-left: 10px; } .tableBodyList_span2 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; text-align: center; width: 20%; } .tableBodyList_span3 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 34px; text-align: center; width: 20%; } .tableBodyList_span4 { font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #ffffff; height: 34px; line-height: 30px; text-align: center; width: 20%; // background: red; // cursor: pointer; } } } } } .WarningAssess { width: 450px; height: 27%; .TopProportion { margin-top: 5px; display: flex; width: 100%; .WarningSl { display: flex; justify-content: space-around; align-items: center; width: 55%; .eachDescribe { display: flex; align-items: center; font-family: Source Han Sans CN; font-weight: 400; // padding-top: 5px; .icon { width: 8px; height: 8px; border-radius: 50%; } .bgcYellow { background: #2be7abff; } .bgcls { background: #18a7f2ff; } .text { padding: 0 10px 0 6px; font-family: Source Han Sans CN; font-weight: 500; font-size: 14px; color: #c1d3d4; } } } .WarningNy { display: flex; width: 45%; .head-right { cursor: pointer; font-size: 14px; color: #ffffff; display: flex; line-height: 18px; .head-item { width: 70px; margin-right: 10px; padding: 2px 3px; background: #00344f; height: 23px; text-align: center; position: relative; left: 40px; font-size: 16px; } .activedright { border: 1px solid #2cfce9; color: #e4f5ff; background: #166f84; } } } } .fxChart { margin: 5px auto; width: 420px; height: calc(100% - 80px); } } .ListBoxHeader { height: 44px; line-height: 50px; width: 98%; background: url('@/assets/newImgs/partBg.png') no-repeat; background-size: 100% 100%; display: flex; align-items: center; justify-content: space-between; margin: 7px 0px 0px 8px; .ListBoxHeader_font { font-family: PangMenZhengDao; font-weight: 400; font-size: 23px; color: #ebfeff; padding-left: 34px; } } ::-webkit-scrollbar { width: 5px; /* 设置滚动条的宽度 */ } </style>