删除log 二级页面不传权限 修改默认密码

dev
853931625@qq.com 2025-12-09 16:50:49 +08:00
parent e03fb16dc7
commit 20ee40b6f2
47 changed files with 468 additions and 363 deletions

View File

@ -32,7 +32,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"relation-graph": "^2.2.11",
"zy-react-library": "^1.0.141"
"zy-react-library": "^1.0.152"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",

View File

@ -27,7 +27,7 @@ export const userGetInfo = declareRequest(
);
export const corpDepartlist = declareRequest(
"departmentLoading",
"Post > @/basic-info/corpInfo/corpDepartlist",
"Post > @/basicInfo/corpInfo/corpDepartlist",
);

View File

@ -9,9 +9,9 @@ const ExpandAnimation = (departmentData) => {
const graphOptions = {
layout: {
layoutName: "tree",
min_per_width: 80,
max_per_width: 150,
min_per_height: 200,
min_per_width: 150,
max_per_width: 200,
min_per_height: 230,
},
defaultNodeShape: 1,
defaultNodeWidth: 130,

View File

@ -131,26 +131,26 @@ function Info(props) {
children: info.lrName,
},
{
label: "法人手机号",
label: "法定代表人手机号",
children: (
<div>
{info.lrMobile && info.lrMobile.label}
{ (info.lrMobile && info.lrMobile.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("lrMobile");
setViewData("");
setEncrypted(info.lrMobile);
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.lrMobile }
{/* { (info.lrMobile && info.lrMobile.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("lrMobile"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.lrMobile); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -164,22 +164,22 @@ function Info(props) {
children: (
<div>
{ info.contactsPhone && info.contactsPhone.label}
{ (info.contactsPhone && info.contactsPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("contactsPhone");
setViewData("");
setEncrypted(info.contactsPhone);
form.resetFields();
}}
>
点击查看
</Button>
)}
{ info.contactsPhone }
{/* { (info.contactsPhone && info.contactsPhone.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("contactsPhone"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.contactsPhone); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -193,23 +193,23 @@ function Info(props) {
label: "安全负责人手机号",
children: (
<div>
{info.safetyPhone && info.safetyPhone.label}
{ (info.safetyPhone && info.safetyPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("safetyPhone");
setViewData("");
setEncrypted(info.safetyPhone);
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.lrMobile && info.lrMobile.label}
{info.safetyPhone }
{/* { (info.safetyPhone && info.safetyPhone.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("safetyPhone"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.safetyPhone); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -329,7 +329,7 @@ function Info(props) {
{viewData}
</Form.Item>
<Form.Item
label="法人手机号码"
label="法定代表人手机号码"
hidden={!(viewType === "lrMobile" && viewData)}
>
{viewData}

View File

@ -83,9 +83,9 @@ function Update(props) {
const { data } = await props["corpInfoDetails"]({
id: queryParams["id"],
});
data.lrMobile = data.lrMobile && data.lrMobile.label;
data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
data.safetyPhone = data.safetyPhone && data.safetyPhone.label;
// data.lrMobile = data.lrMobile && data.lrMobile.label;
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
// data.safetyPhone = data.safetyPhone && data.safetyPhone.label;
setKeyId(data.corpinfoId);
data.region = data.village || data.street || data.country || data.city || data.province;
const licenseFile = await getFile({
@ -120,7 +120,7 @@ function Update(props) {
fetchData();
}, []);
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -139,7 +139,7 @@ function Update(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -303,7 +303,7 @@ function Update(props) {
},
},
{
label: "社会统一信用代码",
label: "统一社会信用代码",
name: "code",
required: false,
componentProps: {
@ -313,7 +313,7 @@ function Update(props) {
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],
@ -412,7 +412,6 @@ function Update(props) {
render: (
<IndustrySelect
onGetNodePaths={(data) => {
console.log(data);
setIndustryData(data);
}}
/>
@ -424,7 +423,7 @@ function Update(props) {
required: false,
},
{
label: "法人手机号",
label: "法定代表人手机号",
name: "lrMobile",
required: false,
rules: [

View File

@ -26,6 +26,7 @@ function List(props) {
transform: (formData) => {
return {
...formData,
usePermission: false,
};
},
});

View File

@ -13,8 +13,10 @@ function ChangeView(props) {
useEffect(() => {
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
console.log(res);
setInfo(res.data);
if(res.data){
setInfo(res.data);
}
});
}, []);

View File

@ -39,7 +39,6 @@ function List(props) {
});
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -125,6 +124,7 @@ function List(props) {
<Space>
<Button
type="link"
hidden={true}
onClick={() => {
setAddModalOpen(true);
setCurrentId(record.id);

View File

@ -7,8 +7,7 @@ import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
function Add() {
const queryParams = useGetUrlQuery();
const onSubmit = (values) => {
console.log(values);
const onSubmit = () => {
};
return (
<>

View File

@ -22,6 +22,7 @@ function OrganizationStructure(props) {
const [selectedNodeName, setSelectedNodeName] = useState("");
const [pathNodes, setPathNodes] = useState([]); // 仅由 LeftTree 更新
const { getUserInfo } = useGetUserInfo();
const [treeKey, setTreeKey] = useState(0);
const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["departmentList"], {
@ -62,6 +63,7 @@ function OrganizationStructure(props) {
if (res.success) {
message.success("删除成功");
getData();
setTreeKey(prev => prev + 1);
}
});
},
@ -107,7 +109,7 @@ function OrganizationStructure(props) {
return (
<div style={{ padding: 20 }}>
<div style={{ display: "flex", gap: 20 }}>
<LeftTree onGetNodePaths={onGetNodePaths} />
<LeftTree key={treeKey} onGetNodePaths={onGetNodePaths} />
<div style={{ flex: 1 }}>
<Search
form={form}
@ -134,7 +136,7 @@ function OrganizationStructure(props) {
新增
</Button>
)}
<Button icon={<LeftOutlined />} onClick={fnReturn}>
<Button icon={<LeftOutlined />} onClick={fnReturn} hidden={pathNodes.length === 0 || (pathNodes.length === 1 && pathNodes[0].parentId === "0")}>
返回
</Button>
</>
@ -199,7 +201,10 @@ function OrganizationStructure(props) {
requestAdd={props["departmentAdd"]}
requestEdit={props["departmentEdit"]}
requestDetails={props["departmentDetails"]}
getData={getData}
getData={() => {
getData();
setTreeKey(prev => prev + 1);
}}
selectedNodeName={selectedNodeName}
onCancel={() => {
setAddModalOpen(false);

View File

@ -57,7 +57,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "是否重置密码为Aa12345678",
content: "是否重置密码为Aa@12345678",
onOk: () => {
props["corpInfoChangePassword"]({
id,
@ -191,7 +191,7 @@ function List(props) {
dataIndex: "accountContactName",
},
{
title: "社会统一信用代码",
title: "统一社会信用代码",
dataIndex: "code",
width: 190,
},
@ -346,7 +346,7 @@ function AddModalComponent(props) {
props.getData();
};
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -367,7 +367,7 @@ function AddModalComponent(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -427,11 +427,11 @@ function AddModalComponent(props) {
},
{
name: "code",
label: "社会统一信用代码",
label: "统一社会信用代码",
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],
},

View File

@ -135,26 +135,26 @@ function View(props) {
children: info.lrName,
},
{
label: "法人手机号",
label: "法定代表人手机号",
children: (
<div>
{info.lrMobile && info.lrMobile.label}
{ (info.lrMobile && info.lrMobile.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("lrMobile");
setViewData("");
setEncrypted(info.lrMobile);
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.lrMobile }
{/* { (info.lrMobile && info.lrMobile.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("lrMobile"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.lrMobile); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -168,22 +168,22 @@ function View(props) {
children: (
<div>
{ info.contactsPhone && info.contactsPhone.label}
{ (info.contactsPhone && info.contactsPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("contactsPhone");
setViewData("");
setEncrypted(info.contactsPhone);
form.resetFields();
}}
>
点击查看
</Button>
)}
{ info.contactsPhone }
{/* { (info.contactsPhone && info.contactsPhone.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("contactsPhone"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.contactsPhone); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -302,7 +302,7 @@ function View(props) {
{viewData}
</Form.Item>
<Form.Item
label="法人手机号码"
label="法定代表人手机号码"
hidden={!(viewType === "lrMobile" && viewData)}
>
{viewData}

View File

@ -47,12 +47,10 @@ function List(props) {
});
const onFinish = async () => {
// 处理属地查询
console.log(cityData);
const arr = [];
cityData.forEach((item) => {
arr.push(item.value);
});
console.log(arr);
form.setFieldValue("cityRecord", arr);
getData();
};

View File

@ -39,13 +39,14 @@ function List(props) {
...formData,
eqDepartmentId: selectedNodeId,
eqCorpinfoId: queryParams["id"],
usePermission: false,
};
},
});
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "确定要重置密码为Aa12345678吗",
content: "确定要重置密码为Aa@12345678吗",
onOk: () => {
props["userChangePassword"]({
id,
@ -60,7 +61,6 @@ function List(props) {
};
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -202,13 +202,10 @@ function AddModalComponent(props) {
});
res.data.userImg = userImg;
res.data.cardImg = cardImg;
console.log(res.data);
setInfo(res.data);
};
fetchData();
console.log(info);
}
}, [props.currentId]);
const onCancel = () => {

View File

@ -58,8 +58,35 @@ function Add(props) {
const { data } = await props["userDetails"]({
id: queryParams["id"],
});
let idCardToSet = data.userIdCard;
if (idCardToSet) {
// 判断是否是 Base64 格式(可选)
try {
// 尝试解码,如果成功且结果是合法身份证号,则使用
const decoded = atob(idCardToSet);
if (/^\d{17}[\dX]$/.test(decoded)) {
idCardToSet = decoded;
}
// 否则保留原值(兼容未加密数据)
}
catch {
console.warn("Not a valid Base64 string, keep as is:", idCardToSet);
}
}
data.userIdCard = idCardToSet;
data.sex = data.sex === "男" ? "1" : "0";
fnChoiceDepartment(
[
{
id: data.departmentId,
},
],
1,
);
// const hiddenImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["13"], eqForeignKey: queryParams["id"] });
const filepath
= data.userAvatarUrl
@ -70,7 +97,6 @@ function Add(props) {
},
]
: [];
console.log(filepath);
const values = {
filepath,
...data,
@ -97,7 +123,6 @@ function Add(props) {
appKey: "0bb989ecada5470c87635018ece9f327",
dictValue: "renyuanleixing",
}).then((res) => {
console.log(res);
setUserTypeData(res.data);
});
}, []);
@ -121,6 +146,9 @@ function Add(props) {
foreignKey: userID,
},
});
if (values.userIdCard) {
values.userIdCard = btoa(values.userIdCard); // Base64 编码
}
values.userAvatarUrl = filePath;
values.mainCorpFlag = 0;
values.userType = 2;
@ -144,7 +172,6 @@ function Add(props) {
}
};
const fnChoiceDepartment = async (event) => {
console.log(event);
form.setFieldsValue({
postId: undefined,
});
@ -283,9 +310,11 @@ function Add(props) {
{
name: "postId",
label: "所属岗位",
required: false,
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: postData,
componentProps: {
disabled: queryParams["id"],
},
itemsField: {
labelKey: "postName",
valueKey: "id",
@ -294,7 +323,7 @@ function Add(props) {
{
name: "phone",
label: "手机号",
tip: "* 手机号为用户名修改手机号登录密码则会变成初始密码“Aa@123456789",
tip: "* 手机号为用户名修改手机号登录密码则会变成初始密码“Aa@12345678",
rules: [
{
pattern: PHONE,

View File

@ -71,7 +71,7 @@ function List(props) {
content: "确定要导出到excel吗",
onOk: () => {
downloadBlob(
`/basic-info/user/exportUserTable?ids=${selectedRowKeys.length !== 0 ? selectedRowKeys.join(",") : ""}`,
`/basicInfo/user/exportUserTable?ids=${selectedRowKeys.length !== 0 ? selectedRowKeys.join(",") : ""}`,
{
name: "用户",
},
@ -82,7 +82,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "确定要重置密码为Aa12345678吗",
content: "确定要重置密码为Aa@12345678吗",
onOk: () => {
props["userChangePassword"]({
id,
@ -96,8 +96,7 @@ function List(props) {
});
};
const onImportFileConfirm = (values) => {
console.log(values);
importFile("/basic-info/user/importUserTable", {
importFile("/basicInfo/user/importUserTableByCorp2", {
files: values.file,
}).then((res) => {
if (res.success) {
@ -108,7 +107,6 @@ function List(props) {
};
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -156,18 +154,18 @@ function List(props) {
toolBarRender={() => (
<>
{
// props.permission("yhglqyd-add")
// && (
<Button
type="primary"
icon={<AddIcon />}
onClick={() => {
props.history.push("./add");
}}
>
新增
</Button>
// )
props.permission("yhglqyd-add")
&& (
<Button
type="primary"
icon={<AddIcon />}
onClick={() => {
props.history.push("./add");
}}
>
新增
</Button>
)
}
@ -274,8 +272,7 @@ function List(props) {
}
{
(props.permission("yhglqyd-delete")
&& record.flag === 1) && (
(props.permission("yhglqyd-delete")) && (
<Button
danger
type="link"

View File

@ -171,7 +171,6 @@ function AddModalComponent(props) {
values.startValidityTime = values.startValidity[0];
values.endValidityTime = values.startValidity[1];
values.userQualificationinfoId = qualificationinfoId;
console.log(values.startValidity);
delete values.startValidity;
if (props.currentId) {
values.id = props.currentId;

View File

@ -116,17 +116,12 @@ function Qualification() {
}
function AddModalComponent(props) {
const [form] = Form.useForm();
useEffect(() => {
if (props.currentId) {
console.log(props.currentId);
}
}, [props.currentId]);
const onCancel = () => {
form.resetFields();
props.onCancel();
};
const onSubmit = async (values) => {
console.log(values);
const onSubmit = async () => {
onCancel();
props.getData();
};

View File

@ -124,8 +124,8 @@ function CorpInfo(props) {
const { data } = await props["corpInfoDetails"]({
id: res.data.corpinfoId,
});
data.lrMobile = data.lrMobile && data.lrMobile.label;
data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
// data.lrMobile = data.lrMobile && data.lrMobile.label;
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
data.region = data.village || data.street || data.country || data.city || data.province;
setInfoData(data);
@ -225,7 +225,7 @@ function CorpInfo(props) {
});
};
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -244,7 +244,7 @@ function CorpInfo(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -319,12 +319,12 @@ function CorpInfo(props) {
},
},
{
label: "社会统一信用代码",
label: "统一社会信用代码",
name: "code",
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],
componentProps: {
@ -406,7 +406,7 @@ function CorpInfo(props) {
},
{
label: "法人手机号",
label: "法定代表人手机号",
name: "lrMobile",
rules: [

View File

@ -25,7 +25,7 @@ function Department(props) {
const [selectedNodeName, setSelectedNodeName] = useState("");
const { getUserInfo } = useGetUserInfo();
const [pathNodes, setPathNodes] = useState([]); // 仅由 LeftTree 更新
const [treeKey, setTreeKey] = useState(0);
const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["departmentList"], {
form,
@ -56,6 +56,7 @@ function Department(props) {
if (res.success) {
message.success("删除成功");
getData();
setTreeKey(prev => prev + 1);
}
});
},
@ -121,7 +122,7 @@ function Department(props) {
gap: 20,
}}
>
<LeftTree onGetNodePaths={onGetNodePaths} />
<LeftTree key={treeKey} onGetNodePaths={onGetNodePaths} />
<div
style={{
flex: 1,
@ -162,7 +163,7 @@ function Department(props) {
</Button>
)
}
<Button icon={<LeftOutlined />} onClick={fnReturn}>
<Button icon={<LeftOutlined />} onClick={fnReturn} hidden={pathNodes.length === 0 || (pathNodes.length === 1 && pathNodes[0].parentId === "0")}>
返回
</Button>
</>
@ -233,7 +234,10 @@ function Department(props) {
<AddModal
open={addModalOpen}
loading={props.department.departmentLoading}
getData={getData}
getData={() => {
getData();
setTreeKey(prev => prev + 1);
}}
parentId={selectedNodeId}
currentId={currentId}
requestAdd={props["departmentAdd"]}

View File

@ -68,12 +68,29 @@ function Add(props) {
const debouncedUsernameValue = useDebounce(usernameValue, 600);
const debouncedPhoneValueValue = useDebounce(phoneValue, 600);
useEffect(() => {
console.log(queryParams["id"]);
if (queryParams["id"]) {
const fetchData = async () => {
const { data } = await props["userDetails"]({
id: queryParams["id"],
});
let idCardToSet = data.userIdCard;
if (idCardToSet) {
// 判断是否是 Base64 格式(可选)
try {
// 尝试解码,如果成功且结果是合法身份证号,则使用
const decoded = atob(idCardToSet);
if (/^\d{17}[\dX]$/.test(decoded)) {
idCardToSet = decoded;
}
// 否则保留原值(兼容未加密数据)
}
catch {
console.warn("Not a valid Base64 string, keep as is:", idCardToSet);
}
}
data.userIdCard = idCardToSet;
data.sex = data.sex === "男" ? "1" : "0";
setUserID(data.userId);
const userImg = await getFile({
@ -128,6 +145,9 @@ function Add(props) {
list: MARITAL_STATUS_ENUM,
});
if (values.userIdCard) {
values.userIdCard = btoa(values.userIdCard); // Base64 编码
}
const { id } = await uploadFile({
single: false,
files: values.userImg,
@ -344,7 +364,7 @@ function Add(props) {
{
name: "phone",
label: "用户名",
tip: "* 用户名为手机号修改手机号登录密码则会变成初始密码“Aa@123456789",
tip: "* 用户名为手机号修改手机号登录密码则会变成初始密码“Aa@12345678",
rules: [
{
pattern: PHONE,

View File

@ -42,7 +42,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "确定要重置密码为Aa12345678吗",
content: "确定要重置密码为Aa@12345678吗",
onOk: () => {
props["userChangePassword"]({
id,
@ -320,11 +320,9 @@ function AddModalComponent(props) {
});
res.data.userImg = userImg;
res.data.cardImg = cardImg;
console.log(res.data);
setInfo(res.data);
};
fetchData();
console.log(info);
}
}, [props.currentId]);
const onCancel = () => {

View File

@ -18,7 +18,6 @@ function ResignationReview(props) {
useEffect(() => {
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
console.log(res);
setInfo(res.data);
});
}, []);

View File

@ -70,7 +70,6 @@ function SecurityPersonnel(props) {
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
eqForeignKey: userQualificationinfoId,
});
console.log(res);
setFileCache(prev => ({
...prev,
[userQualificationinfoId]: res || [],
@ -234,7 +233,6 @@ function SecurityPersonnel(props) {
setCurrentId("");
}}
onSuccess={(userQualificationinfoId) => {
console.log(userQualificationinfoId);
// 清除该记录的图片缓存,强制下次 render 时重新加载
setFileCache((prev) => {
const newCache = { ...prev };

View File

@ -70,7 +70,6 @@ function SpecialPersonnel(props) {
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
eqForeignKey: userQualificationinfoId,
});
console.log(res);
setFileCache(prev => ({
...prev,
[userQualificationinfoId]: res || [],
@ -343,7 +342,6 @@ function AddModalComponent(props) {
form.setFieldsValue({
operatingProject: undefined,
});
console.log(newIdCard);
}
}
};

View File

@ -75,7 +75,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "是否重置密码为Aa12345678",
content: "是否重置密码为Aa@12345678",
onOk: () => {
props["corpInfoChangePassword"]({
id,
@ -192,7 +192,7 @@ function List(props) {
dataIndex: "corpName",
},
{
title: "社会统一信用代码",
title: "统一社会信用代码",
dataIndex: "code",
},
// {
@ -251,7 +251,7 @@ function List(props) {
)
}
{
props.permission("zhgl-editName")
props.permission("zgszhgl-editName")
&& (
<Button
type="link"
@ -273,7 +273,7 @@ function List(props) {
)
}
{
props.permission("zhgl-info")
props.permission("zgszhgl-info")
&& (
<Button
type="link"
@ -285,7 +285,7 @@ function List(props) {
}
{
props.permission("zhgl-resetPassword")
props.permission("zgszhgl-resetPassword")
&& (
<Button
type="link"
@ -297,7 +297,7 @@ function List(props) {
}
{
props.permission("zhgl-editFlag")
props.permission("zgszhgl-editFlag")
&& (
<Button
danger
@ -313,7 +313,7 @@ function List(props) {
)
}
{
props.permission("zhgl-delete")
props.permission("zgszhgl-delete")
&& (
<Button
danger
@ -389,7 +389,7 @@ function AddModalComponent(props) {
onCancel();
props.getData();
};
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -410,7 +410,7 @@ function AddModalComponent(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -445,7 +445,6 @@ function AddModalComponent(props) {
});
}, [debouncedCorpName]);
const onValuesChange = (changed) => {
console.log(changed);
if ("code" in changed)
setCodeValue(changed.code ?? "");
if ("corpName" in changed)
@ -470,11 +469,11 @@ function AddModalComponent(props) {
},
{
name: "code",
label: "社会统一信用代码",
label: "统一社会信用代码",
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],
hidden: props.openType === "editName",

View File

@ -64,7 +64,7 @@ function View(props) {
children: info.corpName && info.corpName,
},
{
label: "社会统一信用代码",
label: "统一社会信用代码",
children: info.code,
width: 200,
},

View File

@ -57,6 +57,7 @@ function List(props) {
transform: (formData) => {
return {
...formData,
enterpriseType: 2,
};
},
});

View File

@ -15,7 +15,7 @@ function View(props) {
const [addModalOpen, setAddModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const queryParams = useGetUrlQuery();
const [selectedNodeId, setSelectedNodeId] = useState(null);
const [selectedNodeId, setSelectedNodeId] = useState(queryParams["id"]);
const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["departmentList"], {
form,
@ -24,6 +24,7 @@ function View(props) {
...formData,
eqCorpinfoId: queryParams["id"],
eqParentId: selectedNodeId,
usePermission: false,
};
},
});

View File

@ -66,9 +66,6 @@ function List(props) {
setVisible(true);
};
const handleConfirm = (lng, lat, extra) => {
console.log("选中的坐标:", lng, lat);
console.log(extra);
console.log(rowData);
rowData.latitude = lat;
rowData.longitude = lng;
rowData.areaCode = extra.area;

View File

@ -168,22 +168,22 @@ function View(props) {
children: (
<div>
{info.lrMobile && info.lrMobile.label}
{ (info.lrMobile && info.lrMobile.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("lrMobile");
setViewData("");
setEncrypted(info.lrMobile);
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.lrMobile }
{/* { (info.lrMobile && info.lrMobile.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("lrMobile"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.lrMobile); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -208,22 +208,22 @@ function View(props) {
children: (
<div>
{ info.contactsPhone && info.contactsPhone.label}
{ (info.contactsPhone && info.contactsPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("contactsPhone");
setViewData("");
setEncrypted(info.contactsPhone);
form.resetFields();
}}
>
点击查看
</Button>
)}
{ info.contactsPhone }
{/*{ (info.contactsPhone && info.contactsPhone.label)*/}
{/* && (*/}
{/* <Button*/}
{/* type="link"*/}
{/* onClick={() => {*/}
{/* setIsModalOpen(true);*/}
{/* setViewType("contactsPhone");*/}
{/* setViewData("");*/}
{/* setEncrypted(info.contactsPhone);*/}
{/* form.resetFields();*/}
{/* }}*/}
{/* >*/}
{/* 点击查看*/}
{/* </Button>*/}
{/* )}*/}
</div>
),
@ -248,22 +248,22 @@ function View(props) {
children: (
<div>
{info.safetyPhone && info.safetyPhone.label}
{ (info.safetyPhone && info.safetyPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("safetyPhone");
setEncrypted(info.safetyPhone);
setViewData("");
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.safetyPhone }
{/*{ (info.safetyPhone && info.safetyPhone.label)*/}
{/* && (*/}
{/* <Button*/}
{/* type="link"*/}
{/* onClick={() => {*/}
{/* setIsModalOpen(true);*/}
{/* setViewType("safetyPhone");*/}
{/* setEncrypted(info.safetyPhone);*/}
{/* setViewData("");*/}
{/* form.resetFields();*/}
{/* }}*/}
{/* >*/}
{/* 点击查看*/}
{/* </Button>*/}
{/* )}*/}
</div>
),
@ -329,7 +329,7 @@ function View(props) {
{viewData}
</Form.Item>
<Form.Item
label="法人手机号码"
label="法定代表人手机号码"
hidden={!(viewType === "lrMobile" && viewData)}
>
{viewData}

View File

@ -24,12 +24,12 @@ function List(props) {
...formData,
eqDepartmentId: selectedNodeId,
eqCorpinfoId: queryParams["id"],
usePermission: false,
};
},
});
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -128,7 +128,6 @@ function AddModalComponent(props) {
setInfo(res.data);
};
fetchData();
console.log(info);
}
}, [props.currentId]);
const onCancel = () => {

View File

@ -26,6 +26,7 @@ function List(props) {
transform: (formData) => {
return {
...formData,
usePermission: false,
};
},
});

View File

@ -13,8 +13,9 @@ function ChangeView(props) {
useEffect(() => {
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
console.log(res);
setInfo(res.data);
if (res.data) {
setInfo(res.data);
}
});
}, []);

View File

@ -93,7 +93,7 @@ function List(props) {
{
title: "操作",
width: 200,
hidden: !(props.permission("qyyhzt-info")),
// hidden: !(props.permission("qyyhzt-info")),
render: (_, record) => (
<Space>

View File

@ -32,17 +32,18 @@ function List(props) {
const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["userList"], {
form,
usePermission: false,
transform: (formData) => {
return {
...formData,
eqDepartmentId: selectedNodeId,
corpinfoId: queryParams["id"],
};
},
});
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -129,6 +130,7 @@ function List(props) {
<Space>
<Button
type="link"
hidden={true}
onClick={() => {
setAddModalOpen(true);
setCurrentId(record.id);

View File

@ -52,13 +52,12 @@ function List(props) {
};
},
});
console.log(console.log(window.process.env.app.antd["ant-prefix"]));
const [addModalOpen, setAddModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "是否重置密码为Aa12345678",
content: "是否重置密码为Aa@12345678",
onOk: () => {
props["corpInfoChangePassword"]({
id,
@ -192,7 +191,7 @@ function List(props) {
dataIndex: "accountContactName",
},
{
title: "社会统一信用代码",
title: "统一社会信用代码",
dataIndex: "code",
width: 190,
},
@ -342,7 +341,7 @@ function AddModalComponent(props) {
props.getData();
};
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -363,7 +362,7 @@ function AddModalComponent(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -421,11 +420,11 @@ function AddModalComponent(props) {
},
{
name: "code",
label: "社会统一信用代码",
label: "统一社会信用代码",
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],
},
@ -460,7 +459,8 @@ function AddModalComponent(props) {
<DictionarySelect
mode="multiple"
dictValue="select_from_List"
idKey="dictValue"
nameKey="dictLabel"
onGetData={(data) => {
setSelectfromData(data);
}}

View File

@ -135,26 +135,26 @@ function View(props) {
children: info.lrName,
},
{
label: "法人手机号",
label: "法定代表人手机号",
children: (
<div>
{info.lrMobile && info.lrMobile.label}
{ (info.lrMobile && info.lrMobile.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("lrMobile");
setViewData("");
setEncrypted(info.lrMobile);
form.resetFields();
}}
>
点击查看
</Button>
)}
{info.lrMobile }
{/* { (info.lrMobile && info.lrMobile.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("lrMobile"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.lrMobile); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -168,22 +168,22 @@ function View(props) {
children: (
<div>
{ info.contactsPhone && info.contactsPhone.label}
{ (info.contactsPhone && info.contactsPhone.label)
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("contactsPhone");
setViewData("");
setEncrypted(info.contactsPhone);
form.resetFields();
}}
>
点击查看
</Button>
)}
{ info.contactsPhone }
{/* { (info.contactsPhone && info.contactsPhone.label) */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("contactsPhone"); */}
{/* setViewData(""); */}
{/* setEncrypted(info.contactsPhone); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -302,7 +302,7 @@ function View(props) {
{viewData}
</Form.Item>
<Form.Item
label="法人手机号码"
label="法定代表人手机号码"
hidden={!(viewType === "lrMobile" && viewData)}
>
{viewData}

View File

@ -11,8 +11,7 @@ function CertifiedUser() {
const { tableProps, getData } = useTable(() => {}, {
form,
});
const fnSearch = (values) => {
console.log(values);
const fnSearch = () => {
getData();
};
return (

View File

@ -33,6 +33,7 @@ function Department(props) {
...formData,
eqQualificationinfoType: 2,
eqCorpinfoId: queryParams["id"],
usePermission: false,
};
},
});
@ -64,7 +65,6 @@ function Department(props) {
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
eqForeignKey: userQualificationinfoId,
});
console.log(res);
setFileCache(prev => ({
...prev,
[userQualificationinfoId]: res || [],

View File

@ -35,6 +35,7 @@ function Department(props) {
...formData,
eqQualificationinfoType: 1,
eqCorpinfoId: queryParams["id"],
usePermission: false,
};
},
});
@ -63,7 +64,6 @@ function Department(props) {
eqType: UPLOAD_FILE_TYPE_ENUM["6"],
eqForeignKey: userQualificationinfoId,
});
console.log(res);
setFileCache(prev => ({
...prev,
[userQualificationinfoId]: res || [],
@ -309,7 +309,6 @@ function AddModalComponent(props) {
form.setFieldsValue({
operatingProject: undefined,
});
console.log(newIdCard);
}
}
};

View File

@ -47,12 +47,10 @@ function List(props) {
});
const onFinish = async () => {
// 处理属地查询
console.log(cityData);
const arr = [];
cityData.forEach((item) => {
arr.push(item.value);
});
console.log(arr);
form.setFieldValue("cityRecord", arr);
getData();
};

View File

@ -29,6 +29,7 @@ function List(props) {
...formData,
eqDepartmentId: selectedNodeId,
eqCorpinfoId: queryParams["id"],
usePermission: false,
};
},
});
@ -45,7 +46,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "确定要重置密码为Aa12345678吗",
content: "确定要重置密码为Aa@12345678吗",
onOk: () => {
props["userChangePassword"]({
id,
@ -60,7 +61,6 @@ function List(props) {
};
const onTreeChange = (selectedKeys) => {
const key = selectedKeys[0] || null;
console.log(selectedKeys);
setSelectedNodeId(key);
getData();
};
@ -198,13 +198,10 @@ function AddModalComponent(props) {
});
res.data.userImg = userImg;
res.data.cardImg = cardImg;
console.log(res.data);
setInfo(res.data);
};
fetchData();
console.log(info);
}
}, [props.currentId]);
const onCancel = () => {

View File

@ -42,7 +42,7 @@ function Update(props) {
fetchData();
}, []);
// 校验社会统一信用代码重复
// 校验统一社会信用代码重复
useEffect(() => {
if (!debouncedCode) {
form.setFields([
@ -61,7 +61,7 @@ function Update(props) {
form.setFields([
{
name: "code",
errors: ["该社会统一信用代码已被其他企业使用"],
errors: ["该统一社会信用代码已被其他企业使用"],
},
]);
}
@ -155,14 +155,14 @@ function Update(props) {
},
},
{
label: "社会统一信用代码",
label: "统一社会信用代码",
name: "code",
span: 24,
rules: [
{
pattern: UNIFIED_SOCIAL_CREDIT_CODE,
message: "请输入正确的社会统一信用代码",
message: "请输入正确的统一社会信用代码",
},
],

View File

@ -1,3 +1,4 @@
import { LeftOutlined } from "@ant-design/icons";
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, message, Modal, Space, Tag } from "antd";
@ -5,8 +6,8 @@ import { useEffect, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon";
import LeftTree from "zy-react-library/components/LeftTree/Department/Gwj/index";
import Search from "zy-react-library/components/Search";
import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
@ -23,6 +24,9 @@ function Department(props) {
const [chartModalOpen, setChartModalOpen] = useState(false);
const [departmentData, setDepartmentData] = useState(null);
const [form] = Form.useForm();
const [pathNodes, setPathNodes] = useState([]);
const [treeKey, setTreeKey] = useState(0);
const { tableProps, getData } = useTable(props["departmentList"], {
form,
transform: (formData) => {
@ -66,11 +70,59 @@ function Department(props) {
if (res.success) {
message.success("删除成功");
getData();
setTreeKey(prev => prev + 1);
}
});
},
});
};
const onGetNodePaths = (nodes) => {
if (!Array.isArray(nodes) || nodes.length === 0)
return;
const current = nodes[nodes.length - 1];
setPathNodes(nodes); // 记录完整路径
setSelectedNodeId(current.id);
setSelectedNodeName(current.name);
getData();
};
// 返回上一级
const fnReturn = () => {
if (pathNodes.length === 0 || (pathNodes.length === 1 && pathNodes[0].parentId === "0")) {
message.warning("已是顶级部门,无法继续返回");
return;
}
// 移除当前节点
const parent = pathNodes[pathNodes.length - 1];
setSelectedNodeId(parent.parentId);
setSelectedNodeName(parent.name);
const newPaths = pathNodes.slice(0, -1);
setPathNodes(newPaths);
getData();
};
const handleTableNodeClick = (record) => {
const currentPath = pathNodes;
// 情况1当前路径为空如初始化状态
if (currentPath.length === 0) {
setPathNodes([record]);
// 无法构建路径,只切换选中项
setSelectedNodeId(record.id);
setSelectedNodeName(record.name);
getData();
}
else {
// 安全地扩展路径
const newPath = [...currentPath, { id: record.id, name: record.name, parentId: record.parentId }];
setPathNodes(newPath);
setSelectedNodeId(record.id);
setSelectedNodeName(record.name);
getData();
}
};
return (
<div
@ -84,7 +136,7 @@ function Department(props) {
gap: 20,
}}
>
<LeftTree onSelect={onTreeChange} onGetData={data => setDepartmentData(data)} />
<LeftTree key={treeKey} onSelect={onTreeChange} onGetNodePaths={onGetNodePaths} onGetData={data => setDepartmentData(data)} />
<div
style={{
flex: 1,
@ -119,6 +171,9 @@ function Department(props) {
</Button>
)
}
<Button icon={<LeftOutlined />} onClick={fnReturn} hidden={pathNodes.length === 0 || (pathNodes.length === 1 && pathNodes[0].parentId === "0")}>
返回
</Button>
<Button
onClick={() => {
handleChartClick();
@ -136,11 +191,7 @@ function Department(props) {
<Button
block
type="link"
onClick={() => {
setSelectedNodeId(record.id);
getData();
setSelectedNodeName(record.name);
}}
onClick={() => handleTableNodeClick(record)}
>
{`${record.name}>`}
</Button>
@ -198,7 +249,10 @@ function Department(props) {
<AddModal
open={addModalOpen}
loading={props.department.departmentLoading}
getData={getData}
getData={() => {
getData();
setTreeKey(prev => prev + 1);
}}
parentId={selectedNodeId}
currentId={currentId}
requestAdd={props["departmentAdd"]}

View File

@ -63,6 +63,24 @@ function Add(props) {
const { data } = await props["userDetails"]({
id: queryParams["id"],
});
let idCardToSet = data.userIdCard;
if (idCardToSet) {
// 判断是否是 Base64 格式(可选)
try {
// 尝试解码,如果成功且结果是合法身份证号,则使用
const decoded = atob(idCardToSet);
if (/^\d{17}[\dX]$/.test(decoded)) {
idCardToSet = decoded;
}
// 否则保留原值(兼容未加密数据)
}
catch {
console.warn("Not a valid Base64 string, keep as is:", idCardToSet);
}
}
data.userIdCard = idCardToSet;
data.sex = data.sex === "男" ? "1" : "0";
fnChoiceDepartment(
[
@ -83,7 +101,6 @@ function Add(props) {
},
]
: [];
console.log(filepath);
const values = {
filepath,
...data,
@ -125,6 +142,9 @@ function Add(props) {
foreignKey: userID,
},
});
if (values.userIdCard) {
values.userIdCard = btoa(values.userIdCard); // Base64 编码
}
values.userAvatarUrl = filePath;
values.mainCorpFlag = 0;
values.userType = 1;
@ -148,7 +168,6 @@ function Add(props) {
}
};
const fnChoiceDepartment = async (event) => {
console.log(event);
form.setFieldsValue({
postId: undefined,
});
@ -157,7 +176,6 @@ function Add(props) {
corpFlag: 1,
departmentId: event[event.length - 1].id,
}).then((res) => {
console.log(res);
setPostData(res.data);
});
};

View File

@ -19,7 +19,6 @@ import useImportFile from "zy-react-library/hooks/useImportFile";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { NS_USER } from "~/enumerate/namespace";
import { maskPhone } from "~/utils";
function List(props) {
const [importOpen, setImportOpen] = useState(false);
@ -39,7 +38,7 @@ function List(props) {
return {
...formData,
eqDepartmentId: selectedNodeId,
menuPath: "/basicInfo/container/supervision/supervision/user/list",
menuPath: "",
};
},
});
@ -73,7 +72,7 @@ function List(props) {
content: "确定要导出到excel吗",
onOk: async () => {
downloadBlob(
`/basic-info/user/exportUserTable?ids=${selectedRowKeys.length !== 0 ? selectedRowKeys.join(",") : ""}`,
`/basicInfo/user/exportUserTable?ids=${selectedRowKeys.length !== 0 ? selectedRowKeys.join(",") : ""}`,
{
name: "用户",
},
@ -84,7 +83,7 @@ function List(props) {
const onResetPassword = (id) => {
Modal.confirm({
title: "提示",
content: "确定要重置密码为Aa12345678吗",
content: "确定要重置密码为Aa@12345678吗",
onOk: () => {
props["userChangePassword"]({
id,
@ -98,13 +97,17 @@ function List(props) {
});
};
const onImportFileConfirm = (values) => {
importFile("/basic-info/user/importUserTable", {
importFile("/basicInfo/user/importUserTable", {
files: values.file,
}).then((res) => {
if (res.success) {
message.success("导入成功");
getData();
}
});
// message.success("导入成功");
};
const onTreeChange = (selectedKeys) => {
console.log(selectedKeys);
const key = selectedKeys[0] || null;
setSelectedNodeId(key);
getData();
@ -216,18 +219,18 @@ function List(props) {
)
}
{
props.permission("zhgl-import")
&& (
<Button
type="primary"
icon={<ImportIcon />}
onClick={() => {
setImportOpen(true);
}}
>
导入
</Button>
)
// props.permission("zhgl-import")
// && (
<Button
type="primary"
icon={<ImportIcon />}
onClick={() => {
setImportOpen(true);
}}
>
导入
</Button>
// )
}
{
props.permission("zhgl-export")
@ -268,9 +271,7 @@ function List(props) {
{
title: "手机号",
dataIndex: "phone",
render: (text, record) => (
<div>{maskPhone(record.phone)}</div>
),
},
{
title: "所属部门",
@ -493,20 +494,20 @@ function AddModalComponent(props) {
<div>
{info.phone}
{info.phone
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("phone");
setViewData("");
form.resetFields();
}}
>
点击查看
</Button>
)}
{/* {info.phone === "隐藏" */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("phone"); */}
{/* setViewData(""); */}
{/* form.resetFields(); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),
@ -520,20 +521,20 @@ function AddModalComponent(props) {
children: (
<div>
{info.userIdCard}
{ info.userIdCard
&& (
<Button
type="link"
onClick={() => {
setIsModalOpen(true);
setViewType("userIdCard");
form.resetFields();
setViewData("");
}}
>
点击查看
</Button>
)}
{/* { info.userIdCard === "隐藏" */}
{/* && ( */}
{/* <Button */}
{/* type="link" */}
{/* onClick={() => { */}
{/* setIsModalOpen(true); */}
{/* setViewType("userIdCard"); */}
{/* form.resetFields(); */}
{/* setViewData(""); */}
{/* }} */}
{/* > */}
{/* 点击查看 */}
{/* </Button> */}
{/* )} */}
</div>
),