<template>
    <HcCard actionUi="text-center">
        <el-scrollbar ref="listItemScrollRef">
            <CollapseForm ref="ListItemsRef"
                          :classify="0"
                          :contractId="0"
                          :datas="[]"
                          :primaryKeyId="0"
                          :status="0"
                          v-if="false"
            />
            <HcStatus text="暂无表单"/>
        </el-scrollbar>
        <template #action>
            <!--el-button size="large" type="info" hc-btn @click="goBackClick">
                <HcIcon name="arrow-go-back"/>
                <span>取消并返回</span>
            </el-button-->
            <el-button size="large" type="primary" hc-btn>
                <HcIcon name="check-double"/>
                <span>提交保存</span>
            </el-button>
            <el-button size="large" type="primary" hc-btn>
                <HcIcon name="draft"/>
                <span>一键生成协议</span>
            </el-button>
            <el-button size="large" type="warning" hc-btn>
                <HcIcon name="eye"/>
                <span>预览</span>
            </el-button>
            <el-button size="large" type="success" hc-btn>
                <HcIcon name="upload"/>
                <span>上传附件协议</span>
            </el-button>
        </template>
    </HcCard>
</template>

<script setup>
import {onActivated, ref} from "vue";
import {useRoute, useRouter} from 'vue-router'
import CollapseForm from "./collapse-form/index.vue"

const router = useRouter()
const useRoutes = useRoute()

//初始变量
//const dataType = ref(useRoutes?.query?.type ?? 'view')
//const dataId = ref(useRoutes?.query?.id ?? '')

//缓存页面被激活时
onActivated(() => {
    //dataType.value = useRoutes?.query?.type ?? 'view'
    //dataId.value = useRoutes?.query?.id ?? ''
})

const listItemScrollRef = ref(null)

//返回
const goBackClick = () => {
    router.back()
}
</script>

<style lang="scss" scoped>

</style>
