gemercheung преди 2 години
родител
ревизия
1ef577ec02
променени са 1 файла, в които са добавени 33 реда и са изтрити 28 реда
  1. 33 28
      packages/qjkankan-editor/src/components/materialListInMaterialSelector.vue

+ 33 - 28
packages/qjkankan-editor/src/components/materialListInMaterialSelector.vue

@@ -443,7 +443,10 @@ export default {
   },
   computed: {
     showList() {
-      return this.list.filter((i) => i.status === 3);
+      if (this.materialTypeAlias === "pano") {
+        return this.list.filter((i) => i.status === 3);
+      }
+      return this.list;
     },
     materialTypeAlias() {
       if (this.materialType === "3D") {
@@ -624,35 +627,37 @@ export default {
     },
     preProessData(newData) {
       this.list = this.list.concat(newData);
+      //全景图
+      if (this.materialTypeAlias === "pano") {
+        const uploadlist = this.list
+          .filter((i) => i.status < 3)
+          .map((item) => {
+            let itemInUploadList = {
+              title: item.name,
+              ifKnowProgress: false,
+              progress: 0,
+              status: "LOADING",
+              statusText: this.$i18n.t(`gather.cutting`),
+              uid: `u_${this.$randomWord(true, 8, 8)}`,
+              abortHandler: null,
+              backendId: item.id, // 只用于全景图上传
+              parentFolderId: item.dirId,
+            };
+            return itemInUploadList;
+          });
 
-      const uploadlist = this.list
-        .filter((i) => i.status < 3)
-        .map((item) => {
-          let itemInUploadList = {
-            title: item.name,
-            ifKnowProgress: false,
-            progress: 0,
-            status: "LOADING",
-            statusText: this.$i18n.t(`gather.cutting`),
-            uid: `u_${this.$randomWord(true, 8, 8)}`,
-            abortHandler: null,
-            backendId: item.id, // 只用于全景图上传
-            parentFolderId: item.dirId,
-          };
-          return itemInUploadList;
-        });
-
-      const res = new Map();
+        const res = new Map();
 
-      const latestUploadlist = this.uploadStatusList
-        .concat(uploadlist)
-        .filter((a) => !res.has(a.backendId) && res.set(a.backendId, 1));
-      console.log("latestUploadlist", latestUploadlist);
-      const capitalizedMaterialType = capitalize(this.materialType);
-      this.$store.commit(
-        `setUploadStatusList${capitalizedMaterialType}`,
-        latestUploadlist
-      );
+        const latestUploadlist = this.uploadStatusList
+          .concat(uploadlist)
+          .filter((a) => !res.has(a.backendId) && res.set(a.backendId, 1));
+        console.log("latestUploadlist", latestUploadlist);
+        const capitalizedMaterialType = capitalize(this.materialType);
+        this.$store.commit(
+          `setUploadStatusList${capitalizedMaterialType}`,
+          latestUploadlist
+        );
+      }
     },
     refreshMaterialList: debounce(
       function (type) {