<template>
  <div :class="$style.helpPage">
    <div :class="$style.helpTitle">
      <a-page-header :class="$style.left" @back="() => $router.go(-1)">
        <div slot="backIcon" :class="$style.arrow"><a-icon type="arrow-left"/></div>
        <div slot="title" :class="$style.title">
          <a-icon :class="$style.titleicon" type="sd-we-office" />
          <a-divider type="vertical" /><span>帮助中心</span>
        </div>
      </a-page-header>
    </div>
    <div :class="$style.helpContent">
      <div :class="$style.banner">
        <!-- <img src="./helpbanner.png" alt="帮助中心" /> -->
        <div :class="$style.bannerfont">
          <h1>Hi，欢迎来到帮助中心！</h1>
          <p>让我来帮您轻松了解、使用和管理您的公文系统，提升工作效率，降低学习成本。</p>
        </div>
      </div>
      <div :class="$style.introduction">
        <a-list
          :class="$style.introList"
          :grid="{ gutter: 16, column: 4 }"
          :data-source="introdata"
        >
          <a-list-item slot="renderItem" slot-scope="item">
            <a-card :title="item.title">
              {{ item.content }}
            </a-card>
          </a-list-item>
        </a-list>
      </div>
      <div :class="$style.helpFooter">
        <a-row :gutter="24">
          <a-col :xs="24" :md="8">
            <template>
              <div :class="$style.footerCol">
                <a-list
                  :class="$style.footerList"
                  item-layout="horizontal"
                  :data-source="kjxzdata"
                  header="控件下载"
                >
                  <a-list-item slot="renderItem" slot-scope="item">
                    <a-list-item-meta :description="item.content">
                      <a slot="title" :href="item.link">{{ item.title }}</a>
                      <a-avatar slot="avatar" shape="square" :style="item.backcolor">
                        {{ item.icontext }}
                      </a-avatar>
                    </a-list-item-meta>
                  </a-list-item>
                </a-list>
              </div>
            </template>
          </a-col>
          <a-col :xs="24" :md="8">
            <template>
              <div :class="$style.footerCol">
                <a-list
                  :class="$style.footerList"
                  item-layout="horizontal"
                  :data-source="syscdata"
                  header="使用手册"
                >
                  <a-list-item slot="renderItem" slot-scope="item">
                    <a-list-item-meta :description="item.content">
                      <a slot="title" href="javascript:;">{{ item.title }}</a>
                      <a-avatar slot="avatar" shape="square" :style="item.backcolor">
                        <a-icon slot="icon" type="ant-design" />
                      </a-avatar>
                    </a-list-item-meta>
                  </a-list-item>
                </a-list>
              </div>
            </template>
          </a-col>
          <a-col :xs="24" :md="8">
            <template>
              <div :class="$style.footerPhone">
                <div class="ant-list-header">移动办公下载</div>
                <div :class="$style.footerContent">
                  <p :class="$style.downDes"
                    >请扫描如下二维码进行安装，如用微信扫描，请点击右上角的
                    “…”按钮，选择从浏览器打开。</p
                  >
                  <a-row :gutter="24" :class="$style.footerQrcode">
                    <a-col :xs="24" :md="12" :class="$style.phoneqr">
                      <sd-qrcode :value="qrcode" tag="img" />
                      <p :class="$style.phoneModel">Android版本</p>
                    </a-col>
                    <a-col :xs="24" :md="12" :class="$style.phoneqr">
                      <sd-qrcode :value="qrcode" tag="img" />
                      <p :class="$style.phoneModel">IOS版本</p>
                    </a-col>
                  </a-row>
                </div>
              </div>
            </template>
          </a-col>
        </a-row>
      </div>
    </div>
  </div>
</template>

<script>
import sdQrcode from '@/common/components/sd-qrcode'
import storeMixin from '@/common/store-mixin'
import components from './_import-components/sd-help-center-import'
const introdata = [
  {
    title: '· 集群管理',
    content: '这是集群管理的一段功能介绍',
  },
  {
    title: '· 初始化应用引擎',
    content: '这是初始化应用引擎的一段功能介绍',
  },
  {
    title: '· 创建应用服务',
    content: '这是创建应用服务的一段功能介绍',
  },
  {
    title: '· 管理版本流量',
    content: '这是管理版本流量的一段功能介绍',
  },
]
const kjxzdata = [
  {
    title: 'WE.OfficeDocX控件',
    content: '一段WE.OfficeDocX控件的简介，这是一段比较长的简介。',
    icontext: 'WE.OfficeDocX',
    backcolor: 'background: #597EF7;',
    link: 'WE.OfficeDocX.exe',
  },
  {
    title: 'WPS',
    content: '一段WPS控件的简介，这是一段比较长的简介。',
    icontext: 'WPS',
    backcolor: 'background: #36CFC9;',
    link: 'jsplugindir/publish.html',
  },
  {
    title: '数科OFD',
    content: '一段数科OFD控件的简介，这是一段比较长的简介。',
    icontext: 'OFD',
    backcolor: 'background: #597EF7;',
    link: '',
  },
  {
    title: '签章驱动',
    content: '一段签章驱动控件的简介，这是一段比较长的简介。',
    icontext: 'Task',
    backcolor: 'background: #36CFC9;',
    link: '',
  },
  {
    title: '文本编辑控件',
    content: '一段文本编辑控件的简介，这是一段比较长的简介。',
    icontext: 'Text',
    backcolor: 'background: #597EF7;',
    link: '',
  },
]
const syscdata = [
  {
    title: '管理员手册',
    content: '一段管理员手册的简介，这是一段比较长的简介。',
    backcolor: 'background: #597EF7;',
  },
  {
    title: '快速入门手册',
    content: '一段快速入门手册的简介，这是一段比较长的简介。',
    backcolor: 'background: #36CFC9;',
  },
  {
    title: '文书手册',
    content: '一段文书手册的简介，这是一段比较长的简介。',
    backcolor: 'background: #597EF7;',
  },
  {
    title: '管理员手册',
    content: '一段管理员手册的简介，这是一段比较长的简介。',
    backcolor: 'background: #597EF7;',
  },
  {
    title: '快速入门手册',
    content: '一段快速入门手册的简介，这是一段比较长的简介。',
    backcolor: 'background: #36CFC9;',
  },
]
export default {
  name: 'SdHelpCenter',
  metaInfo: {
    title: '帮助中心',
  },
  components,
  sdQrcode,
  mixins: [storeMixin],
  data() {
    return {
      qrcode: 'http://xcoamobile.smartdot.com:28089/install',
      introdata,
      kjxzdata,
      syscdata,
    }
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
// $screen-help: 1872px;
$listcolor: #fff;
$bannersize: 34px;
$titlesize: 20px;
$iconsize: 19px;
$titlesize-head: 18px;
$head-font-color: #333 100%;
$titlesize-bg: 24px;
$titlesize-base: 16px;
$titlesize-icon: 24px;
$contentsize-base: 14px;
$downdescolor: #666;
$footericonsize: 48px;
$family: 'PingFangSC-Medium;';
.help-page {
  width: 100%;
  background: rgba(0, 0, 0, 0.04);
}
.help-title {
  width: 100%;
  background: $primary-color;
  .arrow {
    font-size: $titlesize;
    font-weight: bold;
    color: $heading-color-dark;
  }
  .title {
    overflow: hidden;
    font-size: $titlesize-bg;
    font-weight: bold;
    color: $heading-color-dark;
    span {
      font-size: $titlesize-base;
    }
    .titleicon {
      width: 210px;
      padding-left: 1px;
      font-size: $iconsize;
      transform: scale(10);
    }
  }
}
.help-content {
  // max-width: $screen-help;
  // margin: 0 auto;
  padding: 0 24px;
  .banner {
    position: relative;
    height: 247px;
    margin: 24px 0 0;
    background: $primary-color;
    img {
      position: absolute;
      right: 150px;
      bottom: 0;
      height: 90%;
    }
    .bannerfont {
      position: absolute;
      top: 20%;
      left: 50px;
      font-size: $titlesize-base;
      color: $heading-color-dark;
      letter-spacing: 1.2px;
      p {
        margin-bottom: 20px;
        font-size: $font-size-lg;
      }
      h1 {
        font-size: $bannersize;
        font-weight: normal;
        color: $heading-color-dark;
      }
    }
  }
  .introduction {
    position: relative;
    height: 197px;
    margin: 0 0 24px;
    .intro-list {
      display: flex;
      height: 100%;
      background: $listcolor;
    }
    :global(.ant-spin-nested-loading) {
      width: 100%;
    }
    :global(.ant-row) {
      width: 100%;
    }
    :global(.ant-col) {
      width: 20%;
    }
    :global(.ant-list-item) {
      padding: 0 0 0 68px;
    }
    :global(.ant-spin-container) {
      display: inline-flex;
      width: 100%;
    }
    :global(.ant-list *) {
      border: none;
    }
    :global(.ant-card-head) {
      padding: 0 16px;
      margin-top: 20px;
      margin-bottom: -30px;
      font-family: $family;
      font-size: $titlesize-head;
      font-weight: bold;
    }
    :global(.ant-card-body) {
      font-family: $family;
      font-size: $contentsize-base;
    }
  }
  .help-footer {
    padding-bottom: 24px;
    :global(.ant-list) {
      -webkit-overflow-scrolling: touch;
      overflow-y: scroll;
      background: $listcolor;
    }
    :global(.ant-list-item) {
      padding: 16px 27px 13px 36px;
    }
    :global(.ant-list-header) {
      padding-left: 24px;
      font-family: $family;
      font-size: $titlesize-base;
      font-weight: bold;
      text-overflow: ellipsis;
    }
    :global(.ant-list-item-meta-title) {
      font-family: $family;
      font-size: $titlesize-base;
      font-weight: bold;
    }
    :global(.ant-list-item-meta-description) {
      margin-top: 6px;
      font-size: $contentsize-base;
    }
    .footer-col {
      :global(.ant-avatar) {
        width: $footericonsize;
        height: $footericonsize;
        line-height: $footericonsize;
      }
      :global(.anticon) {
        font-size: $titlesize;
      }
    }
    .footer-list {
      height: 501px;
      padding: 10px;
      overflow-y: 'auto';
      // margin-right: -12px;
    }
    .footer-phone {
      height: 501px;
      padding: 10px;
      background: $listcolor;
      .footer-content {
        display: block;
        height: auto;
        padding: 0 66px;
        padding-top: 30px;
      }
    }
  }
  .doc-card {
    min-height: 320px;
    padding: 15px;
    // background: $cardbg;
    .docfile {
      margin: 0;
    }
    :global(.ant-card-head) {
      font-size: $titlesize-bg;
      text-align: 'center';
    }
  }
  .down-title {
    padding: 15px 0 0;
    font-size: $titlesize-bg;
  }
  .down-des {
    padding: 0 10px;
    font-size: $contentsize-base;
    color: $downdescolor;
  }
  .phone-model {
    margin-top: 10px;
    font-family: $family;
    font-size: $titlesize-base;
    text-align: center;
  }
  .phoneqr {
    img {
      width: 100%;
    }
  }
}
</style>
