代码语言:javascript复制
var fileList = this.$refs["itemuploadfile"].uploadFiles;
var formData = new FormData();
for (let index = 0; index < fileList.length; index ) {
var fileObj = fileList[index].raw;
formData.append("files", fileObj);
}
formData.append("identCode", "0");
formData.append("identName", "0");
formData.append("tagCode", "1");
formData.append("tagName", "1");
var self = this;
ident_uploads(formData).then((res) => {
console.log('upload file response', res)
if (res) {
self.$message.success("上传成功");
self.getFileList();
}
})