forked from drone/command-center-dashboard

罗广辉
2025-04-07 49f1198d1f2da71f6213270dfe94be9b34ebf235
src/views/SignMachineNest/MachineRight/MachineTableDetails/DeviceJob/DeviceJobDetails/DeviceJobDetailsMap.vue
@@ -95,9 +95,9 @@
const analysis = async url => {
   return new Promise(async resolve => {
      const res = await analyzeKmzFile(`${url}?_t=${new Date().getTime()}`)
      const templateXML = await res.fileInfoObj['wpmz/template.kml']
      const templateXMLJSON = XMLToJSON(templateXML)?.['Document']
      const templateXMLObj = removeTextKey(templateXMLJSON.Folder)
      const waylinesXML = await res.fileInfoObj['wpmz/waylines.wpml']
      const waylinesXMLJSON = XMLToJSON(waylinesXML)?.['Document']
      const templateXMLObj = removeTextKey(waylinesXMLJSON.Folder)
      resolve(templateXMLObj)
   })
}
@@ -106,6 +106,7 @@
const drawLine = async () => {
   const res = await Promise.all(props.detailsData.way_lines.map(item => analysis(item.url)))
   res.map(item => renderingLine(item))
   console.log(res,'jiexi')
   const allPoint = res
      .flatMap(item => item.Placemark)
      .map(item => item.Point.coordinates.split(','))
@@ -113,7 +114,6 @@
}
const removeMap = () => {
   console.log('yichu')
   viewer.entities.removeAll()
   viewer.destroy()
}