Newer
Older
urbanLifeline_YanAn / src / views / oneMap / SmartDrainage / PsRightBox.vue
@鲁yixuan 鲁yixuan on 7 Oct 17 KB updata
<!--智慧排水左右侧面板 -->
<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/7)'">
        <div class="waterroll">
          <div class="tableHeader">
            <span class="tableHeaderList tableList1">序号</span>
            <span class="tableHeaderList tableList2">河道</span>
            <span class="tableHeaderList tableList3">当前水位(m)</span>
            <span class="tableHeaderList tableList4">控制常水位(m)</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.zk == '1'">正 常</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" v-if="monitorname == '漫溢监测(1/12)' || monitorname == '积水监测(3/13)'">
        <div class="tabContent">
          <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="i.siteStatus == '在线' ? 'green' : 'rad'">{{ i.siteStatus }}</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.warnInfo != '无风险' ? 'cRad' : 'cGreen'"
                >
                  {{ i.warnInfo }}
                </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="WarningList">
        <div class="WarningNy">
          <div class="head-right" style="">
            <div
              class="head-item"
              v-for="(item, index) in yearListA"
              :key="item"
              :class="activednameA == item.name ? 'activedright' : ''"
              @click="yearclickA(item, index)"
            >
              {{ item.name }}
            </div>
          </div>
        </div>
      </div>
      <div class="yjlyChart"></div>
    </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 bus from '@/bus';
const listData = ref([{ siteName: '东关大街与长青路交叉口', siteStatus: '在线', warnInfo: '无风险' }]);
const FXJCData = ref([
  {
    xh: '0',
    hd: '延河',
    dqsw: 961.26,
    kzsw: 960.26,
    zk: '1',
  },
]);
const yearList = ref([
  { name: '月', value: 1 },
  { name: '年', value: 2 },
]);
const yearListA = ref([
  { name: '月', value: 1 },
  { name: '年', value: 2 },
]);
const monitorData = ref([
  { name: '漫溢监测(1/12)', value: 1 },
  { name: '积水监测(3/13)', value: 2 },
  { name: '水位监测(0/7)', value: 2 },
]);
const chartData2 = ref({
  xAxis: ['12/1', '12/2', '12/3', '12/4', '12/5', '12/6'],
  refresh: 1,
});
const activedname = ref('月');
const activednameA = ref('月');
const monitorname = ref('漫溢监测(1/12)');
function yearclick(val) {
  activedname.value = val.name;
}
function yearclickA(val) {
  activednameA.value = val.name;
}
function monitorclick(val) {
  monitorname.value = val.name;
  if (monitorname.value == '漫溢监测(1/12)') {
    listData.value = [{ siteName: '东关大街与长青路交叉口', siteStatus: '在线', warnInfo: '无风险' }];
  } else if (monitorname.value == '积水监测(3/13)') {
    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.siteName');
  let data = {
    title: val.siteName,
    comIDs: ['gwpm', 'jcsj'],
  };
  bus.emit('publicDialog', data);
  // showPipe.value = true;
}
</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 #1cf5fc;
                text-align: center;
                font-size: 14px;
                font-weight: 400;
                color: #ffffff;
              }
              .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: #0fcd22;
                  color: #0fcd22;
                  background: rgba(15, 205, 34, 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: 10%;
            text-align: center;
          }
          .tableList3 {
            width: 25%;
            text-align: center;
          }
          .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: 10%;
            }
            .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: 25%;
            }

            .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: 35%;
            }
            .tableBodyList_span5 {
              font-family: Source Han Sans CN;
              font-weight: 400;
              font-size: 14px;
              color: #ffffff;
              height: 34px;
              line-height: 43px;
              text-align: center;
              width: 20%;
              cursor: pointer;
            }
          }
        }
      }
      .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% - 55px);
    // background: red;
    .WarningList {
      margin-top: 5px;
      display: flex;
      width: 100%;
      .WarningNy {
        width: 100%;
        .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: 270px;
          }
          .activedright {
            border: 1px solid #2cfce9;
            color: #e4f5ff;
            background: #166f84;
          }
        }
      }
    }
    .yjlyChart {
      margin: 15px auto;
      width: 420px;
      height: calc(100% - 40px);
      background: url('@/assets/images/zhps/yjly.png') no-repeat;
      background-size: 100% 100%;
    }
  }
}
.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;
        }
        .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>