Commit 744cada3 by zhaochengxiang

全文检索定位

parent bdcd6c5a
......@@ -55,4 +55,8 @@ export function* getServiceDigest(payload) {
export function* getVersions(payload) {
return yield call(pds.getVersions, payload)
}
export function* getDataServiceLocation(payload) {
return yield call(pds.getDataServiceLocation, payload)
}
\ No newline at end of file
......@@ -56,6 +56,10 @@ export function getVersions(payload) {
return PostJSON("/pdataservice/pdsCURD/getVersions", payload)
}
export function getDataServiceLocation(payload) {
return GetJSON("/pdataservice/pdsCURD/getDataServiceLocation", payload)
}
......
......@@ -36,7 +36,7 @@ const ModelTree = (props) => {
const { onSelect, onViewChange, refrence='', importStockModel, keyword } = props;
const { user } = useContext(AppContext);
const { user, env } = useContext(AppContext);
const [ loading, setLoading ] = useState(false);
const [ treeData, setTreeData ] = useState(null);
const [ item, setItem ] = useState(null);
......@@ -75,7 +75,7 @@ const ModelTree = (props) => {
onViewChange && onViewChange(viewModes[0].key);
if ((id||'') !== '') {
// getDataModelLocationThenGetDirTreeData();
getDataModelLocationThenGetDirTreeData();
} else if ((did||'') !== '') {
getDirTreeData(did);
} else {
......@@ -124,22 +124,23 @@ const ModelTree = (props) => {
// });
// }
// const getDataModelLocationThenGetDirTreeData = () => {
// setLoading(true);
// dispatch({
// type: 'datamodel.getDataModelLocation',
// payload: {
// id
// },
// callback: data => {
// getDirTreeData(data.easyDataModelerDataModelCatalogId||'', data.offset);
// },
// error: () => {
// setLoading(false);
// getDirTreeData();
// }
// });
// }
const getDataModelLocationThenGetDirTreeData = () => {
setLoading(true);
dispatch({
type: 'pds.getDataServiceLocation',
payload: {
id,
namespace: `${env?.domainId}`
},
callback: data => {
getDirTreeData(data.easyDataModelerDataModelCatalogId||'', data.offset);
},
error: () => {
setLoading(false);
getDirTreeData();
}
});
}
const getDirTreeData = (defaultSelectedId='', offset=null, type='refresh') => {
......
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