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

uploadUpdate 删除老DOM

parent e1c550d2
...@@ -91,7 +91,8 @@ ...@@ -91,7 +91,8 @@
autoAttachDownload, autoAttachDownload,
deleteAttachDownload, deleteAttachDownload,
uploadAttachDownload, uploadAttachDownload,
aqglUploadUpdate // aqglUploadUpdate
uploadUpdate
} from "common/src/api/system/dmgSystem.js"; } from "common/src/api/system/dmgSystem.js";
import Edit from './lessEdit.vue' import Edit from './lessEdit.vue'
import {tableMixin} from 'common' import {tableMixin} from 'common'
...@@ -170,7 +171,7 @@ ...@@ -170,7 +171,7 @@
}, },
creatFile(){ creatFile(){
/* 清除老节点 */ /* 清除老节点 */
$('#yjyaFileAdd').find('input').remove() $('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input'); let lineEl = document.createElement('input');
let $lineEl=$(lineEl) let $lineEl=$(lineEl)
$lineEl.attr('type','file') $lineEl.attr('type','file')
...@@ -181,7 +182,7 @@ ...@@ -181,7 +182,7 @@
this.beginUpload() this.beginUpload()
}) })
// $lineEl // $lineEl
$('#yjyaFileAdd').append($lineEl) $('#approvefileAdd').append($lineEl)
}, },
beginUpload(){ beginUpload(){
this.isupLoad=true this.isupLoad=true
...@@ -200,7 +201,7 @@ ...@@ -200,7 +201,7 @@
if(updateId){ if(updateId){
formData.append('id', updateId) formData.append('id', updateId)
this.creatFile() this.creatFile()
aqglUploadUpdate(formData).then(res => { uploadUpdate(formData,this.baseUrl).then(res => {
if (res.success) { if (res.success) {
this.$success('更新成功') this.$success('更新成功')
this.isupLoad=false this.isupLoad=false
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
}, },
creatFile(){ creatFile(){
/* 清除老节点 */ /* 清除老节点 */
$('#fcgzybzfileAdd').find('input').remove() $('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input'); let lineEl = document.createElement('input');
let $lineEl=$(lineEl) let $lineEl=$(lineEl)
$lineEl.attr('type','file') $lineEl.attr('type','file')
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
this.beginUpload() this.beginUpload()
}) })
// $lineEl // $lineEl
$('#fcgzybzfileAdd').append($lineEl) $('#approvefileAdd').append($lineEl)
}, },
beginUpload(){ beginUpload(){
this.isupLoad=true this.isupLoad=true
...@@ -231,7 +231,11 @@ ...@@ -231,7 +231,11 @@
} }
}, },
upload(){ upload(){
/* 清除老节点*/
let $upload=$('#aqglfilesonadd') let $upload=$('#aqglfilesonadd')
console.log($upload)
arguments[0]=='update'&&$upload.attr('inputId',arguments[1].fileId)&&$upload.click() arguments[0]=='update'&&$upload.attr('inputId',arguments[1].fileId)&&$upload.click()
if(arguments[0]=='update'){ if(arguments[0]=='update'){
return return
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
}, },
creatFile(){ creatFile(){
/* 清除老节点 */ /* 清除老节点 */
$('#wxglxyfileAdd').find('input').remove() $('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input'); let lineEl = document.createElement('input');
let $lineEl=$(lineEl) let $lineEl=$(lineEl)
$lineEl.attr('type','file') $lineEl.attr('type','file')
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
this.beginUpload() this.beginUpload()
}) })
// $lineEl // $lineEl
$('#wxglxyfileAdd').append($lineEl) $('#approvefileAdd').append($lineEl)
}, },
beginUpload(){ beginUpload(){
this.isupLoad=true this.isupLoad=true
......
...@@ -88,7 +88,8 @@ ...@@ -88,7 +88,8 @@
autoAttachDownload, autoAttachDownload,
deleteAttachDownload, deleteAttachDownload,
uploadAttachDownload, uploadAttachDownload,
aqglUploadUpdate uploadUpdate
// aqglUploadUpdate
} from "common/src/api/system/dmgSystem.js"; } from "common/src/api/system/dmgSystem.js";
import { import {
doQuery, doQuery,
...@@ -172,7 +173,7 @@ ...@@ -172,7 +173,7 @@
}, },
creatFile(){ creatFile(){
/* 清除老节点 */ /* 清除老节点 */
$('#wxglzdfileAdd').find('input').remove() $('#approvefileAdd').find('input').remove()
let lineEl = document.createElement('input'); let lineEl = document.createElement('input');
let $lineEl=$(lineEl) let $lineEl=$(lineEl)
$lineEl.attr('type','file') $lineEl.attr('type','file')
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
this.beginUpload() this.beginUpload()
}) })
// $lineEl // $lineEl
$('#wxglzdfileAdd').append($lineEl) $('#approvefileAdd').append($lineEl)
}, },
beginUpload(){ beginUpload(){
this.isupLoad=true this.isupLoad=true
...@@ -202,7 +203,7 @@ ...@@ -202,7 +203,7 @@
if(updateId){ if(updateId){
formData.append('id', updateId) formData.append('id', updateId)
this.creatFile() this.creatFile()
aqglUploadUpdate(formData).then(res => { uploadUpdate(formData,'aqgl/wxglzd').then(res => {
if (res.success) { if (res.success) {
this.$success('更新成功') this.$success('更新成功')
this.isupLoad=false 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