角色添加默认每页条数

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({ form.setFieldsValue({
postId: undefined, postId: undefined,
}); });
props["postAll"]({ if (Array.isArray(event) && event.length > 0) {
corpFlag: 1, props["postAll"]({
departmentId: event[event.length - 1].id, corpFlag: 1,
}).then((res) => { departmentId: event[event.length - 1].id,
setPostData(res.data); }).then((res) => {
}); setPostData(res.data);
});
}
}; };
// 校验身份证重复 // 校验身份证重复
useEffect(() => { useEffect(() => {

View File

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

View File

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

View File

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

View File

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