main
kgdxpr 2 years ago
parent 9ed01c94b8
commit 393b52205e

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -258,9 +258,9 @@
opacity : 0.5;
width : 100px;
text-align : right;
height : 18px;
margin-bottom : -18px;
display : none;
/* height : 18px; */
margin-bottom : -25px;
/* display : none; */
}
.uploader-list .handle i {
@ -752,28 +752,4 @@ body .cool-black .layui-layer-btn a {
height: 25px;
text-align: center;
display: none;
}
.uploader-list .handle {
position: relative;
background-color: black;
color: white;
filter: alpha(Opacity=80);
-moz-opacity: 0.5;
opacity: 0.5;
width: 100px;
text-align: right;
height: 18px;
margin-bottom: -18px;
display: none;
}
.uploader-list .handle i {
margin-right: 5px;
}
.uploader-list .handle i:hover {
cursor: pointer;
}
.uploader-list .file-iteme {
margin: 12px 0 0 15px;
padding: 1px;
float: left;
}

@ -117,12 +117,13 @@
})
}
, done: function (res) {
layer.close(layer.msg());//关闭上传提示窗口
layer.close(layer.msg());//关闭上传提示窗口
console.log(res);
//上传完毕
$('#uploader-list-' + res.input_id).append(
'<div id="" class="file-iteme">' +
'<div class="handle"><i class="layui-icon layui-icon-delete"></i></div>' +
'<div id="' + res.file_id + '" class="file-iteme">' +
'<div class="handle"><i class="layui-icon layui-icon-delete" onclick=delimgs("' + res.file_id + '")></i></div>' +
'<img style="width: 100px;height: 100px;" src=/QingLong' + res.url + '>' +
'</div>'
);
@ -163,7 +164,7 @@
tr.find('.demo-delete').on('click', function () {
delete files[index]; //删除对应的文件
tr.remove();
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
// uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
});
that.elemList.append(tr);
@ -261,11 +262,10 @@
'</tr>'
);
} else {
$('#uploader-list-' + res.data[i].input_id).append(
'<div id="" class="file-iteme">' +
'<div class="handle"><i class="layui-icon layui-icon-delete"></i></div>' +
'<div id="' + res.data[i].file_id + '" class="file-iteme">' +
'<div class="handle"><i class="layui-icon layui-icon-delete" onclick=delimgs("' + res.data[i].file_id + '")></i></div>' +
'<img style="width: 100px;height: 100px;" src=/QingLong/Excel/' + res.data[i].file_id + '.' + res.data[i].suffix + '>' +
'</div>'
);
@ -308,6 +308,33 @@
return false;
});
window.delimgs = function (file_id) {
$.ajax({
url: '/QingLong/collect/delUploadFile',
type: 'post',
data: {
"job_id": jobId,
"file_id": file_id
},
success: function (result) {
if (result.success) {
layer.msg("成功!", {
icon: 1,
time: 1000
}, function () {
$('#' + file_id).remove();
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
}
}
});
}
window.delfiles = function (file_id, file_input_id) {
event.preventDefault();
@ -336,7 +363,7 @@
});
return false;
}
});

Loading…
Cancel
Save