Commit 578528d2 by 和金晶

主数据定义、主数据配置修改API接口

parent 6f0d6020
...@@ -8,11 +8,12 @@ import * as user from './user'; ...@@ -8,11 +8,12 @@ import * as user from './user';
import * as datasource from './datasource'; import * as datasource from './datasource';
import * as map from './map'; import * as map from './map';
import * as datamodel from './datamodel'; import * as datamodel from './datamodel';
import * as manualdatamodel from './manualdatamodel';
import * as assetmanage from './assetmanage'; import * as assetmanage from './assetmanage';
import * as tag from './tag'; import * as tag from './tag';
import * as msd from './msd'; import * as msd from './msd';
const funcs = Connect({ user, datamodel, map, assetmanage, datasource, tag, msd }) const funcs = Connect({ user, datamodel, manualdatamodel,map, assetmanage, datasource, tag, msd })
function* request(args) { function* request(args) {
const { type, payload, callback, error } = args.args; const { type, payload, callback, error } = args.args;
......
...@@ -29,7 +29,7 @@ const ColSettingModal = (props) => { ...@@ -29,7 +29,7 @@ const ColSettingModal = (props) => {
const getPreference = () => { const getPreference = () => {
dispatch({ dispatch({
type: 'datamodel.getPreference', type: 'manualdatamodel.getPreference',
callback: data => { callback: data => {
if ((data.cols||'') === '') { if ((data.cols||'') === '') {
onCheckAllChange(true); onCheckAllChange(true);
...@@ -76,7 +76,7 @@ const ColSettingModal = (props) => { ...@@ -76,7 +76,7 @@ const ColSettingModal = (props) => {
const onModalOk = () => { const onModalOk = () => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'datamodel.savePreference', type: 'manualdatamodel.savePreference',
payload: { payload: {
data: { data: {
cols: checkedKeys.join(',') cols: checkedKeys.join(',')
......
...@@ -40,7 +40,7 @@ const FC = (props) => { ...@@ -40,7 +40,7 @@ const FC = (props) => {
const getInheriteDataModel = (type) => { const getInheriteDataModel = (type) => {
dispatch({ dispatch({
type: 'datamodel.inheriteDataModel', type: 'manualdatamodel.inheriteDataModel',
payload: { payload: {
params: { params: {
id: modelerData.id, id: modelerData.id,
...@@ -80,7 +80,7 @@ const FC = (props) => { ...@@ -80,7 +80,7 @@ const FC = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'datamodel.saveDataModel', type: 'manualdatamodel.saveDataModel',
payload: { payload: {
data: newModelerData data: newModelerData
}, },
......
...@@ -139,13 +139,13 @@ const EditModel = (props) => { ...@@ -139,13 +139,13 @@ const EditModel = (props) => {
const heartbeat = () => { const heartbeat = () => {
dispatchLatest({ dispatchLatest({
type: 'datamodel.heartbeat' type: 'manualdatamodel.heartbeat'
}); });
} }
const getModelPrivilege = () => { const getModelPrivilege = () => {
dispatch({ dispatch({
type: 'datamodel.getModelPrivilege', type: 'manualdatamodel.getModelPrivilege',
payload: { payload: {
easyDataModelerDataModelId: modelerId, easyDataModelerDataModelId: modelerId,
}, },
...@@ -158,7 +158,7 @@ const EditModel = (props) => { ...@@ -158,7 +158,7 @@ const EditModel = (props) => {
const getApprovalDetail = () => { const getApprovalDetail = () => {
setLoadingApprovalData(true) setLoadingApprovalData(true)
dispatch({ dispatch({
type: 'datamodel.getPhysicalModelApproval', type: 'manualdatamodel.getPhysicalModelApproval',
payload: { payload: {
id: approvalId, id: approvalId,
}, },
...@@ -241,14 +241,14 @@ const EditModel = (props) => { ...@@ -241,14 +241,14 @@ const EditModel = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.saveDataModel', type: 'manualdatamodel.saveDataModel',
payload: { payload: {
data: newModelerData data: newModelerData
}, },
callback: data => { callback: data => {
if (action === 'add') { if (action === 'add') {
dispatchLatest({ dispatchLatest({
type: 'datamodel.bindCatalogDataModel', type: 'manualdatamodel.bindCatalogDataModel',
payload: { payload: {
params: { params: {
easyDataModelCatalogId: ((cid||'')!=='')?cid:catalogId, easyDataModelCatalogId: ((cid||'')!=='')?cid:catalogId,
...@@ -316,7 +316,7 @@ const EditModel = (props) => { ...@@ -316,7 +316,7 @@ const EditModel = (props) => {
const manualSaveNoticeMessage = (id) => { const manualSaveNoticeMessage = (id) => {
dispatch({ dispatch({
type: 'datamodel.manualSaveNoticeMessage', type: 'manualdatamodel.manualSaveNoticeMessage',
payload: { payload: {
easyDataModelerDataModelId: id easyDataModelerDataModelId: id
}, },
...@@ -326,7 +326,7 @@ const EditModel = (props) => { ...@@ -326,7 +326,7 @@ const EditModel = (props) => {
const processConflictDataModel = () => { const processConflictDataModel = () => {
dispatch({ dispatch({
type: 'datamodel.processConflictDataModel', type: 'manualdatamodel.processConflictDataModel',
payload: { payload: {
params: { params: {
conflictItemId conflictItemId
...@@ -373,7 +373,7 @@ const EditModel = (props) => { ...@@ -373,7 +373,7 @@ const EditModel = (props) => {
content: '您确定要删除该模型吗?', content: '您确定要删除该模型吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteDataModel', type: 'manualdatamodel.deleteDataModel',
payload: { payload: {
params: { params: {
id: modelerId id: modelerId
...@@ -435,7 +435,7 @@ const EditModel = (props) => { ...@@ -435,7 +435,7 @@ const EditModel = (props) => {
onOk: () => { onOk: () => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'datamodel.dataModelRollback', type: 'manualdatamodel.dataModelRollback',
payload: { payload: {
params: { params: {
id: modelerId, id: modelerId,
...@@ -892,7 +892,7 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, modelerData, id, tas ...@@ -892,7 +892,7 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, modelerData, id, tas
setWaiting(true); setWaiting(true);
dispatch({ dispatch({
type: 'datamodel.updatePhysicalModelApproval', type: 'manualdatamodel.updatePhysicalModelApproval',
payload: { payload: {
params: { params: {
taskId, taskId,
......
...@@ -199,7 +199,7 @@ const ExpandedModelTable = (props) => { ...@@ -199,7 +199,7 @@ const ExpandedModelTable = (props) => {
const getCheckoutDataModel = () => { const getCheckoutDataModel = () => {
dispatch({ dispatch({
type: 'datamodel.getCheckoutDataModel', type: 'manualdatamodel.getCheckoutDataModel',
payload: { payload: {
id: pid id: pid
}, },
......
...@@ -58,7 +58,7 @@ class ExportDDLModal extends React.Component { ...@@ -58,7 +58,7 @@ class ExportDDLModal extends React.Component {
getDDLGenerators = (needDB = false) => { getDDLGenerators = (needDB = false) => {
this.setState({ loadingDDLGenerators: true }, () => { this.setState({ loadingDDLGenerators: true }, () => {
dispatch({ dispatch({
type: 'datamodel.ddlGenerators', type: 'manualdatamodel.ddlGenerators',
callback: data => { callback: data => {
this.setState({ ddlGenerators: data, loadingDDLGenerators: false, selectDDLGeneratorName: (data||[]).length>0?data[0].name:'' }, () => { this.setState({ ddlGenerators: data, loadingDDLGenerators: false, selectDDLGeneratorName: (data||[]).length>0?data[0].name:'' }, () => {
if (needDB) { if (needDB) {
...@@ -81,7 +81,7 @@ class ExportDDLModal extends React.Component { ...@@ -81,7 +81,7 @@ class ExportDDLModal extends React.Component {
this.setState({ loadingDatabases: true }, () => { this.setState({ loadingDatabases: true }, () => {
dispatch({ dispatch({
type: 'datamodel.getDatasourcesByEnv', type: 'manualdatamodel.getDatasourcesByEnv',
payload: { payload: {
catalog: env?.value, catalog: env?.value,
model: 'Catalog,Database' model: 'Catalog,Database'
...@@ -114,7 +114,7 @@ class ExportDDLModal extends React.Component { ...@@ -114,7 +114,7 @@ class ExportDDLModal extends React.Component {
getSchemas = (dbId) => { getSchemas = (dbId) => {
this.setState({ loadingSchemas: true }, () => { this.setState({ loadingSchemas: true }, () => {
dispatch({ dispatch({
type: 'datamodel.getSchemasByDatasourceId', type: 'manualdatamodel.getSchemasByDatasourceId',
payload: { payload: {
parentId: dbId||'' parentId: dbId||''
}, },
...@@ -155,7 +155,7 @@ class ExportDDLModal extends React.Component { ...@@ -155,7 +155,7 @@ class ExportDDLModal extends React.Component {
this.setState({ confirmLoading: true }, () => { this.setState({ confirmLoading: true }, () => {
dispatch({ dispatch({
type: 'datamodel.exportDDLString', type: 'manualdatamodel.exportDDLString',
payload: { payload: {
ids: ids.join(','), ids: ids.join(','),
ddlGeneratorName: selectDDLGeneratorName ddlGeneratorName: selectDDLGeneratorName
...@@ -207,7 +207,7 @@ class ExportDDLModal extends React.Component { ...@@ -207,7 +207,7 @@ class ExportDDLModal extends React.Component {
this.setState({ confirmLoading: true }, () => { this.setState({ confirmLoading: true }, () => {
dispatch({ dispatch({
type: 'datamodel.autoCreateTable', type: 'manualdatamodel.autoCreateTable',
payload: { payload: {
params: { params: {
namespace, namespace,
......
...@@ -72,7 +72,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -72,7 +72,7 @@ const ImportAction = React.forwardRef((props, ref) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getAllConstraints', type: 'manualdatamodel.getAllConstraints',
callback: data => { callback: data => {
setConstraints(data); setConstraints(data);
if (action === 'add') { if (action === 'add') {
...@@ -124,7 +124,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -124,7 +124,7 @@ const ImportAction = React.forwardRef((props, ref) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getAllConstraints', type: 'manualdatamodel.getAllConstraints',
callback: data => { callback: data => {
setConstraints(data); setConstraints(data);
getCurrentDataModel(); getCurrentDataModel();
...@@ -181,7 +181,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -181,7 +181,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getTemplates = () => { const getTemplates = () => {
dispatch({ dispatch({
type: 'datamodel.getAllTemplates', type: 'manualdatamodel.getAllTemplates',
payload: { payload: {
constraintName: constraint.name constraintName: constraint.name
}, },
...@@ -193,7 +193,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -193,7 +193,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const conceptualModelCreateDataModel = () => { const conceptualModelCreateDataModel = () => {
dispatch({ dispatch({
type: 'datamodel.conceptualModelCreateDataModel', type: 'manualdatamodel.conceptualModelCreateDataModel',
payload: { payload: {
data: [logicId] data: [logicId]
}, },
...@@ -211,7 +211,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -211,7 +211,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getDraft = (_constraint, _template, _hints) => { const getDraft = (_constraint, _template, _hints) => {
dispatch({ dispatch({
type: 'datamodel.getDraft', type: 'manualdatamodel.getDraft',
payload: { payload: {
params: { params: {
dataCatalogId: catalogId, dataCatalogId: catalogId,
...@@ -235,7 +235,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -235,7 +235,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getDraftUsingDDL = (_constraint, _template, _ddl) => { const getDraftUsingDDL = (_constraint, _template, _ddl) => {
dispatch({ dispatch({
type: 'datamodel.getDraftUsingDDL', type: 'manualdatamodel.getDraftUsingDDL',
payload: { payload: {
params: { params: {
branchId branchId
...@@ -258,7 +258,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -258,7 +258,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getConsult = (data) => { const getConsult = (data) => {
dispatch({ dispatch({
type: 'datamodel.getConsult', type: 'manualdatamodel.getConsult',
payload: { payload: {
data data
}, },
...@@ -290,19 +290,19 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -290,19 +290,19 @@ const ImportAction = React.forwardRef((props, ref) => {
return return
} }
let type = 'datamodel.getDataModel'; let type = 'manualdatamodel.getDataModel';
let params = { id: modelerId }; let params = { id: modelerId };
if (action === 'add') { if (action === 'add') {
type = 'datamodel.modelCopy'; type = 'manualdatamodel.modelCopy';
} else if (action === 'flow') { } else if (action === 'flow') {
type = 'datamodel.getDataModelWithRecommendedDefinitionAndTermDiscovery'; type = 'manualdatamodel.getDataModelWithRecommendedDefinitionAndTermDiscovery';
if (approvalModelId) { if (approvalModelId) {
params = { id: approvalModelId } params = { id: approvalModelId }
} }
} else if (action === 'detail-version') { } else if (action === 'detail-version') {
type = 'datamodel.getDataModelByVersionId'; type = 'manualdatamodel.getDataModelByVersionId';
params = { params = {
params: { params: {
id: modelerId||'', id: modelerId||'',
...@@ -310,9 +310,9 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -310,9 +310,9 @@ const ImportAction = React.forwardRef((props, ref) => {
} }
} }
} else if (action==='edit' && permitCheckOut) { } else if (action==='edit' && permitCheckOut) {
type = 'datamodel.checkOutDataModel'; type = 'manualdatamodel.checkOutDataModel';
} else if (action === 'edit' && mergeId) { } else if (action === 'edit' && mergeId) {
type = 'datamodel.mergeBranch'; type = 'manualdatamodel.mergeBranch';
params = { params = {
params: { params: {
current: modelerId, current: modelerId,
...@@ -329,13 +329,13 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -329,13 +329,13 @@ const ImportAction = React.forwardRef((props, ref) => {
} else if (action === 'detail') { } else if (action === 'detail') {
if (noticeModelerId) { if (noticeModelerId) {
if (noticeModelerLatestVersionId) { if (noticeModelerLatestVersionId) {
type = 'datamodel.getNoticeDataModelByVersionId' type = 'manualdatamodel.getNoticeDataModelByVersionId'
params = { params = {
easyDataModelerDataModelId: noticeModelerId, easyDataModelerDataModelId: noticeModelerId,
operationDataModelLatestVersionId: noticeModelerLatestVersionId operationDataModelLatestVersionId: noticeModelerLatestVersionId
} }
} else { } else {
type = 'datamodel.getNoticeDataModelById' type = 'manualdatamodel.getNoticeDataModelById'
params = { params = {
easyDataModelerDataModelId: noticeModelerId, easyDataModelerDataModelId: noticeModelerId,
} }
...@@ -435,7 +435,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -435,7 +435,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getSupportedDatatypes = () => { const getSupportedDatatypes = () => {
dispatch({ dispatch({
type: 'datamodel.getSupportedDatatypes', type: 'manualdatamodel.getSupportedDatatypes',
callback: data => { callback: data => {
setSupportedDatatypes(data||[]); setSupportedDatatypes(data||[]);
} }
...@@ -444,7 +444,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -444,7 +444,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getSupportedPartitionTypes = () => { const getSupportedPartitionTypes = () => {
dispatch({ dispatch({
type: 'datamodel.getSupportedPartitionTypes', type: 'manualdatamodel.getSupportedPartitionTypes',
payload: { payload: {
excludeBuiltin: false excludeBuiltin: false
}, },
...@@ -456,7 +456,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -456,7 +456,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const getSupportedIndextypes = () => { const getSupportedIndextypes = () => {
dispatch({ dispatch({
type: 'datamodel.getSupportedIndextypes', type: 'manualdatamodel.getSupportedIndextypes',
callback: data => { callback: data => {
setSupportedIndextypes(data||[]); setSupportedIndextypes(data||[]);
} }
...@@ -551,7 +551,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -551,7 +551,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const row = form?.getFieldsValue(); const row = form?.getFieldsValue();
dispatch({ dispatch({
type: 'datamodel.validateDataModel', type: 'manualdatamodel.validateDataModel',
payload: { payload: {
data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row?.name||'', cnName: row?.cnName||'' } }, data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row?.name||'', cnName: row?.cnName||'' } },
}, },
......
...@@ -38,7 +38,7 @@ const FC = (props) => { ...@@ -38,7 +38,7 @@ const FC = (props) => {
const getComments = () => { const getComments = () => {
dispatch({ dispatch({
type: 'datamodel.getComments', type: 'manualdatamodel.getComments',
payload: { payload: {
modelId: modelerData?.id modelId: modelerData?.id
}, },
...@@ -55,7 +55,7 @@ const FC = (props) => { ...@@ -55,7 +55,7 @@ const FC = (props) => {
} }
dispatch({ dispatch({
type: 'datamodel.addComment', type: 'manualdatamodel.addComment',
payload: { payload: {
data: { data: {
fileList, fileList,
...@@ -78,7 +78,7 @@ const FC = (props) => { ...@@ -78,7 +78,7 @@ const FC = (props) => {
content: '确定删除该评论嘛?', content: '确定删除该评论嘛?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteComment', type: 'manualdatamodel.deleteComment',
payload: { payload: {
id: item?.id id: item?.id
}, },
...@@ -106,7 +106,7 @@ const FC = (props) => { ...@@ -106,7 +106,7 @@ const FC = (props) => {
setUploading(true) setUploading(true)
dispatch({ dispatch({
type: 'datamodel.uploadCommentFile', type: 'manualdatamodel.uploadCommentFile',
payload: { payload: {
fileList: [file] fileList: [file]
}, },
...@@ -219,7 +219,7 @@ const AttachesItem = ({ value, onChange, readOnly }) => { ...@@ -219,7 +219,7 @@ const AttachesItem = ({ value, onChange, readOnly }) => {
type='danger' type='danger'
onClick={() => { onClick={() => {
dispatch({ dispatch({
type: 'datamodel.deleteCommentFile', type: 'manualdatamodel.deleteCommentFile',
payload: { payload: {
id: item?.id id: item?.id
}, },
......
...@@ -188,7 +188,7 @@ const ImportActionHeader = (props) => { ...@@ -188,7 +188,7 @@ const ImportActionHeader = (props) => {
const getDataTypeList = () => { const getDataTypeList = () => {
dispatch({ dispatch({
type: 'datamodel.dataTypeList', type: 'manualdatamodel.dataTypeList',
callback: data => { callback: data => {
setDataTypeList(data); setDataTypeList(data);
} }
...@@ -197,7 +197,7 @@ const ImportActionHeader = (props) => { ...@@ -197,7 +197,7 @@ const ImportActionHeader = (props) => {
const getBindingLoadRangeList = (dataTypeName) => { const getBindingLoadRangeList = (dataTypeName) => {
dispatch({ dispatch({
type: 'datamodel.bindingLoadRangeList', type: 'manualdatamodel.bindingLoadRangeList',
payload: { payload: {
dataTypeName dataTypeName
}, },
...@@ -232,7 +232,7 @@ const ImportActionHeader = (props) => { ...@@ -232,7 +232,7 @@ const ImportActionHeader = (props) => {
const _searchText = searchText.replace(/ /g,''); const _searchText = searchText.replace(/ /g,'');
if (_searchText !== '') { if (_searchText !== '') {
dispatchLatest({ dispatchLatest({
type: 'datamodel.autocomplete', type: 'manualdatamodel.autocomplete',
payload: { payload: {
params: { params: {
word: _searchText, word: _searchText,
...@@ -250,7 +250,7 @@ const ImportActionHeader = (props) => { ...@@ -250,7 +250,7 @@ const ImportActionHeader = (props) => {
}) })
} else { } else {
dispatchLatest({ dispatchLatest({
type: 'datamodel.recommandEnglishWords', type: 'manualdatamodel.recommandEnglishWords',
payload: { payload: {
params: { params: {
chineseWord: modelerData.cnName, chineseWord: modelerData.cnName,
...@@ -279,7 +279,7 @@ const ImportActionHeader = (props) => { ...@@ -279,7 +279,7 @@ const ImportActionHeader = (props) => {
} else if (changedValues.hasOwnProperty('cnName')) { } else if (changedValues.hasOwnProperty('cnName')) {
if (autoTranslate) { if (autoTranslate) {
dispatchLatest({ dispatchLatest({
type: 'datamodel.translatePhase', type: 'manualdatamodel.translatePhase',
payload: { payload: {
params: { params: {
phaseInChinese: changedValues.cnName, phaseInChinese: changedValues.cnName,
...@@ -885,7 +885,7 @@ const ItemTitle = ({ name, cnName, validateReports }) => { ...@@ -885,7 +885,7 @@ const ItemTitle = ({ name, cnName, validateReports }) => {
return ( return (
<Space size={2}> <Space size={2}>
{cnName} {cnName}
<ValidateTip validateReports={validateReports} type='DataModel' propertyName={name} /> <ValidateTip validateReports={validateReports} type='manualdatamodel' propertyName={name} />
</Space> </Space>
) )
} }
......
...@@ -60,7 +60,7 @@ const FC = (props) => { ...@@ -60,7 +60,7 @@ const FC = (props) => {
const getMaintenanceRecords = () => { const getMaintenanceRecords = () => {
dispatch({ dispatch({
type: 'datamodel.getMaintenanceRecords', type: 'manualdatamodel.getMaintenanceRecords',
payload: { payload: {
id: modelerData?.id id: modelerData?.id
}, },
...@@ -175,7 +175,7 @@ const UsersItem = ({ value, onChange }) => { ...@@ -175,7 +175,7 @@ const UsersItem = ({ value, onChange }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperationUsers', type: 'manualdatamodel.getCooperationUsers',
payload: { payload: {
match: searchValue, match: searchValue,
}, },
......
...@@ -65,7 +65,7 @@ const FC = (props) => { ...@@ -65,7 +65,7 @@ const FC = (props) => {
const getAssociationMetadata = () => { const getAssociationMetadata = () => {
dispatch({ dispatch({
type: 'datamodel.findAssociationMetadataByModelId', type: 'manualdatamodel.findAssociationMetadataByModelId',
payload: { payload: {
easyDataModelerDataModelId: modelerData?.id, easyDataModelerDataModelId: modelerData?.id,
}, },
......
...@@ -671,7 +671,7 @@ export const ImportActionTable = (props) => { ...@@ -671,7 +671,7 @@ export const ImportActionTable = (props) => {
if (type === 'template') return if (type === 'template') return
dispatch({ dispatch({
type: 'datamodel.getDataModelStandardMapping', type: 'manualdatamodel.getDataModelStandardMapping',
payload: { payload: {
easyDataModelerDataModelId: modelerData?.id easyDataModelerDataModelId: modelerData?.id
}, },
...@@ -851,7 +851,7 @@ export const ImportActionTable = (props) => { ...@@ -851,7 +851,7 @@ export const ImportActionTable = (props) => {
const preSaveDataModel = (attribute) => { const preSaveDataModel = (attribute) => {
dispatch({ dispatch({
type: 'datamodel.preSaveDataModel', type: 'manualdatamodel.preSaveDataModel',
payload: { payload: {
data: attribute data: attribute
}, },
...@@ -949,7 +949,7 @@ export const ImportActionTable = (props) => { ...@@ -949,7 +949,7 @@ export const ImportActionTable = (props) => {
if (changedValues.hasOwnProperty('cnName')) { if (changedValues.hasOwnProperty('cnName')) {
if (autoTranslateRef.current) { if (autoTranslateRef.current) {
dispatchLatest({ dispatchLatest({
type: 'datamodel.translatePhase', type: 'manualdatamodel.translatePhase',
payload: { payload: {
params: { params: {
phaseInChinese: changedValues.cnName, phaseInChinese: changedValues.cnName,
......
...@@ -19,7 +19,7 @@ class ImportExcel extends React.Component { ...@@ -19,7 +19,7 @@ class ImportExcel extends React.Component {
} }
downloadTemplate = () => { downloadTemplate = () => {
window.open("/data-govern-bj/docs/DataModel.xlsx"); window.open("/data-govern-bj/docs/manualdatamodel.xlsx");
} }
normFile = (e) => { normFile = (e) => {
......
...@@ -53,7 +53,7 @@ class ImportMetadata extends React.Component { ...@@ -53,7 +53,7 @@ class ImportMetadata extends React.Component {
this.setState({ loadingSystem: true, loadingDb: true }, () => { this.setState({ loadingSystem: true, loadingDb: true }, () => {
dispatchLatest({ dispatchLatest({
type: 'datamodel.getAllSystemAndDatabase', type: 'manualdatamodel.getAllSystemAndDatabase',
callback: data => { callback: data => {
if (data && data.systems && data.systems.length) { if (data && data.systems && data.systems.length) {
const _system = data.systems[0].scopeId; const _system = data.systems[0].scopeId;
...@@ -85,7 +85,7 @@ class ImportMetadata extends React.Component { ...@@ -85,7 +85,7 @@ class ImportMetadata extends React.Component {
this.setState({ loadingDb: true, system: value }, () => { this.setState({ loadingDb: true, system: value }, () => {
dispatchLatest({ dispatchLatest({
type: "datamodel.getAllSystemDatabase", type: "manualdatamodel.getAllSystemDatabase",
payload: { payload: {
sysCodedataTables: value sysCodedataTables: value
}, },
...@@ -112,7 +112,7 @@ class ImportMetadata extends React.Component { ...@@ -112,7 +112,7 @@ class ImportMetadata extends React.Component {
this.setState({ loadingSchema: true, db: value }, () => { this.setState({ loadingSchema: true, db: value }, () => {
dispatchLatest({ dispatchLatest({
type: "datamodel.getAllScheme", type: "manualdatamodel.getAllScheme",
payload: { payload: {
db: value db: value
}, },
...@@ -155,7 +155,7 @@ class ImportMetadata extends React.Component { ...@@ -155,7 +155,7 @@ class ImportMetadata extends React.Component {
this.setState({ loadingDataTable: true }, () => { this.setState({ loadingDataTable: true }, () => {
dispatchLatest({ dispatchLatest({
type: "datamodel.getAllDataTable", type: "manualdatamodel.getAllDataTable",
payload: { payload: {
pageNum: pageNumDataTables, pageNum: pageNumDataTables,
pageSize: pageSizeDataTables, pageSize: pageSizeDataTables,
...@@ -184,7 +184,7 @@ class ImportMetadata extends React.Component { ...@@ -184,7 +184,7 @@ class ImportMetadata extends React.Component {
this.setState({ selectedDataTableRowKeys: selectedRowKeys, loadingDataFiled: true }, () => { this.setState({ selectedDataTableRowKeys: selectedRowKeys, loadingDataFiled: true }, () => {
dispatchLatest({ dispatchLatest({
type: "datamodel.getAllFileds", type: "manualdatamodel.getAllFileds",
payload: { payload: {
parentId: selectedRowKeys[0], parentId: selectedRowKeys[0],
model:'Column,InterfaceColumn,HanaViewColumn' model:'Column,InterfaceColumn,HanaViewColumn'
......
...@@ -40,7 +40,7 @@ const ImportModal = (props) => { ...@@ -40,7 +40,7 @@ const ImportModal = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.importWordGenerateModelDraft', type: 'manualdatamodel.importWordGenerateModelDraft',
payload: { payload: {
params: { params: {
catalogId, catalogId,
...@@ -62,7 +62,7 @@ const ImportModal = (props) => { ...@@ -62,7 +62,7 @@ const ImportModal = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.extractExcelContent', type: 'manualdatamodel.extractExcelContent',
payload: { fileList: row.upload }, payload: { fileList: row.upload },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
......
...@@ -130,7 +130,7 @@ const ImportStockWordModal = (props) => { ...@@ -130,7 +130,7 @@ const ImportStockWordModal = (props) => {
const getLogs = (p = 1, s = 20) => { const getLogs = (p = 1, s = 20) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.importWordLogs', type: 'manualdatamodel.importWordLogs',
payload: { payload: {
params: { params: {
page: p, page: p,
...@@ -179,7 +179,7 @@ const ImportStockWordModal = (props) => { ...@@ -179,7 +179,7 @@ const ImportStockWordModal = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.importWordGenerateModel', type: 'manualdatamodel.importWordGenerateModel',
payload: { payload: {
params: { params: {
catalogId, catalogId,
......
...@@ -129,7 +129,7 @@ export const ModelNameColumn = (props) => { ...@@ -129,7 +129,7 @@ export const ModelNameColumn = (props) => {
onVisibleChange={(visible) => { onVisibleChange={(visible) => {
if (visible && !record.digest) { if (visible && !record.digest) {
dispatch({ dispatch({
type: 'datamodel.getDataModelDigest', type: 'manualdatamodel.getDataModelDigest',
payload: { payload: {
id: record.id id: record.id
}, },
...@@ -471,7 +471,7 @@ const ModelTable = (props) => { ...@@ -471,7 +471,7 @@ const ModelTable = (props) => {
const getBehindAlarmInBranch = () => { const getBehindAlarmInBranch = () => {
dispatch({ dispatch({
type: 'datamodel.behindAlarmInBranch', type: 'manualdatamodel.behindAlarmInBranch',
payload: { payload: {
id: catalogId, id: catalogId,
}, },
...@@ -526,7 +526,7 @@ const ModelTable = (props) => { ...@@ -526,7 +526,7 @@ const ModelTable = (props) => {
content: `您确定要${action.cnName||''}该模型吗?`, content: `您确定要${action.cnName||''}该模型吗?`,
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.nextState', type: 'manualdatamodel.nextState',
payload: { payload: {
easyDataModelerDataModelId: record.id, easyDataModelerDataModelId: record.id,
actionId: action.id actionId: action.id
...@@ -555,7 +555,7 @@ const ModelTable = (props) => { ...@@ -555,7 +555,7 @@ const ModelTable = (props) => {
content: '您确定要删除该模型吗?', content: '您确定要删除该模型吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteDataModel', type: 'manualdatamodel.deleteDataModel',
payload: { payload: {
params: { params: {
id: record.id id: record.id
...@@ -680,7 +680,7 @@ const ModelTable = (props) => { ...@@ -680,7 +680,7 @@ const ModelTable = (props) => {
onAuthShare?.(currentItem) onAuthShare?.(currentItem)
} else if (key === 'viewBaselineModel') { } else if (key === 'viewBaselineModel') {
dispatch({ dispatch({
type: 'datamodel.getForkedModel', type: 'manualdatamodel.getForkedModel',
payload: { payload: {
id: currentItem?.id id: currentItem?.id
}, },
......
...@@ -106,7 +106,7 @@ const ModelTree = (props) => { ...@@ -106,7 +106,7 @@ const ModelTree = (props) => {
const getShowSyncAndDomains = () => { const getShowSyncAndDomains = () => {
dispatch({ dispatch({
type: 'datamodel.isSetRootDomainId', type: 'manualdatamodel.isSetRootDomainId',
callback: data => { callback: data => {
if (data === 'false') { if (data === 'false') {
dispatch({ dispatch({
...@@ -125,7 +125,7 @@ const ModelTree = (props) => { ...@@ -125,7 +125,7 @@ const ModelTree = (props) => {
const getCatalogAdmin = () => { const getCatalogAdmin = () => {
dispatch({ dispatch({
type: 'datamodel.getCatalogAdmin', type: 'manualdatamodel.getCatalogAdmin',
callback: data => { callback: data => {
setCatalogAdmin(data==='true'?true:false); setCatalogAdmin(data==='true'?true:false);
} }
...@@ -134,7 +134,7 @@ const ModelTree = (props) => { ...@@ -134,7 +134,7 @@ const ModelTree = (props) => {
const getPrivilegeBranchAdmin = () => { const getPrivilegeBranchAdmin = () => {
dispatch({ dispatch({
type: 'datamodel.getPrivilegeBranchAdmin', type: 'manualdatamodel.getPrivilegeBranchAdmin',
callback: data => { callback: data => {
setBranchAdmin(data==='true'?true:false); setBranchAdmin(data==='true'?true:false);
} }
...@@ -144,7 +144,7 @@ const ModelTree = (props) => { ...@@ -144,7 +144,7 @@ const ModelTree = (props) => {
const getDataModelLocationThenGetDirTreeData = () => { const getDataModelLocationThenGetDirTreeData = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getDataModelLocation', type: 'manualdatamodel.getDataModelLocation',
payload: { payload: {
id id
}, },
...@@ -162,7 +162,7 @@ const ModelTree = (props) => { ...@@ -162,7 +162,7 @@ const ModelTree = (props) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: (type==='refresh')?'datamodel.refreshDataModelCatalog':'datamodel.loadDataModelCatalog', type: (type==='refresh')?'manualdatamodel.refreshDataModelCatalog':'manualdatamodel.loadDataModelCatalog',
callback: data => { callback: data => {
data.key = data.id||''; data.key = data.id||'';
...@@ -240,7 +240,7 @@ const ModelTree = (props) => { ...@@ -240,7 +240,7 @@ const ModelTree = (props) => {
const getStateTreeData = () => { const getStateTreeData = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.loadDataModelStateCatalog', type: 'manualdatamodel.loadDataModelStateCatalog',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
let _treeData = data?.subCatalogs||[]; let _treeData = data?.subCatalogs||[];
...@@ -263,7 +263,7 @@ const ModelTree = (props) => { ...@@ -263,7 +263,7 @@ const ModelTree = (props) => {
const getRootThenGetBranchTreeData = () => { const getRootThenGetBranchTreeData = () => {
setLoadingRoot(true) setLoadingRoot(true)
dispatch({ dispatch({
type: 'datamodel.refreshDataModelCatalog', type: 'manualdatamodel.refreshDataModelCatalog',
callback: data => { callback: data => {
setLoadingRoot(false) setLoadingRoot(false)
setRootNode?.(data) setRootNode?.(data)
...@@ -278,7 +278,7 @@ const ModelTree = (props) => { ...@@ -278,7 +278,7 @@ const ModelTree = (props) => {
const getBranchTreeData = (defaultSelectedId) => { const getBranchTreeData = (defaultSelectedId) => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getAllBranches', type: 'manualdatamodel.getAllBranches',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
const newData = produce(data??[], (draft) => { const newData = produce(data??[], (draft) => {
...@@ -374,7 +374,7 @@ const ModelTree = (props) => { ...@@ -374,7 +374,7 @@ const ModelTree = (props) => {
setDomainSelectedKey(key); setDomainSelectedKey(key);
dispatch({ dispatch({
type: 'datamodel.setRootDomainId', type: 'manualdatamodel.setRootDomainId',
payload: { payload: {
params: { params: {
domainId: key domainId: key
...@@ -428,7 +428,7 @@ const ModelTree = (props) => { ...@@ -428,7 +428,7 @@ const ModelTree = (props) => {
setLoading(true); setLoading(true);
if (viewSelectedKey === 'dir') { if (viewSelectedKey === 'dir') {
dispatch({ dispatch({
type: 'datamodel.upDownModelCatalog', type: 'manualdatamodel.upDownModelCatalog',
payload: { payload: {
params: { params: {
modelCatalogId: currentRightClickDir.id, modelCatalogId: currentRightClickDir.id,
...@@ -445,7 +445,7 @@ const ModelTree = (props) => { ...@@ -445,7 +445,7 @@ const ModelTree = (props) => {
}); });
} else if (viewSelectedKey === 'branch') { } else if (viewSelectedKey === 'branch') {
dispatch({ dispatch({
type: 'datamodel.upDownBranch', type: 'manualdatamodel.upDownBranch',
payload: { payload: {
params: { params: {
id: currentRightClickDir.id, id: currentRightClickDir.id,
...@@ -471,7 +471,7 @@ const ModelTree = (props) => { ...@@ -471,7 +471,7 @@ const ModelTree = (props) => {
setLoading(true); setLoading(true);
if (viewSelectedKey === 'dir') { if (viewSelectedKey === 'dir') {
dispatch({ dispatch({
type: 'datamodel.deleteDataModelCatalog', type: 'manualdatamodel.deleteDataModelCatalog',
payload: { payload: {
params: { params: {
easyDataModelerCatalogId: currentRightClickDir.id easyDataModelerCatalogId: currentRightClickDir.id
...@@ -492,7 +492,7 @@ const ModelTree = (props) => { ...@@ -492,7 +492,7 @@ const ModelTree = (props) => {
}); });
} else if (viewSelectedKey === 'branch') { } else if (viewSelectedKey === 'branch') {
dispatch({ dispatch({
type: 'datamodel.deleteBranch', type: 'manualdatamodel.deleteBranch',
payload: { payload: {
id: currentRightClickDir?.id, id: currentRightClickDir?.id,
}, },
......
...@@ -23,7 +23,7 @@ const RecatalogModal = (props) => { ...@@ -23,7 +23,7 @@ const RecatalogModal = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'datamodel.recatalogDataModel', type: 'manualdatamodel.recatalogDataModel',
payload: { payload: {
params: { params: {
easyDataModelCatalogId: catalogId, easyDataModelCatalogId: catalogId,
......
...@@ -33,7 +33,7 @@ const StartFlowModal = (props) => { ...@@ -33,7 +33,7 @@ const StartFlowModal = (props) => {
type: 'user.fetchSessionInfo', type: 'user.fetchSessionInfo',
callback: session => { callback: session => {
dispatchLatest({ dispatchLatest({
type: 'datamodel.startFlow', type: 'manualdatamodel.startFlow',
payload: { payload: {
params: { params: {
user: session?.userName, user: session?.userName,
......
...@@ -138,7 +138,7 @@ const UpdateTreeItemModal = (props) => { ...@@ -138,7 +138,7 @@ const UpdateTreeItemModal = (props) => {
} }
dispatchLatest({ dispatchLatest({
type: 'datamodel.saveDataModelCatalog', type: 'manualdatamodel.saveDataModelCatalog',
payload: { payload: {
data: payload data: payload
}, },
......
...@@ -65,7 +65,7 @@ const VersionCompare = (props) => { ...@@ -65,7 +65,7 @@ const VersionCompare = (props) => {
const getVersions = () => { const getVersions = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getVersions', type: 'manualdatamodel.getVersions',
payload: { payload: {
params: { params: {
id id
...@@ -135,7 +135,7 @@ const VersionCompare = (props) => { ...@@ -135,7 +135,7 @@ const VersionCompare = (props) => {
const getCompare = (value1=basicVersion, value2=incVersion, value3=onlyShowChange) => { const getCompare = (value1=basicVersion, value2=incVersion, value3=onlyShowChange) => {
setLoadingCompare(true); setLoadingCompare(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.compare', type: 'manualdatamodel.compare',
payload: { payload: {
params: { params: {
id, id,
......
...@@ -22,7 +22,7 @@ const VersionHistory = (props) => { ...@@ -22,7 +22,7 @@ const VersionHistory = (props) => {
const getVersions = () => { const getVersions = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getVersions', type: 'manualdatamodel.getVersions',
payload: { payload: {
params: { params: {
id id
......
...@@ -23,7 +23,7 @@ const FC = (props) => { ...@@ -23,7 +23,7 @@ const FC = (props) => {
const getTip = () => { const getTip = () => {
dispatch({ dispatch({
type: 'datamodel.getPhysicalModelApprovalTip', type: 'manualdatamodel.getPhysicalModelApprovalTip',
payload: { payload: {
type type
}, },
......
...@@ -23,7 +23,7 @@ const FC = (props) => { ...@@ -23,7 +23,7 @@ const FC = (props) => {
const getCooperators = () => { const getCooperators = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperators', type: 'manualdatamodel.getCooperators',
payload: { payload: {
id: item?.id id: item?.id
}, },
...@@ -50,7 +50,7 @@ const FC = (props) => { ...@@ -50,7 +50,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.setCooperators', type: 'manualdatamodel.setCooperators',
payload: { payload: {
params: { params: {
id: item?.id, id: item?.id,
...@@ -151,7 +151,7 @@ const UsersItem = ({ modelId, value, onChange, readonly = false }) => { ...@@ -151,7 +151,7 @@ const UsersItem = ({ modelId, value, onChange, readonly = false }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperatorCandidates', type: 'manualdatamodel.getCooperatorCandidates',
payload: { payload: {
id: modelId, id: modelId,
match: searchValue, match: searchValue,
......
...@@ -23,7 +23,7 @@ const FC = (props) => { ...@@ -23,7 +23,7 @@ const FC = (props) => {
const getOwner = () => { const getOwner = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getOwner', type: 'manualdatamodel.getOwner',
payload: { payload: {
id: item?.id id: item?.id
}, },
...@@ -50,7 +50,7 @@ const FC = (props) => { ...@@ -50,7 +50,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.setOwner', type: 'manualdatamodel.setOwner',
payload: { payload: {
params: { params: {
id: item?.id, id: item?.id,
...@@ -151,7 +151,7 @@ const UsersItem = ({ modelId, value, onChange }) => { ...@@ -151,7 +151,7 @@ const UsersItem = ({ modelId, value, onChange }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperatorCandidates', type: 'manualdatamodel.getCooperatorCandidates',
payload: { payload: {
id: modelId, id: modelId,
match: searchValue, match: searchValue,
......
...@@ -74,7 +74,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -74,7 +74,7 @@ const Basic = React.forwardRef(function ({}, ref) {
const getTreeData = () => { const getTreeData = () => {
setLoadingTreeData(true) setLoadingTreeData(true)
dispatch({ dispatch({
type: 'datamodel.refreshDataModelCatalog', type: 'manualdatamodel.refreshDataModelCatalog',
callback: (data) => { callback: (data) => {
setLoadingTreeData(false) setLoadingTreeData(false)
......
...@@ -20,7 +20,7 @@ const FC = (props) => { ...@@ -20,7 +20,7 @@ const FC = (props) => {
const save = () => { const save = () => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.getForkedModel', type: 'manualdatamodel.getForkedModel',
payload: { payload: {
id: item?.id, id: item?.id,
}, },
...@@ -87,7 +87,7 @@ const Basic = ({ item }) => { ...@@ -87,7 +87,7 @@ const Basic = ({ item }) => {
const getDiffForked = () => { const getDiffForked = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getBranchDiffForked', type: 'manualdatamodel.getBranchDiffForked',
payload: { payload: {
id: item?.id, id: item?.id,
includeSame: !onlyShowChange, includeSame: !onlyShowChange,
......
...@@ -159,7 +159,7 @@ const Basic = React.forwardRef(function ({ items }, ref) { ...@@ -159,7 +159,7 @@ const Basic = React.forwardRef(function ({ items }, ref) {
if (args.keyword) { if (args.keyword) {
dispatch({ dispatch({
type: 'datamodel.searchModel', type: 'manualdatamodel.searchModel',
payload: { payload: {
term: args.keyword, term: args.keyword,
catalogId: node?.id, catalogId: node?.id,
...@@ -175,7 +175,7 @@ const Basic = React.forwardRef(function ({ items }, ref) { ...@@ -175,7 +175,7 @@ const Basic = React.forwardRef(function ({ items }, ref) {
}) })
} else { } else {
dispatch({ dispatch({
type: 'datamodel.getCurrentDataModelCatalog', type: 'manualdatamodel.getCurrentDataModelCatalog',
payload: { payload: {
easyDataModelerCatalogId: node?.id, easyDataModelerCatalogId: node?.id,
}, },
......
...@@ -54,7 +54,7 @@ const FC = (props) => { ...@@ -54,7 +54,7 @@ const FC = (props) => {
const onDownload = () => { const onDownload = () => {
setDownloading(true) setDownloading(true)
dispatch({ dispatch({
type: 'datamodel.downloadExportTableDDLListZip', type: 'manualdatamodel.downloadExportTableDDLListZip',
payload: { payload: {
data: basicRef.current.configs??[], data: basicRef.current.configs??[],
headers: { headers: {
...@@ -151,7 +151,7 @@ const Basic = React.forwardRef(function ({ ids }, ref) { ...@@ -151,7 +151,7 @@ const Basic = React.forwardRef(function ({ ids }, ref) {
const exportTableDDLAbstractList = () => { const exportTableDDLAbstractList = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.exportTableDDLAbstractList', type: 'manualdatamodel.exportTableDDLAbstractList',
payload: { payload: {
data: ids, data: ids,
}, },
...@@ -168,7 +168,7 @@ const Basic = React.forwardRef(function ({ ids }, ref) { ...@@ -168,7 +168,7 @@ const Basic = React.forwardRef(function ({ ids }, ref) {
const getDDLGenerators = (needDB = false) => { const getDDLGenerators = (needDB = false) => {
setLoadingDDLGenerators(true) setLoadingDDLGenerators(true)
dispatch({ dispatch({
type: 'datamodel.ddlGenerators', type: 'manualdatamodel.ddlGenerators',
callback: data => { callback: data => {
setLoadingDDLGenerators(false) setLoadingDDLGenerators(false)
setDDLGenerators(data) setDDLGenerators(data)
...@@ -308,7 +308,7 @@ const DDLDetail = ({ config, setConfig }) => { ...@@ -308,7 +308,7 @@ const DDLDetail = ({ config, setConfig }) => {
setLoadingVersions(true) setLoadingVersions(true)
setVersions() setVersions()
dispatch({ dispatch({
type: 'datamodel.getVersions', type: 'manualdatamodel.getVersions',
payload: { payload: {
params: { params: {
id: config?.easyDataModelerDataModelId, id: config?.easyDataModelerDataModelId,
...@@ -371,7 +371,7 @@ const DDLDetail = ({ config, setConfig }) => { ...@@ -371,7 +371,7 @@ const DDLDetail = ({ config, setConfig }) => {
const getDDL = () => { const getDDL = () => {
setLoadingDDL(true) setLoadingDDL(true)
dispatch({ dispatch({
type: 'datamodel.getExportTableDDL', type: 'manualdatamodel.getExportTableDDL',
payload: { payload: {
data: config, data: config,
}, },
......
...@@ -31,7 +31,7 @@ const FC = (props) => { ...@@ -31,7 +31,7 @@ const FC = (props) => {
setExportDDLParams({ visible: true }) setExportDDLParams({ visible: true })
} if (modeKey === 'erwin') { } if (modeKey === 'erwin') {
dispatch({ dispatch({
type: 'datamodel.exportERWinString', type: 'manualdatamodel.exportERWinString',
payload: { payload: {
ids: (ids??[]).toString(), ids: (ids??[]).toString(),
}, },
......
...@@ -20,7 +20,7 @@ const FC = (props) => { ...@@ -20,7 +20,7 @@ const FC = (props) => {
const save = () => { const save = () => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.joinBranch', type: 'manualdatamodel.joinBranch',
payload: { payload: {
ids: (items??[]).map(item => item.id).toString(), ids: (items??[]).map(item => item.id).toString(),
}, },
...@@ -130,7 +130,7 @@ export const Diff = ({ item }) => { ...@@ -130,7 +130,7 @@ export const Diff = ({ item }) => {
const getDiffForked = () => { const getDiffForked = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getBranchDiffForked', type: 'manualdatamodel.getBranchDiffForked',
payload: { payload: {
id: item?.id, id: item?.id,
includeSame: !onlyShowChange, includeSame: !onlyShowChange,
......
...@@ -179,7 +179,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -179,7 +179,7 @@ const Basic = React.forwardRef(function ({}, ref) {
params.keyword = args.keyword params.keyword = args.keyword
} }
dispatch({ dispatch({
type: 'datamodel.getMetadataTable', type: 'manualdatamodel.getMetadataTable',
payload: { payload: {
params params
}, },
......
...@@ -46,7 +46,7 @@ const Basic = ({ leftItem, rightItem }) => { ...@@ -46,7 +46,7 @@ const Basic = ({ leftItem, rightItem }) => {
const compare = () => { const compare = () => {
setLoadingResult(true) setLoadingResult(true)
dispatch({ dispatch({
type: 'datamodel.getModelMetadataCompareResult', type: 'manualdatamodel.getModelMetadataCompareResult',
payload: { payload: {
easyDataModelerDataModelId: rightItem?.id, easyDataModelerDataModelId: rightItem?.id,
metadataId: leftItem?.tableId, metadataId: leftItem?.tableId,
......
...@@ -186,7 +186,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -186,7 +186,7 @@ const Basic = React.forwardRef(function ({}, ref) {
const getDirModelsByCatalog = () => { const getDirModelsByCatalog = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCurrentDataModelCatalog', type: 'manualdatamodel.getCurrentDataModelCatalog',
payload: { payload: {
easyDataModelerCatalogId: node?.id, easyDataModelerCatalogId: node?.id,
}, },
...@@ -203,7 +203,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -203,7 +203,7 @@ const Basic = React.forwardRef(function ({}, ref) {
const getStateModelsByCatalog = () => { const getStateModelsByCatalog = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCurrentDataModelStateCatalog', type: 'manualdatamodel.getCurrentDataModelStateCatalog',
payload: { payload: {
easyDataModelerStateCatalogId: node?.id, easyDataModelerStateCatalogId: node?.id,
}, },
...@@ -220,7 +220,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -220,7 +220,7 @@ const Basic = React.forwardRef(function ({}, ref) {
const getBranchModelsByCatalog = () => { const getBranchModelsByCatalog = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCurrentDataModelCatalog', type: 'manualdatamodel.getCurrentDataModelCatalog',
payload: { payload: {
easyDataModelerCatalogId: rootNode?.id, easyDataModelerCatalogId: rootNode?.id,
branchId: node?.id, branchId: node?.id,
...@@ -247,7 +247,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -247,7 +247,7 @@ const Basic = React.forwardRef(function ({}, ref) {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.searchModel', type: 'manualdatamodel.searchModel',
payload: params, payload: params,
callback: (data) => { callback: (data) => {
setLoading(false) setLoading(false)
...@@ -400,7 +400,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh ...@@ -400,7 +400,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh
const getDirTreeData = () => { const getDirTreeData = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.refreshDataModelCatalog', type: 'manualdatamodel.refreshDataModelCatalog',
callback: (data) => { callback: (data) => {
setLoading(false) setLoading(false)
...@@ -421,7 +421,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh ...@@ -421,7 +421,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh
const getStateTreeData = () => { const getStateTreeData = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.loadDataModelStateCatalog', type: 'manualdatamodel.loadDataModelStateCatalog',
callback: (data) => { callback: (data) => {
setLoading(false) setLoading(false)
...@@ -442,7 +442,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh ...@@ -442,7 +442,7 @@ export const ModelTree = ({ states, setStates, showTypeOptions = true, treeHeigh
const getBranchTreeData = () => { const getBranchTreeData = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getAllBranches', type: 'manualdatamodel.getAllBranches',
callback: (data) => { callback: (data) => {
setLoading(false) setLoading(false)
......
...@@ -44,7 +44,7 @@ const Basic = ({ leftItem, rightItem }) => { ...@@ -44,7 +44,7 @@ const Basic = ({ leftItem, rightItem }) => {
const compareOtherModel = () => { const compareOtherModel = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.compareOtherModel', type: 'manualdatamodel.compareOtherModel',
payload: { payload: {
params: { params: {
leftEasyDataModelerDataModelId: leftItem?.id, leftEasyDataModelerDataModelId: leftItem?.id,
......
...@@ -51,7 +51,7 @@ const FC = ({ visible, item, onCancel }) => { ...@@ -51,7 +51,7 @@ const FC = ({ visible, item, onCancel }) => {
const getList = () => { const getList = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getForkEasyDataModelerDataModelDistributions', type: 'manualdatamodel.getForkEasyDataModelerDataModelDistributions',
payload: { payload: {
id: item?.id id: item?.id
}, },
......
...@@ -98,7 +98,7 @@ export const Basic = React.forwardRef(function ({}, ref) { ...@@ -98,7 +98,7 @@ export const Basic = React.forwardRef(function ({}, ref) {
const getProperties = () => { const getProperties = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getSearchProperties', type: 'manualdatamodel.getSearchProperties',
callback: data => { callback: data => {
setLoading(false) setLoading(false)
setProperties(data) setProperties(data)
......
...@@ -35,7 +35,7 @@ const FC = (props) => { ...@@ -35,7 +35,7 @@ const FC = (props) => {
console.log('table data', tableData) console.log('table data', tableData)
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.addPhysicalModelApproval', type: 'manualdatamodel.addPhysicalModelApproval',
payload: { payload: {
data: { data: {
...basicRows, ...basicRows,
...@@ -123,7 +123,7 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -123,7 +123,7 @@ const Basic = React.forwardRef(function ({}, ref) {
setUploading(true) setUploading(true)
dispatch({ dispatch({
type: 'datamodel.approvalUploadFile', type: 'manualdatamodel.approvalUploadFile',
payload: { payload: {
fileList: [file], fileList: [file],
}, },
...@@ -232,7 +232,7 @@ const RuleReviewItem = ({ value = {}, onChange }) => { ...@@ -232,7 +232,7 @@ const RuleReviewItem = ({ value = {}, onChange }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperationUsers', type: 'manualdatamodel.getCooperationUsers',
payload: { payload: {
match: searchValue, match: searchValue,
}, },
...@@ -415,7 +415,7 @@ const DesignUsersItem = ({ value, onChange }) => { ...@@ -415,7 +415,7 @@ const DesignUsersItem = ({ value, onChange }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperationUsers', type: 'manualdatamodel.getCooperationUsers',
payload: { payload: {
match: searchValue, match: searchValue,
}, },
...@@ -480,7 +480,7 @@ export const AttachesItem = ({ value, onChange, readOnly }) => { ...@@ -480,7 +480,7 @@ export const AttachesItem = ({ value, onChange, readOnly }) => {
type='danger' type='danger'
onClick={() => { onClick={() => {
dispatch({ dispatch({
type: 'datamodel.approvalDeleteFile', type: 'manualdatamodel.approvalDeleteFile',
payload: { payload: {
id: item.id id: item.id
}, },
......
...@@ -148,7 +148,7 @@ const FC = (props) => { ...@@ -148,7 +148,7 @@ const FC = (props) => {
const tempArray = (id??'').split('='); const tempArray = (id??'').split('=');
if (tempArray.length>=3) { if (tempArray.length>=3) {
dispatch({ dispatch({
type: 'datamodel.getParent', type: 'manualdatamodel.getParent',
payload: { payload: {
id id
}, },
...@@ -191,7 +191,7 @@ const FC = (props) => { ...@@ -191,7 +191,7 @@ const FC = (props) => {
} }
dispatch({ dispatch({
type: 'datamodel.getSuggestionPreference', type: 'manualdatamodel.getSuggestionPreference',
payload: params, payload: params,
callback: data => { callback: data => {
setLoadingPreference(false) setLoadingPreference(false)
...@@ -206,7 +206,7 @@ const FC = (props) => { ...@@ -206,7 +206,7 @@ const FC = (props) => {
const getSuggests = () => { const getSuggests = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.suggest', type: 'manualdatamodel.suggest',
payload: { payload: {
params: { params: {
name: args.name??'', name: args.name??'',
......
...@@ -53,7 +53,7 @@ const FC = (props) => { ...@@ -53,7 +53,7 @@ const FC = (props) => {
const getBranch = () => { const getBranch = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getBranch', type: 'manualdatamodel.getBranch',
payload: { payload: {
id: item?.id, id: item?.id,
}, },
...@@ -87,7 +87,7 @@ const FC = (props) => { ...@@ -87,7 +87,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.saveBranch', type: 'manualdatamodel.saveBranch',
payload: { payload: {
data: (type==='add')?basicRows:{...branch, ...basicRows}, data: (type==='add')?basicRows:{...branch, ...basicRows},
}, },
...@@ -269,7 +269,7 @@ const UsersItem = ({ value, onChange, readonly = false }) => { ...@@ -269,7 +269,7 @@ const UsersItem = ({ value, onChange, readonly = false }) => {
const getUsers = () => { const getUsers = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getCooperationUsers', type: 'manualdatamodel.getCooperationUsers',
payload: { payload: {
match: searchValue, match: searchValue,
}, },
......
...@@ -61,7 +61,7 @@ export const Basic = React.forwardRef(function ({ id, versions, defaultBasicVers ...@@ -61,7 +61,7 @@ export const Basic = React.forwardRef(function ({ id, versions, defaultBasicVers
const getDDLGenerators = () => { const getDDLGenerators = () => {
setLoadingGenerators(true) setLoadingGenerators(true)
dispatch({ dispatch({
type: 'datamodel.ddlGenerators', type: 'manualdatamodel.ddlGenerators',
callback: data => { callback: data => {
setLoadingGenerators(false) setLoadingGenerators(false)
setGenerators(data) setGenerators(data)
...@@ -78,7 +78,7 @@ export const Basic = React.forwardRef(function ({ id, versions, defaultBasicVers ...@@ -78,7 +78,7 @@ export const Basic = React.forwardRef(function ({ id, versions, defaultBasicVers
const getDDL = () => { const getDDL = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.ddlChangeString', type: 'manualdatamodel.ddlChangeString',
payload: { payload: {
easyDataModelerDataModelId: id, easyDataModelerDataModelId: id,
leftVersionId: basicVersion, leftVersionId: basicVersion,
......
...@@ -205,7 +205,7 @@ class Model extends React.Component { ...@@ -205,7 +205,7 @@ class Model extends React.Component {
getModelStates = () => { getModelStates = () => {
this.setState({ loadingStates: true }, () => { this.setState({ loadingStates: true }, () => {
dispatch({ dispatch({
type: 'datamodel.loadDataModelStateCatalog', type: 'manualdatamodel.loadDataModelStateCatalog',
callback: data => { callback: data => {
this.setState({ this.setState({
loadingStates: false, loadingStates: false,
...@@ -221,7 +221,7 @@ class Model extends React.Component { ...@@ -221,7 +221,7 @@ class Model extends React.Component {
getPreference = () => { getPreference = () => {
dispatch({ dispatch({
type: 'datamodel.getPreference', type: 'manualdatamodel.getPreference',
callback: data => { callback: data => {
this.setState(); this.setState();
if ((data.cols||'') === '') { if ((data.cols||'') === '') {
...@@ -276,7 +276,7 @@ class Model extends React.Component { ...@@ -276,7 +276,7 @@ class Model extends React.Component {
} }
dispatchLatestHomepage({ dispatchLatestHomepage({
type: 'datamodel.searchModel', type: 'manualdatamodel.searchModel',
payload: params, payload: params,
callback: data => { callback: data => {
let filterTableData = [...data||[]] let filterTableData = [...data||[]]
...@@ -299,7 +299,7 @@ class Model extends React.Component { ...@@ -299,7 +299,7 @@ class Model extends React.Component {
} }
dispatch({ dispatch({
type: 'datamodel.searchModelBySearchProperties', type: 'manualdatamodel.searchModelBySearchProperties',
payload: { payload: {
params, params,
data: searchProperties data: searchProperties
...@@ -314,7 +314,7 @@ class Model extends React.Component { ...@@ -314,7 +314,7 @@ class Model extends React.Component {
} else { } else {
if (currentView === 'dir') { if (currentView === 'dir') {
dispatchLatestHomepage({ dispatchLatestHomepage({
type: 'datamodel.getCurrentDataModelCatalog', type: 'manualdatamodel.getCurrentDataModelCatalog',
payload: { payload: {
easyDataModelerCatalogId: catalogId, easyDataModelerCatalogId: catalogId,
}, },
...@@ -327,7 +327,7 @@ class Model extends React.Component { ...@@ -327,7 +327,7 @@ class Model extends React.Component {
}) })
} else if (currentView === 'state') { } else if (currentView === 'state') {
dispatchLatestHomepage({ dispatchLatestHomepage({
type: 'datamodel.getCurrentDataModelStateCatalog', type: 'manualdatamodel.getCurrentDataModelStateCatalog',
payload: { payload: {
easyDataModelerStateCatalogId: catalogId easyDataModelerStateCatalogId: catalogId
}, },
...@@ -347,7 +347,7 @@ class Model extends React.Component { ...@@ -347,7 +347,7 @@ class Model extends React.Component {
params = {...params, stateId: currentModelState} params = {...params, stateId: currentModelState}
} }
dispatchLatestHomepage({ dispatchLatestHomepage({
type: 'datamodel.getCurrentDataModelCatalog', type: 'manualdatamodel.getCurrentDataModelCatalog',
payload: params, payload: params,
callback: data => { callback: data => {
const filterTableData = [...data?.easyDataModelerDataModels||[]].filter(item => branchModelForkState===null || branchModelForkState===undefined || item.fork===branchModelForkState) const filterTableData = [...data?.easyDataModelerDataModels||[]].filter(item => branchModelForkState===null || branchModelForkState===undefined || item.fork===branchModelForkState)
...@@ -650,7 +650,7 @@ class Model extends React.Component { ...@@ -650,7 +650,7 @@ class Model extends React.Component {
this.setState({ showDeleteTip: false }); this.setState({ showDeleteTip: false });
if (refresh) { if (refresh) {
dispatch({ dispatch({
type: 'datamodel.deleteDataModels', type: 'manualdatamodel.deleteDataModels',
payload: { payload: {
params: { params: {
easyDataModelerDataModelIds: selectModelerIds.join(',') easyDataModelerDataModelIds: selectModelerIds.join(',')
......
...@@ -12,7 +12,7 @@ const ConstraintDetail = (props) => { ...@@ -12,7 +12,7 @@ const ConstraintDetail = (props) => {
useEffect(() => { useEffect(() => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getAllConstraints', type: 'manualdatamodel.getAllConstraints',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
const _rules = []; const _rules = [];
......
...@@ -37,7 +37,7 @@ const EditTemplate = (props) => { ...@@ -37,7 +37,7 @@ const EditTemplate = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.saveTemplate', type: 'manualdatamodel.saveTemplate',
payload: { payload: {
data: newTemplateData data: newTemplateData
}, },
......
...@@ -154,7 +154,7 @@ const PartitionCURD = (props) => { ...@@ -154,7 +154,7 @@ const PartitionCURD = (props) => {
const getPartitions = () => { const getPartitions = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getSupportedPartitionTypes', type: 'manualdatamodel.getSupportedPartitionTypes',
payload: { payload: {
excludeBuiltin: true excludeBuiltin: true
}, },
...@@ -178,7 +178,7 @@ const PartitionCURD = (props) => { ...@@ -178,7 +178,7 @@ const PartitionCURD = (props) => {
content: '您确定要删除该分区吗?', content: '您确定要删除该分区吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deletePartitionType', type: 'manualdatamodel.deletePartitionType',
payload: { payload: {
params: { params: {
id: record.id id: record.id
......
...@@ -40,7 +40,7 @@ const TemplateAction = (props) => { ...@@ -40,7 +40,7 @@ const TemplateAction = (props) => {
const getCurrentTemplate = () => { const getCurrentTemplate = () => {
setLoading(true); setLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.getTemplate', type: 'manualdatamodel.getTemplate',
payload: { payload: {
params: { params: {
id id
...@@ -69,7 +69,7 @@ const TemplateAction = (props) => { ...@@ -69,7 +69,7 @@ const TemplateAction = (props) => {
const getSupportedDatatypes = () => { const getSupportedDatatypes = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getSupportedDatatypes', type: 'manualdatamodel.getSupportedDatatypes',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
setSupportedDatatypes(data||[]); setSupportedDatatypes(data||[]);
......
...@@ -16,7 +16,7 @@ const TemplateActionHeader = (props) => { ...@@ -16,7 +16,7 @@ const TemplateActionHeader = (props) => {
const getConstraints = () => { const getConstraints = () => {
dispatch({ dispatch({
type: 'datamodel.getAllConstraints', type: 'manualdatamodel.getAllConstraints',
callback: data => { callback: data => {
setConstraints(data); setConstraints(data);
}, },
......
...@@ -133,7 +133,7 @@ const TemplateCURD = (props) => { ...@@ -133,7 +133,7 @@ const TemplateCURD = (props) => {
const getConstraints = () => { const getConstraints = () => {
dispatch({ dispatch({
type: 'datamodel.getAllConstraints', type: 'manualdatamodel.getAllConstraints',
callback: data => { callback: data => {
setConstraints(data); setConstraints(data);
}, },
...@@ -143,7 +143,7 @@ const TemplateCURD = (props) => { ...@@ -143,7 +143,7 @@ const TemplateCURD = (props) => {
const getTemplates = () => { const getTemplates = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getAllTemplates', type: 'manualdatamodel.getAllTemplates',
payload: { payload: {
constraintName: currentConstraint constraintName: currentConstraint
}, },
...@@ -171,7 +171,7 @@ const TemplateCURD = (props) => { ...@@ -171,7 +171,7 @@ const TemplateCURD = (props) => {
content: '您确定要删除该模版吗?', content: '您确定要删除该模版吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteTemplate', type: 'manualdatamodel.deleteTemplate',
payload: { payload: {
params: { params: {
id: record.id id: record.id
......
...@@ -45,7 +45,7 @@ const UpdatePartitionModal = (props) => { ...@@ -45,7 +45,7 @@ const UpdatePartitionModal = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'datamodel.savePartitionType', type: 'manualdatamodel.savePartitionType',
payload: { payload: {
data: newItem data: newItem
}, },
......
...@@ -55,7 +55,7 @@ const WordTemplate = (props) => { ...@@ -55,7 +55,7 @@ const WordTemplate = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.uploadWordTemplate', type: 'manualdatamodel.uploadWordTemplate',
payload: { fileList: row.upload }, payload: { fileList: row.upload },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
......
...@@ -25,7 +25,7 @@ const FC = (props) => { ...@@ -25,7 +25,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.addRule', type: 'manualdatamodel.addRule',
payload: { payload: {
params: { params: {
catalogId: node?.id, catalogId: node?.id,
...@@ -164,7 +164,7 @@ export const Basic = React.forwardRef(function ({}, ref) { ...@@ -164,7 +164,7 @@ export const Basic = React.forwardRef(function ({}, ref) {
const getTemplates = () => { const getTemplates = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateList', type: 'manualdatamodel.getRuleTemplateList',
callback: data => { callback: data => {
setLoading(false) setLoading(false)
setData(data) setData(data)
......
...@@ -19,7 +19,7 @@ const FC = (props) => { ...@@ -19,7 +19,7 @@ const FC = (props) => {
const getTip = () => { const getTip = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getPhysicalModelApprovalTip', type: 'manualdatamodel.getPhysicalModelApprovalTip',
payload: { payload: {
type: reviewState type: reviewState
}, },
...@@ -37,7 +37,7 @@ const FC = (props) => { ...@@ -37,7 +37,7 @@ const FC = (props) => {
const onSave = () => { const onSave = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.setPhysicalModelApprovalTip', type: 'manualdatamodel.setPhysicalModelApprovalTip',
payload: { payload: {
params: { params: {
type: reviewState, type: reviewState,
......
...@@ -41,7 +41,7 @@ const FC = ({ item }) => { ...@@ -41,7 +41,7 @@ const FC = ({ item }) => {
const getVersions = () => { const getVersions = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleCatalogVersionList', type: 'manualdatamodel.getRuleCatalogVersionList',
payload: { payload: {
catalogId: item?.id, catalogId: item?.id,
}, },
...@@ -76,7 +76,7 @@ const FC = ({ item }) => { ...@@ -76,7 +76,7 @@ const FC = ({ item }) => {
setIncVersion(prevIncVersion => { setIncVersion(prevIncVersion => {
setLoadingCompare(true) setLoadingCompare(true)
dispatch({ dispatch({
type: 'datamodel.compareRuleCatalogVersion', type: 'manualdatamodel.compareRuleCatalogVersion',
payload: { payload: {
leftVersionId: prevBasicVersion, leftVersionId: prevBasicVersion,
rightVersionId: prevIncVersion rightVersionId: prevIncVersion
......
...@@ -23,7 +23,7 @@ const FC = ({ item }) => { ...@@ -23,7 +23,7 @@ const FC = ({ item }) => {
const getVersions = () => { const getVersions = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getRuleCatalogVersionList', type: 'manualdatamodel.getRuleCatalogVersionList',
payload: { payload: {
catalogId: item?.id, catalogId: item?.id,
}, },
......
...@@ -212,7 +212,7 @@ const FC = (props) => { ...@@ -212,7 +212,7 @@ const FC = (props) => {
const getRules = () => { const getRules = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleList', type: 'manualdatamodel.getRuleList',
payload: { payload: {
catalogId: node?.id, catalogId: node?.id,
}, },
...@@ -229,7 +229,7 @@ const FC = (props) => { ...@@ -229,7 +229,7 @@ const FC = (props) => {
const getStatus = () => { const getStatus = () => {
setLoadingStatus(true) setLoadingStatus(true)
dispatch({ dispatch({
type: 'datamodel.getRuleStatus', type: 'manualdatamodel.getRuleStatus',
callback: data => { callback: data => {
setLoadingStatus(false) setLoadingStatus(false)
setStatus(data) setStatus(data)
...@@ -243,7 +243,7 @@ const FC = (props) => { ...@@ -243,7 +243,7 @@ const FC = (props) => {
const getAlertTypes = () => { const getAlertTypes = () => {
setLoadingAlertTypes(true) setLoadingAlertTypes(true)
dispatch({ dispatch({
type: 'datamodel.getRuleAlertTypes', type: 'manualdatamodel.getRuleAlertTypes',
callback: data => { callback: data => {
setLoadingAlertTypes(false) setLoadingAlertTypes(false)
setAlertTypes(data) setAlertTypes(data)
...@@ -287,7 +287,7 @@ const FC = (props) => { ...@@ -287,7 +287,7 @@ const FC = (props) => {
content: '确定将选中的规则从规范中移除吗?', content: '确定将选中的规则从规范中移除吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteRules', type: 'manualdatamodel.deleteRules',
payload: { payload: {
ids: (selectedRows??[]).map(item => item.id).toString() ids: (selectedRows??[]).map(item => item.id).toString()
}, },
...@@ -307,7 +307,7 @@ const FC = (props) => { ...@@ -307,7 +307,7 @@ const FC = (props) => {
content: '确定将选中的规则从规范中移除吗?', content: '确定将选中的规则从规范中移除吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteRules', type: 'manualdatamodel.deleteRules',
payload: { payload: {
ids: record?.id ids: record?.id
}, },
......
...@@ -146,7 +146,7 @@ const FC = (props) => { ...@@ -146,7 +146,7 @@ const FC = (props) => {
const getTemplates = () => { const getTemplates = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateList', type: 'manualdatamodel.getRuleTemplateList',
callback: data => { callback: data => {
setLoading(false) setLoading(false)
setData(data) setData(data)
...@@ -171,7 +171,7 @@ const FC = (props) => { ...@@ -171,7 +171,7 @@ const FC = (props) => {
content: '删除规则,引用的规范将同步删除该规则,确定删除吗?', content: '删除规则,引用的规范将同步删除该规则,确定删除吗?',
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deletesRuleTemplate', type: 'manualdatamodel.deletesRuleTemplate',
payload: { payload: {
templateIds: (selectedRows??[]).map(item => item.id).toString() templateIds: (selectedRows??[]).map(item => item.id).toString()
}, },
...@@ -187,7 +187,7 @@ const FC = (props) => { ...@@ -187,7 +187,7 @@ const FC = (props) => {
const onDeteteClick = (record) => { const onDeteteClick = (record) => {
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateReferenceRuleCatalogList', type: 'manualdatamodel.getRuleTemplateReferenceRuleCatalogList',
payload: { payload: {
ruleTemplateId: record?.id ruleTemplateId: record?.id
}, },
...@@ -206,7 +206,7 @@ const FC = (props) => { ...@@ -206,7 +206,7 @@ const FC = (props) => {
content: tip, content: tip,
onOk: () => { onOk: () => {
dispatch({ dispatch({
type: 'datamodel.deleteRuleTemplate', type: 'manualdatamodel.deleteRuleTemplate',
payload: { payload: {
templateId: record?.id templateId: record?.id
}, },
...@@ -324,7 +324,7 @@ const ReferenceCountTooltipTitle = ({ id, onClick }) => { ...@@ -324,7 +324,7 @@ const ReferenceCountTooltipTitle = ({ id, onClick }) => {
const getReferenceRuleCatalogList = () => { const getReferenceRuleCatalogList = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateReferenceRuleCatalogList', type: 'manualdatamodel.getRuleTemplateReferenceRuleCatalogList',
payload: { payload: {
ruleTemplateId: id ruleTemplateId: id
}, },
......
...@@ -52,7 +52,7 @@ const FC = (props) => { ...@@ -52,7 +52,7 @@ const FC = (props) => {
const getTreeData = () => { const getTreeData = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleCatalogList', type: 'manualdatamodel.getRuleCatalogList',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
setData(data) setData(data)
...@@ -103,7 +103,7 @@ const FC = (props) => { ...@@ -103,7 +103,7 @@ const FC = (props) => {
onOk: () => { onOk: () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.deleteRuleCatalog', type: 'manualdatamodel.deleteRuleCatalog',
payload: { payload: {
id: node?.id id: node?.id
}, },
...@@ -128,7 +128,7 @@ const FC = (props) => { ...@@ -128,7 +128,7 @@ const FC = (props) => {
}) })
} else if (key === 'up') { } else if (key === 'up') {
dispatch({ dispatch({
type: 'datamodel.upRuleCatalog', type: 'manualdatamodel.upRuleCatalog',
payload: { payload: {
params: { params: {
id: node?.id id: node?.id
...@@ -140,7 +140,7 @@ const FC = (props) => { ...@@ -140,7 +140,7 @@ const FC = (props) => {
}) })
} else if (key === 'down') { } else if (key === 'down') {
dispatch({ dispatch({
type: 'datamodel.downRuleCatalog', type: 'manualdatamodel.downRuleCatalog',
payload: { payload: {
params: { params: {
id: node?.id id: node?.id
......
...@@ -27,7 +27,7 @@ const FC = (props) => { ...@@ -27,7 +27,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
if (type === 'add') { if (type === 'add') {
dispatch({ dispatch({
type: 'datamodel.addRuleCatalog', type: 'manualdatamodel.addRuleCatalog',
payload: { payload: {
data: rows data: rows
}, },
...@@ -40,7 +40,7 @@ const FC = (props) => { ...@@ -40,7 +40,7 @@ const FC = (props) => {
}) })
} else { } else {
dispatch({ dispatch({
type: 'datamodel.updateRuleCatalog', type: 'manualdatamodel.updateRuleCatalog',
payload: { payload: {
data: {...item, ...rows} data: {...item, ...rows}
}, },
...@@ -116,7 +116,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) { ...@@ -116,7 +116,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) {
const getStatus = () => { const getStatus = () => {
setLoadingStatus(true) setLoadingStatus(true)
dispatch({ dispatch({
type: 'datamodel.getRuleCatalogStatus', type: 'manualdatamodel.getRuleCatalogStatus',
callback: (data) => { callback: (data) => {
setLoadingStatus(false) setLoadingStatus(false)
setStatus(data) setStatus(data)
......
...@@ -29,7 +29,7 @@ const FC = (props) => { ...@@ -29,7 +29,7 @@ const FC = (props) => {
const getDetail = () => { const getDetail = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateDetail', type: 'manualdatamodel.getRuleTemplateDetail',
payload: { payload: {
ruleTemplateId: item?.id ruleTemplateId: item?.id
}, },
...@@ -56,7 +56,7 @@ const FC = (props) => { ...@@ -56,7 +56,7 @@ const FC = (props) => {
setWaiting(true) setWaiting(true)
if (type === 'add') { if (type === 'add') {
dispatch({ dispatch({
type: 'datamodel.addRuleTemplate', type: 'manualdatamodel.addRuleTemplate',
payload: { payload: {
data: rows data: rows
}, },
...@@ -69,7 +69,7 @@ const FC = (props) => { ...@@ -69,7 +69,7 @@ const FC = (props) => {
}) })
} else { } else {
dispatch({ dispatch({
type: 'datamodel.updateRuleTemplate', type: 'manualdatamodel.updateRuleTemplate',
payload: { payload: {
data: {...item, preCheckProperty: null, ...rows} data: {...item, preCheckProperty: null, ...rows}
}, },
...@@ -172,7 +172,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) { ...@@ -172,7 +172,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) {
const getCheckTypes = () => { const getCheckTypes = () => {
setLoadingCheckTypes(true) setLoadingCheckTypes(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateCheckTypes', type: 'manualdatamodel.getRuleTemplateCheckTypes',
callback: (data) => { callback: (data) => {
setLoadingCheckTypes(false) setLoadingCheckTypes(false)
setCheckTypes(data) setCheckTypes(data)
...@@ -387,7 +387,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => { ...@@ -387,7 +387,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => {
const getCheckPropertyTypes = () => { const getCheckPropertyTypes = () => {
setLoadingCheckPrpertyTypes(true) setLoadingCheckPrpertyTypes(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateAllCheckPropertyTypes', type: 'manualdatamodel.getRuleTemplateAllCheckPropertyTypes',
callback: (data) => { callback: (data) => {
setLoadingCheckPrpertyTypes(false) setLoadingCheckPrpertyTypes(false)
setCheckPropertyTypes(data) setCheckPropertyTypes(data)
...@@ -401,7 +401,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => { ...@@ -401,7 +401,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => {
const getExpressionTypes = () => { const getExpressionTypes = () => {
setLoadingExpressionTypes(true) setLoadingExpressionTypes(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateAllVerifyExpressionTypes', type: 'manualdatamodel.getRuleTemplateAllVerifyExpressionTypes',
callback: (data) => { callback: (data) => {
setLoadingExpressionTypes(false) setLoadingExpressionTypes(false)
setExpressionTypes(data) setExpressionTypes(data)
...@@ -415,7 +415,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => { ...@@ -415,7 +415,7 @@ const CheckItem = ({ value, onChange, preCatalog }) => {
const getExpressions = () => { const getExpressions = () => {
setLoadingExpressionMapping(true) setLoadingExpressionMapping(true)
dispatch({ dispatch({
type: 'datamodel.getRuleTemplateAllVertifyExpressions', type: 'manualdatamodel.getRuleTemplateAllVertifyExpressions',
callback: (data) => { callback: (data) => {
setLoadingExpressionMapping(false) setLoadingExpressionMapping(false)
setExpressionMapping(data) setExpressionMapping(data)
......
...@@ -18,7 +18,7 @@ const FC = (props) => { ...@@ -18,7 +18,7 @@ const FC = (props) => {
const rows = await basicRef.current?.validate() const rows = await basicRef.current?.validate()
setWaiting(true) setWaiting(true)
dispatch({ dispatch({
type: 'datamodel.updateRule', type: 'manualdatamodel.updateRule',
payload: { payload: {
params: {id: item?.id, ...rows}, params: {id: item?.id, ...rows},
}, },
...@@ -91,7 +91,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) { ...@@ -91,7 +91,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) {
const getStatus = () => { const getStatus = () => {
setLoadingStatus(true) setLoadingStatus(true)
dispatch({ dispatch({
type: 'datamodel.getRuleStatus', type: 'manualdatamodel.getRuleStatus',
callback: data => { callback: data => {
setLoadingStatus(false) setLoadingStatus(false)
setStatus(data) setStatus(data)
...@@ -105,7 +105,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) { ...@@ -105,7 +105,7 @@ export const Basic = React.forwardRef(function ({ type, item }, ref) {
const getAlertTypes = () => { const getAlertTypes = () => {
setLoadingAlertTypes(true) setLoadingAlertTypes(true)
dispatch({ dispatch({
type: 'datamodel.getRuleAlertTypes', type: 'manualdatamodel.getRuleAlertTypes',
callback: data => { callback: data => {
setLoadingAlertTypes(false) setLoadingAlertTypes(false)
setAlertTypes(data) setAlertTypes(data)
......
...@@ -50,7 +50,7 @@ const ModelConfig = () => { ...@@ -50,7 +50,7 @@ const ModelConfig = () => {
const getPermissions = () => { const getPermissions = () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
type: 'datamodel.getConfigPrivilege', type: 'manualdatamodel.getConfigPrivilege',
callback: data => { callback: data => {
setLoading(false); setLoading(false);
setPermissions(data); setPermissions(data);
......
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