This commit is contained in:
parent
9d197bbc23
commit
11aec6b395
|
|
@ -234,7 +234,7 @@ function initTable() {
|
||||||
if (title.indexOf("查看") !== -1) {
|
if (title.indexOf("查看") !== -1) {
|
||||||
layer.open(layerOptions);
|
layer.open(layerOptions);
|
||||||
} else {
|
} else {
|
||||||
layerOptions.btn = ["确定"];
|
layerOptions.btn = ["确定提交"];
|
||||||
layerOptions.yes = function (index, layero) {
|
layerOptions.yes = function (index, layero) {
|
||||||
//提交子页面时执行
|
//提交子页面时执行
|
||||||
// 获取弹出层中的form表单元素
|
// 获取弹出层中的form表单元素
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,12 @@
|
||||||
|
|
||||||
// // 将fileDom添加到当前单元格
|
// // 将fileDom添加到当前单元格
|
||||||
// $(this).append(fileDom);
|
// $(this).append(fileDom);
|
||||||
|
|
||||||
|
let dataId = $(this).data('field')
|
||||||
|
|
||||||
|
if (`${dataId}-file` && `${dataId}-file`.fileName) {
|
||||||
|
$(this).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b" style="margin-right:6px"></i> `)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index === cols.length - 1) {
|
if (index === cols.length - 1) {
|
||||||
|
|
@ -256,14 +262,19 @@
|
||||||
const curRows = tableRowList[rowIndex]
|
const curRows = tableRowList[rowIndex]
|
||||||
dialogLabelList.forEach((e, index) => {
|
dialogLabelList.forEach((e, index) => {
|
||||||
// fileList.push('')
|
// fileList.push('')
|
||||||
|
|
||||||
|
isFile = null
|
||||||
|
if (curRows[`${dialogLabelInfo[index].field}-file`]) {
|
||||||
|
isFile = curRows[`${dialogLabelInfo[index].field}-file`]
|
||||||
|
}
|
||||||
uploadDom.push('#uploadBtn' + index)
|
uploadDom.push('#uploadBtn' + index)
|
||||||
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="${curRows[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="${curRows[dialogLabelInfo[index].field]}">
|
||||||
<button type="button" data-index="${index}" data-id="${dialogLabelInfo[index].field}" id="uploadBtn${index}" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;">
|
<button type="button" data-index="${index}" data-id="${dialogLabelInfo[index].field}" id="uploadBtn${index}" style="color: #4CAF50; border: none; margin-left: 10px; cursor: pointer;display:${isFile ? 'none' : 'block'}">
|
||||||
+ 上传评分依据
|
+ 上传评分依据
|
||||||
</button>
|
</button>
|
||||||
<div class="upload-success" id="upload-success_${index}" style="display:none"><i data-index="${rowIndex}" data-id="${dialogLabelInfo[index].field}" data-idx="${index}" class="layui-icon" style="font-size: 18px; color: red; cursor: pointer;"></i> </div>
|
<div class="upload-success" id="upload-success_${index}" style="display:${isFile ? 'block' : 'none'}">${isFile ? isFile.fileName : ''}<i data-index="${rowIndex}" data-id="${dialogLabelInfo[index].field}" data-idx="${index}" class="layui-icon" style="font-size: 18px; color: red; cursor: pointer;"></i> </div>
|
||||||
</div>`
|
</div>`
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue