Commit 4ff996a4 by zhaochengxiang

全文检索

parent 5aa636ac
...@@ -14,9 +14,27 @@ import AssetManage from './view/Manage/AssetManage'; ...@@ -14,9 +14,27 @@ import AssetManage from './view/Manage/AssetManage';
import AssetBrowse from './view/Manage/AssetBrowse'; import AssetBrowse from './view/Manage/AssetBrowse';
import AssetRecycle from './view/Manage/AssetRecycle'; import AssetRecycle from './view/Manage/AssetRecycle';
import DatasourceManage from './view/Manage/DatasourceManage'; import DatasourceManage from './view/Manage/DatasourceManage';
import ImportModal from './view/Manage/Model/Component/ImportModal';
export default class App extends React.Component { export default class App extends React.Component {
render() { render() {
const { params, callback } = this.props;
let message = '', id = '';
if (params) {
message = params.message||'';
id = params.id||'';
}
if (message === 'showDataModelDetail') {
return <ImportModal
modelerId={id}
reference='search'
action='detail'
/>;
}
return ( return (
<React.Fragment> <React.Fragment>
<Router basename={window.__POWERED_BY_QIANKUN__ ? '/data-govern' : '/'}> <Router basename={window.__POWERED_BY_QIANKUN__ ? '/data-govern' : '/'}>
......
...@@ -11,19 +11,18 @@ import App from './App' ...@@ -11,19 +11,18 @@ import App from './App'
import './index.less'; import './index.less';
const app = ( function render(props) {
const { container, ...restProps } = props;
ReactDOM.render(
//解决主次应用样式冲突 //解决主次应用样式冲突
//https://qiankun.umijs.org/faq#how-to-guarantee-the-main-app-stylesheet-isolated-with-sub-apps //https://qiankun.umijs.org/faq#how-to-guarantee-the-main-app-stylesheet-isolated-with-sub-apps
<ConfigProvider locale={zh_CN} prefixCls="yy"> <ConfigProvider locale={zh_CN} prefixCls="yy">
<Provider store={store}><App /></Provider> <Provider store={store}><App {...restProps} /></Provider>
</ConfigProvider> </ConfigProvider>,
); container ? container.querySelector('#root') : document.querySelector('#root'));
function render(props) {
const { container } = props;
ReactDOM.render(app, container ? container.querySelector('#root') : document.querySelector('#root'));
} }
function storeTest(props) { function storeTest(props) {
props.onGlobalStateChange((value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), true); props.onGlobalStateChange((value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), true);
......
...@@ -52,6 +52,7 @@ function GetMenuIcon({ name = '', isMenuItem = false }) { ...@@ -52,6 +52,7 @@ function GetMenuIcon({ name = '', isMenuItem = false }) {
function GetSubMenu(children, depth = 0) { function GetSubMenu(children, depth = 0) {
return children.map((route, i) => { return children.map((route, i) => {
const key = `${depth}-${i}`; const key = `${depth}-${i}`;
return route.children ? return route.children ?
<SubMenu key={route.path} className={'layout-menu'} <SubMenu key={route.path} className={'layout-menu'}
title={ title={
......
...@@ -11,7 +11,7 @@ import { dispatchLatest } from '../../../../model'; ...@@ -11,7 +11,7 @@ import { dispatchLatest } from '../../../../model';
import { showMessage } from '../../../../util'; import { showMessage } from '../../../../util';
const ImportModal = (props) => { const ImportModal = (props) => {
const { catalogId, visible, onCancel, action, addMode, modelerId } = props; const { catalogId, visible, onCancel, action, addMode, modelerId, reference=null } = props;
const [ step, setStep ] = useState(0); const [ step, setStep ] = useState(0);
const [ excelFiles, setExcelFiles ] = useState([]); const [ excelFiles, setExcelFiles ] = useState([]);
const [ hints, setHints ] = useState([]); const [ hints, setHints ] = useState([]);
...@@ -218,7 +218,9 @@ const ImportModal = (props) => { ...@@ -218,7 +218,9 @@ const ImportModal = (props) => {
} }
return ( return (
<Modal <>
{
!reference && <Modal
forceRender forceRender
visible={visible} visible={visible}
title={title} title={title}
...@@ -248,6 +250,11 @@ const ImportModal = (props) => { ...@@ -248,6 +250,11 @@ const ImportModal = (props) => {
} }
</> </>
</Modal> </Modal>
}
{
reference==='search' && <ImportAction hints={hints} onChange={onActionChange} action={action} modelerId={modelerId} form={form} />
}
</>
) )
} }
......
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