角色配置、单位类型配置

配合重庆项目需求变更
LiuJiaNan 2026-08-13 18:05:17 +08:00
parent b420d85971
commit fece36bc25
6 changed files with 50 additions and 15 deletions

View File

@ -3,7 +3,8 @@
"baseUrl": "src",
"paths": {
"~/*": ["*"]
}
},
"jsx": "react"
},
"include": ["src"]
}

View File

@ -58,6 +58,10 @@ export const corpDepartlist = declareRequest(
"departmentLoading",
"Post > @/basicInfo/corpInfo/corpDepartlist",
);
export const tenantTypeConfigList = declareRequest(
"departmentLoading",
"Post > @/appmenu/tenantTypeConfig/list",
);
// 根据登录人密码查手机号
export const getEncryInfo = declareRequest(

View File

@ -43,6 +43,11 @@ export const rolesAll = declareRequest(
"userLoading",
"Get > /system/operation/roles",
);
// 股份端获取角色
export const roleUnitAll = declareRequest(
"userLoading",
"Get > /appmenu/roleUnit/listAll",
);
// 获取角色
export const authRolesAll = declareRequest(
"userLoading",

View File

@ -347,6 +347,7 @@ function List(props) {
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
tenantTypeConfigList={props["tenantTypeConfigList"]}
onCancel={() => {
setAddModalOpen(false);
setCurrentId("");
@ -360,8 +361,23 @@ function AddModalComponent(props) {
const [form] = Form.useForm();
const [codeValue, setCodeValue] = useState("");
const [corpNameValue, setCorpNameValue] = useState("");
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
const debouncedCode = useDebounce(codeValue, 600);
const debouncedCorpName = useDebounce(corpNameValue, 600);
const getTenantTypeConfigList = async () => {
let menuId = "";
if (window.__IN_BASE__) {
const res = await window.base.call.getMenuInfoByPath({ path: window.location.pathname });
menuId = res?.[0].menuCode;
}
const { data } = await props.tenantTypeConfigList({ menuId, pageIndex: 1, pageSize: 9999 });
setTenantTypeConfigList(data);
};
useEffect(() => {
getTenantTypeConfigList();
}, []);
useEffect(() => {
if (props.currentId) {
props
@ -513,7 +529,8 @@ function AddModalComponent(props) {
name: "type",
label: "企业类型",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
items: tenantTypeConfigList,
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
hidden: props.openType === "editName",
},
{

View File

@ -13,7 +13,7 @@ import useTable from "zy-react-library/hooks/useTable";
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE } from "~/enumerate/namespace";
import { getAreaNamePath, useDebounce } from "~/utils";
import { useDebounce } from "~/utils";
const ENTERPRISE_TYPE = [
{
@ -299,7 +299,7 @@ function List(props) {
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
tenantTypeConfigList={props["tenantTypeConfigList"]}
loding={props.enterprise.userLoading}
onCancel={() => {
setAddModalOpen(false);
@ -314,9 +314,24 @@ function AddModalComponent(props) {
const [form] = Form.useForm();
const [codeValue, setCodeValue] = useState("");
const [corpNameValue, setCorpNameValue] = useState("");
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
const debouncedCode = useDebounce(codeValue, 600);
const debouncedCorpName = useDebounce(corpNameValue, 600);
// const [selectfromData, setSelectfromData] = useState([]);
const getTenantTypeConfigList = async () => {
let menuId = "";
if (window.__IN_BASE__) {
const res = await window.base.call.getMenuInfoByPath({ path: window.location.pathname });
menuId = res?.[0].menuCode;
}
const { data } = await props.tenantTypeConfigList({ menuId, pageIndex: 1, pageSize: 9999 });
setTenantTypeConfigList(data);
};
useEffect(() => {
getTenantTypeConfigList();
}, []);
useEffect(() => {
if (props.currentId) {
props
@ -481,7 +496,8 @@ function AddModalComponent(props) {
name: "type",
label: "相关方类型",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
items: tenantTypeConfigList,
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
componentProps: {
disabled: props.currentId,
},

View File

@ -111,16 +111,8 @@ function Add(props) {
};
fetchData();
}
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
const arr = [];
if (res.data && res.data.length > 0) {
res.data.forEach((item) => {
if (item.roleGroupId === "2008482924409827329") {
arr.push(item);
}
});
}
setRolesData(arr);
props["roleUnitAll"]().then((res) => {
setRolesData(res.data);
});
}, []);
const onSubmit = async (values) => {