Преглед на файлове

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into sl3

shilin преди 3 години
родител
ревизия
4d0e25cd6a
променени са 2 файла, в които са добавени 66 реда и са изтрити 36 реда
  1. 1 0
      src/views/SandTable/SandTable.vue
  2. 65 36
      src/views/SandTable/component/ThreeModel1.vue

+ 1 - 0
src/views/SandTable/SandTable.vue

@@ -728,6 +728,7 @@ export default {
         },
         success(res) {
           that.mapSource = res.data;
+          console.log(123123,res)
         },
       });
     },

+ 65 - 36
src/views/SandTable/component/ThreeModel1.vue

@@ -13,7 +13,11 @@
         v-show="info.show"
         :style="'left: ' + info.x + 'px; top: ' + info.y + 'px;'"
       >
-        <div class="fan-name pointer" v-show="info.id != 'build'" @click.stop="info.clickName">
+        <div
+          class="fan-name pointer"
+          v-show="info.id != 'build'"
+          @click.stop="info.clickName"
+        >
           {{ info.name }}
         </div>
         <div
@@ -136,8 +140,8 @@ export default {
       csl: null,
       gzsl: null,
       htmlLayer: [
+        // 麻黄山
         {
-          // 麻黄山
           id: "fan-mhs",
           x: 0,
           y: 0,
@@ -177,8 +181,8 @@ export default {
             ]);
           },
         },
+        // 牛首山
         {
-          // 牛首山
           id: "fan-nss",
           x: 0,
           y: 0,
@@ -192,7 +196,6 @@ export default {
           position: null,
           name: "牛首山",
           clickName: function () {
-            console.log("牛首山");
             that.clickMapItem([
               "NSS_FDC_SC",
               "NG01_27_TD",
@@ -219,8 +222,8 @@ export default {
             ]);
           },
         },
+        // 青山
         {
-          // 青山
           id: "fan-qs",
           x: 0,
           y: 0,
@@ -260,8 +263,8 @@ export default {
             ]);
           },
         },
+        // 石板泉
         {
-          // 石板泉
           id: "fan-sbq",
           x: 0,
           y: 0,
@@ -275,7 +278,6 @@ export default {
           position: null,
           name: "石板泉",
           clickName: function () {
-            console.log("石板泉");
             that.clickMapItem([
               "SBQ_FDC_SC",
               "SG01_01_TD",
@@ -302,8 +304,8 @@ export default {
             ]);
           },
         },
+        // 香山
         {
-          // 香山
           id: "fan-xs",
           x: 0,
           y: 0,
@@ -317,7 +319,6 @@ export default {
           position: null,
           name: "香山",
           clickName: function () {
-            console.log("香山");
             that.clickMapItem([
               "XS_FDC_SC",
               "XG01_26_TD",
@@ -344,8 +345,8 @@ export default {
             ]);
           },
         },
+        // 大武口
         {
-          // 大武口
           id: "light-dwk",
           x: 0,
           y: 0,
@@ -365,8 +366,8 @@ export default {
             console.log("大武口");
           },
         },
+        // 平罗
         {
-          // 平罗
           id: "light-pl",
           x: 0,
           y: 0,
@@ -386,8 +387,8 @@ export default {
             console.log("平罗");
           },
         },
+        // 马场湖
         {
-          // 马场湖
           id: "light-mch",
           x: 0,
           y: 0,
@@ -407,8 +408,8 @@ export default {
             console.log("马场湖");
           },
         },
+        // 宣和
         {
-          // 宣和
           id: "light-xh",
           x: 0,
           y: 0,
@@ -428,8 +429,8 @@ export default {
             console.log("宣和");
           },
         },
+        // 海子井
         {
-          // 海子井
           id: "light-hzj",
           x: 0,
           y: 0,
@@ -449,24 +450,47 @@ export default {
             console.log("海子井");
           },
         },
-        { // 大楼
-           id: "build",
-           x: 0,
-           y: 0,
-           show: true,
-           ox: 290,
-           oy: 120,
-           fanW: 60,
-           fanH: 100,
-           fanX: -260,
-           fanY: -200,
-           position: null,
-           name: "大楼",
-           clickName: function () { console.log("大楼") },
-           clickFan: () => { 
-           this.showFanInfo(this.htmlLayer[10].position);
+        // 大楼
+        {
+          id: "build",
+          x: 0,
+          y: 0,
+          show: true,
+          ox: 290,
+          oy: 120,
+          fanW: 60,
+          fanH: 100,
+          fanX: -260,
+          fanY: -200,
+          position: null,
+          name: "国电大厦",
+          clickName: function () {
+            that.clickMapItem([
+              "SBQ_FDC_SC",
+              "NSS_FDC_SC",
+              "QS_FDC_SC",
+              "MHS_FDC_SC",
+              "XS_FDC_SC",
+              "PL_GDC_SC",
+            ]);
+          },
+          clickFan: () => {
+            this.showFanInfo(this.htmlLayer[10].position);
+            this.jkd = this.htmlLayer[10].jkd;
+            this.ysl = this.htmlLayer[10].ysl;
+            this.lsl = this.htmlLayer[10].lsl;
+            this.csl = this.htmlLayer[10].csl;
+            this.gzsl = this.htmlLayer[10].gzsl;
+            that.clickMapItem([
+              "SBQ_FDC_SC",
+              "NSS_FDC_SC",
+              "QS_FDC_SC",
+              "MHS_FDC_SC",
+              "XS_FDC_SC",
+              "PL_GDC_SC",
+            ]);
           },
-         },
+        },
       ],
       fanInfoLayer: {
         id: "fan-info",
@@ -523,6 +547,11 @@ export default {
     rinseData() {
       if (this.mapSource && this.mapSource.MHS_FDC) {
         for (let pKey in this.mapSource) {
+          if (pKey === "all") {
+            for (let cKey in this.mapSource[pKey]) {
+              this.htmlLayer[10][cKey] = this.mapSource[pKey][cKey];
+            }
+          }
           this.htmlLayer.forEach((ele) => {
             if (
               pKey.toLowerCase().indexOf(ele.id.toLowerCase().split("-")[1]) !==
@@ -694,11 +723,11 @@ export default {
           gltf.scene.position.set(0, 0, -35); // 10, 0, -50    -6, 0.13, -50
           scene.add(gltf.scene);
           gltf.scene.rotateY(120);
-            this.htmlLayer[10].position = {
-                x: -6,
-                y: -4,
-                z: -35,
-            }
+          this.htmlLayer[10].position = {
+            x: -6,
+            y: -4,
+            z: -35,
+          };
           scene.onAfterRender = () => {
             this.$emit("when");
             this.$refs.pageLoading.hide();