|
@@ -146,7 +146,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
- if (this.file.ownertable == "temporary") this.deteleFiles([this.file.linksid])
|
|
|
+ this.deteleFiles()
|
|
|
},
|
|
|
methods: {
|
|
|
saveTheImage() {
|
|
@@ -216,6 +216,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleFileLink(attachmentids, ownertable = "temporary", ownerid = 1, data) {
|
|
|
+ this.deteleFiles()
|
|
|
this.$Http.basic({
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
"method": "createFileLink",
|
|
@@ -232,12 +233,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//删除附件
|
|
|
- deteleFiles(linksids) {
|
|
|
- this.$Http.basic({
|
|
|
+ deteleFiles() {
|
|
|
+ if (this.file.ownertable == "temporary") this.$Http.basic({
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
"method": "deleteFileLink",
|
|
|
"content": {
|
|
|
- linksids
|
|
|
+ linksids: [this.file.linksid]
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log("处理删除附件", res)
|