<template> <div id="BengZhanRight"> <div class="modular1_right"> <div class="ListInfo100"> <div class="ListInfo_label">泵站名称:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.name ? AllData.bengZhanInfo.name : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">泵站类型:</div> <div class="ListInfo_value"> <!-- {{ AllData.bengZhanInfo.pointNumber ? AllData.bengZhanInfo.pointNumber : "--" }} --> <dict-tag :options="pump_station_type" :value="AllData.bengZhanInfo.type" /> </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">所属水系:</div> <div class="ListInfo_value"> <!-- {{ AllData.bengZhanInfo.pointNumber ? AllData.bengZhanInfo.pointNumber : "--" }} --> {{ selectArrListLabel( alllist, AllData.bengZhanInfo.waterRegionCode, "id", "name" ) }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">设计规模:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.designFlowRate ? AllData.bengZhanInfo.designFlowRate + "m³/s" : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">泵机个数:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.pumpNumber ? AllData.bengZhanInfo.pumpNumber + "个" : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">装机功率:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.power ? AllData.bengZhanInfo.power + "kw" : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">起抽水位:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.startLevel ? AllData.bengZhanInfo.startLevel + "m" : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">停抽水位:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.controlLevel ? AllData.bengZhanInfo.controlLevel + "m" : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">汇入管网:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.entrance ? AllData.bengZhanInfo.entrance : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">排出管网:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.discharge ? AllData.bengZhanInfo.discharge : "--" }} </div> </div> <div class="ListInfo100"> <div class="ListInfo_label">流入场站:</div> <div class="ListInfo_value"> {{ AllData.bengZhanInfo.flowInto ? AllData.bengZhanInfo.flowInto : "--" }} </div> </div> </div> <div class="modular2_right"> <div class="leve2Title">进站水量</div> <div class="modularBody"> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.jinZhan.jinZhanA + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.jinZhan.jinZhanA }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">今日水量</div> </div> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.jinZhan.jinZhanB + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.jinZhan.jinZhanB }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">昨日水量</div> </div> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.jinZhan.jinZhanC + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.jinZhan.jinZhanC }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">7日平均水量</div> </div> </div> </div> <!-- 一级泵站 展示出水量 --> <div class="modular2_right" v-if="AllData.ChuShuiShow"> <div class="leve2Title">出站水量</div> <div class="modularBody"> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.ChuZhan.ChuZhanA + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.ChuZhan.ChuZhanA }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">今日水量</div> </div> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.ChuZhan.ChuZhanB + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.ChuZhan.ChuZhanB }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">昨日水量</div> </div> <div class="SLList"> <div class="SlList1P"> <el-tooltip :content="AllData.ChuZhan.ChuZhanC + '万吨'" placement="top"> <span class="SlListNum">{{ AllData.ChuZhan.ChuZhanC }}</span> </el-tooltip> <span class="SlListUnit">万吨</span> </div> <div class="SlList2P">7日平均水量</div> </div> </div> </div> <!-- 二级泵站 展示泵机状态 --> <div class="modular3_right" v-if="!AllData.ChuShuiShow"> <div class="leve2Title">泵机状态</div> <div class="modularBody"></div> </div> <div class="modular4_right"> <div class="leve2Title">实时水量</div> <div class="modularBody">Echarts</div> </div> </div> </template> <script setup name="BengZhanRight"> import { ref, reactive, toRefs, onMounted } from "vue"; import { listwaterRegionInfo, getBaseDetail } from "@/api/MonitorAssetsOnMap"; const { proxy } = getCurrentInstance(); const AllData = reactive({ // 泵站基础信息 bengZhanInfo: {}, // 是否展示出水量 ChuShuiShow: true, // 进站水量 :::::: 与后台对接口后替换jinZhanA,B,C的字段即可 jinZhan: { jinZhanA: "10", jinZhanB: "20", jinZhanC: "30", }, // 出站水量:::::: 与后台对接口后替换ChuZhanA,B,C的字段即可 ChuZhan: { ChuZhanA: "11", ChuZhanB: "21", ChuZhanC: "31", }, }); const props = defineProps({ //类型 Datatype: { type: String, default: "", }, //id DataId: { default: "", }, }); const { pump_station_type } = proxy.useDict("pump_station_type"); // 获取所有泵站信息 const getBengZhanInfo = () => { getBaseDetail({ dataId: props.DataId, dataCode: props.Datatype, }).then((res) => { if (res && res.code == 200) { AllData.bengZhanInfo = res.data; } }); }; // 获取水系信息 const alllist = ref([]); function getListlast() { listwaterRegionInfo().then((response) => { alllist.value = response.data; }); } watch( () => props.DataId, (val) => { console.log("BengZhanRight组件的泵站id编号变了", val); getBengZhanInfo(); }, { immediate: true, deep: true } ); onMounted(() => { getListlast(); }); </script> <style lang="scss" scoped> #BengZhanRight { width: 100%; height: 100%; .modular1_right { width: 100%; height: auto; overflow: auto; .ListInfo100 { width: 100%; height: auto; float: left; margin-top: 5px; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; // box-sizing: border-box; // padding: 0 20px 0 10px; } .ListInfo_label { width: 75px; height: auto; line-height: 26px; text-align: center; font-family: Source Han Sans CN; font-weight: bold; font-size: 14px; color: #ccdfff; } .ListInfo_value { width: calc(100% - 75px); height: auto; line-height: 18px; background: #0d2359; border-radius: 6px; border: 1px solid #0b9bff; box-sizing: border-box; padding: 5px 5px 5px 10px; font-family: Source Han Sans CN; font-weight: 400; font-size: 14px; color: #00fcff; } } .modular2_right { width: 100%; height: 120px; .modularBody { width: 100%; height: calc(100% - 50px); display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-evenly; align-items: center; .SLList { display: inline-block; width: 33.33%; height: 80px; box-sizing: border-box; padding: 15px 0; background-image: url("@/assets/images/pictureOnMap/SLFX2.png"); background-repeat: no-repeat; background-size: contain; .SlList1P { width: 100%; height: 25px; line-height: 25px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; .SlListNum { font-family: DINPro; font-weight: bold; font-size: 22px; color: #00fcff; } .SlListUnit { font-family: Source Han Sans CN; font-weight: 400; font-size: 16px; color: #ccdfff; } } .SlList2P { font-family: Source Han Sans CN; font-weight: 400; font-size: 16px; color: #ffffff; height: 25px; line-height: 25px; text-align: center; } } } } .modular4_right { width: 100%; height: 280px; .modularBody { } } } </style>