|
@@ -3,7 +3,7 @@
|
|
|
* @Author: 欧阳承珺
|
|
|
* @LastEditors: 欧阳承珺
|
|
|
* @Date: 2022-11-01 19:27:42
|
|
|
- * @LastEditTime: 2022-11-17 09:06:01
|
|
|
+ * @LastEditTime: 2022-11-17 09:31:51
|
|
|
-->
|
|
|
<template>
|
|
|
<div>
|
|
@@ -25,8 +25,8 @@
|
|
|
<div class="py-15px">
|
|
|
<p class="text-[20px] leading-28px text-[#333]">我的转档</p>
|
|
|
<div class="mt-10px mb-16px">
|
|
|
- <button class="btn btn-download" @click="downloadFiles" :disabled="isDownload">下载</button>
|
|
|
- <button class="btn btn-delete" @click="deleteChangeFileRecord" :disabled="isDelete">删除</button>
|
|
|
+ <button class="btn btn-download" :disabled="isDownload" @click="downloadFiles">下载</button>
|
|
|
+ <button class="btn btn-delete" :disabled="isDelete" @click="deleteChangeFileRecord">删除</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -63,7 +63,16 @@
|
|
|
import { mapState } from 'vuex'
|
|
|
export default {
|
|
|
layout: 'userCenter',
|
|
|
- middleware: ['auth','user'],
|
|
|
+ middleware: ['auth'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData:[],
|
|
|
+ tableDataSelection: [],
|
|
|
+ totalNum: 0,
|
|
|
+ isDownload: true,
|
|
|
+ isDelete: true
|
|
|
+ }
|
|
|
+ },
|
|
|
head() {
|
|
|
return {
|
|
|
title: '17PDF Reader - 个人中心',
|
|
@@ -79,15 +88,6 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- tableData:[],
|
|
|
- tableDataSelection: [],
|
|
|
- totalNum: 0,
|
|
|
- isDownload: true,
|
|
|
- isDelete: true
|
|
|
- }
|
|
|
- },
|
|
|
computed: {
|
|
|
...mapState([
|
|
|
'userInfo',
|
|
@@ -114,7 +114,7 @@ export default {
|
|
|
// 计算文件大小函数(保留两位小数),Size为字节大小
|
|
|
getfilesize (size) {
|
|
|
if (!size) return ""
|
|
|
- var num = 1024.00 //byte
|
|
|
+ const num = 1024.00 // byte
|
|
|
if (size < num) {
|
|
|
return size + "B"
|
|
|
}
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
},
|
|
|
// 删除转档记录
|
|
|
deleteChangeFileRecord () {
|
|
|
- var data = new FormData()
|
|
|
+ const data = new FormData()
|
|
|
for (const file of this.tableDataSelection) {
|
|
|
data.append('ids', file.id)
|
|
|
}
|