<template>
  <el-dialog
    title="客户画像"
    top="10vh"
    :append-to-body="true"
    :visible.sync="qwUserPhoto.dialogVisible"
    class="user-photo-dialog"
    width="455px"
  >
    <iframe class="user-photo-iframe" :src="qwUserPhoto.url" />
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      qwUserPhoto: {
        dialogVisible: false,
        url: ""
      }
    };
  },
  methods: {
    openUserPhoto(item) {
      if (item.userId) {
        this.qwUserPhoto.url = `${window.config.qwUserPhotoUrl}${item.userId}`;
        this.qwUserPhoto.dialogVisible = true;
      }
    }
  }
};
</script>
<style scoped lang="scss">
.user-photo-dialog {
  ::v-deep .el-dialog__body {
    padding-top: 0;
  }
}
.user-photo-iframe {
  display: block;
  margin: 0 auto;
  width: 400px;
  height: 667px;
  border: none;
}
</style>
