|
@@ -318,6 +318,10 @@ export default {
|
|
|
this.previewFile(this.form)
|
|
this.previewFile(this.form)
|
|
|
} else if (type === 'edit') {
|
|
} else if (type === 'edit') {
|
|
|
console.log(this.form)
|
|
console.log(this.form)
|
|
|
|
|
+ if (!Object.hasOwn(this.form, 'fileFolder')) {
|
|
|
|
|
+ this.$message.error('暂无文件')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/home/files',
|
|
path: '/home/files',
|
|
|
query: {
|
|
query: {
|
|
@@ -331,6 +335,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
previewFile(item) {
|
|
previewFile(item) {
|
|
|
if (item.id === undefined || item.length === 0) {
|
|
if (item.id === undefined || item.length === 0) {
|
|
|
|
|
+ this.$message.error('暂无文件')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (api.offices.includes(item.fileFolder.suffix)) {
|
|
if (api.offices.includes(item.fileFolder.suffix)) {
|
|
@@ -346,6 +351,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
rowDel(row, index, done) {
|
|
rowDel(row, index, done) {
|
|
|
|
|
+ if (!Object.hasOwn(row, 'fileFolder')) {
|
|
|
|
|
+ this.$message.error('暂无文件')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$confirm('确定将选择数据删除?', {
|
|
this.$confirm('确定将选择数据删除?', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -375,8 +384,10 @@ export default {
|
|
|
window.open(routeUrl.href, '_blank')
|
|
window.open(routeUrl.href, '_blank')
|
|
|
},
|
|
},
|
|
|
fileDownload(res) {
|
|
fileDownload(res) {
|
|
|
- if (Object.hasOwn(res.fileFolder, 'url')) {
|
|
|
|
|
|
|
+ if (Object.hasOwn(res, 'fileFolder')) {
|
|
|
window.open(res.fileFolder.url)
|
|
window.open(res.fileFolder.url)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error('暂无文件')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
exportFile() {
|
|
exportFile() {
|