ith5 5 месяцев назад
Родитель
Сommit
ebe06b6c82

+ 2 - 1
src/components/game-select/index.vue

@@ -27,9 +27,10 @@ const props = defineProps({
   },
 })
 
-const emit = defineEmits(['update:modelValue'])
+const emit = defineEmits(['update:modelValue', 'change'])
 const onUpdate = (val) => {
   emit('update:modelValue', val)
+  emit('change', val)
 }
 const gameListTree = ref([])
 

+ 67 - 97
src/views/v1/advert/agentSite/link-debug-form.vue

@@ -8,28 +8,17 @@
     :ok-loading="loading"
     @cancel="close"
     @before-ok="submit"
-    :footer="false"
-  >
+    :footer="false">
     <!-- 表单信息 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="media_id">
         <a-select v-model="formData.media_id" placeholder="请选择推广媒体">
-          <a-option
-            v-for="item in mediaOptions"
-            :key="item.id"
-            :value="item.id"
-            :label="item.name"
-          />
+          <a-option v-for="item in mediaOptions" :key="item.id" :value="item.id" :label="item.name" />
         </a-select>
       </a-form-item>
 
       <a-form-item label="推送游戏" field="game_id">
-        <a-tree-select
+        <!-- <a-tree-select
           v-model="formData.game_id"
           :data="gameOptions"
           tree-checked-strategy="child"
@@ -39,23 +28,17 @@
           allow-search
           allow-clear
           placeholder="请选择游戏"
-        />
+        /> -->
+        <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" />
         <template #extra>
-          <Space>
-            {{ formData.site_name }}, 渠道ID:{{ formData.agent_id }}
-          </Space>
+          <Space> {{ formData.site_name }}, 渠道ID:{{ formData.agent_id }} </Space>
         </template>
       </a-form-item>
-      <a-button
-        type="primary"
-        class="w-[200px] ml-auto mr-auto"
-        @click="generateParams"
-        >生成参数</a-button
-      >
+      <a-button type="primary" class="w-[200px] ml-auto mr-auto" @click="generateParams">生成参数</a-button>
       <Divider />
     </a-form>
     <a-form ref="paramsFormRef" :model="paramsData">
@@ -65,11 +48,7 @@
       <a-form-item label="APPID" field="appid">
         <a-input readonly v-model="paramsData.appid" />
       </a-form-item>
-      <a-form-item
-        label="下载链接"
-        field="download_url"
-        v-if="paramsData.download_url"
-      >
+      <a-form-item label="下载链接" field="download_url" v-if="paramsData.download_url">
         <a-input readonly v-model="paramsData.download_url" />
       </a-form-item>
       <a-form-item label="包名" field="package_name">
@@ -88,99 +67,90 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed } from "vue";
-import { Divider, Modal, Space } from "@arco-design/web-vue";
-import tool from "@/utils/tool";
-import commonApi from "../../api/common";
-import agentSiteApi from "../../api/advert/agentSite";
-import centerGameApi from "../../api/center/game";
+import { ref, reactive, computed } from 'vue'
+import { Divider, Modal, Space } from '@arco-design/web-vue'
+import tool from '@/utils/tool'
+import commonApi from '../../api/common'
+import agentSiteApi from '../../api/advert/agentSite'
+import GameSelect from '@/components/game-select/index.vue'
+import centerGameApi from '../../api/center/game'
 
-const emit = defineEmits(["success"]);
+const emit = defineEmits(['success'])
 
 // 引用定义
-const formRef = ref();
-const mode = ref("");
-const visible = ref(false);
-const loading = ref(false);
-const siteIds = ref();
-const paramsFormRef = ref();
-
-const mediaOptions = ref([]);
-const gameOptions = ref([]);
+const formRef = ref()
+const mode = ref('')
+const visible = ref(false)
+const loading = ref(false)
+const siteIds = ref()
+const paramsFormRef = ref()
+
+const mediaOptions = ref([])
+
 const paramsData = reactive({
-  site_info: "",
-});
+  site_info: '',
+})
 
 let title = computed(() => {
-  return "联调";
-});
+  return '联调'
+})
 
 // 表单初始值
 const initialFormData = {
-  media_id: "",
-  game_id: "",
-  site_id: "",
-  site_name: "",
-  agent_id: "",
-};
+  media_id: '',
+  game_id: '',
+  site_id: '',
+  site_name: '',
+  agent_id: '',
+}
 
 // 表单信息
-const formData = reactive({ ...initialFormData });
+const formData = reactive({ ...initialFormData })
 
 // 验证规则
 const rules = {
-  media_id: [{ required: true, message: "推广媒体不能为空" }],
-  game_id: [{ required: true, message: "推送游戏不能为空" }],
-  site_id: [{ required: true, message: "广告位ID不能为空" }],
-};
+  media_id: [{ required: true, message: '推广媒体不能为空' }],
+  game_id: [{ required: true, message: '推送游戏不能为空' }],
+  site_id: [{ required: true, message: '广告位ID不能为空' }],
+}
 
 // 打开弹框
-const open = async (type = "ks") => {
-  mode.value = type;
+const open = async (type = 'ks') => {
+  mode.value = type
   // 重置表单数据
-  Object.assign(formData, initialFormData);
-  formRef.value.clearValidate();
-  formRef.value.resetFields();
-  paramsFormRef.value?.resetFields();
+  Object.assign(formData, initialFormData)
+  formRef.value.clearValidate()
+  formRef.value.resetFields()
+  paramsFormRef.value?.resetFields()
 
-  visible.value = true;
-  await initPage();
-};
+  visible.value = true
+  await initPage()
+}
 
 // 初始化页面数据
 const initPage = async () => {
-  await getMediaOptions();
-  await getGameOptions();
-};
+  await getMediaOptions()
+}
 
 // 获取媒体列表Options
 const getMediaOptions = async () => {
-  const res = await commonApi.getMediaOptionsApi();
-  if (res.code == 200) {
-    mediaOptions.value = res.data;
-  }
-};
-
-// 获取游戏列表Options
-const getGameOptions = async () => {
-  const res = await commonApi.getGameListTreeApi({ single: true });
+  const res = await commonApi.getMediaOptionsApi()
   if (res.code == 200) {
-    gameOptions.value = res.data;
+    mediaOptions.value = res.data
   }
-};
+}
 
 // 设置数据
 const setFormData = async (data) => {
-  console.log(data);
-  formData.agent_id = data.agent_id;
-  formData.site_name = data.name;
-  formData.media_id = data.media_id;
-  formData.site_id = data.id;
-};
+  formData.agent_id = data.agent_id
+  formData.site_name = data.name
+  formData.media_id = data.media_id
+  formData.site_id = data.id
+}
 
 // 生成参数
 const generateParams = async () => {
-  const validate = await formRef.value?.validate();
+  const validate = await formRef.value?.validate()
   if (!validate) {
     // 提交生成监测链接
     const res = await agentSiteApi.linkDebugGenerateParamsApi({
@@ -188,20 +158,20 @@ const generateParams = async () => {
       agent_id: formData.agent_id,
       site_id: formData.site_id,
       media_id: formData.media_id,
-    });
+    })
     if (res.code == 200) {
       for (const key in res.data) {
         if (res.data[key] != null && res.data[key] != undefined) {
-          paramsData[key] = res.data[key];
+          paramsData[key] = res.data[key]
         }
       }
-      paramsFormRef.value?.setFields(paramsData);
+      paramsFormRef.value?.setFields(paramsData)
     }
   }
-};
+}
 
 // 关闭弹窗
-const close = () => (visible.value = false);
+const close = () => (visible.value = false)
 
-defineExpose({ open, setFormData });
+defineExpose({ open, setFormData })
 </script>

+ 0 - 16
src/views/v1/advert/gamePackage/edit.vue

@@ -11,13 +11,6 @@
     <!-- 表单信息 start -->
     <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" placeholder="请选择游戏ID" allow-clear @change="handleGameChange">
-          <a-option
-            v-for="item in gameOptions"
-            :key="item.id"
-            :value="item.id"
-            :label="`${item.id}:${item.name}:${item.package_name}`" />
-        </a-select> -->
         <a-tree-select
           v-model="formData.game_id"
           :data="gameOptions"
@@ -30,7 +23,6 @@
           @change="handleGameChange"
           placeholder="请选择游戏">
         </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">
@@ -166,7 +158,6 @@ const handleMediaChange = (value) => {
 const initPage = async () => {
   await getMediaOptions()
   await getGameOptions()
-  await getGameListTree()
 }
 
 // 获取媒体列表Options
@@ -185,13 +176,6 @@ const getGameOptions = async () => {
   }
 }
 
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true })
-  if (resp.code === 200) {
-    gameListTree.value = resp.data
-  }
-}
-
 // 设置数据
 const setFormData = async (data) => {
   for (const key in formData) {

+ 0 - 47
src/views/v1/advert/gamePackage/index.vue

@@ -16,30 +16,6 @@
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <!-- <a-select
-              v-model="searchForm.game_id"
-              placeholder="请选择游戏ID"
-              allow-clear
-            >
-              <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="false"
-              :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>
@@ -59,18 +35,13 @@ 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 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 searchForm = ref({
@@ -81,7 +52,6 @@ const searchForm = ref({
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  rowSelection: { showCheckedAll: true },
   add: {
     show: true,
     auth: ['/v1/gameLog/GamePackage/save'],
@@ -123,9 +93,7 @@ const columns = reactive([
 
 // 页面数据初始化
 const initPage = async () => {
-  // await getGameOptions();
   await getMediaOptions()
-  await getGameListTree()
 }
 
 // 获取媒体列表
@@ -136,21 +104,6 @@ const getMediaOptions = async () => {
   }
 }
 
-// 获取游戏列表
-// const getGameOptions = async () => {
-//   const resp = await centerCommonApi.getGameOptionsApi();
-//   if (resp.code === 200) {
-//     gameOptions.value = resp.data;
-//   }
-// };
-
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true })
-  if (resp.code === 200) {
-    gameListTree.value = resp.data
-  }
-}
-
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 1 - 13
src/views/v1/advert/gamePackageLog/index.vue

@@ -54,8 +54,6 @@ import GameSelect from '@/components/game-select/index.vue'
 // 引用定义
 const crudRef = ref()
 const editRef = ref()
-const viewRef = ref()
-const gameListTree = ref([])
 
 // 搜索表单
 const searchForm = ref({
@@ -65,7 +63,6 @@ const searchForm = ref({
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  rowSelection: { showCheckedAll: true },
   operationColumn: false,
   add: {
     show: false,
@@ -115,16 +112,7 @@ const columns = reactive([
 ])
 
 // 页面数据初始化
-const initPage = async () => {
-  await getGameListTree()
-}
-
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true })
-  if (resp.code === 200) {
-    gameListTree.value = resp.data
-  }
-}
+const initPage = async () => {}
 
 // SaTable 数据请求
 const refresh = async () => {

+ 0 - 18
src/views/v1/advert/mediaAuth/index.vue

@@ -38,7 +38,6 @@ import commonApi from '../../api/common'
 const crudRef = ref()
 const editRef = ref()
 const mediaOptions = ref([])
-const gameListTree = ref([])
 
 // 搜索表单
 const searchForm = ref({
@@ -49,7 +48,6 @@ const searchForm = ref({
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  rowSelection: { showCheckedAll: true },
   add: {
     show: true,
     auth: ['/v1/gameLog/GamePackage/save'],
@@ -92,7 +90,6 @@ const columns = reactive([
 const initPage = async () => {
   // await getGameOptions();
   await getMediaOptions()
-  await getGameListTree()
 }
 
 // 获取媒体列表
@@ -103,21 +100,6 @@ const getMediaOptions = async () => {
   }
 }
 
-// 获取游戏列表
-// const getGameOptions = async () => {
-//   const resp = await centerCommonApi.getGameOptionsApi();
-//   if (resp.code === 200) {
-//     gameOptions.value = resp.data;
-//   }
-// };
-
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi({ single: true })
-  if (resp.code === 200) {
-    gameListTree.value = resp.data
-  }
-}
-
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 67 - 130
src/views/v1/advert/mediaCost/index.vue

@@ -1,21 +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="tdate">
-            <a-range-picker
-              v-model="searchForm.tdate"
-              :show-time="false"
-              mode="date"
-              class="w-full"
-            />
+            <a-range-picker v-model="searchForm.tdate" :show-time="false" mode="date" class="w-full" />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
@@ -25,75 +15,43 @@
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="媒体类型" field="media_id">
-            <a-select
-              v-model="searchForm.media_id"
-              placeholder="请选择媒体类型"
-              allow-clear
-              allow-search
-            >
+            <a-select v-model="searchForm.media_id" placeholder="请选择媒体类型" allow-clear allow-search>
               <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>
         <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="auth_id">
-            <sa-select
-              v-model="searchForm.auth_id"
-              :options="authOptions"
-              placeholder="请选择负责人"
-              allow-clear
-            />
+            <sa-select v-model="searchForm.auth_id" :options="authOptions" placeholder="请选择负责人" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="录入方式" field="add_type">
-            <sa-select
-              v-model="searchForm.add_type"
-              dict="add_type"
-              placeholder="请选择录入方式"
-              allow-clear
-            />
+            <sa-select v-model="searchForm.add_type" dict="add_type" placeholder="请选择录入方式" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="备注" field="memo">
-            <a-input
-              v-model="searchForm.memo"
-              placeholder="请输入备注"
-              allow-clear
-            />
+            <a-input v-model="searchForm.memo" placeholder="请输入备注" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="录入时间" field="create_time">
-            <a-range-picker
-              v-model="searchForm.create_time"
-              :show-time="true"
-              mode="date"
-            />
+            <a-range-picker v-model="searchForm.create_time" :show-time="true" mode="date" />
           </a-form-item>
         </a-col>
       </template>
@@ -107,34 +65,31 @@
 </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/mediaCost";
-import commonAdvertApi from "../../api/advert/common";
-import commonApi from "../../api/common";
-import GameSelect from "@/components/game-select/index.vue";
-
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/advert/mediaCost'
+import commonAdvertApi from '../../api/advert/common'
+import GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const mediaOptions = ref([]);
-const authOptions = ref([]);
-const gameListTree = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const mediaOptions = ref([])
+const authOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
   tdate: [],
-  game_id: "",
-  media_id: "",
-  agent_id: "",
-  site_id: "",
-  auth_id: "",
-  add_type: "",
-  memo: "",
+  game_id: '',
+  media_id: '',
+  agent_id: '',
+  site_id: '',
+  auth_id: '',
+  add_type: '',
+  memo: '',
   create_time: [],
-});
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -142,101 +97,83 @@ const options = reactive({
   rowSelection: { showCheckedAll: true },
   add: {
     show: true,
-    auth: ["/v1/advert/MediaCost/save"],
+    auth: ['/v1/advert/MediaCost/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: true,
-    auth: ["/v1/advert/MediaCost/update"],
+    auth: ['/v1/advert/MediaCost/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: true,
-    auth: ["/v1/advert/MediaCost/destroy"],
+    auth: ['/v1/advert/MediaCost/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: "tdate", width: 120 },
-  { title: "广告位ID", dataIndex: "site_id", width: 120 },
-  { title: "广告位名称", dataIndex: "site_name", width: 120 },
-  { title: "渠道ID", dataIndex: "agent_id", width: 120 },
-  { title: "游戏", dataIndex: "game_name", width: 120 },
-  { title: "原始金额", dataIndex: "ori_money", width: 120 },
-  { title: "结算金额", dataIndex: "money", width: 120 },
-  { title: "录入时间", dataIndex: "create_time", width: 120 },
+  { title: '结算日期', dataIndex: 'tdate', width: 120 },
+  { title: '广告位ID', dataIndex: 'site_id', width: 120 },
+  { title: '广告位名称', dataIndex: 'site_name', width: 120 },
+  { title: '渠道ID', dataIndex: 'agent_id', width: 120 },
+  { title: '游戏', dataIndex: 'game_name', width: 120 },
+  { title: '原始金额', dataIndex: 'ori_money', width: 120 },
+  { title: '结算金额', dataIndex: 'money', width: 120 },
+  { title: '录入时间', dataIndex: 'create_time', width: 120 },
   {
-    title: "录入方式",
-    dataIndex: "add_type",
-    type: "dict",
-    dict: "add_type",
+    title: '录入方式',
+    dataIndex: 'add_type',
+    type: 'dict',
+    dict: 'add_type',
     width: 120,
   },
-  { title: "备注", dataIndex: "memo", width: 120 },
-  { title: "负责人", dataIndex: "auth_name", width: 120 },
-]);
+  { title: '备注', dataIndex: 'memo', width: 120 },
+  { title: '负责人', dataIndex: 'auth_name', width: 120 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  await getMediaOptions();
-  // await getGameOptions();
-  await getGameListTree();
-  await getAuthOptions();
-};
+  await getMediaOptions()
+  await getAuthOptions()
+}
 
 // 获取媒体类型
 const getMediaOptions = async () => {
-  const resp = await commonAdvertApi.getAgentOptionsApi();
+  const resp = await commonAdvertApi.getAgentOptionsApi()
   if (resp.code === 200) {
-    mediaOptions.value = resp.data;
+    mediaOptions.value = resp.data
   }
-};
+}
 
 // 获取负责人
 const getAuthOptions = async () => {
-  const resp = await commonAdvertApi.getAuthOptionsApi();
-  if (resp.code === 200) {
-    authOptions.value = resp.data;
-  }
-};
-
-// 获取投放游戏
-// const getGameOptions = async () => {
-//   const resp = await commonCenterApi.getGameOptionsApi();
-//   if (resp.code === 200) {
-//     gameOptions.value = resp.data;
-//   }
-// };
-
-// 获取游戏列表树形
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeApi();
+  const resp = await commonAdvertApi.getAuthOptionsApi()
   if (resp.code === 200) {
-    gameListTree.value = resp.data;
+    authOptions.value = resp.data
   }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 11 - 24
src/views/v1/api/center/common.js

@@ -1,4 +1,4 @@
-import { request } from "@/utils/request.js";
+import { request } from '@/utils/request.js'
 
 /**
  * 公共接口 API接口
@@ -10,10 +10,10 @@ export default {
    */
   getMainGameOptionsApi(params = {}) {
     return request({
-      url: "/v1/common/getMainGameOptions",
-      method: "get",
-      params,
-    });
+      url: '/v1/common/getMainGameOptions',
+      method: 'get',
+      params
+    })
   },
 
   /**
@@ -23,22 +23,9 @@ export default {
    */
   getGameOptionsApi(params = {}) {
     return request({
-      url: "/v1/common/getGameOptions",
-      method: "get",
-      params,
-    });
-  },
-
-  /**
-   * 获取树形游戏options
-   * @param {Object} params
-   * @returns
-   */
-  getTreeGameOptionsApi(params = {}) {
-    return request({
-      url: "/v1/common/getTreeGameOptions",
-      method: "get",
-      params,
-    });
-  },
-};
+      url: '/v1/common/getGameOptions',
+      method: 'get',
+      params
+    })
+  }
+}

+ 64 - 101
src/views/v1/center/game/index.vue

@@ -1,50 +1,26 @@
 <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="main_id">
-            <a-select
-              v-model="searchForm.main_id"
-              :options="mainGameOptions"
-              placeholder="请选择主包"
-              allow-clear
-            />
+            <a-select v-model="searchForm.main_id" :options="mainGameOptions" placeholder="请选择主包" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏名称" field="name">
-            <a-input
-              v-model="searchForm.name"
-              placeholder="请输入游戏名称"
-              allow-clear
-            />
+            <a-input v-model="searchForm.name" placeholder="请输入游戏名称" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="平台" field="os">
-            <sa-select
-              v-model="searchForm.os"
-              dict="os"
-              placeholder="请选择平台"
-              allow-clear
-            />
+            <sa-select v-model="searchForm.os" dict="os" placeholder="请选择平台" allow-clear />
           </a-form-item>
         </a-col>
         <a-col :sm="8" :xs="24">
           <a-form-item label="状态" field="status">
-            <sa-select
-              v-model="searchForm.status"
-              dict="data_status"
-              placeholder="请选择状态"
-              allow-clear
-            />
+            <sa-select v-model="searchForm.status" dict="data_status" placeholder="请选择状态" allow-clear />
           </a-form-item>
         </a-col>
       </template>
@@ -52,13 +28,11 @@
       <!-- Table 自定义渲染 -->
       <template #status="{ record }">
         <a-tag :color="record.status === 1 ? 'green' : 'red'">
-          {{ record.status === 1 ? "正常" : "停用" }}
+          {{ record.status === 1 ? '正常' : '停用' }}
         </a-tag>
       </template>
       <template #operationBeforeExtend="{ record }">
-        <a-button type="text" @click="checkCpInfo(record)"
-          ><icon-thunderbolt /> cp对接信息</a-button
-        >
+        <a-button type="text" @click="checkCpInfo(record)"><icon-thunderbolt /> cp对接信息</a-button>
       </template>
     </sa-table>
 
@@ -70,29 +44,27 @@
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from "vue";
-import { Message } from "@arco-design/web-vue";
-import EditForm from "./edit.vue";
-import CpInfo from "./cp-info.vue";
-import api from "../../api/center/game";
-import apiCommon from "../../api/center/common";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import CpInfo from './cp-info.vue'
+import api from '../../api/center/game'
+import apiCommon from '../../api/center/common'
 
 // 引用定义
-const crudRef = ref();
-const editRef = ref();
-const viewRef = ref();
-const cpInfoRef = ref();
-const mainGameOptions = ref([]);
-const gameTreeOptions = ref([]);
+const crudRef = ref()
+const editRef = ref()
+const cpInfoRef = ref()
+const mainGameOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
-  id: "",
-  main_id: "",
-  name: "",
-  os: "",
-  status: "",
-});
+  id: '',
+  main_id: '',
+  name: '',
+  os: '',
+  status: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -101,90 +73,81 @@ const options = reactive({
   operationColumnWidth: 280,
   add: {
     show: true,
-    auth: ["/v1/center/Game/save"],
+    auth: ['/v1/center/Game/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: true,
-    auth: ["/v1/center/Game/update"],
+    auth: ['/v1/center/Game/update'],
     func: async (record) => {
-      console.log(record);
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      console.log(record)
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: false,
-    auth: ["/v1/center/Game/destroy"],
+    auth: ['/v1/center/Game/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: "name", width: 130 },
+  { title: '游戏名称', dataIndex: 'name', width: 130 },
   // { title: "产品归属", dataIndex: "main_game_name", width: 130 },
-  { title: "包名", dataIndex: "package_name", width: 130 },
+  { title: '包名', dataIndex: 'package_name', width: 130 },
   {
-    title: "平台",
-    dataIndex: "os",
-    type: "dict",
-    dict: "os",
+    title: '平台',
+    dataIndex: 'os',
+    type: 'dict',
+    dict: 'os',
     width: 120,
   },
 
-  { title: "状态", dataIndex: "status", width: 80 },
+  { title: '状态', dataIndex: 'status', width: 80 },
   {
-    title: "实名",
-    dataIndex: "realname_switch",
+    title: '实名',
+    dataIndex: 'realname_switch',
     width: 80,
-    type: "dict",
-    dict: "realname_switch",
+    type: 'dict',
+    dict: 'realname_switch',
   },
-  { title: "充值回调地址", dataIndex: "cp_callback_url", width: 180 },
-  { title: "分成比例", dataIndex: "divide", width: 120 },
+  { title: '充值回调地址', dataIndex: 'cp_callback_url', width: 180 },
+  { title: '分成比例', dataIndex: 'divide', width: 120 },
   // { title: "创建时间", dataIndex: "create_time", width: 180 },
-  { title: "修改时间", dataIndex: "update_time", width: 180 },
-]);
+  { title: '修改时间', dataIndex: 'update_time', width: 180 },
+])
 
 // 页面数据初始化
 const initPage = async () => {
-  await getMainGameOptions();
-  await getTreeGameOptions();
-};
+  await getMainGameOptions()
+}
 
 // 获取主包下拉数据
 const getMainGameOptions = async () => {
-  const { code, data } = await apiCommon.getMainGameOptionsApi();
+  const { code, data } = await apiCommon.getMainGameOptionsApi()
   if (code === 200) {
-    mainGameOptions.value = data;
+    mainGameOptions.value = data
   }
-};
-
-// 获取树形游戏下拉数据
-const getTreeGameOptions = async () => {
-  const { code, data } = await apiCommon.getTreeGameOptionsApi();
-  if (code === 200) {
-    gameTreeOptions.value = data;
-  }
-};
+}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
+  crudRef.value?.refresh()
+}
 
 // 查看CP对接信息
 const checkCpInfo = async (record) => {
-  let { appkey, login_key, pay_key, name, id, os } = record;
+  let { appkey, login_key, pay_key, name, id, os } = record
   let cp_info = {
     name: name,
     appid: id,
@@ -193,14 +156,14 @@ const checkCpInfo = async (record) => {
     pay_key: pay_key,
     os: os,
     channel_h5_url: `https://pf.game.com/game/login?appid=${id}`,
-  };
-  cpInfoRef.value?.open();
-  cpInfoRef.value?.setFormData(cp_info);
-};
+  }
+  cpInfoRef.value?.open()
+  cpInfoRef.value?.setFormData(cp_info)
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 59 - 74
src/views/v1/center/gameGroup/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="name">
         <a-input v-model="formData.name" placeholder="请输入分组名" />
       </a-form-item>
@@ -29,8 +23,7 @@
           :fieldNames="{ title: 'name', key: 'id' }"
           allow-search
           allow-clear
-          placeholder="请选择游戏列表"
-        />
+          placeholder="请选择游戏列表" />
       </a-form-item>
       <a-form-item label="排序" field="sort">
         <a-input v-model="formData.sort" placeholder="请输入排序" />
@@ -41,118 +34,110 @@
 </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/center/gameGroup";
-import commonApi from "../../api/common";
+import { ref, reactive, computed } from 'vue'
+import tool from '@/utils/tool'
+import { Message, Modal } from '@arco-design/web-vue'
+import api from '../../api/center/gameGroup'
+import commonApi from '../../api/common'
 
-const emit = defineEmits(["success"]);
+const emit = defineEmits(['success'])
 // 引用定义
-const visible = ref(false);
-const loading = ref(false);
-const formRef = ref();
-const mode = ref("");
-const gameOptions = ref([]);
+const visible = ref(false)
+const loading = ref(false)
+const formRef = ref()
+const mode = ref('')
+const gameOptions = ref([])
 
 let title = computed(() => {
-  return "游戏分组" + (mode.value == "add" ? "-新增" : "-编辑");
-});
+  return '游戏分组' + (mode.value == 'add' ? '-新增' : '-编辑')
+})
 
 // 表单初始值
 const initialFormData = {
   id: null,
-  name: "",
-  game_list: "",
+  name: '',
+  game_list: '',
   sort: null,
-};
+}
 
 // 表单信息
-const formData = reactive({ ...initialFormData });
+const formData = reactive({ ...initialFormData })
 
 // 验证规则
 const rules = {
-  name: [{ required: true, message: "分组名必需填写" }],
-};
+  name: [{ required: true, message: '分组名必需填写' }],
+}
 
 // 打开弹框
-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()
+}
 
 // 初始化页面数据
 const initPage = async () => {
-  if (mode.value == "add") {
-    await getGameListOptionsByGroupApi();
+  if (mode.value == 'add') {
+    await getGameListOptionsByGroupApi()
   }
-};
+}
 
 // 新增显示的游戏列表
 const getGameListOptionsByGroupApi = async (params) => {
-  const resp = await commonApi.getGameListOptionsByGroupApi(params);
+  const resp = await commonApi.getGameListOptionsByGroupApi(params)
   if (resp.code === 200) {
-    gameOptions.value = resp.data;
+    gameOptions.value = resp.data
   }
-};
-
-// // 获取游戏列表
-// const getGameList = async () => {
-//   const resp = await commonApi.getGameListTreeNoAuthApi();
-//   if (resp.code === 200) {
-//     gameOptions.value = resp.data;
-//   }
-// };
+}
 
 // 设置数据
 const setFormData = async (data) => {
   for (const key in formData) {
     if (data[key] != null && data[key] != undefined) {
-      formData[key] = data[key];
-      if (key === "game_list") {
-        formData[key] = data[key].split(",").map(Number);
+      formData[key] = data[key]
+      if (key === 'game_list') {
+        formData[key] = data[key].split(',').map(Number)
       }
     }
   }
-  await getGameListOptionsByGroupApi({game_group_id:data.id});
-};
+  await getGameListOptionsByGroupApi({ game_group_id: data.id })
+}
 
 // 数据保存
 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;
-      data.game_list = data.game_list.join(",");
-      result = await api.save(data);
+      data.id = undefined
+      data.game_list = data.game_list.join(',')
+      result = await api.save(data)
     } else {
       // 修改数据
-      data.game_list = data.game_list.join(",");
-      result = await api.update(data.id, data);
+      data.game_list = data.game_list.join(',')
+      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>

+ 77 - 123
src/views/v1/center/gamePayChannel/edit.vue

@@ -7,17 +7,11 @@
     :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-tree-select
+        <!-- <a-tree-select
           v-model="formData.game_id"
           :data="gameList"
           placeholder="请选择游戏"
@@ -27,18 +21,14 @@
           tree-checked-strategy="child"
           :tree-checkable="false"
           :max-tag-count="1"
-          @change="handleGameChange"
-        />
+          @change="handleGameChange" /> -->
+        <game-select v-model="formData.game_id" @change="handleGameChange" />
       </a-form-item>
       <a-form-item v-if="os == 2" label="内购" field="inapp">
         <a-select v-model="formData.inapp" placeholder="请选择内购" allow-clear>
-          <a-option
-            v-for="item in paySubjectList"
-            v-show="item.pay_type == 'apple'"
-            :key="item.id"
-            :value="item.id"
-            >{{ item.name }}</a-option
-          >
+          <a-option v-for="item in paySubjectList" v-show="item.pay_type == 'apple'" :key="item.id" :value="item.id">{{
+            item.name
+          }}</a-option>
         </a-select>
       </a-form-item>
       <a-form-item v-if="os == 3" label="内购" field="inapp">
@@ -52,16 +42,8 @@
           >
         </a-select>
       </a-form-item>
-      <a-form-item
-        v-if="os == 2 || os == 1 || os == 5"
-        label="微信wap"
-        field="wechat_wap"
-      >
-        <a-select
-          v-model="formData.wechat_wap"
-          placeholder="请选择微信wap"
-          allow-clear
-        >
+      <a-form-item v-if="os == 2 || os == 1 || os == 5" label="微信wap" field="wechat_wap">
+        <a-select v-model="formData.wechat_wap" placeholder="请选择微信wap" allow-clear>
           <a-option
             v-for="item in paySubjectList"
             v-show="item.pay_type == 'wechat' && item.sub_pay_type == 'wap'"
@@ -71,16 +53,8 @@
           >
         </a-select>
       </a-form-item>
-      <a-form-item
-        v-if="os == 2 || os == 1 || os == 5"
-        label="支付宝wap"
-        field="alipay_wap"
-      >
-        <a-select
-          v-model="formData.alipay_wap"
-          placeholder="请选择支付宝wap"
-          allow-clear
-        >
+      <a-form-item v-if="os == 2 || os == 1 || os == 5" label="支付宝wap" field="alipay_wap">
+        <a-select v-model="formData.alipay_wap" placeholder="请选择支付宝wap" allow-clear>
           <a-option
             v-for="item in paySubjectList"
             v-show="item.pay_type == 'alipay' && item.sub_pay_type == 'wap'"
@@ -90,16 +64,8 @@
           >
         </a-select>
       </a-form-item>
-      <a-form-item
-        label="微信扫码"
-        v-if="os == 1 || os == 5"
-        field="wechat_scan"
-      >
-        <a-select
-          v-model="formData.wechat_scan"
-          placeholder="请选择微信扫码"
-          allow-clear
-        >
+      <a-form-item label="微信扫码" v-if="os == 1 || os == 5" field="wechat_scan">
+        <a-select v-model="formData.wechat_scan" placeholder="请选择微信扫码" allow-clear>
           <a-option
             v-for="item in paySubjectList"
             v-show="item.pay_type == 'wechat' && item.sub_pay_type == 'scan'"
@@ -110,11 +76,7 @@
         </a-select>
       </a-form-item>
       <a-form-item label="微信公众号" v-if="os == 4" field="wechat_jsapi">
-        <a-select
-          v-model="formData.wechat_jsapi"
-          placeholder="请选择微信公众号"
-          allow-clear
-        >
+        <a-select v-model="formData.wechat_jsapi" placeholder="请选择微信公众号" allow-clear>
           <a-option
             v-for="item in paySubjectList"
             v-show="item.pay_type == 'wechat' && item.sub_pay_type == 'jsapi'"
@@ -130,26 +92,27 @@
 </template>
 
 <script setup>
-import { ref, reactive, computed, watchEffect } from "vue";
-import tool from "@/utils/tool";
-import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/center/gamePayChannel";
-import commonApi from "../../api/common";
-import centerGameApi from "../../api/center/game";
-
-const emit = defineEmits(["success"]);
+import { ref, reactive, computed, watchEffect } from 'vue'
+import tool from '@/utils/tool'
+import { Message, Modal } from '@arco-design/web-vue'
+import api from '../../api/center/gamePayChannel'
+import commonApi from '../../api/common'
+import centerGameApi from '../../api/center/game'
+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 paySubjectList = ref([]);
-const gameList = ref([]);
-const os = ref("");
+const visible = ref(false)
+const loading = ref(false)
+const formRef = ref()
+const mode = ref('')
+const paySubjectList = ref([])
+const gameList = ref([])
+const os = ref('')
 
 let title = computed(() => {
-  return "游戏支付渠道" + (mode.value == "add" ? "-新增" : "-编辑");
-});
+  return '游戏支付渠道' + (mode.value == 'add' ? '-新增' : '-编辑')
+})
 
 // 表单初始值
 const initialFormData = {
@@ -160,102 +123,93 @@ const initialFormData = {
   alipay_wap: null,
   wechat_scan: null,
   wechat_jsapi: null,
-};
+}
 
 // 表单信息
-const formData = reactive({ ...initialFormData });
+const formData = reactive({ ...initialFormData })
 
 // 验证规则
 const rules = {
-  game_id: [{ required: true, message: "游戏必需填写" }],
-};
-
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi({ single: true });
-  if (res.code === 200) {
-    gameList.value = res.data;
-  }
-};
+  game_id: [{ required: true, message: '游戏必需填写' }],
+}
 
 // 获取支付主体
 const getPaySubject = async () => {
-  const res = await api.getPaySubjectApi();
+  const res = await api.getPaySubjectApi()
   if (res.code === 200) {
-    paySubjectList.value = res.data;
+    paySubjectList.value = res.data
   }
-};
+}
 
 // 游戏选择
 const handleGameChange = async (value) => {
-  const res = await centerGameApi.read(value);
+  const res = await centerGameApi.read(value)
   if (res.code === 200) {
-    os.value = res.data.os;
-    formData.inapp = null;
-    formData.wechat_wap = null;
-    formData.alipay_wap = null;
-    formData.wechat_scan = null;
-    formData.wechat_jsapi = null;
+    os.value = res.data.os
+    formData.inapp = null
+    formData.wechat_wap = null
+    formData.alipay_wap = null
+    formData.wechat_scan = null
+    formData.wechat_jsapi = null
   }
-};
+}
 
 // 打开弹框
-const open = async (type = "add") => {
-  mode.value = type;
+const open = async (type = 'add') => {
+  mode.value = type
   // 重置表单数据
-  Object.assign(formData, initialFormData);
+  Object.assign(formData, initialFormData)
 
-  formRef.value.clearValidate();
-  visible.value = true;
-  await initPage();
-};
+  formRef.value.clearValidate()
+  visible.value = true
+  await initPage()
+}
 
 // 初始化页面数据
 const initPage = async () => {
-  await getGameList();
-  await getPaySubject();
-};
+  await getPaySubject()
+}
 
 // 设置数据
 const setFormData = async (data) => {
   for (const key in formData) {
     if (data[key] != null && data[key] != undefined) {
-      formData[key] = data[key];
+      formData[key] = data[key]
     }
   }
-  os.value = data.game_os;
-};
+  os.value = data.game_os
+}
 
 // 数据保存
 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>

+ 41 - 61
src/views/v1/center/iosPayWay/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 :span="8">
@@ -16,9 +11,7 @@
       </template>
 
       <!-- Table 自定义渲染 -->
-      <template #game_id="{ record }">
-        {{ record.game_id }}:{{ record.game_name }}
-      </template>
+      <template #game_id="{ record }"> {{ record.game_id }}:{{ record.game_name }} </template>
     </sa-table>
 
     <!-- 编辑表单 -->
@@ -27,23 +20,22 @@
 </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/iosPayWay";
-import commonApi from "../../api/common";
-import GameSelect from "@/components/game-select/index.vue";
+import { onMounted, ref, reactive } from 'vue'
+import { Message } from '@arco-design/web-vue'
+import EditForm from './edit.vue'
+import api from '../../api/center/iosPayWay'
+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 searchForm = ref({
-  game_id: "",
-});
+  game_id: '',
+})
 
 // SaTable 基础配置
 const options = reactive({
@@ -51,74 +43,62 @@ const options = reactive({
   rowSelection: { showCheckedAll: true },
   add: {
     show: true,
-    auth: ["/v1/center/IosPayWay/save"],
+    auth: ['/v1/center/IosPayWay/save'],
     func: async () => {
-      editRef.value?.open();
+      editRef.value?.open()
     },
   },
   edit: {
     show: true,
-    auth: ["/v1/center/IosPayWay/update"],
+    auth: ['/v1/center/IosPayWay/update'],
     func: async (record) => {
-      editRef.value?.open("edit");
-      editRef.value?.setFormData(record);
+      editRef.value?.open('edit')
+      editRef.value?.setFormData(record)
     },
   },
   delete: {
     show: true,
-    auth: ["/v1/center/IosPayWay/destroy"],
+    auth: ['/v1/center/IosPayWay/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: "game_id", width: 180 },
-  { title: "开启时间", dataIndex: "pay_stime", width: 180 },
-  { title: "结束时间", dataIndex: "pay_etime", width: 180 },
-  { title: "充值金额", dataIndex: "pay_money", width: 180 },
-  { title: "充值次数", dataIndex: "pay_num", width: 180 },
-  { title: "注册天数", dataIndex: "reg_day", width: 180 },
-  { title: "屏蔽地区", dataIndex: "city", width: 180 },
+  { title: '游戏', dataIndex: 'game_id', width: 180 },
+  { title: '开启时间', dataIndex: 'pay_stime', width: 180 },
+  { title: '结束时间', dataIndex: 'pay_etime', width: 180 },
+  { title: '充值金额', dataIndex: 'pay_money', width: 180 },
+  { title: '充值次数', dataIndex: 'pay_num', width: 180 },
+  { title: '注册天数', dataIndex: 'reg_day', width: 180 },
+  { title: '屏蔽地区', dataIndex: 'city', width: 180 },
 
   {
-    title: "充值渠道开关",
-    dataIndex: "pay_way",
-    type: "dict",
-    dict: "ios_pay_way",
+    title: '充值渠道开关',
+    dataIndex: 'pay_way',
+    type: 'dict',
+    dict: 'ios_pay_way',
     width: 120,
   },
-]);
+])
 
 // 页面数据初始化
-const initPage = async () => {
-  await getGameListTree();
-};
+const initPage = async () => {}
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh();
-};
-
-// 获取游戏列表树形
-const getGameListTree = async () => {
-  const resp = await commonApi.getGameListTreeNoAuthApi({
-    single: true,
-  });
-  if (resp.code === 200) {
-    gameListTree.value = resp.data;
-  }
-};
+  crudRef.value?.refresh()
+}
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage();
-  refresh();
-});
+  initPage()
+  refresh()
+})
 </script>

+ 0 - 24
src/views/v1/customer/reconciliation/payChannelIncome/index.vue

@@ -7,17 +7,6 @@
             <a-row :gutter="10">
               <a-col :sm="8" :xs="24">
                 <a-form-item label="游戏" field="game_id">
-                  <!-- <a-tree-select
-                    v-model="searchForm.game_id"
-                    :data="allGameOptions"
-                    placeholder="请选择游戏"
-                    allow-clear
-                    :field-names="{ title: 'name', key: 'id' }"
-                    allow-search
-                    tree-checked-strategy="child"
-                    :tree-checkable="true"
-                    :max-tag-count="1"
-                  /> -->
                   <game-select v-model="searchForm.game_id" multiple />
                 </a-form-item>
               </a-col>
@@ -102,25 +91,12 @@ const columns = ref([])
 
 // 页面数据初始化
 const initPage = async () => {
-  // await getGameOptions();
-  await getGameListTree()
   await getPayChannelOptions()
   // 默认充值日期最近7天
   searchForm.value.pay_date = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
   await getChannelIncome()
 }
 
-// 获取子游戏options
-// const getGameOptions = async () => {
-//   const res = await commonApi.getGameOptionsApiNoAuth();
-//   allGameOptions.value = res.data;
-// };
-
-const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi()
-  allGameOptions.value = res.data
-}
-
 const getPayChannelOptions = async () => {
   const res = await commonApi.getPayChannelOptionsApi()
   payChannelOptions.value = res.data

+ 1 - 42
src/views/v1/customer/roleData/index.vue

@@ -5,29 +5,6 @@
       <template #tableSearch>
         <a-col :sm="8" :xs="24">
           <a-form-item label="游戏" field="game_id">
-            <!-- <a-select
-              v-model="searchForm.game_id"
-              placeholder="请选择游戏"
-              allow-clear
-            >
-              <a-option
-                v-for="item in allGameOptions"
-                :key="item.id"
-                :value="item.id"
-              >
-                [{{ item.id }}] {{ item.name }}
-              </a-option>
-            </a-select> -->
-            <!-- <a-tree-select
-              v-model="searchForm.game_id"
-              :data="allGameOptions"
-              placeholder="请选择游戏"
-              allow-clear
-              :field-names="{ title: 'name', key: 'id' }"
-              allow-search
-              tree-checked-strategy="child"
-              :tree-checkable="false"
-            /> -->
             <game-select v-model="searchForm.game_id" />
           </a-form-item>
         </a-col>
@@ -75,17 +52,13 @@
 
 <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 GameSelect from '@/components/game-select/index.vue'
 
 // 引用定义
 const crudRef = ref()
 const editRef = ref()
-const viewRef = ref()
-const allGameOptions = ref([])
 
 // 搜索表单
 const searchForm = ref({
@@ -134,21 +107,7 @@ const columns = reactive([
 ])
 
 // 页面数据初始化
-const initPage = async () => {
-  // await getGameOptions();
-  await getGameListTree()
-}
-
-// 获取子游戏options
-// const getGameOptions = async () => {
-//   const res = await commonApi.getGameOptionsApiNoAuth();
-//   allGameOptions.value = res.data;
-// };
-
-const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi({ single: 1 })
-  allGameOptions.value = res.data
-}
+const initPage = async () => {}
 
 // SaTable 数据请求
 const refresh = async () => {

+ 1 - 42
src/views/v1/customer/sdkOrder/index.vue

@@ -5,31 +5,6 @@
       <template #tableSearch>
         <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 allGameOptions"
-                :key="item.id"
-                :value="item.id"
-              >
-                [{{ item.id }}] {{ item.name }}
-              </a-option>
-            </a-select> -->
-            <!-- <a-tree-select
-              v-model="searchForm.game_id"
-              :data="allGameOptions"
-              placeholder="请选择游戏"
-              allow-clear
-              :field-names="{ title: 'name', key: 'id' }"
-              allow-search
-              tree-checked-strategy="child"
-              :tree-checkable="true"
-              :max-tag-count="1"
-            /> -->
             <game-select v-model="searchForm.game_id" multiple />
           </a-form-item>
         </a-col>
@@ -93,14 +68,11 @@ 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 searchForm = ref({
@@ -185,20 +157,7 @@ const columns = reactive([
 ])
 
 // 页面数据初始化
-const initPage = async () => {
-  await getGameListTree()
-}
-
-// 获取子游戏options
-// const getGameOptions = async () => {
-//   const res = await commonApi.getGameOptionsApiNoAuth();
-//   allGameOptions.value = res.data;
-// };
-
-const getGameListTree = async () => {
-  const res = await commonApi.getGameListTreeNoAuthApi()
-  allGameOptions.value = res.data
-}
+const initPage = async () => {}
 
 // 补发
 const handleSend = async (record) => {

+ 0 - 8
src/views/v1/gameLog/activeDay/index.vue

@@ -69,16 +69,8 @@ const columns = ref([])
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.reg_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-  await getGameList()
 }
 
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
-}
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

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

@@ -153,16 +153,8 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.reg_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-  await getGameList()
 }
 
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
-}
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 0 - 8
src/views/v1/gameLog/regDay/index.vue

@@ -58,16 +58,8 @@ const columns = ref([])
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.reg_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-  await getGameList()
 }
 
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
-}
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

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

@@ -112,15 +112,6 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.reg_time = dayjs().format('YYYY-MM-DD')
-  await getGameList()
-}
-
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
 }
 
 // SaTable 数据请求

+ 0 - 9
src/views/v1/gameLog/sdkLoginLog/index.vue

@@ -139,15 +139,6 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.login_time = dayjs().format('YYYY-MM-DD')
-  await getGameList()
-}
-
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
 }
 
 // SaTable 数据请求

+ 0 - 9
src/views/v1/gameLog/sdkOrderRank/index.vue

@@ -160,15 +160,6 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.pay_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-  await getGameList()
-}
-
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
 }
 
 // SaTable 数据请求

+ 0 - 8
src/views/v1/gameLog/sdkOrderSuccess/index.vue

@@ -142,16 +142,8 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {
   searchForm.value.pay_date = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-  await getGameList()
 }
 
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
-}
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()

+ 1 - 11
src/views/v1/gameLog/sdkRegLog/index.vue

@@ -123,23 +123,13 @@ const columns = reactive([
 ])
 
 // 页面数据初始化
-const initPage = async () => {
-  await getGameList()
-}
+const initPage = async () => {}
 
 // SaTable 数据请求
 const refresh = async () => {
   crudRef.value?.refresh()
 }
 
-// 获取游戏列表
-const getGameList = async () => {
-  const res = await commonApi.getGameListTreeApi()
-  if (res.code === 200) {
-    gameList.value = res.data
-  }
-}
-
 // 页面加载完成执行
 onMounted(async () => {
   initPage()