feat: 增加位置字段
This commit is contained in:
@@ -174,25 +174,42 @@
|
||||
// Timestamp
|
||||
row.insertCell(4).textContent = new Date(image.timestamp * 1000).toISOString();
|
||||
|
||||
// Comment
|
||||
const commentCell = row.insertCell(5);
|
||||
const commentInput = document.createElement('input');
|
||||
commentInput.type = 'text';
|
||||
commentInput.value = image.comment || '';
|
||||
commentInput.dataset.id = image.id;
|
||||
commentInput.className = 'comment-input';
|
||||
commentInput.style.width = '100%';
|
||||
commentInput.addEventListener('change', function () {
|
||||
updateComment(image.id, this.value);
|
||||
});
|
||||
commentCell.appendChild(commentInput);
|
||||
|
||||
// 评论
|
||||
row += `<td><input type="text" id="comment-${image.id}" value="${image.comment}" onchange="updateComment(${image.id})"></td>`;
|
||||
// Actions
|
||||
row.insertCell(6).innerHTML = `
|
||||
<button onclick="deleteImage(${image.id})">Delete</button>
|
||||
<button onclick="window.open('/manual-annotation?id=${image.id}&side=left', '_blank')">LBL</button>
|
||||
<button onclick="window.open('/manual-annotation?id=${image.id}&side=right', '_blank')">LBR</button>
|
||||
`;
|
||||
row += `<td>
|
||||
<button onclick="deleteImage(${image.id})">删除</button>
|
||||
<button onclick="manualLabelLeft(${image.id})">人工标注 (左)</button>
|
||||
<button onclick="manualLabelRight(${image.id})">人工标注 (右)</button>
|
||||
<!-- 添加位置编号下拉框 -->
|
||||
<label>左:</label>
|
||||
<select id="left-position-${image.id}" onchange="updatePosition(${image.id})">
|
||||
<option value="0" ${image.left_position == 0 ? 'selected' : ''}>未设置</option>
|
||||
<option value="1" ${image.left_position == 1 ? 'selected' : ''}>1</option>
|
||||
<option value="2" ${image.left_position == 2 ? 'selected' : ''}>2</option>
|
||||
<option value="3" ${image.left_position == 3 ? 'selected' : ''}>3</option>
|
||||
<option value="4" ${image.left_position == 4 ? 'selected' : ''}>4</option>
|
||||
<option value="5" ${image.left_position == 5 ? 'selected' : ''}>5</option>
|
||||
<option value="6" ${image.left_position == 6 ? 'selected' : ''}>6</option>
|
||||
<option value="7" ${image.left_position == 7 ? 'selected' : ''}>7</option>
|
||||
<option value="8" ${image.left_position == 8 ? 'selected' : ''}>8</option>
|
||||
<option value="9" ${image.left_position == 9 ? 'selected' : ''}>9</option>
|
||||
</select>
|
||||
<label>右:</label>
|
||||
<select id="right-position-${image.id}" onchange="updatePosition(${image.id})">
|
||||
<option value="0" ${image.right_position == 0 ? 'selected' : ''}>未设置</option>
|
||||
<option value="1" ${image.right_position == 1 ? 'selected' : ''}>1</option>
|
||||
<option value="2" ${image.right_position == 2 ? 'selected' : ''}>2</option>
|
||||
<option value="3" ${image.right_position == 3 ? 'selected' : ''}>3</option>
|
||||
<option value="4" ${image.right_position == 4 ? 'selected' : ''}>4</option>
|
||||
<option value="5" ${image.right_position == 5 ? 'selected' : ''}>5</option>
|
||||
<option value="6" ${image.right_position == 6 ? 'selected' : ''}>6</option>
|
||||
<option value="7" ${image.right_position == 7 ? 'selected' : ''}>7</option>
|
||||
<option value="8" ${image.right_position == 8 ? 'selected' : ''}>8</option>
|
||||
<option value="9" ${image.right_position == 9 ? 'selected' : ''}>9</option>
|
||||
</select>
|
||||
</td>`;
|
||||
row += '</tr>';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user