增加板块, 增加了对 urlencoded 数据的容量限制
This commit is contained in:
@@ -23,7 +23,11 @@
|
||||
--shadow: 0 24px 50px rgba(15, 42, 74, 0.18);
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Fira Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
@@ -37,7 +41,7 @@
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1140px;
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
@@ -63,7 +67,10 @@
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.header p { opacity: 0.92; font-size: 13px; }
|
||||
.header p {
|
||||
opacity: 0.92;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
@@ -100,9 +107,17 @@
|
||||
box-shadow: inset 0 0 0 1px rgba(15, 110, 205, 0.12);
|
||||
}
|
||||
|
||||
.content { padding: 24px; }
|
||||
.tab-content { display: none; }
|
||||
.tab-content.active { display: block; }
|
||||
.content {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
@@ -112,7 +127,11 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="number"], input[type="password"], textarea, select {
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="password"],
|
||||
textarea,
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--line);
|
||||
@@ -123,7 +142,9 @@
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
|
||||
}
|
||||
|
||||
input:focus, textarea:focus, select:focus {
|
||||
input:focus,
|
||||
textarea:focus,
|
||||
select:focus {
|
||||
outline: none;
|
||||
border-color: rgba(15, 110, 205, 0.55);
|
||||
box-shadow: 0 0 0 3px rgba(15, 110, 205, 0.12);
|
||||
@@ -136,9 +157,18 @@
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.form-group { margin-bottom: 16px; }
|
||||
.form-row { display: flex; gap: 16px; }
|
||||
.form-row > * { flex: 1; }
|
||||
.form-group {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.form-row>* {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 10px 18px;
|
||||
@@ -160,7 +190,9 @@
|
||||
box-shadow: 0 8px 18px rgba(15, 110, 205, 0.25);
|
||||
}
|
||||
|
||||
.btn-primary:hover { background: linear-gradient(120deg, var(--primary-hover), #1279aa); }
|
||||
.btn-primary:hover {
|
||||
background: linear-gradient(120deg, var(--primary-hover), #1279aa);
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #fff;
|
||||
@@ -168,7 +200,9 @@
|
||||
box-shadow: 0 8px 16px rgba(15, 157, 88, 0.24);
|
||||
}
|
||||
|
||||
.btn-success:hover { filter: brightness(0.96); }
|
||||
.btn-success:hover {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #fff;
|
||||
@@ -176,7 +210,9 @@
|
||||
box-shadow: 0 8px 16px rgba(217, 72, 72, 0.22);
|
||||
}
|
||||
|
||||
.btn-danger:hover { filter: brightness(0.96); }
|
||||
.btn-danger:hover {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
color: #1e3856;
|
||||
@@ -184,12 +220,27 @@
|
||||
border-color: var(--line);
|
||||
}
|
||||
|
||||
.btn-secondary:hover { background: #ffffff; }
|
||||
.btn-secondary:hover {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
|
||||
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
|
||||
.btn:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
table { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; }
|
||||
.btn-sm {
|
||||
padding: 5px 11px;
|
||||
font-size: 12px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
th {
|
||||
background: rgba(15, 110, 205, 0.12);
|
||||
@@ -209,9 +260,16 @@
|
||||
background: rgba(255, 255, 255, 0.42);
|
||||
}
|
||||
|
||||
tr:hover td { background: rgba(255, 255, 255, 0.74); }
|
||||
tr:hover td {
|
||||
background: rgba(255, 255, 255, 0.74);
|
||||
}
|
||||
|
||||
.prompt-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.prompt-cell {
|
||||
max-width: 320px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-block;
|
||||
@@ -222,8 +280,17 @@
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.tag-on { background: rgba(15, 157, 88, 0.12); color: #0b7f47; border-color: rgba(15, 157, 88, 0.24); }
|
||||
.tag-off { background: rgba(217, 72, 72, 0.12); color: #b83b3b; border-color: rgba(217, 72, 72, 0.24); }
|
||||
.tag-on {
|
||||
background: rgba(15, 157, 88, 0.12);
|
||||
color: #0b7f47;
|
||||
border-color: rgba(15, 157, 88, 0.24);
|
||||
}
|
||||
|
||||
.tag-off {
|
||||
background: rgba(217, 72, 72, 0.12);
|
||||
color: #b83b3b;
|
||||
border-color: rgba(217, 72, 72, 0.24);
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
@@ -238,7 +305,9 @@
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.modal.show { display: flex; }
|
||||
.modal.show {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
border-radius: 16px;
|
||||
@@ -252,7 +321,10 @@
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.modal-body h3 { margin-bottom: 20px; color: var(--text); }
|
||||
.modal-body h3 {
|
||||
margin-bottom: 20px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.status-box {
|
||||
padding: 14px;
|
||||
@@ -280,7 +352,11 @@
|
||||
border-color: rgba(217, 72, 72, 0.24);
|
||||
}
|
||||
|
||||
.empty-state { text-align: center; padding: 42px; color: var(--muted); }
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 42px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.result-card {
|
||||
border: 1px solid var(--line);
|
||||
@@ -304,8 +380,15 @@
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.result-card-header h4 { font-size: 15px; color: #17395b; }
|
||||
.result-card-header span { font-size: 12px; color: var(--muted); }
|
||||
.result-card-header h4 {
|
||||
font-size: 15px;
|
||||
color: #17395b;
|
||||
}
|
||||
|
||||
.result-card-header span {
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.result-item {
|
||||
display: flex;
|
||||
@@ -315,13 +398,47 @@
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.result-item:last-child { border-bottom: none; }
|
||||
.result-item .type { min-width: 80px; font-weight: 700; color: var(--primary); font-size: 13px; }
|
||||
.result-item .name { flex: 1; font-size: 13px; color: #1f3957; }
|
||||
.result-item .amount { min-width: 100px; text-align: right; font-weight: 700; color: #ad5b1a; font-size: 13px; }
|
||||
.result-item .date { min-width: 90px; text-align: center; color: var(--muted); font-size: 12px; }
|
||||
.result-item a { color: var(--primary); text-decoration: none; font-size: 12px; }
|
||||
.result-item a:hover { text-decoration: underline; }
|
||||
.result-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.result-item .type {
|
||||
min-width: 80px;
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.result-item .name {
|
||||
flex: 1;
|
||||
font-size: 13px;
|
||||
color: #1f3957;
|
||||
}
|
||||
|
||||
.result-item .amount {
|
||||
min-width: 100px;
|
||||
text-align: right;
|
||||
font-weight: 700;
|
||||
color: #ad5b1a;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.result-item .date {
|
||||
min-width: 90px;
|
||||
text-align: center;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.result-item a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.result-item a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
@@ -349,14 +466,39 @@
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
body { padding: 12px; }
|
||||
.content { padding: 14px; }
|
||||
.form-row { flex-direction: column; gap: 10px; }
|
||||
.header { padding: 20px 16px; }
|
||||
.header h1 { font-size: 20px; }
|
||||
.tabs { padding: 6px; }
|
||||
.tab { font-size: 14px; padding: 10px 6px; }
|
||||
.btn { padding: 9px 14px; }
|
||||
body {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px 16px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
font-size: 14px;
|
||||
padding: 10px 6px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 9px 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
@@ -396,6 +538,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>城市</th>
|
||||
<th>板块</th>
|
||||
<th>提示词</th>
|
||||
<th>模型</th>
|
||||
<th>状态</th>
|
||||
@@ -404,7 +547,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tasksTbody">
|
||||
<tr><td colspan="6" class="empty-state">加载中...</td></tr>
|
||||
<tr>
|
||||
<td colspan="7" class="empty-state">加载中...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -526,9 +671,14 @@
|
||||
<label>城市名称</label>
|
||||
<input type="text" id="taskCity" placeholder="如:南京市" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>板块名称</label>
|
||||
<input type="text" id="plateName" placeholder="如:工程" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>提示词 (在提示词中包含目标网址和抓取要求)</label>
|
||||
<textarea id="taskPrompt" rows="6" placeholder="请访问 https://xxx.com 获取今天的所有招标公告和中标公告信息..." required></textarea>
|
||||
<textarea id="taskPrompt" rows="6" placeholder="请访问 https://xxx.com 获取今天的所有招标公告和中标公告信息..."
|
||||
required></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>模型 (mode)</label>
|
||||
@@ -595,13 +745,14 @@
|
||||
document.getElementById('taskSummary').textContent = `共 ${tasksList.length} 个任务,${enabled} 个启用`;
|
||||
|
||||
if (tasksList.length === 0) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="empty-state">暂无任务,点击「新增任务」添加</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="7" class="empty-state">暂无任务,点击「新增任务」添加</td></tr>';
|
||||
return;
|
||||
}
|
||||
|
||||
tbody.innerHTML = tasksList.map(t => `
|
||||
<tr>
|
||||
<td><strong>${t.city || '-'}</strong></td>
|
||||
<td>${t.plateName || '-'}</td>
|
||||
<td class="prompt-cell" title="${(t.prompt || '').replace(/"/g, '"')}">${t.prompt || '-'}</td>
|
||||
<td><code style="font-family:'Fira Code','Cascadia Code',monospace;font-size:12px;">${t.mode || 'qwen3.5-plus'}</code></td>
|
||||
<td><span class="tag ${t.enabled ? 'tag-on' : 'tag-off'}">${t.enabled ? '启用' : '禁用'}</span></td>
|
||||
@@ -622,6 +773,7 @@
|
||||
document.getElementById('taskModalTitle').textContent = item ? '编辑任务' : '新增任务';
|
||||
document.getElementById('taskEditId').value = item ? item.id : '';
|
||||
document.getElementById('taskCity').value = item ? item.city : '';
|
||||
document.getElementById('plateName').value = item ? item.plateName : '';
|
||||
document.getElementById('taskPrompt').value = item ? item.prompt : '';
|
||||
const modeSelect = document.getElementById('taskMode');
|
||||
const modeValue = item?.mode || 'qwen3.5-plus';
|
||||
@@ -648,6 +800,7 @@
|
||||
const id = document.getElementById('taskEditId').value;
|
||||
const data = {
|
||||
city: document.getElementById('taskCity').value.trim(),
|
||||
plateName: document.getElementById('plateName').value.trim(),
|
||||
prompt: document.getElementById('taskPrompt').value.trim(),
|
||||
mode: document.getElementById('taskMode').value.trim() || 'qwen3.5-plus',
|
||||
enabled: document.getElementById('taskEnabled').checked,
|
||||
@@ -1006,4 +1159,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user