From e4418b60a9e80a1438919e618d2e5e2048d404bc Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 17 Oct 2022 11:23:11 +0800
Subject: [PATCH] 农场图片显示优化;加工产品管理去除导入功能;修复加工、销售、出库、损耗记录表的查询功能
---
src/components/map/plotMap.vue | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/src/components/map/plotMap.vue b/src/components/map/plotMap.vue
index 06b4e6e..f4ba809 100644
--- a/src/components/map/plotMap.vue
+++ b/src/components/map/plotMap.vue
@@ -234,7 +234,12 @@
getDetail(this.$farmId).then(res=>{
this.farm.latitude = res.data.data.latitude
this.farm.longitude = res.data.data.longitude
- global.DC.ready(initViewer(this.farm.latitude,this.farm.longitude))
+ // global.DC.ready(initViewer(this.farm.latitude,this.farm.longitude))
+
+ global.DC.ready(() => {
+ initViewer(this.farm.latitude,this.farm.longitude)
+ })
+
this.addRegionPolyLine(NCregion)
})
},
@@ -341,23 +346,25 @@
// })
// farmLogoLayer.addOverlay(divIcon)
}
- const polygon = new global.DC.Polygon(positions)
- polygon.attrParams = item
- polygon.setStyle({
- material: global.DC.Namespace.Cesium.Color.fromBytes(
- 129, 255, 84,
- 200
- )
- })
+ if(positions){
+ const polygon = new global.DC.Polygon(positions)
+ polygon.attrParams = item
+ polygon.setStyle({
+ material: global.DC.Namespace.Cesium.Color.fromBytes(
+ 129, 255, 84,
+ 200
+ )
+ })
- polygon.on(global.DC.MouseEventType.CLICK, (e) => {
- that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
- that.drawLandPolyLine(positions)
- })
+ polygon.on(global.DC.MouseEventType.CLICK, (e) => {
+ that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
+ that.drawLandPolyLine(positions)
+ })
- plotRegionLayer.addOverlay(polygon)
- addPlotLayers.push({ center, name: item.landName, id: item.id })
+ plotRegionLayer.addOverlay(polygon)
+ addPlotLayers.push({ center, name: item.landName, id: item.id })
+ }
},
/**
* 地块画线
--
Gitblit v1.9.3