helpCard.vue 1.77 KB
<template>
  <div class="help-main">
    <div class="help-main-header">
      <div class="help-main-title">
        道路救援卡配置
        <el-popover placement="top" width="340" trigger="hover" content="配置道路救援卡中显示的联系号码及员工企微">
          <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
        </el-popover>
      </div>
      <div class="help-main-view"><el-button type="primary" size="small" @click="$refs.imageForm.clickHandler()">预览</el-button></div>
    </div>
    <el-tabs v-model="activeName">
      <el-tab-pane label="配置救援码" name="first"></el-tab-pane>
      <el-tab-pane label="效果统计" name="second"></el-tab-pane>
    </el-tabs>
    <component :is="activeName == 'first' ? 'card-config' : 'result-statistics'" ref="configForm"></component>
    <el-image class="preview-panel" style="width: 100px; height: 0px" ref="imageForm" :src="url" :preview-src-list="srcList"></el-image>
  </div>
</template>

<script>
import cardConfig from './components/cardConfig'
import resultStatistics from './components/resultStatistics'
import url from '@/assets/img/home/preview.png'
export default {
  name: 'helpCard',
  components: {
    cardConfig,
    resultStatistics
  },
  data() {
    return {
      url,
      srcList: [url],
      activeName: 'first'
    }
  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.help-main-header {
  display: flex;
  justify-content: space-between;
  .help-main-title {
    font-size: 20px;
    color: #333333;
    font-weight: 500;
    img {
      width: 16px;
      height: 16px;
    }
  }
}
.preview-panel {
  /deep/ {
    .el-image-viewer__img {
      width: 320px;
      height: 624px;
    }
    .el-icon-circle-close {
      color: #fff;
    }
  }
}
</style>