更新了模型评估页面的新建

This commit is contained in:
2026-01-22 17:29:48 +08:00
parent 1a847996c8
commit 8c89e9907f
5 changed files with 15202 additions and 43 deletions

View File

@@ -200,7 +200,7 @@
}
// 加载评测维度数据
async function loadDimensions() {
window.loadDimensions = async function() {
try {
const response = await fetch(`${API_BASE}/dimension`);
const result = await response.json();
@@ -263,30 +263,30 @@
return 'bg-gray-50 text-gray-500';
}
// 操作函数
function viewReport(id) {
// 操作函数(挂载到 window 以便 onclick 调用)
window.viewReport = function(id) {
alert('查看报告功能开发中');
}
};
function deleteTask(id) {
window.deleteTask = function(id) {
if (confirm('确定要删除此评测任务吗?')) {
alert('删除功能开发中');
}
}
};
function addDimension() {
window.addDimension = function() {
window.location.href = 'model-dimension-create.html';
}
};
function editDimension(id) {
alert('编辑维度功能开发中');
}
window.editDimension = function(id) {
window.location.href = `model-dimension-create.html?id=${id}`;
};
async function deleteDimension(id) {
window.deleteDimension = function(id) {
showConfirm('确认删除', '确定要删除此评测维度吗?', () => {
executeDelete(id);
});
}
};
async function executeDelete(id) {
try {
@@ -308,12 +308,12 @@
}
// 切换到评测维度tab
function switchToDimensionsTab() {
window.switchToDimensionsTab = function() {
const dimBtn = document.querySelector('[data-tab="dimensions"]');
if (dimBtn) {
dimBtn.click();
}
}
};
// 页面加载时初始化
async function initPage() {