no message

master
853931625@qq.com 2026-03-25 11:24:51 +08:00
parent 9195a5ad78
commit 583e255167
4 changed files with 86 additions and 37 deletions

View File

@ -29,6 +29,7 @@ module.exports = {
appKey: "", appKey: "",
// fileUrl: "http://192.168.20.240:9787/mnt/", // fileUrl: "http://192.168.20.240:9787/mnt/",
fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
// fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
}, },
// public/index.html注入全局变量 // public/index.html注入全局变量
windowInject: { windowInject: {

View File

@ -240,6 +240,19 @@ function List(props) {
</Button> </Button>
) )
} }
<Button
type="link"
onClick={() =>
Modal.confirm({
title: "提示",
content: "请联系管理员操作!",
onOk: () => {
},
})}
>
修改企业名称
</Button>
{props.permission("qyd-xgf-resetPassword") {props.permission("qyd-xgf-resetPassword")
&& ( && (
<Button <Button
@ -426,6 +439,10 @@ function AddModalComponent(props) {
{ {
name: "corpName", name: "corpName",
label: "企业名称", label: "企业名称",
required: !props.currentId,
componentProps: {
disabled: props.currentId,
},
}, },
{ {
name: "code", name: "code",

View File

@ -98,6 +98,7 @@ function CorpInfo(props) {
const [info, setInfoData] = useState([]); const [info, setInfoData] = useState([]);
const [codeValue, setCodeValue] = useState(""); const [codeValue, setCodeValue] = useState("");
const [corpNameValue, setCorpNameValue] = useState(""); const [corpNameValue, setCorpNameValue] = useState("");
const [corpinfoId, setCorpInfoId] = useState("");
const debouncedCode = useDebounce(codeValue, 600); const debouncedCode = useDebounce(codeValue, 600);
const debouncedCorpName = useDebounce(corpNameValue, 600); const debouncedCorpName = useDebounce(corpNameValue, 600);
function getLastValidCorpTypeName(item) { function getLastValidCorpTypeName(item) {
@ -119,7 +120,6 @@ function CorpInfo(props) {
// 全为空则返回空字符串或默认值 // 全为空则返回空字符串或默认值
return ""; return "";
} }
useEffect(() => {
const fetchData = async () => { const fetchData = async () => {
const res = await props["userGetInfo"](); const res = await props["userGetInfo"]();
const { data } = await props["corpInfoDetails"]({ const { data } = await props["corpInfoDetails"]({
@ -130,6 +130,7 @@ function CorpInfo(props) {
data.region = data.village || data.street || data.country || data.city || data.province; data.region = data.village || data.street || data.country || data.city || data.province;
setInfoData(data); setInfoData(data);
setCorpInfoId(res.data.corpinfoId)
setKeyId({ setKeyId({
id: res.data.corpinfoId, id: res.data.corpinfoId,
corpinfoId: res.data.userId, corpinfoId: res.data.userId,
@ -160,6 +161,8 @@ function CorpInfo(props) {
...values, ...values,
}); });
}; };
useEffect(() => {
fetchData(); fetchData();
}, []); }, []);
const onSubmit = async (values) => { const onSubmit = async (values) => {
@ -223,7 +226,16 @@ function CorpInfo(props) {
props["corpInfoEdit"](values).then((res) => { props["corpInfoEdit"](values).then((res) => {
if (res.success) { if (res.success) {
message.success("操作成功!"); message.success("操作成功!");
window.location.reload(); props["corpInfoDetails"]({
id: corpinfoId,
}).then(res =>{
res.data.region = res.data.village || res.data.street || res.data.country || res.data.city || res.data.province;
setInfoData(res.data);
});
// data.lrMobile = data.lrMobile && data.lrMobile.label;
// data.contactsPhone = data.contactsPhone && data.contactsPhone.label;
} }
}); });
}; };

View File

@ -250,6 +250,21 @@ function List(props) {
</Button> </Button>
) )
} }
<Button
type="link"
onClick={() =>
Modal.confirm({
title: "提示",
content: "请联系管理员操作!",
onOk: () => {
},
})}
>
修改企业名称
</Button>
{props.permission("gszhxxgl-resetPassword") {props.permission("gszhxxgl-resetPassword")
&& ( && (
<Button <Button
@ -429,7 +444,11 @@ function AddModalComponent(props) {
options={[ options={[
{ {
name: "corpName", name: "corpName",
label: "单位名称", label: "企业名称",
required: !props.currentId,
componentProps: {
disabled: props.currentId,
},
}, },
{ {
name: "code", name: "code",