diff --git a/src/pages/System/Department/index.tsx b/src/pages/System/Department/index.tsx
index 0ace614..3a28f11 100644
--- a/src/pages/System/Department/index.tsx
+++ b/src/pages/System/Department/index.tsx
@@ -23,12 +23,18 @@ const Index: React.FC<{}> = () => {
{
title: '组织名称',
dataIndex: 'orgName',
- width: '45%',
+ width: '35%',
},
{
title: '组织全称',
dataIndex: 'orgFullName',
- width: '40%',
+ width: '30%',
+ hideInSearch: true,
+ },
+ {
+ title: '公司级别',
+ dataIndex: 'companyLevelText',
+ width: '25%',
hideInSearch: true,
},
{
@@ -132,6 +138,12 @@ const Index: React.FC<{}> = () => {
+
+
+
+
+
+
);
diff --git a/src/pages/System/LoginLog/index.tsx b/src/pages/System/LoginLog/index.tsx
index af2a164..8414635 100644
--- a/src/pages/System/LoginLog/index.tsx
+++ b/src/pages/System/LoginLog/index.tsx
@@ -103,6 +103,7 @@ const LoginLog: React.FC = () => {
title: '登录IP',
dataIndex: 'loginIp',
width: 140,
+ search: false,
ellipsis: true,
render: (text) => (
@@ -114,6 +115,7 @@ const LoginLog: React.FC = () => {
title: '登录状态',
dataIndex: 'loginStatus',
width: 100,
+ search: false,
valueType: 'select',
valueEnum: {
1: { text: '成功' },
@@ -129,6 +131,7 @@ const LoginLog: React.FC = () => {
title: '登录方式',
dataIndex: 'loginType',
width: 100,
+ search: false,
valueType: 'select',
valueEnum: {
'PASSWORD': { text: '密码登录' },
@@ -271,8 +274,8 @@ const LoginLog: React.FC = () => {
// 构建查询参数
const buildQueryParams = (params: any): LoginLogQueryParams => {
const basePageRequest: BasePageRequest = {
- current: params.current || 1,
- size: params.pageSize || 10,
+ pageNo: params.current || 1,
+ pageSize: params.pageSize || 10,
};
const queryParams: LoginLogQueryParams = {
diff --git a/src/pages/System/LoginLog/types.ts b/src/pages/System/LoginLog/types.ts
index d5255c5..1485efb 100644
--- a/src/pages/System/LoginLog/types.ts
+++ b/src/pages/System/LoginLog/types.ts
@@ -4,8 +4,8 @@
// 基础分页请求
export interface BasePageRequest {
- current: number; // 当前页码
- size: number; // 每页大小
+ pageNo: number; // 当前页码
+ pageSize: number; // 每页大小
}
// 登录日志查询参数
diff --git a/src/pages/System/SupplierUser/index.tsx b/src/pages/System/SupplierUser/index.tsx
index 638cae0..498c055 100644
--- a/src/pages/System/SupplierUser/index.tsx
+++ b/src/pages/System/SupplierUser/index.tsx
@@ -1,5 +1,5 @@
import { PlusOutlined } from '@ant-design/icons';
-import { Button, message, Popconfirm } from 'antd';
+import { Button, message, Popconfirm, Spin } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table';
@@ -7,11 +7,19 @@ import ProTable from '@ant-design/pro-table';
import type { SupplierUserListItem } from './data.d';
import { getSupplierUserList, updateSupplierUser, resetPassword } from './service';
import UpdateForm from './components/UpdateForm';
+import tableProps from '@/utils/tableProps';
+import '@/assets/xsy_style.less';
const SupplierUser: React.FC = () => {
const actionRef = useRef();
const [updateModalVisible, handleUpdateModalVisible] = useState(false);
const [formValues, setFormValues] = useState({});
+ const [spin, spinSet] = useState(false);
+ //查询分页数据
+ const [pageData, pageDataSet] = useState({
+ pageNo: 1,
+ pageSize: 10
+ });
// 从URL查询参数获取并保存必要的参数
useEffect(() => {
@@ -77,28 +85,33 @@ const SupplierUser: React.FC = () => {
};
const columns: ProColumns[] = [
+ { title: '序号', valueType: 'index', width: 50, },
{
title: '用户名',
dataIndex: 'username',
sorter: true,
},
{
- title: '姓名',
+ title: '名称',
dataIndex: 'name',
sorter: true,
},
{
title: '供应商名称',
dataIndex: 'supplierName',
+ search: false,
+ hideInTable: true,
sorter: true,
},
{
title: '统一信用代码',
dataIndex: 'creditCode',
+ search: false,
},
{
title: '手机号',
dataIndex: 'mobile',
+ search: false,
},
{
title: '状态',
@@ -112,66 +125,78 @@ const SupplierUser: React.FC = () => {
title: '操作',
dataIndex: 'option',
valueType: 'option',
+ width: '15%',
render: (_, record) => [
- {
- handleUpdateModalVisible(true);
- setFormValues(record);
- }}
- >
+ ,
+ ,
handleResetPassword(record.username)}
key="reset"
>
- 重置密码
+
,
],
},
];
return (
-
-
- headerTitle="供应商用户列表"
- actionRef={actionRef}
- rowKey="userId"
- search={{
- labelWidth: 120,
- }}
- request={(params) =>
- getSupplierUserList(params).then((res) => {
- return {
- data: res.data.records,
- success: true,
- total: res.data.total,
- };
- })
- }
- columns={columns}
- />
- {
- const success = await handleUpdate(value);
- if (success) {
+
+
+
+ actionRef={actionRef}
+ rowKey="userId"
+ columns={columns}
+ options={false}
+ bordered={false}
+ className='tableSearch'
+ size='small'
+ search={{ labelWidth: 'auto', span: 6 }}
+ request={(params) =>
+ getSupplierUserList({
+ ...params,
+ }).then((res) => {
+ const result = {
+ data: res.data.records,
+ total: res.data.total,
+ success: res.success,
+ pageSize: res.data.size,
+ current: res.data.current
+ }
+ return result;
+ })
+ }
+ pagination={{
+ ...tableProps.pagination,
+ onChange: (page, pageSize) => pageDataSet({ pageNo: page, pageSize: pageSize }),
+ onShowSizeChange: (current, size) => pageDataSet({ pageNo: current, pageSize: size }),
+ }}
+ onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
+ />
+ {
+ const success = await handleUpdate(value);
+ if (success) {
+ handleUpdateModalVisible(false);
+ setFormValues({});
+ if (actionRef.current) {
+ actionRef.current.reload();
+ }
+ }
+ }}
+ onCancel={() => {
handleUpdateModalVisible(false);
setFormValues({});
- if (actionRef.current) {
- actionRef.current.reload();
- }
- }
- }}
- onCancel={() => {
- handleUpdateModalVisible(false);
- setFormValues({});
- }}
- updateModalVisible={updateModalVisible}
- values={formValues}
- />
-
+ }}
+ updateModalVisible={updateModalVisible}
+ values={formValues}
+ />
+
+
);
};
diff --git a/src/pages/System/SupplierUser/service.ts b/src/pages/System/SupplierUser/service.ts
index 198f4f7..bbc39b0 100644
--- a/src/pages/System/SupplierUser/service.ts
+++ b/src/pages/System/SupplierUser/service.ts
@@ -2,22 +2,28 @@ import request from '@/utils/request';
import type { SupplierUserListItem, TableListParams } from './data.d';
export async function getSupplierUserList(params: TableListParams) {
- return request('/sys/supplier/user/list', {
- method: 'GET',
- params,
+ return request('/api/sys-manager-ebtp-project/v1/supplieruser/getPage', {
+ method: 'POST',
+ data: {
+ ...params,
+ basePageRequest: {
+ pageNo: params.current || 1,
+ pageSize: params.pageSize || 10,
+ },
+ },
});
}
export async function updateSupplierUser(params: SupplierUserListItem) {
- return request('/sys/supplier/user/update', {
+ return request('/api/sys-manager-ebtp-project/v1/supplieruser/update', {
method: 'POST',
data: params,
});
}
export async function resetPassword(username: string) {
- return request('/sys/supplier/user/reset-password', {
+ return request('/api/sys-manager-ebtp-project/v1/supplieruser/resetPassword', {
method: 'POST',
- data: { username },
+ params: { username },
});
}
\ No newline at end of file