diff --git a/public/index.html b/public/index.html
index 25716f4..07ae8cd 100644
--- a/public/index.html
+++ b/public/index.html
@@ -103,9 +103,8 @@ tr.today:hover td{background:#fde68a!important}
@@ -240,7 +239,7 @@ async function loadStats(){
const charts=[];
function mkChart(id){const c=echarts.init($(id));charts.push(c);return c}
function renderCharts(s){
- if(typeof echarts==='undefined'){['chTrend','chLevel','chEdu','chCity','chFunnel'].forEach(id=>{$(id).innerHTML='图表库未加载
'});return}
+ if(typeof echarts==='undefined'){['chTrend','chLevel','chEdu','chFunnel'].forEach(id=>{$(id).innerHTML='图表库未加载
'});return}
charts.splice(0).forEach(c=>c.dispose());
const axis='#6b7280',split='#e5e7eb';
mkChart('chTrend').setOption({
@@ -263,11 +262,6 @@ function renderCharts(s){
xAxis:{type:'category',data:s.byEducation.map(x=>x.k),axisLabel:{color:axis,interval:0},axisLine:{lineStyle:{color:split}}},
yAxis:{type:'value',axisLabel:{color:axis},splitLine:{lineStyle:{color:split}}},
series:[{type:'bar',barWidth:'55%',data:s.byEducation.map(x=>x.c),itemStyle:{color:'#2563eb',borderRadius:[4,4,0,0]}}]});
- mkChart('chCity').setOption({
- tooltip:{},grid:{left:70,right:30,top:20,bottom:30},
- xAxis:{type:'value',axisLabel:{color:axis},splitLine:{lineStyle:{color:split}}},
- yAxis:{type:'category',data:s.byCity.map(x=>x.k).reverse(),axisLabel:{color:axis}},
- series:[{type:'bar',barWidth:'55%',data:s.byCity.map(x=>x.c).reverse(),itemStyle:{color:'#0ea5e9',borderRadius:[0,4,4,0]}}]});
const lv=s.byLevel.reduce((m,x)=>(m[x.k]=x.c,m),{});
mkChart('chFunnel').setOption({
tooltip:{trigger:'item',formatter:'{b}: {c}'},
diff --git a/scripts/smoke.js b/scripts/smoke.js
index 6b7771a..1b5b7e3 100644
--- a/scripts/smoke.js
+++ b/scripts/smoke.js
@@ -43,7 +43,7 @@ const sleep = (ms) => new Promise(r => setTimeout(r, ms));
ok('累计候选人为五位数(数据在库)', /\d{5,}/.test(statText));
ok('级别分布含推荐', statText.includes('推荐'));
const canvasN = await p.evaluate(() => document.querySelectorAll('#main canvas').length);
- ok(`图表已渲染(canvas=${canvasN},≥5)`, canvasN >= 5);
+ ok(`图表已渲染(canvas=${canvasN},≥4)`, canvasN >= 4);
console.log('== 4. 候选人列表与筛选(滑动到第二屏) ==');
await p.evaluate(() => setPane(1)); await sleep(500);
diff --git a/server.js b/server.js
index 0a1028a..4fc512f 100644
--- a/server.js
+++ b/server.js
@@ -154,7 +154,6 @@ app.get('/api/stats', requireAuth, (req, res) => {
greetedTotal: rdb.prepare('SELECT COUNT(*) c FROM candidates WHERE greeted = 1').get().c,
byLevel: rdb.prepare("SELECT COALESCE(score_level,'?') k, COUNT(*) c FROM candidates GROUP BY score_level").all(),
byEducation: rdb.prepare("SELECT COALESCE(NULLIF(education,''),'未知') k, COUNT(*) c FROM candidates GROUP BY education ORDER BY c DESC LIMIT 8").all(),
- byCity: rdb.prepare("SELECT expected_city k, COUNT(*) c FROM candidates WHERE expected_city != '' GROUP BY expected_city ORDER BY c DESC LIMIT 8").all(),
byAccount: rdb.prepare("SELECT COALESCE(NULLIF(account,''),'未知') k, COUNT(*) c, SUM(greeted) g FROM candidates GROUP BY account ORDER BY c DESC").all(),
last30: rdb.prepare(`SELECT substr(scraped_at,1,10) d, COUNT(*) c,
SUM(CASE WHEN score_level='推荐' THEN 1 ELSE 0 END) rec,