更新外观模块

This commit is contained in:
super
2026-05-06 22:41:26 +08:00
parent c3810fdb7b
commit b746812e23
67 changed files with 13159 additions and 39501 deletions

View File

@@ -276,8 +276,8 @@ class SimilarAsinTask(TaskBase):
return list(grouped.values())
@staticmethod
def normalize_groups(data):
@staticmethod
def normalize_groups(data):
groups = data.get("groups")
if isinstance(groups, list) and len(groups) > 0:
return groups
@@ -299,18 +299,71 @@ class SimilarAsinTask(TaskBase):
"displayId": first.get("displayId") or item_id,
"items": items,
})
return normalized
return normalized
def fetch_parsed_payload(self, task_id, user_id=1):
url = f"{DELETE_BRAND_API_BASE}/api/similar-asin/tasks/{task_id}/parsed-payload"
response = requests.get(url, params={"user_id": user_id}, timeout=300, verify=False)
response.raise_for_status()
payload = response.json() if response.text else {}
if isinstance(payload, dict) and payload.get("success"):
return payload.get("data") or {}
raise RuntimeError(f"获取货源查询解析载荷失败: {payload}")
def process_task(self, task_data: dict):
@staticmethod
def _count_payload_rows(data):
rows = data.get("rows") or data.get("items") or []
if isinstance(rows, list) and rows:
return len(rows)
groups = data.get("groups") or []
if not isinstance(groups, list):
return 0
total = 0
for group in groups:
if isinstance(group, dict) and isinstance(group.get("items"), list):
total += len(group.get("items"))
return total
def _merge_parsed_payload(self, data, parsed_payload):
payload_rows = parsed_payload.get("allItems") or parsed_payload.get("items") or []
merged = {
**data,
"groups": parsed_payload.get("groups") or [],
"rows": payload_rows,
}
if parsed_payload.get("aiPrompt"):
merged["prompt"] = parsed_payload.get("aiPrompt")
if parsed_payload.get("apiKey") and not merged.get("api_key"):
merged["api_key"] = parsed_payload.get("apiKey")
return merged
def process_task(self, task_data: dict):
"""处理审批任务主入口
Args:
task_data: 任务数据
"""
try:
data = task_data.get("data", {})
task_id = data.get("taskId")
groups = self.normalize_groups(data)
data = task_data.get("data", {})
task_id = data.get("taskId")
if task_id:
queued_rows = self._count_payload_rows(data)
try:
parsed_payload = self.fetch_parsed_payload(task_id, data.get("user_id") or data.get("userId") or 1)
data = self._merge_parsed_payload(data, parsed_payload)
self.log(
f"similar asin task {task_id} loaded full parsed payload from Java, queuedRows={queued_rows}, fullRows={self._count_payload_rows(data)}"
)
except Exception as e:
if not queued_rows:
raise
self.log(
f"similar asin task {task_id} failed to load full parsed payload, fallback to queued rows={queued_rows}: {e}",
"WARNING"
)
groups = self.normalize_groups(data)
if not task_id:
self.log("任务ID为空跳过", "WARNING")
@@ -447,7 +500,7 @@ class SimilarAsinTask(TaskBase):
"""回传处理结果到API
"""
url = f"{DELETE_BRAND_API_BASE}/api/appearance-patent/tasks/{task_id}/result"
url = f"{DELETE_BRAND_API_BASE}/api/similar-asin/tasks/{task_id}/result"
payload ={
"submissionId": f"{int(time.time())}",

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
.module-page[data-v-6542ed18]{min-height:100vh;background:#1a1a1a}.main-content[data-v-6542ed18]{display:flex;height:calc(100vh - 56px);min-height:calc(100vh - 56px)}.left-panel[data-v-6542ed18]{width:400px;background:#1e1e1e;padding:20px;overflow-y:auto;border-right:1px solid #2a2a2a}.right-panel[data-v-6542ed18]{flex:1;min-width:0;background:#1a1a1a;display:flex;flex-direction:column}.section-title[data-v-6542ed18],.subsection-title[data-v-6542ed18]{font-size:13px;color:#bbb;margin-bottom:10px}.upload-zone[data-v-6542ed18]{border:1px dashed #3a3a3a;border-radius:10px;padding:18px;background:#252525;margin-bottom:18px}.hint[data-v-6542ed18],.loading-msg[data-v-6542ed18],.files[data-v-6542ed18],.muted[data-v-6542ed18]{color:#888;font-size:12px;line-height:1.5}.link[data-v-6542ed18]{color:#6ea8fe;text-decoration:none}.link[data-v-6542ed18]:hover{color:#9fc5ff}.btns[data-v-6542ed18],.run-row[data-v-6542ed18]{display:flex;gap:10px;flex-wrap:wrap}.opt-btn[data-v-6542ed18],.btn-run[data-v-6542ed18],.btn-delete[data-v-6542ed18],.download[data-v-6542ed18]{border:none;cursor:pointer;border-radius:7px}.opt-btn[data-v-6542ed18]{padding:8px 14px;color:#ccc;background:#2a2a2a;border:1px solid #3a3a3a}.btn-run[data-v-6542ed18]{padding:10px 18px;color:#fff;background:#3498db;font-weight:600}.btn-queue[data-v-6542ed18]{background:#27ae60}.btn-run[data-v-6542ed18]:disabled{opacity:.55;cursor:not-allowed}.selected-files[data-v-6542ed18]{margin-top:14px;color:#999;font-size:12px;word-break:break-all}.selected-files span[data-v-6542ed18]{display:block;margin:4px 0}.prompt-card[data-v-6542ed18]{margin-bottom:18px}.prompt-input[data-v-6542ed18]{width:100%;box-sizing:border-box;resize:vertical;min-height:180px;padding:10px 12px;border:1px solid #333;border-radius:8px;background:#202020;color:#d8d8d8;font-size:12px;line-height:1.6;outline:none}.prompt-input[data-v-6542ed18]:focus{border-color:#3498db}.prompt-default-label[data-v-6542ed18]{margin-top:10px;color:#8d8d8d;font-size:12px}.prompt-preview[data-v-6542ed18]{margin-top:10px;padding:12px;border:1px solid #2a2a2a;border-radius:8px;background:#202020;color:#9ea7b3;font-size:12px;line-height:1.6;white-space:pre-wrap}.parse-card[data-v-6542ed18],.queue-payload[data-v-6542ed18]{margin-top:14px;padding:12px;border:1px solid #2a2a2a;border-radius:8px;background:#202020;color:#b8c1cc;font-size:12px}.queue-payload[data-v-6542ed18]{max-height:220px;overflow:auto;color:#8fd3ff;white-space:pre-wrap}.panel-header[data-v-6542ed18]{padding:16px 20px;border-bottom:1px solid #2a2a2a;font-size:15px;font-weight:600;color:#ddd}.task-list-wrap[data-v-6542ed18]{flex:1;padding:16px 20px;overflow:auto}.clean-result-summary[data-v-6542ed18]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.summary-card[data-v-6542ed18]{padding:14px 16px;border:1px solid #2a2a2a;border-radius:8px;background:#1e1e1e}.summary-card strong[data-v-6542ed18]{display:block;margin-top:8px;color:#eaf4ff;font-size:22px}.summary-label[data-v-6542ed18]{color:#8d8d8d;font-size:12px}.result-list-wrap[data-v-6542ed18]{border:1px solid #2a2a2a;border-radius:8px;background:#1e1e1e;min-height:180px;margin:0 0 16px}.result-list-header[data-v-6542ed18]{display:flex;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #2a2a2a;color:#ddd;font-size:14px}.empty-tasks[data-v-6542ed18]{color:#666;font-size:13px;padding:18px;text-align:center}.result-table[data-v-6542ed18]{--el-table-bg-color: #222;--el-table-tr-bg-color: #222;--el-table-header-bg-color: #2a2a2a;--el-table-text-color: #ccc;--el-table-border-color: #333}.task-list[data-v-6542ed18]{list-style:none;margin:0;padding:12px}.task-item[data-v-6542ed18]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #2a2a2a;border-radius:8px;margin-bottom:8px;background:#222}.left[data-v-6542ed18]{flex:1;min-width:0}.id[data-v-6542ed18]{color:#e0e0e0;font-size:13px;font-weight:600}.task-right[data-v-6542ed18]{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.status[data-v-6542ed18]{padding:4px 10px;border-radius:6px;font-size:12px}.status.success[data-v-6542ed18]{background:#2ecc712e;color:#2ecc71}.status.failed[data-v-6542ed18]{background:#e74c3c2e;color:#ff6b6b}.status.running[data-v-6542ed18]{background:#3498db2e;color:#3498db}.result-hint[data-v-6542ed18]{margin-top:6px;color:#e0b96d}.download[data-v-6542ed18]{padding:6px 10px;color:#d6ecff;background:#3498db2e}.btn-delete[data-v-6542ed18]{padding:6px 10px;color:#ff8f8f;background:#e74c3c1f}@media(max-width:1100px){.main-content[data-v-6542ed18]{flex-direction:column;height:auto}.left-panel[data-v-6542ed18]{width:100%;border-right:none;border-bottom:1px solid #2a2a2a}.clean-result-summary[data-v-6542ed18]{grid-template-columns:repeat(2,minmax(0,1fr))}}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
.module-page[data-v-89575b53]{min-height:100vh;background:#1a1a1a}.main-content[data-v-89575b53]{display:flex;height:calc(100vh - 56px);min-height:calc(100vh - 56px)}.left-panel[data-v-89575b53]{width:400px;background:#1e1e1e;padding:20px;overflow-y:auto;border-right:1px solid #2a2a2a}.right-panel[data-v-89575b53]{flex:1;min-width:0;background:#1a1a1a;display:flex;flex-direction:column}.section-title[data-v-89575b53],.subsection-title[data-v-89575b53]{font-size:13px;color:#bbb;margin-bottom:10px}.upload-zone[data-v-89575b53]{border:1px dashed #3a3a3a;border-radius:10px;padding:18px;background:#252525;margin-bottom:18px}.hint[data-v-89575b53],.loading-msg[data-v-89575b53],.files[data-v-89575b53],.muted[data-v-89575b53]{color:#888;font-size:12px;line-height:1.5}.link[data-v-89575b53]{color:#6ea8fe;text-decoration:none}.link[data-v-89575b53]:hover{color:#9fc5ff}.btns[data-v-89575b53],.run-row[data-v-89575b53]{display:flex;gap:10px;flex-wrap:wrap}.opt-btn[data-v-89575b53],.btn-run[data-v-89575b53],.btn-delete[data-v-89575b53],.download[data-v-89575b53]{border:none;cursor:pointer;border-radius:7px}.opt-btn[data-v-89575b53]{padding:8px 14px;color:#ccc;background:#2a2a2a;border:1px solid #3a3a3a}.btn-run[data-v-89575b53]{padding:10px 18px;color:#fff;background:#3498db;font-weight:600}.btn-queue[data-v-89575b53]{background:#27ae60}.btn-run[data-v-89575b53]:disabled{opacity:.55;cursor:not-allowed}.selected-files[data-v-89575b53]{margin-top:14px;color:#999;font-size:12px;word-break:break-all}.selected-files span[data-v-89575b53]{display:block;margin:4px 0}.prompt-card[data-v-89575b53]{margin-bottom:18px}.prompt-input[data-v-89575b53]{width:100%;box-sizing:border-box;resize:vertical;min-height:180px;padding:10px 12px;border:1px solid #333;border-radius:8px;background:#202020;color:#d8d8d8;font-size:12px;line-height:1.6;outline:none}.prompt-input[data-v-89575b53]:focus{border-color:#3498db}.prompt-default-label[data-v-89575b53]{margin-top:10px;color:#8d8d8d;font-size:12px}.prompt-preview[data-v-89575b53]{margin-top:10px;padding:12px;border:1px solid #2a2a2a;border-radius:8px;background:#202020;color:#9ea7b3;font-size:12px;line-height:1.6;white-space:pre-wrap}.parse-card[data-v-89575b53],.queue-payload[data-v-89575b53]{margin-top:14px;padding:12px;border:1px solid #2a2a2a;border-radius:8px;background:#202020;color:#b8c1cc;font-size:12px}.queue-payload[data-v-89575b53]{max-height:220px;overflow:auto;color:#8fd3ff;white-space:pre-wrap}.panel-header[data-v-89575b53]{padding:16px 20px;border-bottom:1px solid #2a2a2a;font-size:15px;font-weight:600;color:#ddd}.task-list-wrap[data-v-89575b53]{flex:1;padding:16px 20px;overflow:auto}.clean-result-summary[data-v-89575b53]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.summary-card[data-v-89575b53]{padding:14px 16px;border:1px solid #2a2a2a;border-radius:8px;background:#1e1e1e}.summary-card strong[data-v-89575b53]{display:block;margin-top:8px;color:#eaf4ff;font-size:22px}.summary-label[data-v-89575b53]{color:#8d8d8d;font-size:12px}.result-list-wrap[data-v-89575b53]{border:1px solid #2a2a2a;border-radius:8px;background:#1e1e1e;min-height:180px;margin:0 0 16px}.result-list-header[data-v-89575b53]{display:flex;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #2a2a2a;color:#ddd;font-size:14px}.empty-tasks[data-v-89575b53]{color:#666;font-size:13px;padding:18px;text-align:center}.result-table[data-v-89575b53]{--el-table-bg-color: #222;--el-table-tr-bg-color: #222;--el-table-header-bg-color: #2a2a2a;--el-table-text-color: #ccc;--el-table-border-color: #333}.task-list[data-v-89575b53]{list-style:none;margin:0;padding:12px}.task-item[data-v-89575b53]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #2a2a2a;border-radius:8px;margin-bottom:8px;background:#222}.left[data-v-89575b53]{flex:1;min-width:0}.id[data-v-89575b53]{color:#e0e0e0;font-size:13px;font-weight:600}.task-right[data-v-89575b53]{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.status[data-v-89575b53]{padding:4px 10px;border-radius:6px;font-size:12px}.status.success[data-v-89575b53]{background:#2ecc712e;color:#2ecc71}.status.failed[data-v-89575b53]{background:#e74c3c2e;color:#ff6b6b}.status.running[data-v-89575b53]{background:#3498db2e;color:#3498db}.result-hint[data-v-89575b53]{margin-top:6px;color:#e0b96d}.download[data-v-89575b53]{padding:6px 10px;color:#d6ecff;background:#3498db2e}.btn-delete[data-v-89575b53]{padding:6px 10px;color:#ff8f8f;background:#e74c3c1f}@media(max-width:1100px){.main-content[data-v-89575b53]{flex-direction:column;height:auto}.left-panel[data-v-89575b53]{width:100%;border-right:none;border-bottom:1px solid #2a2a2a}.clean-result-summary[data-v-89575b53]{grid-template-columns:repeat(2,minmax(0,1fr))}}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{b6 as r}from"./pywebview-RBTI4RuH.js";const n="";function s(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{s as e};

View File

@@ -1 +1 @@
import{a_ as r}from"./pywebview-Cz_PRNOK.js";const n="";function a(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{a as e};
import{ba as r}from"./pywebview-C5IohfcY.js";const n="";function a(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{a as e};

View File

@@ -1 +1 @@
import{b6 as r}from"./pywebview-BcagetkZ.js";const n="";function s(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{s as e};
import{b9 as r}from"./pywebview-BIpip8XG.js";const n="";function s(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{s as e};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>格式转换 - 数富AI</title>
<script type="module" crossorigin src="/assets/convert.js"></script>
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
<link rel="modulepreload" crossorigin href="/assets/pywebview-BIpip8XG.js">
<link rel="modulepreload" crossorigin href="/assets/brand-D0euV8A2.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-DkmZpCeB.css">
<link rel="stylesheet" crossorigin href="/assets/convert-BKSNvX8i.css">
</head>
<body>

View File

@@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>数据去重 - 数富AI</title>
<script type="module" crossorigin src="/assets/dedupe.js"></script>
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
<link rel="modulepreload" crossorigin href="/assets/pywebview-BIpip8XG.js">
<link rel="modulepreload" crossorigin href="/assets/brand-D0euV8A2.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-DkmZpCeB.css">
<link rel="stylesheet" crossorigin href="/assets/dedupe-DNlVfFj-.css">
</head>
<body>

View File

@@ -5,10 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>删除品牌 - 数富AI</title>
<script type="module" crossorigin src="/assets/delete-brand.js"></script>
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
<link rel="modulepreload" crossorigin href="/assets/pywebview-BIpip8XG.js">
<link rel="modulepreload" crossorigin href="/assets/brand-D0euV8A2.js">
<link rel="modulepreload" crossorigin href="/assets/categorized-timers-JPA-olTr.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
<link rel="stylesheet" crossorigin href="/assets/pywebview-DkmZpCeB.css">
<link rel="stylesheet" crossorigin href="/assets/delete-brand-BJod9K65.css">
</head>
<body>

View File

@@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>数据拆分 - 数富AI</title>
<script type="module" crossorigin src="/assets/split.js"></script>
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
<link rel="modulepreload" crossorigin href="/assets/pywebview-BIpip8XG.js">
<link rel="modulepreload" crossorigin href="/assets/brand-D0euV8A2.js">
<link rel="stylesheet" crossorigin href="/assets/pywebview-DkmZpCeB.css">
<link rel="stylesheet" crossorigin href="/assets/split-BoBVrLdC.css">
</head>
<body>