|
|
@@ -74,10 +74,17 @@ export default {
|
|
|
this.sa_service_improvement_recordid = 99999999999
|
|
|
}
|
|
|
this.record = this.content
|
|
|
- this.$refs.list.listData()
|
|
|
this.$nextTick(()=>{
|
|
|
- let listFiles = this.$refs.list.list
|
|
|
- console.log(listFiles,4444)
|
|
|
+ this.$refs.list.listData()
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.listFiles = this.$refs.list.list
|
|
|
+ console.log(this.listFiles,4444)
|
|
|
+ if (this.btnType !== '编辑' && this.listFiles.length > 0){
|
|
|
+ this.batchDeletion()
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
uploadSuccess(res){
|
|
|
@@ -85,8 +92,8 @@ export default {
|
|
|
this.$refs['upload'].dialogUploadVisible = false
|
|
|
this.$refs.list.listData()
|
|
|
this.$nextTick(()=>{
|
|
|
- let listFiles = this.$refs.list.list
|
|
|
- console.log(listFiles,4444)
|
|
|
+ this.listFiles = this.$refs.list.list
|
|
|
+ console.log(this.listFiles,4444)
|
|
|
})
|
|
|
|
|
|
/*if(typeof res.attinfos == 'string') {
|
|
|
@@ -138,15 +145,15 @@ export default {
|
|
|
this.batchDeletion()
|
|
|
},
|
|
|
onClose(){
|
|
|
- if (this.btnTitle != '编辑'){
|
|
|
- this.batchDeletion()
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
async batchDeletion(){
|
|
|
this.linksids = []
|
|
|
+ console.log(this.listFiles,'33333')
|
|
|
this.listFiles.forEach((item,index)=>{
|
|
|
this.linksids[index] = item.linksid
|
|
|
})
|
|
|
+ console.log(this.linksids,'linksids')
|
|
|
const res = await this.$api.requested({
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
"method": "deleteFileLink",
|
|
|
@@ -154,6 +161,15 @@ export default {
|
|
|
"linksids": this.linksids
|
|
|
}
|
|
|
})
|
|
|
+ if (res.code != 0){
|
|
|
+ this.$refs.list.listData()
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.listFiles = this.$refs.list.list
|
|
|
+ console.log(this.listFiles,4444)
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.tool.showMessage(res,()=>{})
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|