Commit 0235c15b by zhaochengxiang

修改模型bug

parent 667149d0
......@@ -12,6 +12,7 @@ import Map from './view/Manage/Map';
import Model from './view/Manage/Model';
import AssetManage from './view/Manage/AssetManage';
import AssetRecycle from './view/Manage/AssetRecycle';
import DatasourceManage from './view/Manage/DatasourceManage';
export default class App extends React.Component {
render() {
......@@ -21,6 +22,7 @@ export default class App extends React.Component {
<Switch>
<Route path={`${ContextPath}/login`} component={Signin} exact />
<Route path={`${ContextPath}/home`} component={Home} />
<Route path={`${ContextPath}/datasource-manage`} component={DatasourceManage} exact />
<Route path={`${ContextPath}/data-map`} component={Map} exact />
<Route path={`${ContextPath}/manage`} component={Manage} />
<Route path={`/center-home/view/data-model`} component={Model} exact />
......
......@@ -12,6 +12,10 @@ export const routes = [
redirect: 'map',
children: [
{
name: 'datasource-manage',
text: '数据源管理',
},
{
name: 'data-model',
text: '数据模型',
},
......
import React from 'react';
const DatasourceManage = (props) => {
return (
<>
Datasource manage
</>
);
}
export default DatasourceManage;
\ No newline at end of file
......@@ -172,7 +172,7 @@ const ImportAction = (props) => {
const onHeaderChange = (changedValues, allValues) => {
if (changedValues.hasOwnProperty('name')) {
const newModelerData = {...modelerData, name: allValues.name};
const newModelerData = {...modelerData, name: allValues.name, cnName: allValues.cnName};
validateDataModel(newModelerData);
}
}
......
......@@ -273,7 +273,7 @@ const ImportActionIndex = (props) => {
//规则改变的时候 数据表为可编辑状态
useEffect(() => {
setEditingKey(null);
}, [constraint, template])
}, [constraint, template, modelerData])
useEffect(() => {
......
......@@ -236,7 +236,7 @@ const ImportActionTable = (props) => {
//规则改变的时候 数据表为可编辑状态
useEffect(() => {
setEditingKey('');
}, [constraint, template])
}, [constraint, template, modelerData])
useEffect(() => {
......@@ -263,6 +263,7 @@ const ImportActionTable = (props) => {
remark: '',
...record,
});
setEditingKey(record.iid);
};
......@@ -325,7 +326,7 @@ const ImportActionTable = (props) => {
if (index === -1) {
newData.splice(0, 0, row);
newData.splice(0, 0, {...row, iid: editingKey});
} else {
const item = newData[index];
......
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