From 323b316c3de691767d54b9e8b15155cc15e7d60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 24 Mar 2025 12:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=8D=90=E6=AC=BE?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9A=84=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/bszx/bszxBm/model/index.ts | 3 + src/api/index.ts | 4 +- src/store/modules/theme.ts | 2 +- src/store/modules/user.ts | 12 +-- src/views/bszx/bszxPay/components/search.vue | 45 +++++++---- src/views/bszx/bszxPay/index.vue | 82 ++++++++++++-------- src/views/passport/login/index.vue | 1 + 8 files changed, 96 insertions(+), 57 deletions(-) diff --git a/.env.development b/.env.development index b6005a1..8c274fb 100644 --- a/.env.development +++ b/.env.development @@ -1,10 +1,10 @@ VITE_APP_NAME=后台管理系统 -#VITE_SOCKET_URL=wss://server.gxwebsoft.com +VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://server.gxwebsoft.com/api #VITE_API_URL=https://cms-api.websoft.top/api -VITE_SOCKET_URL=ws://127.0.0.1:9191 +#VITE_SOCKET_URL=ws://127.0.0.1:9191 #VITE_SERVER_URL=http://127.0.0.1:8000/api VITE_API_URL=http://127.0.0.1:9000/api #VITE_THINK_URL=http://127.0.0.1:9099/api diff --git a/src/api/bszx/bszxBm/model/index.ts b/src/api/bszx/bszxBm/model/index.ts index be89779..b350ca5 100644 --- a/src/api/bszx/bszxBm/model/index.ts +++ b/src/api/bszx/bszxBm/model/index.ts @@ -12,6 +12,9 @@ export interface BszxBm { sex?: number; // 手机号码 phone?: string; + mobile?: string; + // 捐款金额 + price?: string; // 班级 className?: string; // 年级 diff --git a/src/api/index.ts b/src/api/index.ts index 25e027c..00f3d67 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -47,9 +47,9 @@ export interface PageParam { // 搜素关键词 keywords?: string; // 起始时间 - createTimeStart?: number; + createTimeStart?: string; // 结束时间 - createTimeEnd?: number; + createTimeEnd?: string; timeStart?: number; timeEnd?: number; isExpireTime?: number; diff --git a/src/store/modules/theme.ts b/src/store/modules/theme.ts index 2f913c1..04f5877 100644 --- a/src/store/modules/theme.ts +++ b/src/store/modules/theme.ts @@ -41,7 +41,7 @@ const DEFAULT_STATE: ThemeState = Object.freeze({ // 内容区域是否全屏 bodyFullscreen: false, // 是否开启页签栏 - showTabs: true, + showTabs: false, // 是否开启页脚 showFooter: true, // 顶栏风格: light(亮色), dark(暗色), primary(主色) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 49349e8..ea524b9 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -6,7 +6,7 @@ import { formatMenus, toTreeData, formatTreeData } from 'ele-admin-pro/es'; import type { MenuItemType } from 'ele-admin-pro/es'; import type { User } from '@/api/system/user/model'; import { TOKEN_STORE_NAME, USER_MENUS } from '@/config/setting'; -import {getTenantInfo, getUserInfo} from '@/api/layout'; +import {getUserInfo} from '@/api/layout'; import { initialization } from '@/api/layout'; import {clone} from "@/api/system/menu"; import { message } from 'ant-design-vue/es'; @@ -40,9 +40,9 @@ export const useUserStore = defineStore({ * 请求用户信息、权限、角色、菜单 */ async fetchUserInfo() { - const company = await getTenantInfo().catch(() => void 0); + // const company = await getTenantInfo().catch(() => void 0); const result = await getUserInfo().catch(() => {}); - if (!result || !company) { + if (!result) { Modal.info({ title: '系统提示', content: '该应用已欠费,请先续费后访问!', @@ -67,7 +67,7 @@ export const useUserStore = defineStore({ }); } // 克隆默认的云企业官网 - if(company?.planId == 0){ + if(result?.planId == 0){ const hide = message.loading('正在分配资源请勿刷新页面...', 0); await clone({companyId: 10431,tenantId: 10398}).then(() => { hide(); @@ -93,7 +93,7 @@ export const useUserStore = defineStore({ } // 用户权限 this.authorities = - company.authorities + result.authorities ?.filter((d) => !!d.authority) ?.map((d) => d.authority) ?? []; // 用户角色 @@ -104,7 +104,7 @@ export const useUserStore = defineStore({ const { menus, homePath } = formatMenus( USER_MENUS ?? toTreeData({ - data: company.authorities + data: result.authorities ?.filter((d) => d.menuType !== 1) .map((d) => { // 改造子模块的访问路径 diff --git a/src/views/bszx/bszxPay/components/search.vue b/src/views/bszx/bszxPay/components/search.vue index cbbebef..6951b81 100644 --- a/src/views/bszx/bszxPay/components/search.vue +++ b/src/views/bszx/bszxPay/components/search.vue @@ -8,6 +8,11 @@ v-model:value="where.keywords" @search="reload" /> + 导出 @@ -41,6 +46,8 @@ const { where } = useSearch({ id: undefined, keywords: '', + createTimeStart: undefined, + createTimeEnd: undefined, userId: undefined }); @@ -48,6 +55,18 @@ emit('search', where); }; + /* 搜索 */ + const search = () => { + const [d1, d2] = dateRange.value ?? []; + where.createTimeStart = d1 ? d1 + ' 00:00:00' : undefined; + where.createTimeEnd = d2 ? d2 + ' 23:59:59' : undefined; + emit('search', { + ...where + }); + }; + + + const dateRange = ref<[string, string]>(['', '']); // 变量 const loading = ref(false); const bmList = ref([]) @@ -58,17 +77,15 @@ loading.value = true; const array: (string | number)[][] = [ [ - '用户ID', '姓名', - '性别', '手机号码', - '班级', + '捐款金额', + '性别', '年级', + '班级', '居住地址', '工作单位', '职务', - '是否能到场', - '邀请函', '捐款时间' ] ]; @@ -80,17 +97,15 @@ bmList.value = list; list?.forEach((d: BszxBm) => { array.push([ - `${d.userId}`, `${d.name}`, - `${d.sex}`, - `${d.phone}`, - `${d.className}`, - `${d.gradeName}`, - `${d.address}`, - `${d.workUnit}`, - `${d.position}`, - `${d.present}`, - `${d.certificate}`, + `${d.mobile}`, + `${d.price}`, + `${d.sex == 1 ? '男' : ''}${d.sex == 2 ? '女' : '-'}`, + `${d.gradeName ? d.gradeName : '-'}`, + `${d.className ? d.className : '-'}`, + `${d.address ? d.address : '-'}`, + `${d.workUnit ? d.workUnit : '-'}`, + `${d.position ? d.position : '-'}`, `${d.createTime}` ]); }); diff --git a/src/views/bszx/bszxPay/index.vue b/src/views/bszx/bszxPay/index.vue index d38e58f..8e2e4c7 100644 --- a/src/views/bszx/bszxPay/index.vue +++ b/src/views/bszx/bszxPay/index.vue @@ -21,6 +21,13 @@ />