<template>
    <headerTop
    @search="searchFn"
    @reset="resetFn"
    @sort="sortFn"
    @add="addFn"
    ></headerTop>
    <addCom ref="addComRef"></addCom>
    <el-card shadow="always" class="content_body_row">
        <mapCom></mapCom>
    </el-card>
</template>

<script lang="ts" setup>
import headerTop from "./com/headerTop.vue"
import addCom from "./com/addCom.vue"
import mapCom from "./com/mapCom.vue"

import {ElConfirmBeforeOpert} from "utils/elementCom"
const addComRef = ref()
const paginationInfo = reactive({
    currentPage: 1,
    pageSize: 15
})
const tableData = [
   
   
]

let tableListInfo = reactive({
    list: tableData
})


const editRowFn =(row:any)=>{
    addComRef.value.edit({
        a:"111"
    })

}

const deleteItem = (row:any)=>{
    const itemID =row.v_id
    console.log("ITEMid",row)
}

const deleteRowFn =(row:any)=>{
    ElConfirmBeforeOpert(
        '操作确认',
        '是否确定删除数据？',
        deleteItem,
        '确定',
        '取消',
        row
    )

}

const searchFn =()=>{
    
}

const resetFn =()=>{

}

const sortFn =()=>{

}

const addFn =()=>{
    addComRef.value.open({
        a:"111"
    })
}
const beforeChange = (ev:any) => {
    return new Promise((resolve, reject)=>{
        resolve(true)
      })
 
}
const getPageFn =(val:any)=>{
    paginationInfo.currentPage  =  val.currentPage
    paginationInfo.pageSize  =  val.pageSize
    initTableList()
}

const initTableList =()=>{

}

</script>

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