gemercheung hai 1 ano
pai
achega
d4a1bca2ea

+ 163 - 103
packages/qjkankan-editor/src/api/index.js

@@ -173,6 +173,7 @@ export function get3DSceneList(data, ok) {
   } else {
     //1,3,4,5
     let tmpSceneSource = 1;
+    let folderType = 0;
     // pathLevel2Id === "kankan" ? "1" : "3"
     switch (true) {
       case pathLevel2Id === "kankan":
@@ -180,89 +181,112 @@ export function get3DSceneList(data, ok) {
         break;
       case pathLevel2Id === "kanjian":
         tmpSceneSource = 3;
+        folderType = 2;
         break;
       case pathLevel2Id === "siweiSS":
         tmpSceneSource = 4;
+        folderType = 4;
         break;
       case pathLevel2Id === "siweiSG":
         tmpSceneSource = 5;
+        folderType = 5;
         break;
     }
 
+    // const data = {
+    //   cameraId: null,
+    //   cameraType: null,
+    //   endTime: "",
+    //   folderId: Number.isInteger(folderId) ? folderId : "",
+    //   folderType: String(folderType),
+    //   isOldMu: false,
+    //   isSetData: true,
+    //   keywordType: "sceneName",
+    //   pageNum,
+    //   pageSize,
+    //   sceneName: "",
+    //   sceneSource: tmpSceneSource,
+    //   sceneType: null,
+    //   searchKey: "",
+    //   startTime: "",
+    //   // isObj: 1,
+    // };
     const data = {
+      pageNum: pageNum,
+      pageSize: pageSize,
       cameraId: null,
+      searchKey: "",
       cameraType: null,
-      endTime: "",
-      folderId: Number.isInteger(folderId) ? folderId : "",
-      folderType: pathLevel2Id === "kankan" ? "0" : "2",
-      isOldMu: false,
       isSetData: true,
+      folderId: "",
       keywordType: "sceneName",
-      pageNum,
-      pageSize,
-      sceneName: "",
-      sceneSource: tmpSceneSource,
+      folderType: String(folderType),
       sceneType: null,
-      searchKey: "",
+      sceneSource:tmpSceneSource,
+      endTime: "",
       startTime: "",
-      isObj: 1,
     };
-    const info = JSON.parse(localStorage.getItem("info"));
-    if (tmpSceneSource === 4 || tmpSceneSource === 5) {
-      const MegaData = {
-        pageNum,
-        pageSize,
-        sceneSource: tmpSceneSource,
-        selectType: 1,
-        snCode: null,
-        title: "",
-        cooperationUserName: null,
-        phone: info.userName || "",
-        folderId: Number.isInteger(folderId) ? folderId : "",
-      };
-
-      const userInfo = JSON.parse(localStorage.getItem("info"));
-      let headers = {};
-      const token = localStorage.getItem("token");
-      headers["Fdtoken"] = token;
-      http
-        .postJsonWithHeader(
-          process.env.VUE_APP_MEGA_LIST_URL,
-          MegaData,
-          headers
-        )
-        .then((res) => {
-          ok({
-            code: 0,
-            data: {
-              list: res.data.pageInfo.list.map((item) => {
-                if (item.isFolder === 1) {
-                  item.type = "dir";
-                  item.sceneName = item.name;
-                }
-                return item;
-              }),
-              total: res.data.pageInfo.total,
-            },
-          });
-        });
-    } else {
-      http.postJson(`/ucenter/user/scene/newList`, data).then((res) => {
-        ok({
-          code: 0,
-          data: {
-            list: res.data.pageInfo.list.map((item) => {
-              if (item.isFolder === 1) {
-                item.type = "dir";
-                item.sceneName = item.name;
-              }
-              return item;
-            }),
-            total: res.data.pageInfo.total,
-          },
-        });
-      });
+    // const info = JSON.parse(localStorage.getItem("info"));
+    // if (tmpSceneSource === 4 || tmpSceneSource === 5) {
+    //   const MegaData = {
+    //     pageNum,
+    //     pageSize,
+    //     sceneSource: tmpSceneSource,
+    //     selectType: 1,
+    //     snCode: null,
+    //     title: "",
+    //     cooperationUserName: null,
+    //     phone: info.userName || "",
+    //     folderId: Number.isInteger(folderId) ? folderId : "",
+    //   };
+
+    //   const userInfo = JSON.parse(localStorage.getItem("info"));
+    //   let headers = {};
+    //   const token = localStorage.getItem("token");
+    //   headers["Fdtoken"] = token;
+    //   http
+    //     .postJsonWithHeader(
+    //       process.env.VUE_APP_MEGA_LIST_URL,
+    //       MegaData,
+    //       headers
+    //     )
+    //     .then((res) => {
+    //       ok({
+    //         code: 0,
+    //         data: {
+    //           list: res.data.pageInfo.list.map((item) => {
+    //             if (item.isFolder === 1) {
+    //               item.type = "dir";
+    //               item.sceneName = item.name;
+    //             }
+    //             return item;
+    //           }),
+    //           total: res.data.pageInfo.total,
+    //         },
+    //       });
+    //     });
+    // } else {
+    // }
+
+    if (tmpSceneSource == 4 || tmpSceneSource == 5) {
+      data["isObj"] = 1;
     }
+
+    http.postJson(`/ucenter/user/scene/newList`, data).then((res) => {
+      ok({
+        code: 0,
+        data: {
+          list: res.data.pageInfo.list.map((item) => {
+            if (item.isFolder === 1) {
+              item.type = "dir";
+              item.sceneName = item.name;
+            }
+            return item;
+          }),
+          total: res.data.pageInfo.total,
+        },
+      });
+    });
   }
 }
 
@@ -308,52 +332,88 @@ export function searchInAll3DScenes(data, ok) {
       searchKey,
       startTime: "",
     }),
-    http.postJsonWithHeader(
-      process.env.VUE_APP_MEGA_LIST_URL,
-      {
-        pageNum: 1,
-        pageSize: 999999,
-        sceneSource: "4",
-        selectType: 1,
-        snCode: null,
-        title: String(searchKey).trim(),
-        phone: info.userName || "",
-        cooperationUserName: null,
-        folderId: "",
-      },
-      {
-        Fdtoken: getToken(),
-      }
-    ),
-    http.postJsonWithHeader(
-      process.env.VUE_APP_MEGA_LIST_URL,
-      {
-        pageNum: 1,
-        pageSize: 999999,
-        sceneSource: "5",
-        selectType: 1,
-        snCode: null,
-        title: String(searchKey).trim(),
-        phone: info.userName || "",
-        cooperationUserName: null,
-        folderId: "",
-      },
-      {
-        Fdtoken: getToken(),
-      }
-    ),
+    http.postJson(`/ucenter/user/scene/getOnlySceneList`, {
+      cameraId: null,
+      cameraType: null,
+      endTime: "",
+      folderId: "",
+      folderType: "4",
+      isOldMu: false,
+      isSetData: true,
+      keywordType: "sceneName",
+      pageNum: 1,
+      pageSize: 999999,
+      sceneName: searchKey,
+      sceneSource: "4",
+      sceneType: null,
+      searchKey,
+      startTime: "",
+      isObj: "1",
+    }),
+    http.postJson(`/ucenter/user/scene/getOnlySceneList`, {
+      cameraId: null,
+      cameraType: null,
+      endTime: "",
+      folderId: "",
+      folderType: "5",
+      isOldMu: false,
+      isSetData: true,
+      keywordType: "sceneName",
+      pageNum: 1,
+      pageSize: 999999,
+      sceneName: searchKey,
+      sceneSource: "5",
+      sceneType: null,
+      searchKey,
+      startTime: "",
+      isObj: "1",
+    }),
+    // http.postJsonWithHeader(
+    //   process.env.VUE_APP_MEGA_LIST_URL,
+    //   {
+    //     pageNum: 1,
+    //     pageSize: 999999,
+    //     sceneSource: "4",
+    //     selectType: 1,
+    //     snCode: null,
+    //     title: String(searchKey).trim(),
+    //     phone: info.userName || "",
+    //     cooperationUserName: null,
+    //     folderId: "",
+    //   },
+    //   {
+    //     Fdtoken: getToken(),
+    //   }
+    // ),
+    // http.postJsonWithHeader(
+    //   process.env.VUE_APP_MEGA_LIST_URL,
+    //   {
+    //     pageNum: 1,
+    //     pageSize: 999999,
+    //     sceneSource: "5",
+    //     selectType: 1,
+    //     snCode: null,
+    //     title: String(searchKey).trim(),
+    //     phone: info.userName || "",
+    //     cooperationUserName: null,
+    //     folderId: "",
+    //   },
+    //   {
+    //     Fdtoken: getToken(),
+    //   }
+    // ),
   ]).then((res) => {
     console.log(res);
     let total =
       res[0].data.total +
       res[1].data.total +
-      res[2].data.sceneNum +
-      res[3].data.sceneNum;
+      res[2].data.total +
+      res[3].data.total;
     let list = [
       ...res[0].data.list,
       ...res[1].data.list,
-      ...res[2].data.pageInfo.list,
-      ...res[3].data.pageInfo.list,
+      ...res[2].data.list,
+      ...res[3].data.list,
     ];
     ok({
       code: 0,

+ 7 - 2
packages/qjkankan-editor/src/views/material/works/index.vue

@@ -316,7 +316,7 @@ export default {
                 this.info.scenes.push(newScene);
               }
             } else if (item.materialType === "3D") {
-              const newScene = {
+              let newScene = {
                 icon: item.thumb,
                 sceneCode: item.num,
                 sceneTitle: item.sceneName,
@@ -324,7 +324,12 @@ export default {
                 type: "4dkk",
                 id: "s_" + this.$randomWord(true, 8, 8),
               };
-              this.info.scenes.push(newScene);
+              if (Number(key) === 0) {
+                this.info.scenes[0] = null;
+                this.info.scenes[0] = newScene;
+              } else {
+                this.info.scenes.push(newScene);
+              }
             }
           }
 

+ 1 - 1
packages/qjkankan-view/src/pages/showMobile.vue

@@ -267,7 +267,7 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
   }
   if (earthMask) {
     if ("isShow" in earthMask) {
-      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(skyMask.isShow));
+      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(earthMask.isShow));
     }
     if (earthMask.icon) {
       app.krpanoDom.set(`hotspot[nadirlogo].url`, earthMask.icon);