diff --git a/views/document/html_edit_template.tpl b/views/document/html_edit_template.tpl
index f66a67b7..69956590 100644
--- a/views/document/html_edit_template.tpl
+++ b/views/document/html_edit_template.tpl
@@ -144,14 +144,19 @@
-
-
+
+
+
+
+ 上传失败
+
+
@@ -249,7 +254,7 @@
uploader.reset();
}).on( 'fileQueued', function( file ) {
var item = {
- state : 0,
+ state : "wait",
attachment_id : file.id,
file_size : file.size,
file_name : file.name,
@@ -258,14 +263,19 @@
window.vueApp.lists.splice(0,0,item);
}).on("uploadError",function (file,reason) {
- $("#error-message").text("上传失败:" + reason);
+ for(var i in window.vueApp.lists){
+ var item = window.vueApp.lists[i];
+ if(item.attachment_id == file.id){
+ item.state = "error";
+ }
+ }
}).on("uploadSuccess",function (file, res) {
console.log(file);
for(var index in window.vueApp.lists){
var item = window.vueApp.lists[index];
- if(item.id === file.id()){
+ if(item.id === file.id){
window.vueApp.lists.splice(index,1,res.attach);
break;
}