角色配置、单位类型配置
parent
b420d85971
commit
fece36bc25
|
|
@ -3,7 +3,8 @@
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"paths": {
|
"paths": {
|
||||||
"~/*": ["*"]
|
"~/*": ["*"]
|
||||||
}
|
},
|
||||||
|
"jsx": "react"
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ export const corpDepartlist = declareRequest(
|
||||||
"departmentLoading",
|
"departmentLoading",
|
||||||
"Post > @/basicInfo/corpInfo/corpDepartlist",
|
"Post > @/basicInfo/corpInfo/corpDepartlist",
|
||||||
);
|
);
|
||||||
|
export const tenantTypeConfigList = declareRequest(
|
||||||
|
"departmentLoading",
|
||||||
|
"Post > @/appmenu/tenantTypeConfig/list",
|
||||||
|
);
|
||||||
|
|
||||||
// 根据登录人密码查手机号
|
// 根据登录人密码查手机号
|
||||||
export const getEncryInfo = declareRequest(
|
export const getEncryInfo = declareRequest(
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,11 @@ export const rolesAll = declareRequest(
|
||||||
"userLoading",
|
"userLoading",
|
||||||
"Get > /system/operation/roles",
|
"Get > /system/operation/roles",
|
||||||
);
|
);
|
||||||
|
// 股份端获取角色
|
||||||
|
export const roleUnitAll = declareRequest(
|
||||||
|
"userLoading",
|
||||||
|
"Get > /appmenu/roleUnit/listAll",
|
||||||
|
);
|
||||||
// 获取角色
|
// 获取角色
|
||||||
export const authRolesAll = declareRequest(
|
export const authRolesAll = declareRequest(
|
||||||
"userLoading",
|
"userLoading",
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,7 @@ function List(props) {
|
||||||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||||
|
tenantTypeConfigList={props["tenantTypeConfigList"]}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalOpen(false);
|
setAddModalOpen(false);
|
||||||
setCurrentId("");
|
setCurrentId("");
|
||||||
|
|
@ -360,8 +361,23 @@ function AddModalComponent(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [codeValue, setCodeValue] = useState("");
|
const [codeValue, setCodeValue] = useState("");
|
||||||
const [corpNameValue, setCorpNameValue] = useState("");
|
const [corpNameValue, setCorpNameValue] = useState("");
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const debouncedCode = useDebounce(codeValue, 600);
|
const debouncedCode = useDebounce(codeValue, 600);
|
||||||
const debouncedCorpName = useDebounce(corpNameValue, 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(() => {
|
useEffect(() => {
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
props
|
props
|
||||||
|
|
@ -513,7 +529,8 @@ function AddModalComponent(props) {
|
||||||
name: "type",
|
name: "type",
|
||||||
label: "企业类型",
|
label: "企业类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
hidden: props.openType === "editName",
|
hidden: props.openType === "editName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||||
import { getAreaNamePath, useDebounce } from "~/utils";
|
import { useDebounce } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
const ENTERPRISE_TYPE = [
|
||||||
{
|
{
|
||||||
|
|
@ -299,7 +299,7 @@ function List(props) {
|
||||||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||||
|
tenantTypeConfigList={props["tenantTypeConfigList"]}
|
||||||
loding={props.enterprise.userLoading}
|
loding={props.enterprise.userLoading}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalOpen(false);
|
setAddModalOpen(false);
|
||||||
|
|
@ -314,9 +314,24 @@ function AddModalComponent(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [codeValue, setCodeValue] = useState("");
|
const [codeValue, setCodeValue] = useState("");
|
||||||
const [corpNameValue, setCorpNameValue] = useState("");
|
const [corpNameValue, setCorpNameValue] = useState("");
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const debouncedCode = useDebounce(codeValue, 600);
|
const debouncedCode = useDebounce(codeValue, 600);
|
||||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||||
// const [selectfromData, setSelectfromData] = useState([]);
|
// 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(() => {
|
useEffect(() => {
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
props
|
props
|
||||||
|
|
@ -481,7 +496,8 @@ function AddModalComponent(props) {
|
||||||
name: "type",
|
name: "type",
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
componentProps: {
|
componentProps: {
|
||||||
disabled: props.currentId,
|
disabled: props.currentId,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -111,16 +111,8 @@ function Add(props) {
|
||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
}
|
}
|
||||||
props["rolesAll"]({ pageIndex: 1, pageSize: 1000 }).then((res) => {
|
props["roleUnitAll"]().then((res) => {
|
||||||
const arr = [];
|
setRolesData(res.data);
|
||||||
if (res.data && res.data.length > 0) {
|
|
||||||
res.data.forEach((item) => {
|
|
||||||
if (item.roleGroupId === "2008482924409827329") {
|
|
||||||
arr.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setRolesData(arr);
|
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue