<template>
  <Popup ref="popup" title="" width="1000px" :isCrud="false">
    <DWViewer style="height: 75vh; overflow-y: auto" :url="url" />
  </Popup>
</template>

<script>
import Popup from "@/components/Popup";
import DWViewer from "@/components/DWViewer";
export default {
  name: "SurveyPreviewPopup",
  components: {
    Popup,
    DWViewer,
  },
  data() {
    return {
      surveyId: "",
    };
  },
  computed: {
    url() {
      return `${process.env.VUE_APP_SURVEY_PREFIX}/survey/diaowen-m.html?surveyId=${this.surveyId}&sid=&tag=p-auth-0`;
    },
  },
  methods: {
    open(id) {
      this.surveyId = id;
      this.$refs.popup.open();
    },
  },
};
</script>
