|
@@ -61,13 +61,13 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :sm="6" :xs="24">
|
|
<a-col :sm="6" :xs="24">
|
|
|
- <a-form-item label="注册日期" field="reg_date">
|
|
|
|
|
- <a-range-picker v-model="searchForm.reg_date" :show-time="false" mode="date" />
|
|
|
|
|
|
|
+ <a-form-item label="注册日期" field="reg_time">
|
|
|
|
|
+ <a-range-picker v-model="searchForm.reg_time" :show-time="false" mode="date" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :sm="6" :xs="24">
|
|
<a-col :sm="6" :xs="24">
|
|
|
- <a-form-item label="充值日期" field="pay_date">
|
|
|
|
|
- <a-range-picker v-model="searchForm.pay_date" :show-time="false" mode="date" />
|
|
|
|
|
|
|
+ <a-form-item label="充值日期" field="pay_time">
|
|
|
|
|
+ <a-range-picker v-model="searchForm.pay_time" :show-time="false" mode="date" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</template>
|
|
</template>
|
|
@@ -95,7 +95,13 @@
|
|
|
<template #pay_time="{ record }">
|
|
<template #pay_time="{ record }">
|
|
|
{{ record.pay_time ? dayjs(record.pay_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }}
|
|
{{ record.pay_time ? dayjs(record.pay_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' }}
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+ <template #tableSearchExtend>
|
|
|
|
|
+ <a-space>
|
|
|
|
|
+ <a-button type="primary" @click="refreshDay('yesterday')">前一天</a-button>
|
|
|
|
|
+ <a-button type="primary" @click="refreshDay('today')">当天</a-button>
|
|
|
|
|
+ <a-button type="primary" @click="refreshDay('tomorrow')">后一天</a-button>
|
|
|
|
|
+ </a-space>
|
|
|
|
|
+ </template>
|
|
|
<!-- Table 自定义渲染 -->
|
|
<!-- Table 自定义渲染 -->
|
|
|
</sa-table>
|
|
</sa-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -123,8 +129,8 @@ const searchForm = ref({
|
|
|
user_name: '',
|
|
user_name: '',
|
|
|
server_id: '',
|
|
server_id: '',
|
|
|
server_name: '',
|
|
server_name: '',
|
|
|
- reg_date: [],
|
|
|
|
|
- pay_date: [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
|
|
|
|
|
|
|
+ reg_time: [],
|
|
|
|
|
+ pay_time: [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// SaTable 基础配置
|
|
// SaTable 基础配置
|
|
@@ -153,11 +159,10 @@ const columns = reactive([
|
|
|
{ title: '历史充值金额', dataIndex: 'totalMoney', width: 100 },
|
|
{ title: '历史充值金额', dataIndex: 'totalMoney', width: 100 },
|
|
|
{ title: '累计充值金额', dataIndex: 'searchTotalMoney', width: 100 },
|
|
{ title: '累计充值金额', dataIndex: 'searchTotalMoney', width: 100 },
|
|
|
|
|
|
|
|
- { title: '充值日期', dataIndex: 'pay_date', width: 140 },
|
|
|
|
|
- { title: '注册日期', dataIndex: 'reg_date', width: 140 },
|
|
|
|
|
|
|
+ { title: '注册时间', dataIndex: 'reg_date', width: 140 },
|
|
|
|
|
|
|
|
- { title: '最近登录时间', dataIndex: 'login_time', width: 140 },
|
|
|
|
|
{ title: '最近充值时间', dataIndex: 'pay_time', width: 140 },
|
|
{ title: '最近充值时间', dataIndex: 'pay_time', width: 140 },
|
|
|
|
|
+ { title: '最近登录时间', dataIndex: 'login_time', width: 140 },
|
|
|
|
|
|
|
|
{ title: '告警', dataIndex: 'alert', width: 80 },
|
|
{ title: '告警', dataIndex: 'alert', width: 80 },
|
|
|
|
|
|
|
@@ -183,6 +188,29 @@ const refresh = async () => {
|
|
|
crudRef.value?.refresh()
|
|
crudRef.value?.refresh()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const refreshDay = async (day) => {
|
|
|
|
|
+ switch (day) {
|
|
|
|
|
+ case 'yesterday':
|
|
|
|
|
+ searchForm.value.pay_time = [
|
|
|
|
|
+ dayjs(searchForm.value.pay_time[0]).subtract(1, 'day').format('YYYY-MM-DD'),
|
|
|
|
|
+ dayjs(searchForm.value.pay_time[1]).subtract(1, 'day').format('YYYY-MM-DD'),
|
|
|
|
|
+ ]
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'today':
|
|
|
|
|
+ searchForm.value.pay_time = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'tomorrow':
|
|
|
|
|
+ searchForm.value.pay_time = [
|
|
|
|
|
+ dayjs(searchForm.value.pay_time[0]).add(1, 'day').format('YYYY-MM-DD'),
|
|
|
|
|
+ dayjs(searchForm.value.pay_time[1]).add(1, 'day').format('YYYY-MM-DD'),
|
|
|
|
|
+ ]
|
|
|
|
|
+ break
|
|
|
|
|
+ default:
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ refresh()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 页面加载完成执行
|
|
// 页面加载完成执行
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
initPage()
|
|
initPage()
|