<!--智能建表新菜单展示-->
<template>
    <list-view-preview v-if="visibleType" :form-id="formData.formId"
                       :list-view-id="formData.listViewId"
                       :source-id="sourceId"
                       :operate-authority="formData.operateAuthority"
                       :condition-id="formData.conditionId"
                       :extra-condition="extraCondition"
                       :listOutParam="listOutParam"
                       :form-out-param="formOutParam"
                       :isPreview="isCloudView"
                       :parentFormData="parentFormData"
                       :compositeObj="compositeObj"
                       :isCompositeView="isCompositeView"
                       :compositeFormOperate="compositeFormOperate"
                       :refreshPreview="refreshPreview"
                       :equilibrium-data="equilibriumData">
    </list-view-preview>
</template>

<script>

    export default {
        name: "list-view-preview-remid",
        components: {
            ListViewPreview: () => import("../../popup/listViewsComp/listViewPreview")
        },
        props:{
            settingData:{type:Object,default:()=>{return {};}},
            formId:{type:String,default:''},
            sourceId:{type:String,default:''},
            listViewId:{type:String,default:''},
            operateAuthority:{type:Object,default:()=>{return {};}}, //操作权限
            conditionId:{type:String,default:''}, //数据权限
            extraCondition:{type:String,default:""},
            equilibriumData:{type:Object,default:() => {return {};}},
            listOutParam:{type:Object,default:() => {return {};}}, //外部传入参数
            formOutParam:{type:Object,default:() => {return {};}}, // 条件外部传参
            isCloudView:{type: Boolean,default: false}, // 是云仓库预览，获取所有操作权限
            parentFormData:{type:Object,default:() => {return {};}}, //主表单数据
            compositeObj:{type:Object,default:() => {return {};}},
            refreshPreview:{type:String,default:''},
            isCompositeView:{type: Boolean, default: false,required:false},//是否是复合视图组件
            compositeFormOperate:{type:String,default:''}, //来源于表单复合视图的表单操作状态
        },
        data(){
            return{
                formData:{
                    formId:'',
                    listViewId:'',
                    operateAuthority:{}, //操作权限
                    conditionId:'' //数据权限
                },
                visibleType:false,
            }
        },
        created() {
            if(this.settingData&&Object.keys(this.settingData).length>0){
                this.formData.formId = this.settingData["formId"];
                this.formData.listViewId = this.settingData["listViewId"];
                this.formData.conditionId = this.settingData["conditionId"];
                this.formData.operateAuthority = this.settingData["operateAuthority"];
            }else{
                this.formData.formId = this.formId;
                this.formData.listViewId = this.listViewId;
                this.formData.conditionId = this.conditionId;
                this.formData.operateAuthority = this.operateAuthority;
            }
            this.visibleType= true;

        }
    }
</script>

<style scoped>

</style>
