Ver código fonte

添加,快速筛选天

ith5 5 meses atrás
pai
commit
8443ecc5e0

+ 29 - 1
src/views/v1/gameLog/agent/index.vue

@@ -54,7 +54,12 @@
         </a-col>
       </template>
       <template #tableSearchExtend>
-        <div>
+        <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>
+        <div class="text-red-500 font-bold">
           大盘数据:注册成本 {{ total.reg_cost }}, roi {{ total.roi }}, 付费成本 {{ total.p_cost }}, 付费率
           {{ total.p_per }}
         </div>
@@ -227,6 +232,29 @@ const initPage = () => {
   searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
 }
 
+const refreshDay = async (day) => {
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).subtract(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).subtract(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    case 'today':
+      searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).add(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).add(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    default:
+      break
+  }
+  refresh()
+}
+
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 31 - 0
src/views/v1/gameLog/hour/index.vue

@@ -34,6 +34,13 @@
           </a-form-item>
         </a-col>
       </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 自定义渲染 -->
       <template #agent_name="{ record }">
@@ -180,6 +187,30 @@ const refresh = async () => {
   crudRef.value?.refresh()
 }
 
+const refreshDay = async (day) => {
+  console.log(day)
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).subtract(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).subtract(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    case 'today':
+      searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).add(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).add(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    default:
+      break
+  }
+  refresh()
+}
+
 // 页面加载完成执行
 onMounted(async () => {
   initPage()

+ 24 - 2
src/views/v1/gameLog/pay/index.vue

@@ -14,7 +14,13 @@
           </a-form-item>
         </a-col>
       </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 自定义渲染 -->
     </sa-table>
   </div>
@@ -139,7 +145,23 @@ const columns = reactive([
 const initPage = async () => {
   searchForm.value.tdate = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
 }
-
+const refreshDay = async (day) => {
+  console.log(day)
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = dayjs(searchForm.value.tdate).subtract(1, 'day').format('YYYY-MM-DD')
+      break
+    case 'today':
+      searchForm.value.tdate = dayjs().format('YYYY-MM-DD')
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = dayjs(searchForm.value.tdate).add(1, 'day').format('YYYY-MM-DD')
+      break
+    default:
+      break
+  }
+  refresh()
+}
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 25 - 2
src/views/v1/gameLog/regHour/index.vue

@@ -14,7 +14,13 @@
           </a-form-item>
         </a-col>
       </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 自定义渲染 -->
     </sa-table>
   </div>
@@ -189,7 +195,6 @@ const columns = reactive([
   { title: '21', dataIndex: 'h21', width: 80 },
   { title: '22', dataIndex: 'h22', width: 80 },
   { title: '23', dataIndex: 'h23', width: 80 },
-  { title: '24', dataIndex: 'h24', width: 80 },
 ])
 
 // 页面数据初始化
@@ -202,6 +207,24 @@ const refresh = async () => {
   crudRef.value?.refresh()
 }
 
+const refreshDay = async (day) => {
+  console.log(day)
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = dayjs(searchForm.value.tdate).subtract(1, 'day').format('YYYY-MM-DD')
+      break
+    case 'today':
+      searchForm.value.tdate = dayjs().format('YYYY-MM-DD')
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = dayjs(searchForm.value.tdate).add(1, 'day').format('YYYY-MM-DD')
+      break
+    default:
+      break
+  }
+  refresh()
+}
+
 // 页面加载完成执行
 onMounted(async () => {
   initPage()

+ 0 - 1
src/views/v1/gameLog/roleData/index.vue

@@ -87,7 +87,6 @@ const columns = reactive([
   { title: '渠道id', dataIndex: 'agent_id', width: 100 },
   { title: '广告位id', dataIndex: 'site_id', width: 100 },
   { title: '注册IP', dataIndex: 'ip', width: 180 },
-
   { title: '渠道名', dataIndex: 'agent_name', width: 120 },
   { title: '负责人', dataIndex: 'auth_name', width: 120 },
 ])

+ 11 - 11
src/views/v1/gameLog/sdkLoginLog/index.vue

@@ -112,24 +112,24 @@ const options = reactive({
 
 // SaTable 列配置
 const columns = reactive([
-  { title: '用户名', dataIndex: 'user_name', width: 120 },
+  { title: '用户名', dataIndex: 'user_name', width: 100 },
   { title: '游戏', dataIndex: 'game_name', width: 120 },
   { title: '媒体ID', dataIndex: 'media_id', width: 80 },
-  { title: '广告位id', dataIndex: 'site_id', width: 100 },
+  { title: '广告位id', dataIndex: 'site_id', width: 80 },
   { title: '登录IP', dataIndex: 'ip', width: 120 },
   { title: '登录IMEI/IDFA', dataIndex: 'imei', width: 120 },
   { title: '登录OAID/CID', dataIndex: 'oaid', width: 120 },
 
-  { title: '登录时间', dataIndex: 'login_time', width: 120 },
-  { title: '注册时间', dataIndex: 'reg_time', width: 120 },
+  { title: '登录时间', dataIndex: 'login_time', width: 140 },
+  { title: '注册时间', dataIndex: 'reg_time', width: 140 },
 
-  { title: '手机品牌', dataIndex: 'brand', width: 120 },
-  { title: '手机型号', dataIndex: 'model', width: 120 },
-  { title: '系统版本', dataIndex: 'system_version', width: 100 },
-  { title: 'sdk版本', dataIndex: 'sdk_version', width: 100 },
-  { title: '设备类型', dataIndex: 'vt', type: 'dict', dict: 'vt', width: 120 },
-  { title: '渠道名', dataIndex: 'agent_name', width: 100 },
-  { title: '负责人', dataIndex: 'auth_name', width: 100 },
+  { title: '手机品牌', dataIndex: 'brand', width: 90 },
+  { title: '手机型号', dataIndex: 'model', width: 90 },
+  { title: '系统版本', dataIndex: 'system_version', width: 70 },
+  { title: 'sdk版本', dataIndex: 'sdk_version', width: 70 },
+  { title: '设备类型', dataIndex: 'vt', type: 'dict', dict: 'vt', width: 80 },
+  { title: '渠道名', dataIndex: 'agent_name', width: 90 },
+  { title: '负责人', dataIndex: 'auth_name', width: 90 },
 ])
 
 // 获取媒体类型

+ 10 - 10
src/views/v1/gameLog/sdkOrderRank/index.vue

@@ -93,7 +93,7 @@
       </template>
 
       <template #pay_time="{ record }">
-        {{ 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>
 
       <!-- Table 自定义渲染 -->
@@ -145,19 +145,19 @@ const columns = reactive([
   { title: '游戏名', dataIndex: 'game_name', width: 120 },
 
   // { title: "服务器ID", dataIndex: "server_id", width: 120 },
-  { title: '服务器名', dataIndex: 'server_name', width: 120 },
-  { title: '角色名', dataIndex: 'role_name', width: 120 },
-  { title: '角色ID', dataIndex: 'role_id', width: 80 },
+  { title: '服务器名', dataIndex: 'server_name', width: 100 },
+  { title: '角色名', dataIndex: 'role_name', width: 100 },
+  { title: '角色ID', dataIndex: 'role_id', width: 60 },
 
   { title: '支付方式', dataIndex: 'pay_channel_name', width: 120 },
-  { title: '历史充值金额', dataIndex: 'totalMoney', width: 120 },
-  { title: '累计充值金额', dataIndex: 'searchTotalMoney', width: 120 },
+  { title: '历史充值金额', dataIndex: 'totalMoney', width: 100 },
+  { title: '累计充值金额', dataIndex: 'searchTotalMoney', width: 100 },
 
-  { title: '充值日期', dataIndex: 'pay_date', width: 180 },
-  { title: '注册日期', dataIndex: 'reg_date', width: 180 },
+  { title: '充值日期', dataIndex: 'pay_date', width: 140 },
+  { title: '注册日期', dataIndex: 'reg_date', width: 140 },
 
-  { title: '最近登录时间', dataIndex: 'login_time', width: 180 },
-  { title: '最近充值时间', dataIndex: 'pay_time', width: 180 },
+  { title: '最近登录时间', dataIndex: 'login_time', width: 140 },
+  { title: '最近充值时间', dataIndex: 'pay_time', width: 140 },
 
   { title: '告警', dataIndex: 'alert', width: 80 },
 

+ 10 - 10
src/views/v1/gameLog/sdkOrderSuccess/index.vue

@@ -125,25 +125,25 @@ const options = reactive({
 
 // SaTable 列配置
 const columns = reactive([
-  { title: '订单号', dataIndex: 'order_id', width: 180 },
+  { title: '订单号', dataIndex: 'order_id', width: 110 },
   { title: '用户名', dataIndex: 'user_name', width: 120 },
-  { title: '渠道ID', dataIndex: 'agent_id', width: 120 },
-  { title: '广告位ID', dataIndex: 'site_id', width: 120 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 80 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 80 },
 
   { title: '游戏名', dataIndex: 'game_name', width: 120 },
 
-  { title: '服务器ID', dataIndex: 'server_id', width: 120 },
-  { title: '服务器名', dataIndex: 'server_name', width: 120 },
+  { title: '服务器ID', dataIndex: 'server_id', width: 80 },
+  { title: '服务器名', dataIndex: 'server_name', width: 90 },
 
   { title: '支付方式', dataIndex: 'pay_channel_name', width: 120 },
-  { title: '充值金额', dataIndex: 'money', width: 120 },
+  { title: '充值金额', dataIndex: 'money', width: 100 },
 
-  { title: '充值日期', dataIndex: 'pay_date', width: 120 },
-  { title: '注册日期', dataIndex: 'reg_date', width: 120 },
-  { title: '是否首次充值', dataIndex: 'first_payment', width: 120 },
+  { title: '充值日期', dataIndex: 'pay_date', width: 140 },
+  { title: '注册日期', dataIndex: 'reg_date', width: 140 },
+  { title: '首次充值', dataIndex: 'first_payment', width: 80 },
 
   { title: '渠道名', dataIndex: 'agent_name', width: 120 },
-  { title: '负责人', dataIndex: 'auth_name', width: 90 },
+  { title: '负责人', dataIndex: 'auth_name', width: 70 },
 ])
 
 // 获取媒体类型

+ 31 - 1
src/views/v1/gameLog/site/index.vue

@@ -52,7 +52,13 @@
           </a-form-item>
         </a-col>
       </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 自定义渲染 -->
     </sa-table>
   </div>
@@ -238,6 +244,30 @@ const refresh = async () => {
   crudRef.value?.refresh()
 }
 
+const refreshDay = async (day) => {
+  console.log(day)
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).subtract(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).subtract(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    case 'today':
+      searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).add(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).add(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    default:
+      break
+  }
+  refresh()
+}
+
 // 页面加载完成执行
 onMounted(async () => {
   initPage()

+ 31 - 2
src/views/v1/material/cost/index.vue

@@ -49,7 +49,13 @@
           </a-form-item>
         </a-col>
       </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 自定义渲染 -->
     </sa-table>
   </div>
@@ -171,7 +177,7 @@ const columns = reactive([
 
 // 页面数据初始化
 const initPage = async () => {
-  searchForm.value.tdate[0] = dayjs().subtract(8, 'day').format('YYYY-MM-DD')
+  searchForm.value.tdate[0] = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
   searchForm.value.tdate[1] = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
 }
 
@@ -180,6 +186,29 @@ const refresh = async () => {
   crudRef.value?.refresh()
 }
 
+const refreshDay = async (day) => {
+  switch (day) {
+    case 'yesterday':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).subtract(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).subtract(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    case 'today':
+      searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+      break
+    case 'tomorrow':
+      searchForm.value.tdate = [
+        dayjs(searchForm.value.tdate[0]).add(1, 'day').format('YYYY-MM-DD'),
+        dayjs(searchForm.value.tdate[1]).add(1, 'day').format('YYYY-MM-DD'),
+      ]
+      break
+    default:
+      break
+  }
+  refresh()
+}
+
 // 页面加载完成执行
 onMounted(async () => {
   initPage()