From 9449d2583758f906dbc1351b366ccb92948d4843 Mon Sep 17 00:00:00 2001 From: user9994793890 <3722323274763196-user9994793890@noreply.coze.cn> Date: Mon, 13 Jul 2026 17:06:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=A4=9A=E4=B8=AADOM?= =?UTF-8?q?=E5=85=83=E7=B4=A0ID=E4=B8=8D=E5=8C=B9=E9=85=8D=E5=92=8C?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=87=BD=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coze-Commit-Type: user Coze-User-ID: 3722323274763196 Coze-Conversation-ID: 9894087 --- public/static/js/config.js | 18 ++++++++++++++---- public/static/js/entity.js | 8 ++++++++ public/static/js/history.js | 9 +++++++++ templates/index.html | 3 ++- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/public/static/js/config.js b/public/static/js/config.js index ef92c20..900fe8b 100644 --- a/public/static/js/config.js +++ b/public/static/js/config.js @@ -104,7 +104,7 @@ const SUMMABLE_FIELD_KEYS = [ // 渲染字段列表 function renderFields(selectedFields = [], sumFields = []) { - const fieldsList = document.getElementById('fields-list'); + const fieldsList = document.getElementById('field-list'); const sumFieldsList = document.getElementById('sum-fields-list'); fieldsList.innerHTML = allFields.map(field => { @@ -145,7 +145,7 @@ function onFieldCheckboxChange(cb) { const item = cb.closest('.checkbox-item'); if (item) item.classList.toggle('checked', cb.checked); - const fieldsList = document.getElementById('fields-list'); + const fieldsList = document.getElementById('field-list'); const checkedFields = Array.from(fieldsList.querySelectorAll('input:checked')).map(c => c.value); // 保留当前求和字段的选择状态 @@ -161,7 +161,7 @@ let fieldCustomNames = {}; // 刷新已选字段顺序列表 function refreshSelectedFieldsOrder(selectedFields, customNames = null) { - const orderGroup = document.getElementById('selected-fields-order-group'); + const orderGroup = document.getElementById('field-order-section'); const orderList = document.getElementById('selected-fields-order'); if (!orderList) return; @@ -397,7 +397,7 @@ function updateCellDisplay(hour, periodKey) { // 更新时段摘要 function updateTimePeriodSummary() { - const summaryEl = document.getElementById('tp-summary'); + const summaryEl = document.getElementById('time-period-summary'); const parts = TIME_PERIODS.map(p => { const hours = timePeriodConfig[p.key]; const count = hours.length; @@ -832,3 +832,13 @@ function setDefaultTimePeriods() { }; updateTimePeriodSummary(); } + +// 拆分方式改变时加载实体列表 +function onSplitTypeChange() { + const splitType = document.getElementById('split-type').value; + if (splitType) { + loadEntities(1, ''); + } else { + document.getElementById('entity-list').innerHTML = '
请先选择拆分方式
'; + } +} diff --git a/public/static/js/entity.js b/public/static/js/entity.js index 75d4429..6678070 100644 --- a/public/static/js/entity.js +++ b/public/static/js/entity.js @@ -171,3 +171,11 @@ function onSplitTypeChange() { selectedEntityIds.clear(); loadEntities(1, ''); } + +// 处理搜索框回车事件 +function handleSearchEnter(event) { + if (event.key === 'Enter') { + const search = document.getElementById('entity-search').value; + loadEntities(1, search); + } +} diff --git a/public/static/js/history.js b/public/static/js/history.js index 899316f..0b5268d 100644 --- a/public/static/js/history.js +++ b/public/static/js/history.js @@ -222,3 +222,12 @@ async function loadHistoryWithDate(page, startDate, endDate) { // 初始化 loadConfigs(); loadFields(); + +// 全选/取消全选历史记录 +function toggleSelectAllHistory() { + const selectAllCheckbox = document.getElementById('select-all-history'); + const checkboxes = document.querySelectorAll('#history-list input[type="checkbox"]'); + checkboxes.forEach(cb => { + cb.checked = selectAllCheckbox.checked; + }); +} diff --git a/templates/index.html b/templates/index.html index fa7ac00..1af98d8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -195,7 +195,8 @@ -
+
+