<template>
  <div class="client-platform-page client-exam-page">
    <!--  广告  -->
    <div class="client-banner-box">
      <div
        :style="{backgroundImage: `url(${bannerList[0].pic || require(`~/static/images/client/train/train-banner-background.png`)})`}"
        class="client-platform-banner"></div>
    </div>

    <!--  学习收益  -->
    <div class="client-xuexishouyi-box client-container">
      <h4 class="client-title">学习收益</h4>
      <ul>
        <li>
          <div class="products-services-box">
            <img :src="img1" alt="能力提升">
            <img :src="img2" alt="能力提升">
          </div>
        </li>
        <li>
          <imgCardLv2 class="my-imgCardLv2" :option="productData"></imgCardLv2>
        </li>
      </ul>
    </div>

    <!--  部分课程列表  -->
    <div class="platform-course-list client-container">
      <h4>部分课程列表</h4>
      <mtaTable :data="tableData" :config="tableConfig" @shi-kan="shiKan"></mtaTable>
      <div class="btn-groups center">
        <applyBtn class="btn-item" @active-pc="onApplyBtnActive" @active-h5="onApplyBtnActiveH5"/>
        <onlineInformationBtn/>
      </div>
    </div>

    <videoDialog :source="curVideo" :visible.sync="visible"></videoDialog>
    <!--  申请方案  -->
    <applicationDialog :visible.sync="telDl"></applicationDialog>
  </div>
</template>

<script>
import mtaTable from "~/components/common/mtaTable";
import videoDialog from "~/components/common/videoDialog";
import freeTrialBtn from "~/components/common/freeTrialBtn";
import onlineInformationBtn from "~/components/common/onlineInformationBtn";
import pingfen from "~/components/common/pingfen";
import {BannerImgs} from "~/defaultConfig";
import imgCardLv2 from "~/components/common/layout/imgDes/imgCardLv2";
import applicationDialog from "~/components/common/applicationDialog";
import applyBtn from "~/components/common/applyBtn";

/**
 * @ 产品与服务 -> 课程资源 -> 职业素养
 */

export default {
  name: "professionalQuality",
  layout: 'templateB',
  async asyncData({$axios}) {
    const arr = [
      $axios.$post(`/home/banner/list`, {'code': BannerImgs.zhiyesuyang}),
    ]
    const [res1] = await Promise.all(arr);
    return {
      bannerList: res1.data.data || [],
    }
  },
  components: {
    mtaTable, videoDialog,applicationDialog,applyBtn,
    freeTrialBtn, onlineInformationBtn, pingfen, imgCardLv2
  },
  head() {
    return {
      title: '在线考试平台_在线考试软件_试卷软件系统',
      meta: [
        {
          name: 'keywords',
          content: '考试平台,试卷系统,试卷软件'
        },
        {
          name: 'description',
          content: '青谷考试系统具有良好高并发性和访问安全部署、严格的考试监控防作弊功能、PC移动支持多终端，随时随地考试、丰富的考试管理功能。'
        }
      ],
    }
  },
  data() {
    return {
      productData: {
        content: {
          title: '掌握知识',
          list: [
            {
              value: '了解职业素养的相关内容，提高职业意识和职业化程度',
            },
            {
              value: '掌握时间管理的方法和技巧，提高办公效率和精确度',
            },
            {
              value: '通过学习快速了解压力的来源及情绪的调整，帮助处理好职场人际关系',
            },
            {
              value: '熟练掌握沟通表达，商务呈现等必备职业技能',
            },
            {
              value: '提升职业礼仪及修养，养成良好的职业习惯',
            },
          ],
          order: 2,
        },
        img: {
          url: require('~/static/productImage/p03.png'),
          order: 1,
        },
        mianfei: true,
        zixun: true,
        shenqing: false,
        myType: 'kaoshi'
      },
      tableConfig: [
        {
          label: '课程名称',
          key: 'name'
        },
        {
          label: '使用行业',
          key: 'hangye'
        },
        {
          label: '使用人群',
          key: 'renqun'
        }
      ],
      tableData: [
        {
          name: '人际沟通： 如何更好地表达自己',
          shikanUrl: 'https://spdb.mtavip.com/35f701ce4a094817840075f7a15ac66c/8fbb652cbb0b48cb80b3a95987cef4a1-10aa23e897426c048d748b09a4a76d6d-fd.mp4',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '如何向领导汇报行业',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '职场生活游刃有余',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '个人形象管理',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '高效沟通',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '如何向领导汇报行业',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '如何向领导汇报行业',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
        {
          name: '如何向领导汇报行业',
          shikanUrl: '',
          hangye: '全行业',
          renqun: '职场新人'
        },
      ],
      curVideo: '',
      visible: false,
      img1: require("~/static/productImage/p49.png"),
      img2: require("~/static/productImage/p04.png"),
      telDl: false,
    }
  },
  methods: {
    shiKan({url}) {
      this.visible = true;
      this.curVideo = url;
    },
    onApplyBtnActive() {
      this.telDl = true;
    },
    onApplyBtnActiveH5() {
      this.$router.push({name: 'CourseDevelopPhone', query: {redirectUrl: '/product/zhiYeSuYang',}});
    },
  }
}
</script>

<style lang="scss" scoped>

.client-xuexishouyi-box {
  .client-title {
    font-size: 30px;
    font-weight: 800;
    color: #333;
    text-align: center;
    margin-bottom: 140px;
  }

  .products-services-box {
    display: flex;
  }
}

.platform-course-list {
  h4 {
    font-size: 30px;
    font-weight: 800;
    color: #333;
    text-align: center;
    margin-bottom: 98px;
  }
}

.products-services-box {
  display: flex;
  margin-bottom: 90px;
  justify-content: flex-start;

  img {
    width: 446px;
    height: 342px;

    &:first-child {
      margin-right: 190px;
      width: 383px;
      height: 344px;
      padding-left: 50px;
    }
  }

  @media (max-width: 768px) {
    flex-direction: column;
    justify-content: center;
    margin-bottom: 3%;

    img {
      width: 100%;
      height: 200px;
      margin: 0;


      &:nth-child(1) {
        order: 2;
        padding: 0;
      }

      &:nth-child(2) {
        order: 1;
      }
    }
  }

}



@media (max-width: 768px) {
  .client-xuexishouyi-box {
    .client-title {
      font-size: 20px;
      margin-bottom: 10%;
    }

    .products-services-box {
      flex-direction: column;

      img {
        max-width: 100%;
        height: auto;
        margin-bottom: 5%;
      }
    }

    .my-imgCardLv2 {
      margin-bottom: 10%;
    }
  }

  .platform-course-list {
    h4 {
      font-size: 20px;
      margin-bottom: 10%;
    }
  }

}

</style>
