Commit 5b82f484 by zhaochengxiang

模型适配全文检索

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