<template>
  <div class="launch-approval">
    <iframe
      v-if="iframeUrl"
      :src="iframeUrl"
      class="launch-approval-iframe"
      frameborder="0"
    />
    <a-empty v-else description="缺少 key 参数，无法打开发起审批页面" />
  </div>
</template>

<script setup>
import { computed } from 'vue';
import Common from '../common/Common.js';


const iframeUrl = computed(() => {
  return Common.getRedirectUrl('workflow.html#/form-center');
  // return 'http://192.168.1.121:10025/workflow.html#/form-center';
});
</script>

<style scoped>
.launch-approval {
  /* 抵消 App.vue .center-container 的 padding，仅占右侧内容区 */
  margin: 10px -20px 0 -20px;
  height: calc(100vh - 100px);
  overflow: hidden;
}

.launch-approval-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}
</style>
