修复更多菜单bug
This commit is contained in:
parent
164f32c3e4
commit
91bd80d3a8
@ -2227,15 +2227,21 @@
|
|||||||
},
|
},
|
||||||
downloadFile() {
|
downloadFile() {
|
||||||
let totalSize = 0
|
let totalSize = 0
|
||||||
this.$refs.fileListTable.tableSelectData.forEach(item => {
|
if(this.$refs.fileListTable.tableSelectData.length > 0){
|
||||||
totalSize += item.size
|
this.$refs.fileListTable.tableSelectData.forEach(item => {
|
||||||
})
|
totalSize += item.size
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
totalSize += this.rowContextData.size
|
||||||
|
}
|
||||||
if (totalSize > 0) {
|
if (totalSize > 0) {
|
||||||
var fileIds = [];
|
var fileIds = [];
|
||||||
if (this.$refs.fileListTable.tableSelectData.length > 0) {
|
if (this.$refs.fileListTable.tableSelectData.length > 0) {
|
||||||
this.$refs.fileListTable.tableSelectData.forEach(value => {
|
this.$refs.fileListTable.tableSelectData.forEach(value => {
|
||||||
fileIds.push(value.id)
|
fileIds.push(value.id)
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
window.open(process.env.VUE_APP_BASE_FILE_API + 'download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
window.open(process.env.VUE_APP_BASE_FILE_API + 'download?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds, '_self')
|
||||||
} else {
|
} else {
|
||||||
@ -2247,11 +2253,11 @@
|
|||||||
},
|
},
|
||||||
// 收藏/取消收藏
|
// 收藏/取消收藏
|
||||||
favoriteOperating(isFavorite) {
|
favoriteOperating(isFavorite) {
|
||||||
this.$refs.fileListTable.tableSelectData[0].isFavorite = isFavorite
|
this.rowContextData.isFavorite = isFavorite
|
||||||
this.highlightFavorite(isFavorite, true)
|
this.highlightFavorite(isFavorite, true)
|
||||||
api.favoriteUrl({
|
api.favoriteUrl({
|
||||||
token: this.$store.state.user.token,
|
token: this.$store.state.user.token,
|
||||||
id: this.$refs.fileListTable.tableSelectData[0].id,
|
id: this.rowContextData.id,
|
||||||
isFavorite: isFavorite
|
isFavorite: isFavorite
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
})
|
})
|
||||||
@ -2266,7 +2272,7 @@
|
|||||||
fileIds.push(value.id)
|
fileIds.push(value.id)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
fileIds.push(this.$refs.fileListTable.tableSelectData[0].id)
|
fileIds.push(this.rowContextData.id)
|
||||||
}
|
}
|
||||||
const str = this.getShowSumFileAndFolder(fileList)
|
const str = this.getShowSumFileAndFolder(fileList)
|
||||||
this.$confirm('此操作将永久删除' + str + ', 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除' + str + ', 是否继续?', '提示', {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user