Commit 46d03551 by zhaochengxiang

模型批量送审

parent 451fde16
...@@ -13,7 +13,6 @@ import ExportDDLModal from './Component/ExportDDLModal'; ...@@ -13,7 +13,6 @@ import ExportDDLModal from './Component/ExportDDLModal';
import ExportOtherModal from './Component/ExportOtherModal'; import ExportOtherModal from './Component/ExportOtherModal';
import RecatalogModal from './Component/RecatalogModal'; import RecatalogModal from './Component/RecatalogModal';
import HistoryAndVersionDrawer from './Component/HistoryAndVersionDrawer'; import HistoryAndVersionDrawer from './Component/HistoryAndVersionDrawer';
import StartFlowModal from './Component/StartFlowModal';
import { showMessage, showNotifaction, inputWidth, DeleteTipModal } from '../../../util'; import { showMessage, showNotifaction, inputWidth, DeleteTipModal } from '../../../util';
import { dispatch, dispatchLatestHomepage } from '../../../model'; import { dispatch, dispatchLatestHomepage } from '../../../model';
import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, Holder, DDL, ReadOnly, BranchId } from '../../../util/constant'; import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, Holder, DDL, ReadOnly, BranchId } from '../../../util/constant';
...@@ -24,6 +23,7 @@ import PermissionButton from '../../../util/Component/PermissionButton'; ...@@ -24,6 +23,7 @@ import PermissionButton from '../../../util/Component/PermissionButton';
import SelectSearchProperties from './Component/select-search-properties'; import SelectSearchProperties from './Component/select-search-properties';
import { TagSelect, TagSelectPopup } from './Component/tag-help'; import { TagSelect, TagSelectPopup } from './Component/tag-help';
import BranchAddModel from './Component/branch-add-model' import BranchAddModel from './Component/branch-add-model'
import StartFlow from './Component/start-flow'
import './index.less'; import './index.less';
...@@ -42,7 +42,6 @@ class Model extends React.Component { ...@@ -42,7 +42,6 @@ class Model extends React.Component {
exportOtherModalVisible: false, exportOtherModalVisible: false,
recatalogModalVisible: false, recatalogModalVisible: false,
historyAndVersionDrawerVisible: false, historyAndVersionDrawerVisible: false,
startFlowModalVisible: false,
catalogId: '', catalogId: '',
importModalAction: '', importModalAction: '',
tableData: [], tableData: [],
...@@ -82,6 +81,10 @@ class Model extends React.Component { ...@@ -82,6 +81,10 @@ class Model extends React.Component {
visible: false, visible: false,
}, },
branchAddModelCatalog: undefined, branchAddModelCatalog: undefined,
startFlowParams: {
visible: false,
items: undefined,
}
} }
} }
...@@ -395,13 +398,18 @@ class Model extends React.Component { ...@@ -395,13 +398,18 @@ class Model extends React.Component {
} }
startFlow = () => { startFlow = () => {
const { selectModelerIds } = this.state; const { selectModelerIds, tableData } = this.state;
if ((selectModelerIds||[]).length === 0) { if ((selectModelerIds||[]).length === 0) {
showMessage('info', '请先选择模型'); showMessage('info', '请先选择模型');
return; return;
} }
this.setState({ startFlowModalVisible: true }); this.setState({
startFlowParams: {
visible: true,
items: (tableData??[]).filter(item => (selectModelerIds??[]).indexOf(item.id) !== -1),
}
})
} }
onRecatalogBtnClick = () => { onRecatalogBtnClick = () => {
...@@ -568,15 +576,6 @@ class Model extends React.Component { ...@@ -568,15 +576,6 @@ class Model extends React.Component {
this.setState({ historyAndVersionDrawerVisible: false }); this.setState({ historyAndVersionDrawerVisible: false });
} }
onStartFlowModalCancel = (refresh) => {
this.setState({ startFlowModalVisible: false });
if (refresh) {
this.onTableChange();
this.setState({ selectModelerIds: [] });
}
}
importStockModel = () => { importStockModel = () => {
const { catalogId } = this.state; const { catalogId } = this.state;
...@@ -624,7 +623,7 @@ class Model extends React.Component { ...@@ -624,7 +623,7 @@ class Model extends React.Component {
} }
render() { render() {
const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, startFlowModalVisible, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames, canExport, canStartFlow, canChangeCatalog, canDelete, canAdd } = this.state; const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames, canExport, canStartFlow, canChangeCatalog, canDelete, canAdd } = this.state;
const classes = classNames('data-model', { const classes = classNames('data-model', {
'data-model-collapse': !expandTree 'data-model-collapse': !expandTree
...@@ -841,10 +840,21 @@ class Model extends React.Component { ...@@ -841,10 +840,21 @@ class Model extends React.Component {
onCancel={this.onHistoryAndVersionDrawerCancel} onCancel={this.onHistoryAndVersionDrawerCancel}
/> />
<StartFlowModal <StartFlow
ids={selectModelerIds} {...this.state.startFlowParams}
visible={startFlowModalVisible} onCancel={(refresh) => {
onCancel={this.onStartFlowModalCancel} this.setState({
startFlowParams: {
visible: false,
items: undefined,
}
})
if (refresh) {
this.onTableChange()
this.setState({ selectModelerIds: [] })
}
}}
/> />
<DeleteTipModal <DeleteTipModal
......
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