@@ -4,9 +4,15 @@ import { listContracts, listScores, type Score } from '@/api/scores'
|
||||
import ScoreDetailDrawer from '@/components/ScoreDetailDrawer.vue'
|
||||
import { parseTsCode } from '@/utils/contract'
|
||||
|
||||
const filter = reactive<{ ts_code?: string; range: [string, string] | []; limit: number }>({
|
||||
const filter = reactive<{
|
||||
ts_code?: string
|
||||
range: [string, string] | []
|
||||
signal?: string
|
||||
limit: number
|
||||
}>({
|
||||
ts_code: undefined,
|
||||
range: [],
|
||||
signal: undefined,
|
||||
limit: 200,
|
||||
})
|
||||
|
||||
@@ -23,6 +29,7 @@ async function reload() {
|
||||
ts_code: filter.ts_code,
|
||||
start: start || undefined,
|
||||
end: end || undefined,
|
||||
signal: filter.signal,
|
||||
limit: filter.limit,
|
||||
})
|
||||
} finally {
|
||||
@@ -30,6 +37,11 @@ async function reload() {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleSignal(s: string) {
|
||||
filter.signal = filter.signal === s ? undefined : s
|
||||
reload()
|
||||
}
|
||||
|
||||
function signalTagType(s: string) {
|
||||
if (s.includes('强烈看多')) return 'success'
|
||||
if (s.includes('偏多')) return ''
|
||||
@@ -75,6 +87,22 @@ onMounted(async () => {
|
||||
<el-form-item>
|
||||
<el-button type="primary" :loading="loading" @click="reload">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="快捷">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
:type="filter.signal === '强烈看多' ? 'success' : ''"
|
||||
@click="toggleSignal('强烈看多')"
|
||||
>
|
||||
强烈看多
|
||||
</el-button>
|
||||
<el-button
|
||||
:type="filter.signal === '强烈看空' ? 'danger' : ''"
|
||||
@click="toggleSignal('强烈看空')"
|
||||
>
|
||||
强烈看空
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user