<template>
  <div>
    <el-popover
      v-if="showTip"
      placement="top-start"   
      width="350"
      trigger="click"   
    >  
    <div style="padding:20px;">
      {{text}}
    </div>
    <span slot="reference">{{showText}}<i class="el-icon-arrow-down" style="padding-left:20px"></i></span>
    </el-popover>
    <span v-else>{{showText}}</span>
  </div>
</template>
<script>
export default {
  props: {  
    text: {
      type: String,
      default: function() {
        return "";
      }
    },
    length: {
      type: Number,
      default: function() {
        return 10;
      }
    }
  },
  data() {
    return {
      showTip: false,
      showText: ""
    };
  },
  watch: {
    text: function(newQuestion, oldQuestion) {
      console.log(newQuestion);
      this.init();
    }
  },
  created() {
   
  },
  mounted(){
    this.init();
  },
  methods: {
    init() {
      if (this.text.length > this.length) {
        this.showText = this.text.substring(0, this.length);
        this.showTip = true;
      } else {
        this.showText = this.text;
        this.showTip = false;
      }
      return;
    }
  }
};
</script>

<style scoped>
#qrcode {
  position: absolute;
  right: 70px;
  top: 16px;
}

.el-message-box__message p {
  text-align: center !important;
}

.cur {
  font-weight: normal;
}

.box {
  overflow: hidden;
}

.main_right {
  width: calc(100% - 300px);
  height: 100%;
  float: left;
  border-left: 1px solid #dae1f2;
  padding: 20px 20px 56px;
  position: relative;
  box-sizing: border-box;
}

.logo {
  width: 33px;
  height: 33px;
  margin-top: 16.5px;
  margin-right: 10px;
  border-radius: 50%;
}

.popover_box span {
  font-size: 14px;
  color: #1a263c;
  text-align: left;
  width: calc(100% - 30px);
  margin-left: 15px;
  border-bottom: 1px solid #f0f3fa;
  cursor: pointer;
}

.popover_box span:hover {
  background: white;
}

.dialog_box {
  width: 440px;
  height: 210px;
}

.dialog_content {
  height: auto;
  padding-bottom: 20px;
  min-height: 95px;
}

.right_top {
  width: 100%;
  height: 40px;
  border-bottom: 1px solid #cccccc;
  padding-bottom: 5px;
}

.right_top span {
  border-left: 2px solid #4c82ff;
  color: #17181a;
  font-size: 16px;
  padding-left: 10px;
}

.right_top .right {
  float: right;
  margin-left: 20px;
}

.right_top .right i {
  color: #4c82ff;
}

.right_title {
  width: 100%;
  float: left;
  margin-top: 25px;
  margin-bottom: 10px;
  position: relative;
}

.right_title .left span {
  position: absolute;
  top: 5px;
  left: 32px;
}

.right_title .left i {
  font-size: 22px;
  color: rgb(184, 200, 240);
  line-height: 30px;
}

.search_box {
  background: #fafafa;
}

.search_box input {
  background: #fafafa;
}

.handel_box {
  width: calc(100% - 10px);
  height: 50px;
  background: #f7f8fc;
  float: left;
  margin: 0px;
  max-width: 100%;
  padding-left: 10px;
  position: relative;
  transform: translateX(0px);
}

.handel_box span {
  width: 105px;
  height: 36px;
  text-align: center;
  line-height: 36px;
  border-radius: 3px;
  border: 1px solid #dae1f2;
  float: left;
  background: white;
  margin-top: 6px;
  margin-right: 20px;
}

.handel_box span {
  color: white;
  border: 1px solid #4c82ff;
  background: #4c82ff;
}

/* .handel_box span:last-child {
  border: 1px solid #ff728d;
} */
.tbody td:last-child {
  white-space: nowrap;
}
.tbody td:last-child span {
  width: auto;
  line-height: 22px;
  display: inline-block;
  margin-right: 10px;
  border-radius: 7px;
  cursor: pointer;
  padding: 0px 5px;
}

.theader {
  background: white;
}

.theader td:hover {
  background: none;
}

table td {
  border-right: 0px;
  text-align: left;
}

.checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #8c96ad;
  display: block;
  border-radius: 0px;

  font-size: 14px;
}

.tbody .checkbox {
  line-height: 16px;
}

.checkbox i {
  font-size: 14px;
  line-height: 16px;
  color: #4c82ff;
  display: none;
}

.checkbox_cur i {
  display: block;
}

.ban {
  padding-left: 10px;
  width: 100%;
  height: 25px;
  border-left: 1px solid #dae1f2;
}

.span_box {
  width: calc(100% - 40px);
  margin: 5px 0 0 20px;
  float: left;
}

.span_box span {
  width: calc(50% - 15px);
  height: 35px;
  text-align: center;
  line-height: 35px;
  color: #1a1a1a;
  font-size: 14px;
  margin-left: 15px;
  background: #fafbfc;
  display: block;
  float: left;
}

.span_box span:first-child {
  margin-left: 0px;
  margin-right: 15px;
}

.right_box {
  width: 315px;
  height: calc(100vh - 75px);
  position: fixed;
  right: 0px;
  top: 70px;
  background: #fafbfc;
  box-shadow: 0px 5px 10px #cccccc;
  margin-right: 0px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  overflow: hidden;
  z-index: 9;
}

.title {
  width: calc(100% - 20px);
  line-height: 42px;
  color: #363c4c;
  font-size: 16px;
  background: white;
  padding-left: 20px;
}

.box_title {
  width: calc(100% - 150px);
  line-height: 49px;
  text-align: left;
  margin-left: 50px;
}

.checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #979899;
  text-align: center;
}

.checkbox i {
  margin: 0px;
  line-height: 16px;
  font-size: 12px;
  color: #4c82ff;
  display: none;
}

.checkbox_cur i {
  display: block;
}

.openstate {
  font-size: 14px;
  color: #4c82ff;
  font-weight: bold;
  line-height: 49px;
}

.menubox {
  height: 710px;
  overflow-y: auto;
}

.menuhandel {
  width: calc(100% - 60px);
  height: 60px;
  background: white;
  padding: 0px 30px;
}

.menuhandel span {
  width: 102px;
  height: 34px;
  border: 5px;
  text-align: center;
  line-height: 34px;
  box-sizing: border-box;
  border: 1px solid #4c82ff;
  color: #4c82ff;
  float: left;
  border-radius: 5px;
  margin-top: 12px;
}

.menuhandel span:last-child {
  color: white;
  background: #4c82ff;
  margin-left: 45px;
}

.route .icon-arrow-down {
  transform: rotate(0deg);
}

.noroute .icon-arrow-down {
  transform: rotate(-90deg);
}

table tr:first-child td {
  padding-left: 0px;
}

table tr td {
  min-width: 55px;
  padding-left: 10px;
}

table tr td:first-child {
  width: 15px;
  min-width: 0px;
  padding-right: 10px;
  padding-left: 0px;
}

.ishead {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #edf1fa;
  display: inline-block;
}

/* table .checkbox {
  border: 2px solid #8c96ad;
  box-sizing: border-box;
  line-height: 15px;
  text-align: center;
} */

.tbody {
  height: 35px;
}

.theader {
  height: 45px;
}

.third .icon-arrow-down {
  transform: rotate(-90deg);
}

td .checkbox {
  box-sizing: border-box;
  border-width: 2px;
}

td .checkbox i {
  font-size: 6px;
  display: block;
  line-height: 13px;
  text-align: center;
  transform: scale(0.8);
  opacity: 0;
}

td .checkbox_cur i {
  opacity: 1;
}

.tbody .short {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 128px;
}
.tbody td:last-child span {
  margin-right: 5px;
}
.mt25 {
  margin-top: 25px;
}

.dialog {
  z-index: 2000;
}
.search_input {
  float: right;
}
.el-input {
  position: relative;
  font-size: 14px;
  display: inline-block;
  height: 35px;
}
.search_btn {
  background: #4c82ff;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  margin: 1px 0;
  float: left;
  cursor: pointer;
  padding-left: 0px !important;
}
.information {
  text-align: center;
  color: #919399;
  margin-top: 96px;
}
.nd {
  margin-top: 10px;
}
.liang {
  width: 640px;
  height: 160px;
  background: url("/static/img/QRkuang.png");
  background-repeat: no-repeat;
  position: relative;
}
.num1,
.num2 {
  font-size: 24px;
  color: #409eff;
}
.num1 {
  position: absolute;
  left: 10px;
  top: 10px;
}
.num2 {
  position: absolute;
  left: 340px;
  top: 10px;
}
.fontSize {
  font-size: 15px;
}
.stepText1 {
  position: absolute;
  top: 43px;
  left: 10px;
}
.stepText2 {
  position: absolute;
  top: 43px;
  left: 340px;
}
.guanzhu1 {
  position: absolute;
  top: 65px;
  left: 10px;
}
.guanzhu2 {
  position: absolute;
  top: 65px;
  left: 340px;
}
.weiyuQR {
  width: 130px;
  height: 130px;
  position: absolute;
  left: 110px;
  top: 16px;
  background: url("/static/img/weiyuQR.jpg");
  background-size: 100%;
}
/* 人脸 */
.hang {
  height: 50px;
  padding-left: 60px;
}

.hang1 {
  border: none;
}

.selectVIP {
  height: 50px;
  line-height: 50px;
}

.hangTip {
  height: 35px;
  font-size: 16px;
}

.img {
  min-height: 50px;
  padding-left: 60px;
  padding-bottom: 46px;
  padding-top: 5px;
  display: flex;
}

.label {
  width: 85px;
  float: left;
  height: 50px;
  line-height: 55px;
}

.name {
  float: left;
  height: 30px;
  line-height: 30px;
  margin-top: 10px;
  margin-left: 5px;
  width: 250px;
  border: 1px #ddd solid;
  font-size: 12px;
  text-indent: 5px;
  border-radius: 4px;
}

.tel {
  width: 330px;
}

.xing {
  margin-top: 2px;
  color: red;
  float: right;
}

.xuanze {
  width: 80px;
  height: 30px;
  line-height: 30px;
  float: left;
  border: 1px #4d82ff solid;
  border-left: 0;
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  background: #4d82ff;
}

.el-radio {
  height: 50px;
}

.imgBox {
  width: 520px;
  height: 100px;
  margin-top: 20px;
  position: relative;
}

.imgBox::after {
  content: "请采集三张人脸图片";
  position: absolute;
  bottom: -35px;
  left: 0;
}

.pic {
  width: 100px;
  height: 75px;
  margin-right: 30px;
  float: left;
  border: 1px #ccc solid;
}

.close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  background: #409eff;
}

.face {
  border: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.posi {
  position: relative;
}

.addBox {
  width: 100px;
  height: 100px;
  float: left;
  border: 1px #ccc solid;
  cursor: pointer;
}

.jia {
  font-weight: 900;
  font-size: 35px;
  text-align: center;
  margin-top: 25px;
}

.tip {
  font-size: 12px;
  text-align: center;
}

.cameraTip {
  line-height: 150px;
  margin-left: 28%;
  font-size: 24px;
}

.cameraBox,
.faceFail {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
  position: relative;
}
.cameraBox .cameraBg {
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 300px;
  margin: 0 auto;
  z-index: 100;
}

.faceFail {
  padding: 100px 0;
}

.text {
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}

.textFail {
  font-size: 24px;
  text-align: center;
}

.threepPic,
.toPic {
  position: relative;
  float: left;
}

.canvasBox {
  width: 450px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
}
.threepPic {
  width: 120px;
}
.el-radio {
  margin-right: 0px;
}
.dialog_bind_wxbox {
  width: 670px !important;
  height: 330px !important;
}
</style>
