add unmatched summary export options
This commit is contained in:
29
app/main.py
29
app/main.py
@@ -61,6 +61,11 @@ def index() -> str:
|
||||
<input id="preview_rows" name="preview_rows" type="number" min="5" max="200" value="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="checks">
|
||||
<label><input type="checkbox" name="include_basic_sheets" value="true" checked> \u57fa\u672c\u5de5\u4f5c\u8868</label>
|
||||
<label><input type="checkbox" name="include_unmatched_items" value="true" checked> \u672a\u5339\u914d\u68c0\u6d4b\u5185\u5bb9\u9879</label>
|
||||
<label><input type="checkbox" name="include_summary_sheet" value="true" checked> \u672a\u68c0\u6d4b\u5230\u5185\u5bb9\u6c47\u603b\u8868</label>
|
||||
</div>
|
||||
<button type="submit">\u5f00\u59cb\u5904\u7406</button>
|
||||
</form>
|
||||
<div class="note">\u9ed8\u8ba4\u8f93\u51fa\u5168\u90e8\u68c0\u6d4b\u8bb0\u5f55\uff0c\u5e76\u4fdd\u7559\u201c{UNMATCHED}\u201d\u5217\uff1b\u8be5\u5217\u4e3a\u989d\u5916\u8f85\u52a9\u4fe1\u606f\uff0c\u4fbf\u4e8e\u6838\u5bf9\u672a\u5f52\u7c7b\u9879\u76ee\u3002</div>
|
||||
@@ -76,6 +81,9 @@ async def process(
|
||||
data_type: str = Form("pat_no"),
|
||||
result_name: str = Form("Result"),
|
||||
preview_rows: int = Form(20),
|
||||
include_basic_sheets: str | None = Form(None),
|
||||
include_unmatched_items: str | None = Form(None),
|
||||
include_summary_sheet: str | None = Form(None),
|
||||
) -> str:
|
||||
if not file.filename or not file.filename.lower().endswith(".zip"):
|
||||
raise HTTPException(status_code=400, detail="\u8bf7\u4e0a\u4f20 zip \u6587\u4ef6\u3002")
|
||||
@@ -97,6 +105,9 @@ async def process(
|
||||
show_not_match=True,
|
||||
show_all_infos=True,
|
||||
preview_rows=rows,
|
||||
include_basic_sheets=include_basic_sheets == "true",
|
||||
include_unmatched_items=include_unmatched_items == "true",
|
||||
include_summary_sheet=include_summary_sheet == "true",
|
||||
)
|
||||
except ProcessingError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
@@ -308,6 +319,20 @@ def _page_shell(body: str, subtitle: str = "\u4e0a\u4f20\u201c\u5f85\u5904\u7406
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
}}
|
||||
.checks {{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 14px;
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
}}
|
||||
.checks label {{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}}
|
||||
button, .button, .small-button, .ghost {{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -414,8 +439,8 @@ def _page_shell(body: str, subtitle: str = "\u4e0a\u4f20\u201c\u5f85\u5904\u7406
|
||||
.table-wrap {{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
max-height: 620px;
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
}}
|
||||
table {{
|
||||
|
||||
Reference in New Issue
Block a user