main.vue 6.37 KB
<template>
  <div class="scrm-main">
    <div class="main-panel" :class="{ 'main-isScroll': guideStatus }">
      <div class="main-left">
        <div class="summary-panel-time">
          <div class="summary-time">
            <span>统计截止至</span>
            <el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
          </div>
        </div>
        <div class="summary-panel">
          <div class="home-statistics-title">
            客户概览
            <span class="home-title-radio">企微客户占比</span>
            <span class="home-title-radio" style="color: #5850ff">{{ entmicroCountRadio }}%</span>
          </div>
          <!-- <div class="summary-time">
            <span>统计截止至 </span>
            <el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
          </div> -->
        </div>
        <overview-enterprise :summaryTime="summaryTime" @getEntmicroRadio="getEntmicroRadio"></overview-enterprise>
        <div class="home-statistics-title">产值概览</div>
        <customer-echart :summaryTimeFomat="summaryTime"></customer-echart>
        <div class="home-overview-content"></div>
        <div class="home-statistics-title">权益服务</div>
        <accurate-marketing :summaryTimeFomat="summaryTime"></accurate-marketing>
        <div class="home-statistics-title">精选营销工具</div>
        <marketing-tools></marketing-tools>
      </div>
      <!-- <el-popover placement="left" width="240" trigger="hover">
        <div class="qrcode-img">
          <img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/lianghh.png">
        </div>
        <div class="main-contact-panel" slot="reference">
          <div class="contact-icon"><i class="el-icon-chat-dot-square"></i></div>
          <div class="contact-desc">联系我们</div>
        </div>
      </el-popover> -->
    </div>
  </div>
</template>
<script>
import util from '@/utils/util'
import overviewEnterprise from './components/overview-enterprise'
import customerEchart from './components/customer-echart'
import marketingTools from './components/marketing-tools'
import accurateMarketing from './components/accurate-marketing'
export default {
  name: 'home',
  components: {
    overviewEnterprise,
    customerEchart,
    marketingTools,
    accurateMarketing
  },
  data() {
    return {
      summaryTime: util.getBeforeDate(),
      pickerOptions: {
        disabledDate: time => {
          return time.getTime() > Date.now()
        }
      },
      entmicroCountRadio: 0,
      guideStatus: false,
      step: 1,
      headHeight: 0,
      headWidth: 0,
      guideWidth: '',
      guideHeight: '',
      guideLeft: 0,
      guideTop: 0,
      guideRight: 0,
      imgHeight: 0,
      imgWidth: 0
    }
  },
  methods: {
    jumpSqure() {
      this.$history.push('/drainage/square/index')
    },
    getEntmicroRadio(value) {
      this.entmicroCountRadio = value
    }
  },
  mounted() {}
}
</script>
<style lang="scss" scoped>
.box-fixed {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0px;
  top: 0px;
  background: rgba(0, 0, 0, 0.1);
}
.header-panel {
  width: 100%;
  position: relative;
  .jump-mf-btn {
    position: absolute;
    background: #f4c647;
    border-radius: 4px;
    padding: 6px 9px;
    font-size: 10px;
    font-weight: 500;
    color: #ffffff;
    line-height: 12px;
    cursor: pointer;
    bottom: 8px;
    left: 73.5% !important;
  }
  > img {
    width: 100%;
    height: 100%;
  }
}
.main-isScroll {
  position: absolute;
  overflow-y: hidden;
  height: 100%;
  padding: 0px 20px 20px 40px;
  box-sizing: border-box;
  width: 100%;
  top: 0px;
  left: 0px;
}
.main-panel {
  width: 100%;
}
.summary-panel-time {
  text-align: right;
  /deep/ {
    .el-date-editor.el-input,
    .el-date-editor.el-input__inner {
      width: 130px;
    }
  }
}
.summary-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .home-statistics-title {
    margin-top: 0px;
  }
  /deep/ .el-date-editor.el-input,
  .el-date-editor.el-input__inner {
    width: 100px;
    line-height: 32px;
    height: 32px;
  }
}
.home-statistics-title {
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  line-height: 20px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  margin-top: 20px;
  .home-title-radio {
    font-size: 14px;
    font-weight: 400;
    color: #333333;
  }
}
.operational-panel-s {
  margin-top: 20px;
}
.main-left {
  width: 100%;
  // flex: 1;
  // margin-right: 20px;
}
.main-right {
  // width: 230px;
  // display: none;
}
.h-overview-content {
  border: 1px solid #000000;
  margin-top: 10px;
  padding: 10px;
}
.enterprise-statistics {
  display: flex;
  justify-content: space-between;
}
.statistics-time {
  span {
    margin-right: 6px;
  }
}
.guide-panel {
  .guide-btn {
    cursor: pointer;
    z-index: 1000;
    position: absolute;
    background: #5850ff;
    border-radius: 4px;
    padding: 12px 20px;
    color: #ffffff;
    display: inline-block;
  }
  .guide-box {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .guide-box-highlight {
    position: fixed;
    outline: 5000px solid rgba(0, 0, 0, 0.75);
    border: 2px solid #ffffff;
    border-radius: 4px;
    &.border-b {
      border-color: #5850ff;
    }
  }
  .guide-step-1 {
    z-index: 999;
    height: auto;
    position: absolute;
    top: 10px;
    left: 10px;
  }
  .guide-step-2 {
    z-index: 999;
    width: auto;
    position: absolute;
    top: 10px;
  }
  .guide-step-3 {
    z-index: 999;
    height: auto;
    position: absolute;
  }
}
.qrcode-img {
  width: 200px;
  height: 200px;
}
.main-contact-panel {
  cursor: pointer;
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 52px;
  height: 142px;
  background: #5850ff;
  box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  text-align: center;
  padding: 16px 0px;
  box-sizing: border-box;
  .contact-desc {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    line-height: 20px;
    margin: 0 auto;
    width: 20px;
  }
  .contact-icon {
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 400;
    color: #ffffff;
    line-height: 20px;
  }
}
</style>