diff --git a/environment.yml b/environment.yml index f14bd12..b3ca7b2 100644 --- a/environment.yml +++ b/environment.yml @@ -27,6 +27,7 @@ dependencies: # Data Processing - pandas==2.3.3 # Pin DBAPI2-compatible release for current pd.read_sql flow + - pyarrow>=17.0.0,<20.0.0 # Parquet serialization for Redis DataFrame cache - openpyxl>=3.0.0 # Cache (Redis) diff --git a/frontend/src/core/reject-history-filters.js b/frontend/src/core/reject-history-filters.js index fde98d2..de7b49f 100644 --- a/frontend/src/core/reject-history-filters.js +++ b/frontend/src/core/reject-history-filters.js @@ -149,3 +149,53 @@ export function buildRejectCommonQueryParams(filters = {}, { reason = '' } = {}) } return params; } + +export function parseMultiLineInput(text) { + if (!text) return []; + const tokens = String(text) + .split(/[\n,]+/) + .map((s) => s.trim()) + .filter(Boolean) + .map((s) => s.replace(/\*/g, '%')); + const seen = new Set(); + const result = []; + for (const token of tokens) { + if (!seen.has(token)) { + seen.add(token); + result.push(token); + } + } + return result; +} + +export function buildViewParams(queryId, { + supplementaryFilters = {}, + metricFilter = 'all', + trendDates = [], + detailReason = '', + page = 1, + perPage = 50, +} = {}) { + const params = { query_id: queryId }; + if (supplementaryFilters.packages?.length > 0) { + params.packages = supplementaryFilters.packages; + } + if (supplementaryFilters.workcenterGroups?.length > 0) { + params.workcenter_groups = supplementaryFilters.workcenterGroups; + } + if (supplementaryFilters.reason) { + params.reason = supplementaryFilters.reason; + } + if (metricFilter && metricFilter !== 'all') { + params.metric_filter = metricFilter; + } + if (trendDates?.length > 0) { + params.trend_dates = trendDates; + } + if (detailReason) { + params.detail_reason = detailReason; + } + params.page = page || 1; + params.per_page = perPage || 50; + return params; +} diff --git a/frontend/src/reject-history/App.vue b/frontend/src/reject-history/App.vue index c69b26f..da079e3 100644 --- a/frontend/src/reject-history/App.vue +++ b/frontend/src/reject-history/App.vue @@ -1,11 +1,10 @@ @@ -900,16 +824,28 @@ onBeforeUnmount(() => {
更新時間:{{ lastQueryAt }}
- +
{{ errorMessage }}
-
{{ autoPruneHint }}
{ @export-csv="exportCsv" @remove-chip="removeFilterChip" @pareto-scope-toggle="handleParetoScopeToggle" + @update:query-mode="queryMode = $event" + @update:container-input-type="containerInputType = $event" + @update:container-input="containerInput = $event" + @supplementary-change="onSupplementaryChange" /> - + diff --git a/frontend/src/reject-history/components/FilterPanel.vue b/frontend/src/reject-history/components/FilterPanel.vue index 878f339..e5b4e6b 100644 --- a/frontend/src/reject-history/components/FilterPanel.vue +++ b/frontend/src/reject-history/components/FilterPanel.vue @@ -1,14 +1,39 @@