From 3db05e674ff210b7500665c274cc4ca79af8234f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 30 Jun 2021 14:00:42 +0800
Subject: [PATCH] 左侧细节

---
 widgets/modelDiagram/Widget.js |   66 ++++++++++++++++++++++++++------
 1 files changed, 53 insertions(+), 13 deletions(-)

diff --git a/widgets/modelDiagram/Widget.js b/widgets/modelDiagram/Widget.js
index 6281ded..067f034 100644
--- a/widgets/modelDiagram/Widget.js
+++ b/widgets/modelDiagram/Widget.js
@@ -93,42 +93,42 @@
                             title: '人偶',
                             value: './images/gltf/Cesium_Man.glb',
                             id: 100,
-                            num: [3, 3, 1, 1]
+                            num: [3, 3, 1, 1, 12, 1, 6]
                         }, {
                             title: '飞机',
                             value: './images/gltf/Cesium_Air.glb',
                             id: 101,
-                            num: [3, 3, 30, 30]
+                            num: [3, 3, 30, 30, 27, 3, 6]
                         }, {
                             title: '飞机2',
                             value: './images/gltf/CesiumDrone.glb',
                             id: 102,
-                            num: [3, 3, 7, 7]
+                            num: [3, 3, 7, 7, 17, 2, 6]
                         }, {
                             title: '装甲车',
                             value: './images/gltf/GroundVehicle.glb',
                             id: 103,
-                            num: [3, 3, 4, 9]
+                            num: [3, 3, 4, 9, 17, 1, 6]
                         }, {
                             title: '热气球',
                             value: './images/gltf/CesiumBalloon.glb',
                             id: 104,
-                            num: [3, 3, 15, 17]
+                            num: [3, 3, 15, 17, 33, 2, 6]
                         }, {
                             title: '牛奶车',
                             value: './images/gltf/CesiumMilkTruck.glb',
                             id: 105,
-                            num: [3, 3, 3, 5]
+                            num: [3, 3, 3, 5, 13, 1, 6]
                         }, {
                             title: '牛奶车gltf',
                             value: './images/gltf/CesiumMilkTruck.gltf',
                             id: 106,
-                            num: [3, 3, 3, 5]
+                            num: [3, 3, 3, 5, 13, 1, 6]
                         }, {
                             title: '人gltf',
                             value: './images/gltf/walk.gltf',
                             id: 107,
-                            num: [3, 3, 1, 1]
+                            num: [3, 3, 1, 1, 11, 1, 4]
                         }],
                         click: function (obj) {
                             layer.tips('选择了:' + obj.title, this.elem, {
@@ -144,11 +144,29 @@
                             that.getInput();
                             var neWnum = [obj.num[0], obj.num[1], obj.num[2] * that.scale, obj.num[3] * that.scale]
                             that.setNum(neWnum);
+                            that.shijiaoC = obj.num[4];
+                            that.shijiaoW = obj.num[5];
+                            that.shijiaoG = obj.num[6];
                         }
                     });
                 });
                 var a = 1;
                 var b = 1;
+                $("#c").bind('input propertychange', function () {
+                    var a = $("#c").val();
+                    that.shijiaoC = a;
+                    console.log(that.shijiaoC)
+                })
+                $("#w").bind('input propertychange', function () {
+                    var a = $("#w").val();
+                    that.shijiaoW = a;
+                    console.log(that.shijiaoW)
+                })
+                $("#g").bind('input propertychange', function () {
+                    var a = $("#g").val();
+                    that.shijiaoG = a;
+                    console.log(that.shijiaoG)
+                })
                 $("#modelDiagrambeishu").on("input", function () {
                     // $('#modelDiagramW').val();
                     var it = $(this).val();
@@ -190,11 +208,29 @@
 
                 if (once == 'once') {
                     // viewer.trackedEntity = that.entityPeople;
-                    var gg = g + scale * 6;
-                    that.map.camera.flyTo({
-                        destination: Cesium.Cartesian3.fromDegrees(a, b, gg),
-                        duration: 3
-                    });
+
+                    var gg = g + scale * that.shijiaoG;
+                    if (scale > 10000) {
+                        var aa = a;
+                        var bb = b;
+                        that.map.camera.flyTo({
+                            destination: Cesium.Cartesian3.fromDegrees(a, b, gg),
+                            duration: 3
+                        });
+                    } else {
+                        var aa = a + (scale * that.shijiaoC) / 100000;
+                        var bb = b + (scale * that.shijiaoW) / 100000;
+                        that.map.scene.camera.setView({
+                            destination: new Cesium.Cartesian3.fromDegrees(Number(aa), Number(bb), Number(gg)),
+                            orientation: {
+                                heading: Cesium.Math.toRadians(Number(265.00)),
+                                pitch: Cesium.Math.toRadians(Number(-15.98)),
+                                roll: Cesium.Math.toRadians(Number(360.00))
+                            }
+                        });
+                    }
+
+
                 }
 
 
@@ -225,6 +261,10 @@
             b: '',
             g: '',
             scale: '',
+            shijiaoC: 12,
+            shijiaoW: 1,
+            shijiaoG: 4,
+
             //重复添加
             always: function (aa = 'a', bb = 'b') {
                 this.getInput();

--
Gitblit v1.9.3