Commit 9cecc1cf by zhaochengxiang

模型审批详情

parent 86d09ee5
...@@ -96,6 +96,7 @@ export class App extends React.Component { ...@@ -96,6 +96,7 @@ export class App extends React.Component {
<Route path={'/center-home/menu/asset-manage'} component={AssetManage} exact /> <Route path={'/center-home/menu/asset-manage'} component={AssetManage} exact />
<Route path={'/center-home/menu/asset-browse'} component={AssetBrowse} exact /> <Route path={'/center-home/menu/asset-browse'} component={AssetBrowse} exact />
<Route path={'/center-home/menu/asset-recycle'} component={AssetRecycle} exact /> <Route path={'/center-home/menu/asset-recycle'} component={AssetRecycle} exact />
<Route path={'/center-home/data-model-action'} component={EditModel} exact />
</Switch> </Switch>
</Router> </Router>
</AppContext.Provider> </AppContext.Provider>
......
...@@ -137,7 +137,7 @@ const AssetEdit = (props) => { ...@@ -137,7 +137,7 @@ const AssetEdit = (props) => {
<AppContext.Consumer> <AppContext.Consumer>
{ {
value => { value => {
value?.onGlobalStateChange((state, prev) => { value?.onGlobalStateChange&&value?.onGlobalStateChange((state, prev) => {
if (state.message === 'data-govern-show-metadata-list-callback-message') { if (state.message === 'data-govern-show-metadata-list-callback-message') {
form?.setFieldsValue({ '资产项': state.data }); form?.setFieldsValue({ '资产项': state.data });
} }
......
...@@ -149,10 +149,10 @@ const init = (ctx) => function (container, data) { ...@@ -149,10 +149,10 @@ const init = (ctx) => function (container, data) {
label: fittingString(node.text||'', maxTextWidth, globalFontSize), label: fittingString(node.text||'', maxTextWidth, globalFontSize),
labelCfg: { labelCfg: {
position: 'bottom', position: 'bottom',
offset: -5, offset: 5,
style: { style: {
rotate: Math.PI / 2, rotate: 0,
textAlign: 'start', textAlign: 'center',
}, },
}, },
}; };
......
...@@ -106,7 +106,7 @@ const EditModel = (props) => { ...@@ -106,7 +106,7 @@ const EditModel = (props) => {
title = '新增模型'; title = '新增模型';
} else if (action === 'edit') { } else if (action === 'edit') {
title = '模型编辑'; title = '模型编辑';
} else if (action === 'detail') { } else if (action === 'detail' || action === 'flow') {
title = '模型详情'; title = '模型详情';
} }
......
...@@ -26,7 +26,7 @@ const ImportAction = (props) => { ...@@ -26,7 +26,7 @@ const ImportAction = (props) => {
if ((action||'')==='') return; if ((action||'')==='') return;
//初始化form状态 //初始化form状态
if (action==='add'||action==='edit') { if (action==='add'||action==='edit'||action==='flow') {
form.setFieldsValue({ form.setFieldsValue({
cnName: '', cnName: '',
name: '', name: '',
...@@ -58,7 +58,7 @@ const ImportAction = (props) => { ...@@ -58,7 +58,7 @@ const ImportAction = (props) => {
} else { } else {
getDraft((data.constraints||[]).length>0?data.constraints[0]:{}, {} ,[]); getDraft((data.constraints||[]).length>0?data.constraints[0]:{}, {} ,[]);
} }
} else if(action === 'edit' || action === 'detail') { } else if(action === 'edit' || action === 'detail' || action ==='flow') {
getCurrentDataModel(); getCurrentDataModel();
} }
}, },
...@@ -252,7 +252,7 @@ const ImportAction = (props) => { ...@@ -252,7 +252,7 @@ const ImportAction = (props) => {
dispatch({ dispatch({
type: 'datamodel.validateDataModel', type: 'datamodel.validateDataModel',
payload: { payload: {
data: action==='detail'?data:{ ...data, name: row.name||'', cnName: row.cnName||'' }, data: (action==='detail'||action==='flow')?data:{ ...data, name: row.name||'', cnName: row.cnName||'' },
}, },
callback: _data => { callback: _data => {
setValidateReports(_data||[]); setValidateReports(_data||[]);
...@@ -307,7 +307,7 @@ const ImportAction = (props) => { ...@@ -307,7 +307,7 @@ const ImportAction = (props) => {
const container = (<React.Fragment> const container = (<React.Fragment>
<ImportActionHeader <ImportActionHeader
form={form} form={form}
editable={action!=='detail'} editable={action!=='detail'&&action!=='flow'}
modelerData={modelerData||{}} modelerData={modelerData||{}}
constraints={constraints} constraints={constraints}
templates={templates} templates={templates}
...@@ -324,7 +324,7 @@ const ImportAction = (props) => { ...@@ -324,7 +324,7 @@ const ImportAction = (props) => {
validateReports={validateReports} validateReports={validateReports}
supportedDatatypes={supportedDatatypes} supportedDatatypes={supportedDatatypes}
onChange={onTableChange} onChange={onTableChange}
editable={action!=='detail'} editable={action!=='detail'&&action!=='flow'}
terms={terms} terms={terms}
/> />
<ImportActionIndex <ImportActionIndex
...@@ -333,7 +333,7 @@ const ImportAction = (props) => { ...@@ -333,7 +333,7 @@ const ImportAction = (props) => {
template={template} template={template}
validateReports={validateReports} validateReports={validateReports}
onChange={onIndexChange} onChange={onIndexChange}
editable={action!=='detail'} editable={action!=='detail'&&action!=='flow'}
terms={terms} terms={terms}
/> />
<ImportActionPartition <ImportActionPartition
...@@ -343,7 +343,7 @@ const ImportAction = (props) => { ...@@ -343,7 +343,7 @@ const ImportAction = (props) => {
validateReports={validateReports} validateReports={validateReports}
supportedPartitionTypes={supportedPartitionTypes} supportedPartitionTypes={supportedPartitionTypes}
onChange={onPartitionChange} onChange={onPartitionChange}
editable={action!=='detail'} editable={action!=='detail'&&action!=='flow'}
terms={terms} terms={terms}
/> />
</React.Fragment>); </React.Fragment>);
......
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