Commit d2abfe48 authored by 皮倩雯's avatar 皮倩雯

修改数据字典UI

parent 4c0477b6
Pipeline #31994 passed with stages
in 35 minutes 30 seconds
......@@ -44,7 +44,9 @@ const WebDic = () => {
const [searchWord, setSearchWord] = useState(''); // 关键字
const { Search } = Input;
const [files, setFiles] = useState('');
const [flag,setFlag] =useState(0)
const [flag, setFlag] = useState(0)
const [isloading, setIsloading] = useState(false)
const [InPutVisible, setInPutVisible] = useState(false);
const columns = [
......@@ -231,7 +233,7 @@ const WebDic = () => {
}, [flag]);
// 根据父节点nodeID(即parentID)获取子节点数据,一级条目parentID = -1
const getData = value => {
setLoading(true);
isLoadingShow(value, true)
GetDataDictionaryList({ nodeID: value }).then(resnew => {
if (resnew.code === 0) {
if (resnew.data.length > 0) {
......@@ -256,12 +258,12 @@ const WebDic = () => {
} else if (value) {
setSubData(res);//设置二级条目,res为空[]时也要设置
}
setLoading(false);
isLoadingShow(value, false)
} else {
setLoading(false);
isLoadingShow(value, false)
}
} else {
setLoading(false);
isLoadingShow(value, false)
notification.error({
message: '获取失败',
description: resnew.msg,
......@@ -271,7 +273,14 @@ const WebDic = () => {
};
const isLoadingShow = (value, data) => {
if (!value || value == -1) {
setLoading(data);
}
else {
setIsloading(data)
}
}
const onSearch = () => {
setSearchVisible(true)
}
......@@ -525,11 +534,11 @@ const WebDic = () => {
},
};
const input1 =()=>{
setFlag(flag+1)
const input1 = () => {
setFlag(flag + 1)
setInPutVisible(false);
}
const submitInput =()=>{
const submitInput = () => {
setInPutVisible(true);
}
return (
......@@ -588,6 +597,7 @@ const WebDic = () => {
</Col>
<Col span={16}>
{/* 二级条目 表格 */}
<Spin spinning={isloading} tip="loading...">
<Table
size="small"
bordered
......@@ -622,6 +632,7 @@ const WebDic = () => {
}}
pagination={pagenation}
/>
</Spin>
</Col>
</Row>
</Spin>
......
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