fix: 自选按信号优先级排序+策略显示tech_snapshot/sector_context
This commit is contained in:
+9
-1
@@ -310,9 +310,17 @@ function renderWatchlist() {
|
||||
const tp = s.take_profit || 0;
|
||||
const signal = s.timing_signal || '';
|
||||
const action = (s.action||'');
|
||||
const tech = s.tech_snapshot || '';
|
||||
const sector = s.sector_context || '';
|
||||
const price = s.price || 0;
|
||||
const chg = s.change_pct || 0;
|
||||
const priceDisplay = price ? price.toFixed(2) : '—';
|
||||
// 构建完整策略显示
|
||||
let detailLines = [];
|
||||
if (action) detailLines.push(action);
|
||||
if (tech) detailLines.push('📊 ' + tech);
|
||||
if (sector) detailLines.push('🏭 ' + sector);
|
||||
const detailText = detailLines.join(' | ');
|
||||
return `
|
||||
<tr class="border-b border-slate-800/30 hover:bg-slate-800/20 cursor-pointer" onclick="openStock('${s.code}')">
|
||||
<td class="p-3"><div class="font-medium text-white">${s.name}</div><div class="text-slate-500 text-[10px]">${s.code}</div></td>
|
||||
@@ -323,7 +331,7 @@ function renderWatchlist() {
|
||||
<td class="p-3 text-right"><span class="text-xs px-2 py-1 rounded ${signal.includes('买入')?'bg-green-900/50 text-green-300':signal.includes('关注')?'bg-yellow-900/50 text-yellow-300':'bg-slate-800 text-slate-400'}">${signal||'—'}</span></td>
|
||||
</tr>
|
||||
<tr class="border-b border-slate-800/20 hover:bg-slate-800/10 cursor-pointer" onclick="openStock('${s.code}')">
|
||||
<td colspan="6" class="p-2 pl-3 text-xs text-slate-400 leading-relaxed">${action || '—'}</td>
|
||||
<td colspan="6" class="p-2 pl-3 text-xs text-slate-400 leading-relaxed">${detailText || '—'}</td>
|
||||
</tr>`;
|
||||
}).join('')}</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user