<template>
  <div class="robot" v-if="canShow">
    <div
      class="robot-img-box"
      v-drag
      title="试试点我提问~"
      @click="visible = !visible"
    >
    </div>
    <t-dialog v-model:visible="visible" :footer="false" width="800">
      <iframe
        src="https://qmth.echo-isoftstone.com/visitors-ui/pc"
        frameborder="0"
        style="width: 740px; height: 580px"
      ></iframe>
    </t-dialog>
  </div>
  <!-- <div
    v-drag
    style="
      position: fixed;
      z-index: 1000;
      background: red;
      width: 100px;
      height: 100px;
      left: 200px;
      top: 100px;
    "
  ></div> -->
</template>

<script setup name="Robot">
import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
const visible = ref(false);
const route = useRoute();
const BlackNames = ['Login'];
const canShow = computed(() => {
  return !BlackNames.includes(route.name);
});
</script>

<style lang="less" scoped>
.robot {
  .robot-img-box {
    position: fixed;
    width: 80px;
    height: 80px;
    right: 20px;
    bottom: 20px;
    z-index: 300;
    cursor: pointer;
    background: url(../../../assets/imgs/jiqiren.png) 0 0 no-repeat;
    background-size: 100% 100%;
  }
}
</style>
