|
@@ -92,6 +92,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
afterRead(file) { |
|
|
afterRead(file) { |
|
|
// 此时可以自行将文件上传至服务器 |
|
|
// 此时可以自行将文件上传至服务器 |
|
|
|
|
|
|
|
|
for ( var i = 0 ; i < this.fileList.length ; i++){ |
|
|
for ( var i = 0 ; i < this.fileList.length ; i++){ |
|
|
if(this.fileList[i].url == undefined&&this.fileList!='') { |
|
|
if(this.fileList[i].url == undefined&&this.fileList!='') { |
|
|
this.fileList[i] = {url:this.fileList[i].content, id: '', isImage: true}; |
|
|
this.fileList[i] = {url:this.fileList[i].content, id: '', isImage: true}; |
|
@@ -147,6 +148,11 @@ export default { |
|
|
if(this.$route.query.type == 'update'){ |
|
|
if(this.$route.query.type == 'update'){ |
|
|
this.file.tableId = this.$route.query.id ; |
|
|
this.file.tableId = this.$route.query.id ; |
|
|
updateDemand(this.form).then(response => { |
|
|
updateDemand(this.form).then(response => { |
|
|
|
|
|
this.$toast.loading({ |
|
|
|
|
|
message: "上传中...", |
|
|
|
|
|
forbidClick: true, |
|
|
|
|
|
duration: 0, |
|
|
|
|
|
}); |
|
|
for (var i = 0 ; i < this.fileList.length ; i++){ |
|
|
for (var i = 0 ; i < this.fileList.length ; i++){ |
|
|
if(this.fileList[i].url.indexOf('http://') == -1&&this.fileList!=''){ |
|
|
if(this.fileList[i].url.indexOf('http://') == -1&&this.fileList!=''){ |
|
|
this.file.files.push(this.fileList[i].url); |
|
|
this.file.files.push(this.fileList[i].url); |
|
@@ -168,9 +174,15 @@ export default { |
|
|
}else{ |
|
|
}else{ |
|
|
userDemand(this.form).then(response => { |
|
|
userDemand(this.form).then(response => { |
|
|
this.file.tableId = response.data; |
|
|
this.file.tableId = response.data; |
|
|
|
|
|
this.$toast.loading({ |
|
|
|
|
|
message: "上传中...", |
|
|
|
|
|
forbidClick: true, |
|
|
|
|
|
duration: 0, |
|
|
|
|
|
}); |
|
|
for(var i = 0 ; i < this.fileList.length ; i++){ |
|
|
for(var i = 0 ; i < this.fileList.length ; i++){ |
|
|
this.file.files.push(this.fileList[i].url); |
|
|
this.file.files.push(this.fileList[i].url); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
base64Attach(this.file).then(response => { |
|
|
base64Attach(this.file).then(response => { |
|
|
if (response.code == 200){ |
|
|
if (response.code == 200){ |
|
|
Dialog.confirm({ |
|
|
Dialog.confirm({ |
|
@@ -179,7 +191,6 @@ export default { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
showCancelButton:false |
|
|
showCancelButton:false |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
self.location=document.referrer; |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|