Merge branch 'master' of https://gitee.com/TeaCodeNice/crawler-plugin
This commit is contained in:
15
app/.env
15
app/.env
@@ -1,13 +1,14 @@
|
||||
base_url=http://159.75.121.33:15124
|
||||
base_url=http://8.136.19.173:15124
|
||||
workflow_id=7608812635877900322
|
||||
mysql_host=159.75.121.33
|
||||
mysql_user=AIimage
|
||||
mysql_host=8.136.19.173
|
||||
mysql_user=aiimage
|
||||
|
||||
proxy_url=https://api.jikip.com/ip-get?num=1&minute=1&format=json&area=all&protocol=1&mode=2&key=r4m8dov52giup2o
|
||||
proxy_url=https://api.jikip.com/ip-get?num=1&minute=1&format=json&area=all&protocol=1&mode=2&key=t24g6gi44ubufd8
|
||||
proxy_mode=2
|
||||
|
||||
client_name=NanriAI
|
||||
# java_api_base=http://8.136.19.173:18080
|
||||
java_api_base=http://127.0.0.1:18080
|
||||
client_name=ShuFuAI
|
||||
|
||||
|
||||
java_api_base=http://8.136.19.173:18080
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ def upload_file(file_content: bytes, key: str):
|
||||
cfg.credentials_provider = credentials_provider
|
||||
cfg.region = region
|
||||
cfg.endpoint = endpoint
|
||||
cfg.retry_max_attempts = 3
|
||||
client = oss.Client(cfg)
|
||||
|
||||
result = client.put_object(
|
||||
|
||||
16
app/app.py
16
app/app.py
@@ -15,13 +15,24 @@ from blueprints.main import main_bp
|
||||
from blueprints.admin import admin_bp
|
||||
from blueprints.image import image_bp
|
||||
from blueprints.brand import brand_bp
|
||||
from blueprints.communication import communication_bp
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__, template_folder=BASE_DIR, static_folder=BASE_DIR)
|
||||
CORS(app)
|
||||
app.secret_key = os.environ.get('SECRET_KEY', secrets.token_hex(32))
|
||||
frontend_origin = os.environ.get('FRONTEND_ORIGIN', '*')
|
||||
cors_origins = frontend_origin if frontend_origin != '*' else '*'
|
||||
CORS(
|
||||
app,
|
||||
supports_credentials=True,
|
||||
resources={r"/api/*": {"origins": cors_origins}, r"/login": {"origins": cors_origins}},
|
||||
)
|
||||
# 生产环境必须通过环境变量注入固定 SECRET_KEY;否则服务重启会使旧会话失效。
|
||||
app.secret_key = os.environ.get('SECRET_KEY', 'dev-secret-key-change-me')
|
||||
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=7)
|
||||
app.config['SESSION_COOKIE_HTTPONLY'] = True
|
||||
app.config['SESSION_COOKIE_SAMESITE'] = os.environ.get('SESSION_COOKIE_SAMESITE', 'Lax')
|
||||
app.config['SESSION_COOKIE_SECURE'] = os.environ.get('SESSION_COOKIE_SECURE', '0') == '1'
|
||||
|
||||
# 注册蓝图(不设 url_prefix,保持原有 URL 路径不变,前端无需改动)
|
||||
app.register_blueprint(auth_bp)
|
||||
@@ -29,6 +40,7 @@ def create_app():
|
||||
app.register_blueprint(admin_bp)
|
||||
app.register_blueprint(image_bp)
|
||||
app.register_blueprint(brand_bp)
|
||||
app.register_blueprint(communication_bp)
|
||||
|
||||
return app
|
||||
|
||||
|
||||
BIN
app/blueprints/__pycache__/communication.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/communication.cpython-39.pyc
Normal file
Binary file not shown.
@@ -1,18 +1,67 @@
|
||||
from queue import Empty
|
||||
import threading
|
||||
import time
|
||||
from queue import Empty, Full
|
||||
|
||||
from flask import Blueprint, jsonify
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
||||
from config import JSON_TASK_QUEUE
|
||||
|
||||
|
||||
communication_bp = Blueprint('communication', __name__)
|
||||
|
||||
_del_brand_cache = {}
|
||||
_del_brand_cache_lock = threading.Lock()
|
||||
_latest_del_brand_item = None
|
||||
_latest_del_brand_ts = 0.0
|
||||
|
||||
|
||||
def _resolve_request_id():
|
||||
rid = request.args.get('id')
|
||||
if rid is not None and str(rid).strip() != '':
|
||||
return str(rid)
|
||||
if request.method == 'POST':
|
||||
body = request.get_json(silent=True) or {}
|
||||
rid = body.get('id')
|
||||
if rid is not None and str(rid).strip() != '':
|
||||
return str(rid)
|
||||
return None
|
||||
|
||||
|
||||
@communication_bp.route('/api/amazon/del_brand', methods=['GET', 'POST'])
|
||||
def del_brand():
|
||||
"""返回队列中的一个元素;队列为空时返回空提示。"""
|
||||
"""返回队列中的一个元素;同一 id 重复请求返回已缓存的同一元素;2分钟内不同 id 也返回最近元素。"""
|
||||
global _latest_del_brand_item, _latest_del_brand_ts
|
||||
request_id = _resolve_request_id()
|
||||
if not request_id:
|
||||
return jsonify({'success': False, 'message': '缺少参数 id', 'data': None}), 400
|
||||
|
||||
with _del_brand_cache_lock:
|
||||
if request_id in _del_brand_cache:
|
||||
item = _del_brand_cache[request_id]
|
||||
print("【删除品牌】缓存命中", request_id, item)
|
||||
return jsonify({'success': True, 'data': item})
|
||||
if _latest_del_brand_item is not None and (time.time() - _latest_del_brand_ts) <= 120:
|
||||
_del_brand_cache[request_id] = _latest_del_brand_item
|
||||
print("【删除品牌】2分钟窗口命中", request_id, _latest_del_brand_item)
|
||||
return jsonify({'success': True, 'data': _latest_del_brand_item})
|
||||
|
||||
try:
|
||||
item = JSON_TASK_QUEUE.get_nowait()
|
||||
return jsonify({'success': True, 'data': item})
|
||||
except Empty:
|
||||
print("队列为空")
|
||||
return jsonify({'success': False, 'message': '队列为空', 'data': None})
|
||||
|
||||
with _del_brand_cache_lock:
|
||||
if request_id in _del_brand_cache:
|
||||
try:
|
||||
JSON_TASK_QUEUE.put_nowait(item)
|
||||
except Full:
|
||||
print("【删除品牌】队列已满,无法归还重复拉取的任务")
|
||||
item = _del_brand_cache[request_id]
|
||||
print("【删除品牌】并发归并", request_id, item)
|
||||
return jsonify({'success': True, 'data': item})
|
||||
_del_brand_cache[request_id] = item
|
||||
_latest_del_brand_item = item
|
||||
_latest_del_brand_ts = time.time()
|
||||
print("【删除品牌】返回任务数据", item)
|
||||
return jsonify({'success': True, 'data': item})
|
||||
|
||||
Binary file not shown.
@@ -18,9 +18,9 @@ proxy_url = os.getenv("proxy_url")
|
||||
proxy_mode = int(os.getenv("proxy_mode",1))
|
||||
|
||||
client_name=os.getenv("client_name") + ".exe"
|
||||
# JAVA_API_BASE = os.getenv("java_api_base", "http://8.136.19.173:18080")
|
||||
JAVA_API_BASE = os.getenv("java_api_base", "http://127.0.0.1:18080")
|
||||
|
||||
|
||||
cache_path = "./user_data"
|
||||
|
||||
region = "cn-hangzhou"
|
||||
@@ -39,8 +39,8 @@ os.environ['OSS_ACCESS_KEY_SECRET'] = accessKeySecret
|
||||
os.environ['SECRET_KEY'] = "ddffc7c1d02121d9554d7b080b2511b6"
|
||||
|
||||
|
||||
debug = True
|
||||
version = "1.0.13"
|
||||
debug = False
|
||||
version = "1.0.22"
|
||||
APP_UPDATE_URL = f"{_base_url}/api/version/latest" # 检测更新接口地址,返回 { "file_url": "...", "version": "x.x.x" }
|
||||
os.environ['APP_VERSION'] = version
|
||||
os.environ['APP_UPDATE_URL'] = APP_UPDATE_URL
|
||||
|
||||
@@ -237,6 +237,9 @@ class WindowAPI:
|
||||
def enqueue_json(self, data):
|
||||
"""保存任务到队列"""
|
||||
try:
|
||||
print("==============================")
|
||||
print(datetime.datetime.now().strftime( "%Y-%m-%d %H:%M:%S"),"调用传入",data)
|
||||
print("==================================")
|
||||
payload = data
|
||||
if isinstance(data, str):
|
||||
payload = json.loads(data)
|
||||
@@ -349,7 +352,7 @@ def main():
|
||||
window.expose(api.close, api.minimize, api.maximize, api.toggle_maximize, generate_images, api.save_image, api.save_image_to_folder, api.select_folder, api.select_brand_xlsx_files, api.select_brand_folder,
|
||||
api.save_file_from_url, api.save_template_xlsx,api.save_template_zip,api.upload_file_to_java,api.enqueue_json)
|
||||
webview.start(
|
||||
debug=True,
|
||||
debug=False,
|
||||
storage_path=cache_path,
|
||||
private_mode=False
|
||||
)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 3.9 MiB |
Binary file not shown.
@@ -1,17 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>亚马逊 - 南日AI</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: "Microsoft YaHei", "Noto Serif SC", "SimSun", "Songti SC", "Times New Roman", serif;
|
||||
background: rgba(13, 13, 13, 1);
|
||||
@@ -20,7 +14,6 @@
|
||||
height: 100vh;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
@@ -29,19 +22,12 @@
|
||||
padding: 0 16px;
|
||||
border-bottom: 1px solid #2a2a2a;
|
||||
}
|
||||
|
||||
.logo-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.top-bar .app-name {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top-bar .app-name { font-size: 18px; font-weight: 600; color: #fff; }
|
||||
.btn-home {
|
||||
font-size: 13px;
|
||||
color: #999;
|
||||
@@ -50,11 +36,7 @@
|
||||
border-radius: 6px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-home:hover {
|
||||
color: #fff;
|
||||
background: #2a2a2a;
|
||||
}
|
||||
.btn-home:hover { color: #fff; background: #2a2a2a; }
|
||||
|
||||
/* 顶部栏目导航(容器化,便于后续增加栏目) */
|
||||
.nav-tabs {
|
||||
@@ -62,7 +44,6 @@
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.nav-tab-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -70,7 +51,6 @@
|
||||
background: rgba(77, 72, 72, 0.99);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.nav-tab-sep {
|
||||
width: 1px;
|
||||
height: 20px;
|
||||
@@ -79,7 +59,6 @@
|
||||
flex-shrink: 0;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.nav-tab {
|
||||
padding: 8px 14px;
|
||||
font-size: 13px;
|
||||
@@ -90,17 +69,14 @@
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.nav-tab:hover {
|
||||
color: #fff;
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
.nav-tab.active {
|
||||
color: #3498db;
|
||||
background: rgba(52, 152, 219, 0.2);
|
||||
}
|
||||
|
||||
.top-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -111,7 +87,6 @@
|
||||
display: flex;
|
||||
height: calc(100vh - 56px);
|
||||
}
|
||||
|
||||
/* 栏目内容容器:每个栏目一个 .tab-panel,通过 data-panel 与导航对应 */
|
||||
.tab-panel {
|
||||
display: none;
|
||||
@@ -119,11 +94,9 @@
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.tab-panel.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 380px;
|
||||
background: #1e1e1e;
|
||||
@@ -131,7 +104,6 @@
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid #2a2a2a;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -139,13 +111,11 @@
|
||||
min-width: 0;
|
||||
background: #1a1a1a;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 13px;
|
||||
color: #bbb;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.upload-zone {
|
||||
border: 1px dashed #3a3a3a;
|
||||
border-radius: 10px;
|
||||
@@ -155,25 +125,9 @@
|
||||
margin-bottom: 20px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.upload-zone:hover {
|
||||
border-color: #3498db;
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
.upload-zone .hint {
|
||||
color: #888;
|
||||
font-size: 13px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.upload-zone .btns {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.upload-zone:hover { border-color: #3498db; background: #2a2a2a; }
|
||||
.upload-zone .hint { color: #888; font-size: 13px; margin-bottom: 12px; }
|
||||
.upload-zone .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
|
||||
.opt-btn {
|
||||
padding: 8px 16px;
|
||||
font-size: 13px;
|
||||
@@ -184,14 +138,7 @@
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.opt-btn:hover {
|
||||
color: #fff;
|
||||
background: #333;
|
||||
border-color: #3498db;
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.opt-btn:hover { color: #fff; background: #333; border-color: #3498db; color: #3498db; }
|
||||
.selected-files {
|
||||
margin-top: 12px;
|
||||
font-size: 12px;
|
||||
@@ -199,17 +146,8 @@
|
||||
max-height: 72px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.selected-files span {
|
||||
display: block;
|
||||
margin: 4px 0;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.option-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.selected-files span { display: block; margin: 4px 0; word-break: break-all; }
|
||||
.option-group { margin-bottom: 20px; }
|
||||
.radio-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -221,35 +159,16 @@
|
||||
border: 1px solid #2a2a2a;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.radio-item:hover {
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
.radio-item input {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.radio-item .label {
|
||||
font-weight: 500;
|
||||
color: #e0e0e0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.radio-item .desc {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 2px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.radio-item:hover { background: #2a2a2a; }
|
||||
.radio-item input { margin-top: 3px; }
|
||||
.radio-item .label { font-weight: 500; color: #e0e0e0; font-size: 13px; }
|
||||
.radio-item .desc { font-size: 12px; color: #888; margin-top: 2px; font-weight: normal; }
|
||||
.run-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.btn-run {
|
||||
padding: 10px 22px;
|
||||
background: #3498db;
|
||||
@@ -260,21 +179,9 @@
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-run:hover {
|
||||
background: #2980b9;
|
||||
}
|
||||
|
||||
.btn-run:disabled {
|
||||
background: #555;
|
||||
cursor: not-allowed;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.loading-msg {
|
||||
color: #3498db;
|
||||
font-size: 13px;
|
||||
}
|
||||
.btn-run:hover { background: #2980b9; }
|
||||
.btn-run:disabled { background: #555; cursor: not-allowed; color: #999; }
|
||||
.loading-msg { color: #3498db; font-size: 13px; }
|
||||
|
||||
.template-download-row {
|
||||
margin-top: 16px;
|
||||
@@ -288,22 +195,16 @@
|
||||
transition: all 0.25s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.template-download-row:hover {
|
||||
border-color: #2e7d32;
|
||||
background: linear-gradient(135deg, #2a2a2a 0%, #243324 100%);
|
||||
box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
|
||||
}
|
||||
|
||||
.template-download-row:hover .template-download-text .title {
|
||||
color: #2ecc71;
|
||||
}
|
||||
|
||||
.template-download-row:hover .template-download-text .title { color: #2ecc71; }
|
||||
.template-download-row:hover .template-download-icon {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 6px 16px rgba(46, 125, 50, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
|
||||
}
|
||||
|
||||
.template-download-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
@@ -316,25 +217,12 @@
|
||||
box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.template-download-icon svg {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.template-download-text .title {
|
||||
font-size: 14px;
|
||||
color: #e0e0e0;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.template-download-text .hint {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 2px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.template-download-text .title { font-size: 14px; color: #e0e0e0; font-weight: 600; display: block; }
|
||||
.template-download-text .hint { font-size: 12px; color: #888; margin-top: 2px; font-weight: normal; }
|
||||
|
||||
.panel-header {
|
||||
padding: 16px 20px;
|
||||
@@ -347,11 +235,9 @@
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-header-title {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-refresh-tasks {
|
||||
padding: 6px 14px;
|
||||
font-size: 12px;
|
||||
@@ -363,23 +249,17 @@
|
||||
transition: all 0.2s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-refresh-tasks:hover {
|
||||
background: #333;
|
||||
border-color: #3498db;
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.task-list-wrap {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.task-list {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.task-list { list-style: none; }
|
||||
.task-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -390,155 +270,38 @@
|
||||
margin-bottom: 10px;
|
||||
background: #1e1e1e;
|
||||
}
|
||||
|
||||
.task-item .left {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.task-item .id {
|
||||
font-weight: 600;
|
||||
color: #e0e0e0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.task-item .files {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.task-item .time {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.task-item .left { flex: 1; min-width: 0; }
|
||||
.task-item .id { font-weight: 600; color: #e0e0e0; font-size: 13px; }
|
||||
.task-item .files { font-size: 12px; color: #888; margin-top: 4px; }
|
||||
.task-item .time { font-size: 12px; color: #666; margin-top: 2px; }
|
||||
.task-item .status {
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.task-item .status.pending {
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
color: #d4a500;
|
||||
}
|
||||
|
||||
.task-item .status.running {
|
||||
background: rgba(52, 152, 219, 0.2);
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.task-item .status.success {
|
||||
background: rgba(46, 204, 113, 0.2);
|
||||
color: #2ecc71;
|
||||
}
|
||||
|
||||
.task-item .status.failed {
|
||||
background: rgba(231, 76, 60, 0.2);
|
||||
color: #e74c3c;
|
||||
}
|
||||
|
||||
.task-item .status.cancelled {
|
||||
background: rgba(149, 165, 166, 0.2);
|
||||
color: #95a5a6;
|
||||
}
|
||||
|
||||
.task-item .progress-wrap {
|
||||
margin-top: 8px;
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.task-item .progress-bar-bg {
|
||||
height: 6px;
|
||||
background: #2a2a2a;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.task-item .progress-bar-fill {
|
||||
height: 100%;
|
||||
background: #3498db;
|
||||
border-radius: 3px;
|
||||
transition: width 0.2s;
|
||||
}
|
||||
|
||||
.task-item .btn-cancel,
|
||||
.task-item .btn-delete {
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
margin-left: 6px;
|
||||
.task-item .status.pending { background: rgba(255,193,7,0.2); color: #d4a500; }
|
||||
.task-item .status.running { background: rgba(52,152,219,0.2); color: #3498db; }
|
||||
.task-item .status.success { background: rgba(46,204,113,0.2); color: #2ecc71; }
|
||||
.task-item .status.failed { background: rgba(231,76,60,0.2); color: #e74c3c; }
|
||||
.task-item .status.cancelled { background: rgba(149,165,166,0.2); color: #95a5a6; }
|
||||
.task-item .progress-wrap { margin-top: 8px; margin-right: 8px; flex-shrink: 0; width: 120px; }
|
||||
.task-item .progress-bar-bg { height: 6px; background: #2a2a2a; border-radius: 3px; overflow: hidden; }
|
||||
.task-item .progress-bar-fill { height: 100%; background: #3498db; border-radius: 3px; transition: width 0.2s; }
|
||||
.task-item .btn-cancel, .task-item .btn-delete {
|
||||
padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; border: none; margin-left: 6px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.task-item .btn-cancel {
|
||||
background: #e67e22;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.task-item .btn-cancel:hover {
|
||||
background: #d35400;
|
||||
}
|
||||
|
||||
.task-item .btn-delete {
|
||||
background: #444;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.task-item .btn-delete:hover {
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.task-item .task-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.run-row .progress-wrap {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
.run-row .progress-bar-bg {
|
||||
height: 8px;
|
||||
background: #2a2a2a;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.run-row .progress-bar-fill {
|
||||
height: 100%;
|
||||
background: #3498db;
|
||||
border-radius: 4px;
|
||||
transition: width 0.2s;
|
||||
}
|
||||
|
||||
.run-row .btn-cancel-run {
|
||||
margin-left: 12px;
|
||||
padding: 8px 16px;
|
||||
background: #e67e22;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.run-row .btn-cancel-run:hover {
|
||||
background: #d35400;
|
||||
}
|
||||
|
||||
.task-item .btn-cancel { background: #e67e22; color: #fff; }
|
||||
.task-item .btn-cancel:hover { background: #d35400; }
|
||||
.task-item .btn-delete { background: #444; color: #ccc; }
|
||||
.task-item .btn-delete:hover { background: #e74c3c; color: #fff; }
|
||||
.task-item .task-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.run-row .progress-wrap { margin-top: 10px; width: 100%; max-width: 280px; }
|
||||
.run-row .progress-bar-bg { height: 8px; background: #2a2a2a; border-radius: 4px; overflow: hidden; }
|
||||
.run-row .progress-bar-fill { height: 100%; background: #3498db; border-radius: 4px; transition: width 0.2s; }
|
||||
.run-row .btn-cancel-run { margin-left: 12px; padding: 8px 16px; background: #e67e22; color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }
|
||||
.run-row .btn-cancel-run:hover { background: #d35400; }
|
||||
.task-item .download {
|
||||
padding: 6px 14px;
|
||||
background: #3498db;
|
||||
@@ -551,23 +314,9 @@
|
||||
white-space: nowrap;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.task-item .download:hover {
|
||||
background: #2980b9;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.task-item .download.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.empty-tasks {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
padding: 32px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.task-item .download:hover { background: #2980b9; color: #fff; }
|
||||
.task-item .download.hide { display: none; }
|
||||
.empty-tasks { text-align: center; color: #666; padding: 32px; font-size: 13px; }
|
||||
.toast {
|
||||
position: fixed;
|
||||
bottom: 32px;
|
||||
@@ -583,13 +332,9 @@
|
||||
transition: opacity 0.3s;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.toast.show {
|
||||
opacity: 1;
|
||||
}
|
||||
.toast.show { opacity: 1; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="top-bar">
|
||||
<div class="logo-area">
|
||||
@@ -599,12 +344,7 @@
|
||||
<nav class="nav-tabs">
|
||||
<span class="nav-tab-group">
|
||||
<button type="button" class="nav-tab active" data-panel="brandCheck">品牌检测</button>
|
||||
<button type="button" class="nav-tab"
|
||||
onclick="window.location='/new_web_source/dedupe.html'">总数据去重</button>
|
||||
<button type="button" class="nav-tab"
|
||||
onclick="window.location='/new_web_source/convert.html'">格式转换</button>
|
||||
<button type="button" class="nav-tab"
|
||||
onclick="window.location='/new_web_source/split.html'">表格拆分</button>
|
||||
<!-- 后续增加栏目时在此添加,例如:<button type="button" class="nav-tab" data-panel="other">其他栏目</button> -->
|
||||
</span>
|
||||
<!-- 多组栏目时可用分隔符:<span class="nav-tab-sep" aria-hidden="true"></span> -->
|
||||
</nav>
|
||||
@@ -664,33 +404,23 @@
|
||||
<button type="button" class="btn-run" id="btnRun">立即运行</button>
|
||||
<span class="loading-msg" id="loadingMsg" style="display:none;">生成中,请稍候…</span>
|
||||
<div class="progress-wrap" id="runProgressWrap" style="display:none;">
|
||||
<div class="progress-bar-bg">
|
||||
<div class="progress-bar-fill" id="runProgressFill" style="width:0%;"></div>
|
||||
</div>
|
||||
<div class="progress-bar-bg"><div class="progress-bar-fill" id="runProgressFill" style="width:0%;"></div></div>
|
||||
<span class="hint" style="font-size:12px;color:#888;" id="runProgressText">0 / 0</span>
|
||||
</div>
|
||||
<!-- 当前文件行级进度(不经数据库中转,只读内存接口) -->
|
||||
<div class="progress-wrap" id="runLineProgressWrap" style="display:none;">
|
||||
<div class="progress-bar-bg">
|
||||
<div class="progress-bar-fill" id="runLineProgressFill" style="width:0%;"></div>
|
||||
</div>
|
||||
<div class="progress-bar-bg"><div class="progress-bar-fill" id="runLineProgressFill" style="width:0%;"></div></div>
|
||||
<span class="hint" style="font-size:12px;color:#888;" id="runLineProgressText">0 / 0</span>
|
||||
</div>
|
||||
<button type="button" class="btn-cancel-run" id="btnCancelRun"
|
||||
style="display:none;">取消生成</button>
|
||||
<button type="button" class="btn-cancel-run" id="btnCancelRun" style="display:none;">取消生成</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-download-row" id="templateDownloadRow" role="button" tabindex="0"
|
||||
title="下载品牌文档格式模板(选择保存位置)">
|
||||
<div class="template-download-row" id="templateDownloadRow" role="button" tabindex="0" title="下载品牌文档格式模板(选择保存位置)">
|
||||
<span class="template-download-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"
|
||||
stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M14 2v6h6" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M8 13h8M8 17h5" stroke="rgba(255,255,255,0.85)" stroke-width="1.5"
|
||||
stroke-linecap="round" />
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14 2v6h6" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8 13h8M8 17h5" stroke="rgba(255,255,255,0.85)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="template-download-text">
|
||||
@@ -698,17 +428,12 @@
|
||||
<span class="hint">品牌文档格式_模板.xlsx · 点击选择保存位置</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="template-download-row" id="templateDownloadRow2" role="button" tabindex="0"
|
||||
title="下载模板2(以文件夹方式上传)">
|
||||
<div class="template-download-row" id="templateDownloadRow2" role="button" tabindex="0" title="下载模板2(以文件夹方式上传)">
|
||||
<span class="template-download-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"
|
||||
stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M14 2v6h6" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M3 7v10h4v-4h2v4h8v-4h2v4h2V7H3z" stroke="rgba(255,255,255,0.85)"
|
||||
stroke-width="1.5" stroke-linecap="round" />
|
||||
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14 2v6h6" stroke="rgba(255,255,255,0.9)" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 7v10h4v-4h2v4h8v-4h2v4h2V7H3z" stroke="rgba(255,255,255,0.85)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="template-download-text">
|
||||
@@ -1190,5 +915,4 @@
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user