Commit ca48c955 authored by 涂伟's avatar 涂伟

fix: '编辑/添加事件业务类型下拉框数据获取逻辑优化'

parent 0236c8be
...@@ -65,6 +65,7 @@ const incident = () => { ...@@ -65,6 +65,7 @@ const incident = () => {
const [treeLoading, setTreeLoading] = useState(false); const [treeLoading, setTreeLoading] = useState(false);
const [treeVisible, setTreeVisible] = useState(true); // 左边列表是否可见 const [treeVisible, setTreeVisible] = useState(true); // 左边列表是否可见
const [treeData, setTreeData] = useState([]); // 事件表数据 const [treeData, setTreeData] = useState([]); // 事件表数据
const [modalTreeData, setModalTreeData] = useState([]); // 弹窗事件表数据
const [tableData, setTableData] = useState([]); // 事件表 const [tableData, setTableData] = useState([]); // 事件表
const [addVisible, setAddvisible] = useState(false); const [addVisible, setAddvisible] = useState(false);
const [processVisible, setProcessVisible] = useState(false); const [processVisible, setProcessVisible] = useState(false);
...@@ -301,6 +302,9 @@ const incident = () => { ...@@ -301,6 +302,9 @@ const incident = () => {
setRember1(newArr[0]); setRember1(newArr[0]);
} }
setTreeData(newArr); setTreeData(newArr);
if(!searchValue) {
setModalTreeData(newArr)
}
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
...@@ -698,7 +702,7 @@ const incident = () => { ...@@ -698,7 +702,7 @@ const incident = () => {
rember1={rember1} rember1={rember1}
maxLength={maxLength} maxLength={maxLength}
onClose={() => setAddvisible(false)} onClose={() => setAddvisible(false)}
treeData={treeData} treeData={modalTreeData}
selectData={select} selectData={select}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
placement="right" placement="right"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment