guestComments.vue 5.25 KB
<template>
  <div v-if="accountLevel == 4 || isAdmin" class="guest-container">
    <div class="top_tip_title">
      <span class="h6_title fw">客户评价使用场景</span>
      <!-- <div class="toNext_widget">
        <span class="h7_title">查看效果演示</span>
        <i class="el-icon-d-arrow-right"></i>
      </div> -->
    </div>
    <div class="tip_wrap">
      <span class="h5_title">车主精品升级服务核券完成后,系统会通过微信小程序通知自动提醒客户评价,并且邀请客户好评,客户完成评价后,门店可以在对应的“订单-查看明细”中查看评价。</span>
    </div>
    <div class="box_wrapper">
      <div class="box_1 flex-cc">
        <img class="box_icon" src="../../assets/guest_icon_1.png" />
        <span class="h7_title fw">(累计)评价客户数</span>
        <div class="h8_title">
          <span>{{ messageData.commentCount || 0 }}</span>
          <span style="margin-left: 5px" class="h7_title">人</span>
        </div>
        <span class="h9_title">(累计)施工完成客户数:{{ messageData.constructedCount || 0 }}</span>
      </div>
      <div class="box_1 flex-cc">
        <img class="box_icon" src="../../assets/guest_icon_2.png" />
        <span class="h7_title fw">(累计)好评客户数</span>
        <div class="h8_title">
          <span>{{ messageData.goodCommentCount || 0 }}</span>
          <span style="margin-left: 5px" class="h7_title">人</span>
        </div>
        <span style="height: 20px" class="h9_title"></span>
      </div>
      <div class="box_1 box_2 flex-ca">
        <div class="box_con">
          <div class="circle_wrap">
            <el-progress width="60" color="#5850FF" type="circle" :percentage="messageData.commentPer"></el-progress>
          </div>
          <span class="h7_title fw">客户评价率</span>
        </div>
        <div class="box_con">
          <div class="circle_wrap">
            <el-progress width="60" color="#5850FF" type="circle" :percentage="messageData.goodCommentPer"></el-progress>
          </div>
          <span class="h7_title fw">客户好评率</span>
        </div>
      </div>
    </div>
    <div class="tip_title">
      <span class="h6_title fw">客评效果预览</span>
    </div>
    <div class="image_show">
      <div class="image_wrap">
        <span class="h9_title">小程序通知</span>
        <img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/mini_message_new.png" />
      </div>
      <img src="../../assets/scrm_arrow_radiu_icon.png">
      <div class="image_wrap">
        <span class="h9_title">客评内容</span>
        <img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/guest_content_new.png" />
      </div>
    </div>
    <div style="height: 20px"></div>
  </div>
</template>

<script>
import { guestComTotal } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default {
  name: '',
  data() {
    return {
      messageData: {},
      accountLevel: 4,
      isAdmin:false
    }
  },
  created() {
    const { session } = this.$globalState
    this.accountLevel = session.accountLevel
    this.isAdmin = session.admin
    this.getCompentData()
  },
  mounted() {},
  methods: {
    // 获取客户评价
    getCompentData() {
      let method = guestComTotal()
      let para = {
        routerMethod: method
      }
      converterApi(para).then(res => {
        this.messageData = res
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.guest-container {
  width: 100%;
  //   height: calc(100% - 17px);
  background: #ffffff;
  // box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
  // margin-top: 17px;
}
.top_tip_title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: 20px 19px 15px 21px;
  // > span {
  //   font-weight: 500;
  // }
  .toNext_widget {
    cursor: pointer;
    display: flex;
    align-items: center;
    > i {
      color: #5850ff;
      font-size: 10px;
      margin-left: 6px;
    }
  }
}
.tip_wrap {
  box-sizing: border-box;
  padding-left: 21px;
  > span {
    font-weight: 500;
  }
}
.box_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px 19px 21px;
  .box_1 {
    width: calc(30% - 10px);
    height: 180px;
    border-radius: 4px;
    border: 1px solid #d8d8d8;
    .box_icon {
      width: 40px;
      height: 40px;
    }
  }
  .box_2 {
    width: calc(40% - 10px);
    .box_con {
      display: flex;
      flex-direction: column;
    }
    .circle_wrap {
      width: 60px;
      height: 60px;
      margin-bottom: 10px;
    }
  }
  .flex-cc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
  }
  .flex-ca {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}
.tip_title {
  box-sizing: border-box;
  padding-left: 21px;
}
.image_show {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  overflow: hidden;
  .image_wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    > span {
      margin-bottom: 10px;
    }
    >img{
      width: 290px;
      height: 83%;
    }
  }
}
.fw{
   font-weight: bold;
}
</style>