gemercheung 2 years ago
parent
commit
776493b145

+ 1 - 1
packages/qjkankan-editor/.env.testprod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0506-03
+VUE_APP_DEBBUG_FLAG=0506-05

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

@@ -44,6 +44,7 @@
         v-infinite-scroll="requestMoreData"
         :infinite-scroll-disabled="!hasMoreData || isRequestingMoreData"
       >
+        <!-- vuex中的上传中数据 -->
         <div v-for="(item, i) in uploadStatusList" :key="item.uid">
           <div
             class="table-body-row"
@@ -87,7 +88,7 @@
                     class="name-inner ellipsis"
                     v-title="item.successInfo[tableItemStructure.key]"
                   >
-                    {{ item.successInfo[tableItemStructure.key].len }}
+                    {{ item.successInfo[tableItemStructure.key] }}
                   </div>
                 </span>
                 <span v-else class="ellipsis">
@@ -124,7 +125,7 @@
                     {{ item.title }}
                   </div>
                   <div v-if="item.ifKnowProgress" class="upload-status">
-                    {{ $i18n.t(`gather.upload_material`) }}xxxx
+                    {{ $i18n.t(`gather.upload_material`) }}
                     {{ Math.round(item.progress * 100) }}%
                   </div>
                   <div v-else class="upload-status">
@@ -261,7 +262,7 @@
           :isDarkTheme="isDarkTheme"
         />
         <!-- <div class="no-more-data" v-show="!hasMoreData">
-          - {{$i18n.t('gather.no_more_data')}} -
+          - {{ $i18n.t("gather.no_more_data") }} -
         </div> -->
       </div>
       <!-- 无数据时的提示 -->
@@ -411,7 +412,7 @@ export default {
     },
     fileUploadLongPollingStatusText: {
       type: String,
-      defaut: "",
+      default: "",
     },
     fileInputFailString: {
       type: String,
@@ -521,10 +522,15 @@ export default {
       immediate: false,
     },
     needLongPolling: {
-      handler: function (newVal) {
+      handler: function (newVal, oldValue) {
         if (!newVal) {
           clearInterval(this.longPollingIntervalId);
           this.longPollingIntervalId = null;
+          // 最后上传成功能状态
+          if (!newVal && oldValue) {
+            // debugger;
+            this.refreshMaterialList();
+          }
         } else {
           clearInterval(this.longPollingIntervalId);
           this.longPollingIntervalId = null;
@@ -697,7 +703,7 @@ export default {
               console.error("上传接口响应异常:", response);
               return;
             }
-            console.log("上传成功");
+            console.log("上传成功1");
             if (this.fileUploadLongPollingCb) {
               itemInUploadList.statusText =
                 this.fileUploadLongPollingStatusText;
@@ -713,8 +719,9 @@ export default {
                 response.data.fileSize = "";
               }
               itemInUploadList.successInfo = response.data;
+              // 非pano上传refresh
+              this.refreshMaterialList();
             }
-            this.refreshMaterialList();
           },
           (err) => {
             if (err.statusText === "abort") {
@@ -737,6 +744,8 @@ export default {
             itemInUploadList.progress = progress;
           }
         );
+
+        this.uploadStatusList.unshift(itemInUploadList);
       });
     },
     onClickRow(e) {
@@ -757,6 +766,18 @@ export default {
         }
       });
     },
+    // 1.3.0插入排序
+    insertListBySort(newData) {
+      const firstNotDirItem = this.uploadStatusList.slice
+        .filter((i) => i.dir !== "dir")
+        .shift();
+      console.log("firstNotDirItem", firstNotDirItem);
+      const firstNotDirItemIndex = this.uploadStatusList.findIndex(
+        (i) => i.id === firstNotDirItem.id
+      );
+      console.log("firstNotDirItemIndex", firstNotDirItemIndex);
+      this.uploadStatusList.unshift(newData);
+    },
   },
   mounted() {},
   beforeDestroy() {
@@ -992,7 +1013,6 @@ export default {
   .ellipsis {
   }
   .crumbs {
-    // display: none;
     ul > li .name {
       max-width: 80px;
       display: block;
@@ -1058,7 +1078,6 @@ export default {
   }
 }
 </style>
-
 <style lang="less">
 .material-list,
 .material-list.dark {

+ 1 - 1
packages/qjkankan-editor/src/lang/_zh.json

@@ -853,7 +853,7 @@
     "title_left": "左",
     "title_right": "右",
     "title_custom": "自定义拖动标题",
-    "title_placeholder": "请输入标题,限50字",
+    "title_placeholder": "请输入标题",
     "effect_settings": "效果设置",
     "cancel": "取消",
     "finish": "完成",

+ 14 - 7
packages/qjkankan-editor/src/views/base/customButtonSettings.vue

@@ -100,9 +100,9 @@
           </div>
         </div>
         <div class="edit-content-item" v-if="item.type !== '电话'">
-          <span class="item-name"
-            >{{ $i18n.t("edit_settings.button_open_method") }}</span
-          >
+          <span class="item-name">{{
+            $i18n.t("edit_settings.button_open_method")
+          }}</span>
           <div style="margin-left: 16px">
             {{ $i18n.t(`zh_key.${item.openMethod}`) }}
           </div>
@@ -128,6 +128,7 @@
               class="selector"
               :valueList="buttonTypeList"
               v-model="editingInfo.type"
+              @input="handleClearCurrentValue"
             />
             <input
               class="name-input"
@@ -240,14 +241,17 @@ export default {
     //   deep: true,
     // },
     "editingInfo.type": {
-      handler(newValue, oldValue) {
+      handler(newValue) {
+        console.log("editingInfo.type", newValue);
         this.editingInfo.name = i18n.t(`zh_key.${newValue}`);
-        if (oldValue && newValue !== oldValue) {
-          this.editingInfo.value = "";
-        }
+
+        // if (oldValue.length > 0 && newValue !== oldValue) {
+        //   this.editingInfo.value = "";
+        // }
       },
     },
   },
+
   beforeMount() {
     if (!this.info.customButton) {
       // 这是在v1.2版之前创建的作品,还没设置过自定义按钮,所以还没有customButton字段
@@ -283,6 +287,9 @@ export default {
     });
   },
   methods: {
+    handleClearCurrentValue() {
+      this.editingInfo.value = "";
+    },
     getButtonTypeI18n(buttonType) {
       if (buttonType === "电话") {
         return i18n.t("edit_settings.phone_short");

+ 1 - 0
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -55,6 +55,7 @@
               v-model.trim="hotspot.hotspotTitle"
               type="text"
               maxlength="50"
+              :placeholder="$i18n.t('hotspot.title_placeholder')" 
             />
             <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
           </div>

+ 6 - 2
packages/qjkankan-editor/src/views/hotspot/hotspotIconType/personalized_tag.vue

@@ -13,8 +13,12 @@
     <div class="remark-highlight">{{ $i18n.t("hotspot.hotspot_title") }}</div>
 
     <div class="title-input-wrapper">
-      <!-- :placeholder="$i18n.t('hotspot.title_placeholder')" -->
-      <input v-model.trim="hotspot.hotspotTitle" type="text" maxlength="50" />
+      <input
+        v-model.trim="hotspot.hotspotTitle"
+        type="text"
+        maxlength="50"
+        :placeholder="$i18n.t('hotspot.title_placeholder')" 
+      />
       <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
     </div>
     <!-- <div class="title-input-wrapper has-textarea">