Kaynağa Gözat

生态修复山水工程geom不显示问题修改

maxiaoxiao 1 yıl önce
ebeveyn
işleme
a88c1d9c34

+ 4 - 9
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -103,17 +103,12 @@ export default {
             data.forEach((res) => {
                 res.type = '图斑上图'
                 if (res.geom) {
-                    res.geom.coordinates.forEach((res_coordinates) => {
-                        let arrayt = [];
-                        if (res_coordinates.length == 1) {
-                            arrayt = res_coordinates[0]
-                        } else {
-                            arrayt = res_coordinates
-                        }
-
-                        const twoDArray = arrayt;
+                    res.geom.coordinates.forEach((res_coordinates,ei) => {
+                        res_coordinates.forEach(coord=>{
+                        const twoDArray = coord;
                         const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
                         tdsy.add(res, oneDArray);
+                        })
                     })
                 }
             })