|
@@ -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 {
|