maxiaoxiao 1 年間 前
コミット
dc41e467a4

+ 1 - 0
src/components/Combinations/LayerManage/LayerManage.vue

@@ -258,6 +258,7 @@ export default {
         }
       } else {
         this.checkedChange(obj);
+        store.setCheckedData(obj)
       }
       store.setVectorLayerList(this.vectorlayerlist);
       store.setModelLayerList(this.modellayerlist);

+ 1 - 0
src/components/sceneAtttribute/otherOptions/otherOptions.vue

@@ -116,6 +116,7 @@ export default {
     if (this.SceneAtttributeShow && this.otherOptions) {
       this.init();
     }
+    this.multiViewport = store.state.splitType
   },
   methods: {
     //子组件部分

+ 21 - 0
src/components/sceneAtttribute/splitScreen/splitScreen.vue

@@ -28,6 +28,7 @@
         @close="$set(layers, i, false)"
         @handleCheckChange="handleCheckChange"
       ></layer-manage-split>
+      <input v-model="toolTitle" type="text" class="sm-toolTitle" />
     </div>
   </div>
 </template>
@@ -39,6 +40,7 @@ export default {
     return {
       layers: [],
       checkedKeys: [],
+      toolTitle: [],
     };
   },
   computed: {
@@ -63,17 +65,27 @@ export default {
     value(val) {
       this.layers = Array(val);
       this.checkedKeys = Array(val);
+      this.toolTitle = Array(val);
+      this.setCheckeds();
     },
   },
   // inject: ["checkedChange"],
   mounted() {},
   methods: {
+    setCheckeds() {
+      for (let i = 0; i < this.checkedKeys.length; i++) {
+        this.checkedKeys[i] = [store.state.checkedData.id];
+        this.toolTitle[i] = [store.state.checkedData.title];
+      }
+    },
     handleCheckChange(obj, checked, splitId) {
       if (obj.children && obj.children.length > 0) {
         for (let i = 0; i < obj.children.length; i++) {
           this.handleCheckChange(obj.children[i], checked);
         }
       } else {
+        this.toolTitle = obj.title;
+        store.setCheckedData(obj);
         console.log(obj.title, obj.type, splitId, "q");
         // if (obj.checked) {
         let sceneLayer;
@@ -155,5 +167,14 @@ export default {
 .h50 {
   height: 50%;
 }
+.sm-toolTitle {
+  width: 400px;
+  height: 80px;
+  text-align: center;
+  font-size: 20px;
+  position: absolute;
+  top: 80px;
+  left: calc(50% - 50px);
+}
 </style>
 

+ 4 - 0
src/store/store.js

@@ -33,6 +33,7 @@ var store2 = {
         flattenNames: [],//存储压平的名称数组
         S3MList: [],
         splitType: 'NONE',//分屏类型
+        checkedData: null,
         sceneLayerlist: [],
         flattenNames: [],//存储压平的名称数组
         cockpit_date: null,
@@ -148,6 +149,9 @@ var store2 = {
     setsplitType(newValue) {
         this.state.splitType = newValue;
     },
+    setCheckedData(newValue) {
+        this.state.checkedData = newValue;
+    },
     setClipAction(newValue) {
         this.state.clip = newValue;
     },