<template>
  <div class="Post-Processing-Services">
    <div class="banner"></div>
    <div class="content">
      <el-breadcrumb separator-class="el-icon-arrow-right"
        style="padding: 5px;background-color: #f1f1f1;margin-top: 10px;">
        <el-breadcrumb-item :to="{ path: '/home' }">{{ $t('home.menuName') }}</el-breadcrumb-item>
        <el-breadcrumb-item><a href="/services">{{ $t('service.menuName') }}</a></el-breadcrumb-item>
        <el-breadcrumb-item>{{ $t('service.subMenu2') }}</el-breadcrumb-item>
      </el-breadcrumb>
      <el-tabs v-model="activeName" class="custom_tab" ref="custom_tab" @tab-click="handleClick">
        <el-tab-pane :label="$t('processingService.tab1')" name="1">
          <div class="iPart1">
            <div class="procts area cf">
              <div class="title">{{ $t('processingService.title1') }}</div>
              <p>
                {{ $t('processingService.msg1') }}
              </p>
              <img src="@/static/images/pps_index_1.jpg" class="border_img">
              <div class="title1">{{ $t('processingService.title2') }}</div>
              <ul>
                <li><i class="fa fa-circle"></i>{{ $t('processingService.msg2') }}</li>
                <li><i class="fa fa-circle"></i>{{ $t('processingService.msg3') }}</li>
                <li><i class="fa fa-circle"></i>{{ $t('processingService.msg4') }}</li>
                <li><i class="fa fa-circle"></i>{{ $t('processingService.msg5') }}</li>
                <li><i class="fa fa-circle"></i>{{ $t('processingService.msg6') }}</li>
              </ul>
            </div>
            <div class="procts area cf">
              <div class="title">{{ $t('processingService.title3') }}</div>
              <p>
                {{ $t('processingService.msg7') }}
              </p>
              <img src="@/static/images/pps_index_3.jpg" class="border_img">
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane :label="$t('processingService.tab2')" name="2">
          <div class="solution">
            <h1>{{ $t('processingService.tab2') }}</h1>
            <p>{{ $t('processingService.msg8') }}</p>
            <p>{{ $t('processingService.msg9') }}</p>
            <p>{{ $t('processingService.msg10') }} </p>

            <div class="servicesTab cf">
              <div class="tabsW">
                <div class="tabsWW cf">
                  <ul class="tabs cf">
                    <li :class="{ cur: servicesTab === 'Reconstructions' }"
                      @click.stop="servicesTab = 'Reconstructions'">
                      {{ $t('processingService.tab5') }}<s></s></li>
                    <li :class="{ cur: servicesTab === 'Image-Based' }" @click.stop="servicesTab = 'Image-Based'">
                      {{ $t('processingService.tab6') }}<s></s><i></i></li>
                  </ul>
                </div>
              </div>
              <div :class="{ cont: true, on: servicesTab === 'Reconstructions' }">
                <table class="comTable cf">
                  <tbody>
                    <tr>
                      <th width="30%">{{ $t('processingService.table_Reconstructions.th1') }}</th>
                      <th width="70%">{{ $t('processingService.table_Reconstructions.th2') }}</th>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_Reconstructions.td1') }}</td>
                      <td class="td2">{{ $t('processingService.table_Reconstructions.td2') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_Reconstructions.td3') }}</td>
                      <td class="td2">{{ $t('processingService.table_Reconstructions.td4') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_Reconstructions.td5') }}</td>
                      <td class="td2">{{ $t('processingService.table_Reconstructions.td6') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_Reconstructions.td7') }}</td>
                      <td class="td2">{{ $t('processingService.table_Reconstructions.td8') }}</td>
                    </tr>
                    <tr class="last">
                      <td>{{ $t('processingService.table_Reconstructions.td9') }}</td>
                      <td class="td2">{{ $t('processingService.table_Reconstructions.td10') }}</td>
                    </tr>
                  </tbody>
                </table>
              </div>
              <div :class="{ cont: true, on: servicesTab === 'Image-Based' }">
                <table class="comTable cf">
                  <tbody>
                    <tr>
                      <th width="30%">{{ $t('processingService.table_ImageBased.th1') }}</th>
                      <th width="70%">{{ $t('processingService.table_ImageBased.th2') }}</th>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_ImageBased.td1') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td2') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_ImageBased.td3') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td4') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_ImageBased.td5') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td6') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_ImageBased.td7') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td8') }}</td>
                    </tr>
                    <tr>
                      <td>{{ $t('processingService.table_ImageBased.td9') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td10') }}</td>
                    </tr>
                    <tr class="last">
                      <td>{{ $t('processingService.table_ImageBased.td11') }}</td>
                      <td class="td2">{{ $t('processingService.table_ImageBased.td12') }}</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane :label="$t('processingService.tab3')" name="3">
          <div class="solution">
            <h1>{{ $t('processingService.tab3') }}</h1>
            <div class="soluDetail" style="padding-top:0;">
              <div class="cont" style="display:block;">
                <div class="itemX">
                  <div class="sls1Process cf">
                    <img src="@/static/images/pps_workflow_grey.png">
                    <div class="stepTxt" style="margin:40px 0 0 80px">
                      <p><i>1</i><span>{{ $t('processingService.msg11') }}</span></p>
                      <p><i>2</i><span>{{ $t('processingService.msg12') }}</span></p>
                      <p><i>3</i><span>{{ $t('processingService.msg13') }}</span>
                      </p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane :label="$t('processingService.tab4')" name="4">
          <div class="solution">
            <h1>{{ $t('processingService.tab4') }}</h1>
            <div class="servicesTab cf">
              <div class="tabsW">
                <div class="tabsWW cf">
                  <ul class="tabs cf">
                    <li :class="{ cur: servicesTab === 'Reconstructions' }"
                      @click.stop="servicesTab = 'Reconstructions'">
                      {{ $t('processingService.tab5') }}<s></s></li>
                    <li :class="{ cur: servicesTab === 'Image-Based' }" @click.stop="servicesTab = 'Image-Based'">
                      {{ $t('processingService.tab6') }}<s></s><i></i></li>
                  </ul>
                </div>
              </div>
              <div :class="{ cont: true, on: servicesTab === 'Reconstructions' }">
                <div class="itemX" style="position:relative;">
                  <p style="position:absolute; font-size:14px; right:20px; top:8px; color:#777;"><i
                      class="fa fa-search-plus"></i> {{ $t('processingService.msg14') }}</p>
                  <div class="imagesW cf">
                    <div class="item" v-for="item of ReconstructionsList" :key="item.id">
                      <h3>{{ item.name }}</h3>
                      <ul>
                        <li v-for="num in [1, 2, 3, 4]" :key="`rec_image_${num}`">
                          <img :src="getSrc(item.id, num, 'rec')" alt="" @click.stop="perview(item.id, num)">
                        </li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
              <div :class="{ cont: true, on: servicesTab === 'Image-Based' }">
                <div class="itemX">
                  <div class="thumbsList cf">
                    <div class="item" v-for="item of ImageBasedList" :key="`ib_${item.id}`">
                      <img :src="getSrc(item.id, 0, 'ib')" alt="" @click.stop="goto(item.key)">
                      <span>{{ item.name }}</span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
    <viewer ref="picture_perview" style="margin: 0 10px" :images="images">

      <img v-show="false" :src="item" alt="Image" v-for="(item, index) of images" :key="`viewer_img_${index}`" />
    </viewer>
  </div>

</template>

<script>
export default {
  data() {
    return {
      activeName: '1',
      servicesTab: 'Reconstructions',
      images: [],
      ReconstructionsList: [
        {
          id: 1,
          name: this.$t("processingService.title4")
        },
        {
          id: 2,
          name: this.$t("processingService.title5")
        },
        {
          id: 3,
          name: this.$t("processingService.title6")
        },
        {
          id: 4,
          name: this.$t("processingService.title7")
        },
        {
          id: 5,
          name: this.$t("processingService.title8")
        },
      ],
      ImageBasedList: [
        {
          id: 1,
          name: this.$t("processingService.title9"),
          key: "LM"
        },
        {
          id: 2,
          name: this.$t("processingService.title10"),
          key: "FSF"
        },
        {
          id: 3,
          name: this.$t("processingService.title11"),
          key: "TAVI"
        },
        {
          id: 4,
          name: this.$t("processingService.title12"),
          key: "KM"
        },
        {
          id: 5,
          name: this.$t("processingService.title13"),
          key: "PT"
        },
        {
          id: 6,
          name: this.$t("processingService.title14"),
          key: "AAA"
        },
      ],
    }
  },

  methods: {
    handleClick(tab) {
      if (tab.index !== this.activeName) {
        this.servicesTab = 'Reconstructions'
      }
    },
    perview(id, num) {
      this.images = []
      for (let i = 1; i < 5; i++) {
        this.images.push(require(`../../../../static/images/pps_${id}-${i}.jpg`))
      }
      this.$nextTick(() => {
        this.$refs['picture_perview'].$viewer.show()
        this.$refs['picture_perview'].$viewer.view(num - 1)
      })
    },
    getSrc(id, num, key) {
      if (key === 'rec') {
        return require(`../../../../static/images/pps_${id}-${num}.jpg`)
      } else {
        return require(`../../../../static/images/pps_ib_${id}.jpg`)
      }

    },
    goto(key) {
      this.$router.push({
        path: '/services/ImageBasedSurgicalPlanning',
        query: {
          active: key
        }
      })
    }
  },
  mounted() {
    this.$nextTick(() => {
      // 获取第一个标签项
      if (this.$refs.custom_tab && this.$refs.custom_tab.$el) {
        const firstTab = this.$refs.custom_tab.$el.querySelector('.el-tabs__item')
        firstTab.style.fontSize = '22px'
      }
    })
  },
}
</script>

<style lang="scss">
.Post-Processing-Services {
  background: #fff;

  p {
    text-align: justify;
  }

  .banner {
    height: 300px;
    background: url(../../../../../src/static/images/bannerSolution3.jpg) no-repeat center center;
    background-size: cover;
    position: relative;
    overflow: hidden;
    clear: both;
  }

  .content {
    width: 1200px;
    margin: 0 auto;

    .el-tabs__nav .el-tabs__item:first-child {
      color: #1083b6 !important;
      font-size: 22px !important;
    }

    .custom_tab {
      .el-tabs__header {
        border-bottom: none;
        margin: 0;
      }

      // 标签项样式
      .el-tabs__item {
        color: #555 !important;
        height: 65px;
        font-size: 15px;
        line-height: 65px;
        font-weight: normal;

        // 竖线分隔（排除最后一个元素）
        &:not(:last-child)::after {
          content: "丨";
          position: absolute;
          right: -8px;
          color: #ddd;
        }

        // 激活态样式
        &.is-active {
          color: #1083b6 !important;
          font-weight: normal;
        }

        // 隐藏默认下划线
        &::before {
          display: none !important;
        }
      }

      // 隐藏激活态下划线
      .el-tabs__active-bar {
        display: none;
      }

      // 调整导航栏布局
      .el-tabs__nav {
        display: flex;
        justify-content: space-between;
        border: none !important;
      }

      .item {
        margin: 30px 0;

        p {
          font-size: 15px;
          line-height: 28px;
          color: #2f2f2f;
        }

        h2 {
          font-size: 18px;
          padding-left: 5px;
          border-left: 5px solid #1083b6;
          color: #1083b6;
          height: 18px;
          line-height: 18px;
          margin-bottom: 30px;
          font-weight: normal;
        }

        .img_content {
          margin: -10px 0 25px 0;

          img {
            display: block;
            margin: 0 auto;
            border: 0;
          }
        }

        ul {
          margin: -10px 0 25px 0;
          list-style: none;

          li {
            width: 100%;
            float: none;
            clear: both;
            line-height: 24px;
            padding-bottom: 14px;
            font-size: 14px;
            color: #2f2f2f;
          }
        }

        .flex_row {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
        }
      }

    }
  }
}

.area {
  width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.cf {
  zoom: 1;

  &::after {
    content: "";
    display: table;
    clear: both;

  }

  &::before {
    content: "";
    display: table;
  }
}

.iPart1 {
  padding: 44px 0 66px 0;

  .procts {
    overflow: hidden;
    clear: both;
    margin-bottom: 40px;
    position: relative;
    min-height: 230px;
    box-shadow: 0 0 8px rgba(0, 0, 0, .2);
    padding: 40px;
    width: calc(100% - 80px);

    .title {
      font-size: 25px;
      color: #1c72a5;
      margin-bottom: 25px;
      position: relative;

      &::before {
        display: block;
        content: "";
        width: 50px;
        height: 3px;
        background: #f7773b;
        position: absolute;
        left: 0;
        bottom: -10px;
      }
    }

    .title1 {
      font-size: 18px;
      margin-top: 20px;
      color: #1c72a5;
    }

    p {
      margin-right: 310px;
      font-size: 16px;
      line-height: 1.8;
    }

    img.border_img {
      position: absolute;
      right: 40px;
      top: 90px;
      border: 1px solid #e5e5e5;
      padding: 7px;
      width: 250px;
    }

    li {
      line-height: 2.5;
      font-size: 14px;
      width: 50%;
      float: left;

      i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background-color: #f7773b;
        margin-right: 8px;
        font-size: 9px;
        color: #f7773b;
      }
    }

  }
}

ul {
  margin-top: 10px;
  list-style: none;
}

li {
  display: list-item;
  text-align: -webkit-match-parent;
  unicode-bidi: isolate;
}

.fa {
  display: inline-block;
  font: normal normal normal 14px / 1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.solution {
  width: 1200px;
  margin: 0 auto;
  padding-top: 30px;
  padding-bottom: 73px;

  h1 {
    font-size: 18px;
    line-height: 18px;
    color: #333333;
    padding-left: 14px;
    border-left: 6px solid #1083b6;
    height: 18px;
    margin-bottom: 30px;
    font-weight: normal;
  }

  p {
    font-size: 16px;
    line-height: 26px;
    color: #2f2f2f;
    padding-bottom: 22px;
  }

  .tabsW {
    width: 100%;
    height: 65px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    clear: both;
  }

  .tabsWW {
    height: 65px;
    width: 100%;
    margin: 0 auto;
  }

  ul {
    margin-top: 0;
  }

  .tabs {
    margin-bottom: 15px;



    li {
      color: #555;
      font-size: 18px;
      line-height: 65px;
      float: left;
      width: auto;
      padding: 0 20px;
      position: relative;
      text-align: justify;
      cursor: pointer;
    }

    .cur {
      background: rgba(114, 177, 204, 0.14);
      color: #1083b6;
    }
  }

  .cont {
    clear: both;
    margin-top: 20px;
    display: none;
  }

  .cont.on {
    display: block;
  }

  .soluDetail {
    width: 1200px;
    margin: 0 auto;
    padding-top: 55px;
    padding-bottom: 30px;
  }

  .itemX {
    margin-bottom: 30px;

    .sls1Process {
      text-align: center;
      img{
        width:935px;
        height:385px;
      }
    }

    p {
      font-size: 15px;
      line-height: 28px;
      color: #2f2f2f;
      margin-bottom: 20px;
    }
  }

  .stepTxt {
    p {
      margin-bottom: 9px;
      overflow: hidden;
      padding-bottom: 0;

      i {
        display: block;
        width: 18px;
        height: 18px;
        background: #fc7548;
        border-radius: 99px;
        color: #fff;
        text-align: center;
        line-height: 18px;
        font-weight: bold;
        float: left;
        margin-top: 5px;
        font-size: 12px;
      }

      span {
        display: block;
        margin-left: 27px;
      }
    }
  }

  .imagesW {
    .item {
      margin-bottom: 10px;
      border: 1px solid #d4d4d4;

      h3 {
        font-size: 14px;
        margin-bottom: 30px;
        background: #f3f3f3;
        height: 40px;
        line-height: 40px;
        padding-left: 12px;
        border-bottom: 1px solid #d4d4d4;
      }

      ul {
        overflow: hidden;
        margin-bottom: 10px !important;
        display: flex;
        justify-content: space-between;
        padding:0 40px;

        li {
          width: 240px !important;
          height: 240px !important;
          float: left !important;
          // margin-left: 40px;
          margin-bottom: 22px;
          padding: 0 !important;

          img {
            width: 100%;
            height: 100%;
          }
        }
      }
    }
  }

  .thumbsList {
    margin: 0 auto;
    width: 800px;
    padding-top: 20px;

    .item {
      width: 240px;
      float: left;
      margin-bottom: 10px;
      margin-right: 40px !important;

      img {
        width: 100%;
        height: 240px;
        cursor: pointer;
      }

      span {
        display: block;
        font-size: 15px;
        text-align: center;
        line-height: 1.3;
        padding: 12px 0;
        height: 29px;
      }

      &:nth-child(3n) {
        float: right;
        margin-right: 0 !important;
      }
    }
  }
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

.comTable {
  width: 100%;
  border-left: 1px solid #1083b6;
  border-right: 1px solid #1083b6;

  tr:nth-child(2n) {
    background-color: #f4f4f4;
  }

  th {
    height: 47px;
    line-height: 47px;
    color: #fff;
    background: #1083b6;
    font-size: 15px;
    text-align: center;
  }

  td {
    line-height: 22px;
    font-size: 14px;
    color: #2f2f2f;
    text-align: center;
    vertical-align: middle;
    padding: 15px 13px 15px 0;
  }

  td.td2 {
    text-align: justify;
  }

  .last td {
    border-bottom: 1px solid #1083b6;
  }

}
</style>
