|
@@ -77,7 +77,7 @@
|
|
<tr v-for="(item, index) in fileList" id="preview-1668340925733-0" :key="index" class="file-preview-frame explorer-frame kv-preview-thumb w-100px h-38px hover:bg-[#f5f5f5]" data-fileindex="0" data-template="pdf" :title="item.name">
|
|
<tr v-for="(item, index) in fileList" id="preview-1668340925733-0" :key="index" class="file-preview-frame explorer-frame kv-preview-thumb w-100px h-38px hover:bg-[#f5f5f5]" data-fileindex="0" data-template="pdf" :title="item.name">
|
|
<td class="file-details-cell">{{ index+1 }}</td>
|
|
<td class="file-details-cell">{{ index+1 }}</td>
|
|
<td class="file-details-cell !text-left">
|
|
<td class="file-details-cell !text-left">
|
|
- <div class="explorer-caption max-w-260px truncate block text-[#777]" title="test.pdf">{{ item.name }}</div>
|
|
|
|
|
|
+ <div class="explorer-caption max-w-260px truncate block text-[#777]" :title="item.name">{{ item.name }}</div>
|
|
</td>
|
|
</td>
|
|
<td class="file-details-cell text-[#999]">{{ getfilesize(item.size) }}</td>
|
|
<td class="file-details-cell text-[#999]">{{ getfilesize(item.size) }}</td>
|
|
<td class="file-details-cell points">{{ userInfo?.subscriberType === 1 ? 0 : item.price }}</td>
|
|
<td class="file-details-cell points">{{ userInfo?.subscriberType === 1 ? 0 : item.price }}</td>
|
|
@@ -96,7 +96,7 @@
|
|
<!-- <td v-else class="file-details-cell state text-14px text-red-500">转换失败<img src="/converter/menu_ic_pdfconvert.png" @click="rechangeFile" /></td> -->
|
|
<!-- <td v-else class="file-details-cell state text-14px text-red-500">转换失败<img src="/converter/menu_ic_pdfconvert.png" @click="rechangeFile" /></td> -->
|
|
<td class="file-actions-cell w-50px p-0">
|
|
<td class="file-actions-cell w-50px p-0">
|
|
<div class="file-actions text-center">
|
|
<div class="file-actions text-center">
|
|
- <div class="file-footer-buttons" @click="deleteFile(index)" v-if="changeFileFlag">
|
|
|
|
|
|
+ <div class="file-footer-buttons" @click="deleteFile(index,item)" v-if="changeFileFlag">
|
|
<button type="button" class="kv-file-remove btn btn-xs btn-default bg-inherit !border-none pr-7px py-1px pl-5px text-12px leading-normal rounded-3px" title="删除文件"><i class="pdf-removeicon"></i></button>
|
|
<button type="button" class="kv-file-remove btn btn-xs btn-default bg-inherit !border-none pr-7px py-1px pl-5px text-12px leading-normal rounded-3px" title="删除文件"><i class="pdf-removeicon"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -479,6 +479,8 @@ export default {
|
|
array = event
|
|
array = event
|
|
}
|
|
}
|
|
const defaultPrice = await this.getFilePrice("pdf", "docx");
|
|
const defaultPrice = await this.getFilePrice("pdf", "docx");
|
|
|
|
+ // console.log("上传文件1:展示的文件",this.fileList)
|
|
|
|
+ // console.log("上传文件1:上传后台的文件:",this.uniqFileArr)
|
|
for (let i = 0; i < array.length; i++) {
|
|
for (let i = 0; i < array.length; i++) {
|
|
const fileObj = {
|
|
const fileObj = {
|
|
name: array[i].name,
|
|
name: array[i].name,
|
|
@@ -513,7 +515,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.uniqFileArr=newArr
|
|
this.uniqFileArr=newArr
|
|
- // console.log(this.uniqFileArr)
|
|
|
|
|
|
+ // console.log("上传文件2:展示的文件",this.fileList)
|
|
|
|
+ // console.log("上传文件2:上传后台的文件:",this.uniqFileArr)
|
|
|
|
|
|
|
|
|
|
if(event.target){
|
|
if(event.target){
|
|
@@ -558,9 +561,17 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 删除文件
|
|
// 删除文件
|
|
- deleteFile(index) {
|
|
|
|
- this.fileList.splice(index, 1);
|
|
|
|
- this.uniqFileArr.splice(index - this.changeSucesssNumTotal, 1);
|
|
|
|
|
|
+ deleteFile(index, item) {
|
|
|
|
+ // console.log(item)
|
|
|
|
+ // console.log("上传文件4:上传后台的文件:",this.uniqFileArr,this.fileList[index])
|
|
|
|
+ for(let i=0;i<this.uniqFileArr.length;i++){
|
|
|
|
+ if(item.name === this.uniqFileArr[i].name){
|
|
|
|
+ this.uniqFileArr.splice(i,1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.fileList.splice(index, 1);
|
|
|
|
+ // console.log("上传文件3:展示的文件",index,this.fileList,this.changeSucesssNumTotal)
|
|
|
|
+ // console.log("上传文件3:上传后台的文件:",this.uniqFileArr)
|
|
this.changeSucesssFileList = [];
|
|
this.changeSucesssFileList = [];
|
|
localStorage.removeItem("file");
|
|
localStorage.removeItem("file");
|
|
this.fileList.forEach(item => {
|
|
this.fileList.forEach(item => {
|
|
@@ -773,11 +784,12 @@ export default {
|
|
for (let i = 0; i < failedFileNameArr.length; i++) {
|
|
for (let i = 0; i < failedFileNameArr.length; i++) {
|
|
this.uniqFileArr.forEach(item => {
|
|
this.uniqFileArr.forEach(item => {
|
|
if (item.name === failedFileNameArr[i]) {
|
|
if (item.name === failedFileNameArr[i]) {
|
|
- result.push(item);
|
|
|
|
|
|
+ result.unshift(item);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
this.uniqFileArr = result;
|
|
this.uniqFileArr = result;
|
|
|
|
+ // console.log("上传文件5:上传后台的文件:",this.uniqFileArr)
|
|
this.getUserInfo()
|
|
this.getUserInfo()
|
|
this.uploadNum = 0;
|
|
this.uploadNum = 0;
|
|
this.changeFileFlag = true;
|
|
this.changeFileFlag = true;
|