更新新增三个模块
This commit is contained in:
Binary file not shown.
Binary file not shown.
1
app/assets/convert-B191qXN9.css
Normal file
1
app/assets/convert-B191qXN9.css
Normal file
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
1
app/assets/dedupe-BKyfmsjj.css
Normal file
1
app/assets/dedupe-BKyfmsjj.css
Normal file
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
1
app/assets/split-CYvQPVKL.css
Normal file
1
app/assets/split-CYvQPVKL.css
Normal file
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
Binary file not shown.
@@ -57,14 +57,23 @@ def _push_task_event(task_id, event):
|
||||
|
||||
|
||||
def _expand_folder_xlsx(folder_path):
|
||||
"""返回文件夹下所有 .xlsx 文件的绝对路径列表"""
|
||||
"""返回文件夹下所有 .xlsx 文件的绝对路径和相对路径列表(递归)"""
|
||||
if not folder_path or not os.path.isdir(folder_path):
|
||||
return []
|
||||
paths = []
|
||||
for name in os.listdir(folder_path):
|
||||
if name.endswith('.xlsx') or name.endswith('.XLSX'):
|
||||
paths.append(os.path.normpath(os.path.join(folder_path, name)))
|
||||
return paths
|
||||
items = []
|
||||
root = os.path.normpath(folder_path)
|
||||
for current_root, _, filenames in os.walk(root):
|
||||
for name in filenames:
|
||||
if not (name.endswith('.xlsx') or name.endswith('.XLSX')):
|
||||
continue
|
||||
absolute_path = os.path.normpath(os.path.join(current_root, name))
|
||||
relative_path = os.path.relpath(absolute_path, root).replace('\\', '/')
|
||||
items.append({
|
||||
'absolutePath': absolute_path,
|
||||
'relativePath': relative_path,
|
||||
})
|
||||
items.sort(key=lambda item: item['relativePath'])
|
||||
return items
|
||||
|
||||
|
||||
def _upload_local_xlsx_to_oss(local_path, user_id):
|
||||
@@ -478,8 +487,8 @@ def api_brand_expand_folder():
|
||||
folder = (data.get('folder') or '').strip()
|
||||
if not folder:
|
||||
return jsonify({'success': False, 'error': '请提供 folder 路径'}), 400
|
||||
paths = _expand_folder_xlsx(folder)
|
||||
return jsonify({'success': True, 'paths': paths})
|
||||
items = _expand_folder_xlsx(folder)
|
||||
return jsonify({'success': True, 'items': items})
|
||||
except Exception as e:
|
||||
return jsonify({'success': False, 'error': str(e)}), 500
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ class WindowAPI:
|
||||
)
|
||||
return result[0] if result else ''
|
||||
|
||||
def upload_file_to_java(self, file_path):
|
||||
def upload_file_to_java(self, file_path, relative_path=None):
|
||||
"""按本地路径读取文件并上传到 Java 后端临时目录。"""
|
||||
if not file_path or not str(file_path).strip():
|
||||
return {'success': False, 'error': '文件路径为空'}
|
||||
@@ -157,6 +157,7 @@ class WindowAPI:
|
||||
response = requests.post(
|
||||
f"{JAVA_API_BASE}/api/files/upload",
|
||||
files={'file': (os.path.basename(normalized_path), file_obj)},
|
||||
data={'relativePath': str(relative_path).strip()} if relative_path else None,
|
||||
timeout=120,
|
||||
)
|
||||
response.raise_for_status()
|
||||
|
||||
@@ -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-Rm5Hhqpf.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Chz98E9c.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/convert-D4Yv2oRy.css">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-DVgP2-kW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-IqgMfeBe.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/convert-B191qXN9.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -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-Rm5Hhqpf.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Chz98E9c.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/dedupe-BHE_BCAJ.css">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-DVgP2-kW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-IqgMfeBe.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/dedupe-BKyfmsjj.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -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-Rm5Hhqpf.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Chz98E9c.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/split-_O6NHqDj.css">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-DVgP2-kW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-IqgMfeBe.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/split-CYvQPVKL.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user