Commit 5b82f484 by zhaochengxiang

模型适配全文检索

parent d7754991
......@@ -126,6 +126,10 @@ export function* getDataModel(payload) {
return yield call(datamodelerService.getDataModel, payload);
}
export function* getDataModelLocation(payload) {
return yield call(datamodelerService.getDataModelLocation, payload);
}
export function* ddlGenerators() {
return yield call(datamodelerService.ddlGenerators);
}
......
......@@ -80,6 +80,10 @@ export function getDataModel(payload) {
return GetJSON("/datamodeler/easyDataModelerCURD/getDataModel", payload);
}
export function getDataModelLocation(payload) {
return GetJSON("/datamodeler/easyDataModelerCURD/getDataModelLocation", payload);
}
export function ddlGenerators() {
return GetJSON("/datamodeler/easyDataModelerExport/ddlGenerators");
}
......
@import '../../../../variables.less';
.model-table {
.yy-table {
height: calc(100vh - @header-height - @pm-4 - @pm-3 - @pm-3 - 33px - 33px - @pm-3) !important;
height: calc(100vh - @header-height - @pm-4 - @pm-3 - @pm-3 - 37px - 37px - @pm-3) !important;
overflow: auto !important;
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import { PlusOutlined, EditOutlined, SyncOutlined, DeleteOutlined } from '@ant-
import UpdateTreeItemModal from './UpdateTreeItemModal';
import { dispatch } from '../../../../model';
import { showMessage, getQueryParam } from '../../../../util';
import { AnchorDid } from '../../../../util/constant';
import { AnchorDid, AnchorId } from '../../../../util/constant';
import './ModelTree.less';
......@@ -23,16 +23,35 @@ const ModelTree = (props) => {
const [modal, contextHolder] = Modal.useModal();
const did = getQueryParam(AnchorDid, props.location.search);
const id = getQueryParam(AnchorId, props.location.search);
const itemRef = useRef();
itemRef.current = item;
useEffect(() => {
getTreeData(did);
if ((id||'') !== '') {
getDataModelLocation();
} else {
getTreeData();
}
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [did])
}, [id])
const getDataModelLocation = () => {
setLoading(true);
dispatch({
type: 'datamodel.getDataModelLocation',
payload: {
id
},
callback: data => {
getTreeData(data.easyDataModelerDataModelCatalogId||'');
},
error: () => {
setLoading(false);
}
});
}
const getTreeData = (defaultSelectedId='') => {
......
@import '../../../../variables.less';
.model-tree {
.yy-tree-list {
height: calc(100vh - @header-height - @pm-4 - @pm-3 - 32px - 1px - @pm-3) !important;
height: calc(100vh - @header-height - @pm-4 - @pm-3 - 37px - @pm-3) !important;
overflow: auto !important;
}
}
\ No newline at end of file
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