feat: 全景扫描推荐列表分页改为5只/页,支持收起/展开
This commit is contained in:
@@ -655,6 +655,32 @@
|
||||
.scan-pagination button:disabled { opacity: 0.3; cursor: not-allowed; }
|
||||
.scan-pagination span { font-size: 13px; color: var(--text-secondary); }
|
||||
|
||||
/* 结果列表可收起 header */
|
||||
.full-scan-list-section {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.scan-list-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.scan-list-header:hover { background: rgba(255,255,255,0.06); }
|
||||
.scan-list-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
.scan-list-title small {
|
||||
font-weight: 400;
|
||||
color: var(--text-muted);
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.admin-link-btn {
|
||||
display: block;
|
||||
text-align: center;
|
||||
|
||||
@@ -86,10 +86,12 @@
|
||||
fullScanLoading: false,
|
||||
fullScanPage: 1,
|
||||
fullScanTotalPages: 1,
|
||||
fullScanPerPage: 5, // 每页显示5只股票
|
||||
fullScanFilter: 'all',
|
||||
fullScanFilterTypes: [],
|
||||
fullScanFilterRecommend: '买入', // 扫描结果打开时缺省显示买入列表;all|买入|加仓|卖出|持有|关注|观察|观望
|
||||
scanSummaryCollapsed: false,
|
||||
scanResultsCollapsed: false, // 结果列表可收起
|
||||
fullScanSignalDist: [],
|
||||
|
||||
// 找牛股(保留兼容)
|
||||
@@ -2253,7 +2255,7 @@
|
||||
const resp = await axios.get('/api/scan_results', {
|
||||
params: {
|
||||
page: this.fullScanPage,
|
||||
per_page: 50,
|
||||
per_page: this.fullScanPerPage,
|
||||
min_triggered: minTriggered,
|
||||
signal_type: signalTypes,
|
||||
holding_codes: (this.holdingStocks || []).join(','),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<link rel="stylesheet" href="/static/css/components.css?v=20260718v1">
|
||||
<link rel="stylesheet" href="/static/css/auth.css?v=20260718v1">
|
||||
<link rel="stylesheet" href="/static/css/pages.css?v=20260719v2">
|
||||
<link rel="stylesheet" href="/static/css/scan.css?v=20260719v5">
|
||||
<link rel="stylesheet" href="/static/css/scan.css?v=20260722v1">
|
||||
<link rel="stylesheet" href="/static/css/responsive.css?v=20260719v1">
|
||||
</head>
|
||||
<body>
|
||||
@@ -883,7 +883,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="full-scan-list">
|
||||
<div class="full-scan-list-section">
|
||||
<div class="scan-list-header" role="button" tabindex="0" :aria-expanded="!scanResultsCollapsed" @click="scanResultsCollapsed = !scanResultsCollapsed" @keyup.enter="scanResultsCollapsed = !scanResultsCollapsed">
|
||||
<span class="scan-list-title">推荐列表 <small v-if="fullScanTotalPages > 1">{{ fullScanPage }}/{{ fullScanTotalPages }}页</small></span>
|
||||
<span class="scan-summary-toggle">{{ scanResultsCollapsed ? '▶' : '▼' }}</span>
|
||||
</div>
|
||||
<div v-show="!scanResultsCollapsed" class="full-scan-list">
|
||||
<div v-if="fullScanResultsFiltered.length === 0" class="scan-empty-hint">暂无符合条件的股票</div>
|
||||
<div v-for="item in fullScanResultsFiltered" :key="item.code" class="scan-result-card"
|
||||
:class="{ 'has-signal': item.triggered_count > 0, 'is-watched': searchHistory.some(h => h.code === item.code) }">
|
||||
@@ -915,11 +920,11 @@
|
||||
</div>
|
||||
<div class="scan-holding-note" v-if="item.holding_note">{{ item.holding_note }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="fullScanTotalPages > 1" class="scan-pagination">
|
||||
<button type="button" @click="fetchFullScanResults(fullScanPage - 1)" :disabled="fullScanPage <= 1">上一页</button>
|
||||
<button type="button" @click.stop="fetchFullScanResults(fullScanPage - 1)" :disabled="fullScanPage <= 1">上一页</button>
|
||||
<span>{{ fullScanPage }} / {{ fullScanTotalPages }}</span>
|
||||
<button type="button" @click="fetchFullScanResults(fullScanPage + 1)" :disabled="fullScanPage >= fullScanTotalPages">下一页</button>
|
||||
<button type="button" @click.stop="fetchFullScanResults(fullScanPage + 1)" :disabled="fullScanPage >= fullScanTotalPages">下一页</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -2299,6 +2304,6 @@
|
||||
</div>
|
||||
|
||||
{% endraw %}
|
||||
<script src="/static/js/app.js?v=20260718v2"></script>
|
||||
<script src="/static/js/app.js?v=20260722v1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user