diff --git a/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js b/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js
index 1d57066ae..744a24560 100644
--- a/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js
+++ b/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js
@@ -103,6 +103,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
{
diff --git a/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js b/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js
index 524871f8c..48c9a40cb 100644
--- a/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js
+++ b/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js
@@ -103,6 +103,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
{
diff --git a/src/views/rcgl/jdkh/khrwgl/PfDetail.js b/src/views/rcgl/jdkh/khrwgl/PfDetail.js
index a783972c9..67d08a1bd 100644
--- a/src/views/rcgl/jdkh/khrwgl/PfDetail.js
+++ b/src/views/rcgl/jdkh/khrwgl/PfDetail.js
@@ -433,7 +433,13 @@ const EditableRow = ({ index, ...props }) => {
// assessScore
// }
// })
- setTableData(handleData(checkList, "name"))
+ const res = checkList.map(item => {
+ if (item.rowSpan == 0 || item.rowSpan) {
+ item.rowSpan = undefined
+ }
+ return item
+ })
+ setTableData(handleData(res, "name"))
} else {
setCheckList(tableData)
const newData = tabs == 2 ? tableData.filter(item => item.standardScore > item.indicatorScore) :
@@ -441,7 +447,7 @@ const EditableRow = ({ index, ...props }) => {
newData.forEach(item => {
if (item.rowSpan) delete item.rowSpan;
})
- const res = handleData(newData, "name")
+ const res = handleData(newData, "name")
setTableData(res);
}
}
@@ -671,7 +677,7 @@ const EditableRow = ({ index, ...props }) => {
{
- loading ? 文件正在上传中,请等待 :
+ // loading ? 文件正在上传中,请等待 :
imgfileList.length > 0 && imgfileList.map(file => {
return (
diff --git a/src/views/sz/szzf/form/index.js b/src/views/sz/szzf/form/index.js
index 00dd214b8..b3999bc33 100644
--- a/src/views/sz/szzf/form/index.js
+++ b/src/views/sz/szzf/form/index.js
@@ -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,7 +161,28 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
}, [type, formJsonData, isModalOpen])
- const disableParentNodes =(treeData) => {
+ 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) {
@@ -267,10 +288,14 @@ const FormZdy = ({ fileKey,typeName = "ddForm", formJson, getFormInfo, type, for
style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
allowClear
+ onSearch={setSearchValue}
fieldNames={item.fieldNames}
- treeData={disableParentNodes(item.treeData)}
+ treeData={handleTreeData(item.treeData,searchValue)}
treeCheckable={item.multiple}
disabled={type == 'view'}
+ filterTreeNode={(inputValue, treeNode) => {
+ return treeNode.legalName.toLowerCase().includes(inputValue.toLowerCase());
+ }}
/>
}