|
@@ -4,6 +4,7 @@ import { Link } from 'dva/router'
|
|
import { thanos } from '@/conf/config'
|
|
import { thanos } from '@/conf/config'
|
|
import { Button } from 'antd'
|
|
import { Button } from 'antd'
|
|
import { Divider, message, Popconfirm } from 'antd'
|
|
import { Divider, message, Popconfirm } from 'antd'
|
|
|
|
+import { delItem } from './service.js'
|
|
|
|
|
|
const apiUrl = `${thanos}/thanos-admin/api/v1/group/list`
|
|
const apiUrl = `${thanos}/thanos-admin/api/v1/group/list`
|
|
|
|
|
|
@@ -93,6 +94,15 @@ class GroupList extends React.PureComponent {
|
|
this.refresh = refresh
|
|
this.refresh = refresh
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 点击删除按钮时的事件处理函数
|
|
|
|
+ delItem = (record) => {
|
|
|
|
+ delItem({ id: record.id, name: record.name }).then(res => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ message.success('删除成功')
|
|
|
|
+ this.refresh()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
render () {
|
|
render () {
|
|
return (
|
|
return (
|