<template>
  <div class="module">
    <div class="displayFlex left_bg">
      <div class="flex1" style="flex: 0.8">
        <div class="yd_title left_1">
          <span class="text">
            <img
              v-if="leftchoose.first == '1'"
              src="@/assets/images/hygiene/yb_1.png"
              style="width: 130px; height: 30px; cursor: pointer"
            />
            <img
              v-else
              src="@/assets/images/hygiene/yb_1_1.png"
              style="width: 130px; height: 30px; cursor: pointer"
              @click="change('first', '1')"
            />
            <img
              v-if="leftchoose.first == '2'"
              src="@/assets/images/hygiene/yb_2.png"
              style="width: 130px; height: 30px; cursor: pointer"
            />
            <img
              v-else
              src="@/assets/images/hygiene/yb_1_1.png"
              style="width: 130px; height: 30px; cursor: pointer"
              @click="change('first', '2')"
            />
          </span>
        </div>
        <ePie v-if="leftchoose.first == '1'"></ePie>
        <ePie2 v-else></ePie2>
      </div>
      <div class="flex1" style="margin-top: 10px">
        <div class="yd_title left_2"></div>
        <eP2></eP2>
      </div>
      <div class="flex1" style="margin-top: 10px">
        <div class="yd_title left_3"></div>
        <eP3></eP3>
      </div>
    </div>
    <div class="displayFlex center_bg">
      <div class="flex1" style="flex: 0.8">
        <div class="yd_title center_1"></div>
        <div class="minTopPart">
          <div class="mtpImg1"></div>
          <div class="mtpImg2">建档份数</div>
          <div class="mtpText2">33.67万</div>
        </div>
        <div class="minTopPart2">
          <div class="left">
            <div class="leftImg"><eP4></eP4></div>
            
            <div class="left_me">
              <div>建档率</div>
              <div>92.96%</div>
            </div>
          </div>
          <div class="right">
            <div class="rightImg"></div>
            <div class="right_me">
              <div>家庭医生</div>
              <div>2000</div>
            </div>
          </div>
        </div>
      </div>
      <div class="flex1" style="margin-top: 20px">
        <div class="yd_title familyPlanning"></div>
        <!-- 计划生育 -->
        <!-- <div style="width: 100%; "> -->
        <eP5></eP5>
        <!-- </div> -->
      </div>
    </div>
    <div class="displayFlex right_bg">
      <div class="flex1" style="flex:0.9">
        <div class="yd_title mechanism"></div>
        <eP6></eP6>
      </div>
      <div class="flex1" style="flex:1.1;">
        <div class="yd_title service"></div>
        <eP7></eP7>
      </div>
      <div class="flex1" >
        <div class="yd_title last"></div>
        <div class="table">
          <div class="item" v-for="i in 15">3月2日健康日，在龙中公园进行健康活动宣</div>
    
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import ePie from "./echarts_hygiene/pie.vue";
import ePie2 from "./echarts_hygiene/pie2.vue";
import eP2 from "./echarts_hygiene/eP2.vue";
import eP3 from "./echarts_hygiene/eP3.vue";
import eP7 from "./echarts_hygiene/eP7.vue";
import eP6 from "./echarts_hygiene/eP6.vue";
import eP5 from "./echarts_hygiene/eP5.vue";
import eP4 from "./echarts_hygiene/eP4.vue";
import { ref, onMounted, onBeforeMount } from "vue";
const leftchoose = ref({
  first: "1",
  second: "1",
  third: "1",
});
const change = (name, index) => {
  leftchoose.value[name] = index;
};
</script>

<style lang="scss" scoped>
.displayFlex {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  // flex: 1;
  width: 33.333333333%;
}

.flex1 {
  flex: 1;
  // padding: 0 28px;
  box-sizing: border-box;
}

.flex2 {
  // flex: 1;
  // padding: 0 38px;
  box-sizing: border-box;
}

.module {
  display: flex;
  width: 100%;
}

.yd_title {
  // background-image: url(@/assets/img_04.png);
  // background-repeat: no-repeat;
  // background-size: 100% 100%;
  box-sizing: border-box;
  width: 94%;
  height: 36px;
  position: relative;

  .text {
    display: flex;
    position: absolute;
    font-size: 16px;
    font-family: SourceHanSansCN;
    font-weight: bold;
    color: #ffffff;
    position: absolute;
    right: 5px;
    top: 3px;
  }
}

.familyPlanning {
  background-image: url(@/assets/images/hygiene/center_title_2.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.mechanism {
  background-image: url(@/assets/images/hygiene/right_title_1.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.service {
  background-image: url(@/assets/images/hygiene/right_title_2.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.last {
  background-image: url(@/assets/images/hygiene/right_title_3.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.serviceBox {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;

  .serviceimg {
    width: 182px;
    height: 35px;
  }

  .serviceTop {
    display: flex;
    justify-content: space-between;
    padding: 10px 36px 0px 20px;
    box-sizing: border-box;
    .visit {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .medicalService {
      display: flex;
      flex-direction: column;
      align-items: center;

      .ylimg {
        width: 200px;
        height: 220px;
      }

      .medicalServiceTop {
        position: relative;

        span {
          position: absolute;
          left: 39px;
          top: 35%;
          font-weight: bold;
          font-size: 32px;
          color: #ffffff;
          line-height: 41px;
          letter-spacing: 1px;
          text-align: center;
          font-style: normal;
          font-family: DINAlternate, DINAlternate;
        }
      }
    }
  }
}
.mealAssistance {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .mealAssistanceimg {
    width: 495px;
    height: 35px;
  }
}

.left_1 {
  background-image: url(@/assets/images/hygiene/left_title_1.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.left_2 {
  background-image: url(@/assets/images/hygiene/left_title_2.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.left_3 {
  background-image: url(@/assets/images/hygiene/left_title_3.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.center_1 {
  background-image: url(@/assets/images/hygiene/center_title_1.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.left_bg {
  width: 642px;
  // height: 100%;
  box-sizing: border-box;
  padding-left: 50px;
  margin-right: 28px;
  background-image: url(@/assets/images/left_bg.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.center_bg {
  width: 582px;
  // height: 100%;
  box-sizing: border-box;
  padding-left: 10px;
  margin-right: 28px;
  background-image: url(@/assets/images/center_bg.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.right_bg {
  width: 642px;
  box-sizing: border-box;
  padding-left: 10px;
  margin-right: 28px;
  background-image: url(@/assets/images/right_bg.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.basicInformation {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding-top: 22px;

  .basicInformation_item {
    flex: 0 0 50%;
    padding: 0 2px;
    margin-bottom: 10px;
    margin-top: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;

    .icon {
      width: 79px;
      height: 47px;
    }

    .right {
      margin-left: 4px;

      .label {
        background-image: url(@/assets/img_11.png);
        background-size: 100%;
        background-repeat: no-repeat;
        background-position: bottom;
        margin-bottom: 4px;

        span {
          font-size: 12px;
          font-weight: 400;
          color: #eff0f1;
          line-height: 19px;
          margin-left: 2px;
        }
      }

      p {
        font-size: 16px;
        font-weight: bold;
        color: #6acbff;
        line-height: 24px;
      }
    }
  }
}

.visitLog {
  .visitLog_item {
    display: flex;
    align-items: center;
    background-image: url(@/assets/img_12.png);
    background-size: 100% 100%;
    margin-top: 16px;
    padding: 15px 8px;
    box-sizing: border-box;

    img {
      display: inline-block;
      margin-right: 10px;
    }

    .visitLog_item_box {
      flex: auto;

      h4 {
        font-size: 18px;
        font-family: MicrosoftYaHei;
        font-weight: bold;
        color: #0096ff;
        margin-bottom: 2px;
      }

      p {
        font-size: 12px;
        font-family: SourceHanSansCN;
        font-weight: 400;
        color: #ffffff;
        margin-top: 6px;
      }
    }

    .check {
      font-size: 12px;
      font-family: SourceHanSansCN;
      font-weight: 400;
      color: #0096ff;
      line-height: 20px;
    }
  }
}

.history {
  padding-top: 12px;
  display: flex;
  justify-content: space-around;
  .history1 {
    font-size: 26px;
    color: #ffffff;
    line-height: 30px;
    letter-spacing: 1px;
    text-align: center;
    font-style: normal;
    font-family: PangMenZhengDao;

    display: flex;
    flex-direction: column;
    align-items: center;

    .unit {
      font-weight: 500;
      font-size: 14px;
      color: #9cdeff;
      line-height: 20px;
      text-align: left;
      font-style: normal;
      font-family: PingFangSC, PingFang SC;
    }

    .historyimg {
      width: 182px;
      height: 35px;
    }
  }

  img {
    width: 154px;
    height: 136px;
  }

  p {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    line-height: 28px;
    border-bottom: 13px solid rgba(57, 59, 109, 1);
  }
}

.concernLabel {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 20px;

  span {
    text-align: center;
    background: rgba(0, 89, 130, 0.73);
    border-radius: 10px;
    width: 118px;
    height: 49px;
    line-height: 49px;
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
    margin: 0 10px;
  }
}

.property {
  display: flex;
  padding: 14px 0 10px;

  .property_box {
    background-image: url(@/assets/img_05.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 179px;
    height: 91px;
    margin: 0 12px;
    text-align: center;

    h5 {
      font-size: 14px;
      font-weight: 400;
      color: #ffffff;
      margin: 9px 0 16px;
    }

    p {
      font-size: 21px;
      font-weight: bold;
      color: #48ece7;
    }
  }
}

.activity {
  h5 {
    font-size: 14px;
    font-weight: bold;
    color: rgba(0, 164, 250, 0.8);
    line-height: 47px;
    border-bottom: 2px solid rgba(0, 164, 250, 1);
    margin-bottom: 17px;
  }

  .activity_content {
    margin: 0 -6px 12px;
    display: flex;

    .activity_box {
      width: 50%;
      display: inline-block;
      margin: 0 6px;
      box-sizing: border-box;
      background-color: rgba(15, 28, 54, 1);
      padding: 12px 12px 19px;

      p {
        font-size: 14px;
        font-weight: 400;
        color: #ffffff;
        line-height: 27px;
        height: 100%;
      }
    }
  }
}

.monitor {
  .monitor_box {
    display: flex;
    padding: 8px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.67);

    img {
      width: 115px;
      height: 84px;
      margin-right: 21px;
    }

    .monitor_box_text {
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      h4 {
        font-size: 14px;
        font-weight: 400;
        color: #ffffff;
        line-height: 20px;
      }

      p {
        font-size: 14px;
        font-weight: 400;
        color: #818181;
        line-height: 23px;
      }
    }
  }
}

.minTopPart {
  width: 498px;
  height: 99px;
  background-image: url(@/assets/images/hygiene/shang.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  margin: 50px auto;
  position: relative;
  .mtpImg1 {
    width: 152px;
    height: 164px;
    background-image: url(@/assets/images/hygiene/shang_left.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    top: -30px;
    left: 63px;
  }
  .mtpImg2 {
    width: 140px;
    height: 50px;
    background-image: url(@/assets/images/hygiene/jd.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    top: 59px;
    right: 50px;
    text-align: center;
    color: #ffffff;
     letter-spacing: 5px; 
     font-size: 20px;
  }
  .mtpText2 {
    width: 140px;
    height: 30px;
    position: absolute;
    top: 14px;
    right: 50px;
    text-align: center;
    line-height: 30px;
    font-weight: 600;
    font-size: 26px;
    color: #ffffff;
  }
}
.minTopPart2 {
  width: 498px;
  height: 118px;
  background-image: url(@/assets/images/hygiene/xia.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  margin: 60px auto;
  position: relative;
  display: flex;
  margin-top: 80px;
  .left {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 60px;
    margin-top: -10px;
    .leftImg {
      width: 105px;
      height: 105px;
    }
    .left_me {
      margin-left: 10px;
      display: flex;
      flex-direction: column;
      color: #ccc;
    }
  }
  .right {
    display: flex;
    align-items: center;
    // justify-content: center;
    margin-left: 40px;
    .rightImg {
      width: 81px;
      height: 81px;
      background-image: url(@/assets/images/hygiene/xia_right.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
    .right_me {
      margin-left: 10px;
      display: flex;
      flex-direction: column;
      color: #ccc;
    }
  }
}
.table {
  box-sizing: border-box;
  margin-top: 10px;
  width: 95%;
  height: 240px;
  // height: calc(100% - 115px);
  // background: red;
  overflow-y: auto;
 
  .item {
    box-sizing: border-box;
    margin-top: 10px;
    padding: 16px 20px;
    background-image: url(@/assets/images/hygiene/table_bg.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: #ffffff;
  }

}
/* 滚动条整体部分 */
.table::-webkit-scrollbar {
	width: 5px;
	// height: 10px;
}
/* 滚动槽 */
.table::-webkit-scrollbar-track {
	border-radius: 1px;
	background: rgba(41, 157, 255, 0.56);
	-webkit-box-shadow: inset 0 0 6px rgba(139, 139, 139, 0.3);
}
/* 滚动条滑块样式 */
.table::-webkit-scrollbar-thumb {
	background-clip: content-box;
	border-radius: 6px;
	background: rgba(41, 157, 255, 1);
	-webkit-box-shadow: inset 0 0 6px rgba(20, 20, 20, 0.3);
}
</style>
