Compare commits

..

No commits in common. "4098c0a71ff29b314cb2f3d0984c29905c719e3d" and "3a730f9de04245bbb32f090c8a7a702b9f7a13c4" have entirely different histories.

4 changed files with 6 additions and 39 deletions

View File

@ -103,7 +103,6 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
<Form.Item label="监测时间" name="tm">
<RangePicker
allowClear
showTime
style={{ width: "350px" }}
format="YYYY-MM-DD HH:mm:ss"
onChange={(v)=>{

View File

@ -103,7 +103,6 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
<Form.Item label="监测时间" name="tm">
<RangePicker
allowClear
showTime
style={{ width: "350px" }}
format="YYYY-MM-DD HH:mm:ss"
onChange={(v)=>{

View File

@ -433,13 +433,7 @@ const EditableRow = ({ index, ...props }) => {
// assessScore
// }
// })
const res = checkList.map(item => {
if (item.rowSpan == 0 || item.rowSpan) {
item.rowSpan = undefined
}
return item
})
setTableData(handleData(res, "name"))
setTableData(handleData(checkList, "name"))
} else {
setCheckList(tableData)
const newData = tabs == 2 ? tableData.filter(item => item.standardScore > item.indicatorScore) :
@ -677,7 +671,7 @@ const EditableRow = ({ index, ...props }) => {
<Row gutter={[16]}>
{
// loading ? <span>文件正在上传中,请等待</span> :
loading ? <span>文件正在上传中请等待</span> :
imgfileList.length > 0 && imgfileList.map(file => {
return (
<Col span={12}>

View File

@ -21,7 +21,7 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
const [url, setUrl] = useState('')
const [isModal, setIsModal] = useState(false)
const [loading, setLoading] = useState(false)
const [searchValue, setSearchValue] = useState('');
//
@ -161,28 +161,7 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
}, [type, formJsonData, isModalOpen])
const handleTreeData = (treeData, searchValue = '') => {
const loop = (data) => {
return data.map((item) => {
const strTitle = item.title?.toString() || '';
const matchValue = strTitle.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
const children = item.children ? loop(item.children) : [];
const hasChildren = children && children.length > 0;
return {
...item,
disabled: hasChildren, // 有子节点的设为禁用
children: hasChildren ? children : undefined
};
});
};
return loop(treeData);
};
const disableParentNodes =(treeData) => {
debugger
return treeData.map(node => {
const newNode = { ...node };
if (node.children && node.children.length > 0) {
@ -288,14 +267,10 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
allowClear
onSearch={setSearchValue}
fieldNames={item.fieldNames}
treeData={handleTreeData(item.treeData,searchValue)}
treeData={disableParentNodes(item.treeData)}
treeCheckable={item.multiple}
disabled={type == 'view'}
filterTreeNode={(inputValue, treeNode) => {
return treeNode.legalName.toLowerCase().includes(inputValue.toLowerCase());
}}
/>
</Form.Item>}