Commit dea31490 by zhaochengxiang

服务下线

parent 365755fc
...@@ -57,6 +57,10 @@ export function* nextState(payload) { ...@@ -57,6 +57,10 @@ export function* nextState(payload) {
return yield call(pds.nextState, payload); return yield call(pds.nextState, payload);
} }
export function* offlineDataService(payload) {
return yield call(pds.offlineDataService, payload);
}
export function* checkoutService(payload) { export function* checkoutService(payload) {
return yield call(pds.checkoutService, payload); return yield call(pds.checkoutService, payload);
} }
......
...@@ -56,6 +56,10 @@ export function nextState(payload) { ...@@ -56,6 +56,10 @@ export function nextState(payload) {
return GetJSON("/pdataservice/pdsCURD/nextState", payload); return GetJSON("/pdataservice/pdsCURD/nextState", payload);
} }
export function offlineDataService(payload) {
return Post("/pdataservice/pdsCURD/offlineDataService", payload)
}
export function checkoutService(payload) { export function checkoutService(payload) {
return GetJSON("/pdataservice/pdsCURD/checkOutDataService", payload) return GetJSON("/pdataservice/pdsCURD/checkOutDataService", payload)
} }
......
...@@ -638,6 +638,27 @@ const ModelTable = (props) => { ...@@ -638,6 +638,27 @@ 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 => { const onSelectChange = keys => {
setSelectedRowKeys(keys); setSelectedRowKeys(keys);
...@@ -788,6 +809,8 @@ const ModelTable = (props) => { ...@@ -788,6 +809,8 @@ const ModelTable = (props) => {
}) })
} else if (id === 'exchangeOwner') { } else if (id === 'exchangeOwner') {
setExchangeOwnerParams({ visible: true, id: currentItem?.id }); setExchangeOwnerParams({ visible: true, id: currentItem?.id });
} else if (id === 'offline') {
offlineService(currentItem);
} }
} }
...@@ -951,6 +974,11 @@ const ModelTable = (props) => { ...@@ -951,6 +974,11 @@ const ModelTable = (props) => {
</RcItem> </RcItem>
} }
{ {
getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && currentItem?.supportOffline && <RcItem id="offline" onClick={handleItemClick} >
下线
</RcItem>
}
{
getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && currentItem?.supportODataEnable && <RcItem id="enableOData" onClick={handleItemClick}> getDataModelerRole(user)!==DataModelerRoleReader && view!=='grant' && !isOnlyEnding && currentItem?.supportODataEnable && <RcItem id="enableOData" onClick={handleItemClick}>
启动OData 启动OData
</RcItem> </RcItem>
......
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