Commit 518c4fe7 by zhaochengxiang

停用服务

parent e89a5931
......@@ -107,7 +107,7 @@ export function release(payload) {
}
export function offline(payload) {
return PostJSON("/pdataservice/pdsWorkflow/kickoffOffline", payload)
return PostJSON("/pdataservice/pdsCURD/offlineDataServices", payload)
}
export function getSmartBiUrl(payload) {
......
......@@ -518,8 +518,6 @@ const ModelTable = (props) => {
})
} else if (id === 'exchangeOwner') {
setExchangeOwnerParams({ visible: true, id: record?.id });
} else if (id === 'offline') {
offlineService(record);
} else if (id === 'copyUri') {
copy(record.odata);
showMessage('success', 'URI复制成功');
......@@ -771,27 +769,6 @@ const ModelTable = (props) => {
});
}
const offlineService = (record) => {
modal.confirm({
title: '提示!',
content: '您确定要停用该服务吗?',
onOk: () => {
dispatch({
type: 'pds.offlineDataService',
payload: {
params: {
id: record.id
}
},
callback: () => {
showMessage('success', '停用成功');
onChange && onChange();
}
})
}
});
}
const onSelectChange = keys => {
setSelectedRowKeys(keys);
......
......@@ -532,13 +532,28 @@ class Model extends React.Component {
}
onOfflineBtnClick = () => {
const { modal } = this.props;
const { selectModelerIds } = this.state;
if ((selectModelerIds||[]).length === 0) {
showMessage('info', '请先选择服务');
return;
}
this.setState({ offlineVisible: true })
modal?.confirm({
title: '是否确认停用选中的服务',
onOk: () => {
dispatch({
type: 'pds.offline',
payload: {
params: {
pdsDataServiceIds: (selectModelerIds??[]).toString()
}
},
callback: () => {
showMessage("success","停用成功")
this.setState({ selectModelerIds: [] }, () => {
this.onTableChange()
})
}
})
}
})
}
onBatchDeleteBtnClick = () => {
......@@ -1009,11 +1024,11 @@ class Model extends React.Component {
onCancel={this.onStartReleaseCancel}
/>
<Offline
{/* <Offline
visible={this.state.offlineVisible}
ids={selectModelerIds}
onCancel={this.onOfflineCancel}
/>
/> */}
<ColSettingModal
visible={colSettingModalVisible}
......
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