Commit e9be8457 authored by 李苏's avatar 李苏 💬

uploadUpdate 删除老DOM

parent e1c550d2
......@@ -91,7 +91,8 @@
autoAttachDownload,
deleteAttachDownload,
uploadAttachDownload,
aqglUploadUpdate
// aqglUploadUpdate
uploadUpdate
} from "common/src/api/system/dmgSystem.js";
import Edit from './lessEdit.vue'
import {tableMixin} from 'common'
......@@ -170,7 +171,7 @@
},
creatFile(){
/* 清除老节点 */
$('#yjyaFileAdd').find('input').remove()
$('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input');
let $lineEl=$(lineEl)
$lineEl.attr('type','file')
......@@ -181,7 +182,7 @@
this.beginUpload()
})
// $lineEl
$('#yjyaFileAdd').append($lineEl)
$('#approvefileAdd').append($lineEl)
},
beginUpload(){
this.isupLoad=true
......@@ -200,7 +201,7 @@
if(updateId){
formData.append('id', updateId)
this.creatFile()
aqglUploadUpdate(formData).then(res => {
uploadUpdate(formData,this.baseUrl).then(res => {
if (res.success) {
this.$success('更新成功')
this.isupLoad=false
......
......@@ -173,7 +173,7 @@
},
creatFile(){
/* 清除老节点 */
$('#fcgzybzfileAdd').find('input').remove()
$('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input');
let $lineEl=$(lineEl)
$lineEl.attr('type','file')
......@@ -184,7 +184,7 @@
this.beginUpload()
})
// $lineEl
$('#fcgzybzfileAdd').append($lineEl)
$('#approvefileAdd').append($lineEl)
},
beginUpload(){
this.isupLoad=true
......@@ -231,7 +231,11 @@
}
},
upload(){
/* 清除老节点*/
let $upload=$('#aqglfilesonadd')
console.log($upload)
arguments[0]=='update'&&$upload.attr('inputId',arguments[1].fileId)&&$upload.click()
if(arguments[0]=='update'){
return
......
......@@ -172,7 +172,7 @@
},
creatFile(){
/* 清除老节点 */
$('#wxglxyfileAdd').find('input').remove()
$('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input');
let $lineEl=$(lineEl)
$lineEl.attr('type','file')
......@@ -183,7 +183,7 @@
this.beginUpload()
})
// $lineEl
$('#wxglxyfileAdd').append($lineEl)
$('#approvefileAdd').append($lineEl)
},
beginUpload(){
this.isupLoad=true
......
......@@ -88,7 +88,8 @@
autoAttachDownload,
deleteAttachDownload,
uploadAttachDownload,
aqglUploadUpdate
uploadUpdate
// aqglUploadUpdate
} from "common/src/api/system/dmgSystem.js";
import {
doQuery,
......@@ -172,7 +173,7 @@
},
creatFile(){
/* 清除老节点 */
$('#wxglzdfileAdd').find('input').remove()
$('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input');
let $lineEl=$(lineEl)
$lineEl.attr('type','file')
......@@ -183,7 +184,7 @@
this.beginUpload()
})
// $lineEl
$('#wxglzdfileAdd').append($lineEl)
$('#approvefileAdd').append($lineEl)
},
beginUpload(){
this.isupLoad=true
......@@ -202,7 +203,7 @@
if(updateId){
formData.append('id', updateId)
this.creatFile()
aqglUploadUpdate(formData).then(res => {
uploadUpdate(formData,'aqgl/wxglzd').then(res => {
if (res.success) {
this.$success('更新成功')
this.isupLoad=false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment