|
|
@@ -31,7 +31,7 @@
|
|
|
import useUserStore from '@/stores/use-user-store'
|
|
|
|
|
|
const { numberFormat } = useFilters()
|
|
|
- const { t,locale } = useI18n()
|
|
|
+ const { t, locale } = useI18n()
|
|
|
const { columnList, mobileList, platformOptions, customTypeList, groupCurrency1, groupTypeName } = useReportConst()
|
|
|
let { Code } = Config
|
|
|
const { userInfo } = useUserStore()
|
|
|
@@ -82,8 +82,6 @@
|
|
|
date: defaultDateRange,
|
|
|
})
|
|
|
|
|
|
- const filterFields = ref([])
|
|
|
-
|
|
|
const search = reactive({
|
|
|
detail_type: 1,
|
|
|
customType: 0,
|
|
|
@@ -161,8 +159,6 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- setFields()
|
|
|
-
|
|
|
} catch (error) {
|
|
|
uni.showToast({ title: 'Error', icon: 'none' })
|
|
|
}
|
|
|
@@ -373,28 +369,22 @@
|
|
|
// search.reportType = options?.type;
|
|
|
// searchParams.value.reportType = options?.type;
|
|
|
detailType.value = options?.detailType
|
|
|
- nextTick(() => {
|
|
|
- setFields()
|
|
|
- })
|
|
|
})
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
|
await initIbTree()
|
|
|
loading.value = false
|
|
|
})
|
|
|
- const setFields = () => {
|
|
|
+ const filterFields = computed(() => {
|
|
|
const fields = []
|
|
|
-
|
|
|
-
|
|
|
- fields.push({
|
|
|
- key: 'platform',
|
|
|
- type: 'select',
|
|
|
- label: t('Label.Platform'),
|
|
|
- placeholder: t('placeholder.choose'),
|
|
|
- options: platformOptions,
|
|
|
- defaultValue: 'MT4',
|
|
|
- })
|
|
|
-
|
|
|
+ fields.push({
|
|
|
+ key: 'platform',
|
|
|
+ type: 'select',
|
|
|
+ label: t('Label.Platform'),
|
|
|
+ placeholder: t('placeholder.choose'),
|
|
|
+ options: platformOptions,
|
|
|
+ defaultValue: 'MT4',
|
|
|
+ })
|
|
|
|
|
|
|
|
|
agentLevels.value.forEach((level, index) => {
|
|
|
@@ -410,46 +400,43 @@
|
|
|
})
|
|
|
|
|
|
|
|
|
- fields.push({
|
|
|
- key: 'login',
|
|
|
- type: 'input',
|
|
|
- label: t('Label.TradingAccount'),
|
|
|
- placeholder: t('Label.TradingAccount'),
|
|
|
- defaultValue: '',
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
+ fields.push({
|
|
|
+ key: 'login',
|
|
|
+ type: 'input',
|
|
|
+ label: t('Label.TradingAccount'),
|
|
|
+ placeholder: t('Label.TradingAccount'),
|
|
|
+ defaultValue: '',
|
|
|
+ })
|
|
|
|
|
|
|
|
|
- fields.push({
|
|
|
- key: 'isShort',
|
|
|
- type: 'select',
|
|
|
- label: t('placeholder.choose'),
|
|
|
- placeholder: t('placeholder.choose'),
|
|
|
- options: isShortList.value,
|
|
|
- defaultValue: 0,
|
|
|
- isSelect: true,
|
|
|
- })
|
|
|
+ fields.push({
|
|
|
+ key: 'isShort',
|
|
|
+ type: 'select',
|
|
|
+ label: t('placeholder.choose'),
|
|
|
+ placeholder: t('placeholder.choose'),
|
|
|
+ options: isShortList.value,
|
|
|
+ defaultValue: 0,
|
|
|
+ isSelect: true,
|
|
|
+ })
|
|
|
|
|
|
|
|
|
fields.push({ key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' })
|
|
|
- filterFields.value = fields
|
|
|
- }
|
|
|
-watch(locale,()=>{
|
|
|
- agentLevels.value = [
|
|
|
- {
|
|
|
- key: 'agentId_0',
|
|
|
- options: [
|
|
|
- { value: 0, text: t('news_add_field.IbReport.ALL') },
|
|
|
- { value: -1, text: t('news_add_field.IbReport.DirectlyUnder') },
|
|
|
- ],
|
|
|
- },
|
|
|
- ]
|
|
|
- nextTick(()=>{
|
|
|
- setFields()
|
|
|
-
|
|
|
+ return fields
|
|
|
+ })
|
|
|
+ watch(locale, () => {
|
|
|
+ agentLevels.value = [
|
|
|
+ {
|
|
|
+ key: 'agentId_0',
|
|
|
+ options: [
|
|
|
+ { value: 0, text: t('news_add_field.IbReport.ALL') },
|
|
|
+ { value: -1, text: t('news_add_field.IbReport.DirectlyUnder') },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ nextTick(() => {
|
|
|
+ setFields()
|
|
|
+ })
|
|
|
})
|
|
|
-})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|