From 66f2854366a59a2194ac51e67e5c6ddc29b20ff3 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 19 Jun 2021 16:29:34 +0800
Subject: [PATCH] 解决冲突

---
 widgets/visualAngle/Widget.html   |   26 +-
 widgets/instructions/Widget.js    |  306 +++++++++++++++++++--------------
 widgets/spatialAnalysis/Widget.js |   10 
 widgets/visualAngle/css/style.css |  112 +++++++-----
 widgets/Layermanagement/Widget.js |    7 
 widgets/FlyRoute/flyroute.json    |   56 ++++++
 6 files changed, 326 insertions(+), 191 deletions(-)

diff --git a/widgets/FlyRoute/flyroute.json b/widgets/FlyRoute/flyroute.json
index eb8c5a1..d09d46f 100644
--- a/widgets/FlyRoute/flyroute.json
+++ b/widgets/FlyRoute/flyroute.json
@@ -1,4 +1,5 @@
-[{
+[
+    {
         "name": "鄱阳湖区域漫游",
         "sites": [{
             "id": 0,
@@ -230,5 +231,58 @@
             "roll": 0.15288734882291413,
             "time": 3
         }]
+    },
+    {
+        "name": "鄱阳湖国家级保护区倾斜飞行路线1",
+        "sites": [{
+            "id": 0,
+            "lgtd": 115.749088,
+            "lttd": 28.674319,
+            "height": 12179.32,
+            "heading": 338.02,
+            "pitch": -70.89,
+            "roll": 0,
+            "time": 10
+        }, {
+            "id": 1,
+            "lgtd": 115.741067,
+            "lttd": 28.695646,
+            "height": 3236.37,
+            "heading": 338.02,
+            "pitch": -70.86,
+            "roll": 0,
+            "time": 10
+        }, {
+            "id": 2,
+            "lgtd": 115.738726,
+            "lttd": 28.702285,
+            "height": 330.00,
+            "heading": 350.00,
+            "pitch": -37.45,
+            "roll": 0,
+            "time": 0
+        }]
+    },
+    {
+        "name": "鄱阳湖国家级保护区倾斜飞行路线2",
+        "sites": [{
+            "id": 0,
+            "lgtd": 115.960852,
+            "lttd": 29.164005,
+            "height": 1497.76,
+            "heading": 87.75,
+            "pitch": -41.49,
+            "roll": 0,
+            "time": 16
+        }, {
+            "id": 1,
+            "lgtd": 116.010312,
+            "lttd": 29.187787,
+            "height": 140.39,
+            "heading": 88.07,
+            "pitch": -24.73,
+            "roll": 0,
+            "time": 0
+        }]
     }
 ]
\ No newline at end of file
diff --git a/widgets/Layermanagement/Widget.js b/widgets/Layermanagement/Widget.js
index 0838db1..5db01f0 100644
--- a/widgets/Layermanagement/Widget.js
+++ b/widgets/Layermanagement/Widget.js
@@ -37,10 +37,15 @@
 
                 $(".jimu-widget-Layermanagement .layer-tab button").click(function () {
                     $(".jimu-widget-Layermanagement .layer-list").stop().toggle();
+
+                    if($(".jimu-widget-Layermanagement .layer-list").is(":hidden")){
+                        $(".jimu-widget-Layermanagement .tree-layer-opcity").stop().hide();
+                    } 
                 })
 
                 $(".jimu-widget-Layermanagement .sign-head-th-xx").click(function () {
                     $(".jimu-widget-Layermanagement .layer-list").stop().hide();
+                    $(".jimu-widget-Layermanagement .tree-layer-opcity").stop().hide();
                 })
 
                 $(".jimu-widget-Layermanagement .layer-list ul").on("click", "li .layer-opacity", function () {
@@ -132,7 +137,7 @@
                             "<span title='" + obj.title + "'>" +
                             obj.title +
                             "</span>" +
-                            "<button type='button' class='layui-btn layui-btn-normal layui-btn-sm control-btn layer-opacity' title='透明度调整'>" +
+                            "<button type='button' class='layui-btn layui-btn-normal layui-btn-sm control-btn layer-opacity' title='透明度控制'>" +
                             "<img src='./images/工具(用以切换图层的透明度).png' alt=''>" +
                             "</button>" +
                             "<button type='button' class='layui-btn layui-btn-normal layui-btn-sm control-btn setup' title='向上移动图层'>" +
diff --git a/widgets/instructions/Widget.js b/widgets/instructions/Widget.js
index 1879a54..526a624 100644
--- a/widgets/instructions/Widget.js
+++ b/widgets/instructions/Widget.js
@@ -3,161 +3,209 @@
 // 模块描述:显示坐标
 ///////////////////////////////////////////////////////////////////////////
 define([
-		'dojo/_base/declare',
-		'dojo/_base/lang',
-		'dojo/_base/array',
-		'dojo/_base/html',
-		'dojo/topic',
-		'jimu/BaseWidget',
-		'jimu/utils',
-		'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
-		'libs/zTree_v3/js/jquery.ztree.all'
-	],
-	function (declare,
-		lang,
-		array,
-		html,
-		topic,
-		BaseWidget,
-		aspect,
-		string,
-		utils
-	) {
-		return declare([BaseWidget], {
-			baseClass: 'jimu-widget-instructions',
-			name: 'instructions',
-			layers: {},
-			startup: function () {
-				// 暴露在外的接口
-				var that = this,
-					url = 'http://171.34.76.171:8880/pyh-station/metaWetlandProtect/queryNameAndIdAssembleMap',
-					token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJlY2hpc2FuIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2MjMzOTIwNTcsImV4cCI6MTYyNTk4NDA1N30.wyhtQWDfyBM4Wvu9x_GpzWErqDkZ3J-PWEjyzoaHT9w6mMBenso5q0ZdnFueCZaCOjsHM5AMwLawATT0Zqc4aQ";
-				axios.get(url, {
-					headers: {
-						"token": token
-					}
-				}).then((res) => {
-					if (res.data.code == 200) {
-						var data = res.data.data;
-						that.beginLayuiDropdown(data)
+        'dojo/_base/declare',
+        'dojo/_base/lang',
+        'dojo/_base/array',
+        'dojo/_base/html',
+        'dojo/topic',
+        'jimu/BaseWidget',
+        'jimu/utils',
+        'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
+        'libs/zTree_v3/js/jquery.ztree.all'
+    ],
+    function (declare,
+        lang,
+        array,
+        html,
+        topic,
+        BaseWidget,
+        aspect,
+        string,
+        utils
+    ) {
+        return declare([BaseWidget], {
+            baseClass: 'jimu-widget-instructions',
+            name: 'instructions',
+            layers: {},
+            startup: function () {
+
+                // 暴露在外的接口
+                var that = this,
+                    url = 'http://171.34.76.171:8880/pyh-station/metaWetlandProtect/queryNameAndIdAssembleMap',
+                    token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJlY2hpc2FuIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE2MjMzOTIwNTcsImV4cCI6MTYyNTk4NDA1N30.wyhtQWDfyBM4Wvu9x_GpzWErqDkZ3J-PWEjyzoaHT9w6mMBenso5q0ZdnFueCZaCOjsHM5AMwLawATT0Zqc4aQ";
+                axios.get(url, {
+                    headers: {
+                        "token": token
+                    }
+                }).then((res) => {
+                    if (res.data.code == 200) {
+                        var data = res.data.data;
+                        that.beginLayuiDropdown(data)
 
 
-					}
-				})
+                    }
+                })
 
-			},
-			beginLayuiDropdown: function (data) {
-				var that = this;
-				var d = [];
-				for (var k in data) {
-					var obj = {
-						title: data[k].NAME,
-						id: data[k].id,
-					}
-					if (data[k].seviceUrl) {
-						obj.src = data[k].seviceUrl
-					}
-					d.push(obj)
+            },
+            beginLayuiDropdown: function (data) {
+                var that = this;
+                var d = [];
+                for (var k in data) {
+                    var obj = {
+                        title: data[k].NAME,
+                        id: data[k].id,
+                    }
+                    if (data[k].seviceUrl) {
+                        obj.src = data[k].seviceUrl
+                    }
+                    d.push(obj)
 
 
-				}
-				layui.use(['dropdown', 'util', 'layer', 'table'], function () {
-					var dropdown = layui.dropdown,
-						util = layui.util,
-						layer = layui.layer,
-						table = layui.table,
-						$ = layui.jquery;
+                }
+                layui.use(['dropdown', 'util', 'layer', 'table'], function () {
+                    var dropdown = layui.dropdown,
+                        util = layui.util,
+                        layer = layui.layer,
+                        table = layui.table,
+                        $ = layui.jquery;
 
 
-					dropdown.render({
-						elem: '.demo1',
-						data: d,
-						trigger: 'hover',
-						className: 'site-dropdown-demo',
-						click: function (obj) {
-							//点击事件
-							// layer.tips('点击了:' + obj.title, this.elem, { tips: [1, '#5FB878'] })
-							var str = obj.title;
+                    dropdown.render({
+                        elem: '.demo1',
+                        data: d,
+                        trigger: 'hover',
+                        className: 'site-dropdown-demo',
+                        click: function (obj) {
+                            //点击事件
+                            // layer.tips('点击了:' + obj.title, this.elem, { tips: [1, '#5FB878'] })
+                            var str = obj.title;
 
-							$('.jimu-widget-instructions').find('.instructions-title').empty().append(str);
+                            $('.jimu-widget-instructions').find('.instructions-title').empty().append(str);
 
-							for (var i = 0; i < d.length; i++) {
-								if (that['layer' + d[i].id]) {
-									that.map.imageryLayers.remove(that['layer' + d[i].id]);
-								}
-							}
+                            for (var i = 0; i < d.length; i++) {
+                                var itemObj = {};
 
-							if (obj.src) {
-								$.ajax({
-									url: obj.src + '/maps.json',
-									type: 'get',
-									dataType: 'JSON',
-									success: function (result) {
+                                itemObj.src = d[i].src;
 
-										that['layer' + obj.id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
-											url: result[0].path,
-										}));
+                                itemObj.title = d[i].title;
 
-										that['layer' + obj.id].alpha = 1;
+                                itemObj.id = 'layer' + d[i].id;
 
-										that['layer' + obj.id].getViewableRectangle().then(function (rectangle) {
-											return that.map.camera.flyTo({
-												destination: rectangle
-											});
-										});
 
-									}
-								})
-							} else {
+                                if (that[itemObj.id]) {
 
-								layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){
-									//得到各种内置组件
-									var layer = layui.layer //弹层
-									// layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 });
-									layer.tips('暂无该服务', '.jimu-widget-instructions', {
-										tips: [2, '#FF5722']
-									});
-								})
-							}
+                                    itemObj.alpha = that[itemObj.id].alpha;
+
+                                    that[itemObj.id].show = false;
+
+                                    topic.publish('removeItem', 'Layermanagement', itemObj);
+
+                                }
+                            }
+
+                            if (obj.src) {
+
+                                var itemObj = {};
+
+                                itemObj.src = obj.src;
+
+                                itemObj.title = obj.title;
+
+                                itemObj.id = 'layer' + obj.id;
+
+
+                                if (that[itemObj.id]) {
+
+                                    itemObj.alpha = that[itemObj.id].alpha;
+
+                                    that[itemObj.id].show = true;
+
+                                    that[itemObj.id].getViewableRectangle().then(function (rectangle) {
+                                        return that.map.camera.flyTo({
+                                            destination: rectangle
+                                        });
+                                    });
+
+                                    topic.publish('appendItem', 'Layermanagement', itemObj, that[itemObj.id]);
+
+                                } else {
+                                    itemObj.alpha = 1;
+
+                                    $.ajax({
+                                        url: itemObj.src + '/maps.json',
+                                        type: 'get',
+                                        dataType: 'JSON',
+                                        success: function (result) {
+
+                                            that[itemObj.id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
+                                                url: result[0].path,
+                                            }));
+
+                                            that[itemObj.id].alpha = 1;
+
+                                            topic.publish('appendItem', 'Layermanagement', itemObj, that[itemObj.id]);
+
+                                            that[itemObj.id].getViewableRectangle().then(function (rectangle) {
+                                                return that.map.camera.flyTo({
+                                                    destination: rectangle
+                                                });
+                                            });
+
+                                        }
+                                    })
+
+                                }
+
+                            } else {
+
+                                layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){
+                                    //得到各种内置组件
+                                    var layer = layui.layer //弹层
+                                    // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 });
+                                    layer.tips('暂无该服务', '.jimu-widget-instructions', {
+                                        tips: [2, '#FF5722']
+                                    });
+                                })
+                            }
 
 
 
 
 
 
-						}
-					});
-				});
-			},
-			closeToolBox: function (item) {},
+                        }
+                    });
+                });
+            },
+            closeToolBox: function (item) {},
 
-			onOpen: function () {
-				//面板打开的时候触发 (when open this panel trigger)
-			},
+            onOpen: function () {
+                //面板打开的时候触发 (when open this panel trigger)
+            },
 
-			onClose: function () {
-				//面板关闭的时候触发 (when this panel is closed trigger)
-			},
+            onClose: function () {
+                //面板关闭的时候触发 (when this panel is closed trigger)
+            },
 
-			onMinimize: function () {
-				this.resize();
-			},
+            onMinimize: function () {
+                this.resize();
+            },
 
-			onMaximize: function () {
-				this.resize();
-			},
+            onMaximize: function () {
+                this.resize();
+            },
 
-			resize: function () {
+            resize: function () {
 
-			},
-			begin: function () {},
+            },
+            begin: function () {},
 
-			destroy: function () {
-				//销毁的时候触发
-				//todo
-				//do something before this func
-				this.inherited(arguments);
-			}
+            destroy: function () {
+                //销毁的时候触发
+                //todo
+                //do something before this func
+                this.inherited(arguments);
+            }
 
-		});
-	});
\ No newline at end of file
+        });
+    });
\ No newline at end of file
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index 284bb05..5a6534b 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/widgets/spatialAnalysis/Widget.js
@@ -40,12 +40,12 @@
 						name: '剖面分析',
 						classs: 'profileAnalysis-tool',
 						img: './images/addL/剖面分析.png'
-					},
-					{
-						name: '模型渲染--占位',
-						classs: 'modelDiagram-tool',
-						img: './images/addL/pdpx.png'
 					}
+                    // , {
+					// 	name: '坡度分析',
+					// 	classs: 'slope-tool',
+					// 	img: './images/addL/pdpx.png'
+					// }
 				];
 				var dom = $('#spatialAnalysis-main');
 				var str = '';
diff --git a/widgets/visualAngle/Widget.html b/widgets/visualAngle/Widget.html
index 4f0b2e2..5ca3dc5 100644
--- a/widgets/visualAngle/Widget.html
+++ b/widgets/visualAngle/Widget.html
@@ -1,14 +1,22 @@
 <div>
-	<!-- <div class="visualAngleOnce v-a-One on" >
+    <!-- <div class="visualAngleOnce v-a-One on" >
 		<img class="v-a-o-img" src="./images/自主体验-1.png" alt="">
 		<div class="v-a-o-title">自主</div>
 	</div> -->
-	<div class="visualAngleOnce v-a-Two">
-		<img class="v-a-o-img" src="./images/漫游体验.png" alt="">
-		<div class="v-a-o-title">漫游</div>
-	</div>
-	<div class="visualAngleOnce v-a-Three" style="border-right: 1px solid #DDDDDD;">
-		<img class="v-a-o-img" src="./images/固定视角.png" alt="">
-		<div class="v-a-o-title">固定</div>
-	</div>
+
+
+    <div class="visualAngleOnce v-a-Two">
+        <div>
+            <i></i>
+            <div class="v-a-o-title">漫游</div>
+        </div>
+    </div>
+
+    <div class="visualAngleOnce v-a-Three">
+        <div>
+            <i></i>
+            <div class="v-a-o-title">固定</div>
+        </div>
+    </div>
+
 </div>
\ No newline at end of file
diff --git a/widgets/visualAngle/css/style.css b/widgets/visualAngle/css/style.css
index d713e49..faf9d92 100644
--- a/widgets/visualAngle/css/style.css
+++ b/widgets/visualAngle/css/style.css
@@ -1,67 +1,87 @@
 .jimu-widget-visualAngle {
-  position: fixed;
-  font-size: 14px;
-  /* height: 72px !important; */
-  /* line-height  : 32px; */
-  /* width: 216px !important; */
-  /* right: auto !important; */
-  /* top: auto !important; */
-  /* bottom: 30px !important; */
-  /* left: calc(50% - 90px) !important; */
-  /* 240px */
-  background: rgba(254, 254, 254, 1);
-  /* border : 1px solid #000; */
-  border-radius: 6px 0 0 6px;
-  text-align: center;
-  /* cursor       : pointer; */
-  z-index: 13 !important;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  justify-content: center;
+    position: fixed;
+    font-size: 14px;
+    /* height: 72px !important; */
+    /* line-height  : 32px; */
+    /* width: 216px !important; */
+    /* right: auto !important; */
+    /* top: auto !important; */
+    /* bottom: 30px !important; */
+    /* left: calc(50% - 90px) !important; */
+    /* 240px */
+    background: rgba(254, 254, 254, 1);
+    /* border : 1px solid #000; */
+    border-radius: 6px 0 0 6px;
+    text-align: center;
+    /* cursor       : pointer; */
+    z-index: 13 !important;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .jimu-widget-visualAngle .visualAngleOnce {
-  width: 72px;
-  box-sizing: border-box;
-  /* border: 1px solid springgreen; */
-  height: 36px;
-  cursor: pointer;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  /* flex-direction: column; */
-  font-size: 13px;
+    width: 72px;
+    height: 36px;
+    line-height: 36px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+}
+
+.jimu-widget-visualAngle .visualAngleOnce>div {
+    width: 100%;
+    height: 24px;
+    border-right: 1px solid #DDDDDD;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+}
+
+.jimu-widget-visualAngle .visualAngleOnce:hover .v-a-o-title {
+    text-decoration: underline;
 }
 
 .jimu-widget-visualAngle .visualAngleOnce .v-a-o-title {
-  color: #969696 !important;
-  position: relative;
-  left: 3px;
+    color: #838383 !important;
+    position: relative;
+    left: 3px;
 }
 
 .jimu-widget-visualAngle .visualAngleOnce.on {
-  background-color: #3F9DFD;
+    background-color: #3F9DFD;
 }
 
-.jimu-widget-visualAngle .visualAngleOnce.on img, .jimu-widget-visualAngle .visualAngleOnce.on div {
-  filter: grayscale(100%) brightness(200%);
+.jimu-widget-visualAngle .visualAngleOnce.on img,
+.jimu-widget-visualAngle .visualAngleOnce.on div {
+    filter: grayscale(100%) brightness(200%);
 }
 
 .jimu-widget-visualAngle .visualAngleOnce:nth-child(1) {
-  border-radius: 6px 0 0 6px;
-  border-right: 1px solid rgba(155, 155, 155, 0.2);
+    border-radius: 6px 0 0 6px;
 }
 
 .jimu-widget-visualAngle .visualAngleOnce:nth-child(3) {
-  /* border-radius: 0 6px 6px 0; */
-  border-left: 1px solid rgba(155, 155, 155, 0.2);
+    /* border-radius: 0 6px 6px 0; */
 }
 
-.jimu-widget-visualAngle .v-a-o-img {
-  position: relative;
-  top: 5px;
-  left: -2px;
-  width: 20px;
-  margin-bottom: 8px;
+.jimu-widget-visualAngle .v-a-Two i {
+    width: 14px;
+    height: 14px;
+    margin-right: 4px;
+    vertical-align: middle;
+    background: url(../../../images/漫游体验.png) no-repeat;
+    background-size: 100% 100%;
+}
+
+.jimu-widget-visualAngle .v-a-Three i {
+    width: 14px;
+    height: 14px;
+    margin-right: 4px;
+    vertical-align: middle;
+    background: url(../../../images/固定视角.png) no-repeat;
+    background-size: 100% 100%;
 }
\ No newline at end of file

--
Gitblit v1.9.3