<template>
    <div v-html="content"></div>
</template>

<script>
import { contractInterface } from "@/api/api.js";
export default {
    name:"preViewContract",
    data () {
        return {
            id:this.$route.query.contractid||'',
            content:""
        }
    },
    created () {
        if(this.id){
            this.getContent()
        }else{
            this.content=sessionStorage.getItem('contractdtl')
        }
    },
    mounted(){

    },
    methods: {
        getContent(){
            contractInterface.previewContractById({ContractId:this.id}).then(res=>{
                if(res.Ret===200){
                    this.content=res.Data.Html
                }
            })
        }
    }
}
</script>
