This commit is contained in:
parent
aee826b9a6
commit
fcfc07359d
|
|
@ -247,7 +247,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" data-index="${index}" class="uploadBtn" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;">
|
<button type="button" data-index="${index}" class="uploadBtn" id="uploadBtn${index}" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;">
|
||||||
+ 上传评分依据
|
+ 上传评分依据
|
||||||
</button>
|
</button>
|
||||||
</div>`
|
</div>`
|
||||||
|
|
@ -293,7 +293,9 @@
|
||||||
console.log('当前按钮的 data-index:', dataIndex);
|
console.log('当前按钮的 data-index:', dataIndex);
|
||||||
|
|
||||||
// 隐藏当前上传按钮
|
// 隐藏当前上传按钮
|
||||||
$(this.elem).hide();
|
// $(this.elem).hide();
|
||||||
|
|
||||||
|
$(`#uploadBtn${dataIndex}`).hide()
|
||||||
|
|
||||||
// 插入新的 DOM 元素,例如:显示上传成功的消息或其他操作
|
// 插入新的 DOM 元素,例如:显示上传成功的消息或其他操作
|
||||||
var newDom = $(`<div class="upload-success">${res.message}<i data-index="${dataIndex}" class="layui-icon" style="font-size: 18px; color: red; cursor: pointer;"></i> </div>`);
|
var newDom = $(`<div class="upload-success">${res.message}<i data-index="${dataIndex}" class="layui-icon" style="font-size: 18px; color: red; cursor: pointer;"></i> </div>`);
|
||||||
|
|
@ -374,8 +376,10 @@
|
||||||
var dataIndex = $(this).data('index');
|
var dataIndex = $(this).data('index');
|
||||||
console.log('删除图标被点击,data-index:', dataIndex);
|
console.log('删除图标被点击,data-index:', dataIndex);
|
||||||
|
|
||||||
|
|
||||||
// 执行删除操作
|
// 执行删除操作
|
||||||
$(this).parent().remove(); // 移除 .upload-success 容器,包含该 i 标签
|
$(this).parent().remove()
|
||||||
|
$(`#uploadBtn${dataIndex}`).show()
|
||||||
});
|
});
|
||||||
tableLoading && layer.close(tableLoading);
|
tableLoading && layer.close(tableLoading);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue