Commit 39363c26 by zhaochengxiang

模型版本增加名称

parent 1915cab8
......@@ -89,9 +89,9 @@ const callback = resp => {
if (resp.status === 401) {
showMessage('warn', 'session过期,请重新登录!');
//外网
window.location.href="/center-home/view/login"
// window.location.href="/center-home/view/login"
//内网
// window.location.href="/api/auth/login"
window.location.href="/api/auth/login"
return null;
}
else if (resp.status !== 200) {
......
......@@ -40,8 +40,12 @@ const VersionCompare = (props) => {
const newData = [];
(data||[]).forEach((item, index) => {
let name = formatVersionDate(item.ts);
if (index === 0) {
let name = item.name||'';
name = name + '_' + formatVersionDate(item.ts);
if (index === 0 && item.id !== '-1') {
name = name+'(当前版本)';
}
if (index === 1 && data[0].id === '-1') {
name = name+'(当前版本)';
}
......@@ -85,7 +89,7 @@ const VersionCompare = (props) => {
callback: data => {
setLoadingCompare(false);
var target = document.getElementById('container');
var target = document.getElementById('model-version-compare-container');
var converter = new showdown.Converter();
var html = converter.makeHtml(data||'');
......@@ -127,7 +131,7 @@ const VersionCompare = (props) => {
<div className='py-3'>
<Spin spinning={loadingCompare} >
<div id="container" style={{ }}></div>
<div id="model-version-compare-container" style={{ }}></div>
</Spin>
</div>
</div>
......
......@@ -52,7 +52,7 @@ class Model extends React.Component {
hints: [],
loadingStates: false,
modelStates: [],
currentModelState: '',
currentModelState: '4',
currentView: '',
exportDDLModalReference: 'exportDDL',
currentModel: {},
......@@ -79,7 +79,6 @@ class Model extends React.Component {
loadingStates: false,
// modelStates: [{ name: 'all', id: '', cnName: '所有状态' }, ...(data?.subCatalogs||[])]
modelStates: data?.subCatalogs||[],
currentModelState: '4',
});
},
error: () => {
......@@ -198,13 +197,13 @@ class Model extends React.Component {
this.setState({ constraintDetailDrawerVisible: true });
}
setFilterData = () => {
const { tableData, currentModelState } = this.state;
// setFilterData = () => {
// const { tableData, currentModelState } = this.state;
const _filterData = (tableData||[]).filter(item => (currentModelState===''||currentModelState===item.state?.id));
// const _filterData = (tableData||[]).filter(item => (currentModelState===''||currentModelState===item.state?.id));
this.setState({ filterTableData: _filterData });
}
// this.setState({ filterTableData: _filterData });
// }
onImportUnconditionBtnClick = () => {
const { catalogId } = this.state;
......@@ -589,7 +588,7 @@ class Model extends React.Component {
this.onModelStateChange(value);
}}
loading={loadingStates}
value={currentModelState}
value={loadingStates? '': currentModelState}
>
{
(modelStates||[]).map(item => {
......
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