This commit is contained in:
@@ -1075,6 +1075,8 @@
|
||||
import PollingBatchDialog from '@/components/business/polling/PollingBatchDialog.vue'
|
||||
import { SCHEDULER_PERMISSIONS } from '@/config/constants/pollingScheduler'
|
||||
import { canPollingBatch, pollingScope } from '@/utils/business/pollingScheduler'
|
||||
import { firstPurchaseRange } from '@/utils/business/packageSilence'
|
||||
import FirstPurchaseCell from '@/components/business/package-silence/FirstPurchaseCell.vue'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
@@ -1614,6 +1616,7 @@
|
||||
[key: string]: any
|
||||
} = {
|
||||
enable_polling: undefined,
|
||||
first_purchase_range: [] as string[],
|
||||
status: undefined,
|
||||
network_status: undefined,
|
||||
real_name_status: undefined,
|
||||
@@ -1976,6 +1979,18 @@
|
||||
})
|
||||
|
||||
const formItems: SearchFormItem[] = baseFormItems
|
||||
formItems.push({
|
||||
label: '首次购买起止',
|
||||
prop: 'first_purchase_range',
|
||||
type: 'datetimerange',
|
||||
config: {
|
||||
rangeSeparator: '至',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
valueFormat: 'YYYY-MM-DDTHH:mm:ssZ',
|
||||
clearable: true
|
||||
}
|
||||
})
|
||||
formItems.push({
|
||||
label: '是否轮询',
|
||||
prop: 'enable_polling',
|
||||
@@ -1989,6 +2004,7 @@
|
||||
|
||||
// 列配置
|
||||
const columnOptions = [
|
||||
{ label: '首次购买套餐时间', prop: 'first_purchase_at' },
|
||||
{ label: 'ICCID', prop: 'iccid' },
|
||||
{ label: 'IMEI', prop: 'gateway_card_imei' },
|
||||
{ label: 'MSISDN', prop: 'msisdn' },
|
||||
@@ -2110,6 +2126,13 @@
|
||||
|
||||
// 动态列配置
|
||||
const { columnChecks, columns } = useCheckedColumns(() => [
|
||||
{
|
||||
prop: 'first_purchase_at',
|
||||
label: '首次购买套餐时间',
|
||||
width: 180,
|
||||
formatter: (row: StandaloneIotCard) =>
|
||||
h(FirstPurchaseCell, { assetId: row.id, assetType: 'card', time: row.first_purchase_at })
|
||||
},
|
||||
{
|
||||
prop: 'iccid',
|
||||
label: 'ICCID',
|
||||
@@ -2423,10 +2446,10 @@
|
||||
Object.entries(formFilters).forEach(([key, value]) => {
|
||||
if (value === undefined || value === null || value === '') return
|
||||
if (Array.isArray(value) && value.length === 0) return
|
||||
query[key] = value
|
||||
if (key !== 'first_purchase_range') query[key] = value
|
||||
})
|
||||
|
||||
return query
|
||||
return { ...query, ...firstPurchaseRange(formFilters.first_purchase_range) }
|
||||
})
|
||||
|
||||
const showExportDialog = () => {
|
||||
@@ -2444,8 +2467,10 @@
|
||||
const params: Record<string, any> = {
|
||||
page: pagination.page,
|
||||
page_size: pagination.pageSize,
|
||||
...formFilters
|
||||
...formFilters,
|
||||
...firstPurchaseRange(formFilters.first_purchase_range)
|
||||
}
|
||||
delete params.first_purchase_range
|
||||
Object.keys(params).forEach((key) => {
|
||||
if (params[key] === '' || params[key] === undefined) {
|
||||
delete params[key]
|
||||
|
||||
Reference in New Issue
Block a user