<script setup>
import {assistanceDocInterence} from '@/api/api.js'
import {createBottomHref} from './utils/common'
import { ref } from 'vue'
import { useRoute } from "vue-router"
const route = useRoute()
let content = ref('')
function init(){
    if(route.query.DocId){
        assistanceDocInterence.getAssistanceDoc({DocId:route.query.DocId}).then(res=>{
          if(res.Ret == 200){
            content.value = res.Data.Content + createBottomHref(res.Data.Recommend || [{Name:"",Url:""},{Name:"",Url:""}])
          }
        })
      }else{
        content.value = sessionStorage.getItem("documentDoc") || ''
      }
}
init()
</script>
<template>
  <div class="assistance-detail-container">
    <div class="assistance-detail-box fr-view" v-html="content"></div>
  </div>
</template>

<style lang="scss" scoped>
.assistance-detail-container{
  background-color: white;
  min-height: calc(100vh - 110px);
  // height: calc(100vh - 110px);
  padding: 20px;
  box-sizing: border-box;
  border: solid 1px #ECECEC;
  // .assistance-detail-box{
  //   border: solid 1px #333333;
  //   height: 100%;
  //   width: 100%;
  // }
}
</style>