Browse Source

feat: 保存

gemercheung 1 year ago
parent
commit
04e3f091ec
1 changed files with 18 additions and 6 deletions
  1. 18 6
      packages/qjkankan-editor/src/views/material/pano/index.vue

+ 18 - 6
packages/qjkankan-editor/src/views/material/pano/index.vue

@@ -215,6 +215,7 @@
           <!-- end of 文字型单元格 -->
         </div>
       </tableList>
+
       <UploadTaskList
         class="upload-task-list"
         fileType="IMAGE"
@@ -316,8 +317,10 @@ const LONG_POLLING_INTERVAL = 5;
 const folderMixin = folderMixinFactory(TYPE);
 
 export default {
+  // eslint-disable-next-line vue/multi-word-component-names
+  name: "pano",
   mixins: [folderMixin],
-  name: "Pano",
+
   components: {
     tableList,
     crumbs,
@@ -562,11 +565,17 @@ export default {
                 const index = this.uploadListForUI.findIndex(
                   (eachTask) => eachTask.backendId === eachRes.id
                 );
-                index >= 0 && (this.uploadListForUI[index].status = "FAIL");
-                index >= 0 &&
-                  (this.uploadListForUI[index].statusText = this.$msg.success(
-                    i18n.t("gather.material_cutting_fail")
-                  ));
+                if (index >= 0) {
+                  this.uploadListForUI[index].status = "FAIL";
+                  const text = i18n.t("gather.material_cutting_fail");
+                  this.debounceErrMsg(text);
+                  this.uploadListForUI[index].statusText = text;
+                }
+                // index >= 0 && (this.uploadListForUI[index].status = "FAIL");
+                // index >= 0 &&
+                //   (this.uploadListForUI[index].statusText = this.$msg.success(
+                //     i18n.t("gather.material_cutting_fail")
+                //   ));
               } else if (eachRes.status === 3) {
                 const index = this.uploadListForUI.findIndex(
                   (eachTask) => eachTask.backendId === eachRes.id
@@ -851,6 +860,9 @@ export default {
     onClickDeleteInPreview(index) {
       this.del(this.list[index]);
     },
+    debounceErrMsg: debounce(function (txt) {
+      this.$msg.error(txt);
+    }, 100),
   },
 };
 </script>