<template>

    <el-dialog v-model="dialogVisible" draggable title="完整性不足详情" width="1000">
        <TableHeader :showReset="false" ref="TableHeaderRef">
            <template #select>
                <el-form-item label="关键字">
                    <el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
                </el-form-item>
            </template>
            <template #operation>
                <!-- <el-button type="primary" icon="el-icon-Plus">新增</el-button> -->
                <!-- <back-component /> -->
            </template>
        </TableHeader>
        <Table ref="tableRef"></Table>

    </el-dialog>

</template>
<script setup lang='ts'>
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive } from 'vue'
const num = ref(0)
const dialogVisible = ref(false)
const tableStore = new TableStore({
    url: '/advance-boot/responsibility/userDataIntegrityList',
    method: 'POST',
    publicHeight: 547,
    column: [
        { title: '数据名', field: 'name' },
        { title: '用户名', field: 'userName' },
        { title: '测量点局号', field: 'lineNo' },
        { title: '日期', field: 'upDataTime' },
        { title: '完整性', field: 'integrity' },
    ],
    loadCallback: () => {
        setTimeout(() => {
        tableStore.table.height = mainHeight(0,2).height as any
        // console.log("🚀 ~ setTimeout ~  tableStore.table.height:", tableStore.table.height)

    }, 0)
        //   setTimeout(() => {  tableStore.table.height = 'calc((100vh) / 2)'}, 1000)
    }
})

provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
const open = (id: string) => {

    tableStore.table.params.userDataId = id
    dialogVisible.value = true

    tableStore.index()
  

}

defineExpose({ open })


</script>
<style lang="scss" scoped></style>
