<template>
  <div class="home">
    <nav-bar :title="title" />
    <div class="bj"></div>
    <div class="zstj_tc_detail">
      <div class="box1">
        <div class="container">
          <h2>科室详情</h2>
          <p v-html="detail.info" class="indent"></p>

          <!-- <p>{{ detail.info }}</p> -->
        </div>
      </div>
      <!--div class="box1">
        <div class="container">
          <h2>科室分布图文</h2>
          <div class="details" v-html="detail.address"></div>
          <p><img :src="detail.img" /></p>
        </div>
      </div-->

      <div class="box3">
        <div class="bt">科室人员配置</div>
        <ul>
          <li v-for="item in detail.ys" :key="item.id">
            <router-link :to="'Hospital_zjjs_detail?id=' + item.id">
              <h2><img :src="item.img || require('@/assets/member_tx.png')" /></h2>
              <h3>
                {{ item.name }}<span>{{ item.label }}</span>
                <p>擅长：</p>
                <p v-html="item.grsc"></p>
              </h3>
            </router-link>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import { apiGetksinfo } from "@/request/api.js";
import { Toast } from "vant";

export default {
  components: {},

  data() {
    return {
      title: "",
      detail: {},
      list: [
        {
          img: require("../assets/yisheng.jpg"),
          url: "/Hospital_zjjs_detail",
          name: "张树立",
          grade: "主任医师",
          jianj: "擅长：骨科各种危重症的诊断和抢救、以骨关节为",
        },
        {
          img: require("../assets/yisheng.jpg"),
          url: "/Hospital_zjjs_detail",
          name: "张树立",
          grade: "主任医师",
          jianj: "擅长：骨科各种危重症的诊断和抢救、以骨关节为",
        },
        {
          img: require("../assets/yisheng.jpg"),
          url: "/Hospital_zjjs_detail",
          name: "张树立",
          grade: "主任医师",
          jianj:
            "擅长：骨科各种危重症的诊断和抢救、以骨关节为擅长：骨科各种危重症的诊断和抢救、以骨关节为",
        },
      ],
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    // 获取详情
    getData() {
      apiGetksinfo({
        id: this.$route.query.id,
      }).then((res) => {
        this.detail = res.data;
        this.title = res.data.name;
      });
    },
  },
};
</script>

<style scoped lang="scss">
.indent {
  text-indent: 2em;
}
.noindent{
  text-indent: 0em !important;
}
.bj {
  background: #f5f5f5;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  z-index: -1;
}
.zstj_tc_detail .box {
  background: #fff;
  padding: 40px 0px;
  margin-bottom: 10px;
}

.zstj_tc_detail .box .container {
  display: flex;
  justify-content: space-between;
}

.zstj_tc_detail .box .container h2 {
  font-size: 36px;
  color: #333;
}

.zstj_tc_detail .box .container h3 {
  color: #d62e25;
  font-size: 32px;
}

.zstj_tc_detail .box1 {
  background: #fff;
  padding: 40px 0px;
  margin-bottom: 10px;
}

.zstj_tc_detail .box1 h2 {
  font-size: 36px;
  color: rgb(0, 0, 0);
  padding-bottom: 20px;
  font-weight: 500;
}

.zstj_tc_detail .box1 p,
.zstj_tc_detail .box1 .details {
  color: #333;
  font-size: 30px;
  line-height: 45px;
  display: block;
  padding-bottom: 20px;
}
.zstj_tc_detail .box1 img {
  max-width: 100%;
  height: auto;
}

.box3 {
  background: #fff;
  box-sizing: border-box;
  padding: 30px;
  position: relative;
  margin-bottom: 10px;
}

.box3 .bt {
  display: flex;
  justify-content: space-between;
  color: #333;
  font-size: 36px;
  padding-bottom: 20px;
  font-weight: 500;
}

.box3 .bt p a {
  font-size: 26px;
  color: #39c5ba;
}

.box3 ul li {
  background: #fff;
  margin-bottom: 20px;
  border-bottom: 1px solid #f5f5f5;
  a {
    display: flex;
    box-sizing: border-box;
    padding: 30px 0px;
    h2 img {
      width: 98px;
      height: 98px;
      border-radius: 50%;
      margin-right: 20px;
    }
    h3 {
      color: #333;
      font-size: 30px;
      position: relative;
      width: calc(100% - 118px);
      span {
        font-size: 22px;
        color: #666;
        padding-left: 15px;
      }
      p {
        font-size: 24px;
        color: #999;
        display: block;
        padding-top: 20px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      em {
        width: 86px;
        height: 38px;
        line-height: 38px;
        background: linear-gradient(-90deg, #ff464f, #ff6e77);
        border-radius: 16px;
        position: absolute;
        right: 0px;
        top: 0px;
        font-size: 20px;
        text-align: center;
        color: #fff;
      }
    }
    h3.on em {
      background: #999999;
    }
  }
}

.zstj_tc_detail_ljyy {
  position: fixed;
  left: 0px;
  bottom: 0px;
  text-align: center;
  font-size: 32px;
  width: 100%;
  height: 90px;
  line-height: 90px;
  background: linear-gradient(270deg, #1ce27d, #05c6af);
}

.zstj_tc_detail_ljyy a {
  color: #fff;
}

::v-deep .van-calendar__selected-day {
  background: #46c3b0;
}

.gao {
  height: 90px;
}
</style>
