|
@@ -9,10 +9,10 @@
|
|
|
<template #symbol="{ row }">
|
|
<template #symbol="{ row }">
|
|
|
<view class="symbol-cell">
|
|
<view class="symbol-cell">
|
|
|
<view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
|
|
<view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
|
|
|
- }}</view>
|
|
|
|
|
|
|
+ }}</view>
|
|
|
<view class="desc">{{ row.openPrice }}
|
|
<view class="desc">{{ row.openPrice }}
|
|
|
<text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
|
|
<text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
|
|
|
- }}{{ t('Label.Lot') }}</text>
|
|
|
|
|
|
|
+ }}{{ t('Label.Lot') }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -27,7 +27,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { computed, ref, nextTick, reactive } from 'vue';
|
|
|
|
|
|
|
+import { computed, ref, nextTick, reactive, watch } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
const { t, locale } = useI18n();
|
|
const { t, locale } = useI18n();
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
@@ -133,16 +133,16 @@ const mobilePrimaryFields = computed(() => [
|
|
|
|
|
|
|
|
// 动态传入筛选字段配置
|
|
// 动态传入筛选字段配置
|
|
|
const filterFields = computed(() => [
|
|
const filterFields = computed(() => [
|
|
|
- isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: search.login || undefined, clearable: true },
|
|
|
|
|
|
|
+ isLoaded.value && isSuccess.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions || [], defaultValue: undefined },
|
|
|
{ key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
|
|
{ key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
|
|
|
])
|
|
])
|
|
|
const searchParams = ref({})
|
|
const searchParams = ref({})
|
|
|
const tableRef = ref(null)
|
|
const tableRef = ref(null)
|
|
|
const handleSearch = (params) => {
|
|
const handleSearch = (params) => {
|
|
|
Object.assign(search, params)
|
|
Object.assign(search, params)
|
|
|
- // search.login = params.login && Number(params.login)
|
|
|
|
|
- // console.log(params.login, 12);
|
|
|
|
|
- search.platform = loginOptions.find(item => item.value === params.login)?.platform || ''
|
|
|
|
|
|
|
+ search.login = params.login && Number(params.login)
|
|
|
|
|
+ search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
|
|
|
|
|
+ if (!search.platform) return
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value.refreshTable()
|
|
tableRef.value.refreshTable()
|
|
|
})
|
|
})
|
|
@@ -150,7 +150,8 @@ const handleSearch = (params) => {
|
|
|
|
|
|
|
|
const handleReset = (params) => {
|
|
const handleReset = (params) => {
|
|
|
Object.assign(search, params)
|
|
Object.assign(search, params)
|
|
|
- search.platform = loginOptions.find(item => item.value === params.login)?.platform || ''
|
|
|
|
|
|
|
+ search.platform = loginOptions.find(item => item.value == params.login)?.platform || ''
|
|
|
|
|
+ if (!search.platform) return
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
tableRef.value.refreshTable()
|
|
tableRef.value.refreshTable()
|
|
|
})
|
|
})
|
|
@@ -188,10 +189,23 @@ const getProfitColorClass = (profit: any) => {
|
|
|
return n > 0 ? 'is-profit' : 'is-loss'
|
|
return n > 0 ? 'is-profit' : 'is-loss'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onLoad((e) => {
|
|
|
|
|
|
|
+onLoad(async (e) => {
|
|
|
|
|
+ let targetLogin: number | null = null
|
|
|
if (e.login) {
|
|
if (e.login) {
|
|
|
- search.login = Number(e.login)
|
|
|
|
|
|
|
+ targetLogin = Number(e.login)
|
|
|
}
|
|
}
|
|
|
|
|
+ await new Promise<void>(resolve => {
|
|
|
|
|
+ const stopWatch = watch([isLoaded, isSuccess], ([loaded, success]) => {
|
|
|
|
|
+ if (loaded && success) {
|
|
|
|
|
+ stopWatch()
|
|
|
|
|
+ resolve()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ searchParams.value.login = targetLogin ?? loginOptions.value[0]?.value ?? null
|
|
|
|
|
+ handleSearch(searchParams.value)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|