Commit f36021bd authored by zhengke's avatar zhengke

no message

parent c64ee919
......@@ -71,8 +71,8 @@
function RenewalImg() {
var str = '<div class="FillincommentsImgF">'
var center = ''
var end = `<div class="FillincommentsAdd" onclick="uploadFile">
<input type="file" accept="image/*" multiple style="opacity:0" id="upload"/>
var end = `<div class="FillincommentsAdd">
<input type="file" accept="image/*" multiple style="opacity:0" id="upload" onchange="uploadFile(event)"/>
</div>
</div>`
var textHtml = ''
......@@ -86,12 +86,7 @@
textHtml = str+center+end
$(`#FillincommentsImgF`).html(textHtml)
}
function uploadFile(){
// 获取文件输入元素
const fileInput = document.getElementById('upload');
// fileInput.click()
// 监听文件输入的变化
fileInput.addEventListener('change', function(e) {
function uploadFile(e){
for(let i=0;i<e.target.files.length;i++){
const file = e.target.files[i]; // 获取文件对象
const formData = new FormData(); // 创建FormData对象
......@@ -128,7 +123,6 @@
RenewalImg()
}, 1);
}
});
}
function clickRadio(i) {
......@@ -354,7 +348,7 @@
var fileHtml = `<h4 class="uploadProof">上传凭证</h4>
<div class="FillincommentsImgF" id="FillincommentsImgF">
<div class="FillincommentsAdd">
<input type="file" accept="image/*" multiple style="opacity:0" id="upload" onclick="uploadFile()"/>
<input type="file" accept="image/*" multiple style="opacity:0" id="upload" onchange="uploadFile(event)"/>
</div>
</div>`
var list = []
......@@ -428,9 +422,9 @@
</div>`
}
var textHtml = str + mark + singleChoice + MultipleChoice + inputText + end
if(i==(dataList.length-1)){
textHtml+=fileHtml
}
// if(i==(dataList.length-1)){
// textHtml+=fileHtml
// }
element.innerHTML = textHtml
list.push(element)
})
......
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