|
|
@@ -359,12 +359,14 @@ export default {
|
|
|
if (valid) {
|
|
|
this.from.folderId = this.folderId
|
|
|
this.$api.resource.fileArchives(this.from).then(res => {
|
|
|
- if (Object.hasOwn(res, 'code')) {
|
|
|
- this.$message.error(res.msg)
|
|
|
- return
|
|
|
+ console.log(res)
|
|
|
+ console.log(typeof res === 'object')
|
|
|
+ if (res.type === 'application/json') {
|
|
|
+ this.$message.error('该文件夹下无文件或者文件夹,无法归档')
|
|
|
+ } else {
|
|
|
+ this.$emit('refresh')
|
|
|
+ this.download(res)
|
|
|
}
|
|
|
- this.$emit('refresh')
|
|
|
- this.download(res)
|
|
|
})
|
|
|
}
|
|
|
})
|