wip feat(M01): 기계 구분·상세구분 2단 거름 · 소요량/계수 용도 표시·대상 거름

기계.json 머리 구분 딕셔너리 추가(세부분류 유지) · UI_Side 기계 2단 필터
Store/Router/Api_Fetch usage 쿼리 추가 · UI_Tables 용도 표시 + 대상 드롭다운
locale 문구 추가 · 관련 시험 수정·추가
This commit is contained in:
2026-09-20 22:41:35 +09:00
parent 6993c6b95e
commit 4ca903ea05
9 changed files with 157 additions and 22 deletions
+8 -4
View File
@@ -130,7 +130,7 @@ _STATES = ("공표", "산정", "미공표", "미확보", "추정") # 인력 「
def subs(file: str = "", group: str = "") -> dict:
"""하위 거름 목록 — 한 테이블 파일은 머리 묶음(인력 「구분」 · 기계 「세부분류」) ·
"""하위 거름 목록 — 한 테이블 파일은 머리 묶음(인력 · 기계 모두 「구분」 → 「상세구분」) ·
장 그룹(소요량 · 계수 · 로직)은 장 파일에서 모음(구분 = 원문 + 부문 · 상세구분 = 장 · 차례대로)."""
if group:
if group not in cm.mf.GROUPS:
@@ -184,9 +184,9 @@ def rows(
) -> dict:
data, version = read(file)
hits = [r for r in data.get(items_key(data)) or [] if _hit(r, q)]
if sub: # 인력 구분 · 기계 세부분류
if sub: # 인력·기계 구분 (세부분류는 남은 옛 화면 호출 대비)
hits = [r for r in hits if sub in (r.get("구분"), r.get("세부분류"))]
if detail: # 인력 상세구분
if detail: # 인력 상세구분 · 기계 상세구분(기종)
hits = [r for r in hits if r.get("상세구분") == detail]
if state: # 인력 상태
hits = [r for r in hits if r.get("상태") == state]
@@ -227,8 +227,10 @@ def tables(
q: str = "",
page: int = 1,
size: int = 30,
usage: str = "",
) -> dict:
"""표 목록 — 파일 하나 또는 그룹 전체(구분 · 상세구분 · 찾기로 거름 · 장 차례대로 · 쪽 나눔)."""
"""표 목록 — 파일 하나 또는 그룹 전체(구분 · 상세구분 · 용도 대상 · 찾기로 거름 · 장 차례대로 · 쪽 나눔).
`usage` = 용도.대상(인력 · 기계 · 재료 · 할증 · 환산 · 작업량 조건) 하나."""
if file:
names = [file]
elif group in cm.mf.TABLE_GROUPS:
@@ -245,6 +247,8 @@ def tables(
continue
if detail and t.get("상세구분") != detail:
continue
if usage and usage not in ((t.get("용도") or {}).get("대상") or []):
continue
if _hit(t, q):
hits.append(
{