浏览代码

refactor(信息管理页): 信息管理页位置移动到应用管理栏、玩家管理新增查询功能

fxs 6 月之前
父节点
当前提交
cb9555f618
共有 4 个文件被更改,包括 60 次插入19 次删除
  1. 1 0
      components.d.ts
  2. 24 1
      src/router/appManage.ts
  3. 7 7
      src/views/AppManage/GameManageView.vue
  4. 28 11
      src/views/AppManage/PlayerManageView.vue

+ 1 - 0
components.d.ts

@@ -15,6 +15,7 @@ declare module 'vue' {
     CustomTable: typeof import('./src/components/table/CustomTable.vue')['default']
     DownloadTipModal: typeof import('./src/components/common/DownloadTipModal.vue')['default']
     DropDownSelection: typeof import('./src/components/dataAnalysis/DropDownSelection.vue')['default']
+    DynamicIcon: typeof import('./src/components/common/DynamicIcon.vue')['default']
     ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']

+ 24 - 1
src/router/appManage.ts

@@ -7,7 +7,7 @@
  * @Description:
  *
  */
-import type {NavigationGuardNext, RouteLocationNormalized} from 'vue-router'
+import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'
 
 export default [
   {
@@ -64,6 +64,29 @@ export default [
           }
         ]
       },
+
+      {
+        path: 'gameManageView',
+        name: 'GameManageView',
+        cnName: '游戏管理',
+        icon: '/img/navbarIcon/gameManage.svg',
+        component: () => import('@/views/AppManage/GameManageView.vue'),
+        meta: {
+          activeMenu: 'gameManageView',
+          needKeepAlive: true
+        }
+      },
+      {
+        path: 'playerManageView',
+        name: 'PlayerManageView',
+        cnName: '玩家管理',
+        icon: '/img/navbarIcon/playerManage.svg',
+        component: () => import('@/views/AppManage/PlayerManageView.vue'),
+        meta: {
+          activeMenu: 'playerManageView',
+          needKeepAlive: true
+        }
+      },
       {
         path: 'userConversion',
         name: 'UserConversion',

+ 7 - 7
src/views/Home/InfoManage/GameManageView.vue → src/views/AppManage/GameManageView.vue

@@ -12,18 +12,18 @@ import type {
   TableFieldInfo,
   TablePaginationSetting,
   TableToolsConfig
-} from '@/types/table'
-import { FilterType } from '@/types/table'
+} from '@/types/table.ts'
+import { FilterType } from '@/types/table.ts'
 import type { FormRules } from 'element-plus'
-import type { DialogConfig } from '@/types/dialog'
-import type { FormField } from '@/types/form'
-import { FormFieldType } from '@/types/form'
+import type { DialogConfig } from '@/types/dialog.ts'
+import type { FormField } from '@/types/form.ts'
+import { FormFieldType } from '@/types/form.ts'
 import type { ResponseInfo } from '@/types/res.ts'
 
 import { FieldSpecialEffectType } from '@/types/tableText.ts'
 import { onMounted, reactive, ref } from 'vue'
-import { useRequest } from '@/hooks/useRequest'
-import { useCommonStore } from '@/stores/useCommon'
+import { useRequest } from '@/hooks/useRequest.ts'
+import { useCommonStore } from '@/stores/useCommon.ts'
 
 import Dialog from '@/components/common/CustomDialog.vue'
 import Table from '@/components/table/CustomTable.vue'

+ 28 - 11
src/views/Home/InfoManage/PlayerManageView.vue → src/views/AppManage/PlayerManageView.vue

@@ -7,23 +7,29 @@
  * 
 -->
 <script setup lang="ts">
-import type { TableFieldInfo, TablePaginationSetting, TableToolsConfig } from '@/types/table'
+import {
+  FilterType,
+  type QueryInfo,
+  type TableFieldInfo,
+  type TablePaginationSetting,
+  type TableToolsConfig
+} from '@/types/table.ts'
 import type { FormRules } from 'element-plus'
 import { ElMessageBox } from 'element-plus'
-import type { FormField } from '@/types/form'
-import { FormFieldType } from '@/types/form'
-import type { DialogConfig } from '@/types/dialog'
+import type { FormField } from '@/types/form.ts'
+import { FormFieldType } from '@/types/form.ts'
+import type { DialogConfig } from '@/types/dialog.ts'
 
-import { FieldSpecialEffectType, TagType, TextType } from '@/types/tableText'
+import { FieldSpecialEffectType, TagType, TextType } from '@/types/tableText.ts'
 import { reactive, ref } from 'vue'
-import { useRequest } from '@/hooks/useRequest'
-import { useCommonStore } from '@/stores/useCommon'
-import { useAnalysis } from '@/hooks/useAnalysis'
-import { usePage } from '@/hooks/usePage'
+import { useRequest } from '@/hooks/useRequest.ts'
+import { useCommonStore } from '@/stores/useCommon.ts'
+import { useAnalysis } from '@/hooks/useAnalysis.ts'
+import { usePage } from '@/hooks/usePage.ts'
 
 import Dialog from '@/components/common/CustomDialog.vue'
 import Table from '@/components/table/CustomTable.vue'
-import axiosInstance from '@/utils/axios/axiosInstance'
+import axiosInstance from '@/utils/axios/axiosInstance.ts'
 
 const { watchPageChange } = usePage()
 const { updateReqConfig } = useAnalysis()
@@ -60,6 +66,16 @@ const requestConfig = reactive({
   }
 })
 
+// 查询字段设置
+const queryInfo: Array<QueryInfo> = [
+  {
+    name: 'search',
+    label: '昵称/OpenID',
+    type: FilterType.INPUT,
+    placeholder: '输入openID或昵称进行搜索'
+  }
+]
+
 // 工具栏配置
 const tableToolsConfig: TableToolsConfig = {
   add: false,
@@ -248,9 +264,10 @@ watchPageChange(() => [selectInfo.gid, selectInfo.pf], backupSelect, updateSelec
         ref="playerTableRef"
         :tools="tableToolsConfig"
         :table-fields-info="fieldsInfo"
-        :open-filter-query="false"
+        :open-filter-query="true"
         :request-config="requestConfig"
         :pagination-config="paginationConfig"
+        :query-info="queryInfo"
       >
         <template #tableOperation>
           <el-table-column label="操作" align="center">