角色添加默认每页条数

dev
853931625@qq.com 2025-12-27 16:26:46 +08:00
parent f9e3b40c81
commit 8bec9ec6e0
5 changed files with 21 additions and 17 deletions

View File

@ -160,12 +160,14 @@ function Add(props) {
form.setFieldsValue({
postId: undefined,
});
props["postAll"]({
corpFlag: 1,
departmentId: event[event.length - 1].id,
}).then((res) => {
setPostData(res.data);
});
if (Array.isArray(event) && event.length > 0) {
props["postAll"]({
corpFlag: 1,
departmentId: event[event.length - 1].id,
}).then((res) => {
setPostData(res.data);
});
}
};
// 校验身份证重复
useEffect(() => {

View File

@ -113,7 +113,7 @@ function AddModalComponent(props) {
const [viewType, setViewType] = useState(false);
const [viewData, setViewData] = useState(false);
useEffect(() => {
props.requwstRolesAll().then((res) => {
props.requwstRolesAll({ pageIndex: 1, pageSize: 1000 }).then((res) => {
setRolesData(res.data);
});
if (props.currentId) {

View File

@ -188,7 +188,7 @@ function AddModalComponent(props) {
const [rolesData, setRolesData] = useState([]);
useEffect(() => {
if (props.currentId) {
props.requwstRolesAll().then((res) => {
props.requwstRolesAll({ pageIndex: 1, pageSize: 1000 }).then((res) => {
setRolesData(res.data);
});
const fetchData = async () => {

View File

@ -60,12 +60,14 @@ function Add(props) {
postId: undefined,
});
// setDepartmentName(event[0].name)
props["postAll"]({
corpFlag: 1,
departmentId: event[event.length - 1].id,
}).then((res) => {
setPostData(res.data);
});
if (Array.isArray(event) && event.length > 0) {
props["postAll"]({
corpFlag: 1,
departmentId: event[event.length - 1].id,
}).then((res) => {
setPostData(res.data);
});
}
};
// const { loading: getFileLoading, getFile } = useGetFile();
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
@ -110,7 +112,7 @@ function Add(props) {
};
fetchData();
}
props["rolesAll"]().then((res) => {
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
setRolesData(res.data);
});
}, []);

View File

@ -46,7 +46,7 @@ function List(props) {
});
useEffect(() => {
const fetchPostData = async () => {
props["rolesAll"]().then((res) => {
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
setRolesData(res.data);
});
};
@ -400,7 +400,7 @@ function AddModalComponent(props) {
const [viewData, setViewData] = useState(false);
useEffect(() => {
props.requwstRolesAll().then((res) => {
props.requwstRolesAll({ pageIndex: 1, pageSize: 1000 }).then((res) => {
setRolesData(res.data);
});
if (props.currentId) {