Commit 1d0cab49 by zhaochengxiang

更新模型更新列表

parent f5619136
import React, { useState, useEffect } from 'react';
import { Form, Button, Space } from 'antd';
import LocalStorage from 'local-storage';
import ImportAction from './ImportAction';
import CatalogModal from './CatalogModal';
......@@ -82,6 +83,7 @@ const EditModel = (props) => {
showMessage("success", '新增模型成功');
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', editable: 'true', stateId: data?.state?.id||'' } });
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
},
error: () => {
setConfirmLoading(false);
......@@ -92,6 +94,7 @@ const EditModel = (props) => {
showMessage("success", '保存模型成功');
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'' } });
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
}
},
error: (err) => {
......
......@@ -135,7 +135,7 @@ const ModelTable = (props) => {
const _pageNum = parseInt(offset/pageSize + ((offset%pageSize===0)?0:1));
setPagination({...pagination, pageNum: _pageNum });
} else if (modelId!=='') {
} else if ((modelId||'')!=='') {
getDataModel();
} else {
setPagination({...pagination, pageNum: 1 });
......
......@@ -60,6 +60,12 @@ class Model extends React.Component {
componentDidMount() {
this.getModelStates();
window?.addEventListener("storage", (e) => {
if (e.key === 'modelChange') {
this.onTableChange();
}
});
}
getModelStates = () => {
......
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