Commit 91c96e87 by zhaochengxiang

已发布模型下的草稿选择送审状态没有实时改变

parent 4b9fe130
...@@ -186,8 +186,12 @@ export function* getDataModelWithRecommendedDefinitionAndTermDiscovery(payload) ...@@ -186,8 +186,12 @@ export function* getDataModelWithRecommendedDefinitionAndTermDiscovery(payload)
return yield call(datamodelerService.getDataModelWithRecommendedDefinitionAndTermDiscovery, payload); return yield call(datamodelerService.getDataModelWithRecommendedDefinitionAndTermDiscovery, payload);
} }
export function* getCheckOutDataModel(payload) { export function* checkOutDataModel(payload) {
return yield call(datamodelerService.getCheckOutDataModel, payload); return yield call(datamodelerService.checkOutDataModel, payload);
}
export function* getCheckoutDataModel(payload) {
return yield call(datamodelerService.getCheckoutDataModel, payload);
} }
export function* getDataModelLocation(payload) { export function* getDataModelLocation(payload) {
......
...@@ -141,7 +141,7 @@ export function getDataModelWithRecommendedDefinitionAndTermDiscovery(payload) { ...@@ -141,7 +141,7 @@ export function getDataModelWithRecommendedDefinitionAndTermDiscovery(payload) {
return GetJSON("/datamodeler/easyDataModelerCURD/getDataModelWithRecommendedDefinitionAndTermDiscovery", payload); return GetJSON("/datamodeler/easyDataModelerCURD/getDataModelWithRecommendedDefinitionAndTermDiscovery", payload);
} }
export function getCheckOutDataModel(payload) { export function checkOutDataModel(payload) {
return GetJSON("/datamodeler/easyDataModelerCURD/checkOutDataModel", payload); return GetJSON("/datamodeler/easyDataModelerCURD/checkOutDataModel", payload);
} }
...@@ -181,6 +181,10 @@ export function getMaintenanceRecords(payload) { ...@@ -181,6 +181,10 @@ export function getMaintenanceRecords(payload) {
return PostJSON("/datamodeler/easyDataModelerCURD/getMaintenanceRecords", payload); return PostJSON("/datamodeler/easyDataModelerCURD/getMaintenanceRecords", payload);
} }
export function getCheckoutDataModel(payload) {
return GetJSON("/datamodeler/easyDataModelerCURD/getCheckoutDataModel", payload);
}
export function ddlGenerators() { export function ddlGenerators() {
return GetJSON("/datamodeler/easyDataModelerExport/ddlGenerators"); return GetJSON("/datamodeler/easyDataModelerExport/ddlGenerators");
} }
......
...@@ -171,7 +171,7 @@ const ImportAction = (props) => { ...@@ -171,7 +171,7 @@ const ImportAction = (props) => {
} }
} }
} else if (action==='edit' && permitCheckOut) { } else if (action==='edit' && permitCheckOut) {
type = 'datamodel.getCheckOutDataModel'; type = 'datamodel.checkOutDataModel';
} else if (action==='edit') { } else if (action==='edit') {
const _action = getQueryParam(Action, props.location.search); const _action = getQueryParam(Action, props.location.search);
......
...@@ -8,7 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify" ...@@ -8,7 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import ResizeObserver from 'rc-resize-observer'; import ResizeObserver from 'rc-resize-observer';
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
import { showMessage, getQueryParam, paginate, isSzseEnv } from '../../../../util'; import { showMessage, getQueryParam, paginate, isSzseEnv, formatDate } from '../../../../util';
import { AnchorId, AnchorTimestamp, Action, CatalogId, ModelerId } from '../../../../util/constant'; import { AnchorId, AnchorTimestamp, Action, CatalogId, ModelerId } from '../../../../util/constant';
// import Tag from "../../Tag"; // import Tag from "../../Tag";
...@@ -116,7 +116,7 @@ const ResizeableHeaderCell = props => { ...@@ -116,7 +116,7 @@ const ResizeableHeaderCell = props => {
const ModelTable = (props) => { const ModelTable = (props) => {
const { data, onChange, onItemAction, onSelect, onHistory, catalogId, keyword, onAutoCreateTable, offset = null, modelId = null, view, selectModelerIds, onSubSelect, modelState } = props; const { data, onChange, onItemAction, onSelect, onHistory, catalogId, keyword, onAutoCreateTable, offset = null, modelId = null, modelPid = null, view, selectModelerIds, onSubSelect, modelState } = props;
const MENU_ID = (((modelId||'') !== '') ? `model-table-contextmenu-${modelId}` : 'model-table-contextmenu'); const MENU_ID = (((modelId||'') !== '') ? `model-table-contextmenu-${modelId}` : 'model-table-contextmenu');
...@@ -200,6 +200,15 @@ const ModelTable = (props) => { ...@@ -200,6 +200,15 @@ const ModelTable = (props) => {
sorter: true, sorter: true,
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],
}, },
{
title: '最近修改时间',
dataIndex: 'modifiedTs',
width: 180,
ellipsis: true,
render: (_,record) => {
return formatDate(record.modifiedTs);
}
},
// { // {
// title: '标签', // title: '标签',
// dataIndex: 'tag', // dataIndex: 'tag',
...@@ -263,13 +272,13 @@ const ModelTable = (props) => { ...@@ -263,13 +272,13 @@ const ModelTable = (props) => {
useEffect(() => { useEffect(() => {
// if ((modelId||'') !== '') { if ((modelId||'') !== '') {
// window?.addEventListener("storage", (e) => { window?.addEventListener("storage", (e) => {
// if (e.key === 'modelChange') { if (e.key === 'modelChange') {
// getDataModel(); getCheckoutDataModel();
// } }
// }); });
// } }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, []) }, [])
...@@ -398,6 +407,21 @@ const ModelTable = (props) => { ...@@ -398,6 +407,21 @@ const ModelTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [ tableWidth ]) }, [ tableWidth ])
const getCheckoutDataModel = () => {
dispatch({
type: 'datamodel.getCheckoutDataModel',
payload: {
id: modelPid
},
callback: data => {
setSubData(data?[data]:[]);
},
error: () => {
}
})
}
const getDataModel = () => { const getDataModel = () => {
dispatch({ dispatch({
type: 'datamodel.getDataModel', type: 'datamodel.getDataModel',
...@@ -453,7 +477,7 @@ const ModelTable = (props) => { ...@@ -453,7 +477,7 @@ const ModelTable = (props) => {
if (action.id === '2') { if (action.id === '2') {
onChange && onChange(); onChange && onChange();
} else { } else {
getDataModel(); getCheckoutDataModel();
} }
} }
...@@ -571,6 +595,7 @@ const ModelTable = (props) => { ...@@ -571,6 +595,7 @@ const ModelTable = (props) => {
expandable = { expandable = {
expandedRowRender: record => <ModelTable expandedRowRender: record => <ModelTable
modelId={record?.checkedOutId} modelId={record?.checkedOutId}
modelPid={record?.id}
onSubSelect={onSubSelectChange} onSubSelect={onSubSelectChange}
{...props} {...props}
/>, />,
......
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