提交 ffb357d5 authored 作者: 钟是志's avatar 钟是志

动态菜单修改

上级 ca15f959
import RenderForm from "@/webPublic/FormInsertDiy/RenderForm";
import React from 'react';
import RenderForm from '@/webPublic/FormInsertDiy/RenderForm';
import { fetchTemplateById } from '@/webPublic/Services';
import { useState, useEffect } from "react";
import { useState, useEffect } from 'react';
import { Form } from 'antd';
import { getOneStopConfig } from '@/webPublic/zyd_public/utils/utils';
// const id = '1234718972352397312';
// 考核汇总页面
function OtherCheckRecord({ form, workId, ...otherProps }) {
function OtherCheckRecord({ workId, ...otherProps }) {
const pathname = otherProps?.location?.pathname;
const [data, setData] = useState();
useEffect(() => {
const id = workId || getOneStopConfig(pathname);
useEffect(() => {
setData(undefined);
fetchTemplateById(id).then(res => {
if (res) setData({...res, content: "{}"});
if (res) setData({ ...res, content: '{}' });
});
}, [pathname]);
}, [id]);
// console.log(data);
if (!data) {
return null;
} else {
const FormNew = Form.create(window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined)(RenderForm);
return <FormNew postData={data} style={{ padding: 0 }} />;
}
return !!data && <RenderForm form={form} postData={data} style={{ padding: 0 }} />;
}
export default Form.create()(OtherCheckRecord)
export default OtherCheckRecord;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论