feat(config): 南京公共资源交易中心
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>南京公共工程建设中心 - 公告采集工具</title>
|
||||
<title>南京公共资源交易平台 - 合同估算价采集工具</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
@@ -95,7 +95,7 @@
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
.form-group input, .form-group select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 2px solid #e0e0e0;
|
||||
@@ -104,7 +104,7 @@
|
||||
transition: border 0.3s;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
.form-group input:focus, .form-group select:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
}
|
||||
@@ -242,7 +242,7 @@
|
||||
}
|
||||
|
||||
.simple-list {
|
||||
max-height: 380px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -318,12 +318,6 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.pagination button.active {
|
||||
background: #667eea;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pagination .page-info {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
@@ -334,29 +328,23 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>南京公共工程建设中心</h1>
|
||||
<p>公告采集与分析工具</p>
|
||||
<h1>南京公共资源交易平台</h1>
|
||||
<p>房建市政招标公告 - 合同估算价采集工具</p>
|
||||
</div>
|
||||
|
||||
<div class="tabs">
|
||||
<button class="tab active" onclick="switchTab('list')">公告列表</button>
|
||||
<button class="tab" onclick="switchTab('detail')">详情采集</button>
|
||||
<button class="tab" onclick="switchTab('report')">生成报告</button>
|
||||
<button class="tab" onclick="switchTab('scheduler')">定时任务</button>
|
||||
<button class="tab" onclick="switchTab('email')">邮件配置</button>
|
||||
<button class="tab" onclick="switchTab('llm')">AI配置</button>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<!-- 公告列表 -->
|
||||
<div id="list" class="tab-content active">
|
||||
<div class="form-group">
|
||||
<label>列表页URL (可选)</label>
|
||||
<input type="text" id="listUrl" placeholder="默认: https://gjzx.nanjing.gov.cn/gggs/">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>页码 (第1页为最新公告)</label>
|
||||
<input type="number" id="listPage" value="1" min="1" max="100">
|
||||
<input type="number" id="listPage" value="1" min="1" max="300">
|
||||
</div>
|
||||
<button class="btn" onclick="fetchList()">获取公告列表</button>
|
||||
|
||||
@@ -375,51 +363,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 详情采集 -->
|
||||
<div id="detail" class="tab-content">
|
||||
<div class="form-group">
|
||||
<div class="checkbox-wrapper" onclick="document.getElementById('useDetailDateRange').click();">
|
||||
<input type="checkbox" id="useDetailDateRange" onchange="toggleDetailDateRange()" onclick="event.stopPropagation();">
|
||||
<label for="useDetailDateRange">按时间范围采集</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="detailDateRangeFields" style="display:none;">
|
||||
<div class="form-group">
|
||||
<label>开始日期</label>
|
||||
<input type="date" id="detailStartDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>结束日期</label>
|
||||
<input type="date" id="detailEndDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>最大采集页数</label>
|
||||
<input type="number" id="detailMaxPages" value="1" min="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="detailNormalFields">
|
||||
<div class="form-group">
|
||||
<label>列表页URL (可选)</label>
|
||||
<input type="text" id="detailUrl" placeholder="默认: https://gjzx.nanjing.gov.cn/gggs/">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>采集数量</label>
|
||||
<input type="number" id="detailLimit" value="5" min="1" max="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn" onclick="fetchDetails()">开始采集</button>
|
||||
|
||||
<div id="detailLoading" class="loading">
|
||||
<div class="spinner"></div>
|
||||
<p>正在采集详情...</p>
|
||||
</div>
|
||||
|
||||
<div id="detailResults" class="results"></div>
|
||||
</div>
|
||||
|
||||
<!-- 生成报告 -->
|
||||
<div id="report" class="tab-content">
|
||||
<div class="form-group">
|
||||
@@ -440,24 +383,20 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>最大采集页数</label>
|
||||
<input type="number" id="maxPages" value="1" min="1" >
|
||||
<input type="number" id="maxPages" value="10" min="1" max="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="normalFields">
|
||||
<div class="form-group">
|
||||
<label>列表页URL (可选)</label>
|
||||
<input type="text" id="reportUrl" placeholder="默认: https://gjzx.nanjing.gov.cn/gggs/">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>采集数量</label>
|
||||
<input type="number" id="reportLimit" value="15" min="1" max="50">
|
||||
<input type="number" id="reportLimit" value="50" min="1" max="200">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>金额阈值 (万元)</label>
|
||||
<input type="number" id="reportThreshold" value="50" min="0" step="0.1">
|
||||
<label>金额阈值 (万元) - 只显示大于此金额的项目</label>
|
||||
<input type="number" id="reportThreshold" value="1000" min="0" step="100">
|
||||
</div>
|
||||
|
||||
<button class="btn" onclick="generateReport()">生成报告</button>
|
||||
@@ -475,7 +414,7 @@
|
||||
<!-- 定时任务 -->
|
||||
<div id="scheduler" class="tab-content">
|
||||
<h2 style="margin-bottom: 20px; color: #667eea;">定时任务配置</h2>
|
||||
<p style="color: #666; margin-bottom: 20px;">配置定时任务自动采集本月大于指定金额的项目并发送邮件报告</p>
|
||||
<p style="color: #666; margin-bottom: 20px;">配置定时任务自动采集大于指定金额的项目并发送邮件报告</p>
|
||||
|
||||
<!-- 任务状态 -->
|
||||
<div id="schedulerStatus" style="margin-bottom: 30px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 8px;">
|
||||
@@ -506,7 +445,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>执行计划</label>
|
||||
<select id="schedulerCronPreset" style="width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;" onchange="handleCronPresetChange()">
|
||||
<select id="schedulerCronPreset" onchange="handleCronPresetChange()">
|
||||
<option value="0 9 * * *">每天上午9点</option>
|
||||
<option value="0 6 * * *">每天上午6点</option>
|
||||
<option value="0 12 * * *">每天中午12点</option>
|
||||
@@ -526,11 +465,11 @@
|
||||
<div style="display: flex; gap: 10px; align-items: center;">
|
||||
<div style="flex: 1;">
|
||||
<label style="font-size: 12px; color: #666;">小时 (0-23)</label>
|
||||
<input type="number" id="customHour" min="0" max="23" value="9" style="width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;">
|
||||
<input type="number" id="customHour" min="0" max="23" value="9">
|
||||
</div>
|
||||
<div style="flex: 1;">
|
||||
<label style="font-size: 12px; color: #666;">分钟 (0-59)</label>
|
||||
<input type="number" id="customMinute" min="0" max="59" value="0" style="width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;">
|
||||
<input type="number" id="customMinute" min="0" max="59" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<small style="color: #666; display: block; margin-top: 5px;">
|
||||
@@ -543,7 +482,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>采集时间段</label>
|
||||
<select id="schedulerTimeRange" style="width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;">
|
||||
<select id="schedulerTimeRange">
|
||||
<option value="today">今日</option>
|
||||
<option value="thisWeek">本周</option>
|
||||
<option value="thisMonth" selected>本月</option>
|
||||
@@ -555,7 +494,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>金额阈值 (万元)</label>
|
||||
<input type="number" id="schedulerThresholdInput" value="100000" min="0" step="1000">
|
||||
<input type="number" id="schedulerThresholdInput" value="10000" min="0" step="1000">
|
||||
<small style="color: #666; display: block; margin-top: 5px;">
|
||||
10亿 = 100000万元 | 5亿 = 50000万元 | 1亿 = 10000万元
|
||||
</small>
|
||||
@@ -563,7 +502,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label>任务描述 (可选)</label>
|
||||
<input type="text" id="schedulerDescription" placeholder="例如: 每天9点采集大于10亿的项目">
|
||||
<input type="text" id="schedulerDescription" placeholder="例如: 每天9点采集大于1亿的项目">
|
||||
</div>
|
||||
|
||||
<button class="btn" onclick="saveSchedulerConfig()">保存配置</button>
|
||||
@@ -575,11 +514,10 @@
|
||||
<div style="margin-top: 30px; padding: 20px; background: #fff3cd; border-radius: 8px; border-left: 4px solid #ffc107;">
|
||||
<h3 style="margin-top: 0; color: #856404;">使用说明</h3>
|
||||
<ul style="line-height: 1.8; color: #856404;">
|
||||
<li><strong>定时任务功能:</strong> 自动采集选中时间段的所有公告</li>
|
||||
<li><strong>筛选条件:</strong> 只保留预算金额大于设定阈值的项目</li>
|
||||
<li><strong>数据来源:</strong> 南京公共资源交易平台 - 房建市政招标公告</li>
|
||||
<li><strong>采集内容:</strong> 标段编号、项目名称、标段名称、合同估算价、发布日期</li>
|
||||
<li><strong>筛选条件:</strong> 只保留合同估算价大于设定阈值的项目</li>
|
||||
<li><strong>邮件发送:</strong> 自动将筛选结果生成HTML报告并发送到配置的邮箱</li>
|
||||
<li><strong>执行时间:</strong> 通过下拉菜单或自定义时间设置定时执行时间</li>
|
||||
<li><strong>注意事项:</strong> 保存配置后会自动重启定时任务,无需重启服务器</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -624,112 +562,14 @@
|
||||
<ul style="line-height: 1.8; color: #666;">
|
||||
<li><strong>QQ邮箱:</strong> smtp.qq.com, 端口 587 或 465, 需要使用授权码</li>
|
||||
<li><strong>163邮箱:</strong> smtp.163.com, 端口 465 或 25, 需要使用授权码</li>
|
||||
<li><strong>Gmail:</strong> smtp.gmail.com, 端口 587 或 465, 需要开启"允许不够安全的应用"</li>
|
||||
<li><strong>Gmail:</strong> smtp.gmail.com, 端口 587 或 465</li>
|
||||
<li><strong>Outlook:</strong> smtp-mail.outlook.com, 端口 587</li>
|
||||
<li><strong>企业邮箱:</strong> 请咨询您的IT管理员获取SMTP配置</li>
|
||||
</ul>
|
||||
<p style="margin: 10px 0 0 0; color: #999; font-size: 13px;">
|
||||
提示: QQ和163邮箱需要在邮箱设置中开启SMTP服务并生成授权码,授权码不是邮箱密码。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AI配置 -->
|
||||
<div id="llm" class="tab-content">
|
||||
<h2 style="margin-bottom: 20px; color: #667eea;">AI 智能分析配置</h2>
|
||||
<p style="color: #666; margin-bottom: 20px;">使用大语言模型智能提取招标金额,提高金额识别的准确性</p>
|
||||
|
||||
<!-- AI 状态 -->
|
||||
<div id="llmStatus" style="margin-bottom: 30px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 8px;">
|
||||
<h3 style="margin-top: 0; margin-bottom: 15px;">AI 服务状态</h3>
|
||||
<div style="display: flex; gap: 30px; flex-wrap: wrap;">
|
||||
<div>
|
||||
<div style="opacity: 0.9; font-size: 14px;">服务状态</div>
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="llmRunningStatus">加载中...</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="opacity: 0.9; font-size: 14px;">当前模型</div>
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="llmModelName">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 配置表单 -->
|
||||
<div class="form-group">
|
||||
<div class="checkbox-wrapper" onclick="document.getElementById('llmEnabled').click();">
|
||||
<input type="checkbox" id="llmEnabled" onclick="event.stopPropagation();">
|
||||
<label for="llmEnabled">启用 AI 金额提取</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>API Key *</label>
|
||||
<input type="password" id="llmApiKey" placeholder="请输入阿里云 DashScope API Key">
|
||||
<small style="color: #666; display: block; margin-top: 5px;">
|
||||
<a href="https://dashscope.console.aliyun.com/apiKey" target="_blank" style="color: #667eea;">点击这里获取 API Key</a>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>API 地址</label>
|
||||
<input type="text" id="llmBaseUrl" value="https://dashscope.aliyuncs.com/compatible-mode/v1" placeholder="https://dashscope.aliyuncs.com/compatible-mode/v1">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>模型选择</label>
|
||||
<select id="llmModel" style="width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px;">
|
||||
<option value="qwen-turbo">通义千问 Turbo (快速、低成本)</option>
|
||||
<option value="qwen-plus">通义千问 Plus (更准确)</option>
|
||||
<option value="qwen-max">通义千问 Max (最强)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button class="btn" onclick="saveLLMConfig()">保存配置</button>
|
||||
<button class="btn" onclick="testLLMConnection()" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">测试连接</button>
|
||||
<button class="btn" onclick="loadLLMConfig()" style="background: #6c757d;">刷新状态</button>
|
||||
|
||||
<div id="llmConfigStatus" style="margin-top: 20px;"></div>
|
||||
|
||||
<div style="margin-top: 30px; padding: 20px; background: #e8f5e9; border-radius: 8px; border-left: 4px solid #4caf50;">
|
||||
<h3 style="margin-top: 0; color: #2e7d32;">功能说明</h3>
|
||||
<ul style="line-height: 1.8; color: #2e7d32;">
|
||||
<li><strong>智能提取:</strong> 使用大语言模型理解公告内容,准确提取预算金额</li>
|
||||
<li><strong>自动降级:</strong> 当 AI 服务不可用时,自动使用正则表达式提取</li>
|
||||
<li><strong>支持模型:</strong> 阿里云通义千问系列模型(qwen-turbo/plus/max)</li>
|
||||
<li><strong>计费说明:</strong> 按实际调用量计费,qwen-turbo 约 0.0008元/千tokens</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 20px; padding: 20px; background: #fff3cd; border-radius: 8px; border-left: 4px solid #ffc107;">
|
||||
<h3 style="margin-top: 0; color: #856404;">模型对比</h3>
|
||||
<table style="width: 100%; border-collapse: collapse; margin-top: 10px;">
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<th style="text-align: left; padding: 8px; color: #856404;">模型</th>
|
||||
<th style="text-align: left; padding: 8px; color: #856404;">速度</th>
|
||||
<th style="text-align: left; padding: 8px; color: #856404;">准确度</th>
|
||||
<th style="text-align: left; padding: 8px; color: #856404;">成本</th>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<td style="padding: 8px;">qwen-turbo</td>
|
||||
<td style="padding: 8px;">最快</td>
|
||||
<td style="padding: 8px;">良好</td>
|
||||
<td style="padding: 8px;">最低</td>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid #ddd;">
|
||||
<td style="padding: 8px;">qwen-plus</td>
|
||||
<td style="padding: 8px;">较快</td>
|
||||
<td style="padding: 8px;">优秀</td>
|
||||
<td style="padding: 8px;">中等</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 8px;">qwen-max</td>
|
||||
<td style="padding: 8px;">较慢</td>
|
||||
<td style="padding: 8px;">最佳</td>
|
||||
<td style="padding: 8px;">较高</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user