From b2e3aa019e2705d8aa13ba863155b42513f84c12 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 27 Sep 2022 16:09:27 +0800
Subject: [PATCH] 遥感检测与后台默认展示关联,修改数据转换逻辑
---
src/components/remote/index.vue | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/components/remote/index.vue b/src/components/remote/index.vue
index 0f6cb07..9d66da5 100644
--- a/src/components/remote/index.vue
+++ b/src/components/remote/index.vue
@@ -142,6 +142,11 @@
},
created () {
+ this.farmSelectList=viewdata
+ this.currentTitle= viewdata.selectItem.name
+ this.timeLineList= viewdata[0].childItem
+ this.currentObj= viewdata[0].selectItem
+ this.currentInd = viewdata[0].selectItem.index
// this.leftRollerLayers = [
// {
// title: '2022年6月影像',
@@ -308,11 +313,10 @@
maximumLevel: 18
})
)
-
viewdata.forEach(item => {
global.viewer.imageryLayers.addImageryProvider(
new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
- url: item.childItem[0].url,
+ url: item.selectItem.url,
maximumLevel: 18
})
)
@@ -395,8 +399,18 @@
// 遥感监测多时相基地下拉事件
selectItem (item, index) {
this.timeLineList = item.childItem
- this.currentObj = this.timeLineList[0]
- this.currentInd = 0
+ if(this.timeLineList.some(e=>{return e.type == "0"})){
+ for(var i = 0; i<this.timeLineList.length;i++){
+ if(this.timeLineList[i].type == "0"){
+ this.currentObj = this.timeLineList[i]
+ this.currentInd = i
+ break
+ }
+ }
+ }else{
+ this.currentObj = this.timeLineList[0]
+ this.currentInd = 0
+ }
this.goToDcBylatlon(item.latitude, item.longitude)
},
// 遥感监测卷帘左基地下拉事件
--
Gitblit v1.9.3