Преглед на файлове

更换游戏选择组件

ith5 преди 5 месеца
родител
ревизия
bcd001b378

+ 86 - 109
src/views/v1/advert/gamePackage/edit.vue

@@ -7,15 +7,9 @@
     :mask-closable="false"
     :ok-loading="loading"
     @cancel="close"
-    @before-ok="submit"
-  >
+    @before-ok="submit">
     <!-- 表单信息 start -->
-    <a-form
-      ref="formRef"
-      :model="formData"
-      :rules="rules"
-      :auto-label-width="true"
-    >
+    <a-form ref="formRef" :model="formData" :rules="rules" :auto-label-width="true">
       <a-form-item label="游戏" field="game_id">
         <!-- <a-select
           v-model="formData.game_id"
@@ -30,7 +24,7 @@
             :label="`${item.id}:${item.name}:${item.package_name}`"
           />
         </a-select> -->
-        <a-tree-select
+        <!-- <a-tree-select
           v-model="formData.game_id"
           :data="gameListTree"
           tree-checked-strategy="child"
@@ -41,21 +35,12 @@
           allow-clear
           placeholder="请选择游戏"
         >
-        </a-tree-select>
+        </a-tree-select> -->
+        <game-select v-model="formData.game_id" />
       </a-form-item>
       <a-form-item label="所属媒体" field="media_id">
-        <a-select
-          v-model="formData.media_id"
-          placeholder="请选择媒体ID"
-          allow-clear
-          @change="handleMediaChange"
-        >
-          <a-option
-            v-for="item in mediaOptions"
-            :key="item.id"
-            :value="item.id"
-            :label="`${item.id}:${item.name}`"
-          />
+        <a-select v-model="formData.media_id" placeholder="请选择媒体ID" allow-clear @change="handleMediaChange">
+          <a-option v-for="item in mediaOptions" :key="item.id" :value="item.id" :label="`${item.id}:${item.name}`" />
         </a-select>
       </a-form-item>
       <a-form-item label="母包名称" field="name">
@@ -72,10 +57,7 @@
         </template>
       </a-form-item>
       <a-form-item label="母包包名" field="package_name">
-        <a-input
-          v-model="formData.package_name"
-          placeholder="请输入母包包名com.xxx"
-        />
+        <a-input v-model="formData.package_name" placeholder="请输入母包包名com.xxx" />
         <template #extra>
           <div>格式:com.gamegame.game.jrtt</div>
         </template>
@@ -90,10 +72,7 @@
           <a-input v-model="formData.package_id" placeholder="请输入母包ID" />
         </a-form-item>
         <a-form-item label="账号ID" field="advertiser_id">
-          <a-input
-            v-model="formData.advertiser_id"
-            placeholder="请输入账号ID"
-          />
+          <a-input v-model="formData.advertiser_id" placeholder="请输入账号ID" />
         </a-form-item>
       </div>
     </a-form>
@@ -102,105 +81,103 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed } from "vue";
-import tool from "@/utils/tool";
-import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/advert/gamePackage";
-import advertCommonApi from "../../api/advert/common";
-import centerCommonApi from "../../api/center/common";
-import commonApi from "../../api/common";
-
-const emit = defineEmits(["success"]);
+import { ref, reactive, computed } from 'vue'
+import tool from '@/utils/tool'
+import { Message } from '@arco-design/web-vue'
+import api from '../../api/advert/gamePackage'
+import advertCommonApi from '../../api/advert/common'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
+
+const emit = defineEmits(['success'])
 // 引用定义
-const visible = ref(false);
-const loading = ref(false);
-const formRef = ref();
-const mode = ref("");
-const mediaOptions = ref([]);
-const gameOptions = ref([]);
-const gameListTree = ref([]);
+const visible = ref(false)
+const loading = ref(false)
+const formRef = ref()
+const mode = ref('')
+const mediaOptions = ref([])
+const gameOptions = ref([])
+const gameListTree = ref([])
 
 let title = computed(() => {
-  return "母包管理" + (mode.value == "add" ? "-新增" : "-编辑");
-});
+  return '母包管理' + (mode.value == 'add' ? '-新增' : '-编辑')
+})
 
 // 表单初始值
 const initialFormData = {
   id: null,
   media_id: null,
   game_id: null,
-  name: "",
-  package_name: "",
-  appid: "0",
-  letter: "",
-};
+  name: '',
+  package_name: '',
+  appid: '0',
+  letter: '',
+}
 
 // 表单信息
-const formData = reactive({ ...initialFormData });
+const formData = reactive({ ...initialFormData })
 
 // 验证规则
 const rules = {
-  media_id: [{ required: true, message: "媒体ID必需填写" }],
-  game_id: [{ required: true, message: "游戏ID必需填写" }],
-  name: [{ required: true, message: "母包名称必需填写" }],
-  package_name: [{ required: true, message: "母包包名com.xxx必需填写" }],
-  appid: [{ required: true, message: "媒体APPID必需填写" }],
-};
+  media_id: [{ required: true, message: '媒体ID必需填写' }],
+  game_id: [{ required: true, message: '游戏ID必需填写' }],
+  name: [{ required: true, message: '母包名称必需填写' }],
+  package_name: [{ required: true, message: '母包包名com.xxx必需填写' }],
+  appid: [{ required: true, message: '媒体APPID必需填写' }],
+}
 
 // 打开弹框
-const open = async (type = "add") => {
-  mode.value = type;
+const open = async (type = 'add') => {
+  mode.value = type
   // 重置表单数据
-  Object.assign(formData, initialFormData);
-  formRef.value.clearValidate();
-  visible.value = true;
-  await initPage();
-};
+  Object.assign(formData, initialFormData)
+  formRef.value.clearValidate()
+  visible.value = true
+  await initPage()
+}
 
 // 游戏ID改变
 const handleGameChange = (value) => {
-  console.log(value);
+  console.log(value)
   if (value) {
-    const media = mediaOptions.value.find(
-      (item) => item.id === formData.media_id
-    );
-    const game = gameOptions.value.find((item) => item.id === value);
+    const media = mediaOptions.value.find((item) => item.id === formData.media_id)
+    const game = gameOptions.value.find((item) => item.id === value)
     if (media) {
-      formData.name = `${game.name}(${media.name})`;
+      formData.name = `${game.name}(${media.name})`
     } else {
-      formData.name = game.name;
+      formData.name = game.name
     }
-    formData.package_name = game.package_name;
+    formData.package_name = game.package_name
   }
-};
+}
 
 // 媒体ID改变
 const handleMediaChange = (value) => {
   if (value) {
-    const media = mediaOptions.value.find((item) => item.id === value);
-    const game = gameOptions.value.find((item) => item.id === formData.game_id);
+    const media = mediaOptions.value.find((item) => item.id === value)
+    const game = gameOptions.value.find((item) => item.id === formData.game_id)
     if (game) {
-      formData.name = `${game.name}(${media.name})`;
+      formData.name = `${game.name}(${media.name})`
     } else {
-      formData.name = `(${media.name})`;
+      formData.name = `(${media.name})`
     }
   }
-};
+}
 
 // 初始化页面数据
 const initPage = async () => {
-  await getMediaOptions();
+  await getMediaOptions()
   // await getGameOptions();
-  await getGameListTree();
-};
+  await getGameListTree()
+}
 
 // 获取媒体列表Options
 const getMediaOptions = async () => {
-  const res = await advertCommonApi.getMediaOptionsApi();
+  const res = await advertCommonApi.getMediaOptionsApi()
   if (res.code == 200) {
-    mediaOptions.value = res.data;
+    mediaOptions.value = res.data
   }
-};
+}
 
 // // 获取游戏列表
 // const getGameOptions = async () => {
@@ -211,51 +188,51 @@ const getMediaOptions = async () => {
 // };
 
 const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true });
+  const resp = await commonApi.getGameListTreeApi({ single: true })
   if (resp.code === 200) {
-    gameListTree.value = resp.data;
+    gameListTree.value = resp.data
   }
-};
+}
 
 // 设置数据
 const setFormData = async (data) => {
   for (const key in formData) {
     if (data[key] != null && data[key] != undefined) {
-      formData[key] = data[key];
+      formData[key] = data[key]
     }
   }
-};
+}
 
 // 数据保存
 const submit = async (done) => {
-  const validate = await formRef.value?.validate();
+  const validate = await formRef.value?.validate()
   if (!validate) {
-    loading.value = true;
-    let data = { ...formData };
-    let result = {};
-    if (mode.value === "add") {
+    loading.value = true
+    let data = { ...formData }
+    let result = {}
+    if (mode.value === 'add') {
       // 添加数据
-      data.id = undefined;
-      result = await api.save(data);
+      data.id = undefined
+      result = await api.save(data)
     } else {
       // 修改数据
-      result = await api.update(data.id, data);
+      result = await api.update(data.id, data)
     }
     if (result.code === 200) {
-      Message.success("操作成功");
-      emit("success");
-      done(true);
+      Message.success('操作成功')
+      emit('success')
+      done(true)
     }
     // 防止连续点击提交
     setTimeout(() => {
-      loading.value = false;
-    }, 500);
+      loading.value = false
+    }, 500)
   }
-  done(false);
-};
+  done(false)
+}
 
 // 关闭弹窗
-const close = () => (visible.value = false);
+const close = () => (visible.value = false)
 
-defineExpose({ open, setFormData });
+defineExpose({ open, setFormData })
 </script>

+ 54 - 64
src/views/v1/advert/gamePackage/index.vue

@@ -1,26 +1,16 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-select
-              v-model="searchForm.media_id"
-              placeholder="请选择媒体ID"
-              allow-clear
-            >
+            <a-select v-model="searchForm.media_id" placeholder="请选择媒体ID" allow-clear>
               <a-option
                 v-for="item in mediaOptions"
                 :key="item.id"
                 :value="item.id"
-                :label="`${item.id}:${item.name}`"
-              />
+                :label="`${item.id}:${item.name}`" />
             </a-select>
           </a-form-item>
         </a-col>
@@ -38,7 +28,7 @@
                 :label="`${item.id}:${item.name}`"
               />
             </a-select> -->
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameListTree"
               tree-checked-strategy="child"
@@ -49,15 +39,14 @@
               allow-clear
               placeholder="请选择游戏"
             >
-            </a-tree-select>
+            </a-tree-select> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
       </template>
 
       <!-- Table 自定义渲染 -->
-      <template #letter="{ record }">
-        {{ record.game_id }}_{{ record.letter }}
-      </template>
+      <template #letter="{ record }"> {{ record.game_id }}_{{ record.letter }} </template>
     </sa-table>
 
     <!-- 编辑表单 -->
@@ -66,27 +55,28 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import advertCommonApi from "../../api/advert/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import advertCommonApi from '../../api/advert/common'
 // import centerCommonApi from "../../api/center/common";
-import api from "../../api/advert/gamePackage";
-import commonApi from "../../api/common";
+import api from '../../api/advert/gamePackage'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const mediaOptions = ref([]);
-const gameOptions = ref([]);
-const gameListTree = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const mediaOptions = ref([])
+const gameOptions = ref([])
+const gameListTree = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  media_id: "",
-  game_id: "",
-});
+  media_id: '',
+  game_id: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -94,56 +84,56 @@ const options = reactive({
   rowSelection: { showCheckedAll: true },
   add: {
     show: true,
-    auth: ["/v1/gameLog/GamePackage/save"],
+    auth: ['/v1/gameLog/GamePackage/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: true,
-    auth: ["/v1/gameLog/GamePackage/update"],
+    auth: ['/v1/gameLog/GamePackage/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: false,
-    auth: ["/v1/gameLog/GamePackage/destroy"],
+    auth: ['/v1/gameLog/GamePackage/destroy'],
     func: async (params) => {
-      const resp = await api.destroy(params);
+      const resp = await api.destroy(params)
       if (resp.code === 200) {
-        Message.success(`删除成功!`);
-        crudRef.value?.refresh();
+        Message.success(`删除成功!`)
+        crudRef.value?.refresh()
       }
     },
   },
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "游戏ID", dataIndex: "game_id", width: 80 },
-  { title: "母包名称", dataIndex: "name", width: 220 },
-  { title: "打包目录", dataIndex: "letter", width: 120 },
-  { title: "包名", dataIndex: "package_name", width: 180 },
-  { title: "APPID(头条)", dataIndex: "tt_appid", width: 180 },
-  { title: "账号ID(头条)", dataIndex: "tt_advertiser_id", width: 180 },
-]);
+  { title: '游戏ID', dataIndex: 'game_id', width: 80 },
+  { title: '母包名称', dataIndex: 'name', width: 220 },
+  { title: '打包目录', dataIndex: 'letter', width: 120 },
+  { title: '包名', dataIndex: 'package_name', width: 180 },
+  { title: 'APPID(头条)', dataIndex: 'tt_appid', width: 180 },
+  { title: '账号ID(头条)', dataIndex: 'tt_advertiser_id', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
   // await getGameOptions();
-  await getMediaOptions();
-  await getGameListTree();
-};
+  await getMediaOptions()
+  await getGameListTree()
+}
 
 // 获取媒体列表
 const getMediaOptions = async () => {
-  const resp = await advertCommonApi.getMediaOptionsApi();
+  const resp = await advertCommonApi.getMediaOptionsApi()
   if (resp.code === 200) {
-    mediaOptions.value = resp.data;
+    mediaOptions.value = resp.data
   }
-};
+}
 
 // 获取游戏列表
 // const getGameOptions = async () => {
@@ -154,20 +144,20 @@ const getMediaOptions = async () => {
 // };
 
 const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true });
+  const resp = await commonApi.getGameListTreeApi({ single: true })
   if (resp.code === 200) {
-    gameListTree.value = resp.data;
+    gameListTree.value = resp.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 52 - 67
src/views/v1/advert/gamePackageLog/index.vue

@@ -1,16 +1,11 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameListTree"
               tree-checked-strategy="child"
@@ -20,36 +15,25 @@
               allow-search
               allow-clear
               placeholder="请选择游戏"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="渠道ID" field="agent_id">
-            <a-input
-              v-model="searchForm.agent_id"
-              placeholder="请输入渠道ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位ID" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位ID" allow-clear />
           </a-form-item>
         </a-col>
       </template>
 
-      <template #site_id="{ record }">
-        [{{ record.site_id }}] {{ record.site_name }}
-      </template>
+      <template #site_id="{ record }"> [{{ record.site_id }}] {{ record.site_name }} </template>
 
-      <template #agent_id="{ record }">
-        [{{ record.agent_id }}] {{ record.agent_name }}
-      </template>
+      <template #agent_id="{ record }"> [{{ record.agent_id }}] {{ record.agent_name }} </template>
 
       <!-- Table 自定义渲染 -->
     </sa-table>
@@ -60,22 +44,23 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/advert/gamePackageLog";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/advert/gamePackageLog'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const gameListTree = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const gameListTree = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_name: "",
-});
+  game_name: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -84,71 +69,71 @@ const options = reactive({
   operationColumn: false,
   add: {
     show: false,
-    auth: ["/v1/gameLog/GamePackLog/save"],
+    auth: ['/v1/gameLog/GamePackLog/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: false,
-    auth: ["/v1/gameLog/GamePackLog/update"],
+    auth: ['/v1/gameLog/GamePackLog/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: false,
-    auth: ["/v1/gameLog/GamePackLog/destroy"],
+    auth: ['/v1/gameLog/GamePackLog/destroy'],
     func: async (params) => {
-      const resp = await api.destroy(params);
+      const resp = await api.destroy(params)
       if (resp.code === 200) {
-        Message.success(`删除成功!`);
-        crudRef.value?.refresh();
+        Message.success(`删除成功!`)
+        crudRef.value?.refresh()
       }
     },
   },
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "广告位ID", dataIndex: "site_id", width: 120 },
-  { title: "渠道ID", dataIndex: "agent_id", width: 120 },
-  { title: "游戏", dataIndex: "game_name", width: 160 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 120 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 120 },
+  { title: '游戏', dataIndex: 'game_name', width: 160 },
 
-  { title: "目录", dataIndex: "letter", width: 180 },
-  { title: "icon", dataIndex: "icon", type: "image", width: 120 },
+  { title: '目录', dataIndex: 'letter', width: 180 },
+  { title: 'icon', dataIndex: 'icon', type: 'image', width: 120 },
   {
-    title: "状态",
-    dataIndex: "status",
-    type: "dict",
-    dict: "package_status",
+    title: '状态',
+    dataIndex: 'status',
+    type: 'dict',
+    dict: 'package_status',
     width: 180,
   },
-  { title: "创建时间", dataIndex: "create_time", width: 180, type: "date" },
-  { title: "更新时间", dataIndex: "update_time", width: 180, type: "date" },
-]);
+  { title: '创建时间', dataIndex: 'create_time', width: 180, type: 'date' },
+  { title: '更新时间', dataIndex: 'update_time', width: 180, type: 'date' },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  await getGameListTree();
-};
+  await getGameListTree()
+}
 
 const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true });
+  const resp = await commonApi.getGameListTreeApi({ single: true })
   if (resp.code === 200) {
-    gameListTree.value = resp.data;
+    gameListTree.value = resp.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 14 - 12
src/views/v1/advert/mediaCost/edit.vue

@@ -17,18 +17,19 @@
       :auto-label-width="true"
     >
       <a-form-item label="投放游戏" field="game_id">
-        <a-select
-          v-model="formData.game_id"
-          allow-search
-          placeholder="请选择投放游戏"
-        >
-          <a-option
-            v-for="item in gameOptions"
-            :key="item.value"
-            :value="item.value"
-            :label="item.label"
-          />
-        </a-select>
+<!--        <a-select-->
+<!--          v-model="formData.game_id"-->
+<!--          allow-search-->
+<!--          placeholder="请选择投放游戏"-->
+<!--        >-->
+<!--          <a-option-->
+<!--            v-for="item in gameOptions"-->
+<!--            :key="item.value"-->
+<!--            :value="item.value"-->
+<!--            :label="item.label"-->
+<!--          />-->
+<!--        </a-select>-->
+        <game-select v-model="formData.game_id"  />
       </a-form-item>
       <a-form-item label="广告位ID" field="site_id">
         <a-input v-model="formData.site_id" placeholder="请输入广告位ID" />
@@ -60,6 +61,7 @@ import tool from "@/utils/tool";
 import { Message, Modal } from "@arco-design/web-vue";
 import api from "../../api/advert/mediaCost";
 import centerCommonApi from "../../api/center/common";
+import GameSelect from "@cps/game-select/index.vue";
 
 const emit = defineEmits(["success"]);
 // 引用定义

+ 3 - 25
src/views/v1/advert/mediaCost/index.vue

@@ -20,31 +20,7 @@
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="投放游戏" field="game_id">
-            <!-- <a-select
-              v-model="searchForm.game_id"
-              placeholder="请选择投放游戏"
-              allow-clear
-              allow-search
-            >
-              <a-option
-                v-for="item in gameOptions"
-                :key="item.id"
-                :value="item.id"
-                :label="`${item.id}:${item.name}`"
-              />
-            </a-select> -->
-            <a-tree-select
-              v-model="searchForm.game_id"
-              :data="gameListTree"
-              tree-checked-strategy="child"
-              :tree-checkable="true"
-              :max-tag-count="2"
-              :fieldNames="{ title: 'name', key: 'id' }"
-              allow-search
-              allow-clear
-              placeholder="请选择游戏"
-            >
-            </a-tree-select>
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -137,6 +113,8 @@ import EditForm from "./edit.vue";
 import api from "../../api/advert/mediaCost";
 import commonAdvertApi from "../../api/advert/common";
 import commonApi from "../../api/common";
+import GameSelect from "@/components/game-select/index.vue";
+
 
 // 引用定义
 const crudRef = ref();

+ 32 - 43
src/views/v1/center/gamePayChannel/index.vue

@@ -1,28 +1,16 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <a-select
-              v-model="searchForm.game_id"
-              :options="[]"
-              placeholder="请选择游戏"
-              allow-clear
-            />
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
       </template>
 
-      <template #game_id="{ record }">
-        {{ record.game_id }}:{{ record.game_name }}
-      </template>
+      <template #game_id="{ record }"> {{ record.game_id }}:{{ record.game_name }} </template>
 
       <!-- Table 自定义渲染 -->
     </sa-table>
@@ -33,20 +21,21 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/center/gamePayChannel";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/center/gamePayChannel'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-});
+  game_id: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -54,42 +43,42 @@ const options = reactive({
   rowSelection: { showCheckedAll: true },
   add: {
     show: true,
-    auth: ["/v1/center/GamePayChannel/save"],
+    auth: ['/v1/center/GamePayChannel/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: true,
-    auth: ["/v1/center/GamePayChannel/update"],
+    auth: ['/v1/center/GamePayChannel/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "游戏", dataIndex: "game_id", width: 180 },
-  { title: "内购", dataIndex: "inapp_name", width: 180 },
-  { title: "微信wap", dataIndex: "wechat_wap_name", width: 180 },
-  { title: "支付宝wap", dataIndex: "alipay_wap_name", width: 180 },
-  { title: "微信扫码", dataIndex: "wechat_scan_name", width: 180 },
-  { title: "微信公众号", dataIndex: "wechat_jsapi_name", width: 180 },
-]);
+  { title: '游戏', dataIndex: 'game_id', width: 180 },
+  { title: '内购', dataIndex: 'inapp_name', width: 180 },
+  { title: '微信wap', dataIndex: 'wechat_wap_name', width: 180 },
+  { title: '支付宝wap', dataIndex: 'alipay_wap_name', width: 180 },
+  { title: '微信扫码', dataIndex: 'wechat_scan_name', width: 180 },
+  { title: '微信公众号', dataIndex: 'wechat_jsapi_name', width: 180 },
+])
 
 // 页面数据初始化
-const initPage = async () => {};
+const initPage = async () => {}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 49 - 63
src/views/v1/customer/reconciliation/payChannelIncome/index.vue

@@ -3,15 +3,11 @@
     <a-card :bordered="false">
       <a-row>
         <a-col :flex="1">
-          <a-form
-            :model="searchForm"
-            ref="searchFormRef"
-            :auto-label-width="true"
-          >
+          <a-form :model="searchForm" ref="searchFormRef" :auto-label-width="true">
             <a-row :gutter="10">
               <a-col :sm="8" :xs="24">
                 <a-form-item label="游戏" field="game_id">
-                  <a-tree-select
+                  <!-- <a-tree-select
                     v-model="searchForm.game_id"
                     :data="allGameOptions"
                     placeholder="请选择游戏"
@@ -21,7 +17,8 @@
                     tree-checked-strategy="child"
                     :tree-checkable="true"
                     :max-tag-count="1"
-                  />
+                  /> -->
+                  <game-select v-model="searchForm.game_id" multiple />
                 </a-form-item>
               </a-col>
               <a-col :sm="8" :xs="24">
@@ -31,14 +28,10 @@
                     :options="payChannelOptions"
                     allow-clear
                     placeholder="请选择充值渠道"
-                    multiple
-                  >
-                    <a-option
-                      v-for="item in payChannelOptions"
-                      :key="item.id"
-                      :value="item.id"
-                      >{{ item.name }}</a-option
-                    >
+                    multiple>
+                    <a-option v-for="item in payChannelOptions" :key="item.id" :value="item.id">{{
+                      item.name
+                    }}</a-option>
                   </a-select>
                 </a-form-item>
               </a-col>
@@ -51,30 +44,25 @@
                     allow-clear
                     :max-date="new Date()"
                     :min-date="new Date('2025-01-01')"
-                    :allow-clear="false"
-                  />
+                    :allow-clear="false" />
                 </a-form-item>
               </a-col>
             </a-row>
           </a-form>
         </a-col>
-        <a-col
-          :xs="24"
-          :sm="8"
-          :style="{ textAlign: 'right', marginBottom: '15px' }"
-        >
+        <a-col :xs="24" :sm="8" :style="{ textAlign: 'right', marginBottom: '15px' }">
           <a-space direction="horizontal" :size="20">
             <a-button type="primary" @click="getChannelIncome">
               <template #icon>
                 <icon-search />
               </template>
-              {{ "搜索" }}
+              {{ '搜索' }}
             </a-button>
             <a-button @click="resetSearch">
               <template #icon>
                 <icon-refresh />
               </template>
-              {{ "重置" }}
+              {{ '重置' }}
             </a-button>
           </a-space>
         </a-col>
@@ -86,45 +74,43 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import api from "../../../api/customer/reconciliation";
-import commonApi from "../../../api/common";
-import dayjs from "dayjs";
+import { onMounted, ref, reactive } from 'vue'
+import api from '../../../api/customer/reconciliation'
+import commonApi from '../../../api/common'
+import dayjs from 'dayjs'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const data = ref([]);
-const allGameOptions = ref([]);
-const payChannelOptions = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const data = ref([])
+const allGameOptions = ref([])
+const payChannelOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-  pay_channel_id: "",
-});
+  game_id: '',
+  pay_channel_id: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
   rowSelection: { showCheckedAll: false },
-});
+})
 
 // SaTable 列配置
-const columns = ref([]);
+const columns = ref([])
 
 // 页面数据初始化
 const initPage = async () => {
   // await getGameOptions();
-  await getGameListTree();
-  await getPayChannelOptions();
+  await getGameListTree()
+  await getPayChannelOptions()
   // 默认充值日期最近7天
-  searchForm.value.pay_date = [
-    dayjs().subtract(7, "day").format("YYYY-MM-DD"),
-    dayjs().format("YYYY-MM-DD"),
-  ];
-  await getChannelIncome();
-};
+  searchForm.value.pay_date = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+  await getChannelIncome()
+}
 
 // 获取子游戏options
 // const getGameOptions = async () => {
@@ -133,35 +119,35 @@ const initPage = async () => {
 // };
 
 const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi();
-  allGameOptions.value = res.data;
-};
+  const res = await commonApi.getGameListTreeNoAuthApi()
+  allGameOptions.value = res.data
+}
 
 const getPayChannelOptions = async () => {
-  const res = await commonApi.getPayChannelOptionsApi();
-  payChannelOptions.value = res.data;
-};
+  const res = await commonApi.getPayChannelOptionsApi()
+  payChannelOptions.value = res.data
+}
 
 const getChannelIncome = async () => {
   let params = {
     ...searchForm.value,
-  };
+  }
   if (params.pay_channel_id) {
-    params.pay_channel_id = params.pay_channel_id.join(",");
+    params.pay_channel_id = params.pay_channel_id.join(',')
   }
-  const res = await api.getPageList(params);
-  columns.value = res.data.columns;
-  data.value = res.data.data;
-};
+  const res = await api.getPageList(params)
+  columns.value = res.data.columns
+  data.value = res.data.data
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
+  initPage()
   // refresh();
-});
+})
 </script>

+ 53 - 72
src/views/v1/customer/roleData/index.vue

@@ -1,11 +1,6 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
@@ -23,7 +18,7 @@
                 [{{ item.id }}] {{ item.name }}
               </a-option>
             </a-select> -->
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="allGameOptions"
               placeholder="请选择游戏"
@@ -32,43 +27,28 @@
               allow-search
               tree-checked-strategy="child"
               :tree-checkable="false"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户UID" field="uid">
-            <a-input
-              v-model="searchForm.uid"
-              placeholder="请输入用户UID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.uid" placeholder="请输入用户UID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="角色ID" field="role_id">
-            <a-input
-              v-model="searchForm.role_id"
-              placeholder="请输入角色ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.role_id" placeholder="请输入角色ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="角色名" field="role_name">
-            <a-input
-              v-model="searchForm.role_name"
-              placeholder="请输入角色名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.role_name" placeholder="请输入角色名" allow-clear />
           </a-form-item>
         </a-col>
       </template>
@@ -94,26 +74,27 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/customer/roleData";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/customer/roleData'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const allGameOptions = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const allGameOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-  user_name: "",
-  uid: "",
-  role_id: "",
-  role_name: "",
-});
+  game_id: '',
+  user_name: '',
+  uid: '',
+  role_id: '',
+  role_name: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -122,41 +103,41 @@ const options = reactive({
 
   edit: {
     show: true,
-    auth: ["/v1/customer/RoleData/update"],
+    auth: ['/v1/customer/RoleData/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
   {
-    title: "游戏",
-    dataIndex: "game_id",
+    title: '游戏',
+    dataIndex: 'game_id',
     width: 180,
   },
-  { title: "用户名", dataIndex: "user_name", width: 180 },
-  { title: "用户UID", dataIndex: "uid", width: 180 },
-  { title: "服务器名", dataIndex: "server_name", width: 180 },
-  { title: "角色ID", dataIndex: "role_id", width: 180 },
-  { title: "角色名", dataIndex: "role_name", width: 180 },
-  { title: "累计充值", dataIndex: "total_recharge", width: 180 },
-  { title: "媒体ID", dataIndex: "media_id", width: 180 },
-  { title: "渠道ID", dataIndex: "agent_id", width: 180 },
-  { title: "广告位ID", dataIndex: "site_id", width: 180 },
-  { title: "注册IP地址", dataIndex: "ip", width: 180 },
-  { title: "账号最后登录时间", dataIndex: "login_time", width: 220 },
-  { title: "角色最后充值时间", dataIndex: "last_recharge_time", width: 220 },
-  { title: "角色创建时间", dataIndex: "create_time", width: 180 },
-]);
+  { title: '用户名', dataIndex: 'user_name', width: 180 },
+  { title: '用户UID', dataIndex: 'uid', width: 180 },
+  { title: '服务器名', dataIndex: 'server_name', width: 180 },
+  { title: '角色ID', dataIndex: 'role_id', width: 180 },
+  { title: '角色名', dataIndex: 'role_name', width: 180 },
+  { title: '累计充值', dataIndex: 'total_recharge', width: 180 },
+  { title: '媒体ID', dataIndex: 'media_id', width: 180 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 180 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 180 },
+  { title: '注册IP地址', dataIndex: 'ip', width: 180 },
+  { title: '账号最后登录时间', dataIndex: 'login_time', width: 220 },
+  { title: '角色最后充值时间', dataIndex: 'last_recharge_time', width: 220 },
+  { title: '角色创建时间', dataIndex: 'create_time', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
   // await getGameOptions();
-  await getGameListTree();
-};
+  await getGameListTree()
+}
 
 // 获取子游戏options
 // const getGameOptions = async () => {
@@ -165,18 +146,18 @@ const initPage = async () => {
 // };
 
 const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi({ single: 1 });
-  allGameOptions.value = res.data;
-};
+  const res = await commonApi.getGameListTreeNoAuthApi({ single: 1 })
+  allGameOptions.value = res.data
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
+  initPage()
   // refresh();
-});
+})
 </script>

+ 81 - 121
src/views/v1/customer/sdkOrder/index.vue

@@ -1,11 +1,6 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
@@ -24,7 +19,7 @@
                 [{{ item.id }}] {{ item.name }}
               </a-option>
             </a-select> -->
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="allGameOptions"
               placeholder="请选择游戏"
@@ -34,84 +29,48 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="日期" field="pay_date">
-            <a-range-picker
-              v-model="searchForm.pay_date"
-              :show-time="false"
-              mode="date"
-              style="width: 100%"
-            />
+            <a-range-picker v-model="searchForm.pay_date" :show-time="false" mode="date" style="width: 100%" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="账号" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入账号"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入账号" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="角色ID" field="role_id">
-            <a-input
-              v-model="searchForm.role_id"
-              placeholder="请输入角色ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.role_id" placeholder="请输入角色ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="订单号" field="orderid">
-            <a-input
-              v-model="searchForm.orderid"
-              placeholder="请输入订单号"
-              allow-clear
-            />
+            <a-input v-model="searchForm.orderid" placeholder="请输入订单号" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="交易订单号" field="tradeid">
-            <a-input
-              v-model="searchForm.tradeid"
-              placeholder="请输入交易订单号"
-              allow-clear
-            />
+            <a-input v-model="searchForm.tradeid" placeholder="请输入交易订单号" allow-clear />
           </a-form-item>
         </a-col>
       </template>
 
       <!-- Table 自定义渲染 -->
-      <template #game_id="{ record }">
-        [{{ record.game_id }}] {{ record.game_name }}
-      </template>
+      <template #game_id="{ record }"> [{{ record.game_id }}] {{ record.game_name }} </template>
       <template #sync_status="{ record }">
         <!-- 1成功 2失败 3处理中 -->
-        <a-tag
-          :color="
-            record.sync_status === 1
-              ? 'green'
-              : record.sync_status === 2
-              ? 'red'
-              : 'blue'
-          "
-        >
-          {{
-            record.sync_status === 1
-              ? "成功"
-              : record.sync_status === 2
-              ? "失败"
-              : "异常回调"
-          }}
+        <a-tag :color="record.sync_status === 1 ? 'green' : record.sync_status === 2 ? 'red' : 'blue'">
+          {{ record.sync_status === 1 ? '成功' : record.sync_status === 2 ? '失败' : '异常回调' }}
         </a-tag>
       </template>
       <template #send_status="{ record }">
         <a-tag :color="record.send_status === 1 ? 'green' : 'red'">
-          {{ record.send_status === 1 ? "成功" : "失败" }}
+          {{ record.send_status === 1 ? '成功' : '失败' }}
         </a-tag>
       </template>
       <template #operationCell="{ record }">
@@ -130,27 +89,28 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message, Modal } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/customer/sdkOrder";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message, Modal } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/customer/sdkOrder'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const allGameOptions = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const allGameOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  orderid: "",
-  tradeid: "",
-  game_id: "",
-  user_name: "",
-  role_id: "",
+  orderid: '',
+  tradeid: '',
+  game_id: '',
+  user_name: '',
+  role_id: '',
   pay_date: [],
-});
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -158,76 +118,76 @@ const options = reactive({
   showSummary: true,
   summary: [
     {
-      text: "总金额",
-      suffixText: "元",
+      text: '总金额',
+      suffixText: '元',
 
-      action: "totalRow",
-      dataIndex: "money",
+      action: 'totalRow',
+      dataIndex: 'money',
     },
   ],
 
   add: {
     show: false,
-    auth: ["/v1/customer/SdkOrder/save"],
+    auth: ['/v1/customer/SdkOrder/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: false,
-    auth: ["/v1/customer/SdkOrder/update"],
+    auth: ['/v1/customer/SdkOrder/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: false,
-    auth: ["/v1/customer/SdkOrder/destroy"],
+    auth: ['/v1/customer/SdkOrder/destroy'],
     func: async (params) => {
-      const resp = await api.destroy(params);
+      const resp = await api.destroy(params)
       if (resp.code === 200) {
-        Message.success(`删除成功!`);
-        crudRef.value?.refresh();
+        Message.success(`删除成功!`)
+        crudRef.value?.refresh()
       }
     },
   },
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "充值账号", dataIndex: "user_name", width: 180 },
-  { title: "充值IP", dataIndex: "user_ip", width: 180 },
-  { title: "订单号", dataIndex: "orderid", width: 180 },
-  { title: "交易订单号", dataIndex: "tradeid", width: 180 },
-  { title: "研发订单号", dataIndex: "cp_orderid", width: 180 },
-  { title: "支付时间", dataIndex: "pay_date", width: 180 },
+  { title: '充值账号', dataIndex: 'user_name', width: 180 },
+  { title: '充值IP', dataIndex: 'user_ip', width: 180 },
+  { title: '订单号', dataIndex: 'orderid', width: 180 },
+  { title: '交易订单号', dataIndex: 'tradeid', width: 180 },
+  { title: '研发订单号', dataIndex: 'cp_orderid', width: 180 },
+  { title: '支付时间', dataIndex: 'pay_date', width: 180 },
   {
-    title: "金额",
-    dataIndex: "money",
+    title: '金额',
+    dataIndex: 'money',
     width: 180,
   },
-  { title: "充值游戏", dataIndex: "game_id", width: 180 },
+  { title: '充值游戏', dataIndex: 'game_id', width: 180 },
 
-  { title: "充值区服", dataIndex: "server_name", width: 180 },
-  { title: "角色ID", dataIndex: "role_id", width: 180 },
-  { title: "角色名", dataIndex: "role_name", width: 180 },
+  { title: '充值区服', dataIndex: 'server_name', width: 180 },
+  { title: '角色ID', dataIndex: 'role_id', width: 180 },
+  { title: '角色名', dataIndex: 'role_name', width: 180 },
 
-  { title: "支付状态", dataIndex: "sync_status", width: 180 },
-  { title: "发货状态", dataIndex: "send_status", width: 180 },
+  { title: '支付状态', dataIndex: 'sync_status', width: 180 },
+  { title: '发货状态', dataIndex: 'send_status', width: 180 },
 
-  { title: "充值方式", dataIndex: "pay_channel_name", width: 180 },
+  { title: '充值方式', dataIndex: 'pay_channel_name', width: 180 },
 
-  { title: "支付返回值", dataIndex: "sync_result", width: 180 },
-  { title: "回调信息", dataIndex: "sync_data", width: 180 },
+  { title: '支付返回值', dataIndex: 'sync_result', width: 180 },
+  { title: '回调信息', dataIndex: 'sync_data', width: 180 },
 
-  { title: "SDK版本", dataIndex: "sdk_version", width: 180 },
-]);
+  { title: 'SDK版本', dataIndex: 'sdk_version', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  await getGameListTree();
-};
+  await getGameListTree()
+}
 
 // 获取子游戏options
 // const getGameOptions = async () => {
@@ -236,36 +196,36 @@ const initPage = async () => {
 // };
 
 const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi();
-  allGameOptions.value = res.data;
-};
+  const res = await commonApi.getGameListTreeNoAuthApi()
+  allGameOptions.value = res.data
+}
 
 // 补发
 const handleSend = async (record) => {
-  console.log(record);
+  console.log(record)
   Modal.info({
-    title: "补发",
-    content: "确定要补发吗?",
-    okText: "确定",
-    cancelText: "取消",
+    title: '补发',
+    content: '确定要补发吗?',
+    okText: '确定',
+    cancelText: '取消',
     onOk: async () => {
-      const resp = await api.send(record.orderid);
+      const resp = await api.send(record.orderid)
       if (resp.code === 200) {
-        Message.success(`操作成功,请稍后刷新`);
-        crudRef.value?.refresh();
+        Message.success(`操作成功,请稍后刷新`)
+        crudRef.value?.refresh()
       }
     },
-  });
-};
+  })
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
+  initPage()
   // refresh();
-});
+})
 </script>

+ 47 - 70
src/views/v1/gameLog/roleData/index.vue

@@ -1,16 +1,11 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏名" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameList"
               placeholder="请选择游戏"
@@ -20,43 +15,28 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-input
-              v-model="searchForm.media_id"
-              placeholder="请输入媒体ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.media_id" placeholder="请输入媒体ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位id" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位id"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位id" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="负责人ID" field="auth_id">
-            <a-input
-              v-model="searchForm.auth_id"
-              placeholder="请输入负责人ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.auth_id" placeholder="请输入负责人ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -66,8 +46,7 @@
               v-model="searchForm.reg_time"
               :show-time="false"
               mode="date"
-              placeholder="请选择注册日期"
-            />
+              placeholder="请选择注册日期" />
           </a-form-item>
         </a-col>
       </template>
@@ -75,10 +54,7 @@
       <!-- Table 自定义渲染 -->
       <template #roles="{ record }">
         <div v-if="record && record.roles && record.roles.length > 0">
-          <p
-            v-for="(role, index) in record.roles"
-            :key="`${role.role_name}-${index}`"
-          >
+          <p v-for="(role, index) in record.roles" :key="`${role.role_name}-${index}`">
             {{ role.server_name }} {{ role.role_name }} ({{ role.role_level }})
           </p>
         </div>
@@ -91,25 +67,26 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import api from "../../api/gameLog/roleData";
-import dayjs from "dayjs";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import api from '../../api/gameLog/roleData'
+import dayjs from 'dayjs'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const gameList = ref([]);
+const crudRef = ref()
+const gameList = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-  media_id: "",
-  site_id: "",
-  auth_id: "",
-  user_name: "",
-  reg_time: "",
-});
+  game_id: '',
+  media_id: '',
+  site_id: '',
+  auth_id: '',
+  user_name: '',
+  reg_time: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -117,43 +94,43 @@ const options = reactive({
   rowSelection: { showCheckedAll: true },
   operationColumn: false,
   showSort: false,
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "用户名", dataIndex: "user_name", width: 120 },
-  { title: "游戏名", dataIndex: "game_name", width: 120 },
-  { title: "渠道id", dataIndex: "agent_id", width: 100 },
-  { title: "广告位id", dataIndex: "site_id", width: 100 },
-  { title: "注册IP", dataIndex: "ip", width: 180 },
-  { title: "注册时间", dataIndex: "create_time", width: 180 },
-  { title: "角色信息", width: 180, dataIndex: "roles" },
-  { title: "渠道名", dataIndex: "agent_name", width: 120 },
-  { title: "负责人", dataIndex: "auth_name", width: 120 },
-]);
+  { title: '用户名', dataIndex: 'user_name', width: 120 },
+  { title: '游戏名', dataIndex: 'game_name', width: 120 },
+  { title: '渠道id', dataIndex: 'agent_id', width: 100 },
+  { title: '广告位id', dataIndex: 'site_id', width: 100 },
+  { title: '注册IP', dataIndex: 'ip', width: 180 },
+  { title: '注册时间', dataIndex: 'create_time', width: 180 },
+  { title: '角色信息', width: 180, dataIndex: 'roles' },
+  { title: '渠道名', dataIndex: 'agent_name', width: 120 },
+  { title: '负责人', dataIndex: 'auth_name', width: 120 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  searchForm.value.reg_time = dayjs().format("YYYY-MM-DD");
-  await getGameList();
-};
+  searchForm.value.reg_time = dayjs().format('YYYY-MM-DD')
+  await getGameList()
+}
 
 // 获取游戏列表
 const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi();
+  const res = await commonApi.getGameListTreeApi()
   if (res.code === 200) {
-    gameList.value = res.data;
+    gameList.value = res.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 62 - 87
src/views/v1/gameLog/sdkLoginLog/index.vue

@@ -1,25 +1,16 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameList"
               placeholder="请选择游戏"
@@ -29,43 +20,28 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-input
-              v-model="searchForm.media_id"
-              placeholder="请输入媒体ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.media_id" placeholder="请输入媒体ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="渠道id" field="agent_id">
-            <a-input
-              v-model="searchForm.agent_id"
-              placeholder="请输入渠道id"
-              allow-clear
-            />
+            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道id" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位id" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位id"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位id" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="负责人ID" field="auth_id">
-            <a-input
-              v-model="searchForm.auth_id"
-              placeholder="请输入负责人ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.auth_id" placeholder="请输入负责人ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -75,8 +51,7 @@
               v-model="searchForm.login_time"
               :show-time="false"
               mode=""
-              placeholder="请选择登录日期"
-            />
+              placeholder="请选择登录日期" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -86,16 +61,15 @@
               v-model="searchForm.reg_time"
               :show-time="false"
               mode=""
-              placeholder="请选择注册日期"
-            />
+              placeholder="请选择注册日期" />
           </a-form-item>
         </a-col>
       </template>
       <template #login_time="{ record }">
-        {{ dayjs(record.login_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
+        {{ dayjs(record.login_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
       </template>
       <template #reg_time="{ record }">
-        {{ dayjs(record.reg_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
+        {{ dayjs(record.reg_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
       </template>
 
       <!-- Table 自定义渲染 -->
@@ -107,82 +81,83 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/gameLog/sdkLoginLog";
-import commonApi from "../../api/common";
-import dayjs from "dayjs";
-const gameList = ref([]);
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/gameLog/sdkLoginLog'
+import commonApi from '../../api/common'
+import dayjs from 'dayjs'
+import GameSelect from '@/components/game-select/index.vue'
+const gameList = ref([])
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
 
 // 搜索表单
 const searchForm = ref({
-  user_name: "",
-  game_id: "",
-  media_id: "",
-  agent_id: "",
-  site_id: "",
-  auth_id: "",
-  login_time: "",
-  reg_time: "",
-});
+  user_name: '',
+  game_id: '',
+  media_id: '',
+  agent_id: '',
+  site_id: '',
+  auth_id: '',
+  login_time: '',
+  reg_time: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
   rowSelection: { showCheckedAll: true },
   operationColumn: false,
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "用户名", dataIndex: "user_name", width: 80 },
-  { title: "游戏", dataIndex: "game_name", width: 120 },
-  { title: "媒体ID", dataIndex: "media_id", width: 80 },
-  { title: "广告位id", dataIndex: "site_id", width: 100 },
-  { title: "登录IP", dataIndex: "ip", width: 180 },
-  { title: "登录IMEI/IDFA", dataIndex: "imei", width: 180 },
-  { title: "登录OAID/CID", dataIndex: "oaid", width: 180 },
+  { title: '用户名', dataIndex: 'user_name', width: 80 },
+  { title: '游戏', dataIndex: 'game_name', width: 120 },
+  { title: '媒体ID', dataIndex: 'media_id', width: 80 },
+  { title: '广告位id', dataIndex: 'site_id', width: 100 },
+  { title: '登录IP', dataIndex: 'ip', width: 180 },
+  { title: '登录IMEI/IDFA', dataIndex: 'imei', width: 180 },
+  { title: '登录OAID/CID', dataIndex: 'oaid', width: 180 },
 
-  { title: "登录时间", dataIndex: "login_time", width: 140 },
-  { title: "注册时间", dataIndex: "reg_time", width: 140 },
+  { 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: 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 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  searchForm.value.login_time = dayjs().format("YYYY-MM-DD");
-  await getGameList();
-};
+  searchForm.value.login_time = dayjs().format('YYYY-MM-DD')
+  await getGameList()
+}
 
 // 获取游戏列表
 const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi();
+  const res = await commonApi.getGameListTreeApi()
   if (res.code === 200) {
-    gameList.value = res.data;
+    gameList.value = res.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 64 - 112
src/views/v1/gameLog/sdkOrderRank/index.vue

@@ -1,16 +1,11 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏名" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameList"
               placeholder="请选择游戏"
@@ -20,101 +15,60 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-select
-              v-model="searchForm.media_id"
-              :options="[]"
-              placeholder="请选择媒体ID"
-              allow-clear
-            />
+            <a-select v-model="searchForm.media_id" :options="[]" placeholder="请选择媒体ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="负责人" field="auth_id">
-            <a-select
-              v-model="searchForm.auth_id"
-              :options="[]"
-              placeholder="请选择负责人"
-              allow-clear
-            />
+            <a-select v-model="searchForm.auth_id" :options="[]" placeholder="请选择负责人" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="渠道ID" field="agent_id">
-            <a-input
-              v-model="searchForm.agent_id"
-              placeholder="请输入渠道ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位ID" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="服务器ID" field="server_id">
-            <a-input
-              v-model="searchForm.server_id"
-              placeholder="请输入服务器ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.server_id" placeholder="请输入服务器ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="服务器名" field="server_name">
-            <a-input
-              v-model="searchForm.server_name"
-              placeholder="请输入服务器名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.server_name" placeholder="请输入服务器名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="注册日期" field="reg_date">
-            <a-range-picker
-              v-model="searchForm.reg_date"
-              :show-time="false"
-              mode="date"
-            />
+            <a-range-picker v-model="searchForm.reg_date" :show-time="false" mode="date" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="充值日期" field="pay_date">
-            <a-range-picker
-              v-model="searchForm.pay_date"
-              :show-time="false"
-              mode="date"
-            />
+            <a-range-picker v-model="searchForm.pay_date" :show-time="false" mode="date" />
           </a-form-item>
         </a-col>
       </template>
 
-      <template #user_name="{ record }">
-        {{ record.uid }} - {{ record.user_name }}
-      </template>
+      <template #user_name="{ record }"> {{ record.uid }} - {{ record.user_name }} </template>
 
-      <template #game_name="{ record }">
-        {{ record.game_id }} - {{ record.game_name }}
-      </template>
+      <template #game_name="{ record }"> {{ record.game_id }} - {{ record.game_name }} </template>
 
       <template #alert="{ record }">
         <div>
@@ -129,11 +83,11 @@
       </template>
 
       <template #login_time="{ record }">
-        {{ dayjs(record.login_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
+        {{ dayjs(record.login_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
       </template>
 
       <template #pay_time="{ record }">
-        {{ dayjs(record.pay_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
+        {{ dayjs(record.pay_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
       </template>
 
       <!-- Table 自定义渲染 -->
@@ -142,91 +96,89 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import api from "../../api/gameLog/sdkOrderRank";
-import dayjs from "dayjs";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import api from '../../api/gameLog/sdkOrderRank'
+import dayjs from 'dayjs'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const gameList = ref([]);
+const crudRef = ref()
+const gameList = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-  media_id: "",
-  auth_id: "",
-  agent_id: "",
-  site_id: "",
-  user_name: "",
-  server_id: "",
-  server_name: "",
+  game_id: '',
+  media_id: '',
+  auth_id: '',
+  agent_id: '',
+  site_id: '',
+  user_name: '',
+  server_id: '',
+  server_name: '',
   reg_date: [],
   pay_date: [],
-});
+})
 
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  pk: "orderid",
+  pk: 'orderid',
   rowSelection: { showCheckedAll: true },
   operationColumn: false,
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "用户名", dataIndex: "user_name", width: 250 },
-  { title: "渠道ID", dataIndex: "agent_id", width: 120 },
-  { title: "广告位ID", dataIndex: "site_id", width: 120 },
+  { title: '用户名', dataIndex: 'user_name', width: 250 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 120 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 120 },
 
-  { title: "游戏名", dataIndex: "game_name", width: 120 },
+  { 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: 120 },
+  { title: '服务器名', dataIndex: 'server_name', width: 120 },
+  { title: '角色名', dataIndex: 'role_name', width: 120 },
+  { title: '角色ID', dataIndex: 'role_id', width: 120 },
 
-  { title: "支付方式", dataIndex: "pay_channel_name", width: 120 },
-  { title: "历史充值金额", dataIndex: "totalMoney", width: 120 },
-  { title: "累计充值金额", dataIndex: "searchTotalMoney", width: 120 },
+  { title: '支付方式', dataIndex: 'pay_channel_name', width: 120 },
+  { title: '历史充值金额', dataIndex: 'totalMoney', width: 120 },
+  { title: '累计充值金额', dataIndex: 'searchTotalMoney', width: 120 },
 
-  { title: "充值日期", dataIndex: "pay_date", width: 180 },
-  { title: "注册日期", dataIndex: "reg_date", width: 180 },
+  { title: '充值日期', dataIndex: 'pay_date', width: 180 },
+  { title: '注册日期', dataIndex: 'reg_date', width: 180 },
 
-  { title: "最近登录时间", dataIndex: "login_time", width: 180 },
-  { title: "最近充值时间", dataIndex: "pay_time", width: 180 },
+  { title: '最近登录时间', dataIndex: 'login_time', width: 180 },
+  { title: '最近充值时间', dataIndex: 'pay_time', width: 180 },
 
-  { title: "告警", dataIndex: "alert", width: 120 },
+  { title: '告警', dataIndex: 'alert', width: 120 },
 
-  { title: "渠道名", dataIndex: "agent_name", width: 180 },
-  { title: "负责人", dataIndex: "auth_name", width: 180 },
-]);
+  { title: '渠道名', dataIndex: 'agent_name', width: 180 },
+  { title: '负责人', dataIndex: 'auth_name', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  searchForm.value.pay_date = [
-    dayjs().format("YYYY-MM-DD"),
-    dayjs().format("YYYY-MM-DD"),
-  ];
-  await getGameList();
-};
+  searchForm.value.pay_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+  await getGameList()
+}
 
 // 获取游戏列表
 const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi();
+  const res = await commonApi.getGameListTreeApi()
   if (res.code === 200) {
-    gameList.value = res.data;
+    gameList.value = res.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 64 - 111
src/views/v1/gameLog/sdkOrderSuccess/index.vue

@@ -1,16 +1,11 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameList"
               placeholder="请选择游戏"
@@ -20,92 +15,53 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="充值日期" field="pay_date">
-            <a-range-picker
-              class="w-full"
-              v-model="searchForm.pay_date"
-              :show-time="false"
-              mode="date"
-            />
+            <a-range-picker class="w-full" v-model="searchForm.pay_date" :show-time="false" mode="date" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="注册日期" field="reg_date">
-            <a-range-picker
-              class="w-full"
-              v-model="searchForm.reg_date"
-              :show-time="false"
-              mode="date"
-            />
+            <a-range-picker class="w-full" v-model="searchForm.reg_date" :show-time="false" mode="date" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="服务器ID" field="server_id">
-            <a-input
-              v-model="searchForm.server_id"
-              placeholder="请输入服务器ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.server_id" placeholder="请输入服务器ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="服务器名" field="server_name">
-            <a-input
-              v-model="searchForm.server_name"
-              placeholder="请输入服务器名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.server_name" placeholder="请输入服务器名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-select
-              v-model="searchForm.media_id"
-              :options="[]"
-              placeholder="请选择媒体ID"
-              allow-clear
-            />
+            <a-select v-model="searchForm.media_id" :options="[]" placeholder="请选择媒体ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="负责人" field="auth_id">
-            <a-select
-              v-model="searchForm.auth_id"
-              :options="[]"
-              placeholder="请选择负责人"
-              allow-clear
-            />
+            <a-select v-model="searchForm.auth_id" :options="[]" placeholder="请选择负责人" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="渠道ID" field="agent_id">
-            <a-input
-              v-model="searchForm.agent_id"
-              placeholder="请输入渠道ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位ID" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
       </template>
@@ -114,7 +70,7 @@
 
       <template #first_payment="{ record }">
         <span>
-          {{ record.first_payment === 1 ? "是" : "否" }}
+          {{ record.first_payment === 1 ? '是' : '否' }}
         </span>
       </template>
     </sa-table>
@@ -125,99 +81,96 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/gameLog/sdkOrderSuccess";
-import dayjs from "dayjs";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/gameLog/sdkOrderSuccess'
+import dayjs from 'dayjs'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const gameList = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const gameList = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  game_id: "",
-  media_id: "",
-  auth_id: "",
-  agent_id: "",
-  site_id: "",
-  user_name: "",
-  server_id: "",
-  server_name: "",
+  game_id: '',
+  media_id: '',
+  auth_id: '',
+  agent_id: '',
+  site_id: '',
+  user_name: '',
+  server_id: '',
+  server_name: '',
   reg_date: [],
   pay_date: [],
-});
+})
 
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  pk: "orderid",
+  pk: 'orderid',
   rowSelection: { showCheckedAll: true },
   export: {
     // // 导出url
     // url: "v1/gameLog/sdkOrderSuccess/export",
-    url: "v1/gameLog/UserLog/exportRechargeDetailList",
+    url: 'v1/gameLog/UserLog/exportRechargeDetailList',
     // 显示导出按钮的权限
-    auth: ["v1/gameLog/sdkOrderSuccess/export"],
+    auth: ['v1/gameLog/sdkOrderSuccess/export'],
     // 按钮文案
-    text: "导出",
+    text: '导出',
     // 是否显示
     show: true,
   },
   operationColumn: false,
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "订单号", dataIndex: "orderid", width: 180 },
-  { title: "用户名", dataIndex: "user_name", width: 120 },
-  { title: "渠道ID", dataIndex: "agent_id", width: 120 },
-  { title: "广告位ID", dataIndex: "site_id", width: 120 },
+  { title: '订单号', dataIndex: 'orderid', width: 180 },
+  { title: '用户名', dataIndex: 'user_name', width: 120 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 120 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 120 },
 
-  { title: "游戏名", dataIndex: "game_name", width: 120 },
+  { 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: 120 },
+  { title: '服务器名', dataIndex: 'server_name', width: 120 },
 
-  { title: "支付方式", dataIndex: "pay_channel_name", width: 120 },
-  { title: "充值金额", dataIndex: "money", width: 120 },
+  { title: '支付方式', dataIndex: 'pay_channel_name', width: 120 },
+  { title: '充值金额', dataIndex: 'money', width: 120 },
 
-  { title: "充值日期", dataIndex: "pay_date", width: 180 },
-  { title: "注册日期", dataIndex: "reg_date", width: 180 },
-  { title: "是否首次充值", dataIndex: "first_payment", width: 180 },
+  { title: '充值日期', dataIndex: 'pay_date', width: 180 },
+  { title: '注册日期', dataIndex: 'reg_date', width: 180 },
+  { title: '是否首次充值', dataIndex: 'first_payment', width: 180 },
 
-  { title: "渠道名", dataIndex: "agent_name", width: 180 },
-  { title: "负责人", dataIndex: "auth_name", width: 180 },
-]);
+  { title: '渠道名', dataIndex: 'agent_name', width: 180 },
+  { title: '负责人', dataIndex: 'auth_name', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  searchForm.value.pay_date = [
-    dayjs().format("YYYY-MM-DD"),
-    dayjs().format("YYYY-MM-DD"),
-  ];
-  await getGameList();
-};
+  searchForm.value.pay_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
+  await getGameList()
+}
 
 // 获取游戏列表
 const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi();
+  const res = await commonApi.getGameListTreeApi()
   if (res.code === 200) {
-    gameList.value = res.data;
+    gameList.value = res.data
   }
-};
+}
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 57 - 82
src/views/v1/gameLog/sdkRegLog/index.vue

@@ -1,25 +1,16 @@
 <template>
   <div class="ma-content-block">
-    <sa-table
-      ref="crudRef"
-      :options="options"
-      :columns="columns"
-      :searchForm="searchForm"
-    >
+    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
       <!-- 搜索区 tableSearch -->
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="用户名" field="user_name">
-            <a-input
-              v-model="searchForm.user_name"
-              placeholder="请输入用户名"
-              allow-clear
-            />
+            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <a-tree-select
+            <!-- <a-tree-select
               v-model="searchForm.game_id"
               :data="gameList"
               placeholder="请选择游戏"
@@ -29,34 +20,23 @@
               tree-checked-strategy="child"
               :tree-checkable="true"
               :max-tag-count="1"
-            />
+            /> -->
+            <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体ID" field="media_id">
-            <a-input
-              v-model="searchForm.media_id"
-              placeholder="请输入媒体ID"
-              allow-clear
-            />
+            <a-input v-model="searchForm.media_id" placeholder="请输入媒体ID" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="渠道id" field="agent_id">
-            <a-input
-              v-model="searchForm.agent_id"
-              placeholder="请输入渠道id"
-              allow-clear
-            />
+            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道id" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="广告位id" field="site_id">
-            <a-input
-              v-model="searchForm.site_id"
-              placeholder="请输入广告位id"
-              allow-clear
-            />
+            <a-input v-model="searchForm.site_id" placeholder="请输入广告位id" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -67,25 +47,19 @@
               v-model="searchForm.reg_time"
               :show-time="false"
               placeholder="请选择注册时间"
-              :allow-clear="false"
-            />
+              :allow-clear="false" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="设备类型" field="vt">
-            <sa-select
-              v-model="searchForm.vt"
-              dict="vt"
-              placeholder="请选择设备类型"
-              allow-clear
-            />
+            <sa-select v-model="searchForm.vt" dict="vt" placeholder="请选择设备类型" allow-clear />
           </a-form-item>
         </a-col>
       </template>
 
       <!-- Table 自定义渲染 -->
       <template #reg_time="{ record }">
-        {{ dayjs(record.reg_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
+        {{ dayjs(record.reg_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}
       </template>
     </sa-table>
 
@@ -95,80 +69,81 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import api from "../../api/gameLog/sdkRegLog";
-import dayjs from "dayjs";
-import commonApi from "../../api/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/gameLog/sdkRegLog'
+import dayjs from 'dayjs'
+import commonApi from '../../api/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const gameList = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const viewRef = ref()
+const gameList = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  user_name: "",
-  game_id: "",
-  media_id: "",
-  agent_id: "",
-  site_id: "",
-  reg_time: "",
-  vt: "",
-});
+  user_name: '',
+  game_id: '',
+  media_id: '',
+  agent_id: '',
+  site_id: '',
+  reg_time: '',
+  vt: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
   rowSelection: { showCheckedAll: true },
   operationColumn: false,
-});
+})
 
 // SaTable 列配置
 const columns = reactive([
-  { title: "用户名", dataIndex: "user_name", width: 180 },
-  { title: "游戏", dataIndex: "game_name", width: 180 },
-  { title: "渠道id", dataIndex: "agent_id", width: 180 },
-  { title: "广告位id", dataIndex: "site_id", width: 180 },
-  { title: "注册IMEI/IDFA", dataIndex: "imei", width: 180 },
-  { title: "注册OAID/CID", dataIndex: "oaid", width: 180 },
+  { title: '用户名', dataIndex: 'user_name', width: 180 },
+  { title: '游戏', dataIndex: 'game_name', width: 180 },
+  { title: '渠道id', dataIndex: 'agent_id', width: 180 },
+  { title: '广告位id', dataIndex: 'site_id', width: 180 },
+  { title: '注册IMEI/IDFA', dataIndex: 'imei', width: 180 },
+  { title: '注册OAID/CID', dataIndex: 'oaid', width: 180 },
 
-  { title: "注册IP", dataIndex: "ip", width: 180 },
-  { title: "注册时间", dataIndex: "reg_time", width: 180 },
+  { title: '注册IP', dataIndex: 'ip', width: 180 },
+  { title: '注册时间', dataIndex: 'reg_time', width: 180 },
 
-  { title: "手机品牌", dataIndex: "brand", width: 180 },
-  { title: "手机型号", dataIndex: "model", width: 180 },
-  { title: "系统版本", dataIndex: "system_version", width: 180 },
-  { title: "sdk版本", dataIndex: "sdk_version", width: 180 },
-  { title: "设备类型", dataIndex: "vt", type: "dict", dict: "vt", width: 120 },
-  { title: "渠道名", dataIndex: "agent_name", width: 180 },
-  { title: "负责人", dataIndex: "auth_name", width: 180 },
-]);
+  { title: '手机品牌', dataIndex: 'brand', width: 180 },
+  { title: '手机型号', dataIndex: 'model', width: 180 },
+  { title: '系统版本', dataIndex: 'system_version', width: 180 },
+  { title: 'sdk版本', dataIndex: 'sdk_version', width: 180 },
+  { title: '设备类型', dataIndex: 'vt', type: 'dict', dict: 'vt', width: 120 },
+  { title: '渠道名', dataIndex: 'agent_name', width: 180 },
+  { title: '负责人', dataIndex: 'auth_name', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  await getGameList();
-};
+  await getGameList()
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 获取游戏列表
 const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi();
+  const res = await commonApi.getGameListTreeApi()
   if (res.code === 200) {
-    gameList.value = res.data;
+    gameList.value = res.data
   }
-};
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  searchForm.value.reg_time = dayjs().format("YYYY-MM-DD");
+  initPage()
+  searchForm.value.reg_time = dayjs().format('YYYY-MM-DD')
   // refresh();
-});
+})
 </script>