gemercheung 1 năm trước cách đây
mục cha
commit
437003c55d

+ 1 - 0
packages/qjkankan-editor/package.json

@@ -40,6 +40,7 @@
     "vue-marquee-text-component": "1.2.0",
     "vue-photo-preview": "^1.1.3",
     "vue-router": "^3.4.9",
+    "vue-slider-component": "^3.2.24",
     "vue-toast-notification": "^3.1.1",
     "vue-toastification": "^1.7.14",
     "vuex": "^3.6.0"

+ 5 - 2
packages/qjkankan-editor/src/api/index.js

@@ -207,7 +207,7 @@ export function get3DSceneList(data, ok) {
       startTime: "",
       isObj: 1,
     };
-
+    const info = JSON.parse(localStorage.getItem("info"));
     if (tmpSceneSource === 4 || tmpSceneSource === 5) {
       const MegaData = {
         pageNum,
@@ -217,7 +217,7 @@ export function get3DSceneList(data, ok) {
         snCode: null,
         title: "",
         cooperationUserName: null,
-        // phone: "15915816041",
+        phone: info.userName || "",
         folderId: Number.isInteger(folderId) ? folderId : "",
       };
 
@@ -272,6 +272,7 @@ export function get3DSceneList(data, ok) {
 
 export function searchInAll3DScenes(data, ok) {
   const { searchKey } = data;
+  const info = JSON.parse(localStorage.getItem("info"));
   return Promise.all([
     http.postJson(`/ucenter/user/scene/getOnlySceneList`, {
       cameraId: null,
@@ -316,6 +317,7 @@ export function searchInAll3DScenes(data, ok) {
         selectType: 1,
         snCode: null,
         title: String(searchKey).trim(),
+        phone: info.userName || "",
         cooperationUserName: null,
         folderId: "",
       },
@@ -332,6 +334,7 @@ export function searchInAll3DScenes(data, ok) {
         selectType: 1,
         snCode: null,
         title: String(searchKey).trim(),
+        phone: info.userName || "",
         cooperationUserName: null,
         folderId: "",
       },

+ 15 - 17
packages/qjkankan-editor/src/views/material/works/index.vue

@@ -289,10 +289,10 @@ export default {
         (data) => {
           // 往里边添加用户选中的素材。
           this.$store.commit("SetInfo", data);
-          for (const item of selected) {
+          console.log("selected", selected);
+          for (const [key, item] of Object.entries(selected)) {
             if (item.materialType === "pano") {
-              console.log(" this.info.scenes", this.info.scenes);
-              const newScene = {
+              let newScene = {
                 icon: item.icon,
                 sceneCode: item.sceneCode,
                 sceneTitle: item.name,
@@ -300,14 +300,19 @@ export default {
                 type: "pano",
                 id: "s_" + this.$randomWord(true, 8, 8),
               };
-              if (this.info.scenes.length > 0) {
-                this.info.scenes[0] = Object.assign(
-                  this.info.scenes[0],
-                  newScene
-                );
+
+              console.log("key", key);
+              if (Number(key) === 0) {
                 //新建时开天空mask
-                this.info.scenes[0].customMask.sky.isShow = true
+                newScene = Object.assign(newScene, this.info.scenes[0]);
+                newScene.customMask.sky.isShow = true;
+                this.info.scenes[0] = newScene;
               } else {
+                newScene = Object.assign(newScene, {
+                  customMask: this.info.scenes[0].customMask,
+                  initVisual: this.info.scenes[0].initVisual
+                });
+                newScene.customMask.sky.isShow = true;
                 this.info.scenes.push(newScene);
               }
             } else if (item.materialType === "3D") {
@@ -319,14 +324,7 @@ export default {
                 type: "4dkk",
                 id: "s_" + this.$randomWord(true, 8, 8),
               };
-              if (this.info.scenes.length > 0) {
-                this.info.scenes[0] = Object.assign(
-                  this.info.scenes[0],
-                  newScene
-                );
-              } else {
-                this.info.scenes.push(newScene);
-              }
+              this.info.scenes.push(newScene);
             }
           }
 

+ 29 - 6
packages/qjkankan-editor/src/views/screen/Setting.vue

@@ -21,8 +21,25 @@
         alt=""
       />
       <div class="item">
-        <div class="">{{ $i18n.t("modules.screen.v_angle_re") }}</div>
-        <slider
+        <div class="">
+          {{ $i18n.t("modules.screen.v_angle_re") }} 
+        </div>
+
+        <vue-slider
+          v-model="vlookat"
+          :min="-90"
+          :max="90"
+          :height="6"
+          :width="`95%`"
+          :marks="marks"
+          direction="rtl"
+          :processStyle="{
+            backgroundColor: '#409eff',
+          }"
+          :tooltip="'active'"
+        />
+
+        <!-- <slider
           v-model="vlookat"
           range
           show-stops
@@ -30,7 +47,7 @@
           :min="-90"
           :max="90"
         >
-        </slider>
+        </slider> -->
       </div>
 
       <div class="col">
@@ -60,11 +77,15 @@
 <script>
 import { mapGetters } from "vuex";
 import { Slider } from "element-ui";
+import VueSlider from "vue-slider-component";
+import "vue-slider-component/theme/antd.css";
+
 import Switcher from "@/components/shared/Switcher";
 export default {
   components: {
-    Slider,
+    // Slider,
     Switcher,
+    VueSlider,
   },
   computed: {
     ...mapGetters({
@@ -78,7 +99,7 @@ export default {
         90: "90°",
       },
       initImg: "",
-      vlookat: null,
+      vlookat: [-90, 90],
       applyToAll: false,
     };
   },
@@ -186,7 +207,6 @@ export default {
     },
   },
   mounted() {
-
     this.$bus.on("initView", (data) => {
       this.initImg = data;
     });
@@ -229,6 +249,9 @@ export default {
       padding: 0 5px;
       margin-bottom: 10px;
     }
+    .vue-slider {
+      margin: 15px auto;
+    }
   }
   .col {
     width: 100%;