Browse Source

rest服务优化修改

master
wenlele 1 year ago
parent
commit
d07443e6e5
  1. 13
      web/client/src/sections/dataService/containers/serviceManagement.js

13
web/client/src/sections/dataService/containers/serviceManagement.js

@ -4,7 +4,7 @@ import moment from 'moment';
import { RouteRequest } from '@peace/utils';
import { RouteTable } from '$utils'
import { Tabs, Form, Input, Space, Button, Table, Popconfirm } from 'antd';
import { Tabs, Form, Input, Space, Button, Table, Popconfirm, message } from 'antd';
const { Search } = Input;
import EditModal from '../components/editModal';
@ -65,10 +65,13 @@ function ServiceManagement ({ loading, clientHeight, actions, dispatch, }) {
}}>编辑</a>
{/* {record?.enabled ? */}
<Popconfirm
title="是否确认删除该业务规则?"
{record?.resourceConsumptions?.length > 0 ? <a onClick={() => {
message.warning('已有关联数据,无法删除')
}}>删除</a>
: <Popconfirm
title="是否确认删除该服务?"
onConfirm={() => {
dispatch(dataService.delBusinessRules(record.id)).then(res => {
dispatch(dataService.delServiceManagement(record.id)).then(res => {
if (res.success) {
setQuery({ limit: 10, page: 0 });
resourceData({ limit: 10, page: 0, keyword })
@ -77,7 +80,7 @@ function ServiceManagement ({ loading, clientHeight, actions, dispatch, }) {
}}
>
<a >删除</a>
</Popconfirm>
</Popconfirm>}
{/* // } */}
{record?.enabled ?

Loading…
Cancel
Save