zhb 1 月之前
父節點
當前提交
e11813f28e

+ 19 - 3
components/cwg-complex-search.vue

@@ -24,8 +24,8 @@
                                     :placeholder="field.placeholder || '请选择日期范围'" @change="handleDateChange" />
                                     :placeholder="field.placeholder || '请选择日期范围'" @change="handleDateChange" />
                             </template>
                             </template>
                             <template v-else-if="field.type === 'picker'">
                             <template v-else-if="field.type === 'picker'">
-                                <uni-data-picker style="min-width: 100px" v-model="formData[field.key]" :localdata="field.options"
-                                    :popup-title="field.popupTitle || t('State.All')"
+                                <uni-data-picker style="min-width: 100px" v-model="formData[field.key]"
+                                    :localdata="field.options" :popup-title="field.popupTitle || t('State.All')"
                                     :map="field.map || { value: 'value', text: 'label' }"
                                     :map="field.map || { value: 'value', text: 'label' }"
                                     @change="(e) => field.onChange?.(e)"
                                     @change="(e) => field.onChange?.(e)"
                                     @nodeclick="(node) => field.onNodeClick?.(node)" />
                                     @nodeclick="(node) => field.onNodeClick?.(node)" />
@@ -136,6 +136,8 @@ const props = defineProps({
 })
 })
 
 
 const emit = defineEmits(['update:modelValue', 'search', 'reset'])
 const emit = defineEmits(['update:modelValue', 'search', 'reset'])
+console.log(props.fields,12);
+
 // 获取日期字段的默认值(当前月范围或当天)
 // 获取日期字段的默认值(当前月范围或当天)
 const getDefaultDateValue = (field) => {
 const getDefaultDateValue = (field) => {
     const now = new Date()
     const now = new Date()
@@ -196,7 +198,13 @@ const initFormData = () => {
         else if (field.type === 'date' || field.type === 'daterange') {
         else if (field.type === 'date' || field.type === 'daterange') {
             initial[field.key] = getDefaultDateValue(field)
             initial[field.key] = getDefaultDateValue(field)
         }
         }
-        // 4. 其他字段默认为空字符串
+        // 4. select 类型字段特殊处理:如果没有默认值,默认选择第一个选项
+        else if (field.type === 'select' && field.options && field.options.length > 0) {
+            console.log(23,field.options,field,111);
+            
+            initial[field.key] = field.options[0].value
+        }
+        // 5. 其他字段默认为空字符串
         else {
         else {
             initial[field.key] = ''
             initial[field.key] = ''
         }
         }
@@ -286,6 +294,10 @@ const resetForm = () => {
         else if (field.type === 'date' || field.type === 'daterange') {
         else if (field.type === 'date' || field.type === 'daterange') {
             empty[field.key] = getDefaultDateValue(field)
             empty[field.key] = getDefaultDateValue(field)
         }
         }
+        // select 类型字段特殊处理:如果没有默认值,默认选择第一个选项
+        else if (field.type === 'select' && field.options && field.options.length > 0) {
+            empty[field.key] = field.options[0].value
+        }
         // 无默认值 → 清空
         // 无默认值 → 清空
         else {
         else {
             empty[field.key] = ''
             empty[field.key] = ''
@@ -321,6 +333,10 @@ const resetTempForm = () => {
         else if (field.type === 'date' || field.type === 'daterange') {
         else if (field.type === 'date' || field.type === 'daterange') {
             empty[field.key] = getDefaultDateValue(field)
             empty[field.key] = getDefaultDateValue(field)
         }
         }
+        // select 类型字段特殊处理:如果没有默认值,默认选择第一个选项
+        else if (field.type === 'select' && field.options && field.options.length > 0) {
+            empty[field.key] = field.options[0].value
+        }
         // 无默认值 → 清空
         // 无默认值 → 清空
         else {
         else {
             empty[field.key] = ''
             empty[field.key] = ''

+ 3 - 4
components/cwg-page-wrapper.vue

@@ -5,14 +5,13 @@
         :sidebarVisible="sidebarVisible" />
         :sidebarVisible="sidebarVisible" />
       <!--      占位-->
       <!--      占位-->
       <view class="fixed"></view>
       <view class="fixed"></view>
-      <cwg-header class="custom-header" :title="pageTitle" />
+      <cwg-header v-if=pageTitle class="custom-header" :title="pageTitle" />
     </cwg-match-media>
     </cwg-match-media>
     <LanguageDropdown style="width: 0;display: none;" />
     <LanguageDropdown style="width: 0;display: none;" />
     <cwg-progress />
     <cwg-progress />
     <cwg-confirm-popup />
     <cwg-confirm-popup />
 
 
     <view class="page-content" :style="{ backgroundColor: bgColor }">
     <view class="page-content" :style="{ backgroundColor: bgColor }">
-      
       <cwg-match-media :max-width="991" v-if="!isLoginPage">
       <cwg-match-media :max-width="991" v-if="!isLoginPage">
         <view class="left-sidebar" :class="{ 'sidebar-visible': sidebarVisible }">
         <view class="left-sidebar" :class="{ 'sidebar-visible': sidebarVisible }">
           <cwg-sidebar />
           <cwg-sidebar />
@@ -248,13 +247,13 @@ onShow(() => {
 
 
 @media screen and (max-width: 1504px) {
 @media screen and (max-width: 1504px) {
   .content-wrapper-padding {
   .content-wrapper-padding {
-    padding:  px2rpx(16) px2rpx(16) 0 px2rpx(16);
+    padding: px2rpx(16) px2rpx(16) 0 px2rpx(16);
   }
   }
 }
 }
 
 
 @media screen and (max-width: 991px) {
 @media screen and (max-width: 991px) {
   .content-wrapper-padding {
   .content-wrapper-padding {
-    padding:  px2rpx(16) px2rpx(16) 0 px2rpx(16);
+    padding: px2rpx(16) px2rpx(16) 0 px2rpx(16);
   }
   }
 
 
   .page-wrapper {
   .page-wrapper {

+ 2 - 2
components/cwg-tabel.vue

@@ -622,7 +622,7 @@ const handleResize = () => {
 // ========== 监听参数变化 ==========
 // ========== 监听参数变化 ==========
 watch(() => props.queryParams, () => {
 watch(() => props.queryParams, () => {
     nextTick(() => {
     nextTick(() => {
-        refreshTable()
+        // refreshTable()
     })
     })
 }, { deep: true })
 }, { deep: true })
 // ========== 生命周期 ==========
 // ========== 生命周期 ==========
@@ -632,7 +632,7 @@ onMounted(() => {
     window.addEventListener('resize', handleResize)
     window.addEventListener('resize', handleResize)
     // #endif
     // #endif
     if (props.immediate) {
     if (props.immediate) {
-        // loadData()
+        loadData()
     }
     }
 })
 })
 onUnmounted(() => {
 onUnmounted(() => {

+ 50 - 0
composables/useAccountOptions.js

@@ -0,0 +1,50 @@
+import { ref, onMounted } from 'vue'
+import { customApi } from '@/service/custom'
+import Config from '@/config/index'
+const { Code } = Config
+
+export function useAccountOptions() {
+    // 响应式数据
+    const loginOptions = ref([])
+    const isLoaded = ref(false)
+    // 获取账户列表(核心方法)
+    const getDateList = async () => {
+        try {
+            isLoaded.value = false
+            const res = await customApi.CustomDropdown({ platform: '' })
+            if (res.code === Code.StatusOK) {
+                // 格式化下拉选项
+                loginOptions.value = res.data.map(item => ({
+                    ...item,
+                    value: item.login,
+                    text: item.login
+                }))
+
+            } else {
+                uni.showToast({
+                    title: res.msg || '获取账户失败',
+                    icon: 'none'
+                })
+                loading.value = false
+            }
+        } catch (err) {
+            uni.showToast({
+                title: err.msg || '网络异常,请重试',
+                icon: 'none'
+            })
+            loading.value = false
+            console.error(err)
+        } finally {
+            isLoaded.value = true
+        }
+    }
+    // ✨ 自动执行(页面挂载后自动调用)
+    onMounted(() => {
+        getDateList()
+    })
+    return {
+        loginOptions,
+        isLoaded,
+        getDateList
+    }
+}

+ 11 - 6
pages/customer/payment-history.vue

@@ -4,7 +4,7 @@
         <view class="info-card">
         <view class="info-card">
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
                 @reset="handleReset" />
                 @reset="handleReset" />
-            <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
+            <cwg-tabel ref="tableRef" :columns="columns" :immediate="false":mobilePrimaryFields="mobilePrimaryFields"
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 <template #avatar="{ row }">
                 <template #avatar="{ row }">
                     <image :src="row.avatar" class="avatar" mode="widthFix" />
                     <image :src="row.avatar" class="avatar" mode="widthFix" />
@@ -121,7 +121,8 @@ import { useI18n } from 'vue-i18n';
 const { t, locale } = useI18n();
 const { t, locale } = useI18n();
 import { financialApi } from '@/service/financial';
 import { financialApi } from '@/service/financial';
 import { useConfirm } from '@/hooks/useConfirm'
 import { useConfirm } from '@/hooks/useConfirm'
-
+import { useAccountOptions } from '@/composables/useAccountOptions'
+const { loginOptions, isLoaded } = useAccountOptions()
 const search = ref({})
 const search = ref({})
 const typeMap = computed(() => ([
 const typeMap = computed(() => ([
     { value: null, text: t('Custom.PaymentHistory.All') },
     { value: null, text: t('Custom.PaymentHistory.All') },
@@ -230,12 +231,12 @@ const columns = computed(() => [
     },
     },
 ])
 ])
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = computed(() => [   
+const filterFields = computed(() => [
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: null },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: null },
     {
     {
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
     },
     },
-    { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
+    isLoaded.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions.value || [] },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
 ])
 ])
 
 
@@ -243,13 +244,17 @@ const searchParams = ref({})
 
 
 const handleSearch = (params) => {
 const handleSearch = (params) => {
     search.value = params
     search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })
 }
 }
 
 
-const handleReset = (emptyParams) => {
-    search.value = emptyParams
+const handleReset = (params) => {
+    search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })

+ 11 - 7
pages/customer/recording-history.vue

@@ -4,7 +4,7 @@
         <view class="info-card">
         <view class="info-card">
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
                 @reset="handleReset" />
                 @reset="handleReset" />
-            <cwg-tabel ref="tableRef" :columns="currentColumns" :queryParams="search" :api="listApi"
+            <cwg-tabel ref="tableRef" :columns="currentColumns" :immediate="false" :queryParams="search" :api="listApi"
                 :show-operation="false" :showPagination="false">
                 :show-operation="false" :showPagination="false">
                 <!-- 状态列自定义渲染 -->
                 <!-- 状态列自定义渲染 -->
                 <template #status="{ row }">
                 <template #status="{ row }">
@@ -35,6 +35,8 @@ import { computed, ref, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { useI18n } from 'vue-i18n';
 const { t, locale } = useI18n();
 const { t, locale } = useI18n();
 import { customApi } from '@/service/custom';
 import { customApi } from '@/service/custom';
+import { useAccountOptions } from '@/composables/useAccountOptions'
+const { loginOptions, isLoaded } = useAccountOptions()
 import useUserStore from "@/stores/use-user-store";
 import useUserStore from "@/stores/use-user-store";
 const userStore = useUserStore();
 const userStore = useUserStore();
 const userInfo = computed(() => userStore.userInfo);
 const userInfo = computed(() => userStore.userInfo);
@@ -240,24 +242,26 @@ const getColumnsByType = (type: number) => {
     }
     }
 }
 }
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = computed(() => [   
+const filterFields = computed(() => [
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
-    { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
+    isLoaded.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions.value || [] },
     { 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) => {
-    console.log(params)
-    
     search.value = params
     search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })
 }
 }
 
 
-const handleReset = (emptyParams) => {
-    search.value = emptyParams
+const handleReset = (params) => {
+    search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })

+ 12 - 38
pages/customer/trade-history.vue

@@ -5,7 +5,7 @@
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
                 @reset="handleReset" />
                 @reset="handleReset" />
 
 
-            <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
+            <cwg-tabel ref="tableRef" :columns="columns" :immediate="false" :mobilePrimaryFields="mobilePrimaryFields"
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 <template #symbol="{ row }">
                 <template #symbol="{ row }">
                     <view class="symbol-cell">
                     <view class="symbol-cell">
@@ -32,34 +32,9 @@ import { computed, ref, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { useI18n } from 'vue-i18n';
 const { t, locale } = useI18n();
 const { t, locale } = useI18n();
 import { customApi } from '@/service/custom';
 import { customApi } from '@/service/custom';
-const search = ref({
-    "reportType": 3,
-    "agentId": "",
-    "groupType": null,
-    "login": "",
-    "cId": "700101",
-    "customName": "",
-    "ibNo": "",
-    "symbol": "",
-    "cmdName": null,
-    "platform": "MT4",
-    "salesNo": "",
-    "salesName": "",
-    "dwType": null,
-    "customType": 0,
-    "rankingType": 1,
-    "loginTypes": [],
-    "isShort": 0,
-    "detail_type": 1,
-    "date": [
-        "1970-01-01",
-        "2026-03-27"
-    ],
-    "startDate": "1970-01-01",
-    "endDate": "2026-03-27",
-    "orderColumn": null,
-    "orderType": null,
-})
+import { useAccountOptions } from '@/composables/useAccountOptions'
+const { loginOptions, isLoaded } = useAccountOptions()
+const search = ref()
 const typeMap = computed(() => ([
 const typeMap = computed(() => ([
     { value: null, text: t('Custom.PaymentHistory.All') },
     { value: null, text: t('Custom.PaymentHistory.All') },
     { value: 1, text: t('Custom.PaymentHistory.Deposit') },
     { value: 1, text: t('Custom.PaymentHistory.Deposit') },
@@ -160,26 +135,25 @@ const mobilePrimaryFields = computed(() => [
 ])
 ])
 
 
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = computed(() => [   
-        
-    { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
-    { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
-    {
-        key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
-    },
+const filterFields = computed(() => [
+    isLoaded.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions.value || [] },
     { 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) => {
     search.value = params
     search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if (!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })
 }
 }
 
 
-const handleReset = (emptyParams) => {
-    search.value = emptyParams
+const handleReset = (params) => {
+    search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if (!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })

+ 14 - 46
pages/customer/trade-position.vue

@@ -4,15 +4,15 @@
         <view class="info-card">
         <view class="info-card">
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
             <cwg-complex-search :fields="filterFields" v-model="searchParams" @search="handleSearch"
                 @reset="handleReset" />
                 @reset="handleReset" />
-            <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
+            <cwg-tabel ref="tableRef" :columns="columns" :immediate="false" :mobilePrimaryFields="mobilePrimaryFields"
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 :queryParams="search" :api="listApi" :show-operation="false" :showPagination="false">
                 <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>
@@ -31,40 +31,9 @@ import { computed, ref, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { useI18n } from 'vue-i18n';
 const { t, locale } = useI18n();
 const { t, locale } = useI18n();
 import { customApi } from '@/service/custom';
 import { customApi } from '@/service/custom';
-const search = ref(
-    {
-        "reportType": 3,
-        "agentId": null,
-        "groupType": null,
-        "login": "",
-        "cId": "",
-        "customName": "",
-        "ibNo": "",
-        "symbol": "",
-        "cmdName": "",
-        "platform": "MT4",
-        "salesNo": "",
-        "salesName": "",
-        "dwType": null,
-        "customType": 0,
-        "rankingType": 1,
-        "loginTypes": [],
-        "isShort": 0,
-        "detail_type": 4,
-        "date": [
-            "1970-01-01",
-            "2026-03-27"
-        ],
-        "startDate": "1970-01-01",
-        "endDate": "2026-03-27",
-        "orderColumn": null,
-        "orderType": null,
-        "page": {
-            "current": 1,
-            "row": 10
-        }
-    }
-)
+import { useAccountOptions } from '@/composables/useAccountOptions'
+const { loginOptions, isLoaded } = useAccountOptions()
+const search = ref()
 const typeMap = computed(() => ([
 const typeMap = computed(() => ([
     { value: null, text: t('Custom.PaymentHistory.All') },
     { value: null, text: t('Custom.PaymentHistory.All') },
     { value: 1, text: t('Custom.PaymentHistory.Deposit') },
     { value: 1, text: t('Custom.PaymentHistory.Deposit') },
@@ -160,26 +129,25 @@ const mobilePrimaryFields = computed(() => [
 ])
 ])
 
 
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = computed(() => [   
-        
-    { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
-    { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
-    {
-        key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
-    },
+const filterFields = computed(() => [
+    isLoaded.value && { key: 'login', type: 'select', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), options: loginOptions.value || [] },
     { 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) => {
     search.value = params
     search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })
 }
 }
 
 
-const handleReset = (emptyParams) => {
-    search.value = emptyParams
+const handleReset = (params) => {
+    search.value = params
+    search.value.platform = loginOptions.value.find(item => item.value === params.login)?.platform || ''
+    if(!search.value.platform) return
     nextTick(() => {
     nextTick(() => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })

+ 16 - 5
utils/pdf.js

@@ -3,16 +3,27 @@ const { Host80 } = Config
 import getWebBase from '@/utils/webBase'
 import getWebBase from '@/utils/webBase'
 const webBase = getWebBase()
 const webBase = getWebBase()
 // utils/pdf.js 或直接在组件 methods 中定义
 // utils/pdf.js 或直接在组件 methods 中定义
-export function openLocalPdf(fileName, title) {
+export function openLocalPdf(fileName, title, type = 'pdf') {
   // #ifdef H5
   // #ifdef H5
   // H5 端直接打开相对路径,会被浏览器渲染或下载(取决于浏览器配置)
   // H5 端直接打开相对路径,会被浏览器渲染或下载(取决于浏览器配置)
-  window.open(`${Host80}${webBase}static/${fileName}`);
+  if (type === 'pdf') {
+    window.open(`${Host80}${webBase}static/${fileName}`);
+  } else if (type === 'pdf1') {
+    window.open(`${fileName}`);
+  }
+
   // #endif
   // #endif
 
 
   // #ifdef APP-PLUS
   // #ifdef APP-PLUS
   // App 端:将静态资源路径转为系统绝对路径,再用 uni.openDocument 调用系统阅读器打开
   // App 端:将静态资源路径转为系统绝对路径,再用 uni.openDocument 调用系统阅读器打开
-  uni.navigateTo({
-    url: `/pages/common/webview?url=${encodeURIComponent(`${Host80}${webBase}static/${fileName}`)}&title=${title}`  
-  });
+  if (type === 'pdf') {
+    uni.navigateTo({
+      url: `/pages/common/webview?url=${encodeURIComponent(`${Host80}${webBase}static/${fileName}`)}&title=${title}`
+    });
+  } else if (type === 'pdf1') {
+    uni.navigateTo({
+      url: `/pages/common/webview?url=${encodeURIComponent(`${fileName}`)}&title=${title}`
+    });
+  }
   // #endif
   // #endif
 }
 }