import Dialog from "../../../BaseDialog/index";
import { generatePagination } from "../../Element/Pagination";
let _DialogObject
const openAllNodeList = async (that) => {
let total = 0
let page = 1
let pageSize = 20
let currentData = []
if (_DialogObject && !_DialogObject.isDestroy) {
_DialogObject.close()
_DialogObject = null
}
const createTableContent = () => {
let trsElm = ''
for (let i = 0; i < currentData.length; i++) {
let trElm = '
'
let tdElm = ''
if ('fid' in currentData[i].properties) {
tdElm = `
${currentData[i].properties.fid}
`
}
for (let key in currentData[i].properties) {
if (key !== 'id' && key !== 'ID' && key !== 'fid') {
tdElm = tdElm + `
${currentData[i].properties[key]}
`
}
}
trElm = trElm + tdElm + '
'
trsElm = trsElm + trElm
}
return trsElm
}
_DialogObject = await new Dialog(that.viewer._container, {
title: '', left: '17%', top: '100px'
})
await _DialogObject.init()
let dataArrayFilter = [...that.geojson.features]
total = dataArrayFilter.length
currentData = dataArrayFilter.slice(pageSize * (page - 1), pageSize * page)
let trsElm = createTableContent()
let box = document.createElement('div')
box.style.height = '100%'
let searchElm = ''
let talbeElm = '
'
let headerElm = '
'
let hcolgroupElm = '
'
let theadElm = '
'
let bodyElm = '
'
let bcolgroupElm = '
'
let i = 1
// thead
if ('fid' in that.geojson.features[0].properties) {
hcolgroupElm = hcolgroupElm + `
`
bcolgroupElm = bcolgroupElm + `
`
theadElm = theadElm + `
fid
`
i++
}
for (let key in that.geojson.features[0].properties) {
if (key !== 'id' && key !== 'ID' && key !== 'fid') {
hcolgroupElm = hcolgroupElm + `