This commit is contained in:
parent
1714cf275e
commit
cea21a3d2c
|
|
@ -241,7 +241,7 @@
|
||||||
innerHtml += `<div style="padding:6px 0;display: flex; align-items: center;">
|
innerHtml += `<div style="padding:6px 0;display: flex; align-items: center;">
|
||||||
<div style="margin-right: 10px;width: 200px";>${e.title}</div>
|
<div style="margin-right: 10px;width: 200px";>${e.title}</div>
|
||||||
<input type="text" data-id="${dialogLabelInfo[index].field}" id="numberInput" name="numberInput" min="0.01" step="0.01" placeholder="请输入大于0的数字" style=";width:180px; padding:1px 5px;" value="${tableList[rowIndex][dialogLabelInfo[index].field]}">
|
<input type="text" data-id="${dialogLabelInfo[index].field}" id="numberInput" name="numberInput" min="0.01" step="0.01" placeholder="请输入大于0的数字" style=";width:180px; padding:1px 5px;" value="${tableList[rowIndex][dialogLabelInfo[index].field]}">
|
||||||
<button type="button" class="uploadBtn" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;">
|
<button type="button" data-index="${index}" class="uploadBtn" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;">
|
||||||
+ 上传评分依据
|
+ 上传评分依据
|
||||||
</button>
|
</button>
|
||||||
</div>`
|
</div>`
|
||||||
|
|
@ -282,6 +282,16 @@
|
||||||
// 上传完毕回调
|
// 上传完毕回调
|
||||||
console.log('文件上传成功');
|
console.log('文件上传成功');
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
|
var dataIndex = $(this.elem).data('index');
|
||||||
|
console.log('当前按钮的 data-index:', dataIndex);
|
||||||
|
|
||||||
|
// 隐藏当前上传按钮
|
||||||
|
$(this.elem).hide();
|
||||||
|
|
||||||
|
// 插入新的 DOM 元素,例如:显示上传成功的消息或其他操作
|
||||||
|
var newDom = $(`<div class="upload-success">${res.obj}</div>`);
|
||||||
|
$(this.elem).parent().append(newDom);
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
// 请求异常回调
|
// 请求异常回调
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue