Commit 46d03551 by zhaochengxiang

模型批量送审

parent 451fde16
......@@ -13,7 +13,6 @@ import ExportDDLModal from './Component/ExportDDLModal';
import ExportOtherModal from './Component/ExportOtherModal';
import RecatalogModal from './Component/RecatalogModal';
import HistoryAndVersionDrawer from './Component/HistoryAndVersionDrawer';
import StartFlowModal from './Component/StartFlowModal';
import { showMessage, showNotifaction, inputWidth, DeleteTipModal } from '../../../util';
import { dispatch, dispatchLatestHomepage } from '../../../model';
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';
import SelectSearchProperties from './Component/select-search-properties';
import { TagSelect, TagSelectPopup } from './Component/tag-help';
import BranchAddModel from './Component/branch-add-model'
import StartFlow from './Component/start-flow'
import './index.less';
......@@ -42,7 +42,6 @@ class Model extends React.Component {
exportOtherModalVisible: false,
recatalogModalVisible: false,
historyAndVersionDrawerVisible: false,
startFlowModalVisible: false,
catalogId: '',
importModalAction: '',
tableData: [],
......@@ -82,6 +81,10 @@ class Model extends React.Component {
visible: false,
},
branchAddModelCatalog: undefined,
startFlowParams: {
visible: false,
items: undefined,
}
}
}
......@@ -395,13 +398,18 @@ class Model extends React.Component {
}
startFlow = () => {
const { selectModelerIds } = this.state;
const { selectModelerIds, tableData } = this.state;
if ((selectModelerIds||[]).length === 0) {
showMessage('info', '请先选择模型');
return;
}
this.setState({ startFlowModalVisible: true });
this.setState({
startFlowParams: {
visible: true,
items: (tableData??[]).filter(item => (selectModelerIds??[]).indexOf(item.id) !== -1),
}
})
}
onRecatalogBtnClick = () => {
......@@ -568,15 +576,6 @@ class Model extends React.Component {
this.setState({ historyAndVersionDrawerVisible: false });
}
onStartFlowModalCancel = (refresh) => {
this.setState({ startFlowModalVisible: false });
if (refresh) {
this.onTableChange();
this.setState({ selectModelerIds: [] });
}
}
importStockModel = () => {
const { catalogId } = this.state;
......@@ -624,7 +623,7 @@ class Model extends React.Component {
}
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', {
'data-model-collapse': !expandTree
......@@ -841,10 +840,21 @@ class Model extends React.Component {
onCancel={this.onHistoryAndVersionDrawerCancel}
/>
<StartFlowModal
ids={selectModelerIds}
visible={startFlowModalVisible}
onCancel={this.onStartFlowModalCancel}
<StartFlow
{...this.state.startFlowParams}
onCancel={(refresh) => {
this.setState({
startFlowParams: {
visible: false,
items: undefined,
}
})
if (refresh) {
this.onTableChange()
this.setState({ selectModelerIds: [] })
}
}}
/>
<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