<template>
  <div>
    <div class="app-container home">
      <div id="cesiumContainer">
        <div class="center-title-box">
          <div class="control-state">
            <p>
              <span class="icon-img"></span>
              <span>已开启智能控制</span>
            </p>
          </div>
          <div class="title-box top">
            <p class="title">液体高度:10m</p>
            <p class="name">蓄水池</p>
          </div>
          <div class="title-box center">
            <p class="title">液体高度:10m</p>
            <p class="name">二中水仓</p>
          </div>
          <div class="title-box bottom">
            <p class="title">液体高度:10m</p>
            <p class="name">五中水仓</p>
          </div>
        </div>
        <div class="water-pump pst1">
          <div class="H36">
            <div class="button on" @click="openWaterPump">开启</div>
            <div class="button off" @click="closeWaterPump">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-left"></div>
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-left"></div>
              <p>5#水泵</p>
            </div>
          </div>
        </div>
        <div class="water-pump pst2">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-left"></div>
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-left"></div>
              <p>5#水泵</p>
            </div>
          </div>
        </div>
        <div class="water-pump pst3">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-right"></div>
              <p>5#水泵</p>
            </div>
            <div class="phd-left"></div>
          </div>
        </div>
        <div class="water-pump pst4">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-left"></div>
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-left"></div>
              <p>5#水泵</p>
            </div>
          </div>
        </div>
        <div class="water-pump pst5">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-left"></div>
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-left"></div>
              <p>5#水泵</p>
            </div>
          </div>
        </div>
        <div class="water-pump pst6">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-right"></div>
              <p>5#水泵</p>
            </div>
            <div class="phd-left"></div>
          </div>
        </div>
        <div class="water-pump pst7">
          <div class="H36">
            <div class="button on">开启</div>
            <div class="button off">关闭</div>
          </div>
          <div class="H164">
            <div class="phd-right">
              <div class="phd-top"></div>
              <div class="water-pump-img-right"></div>
              <p>5#水泵</p>
            </div>
            <div class="phd-left"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="up-window" v-show="upWindowShow">
      <div class="up-window-box">
        <p><span></span>开启/关闭水泵</p>
        <i class="el-icon-close close-button" @click="upWindowShow = false"></i>
        <div class="W400">
          <span>请输入密码</span>
          <el-input placeholder="" v-model="password" show-password></el-input>
        </div>
        <div>
          <div class="button close">关闭</div>
          <div class="button">开启</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "cesium",
  data() {
    return {
      password: "",
      upWindowShow: false,
    };
  },
  created() {},
  methods: {
    // 水泵开启按钮
    openWaterPump() {
      this.upWindowShow = true;
    },
    // 水泵关闭按钮
    closeWaterPump() {
      this.upWindowShow = true;
    },
  },
};
</script>

<style scoped lang="scss">
.home {
  width: 100%;
  height: 100%;
  background: url("~@/assets/images/screen/psxt/bg.png") no-repeat center;
  display: flex;
  justify-content: center;
  padding-top: 155px;
  #cesiumContainer {
    width: 1800px;
    height: 745px;
    background: url("~@/assets/images/screen/psxt/gd.png") no-repeat center;
    background-size: 1800px 745px;
    position: relative;
    .center-title-box {
      width: 200px;
      height: 100%;
      margin: auto;
      position: relative;
      .control-state {
        width: 260px;
        height: 44px;
        background: url("~@/assets/images/screen/psxt/bg1.png") no-repeat center;
        background-size: 100% 100%;
        position: absolute;
        top: 33px;
        left: 342px;
        p {
          font-weight: 400;
          font-size: 20px;
          color: #ffd929;
          line-height: 44px;
          margin: 0px;
          text-align: center;
          .icon-img {
            background: url("~@/assets/images/screen/psxt/icon1.png") no-repeat
              center;
            width: 20px;
            height: 20px;
            display: inline-block;
            margin-bottom: -4px;
            margin-right: 10px;
          }
        }
      }
      .title-box {
        text-align: center;
        .title {
          font-family: Source Han Sans SC;
          font-weight: 400;
          font-size: 18px;
          color: #11e0ff;
        }
        .name {
          font-weight: 400;
          font-size: 20px;
          color: #ffffff;
        }
      }
      .top {
        margin-top: -35px;
      }
      .center {
        margin-top: 273px;
      }
      .bottom {
        margin-top: 270px;
      }
    }
    .water-pump {
      position: absolute;
      width: 172px;
      height: 200px;
      // background: #ffffff;
      .H36 {
        height: 36px;
        .button {
          width: 86px;
          height: 36px;
          float: left;
          line-height: 36px;
          text-align: center;
          font-weight: bold;
          font-size: 18px;
          color: #96aeba;
          line-height: 32px;
          text-shadow: 0px 1px 4px rgba(5, 38, 68, 0.73);
          border: 2px solid #d8efff;
          border-radius: 2px;
          background: RGBA(0, 26, 49, 1);
          cursor: pointer;
        }
        .on {
          &.active {
            background: url("~@/assets/images/screen/psxt/button.png") no-repeat
              center;
            color: #ffffff;
          }
        }
        .off {
          border-left: none;
          &.active {
            background: url("~@/assets/images/screen/psxt/button2.png")
              no-repeat center;
            color: #ffffff;
          }
        }
      }
      .H164 {
        height: calc(100% - 36px);
        .phd-left {
          width: 50px;
          height: calc(100% - 36px);
          float: left;
        }
        .phd-right {
          width: 122px;
          height: calc(100% - 36px);
          float: left;
          .phd-top {
            height: 40px;
          }
          .water-pump-img-left {
            width: 122px;
            height: 70px;
            background: url("~@/assets/images/screen/psxt/item.png") no-repeat
              center;
          }
          .water-pump-img-right {
            width: 122px;
            height: 70px;
            background: url("~@/assets/images/screen/psxt/item1.png") no-repeat
              center;
          }
          p {
            font-weight: 400;
            font-size: 20px;
            color: #ffffff;
            line-height: 30px;
            text-align: center;
            margin-top: 3px;
          }
        }
      }
      &.pst1 {
        top: 139px;
        left: 143px;
      }
      &.pst2 {
        top: 139px;
        left: 582px;
      }
      &.pst3 {
        top: 139px;
        left: 1408px;
      }
      &.pst4 {
        top: 480px;
        left: 0px;
      }
      &.pst5 {
        top: 480px;
        left: 440px;
      }
      &.pst6 {
        top: 480px;
        left: 1188px;
      }
      &.pst7 {
        top: 480px;
        left: 1630px;
      }
    }
  }
}
.up-window {
  width: 100%;
  height: 100%;
  background: RGBA(4, 21, 42, 0.6);
  position: absolute;
  z-index: 9999;
  top: 0;
  left: 0;
  .up-window-box {
    width: 588px;
    height: 350px;
    background: linear-gradient(0deg, #062451 0%, #09162d 100%);
    box-shadow: 0px 15px 11px 2px rgba(0, 20, 39, 0.31);
    border: 2px solid #11b9ff;
    opacity: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 37px 37px 27px;
    color: #ffffff;
    p {
      width: 500px;
      height: 37px;
      margin: 0px;
      background: url("~@/assets/images/screen/psxt/title.png") no-repeat center;
      background-size: 100%;
      font-weight: 500;
      font-size: 22px;
      color: #ffffff;
      height: 37px;
      background-position-y: 9px;
      span {
        width: 27px;
        display: inline-block;
      }
    }
    .close-button {
      font-size: 30px;
      position: absolute;
      top: 16px;
      right: 16px;
      cursor: pointer;
      &:hover {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
        -webkit-transition: -webkit-transform 1s linear;
        transition: transform 1s linear;
      }
    }
    .W400 {
      width: 400px;
      margin: auto;
      ::v-deep .el-input__inner {
        border-radius: 0px !important;
        height: 52px;
      }
      span {
        font-weight: 400;
        font-size: 21px;
        color: #ffffff;
        margin-top: 60px;
        display: inline-block;
        margin-bottom: 15px;
      }
    }
    .button {
      width: 110px;
      height: 42px;
      background: #11b9ff;
      border-radius: 4px;
      font-weight: 400;
      font-size: 20px;
      color: #ffffff;
      text-align: center;
      line-height: 42px;
      float: left;
      margin-left: 100px;
      margin-top: 55px;
      cursor: pointer;
      &:hover {
        background: #66d2ff;
      }
      &.close {
        background: none;
        color: #fff;
        &:hover {
          color: #66d2ff;
        }
      }
    }
  }
}
</style>
