mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
fix: Delete operation from team & Delete comments from publish
This commit is contained in:
@@ -343,11 +343,6 @@ export const PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN : PageProColumns<Publish
|
||||
dataIndex: 'status',
|
||||
ellipsis:true,
|
||||
},
|
||||
{
|
||||
title:('备注'),
|
||||
dataIndex: 'comments',
|
||||
ellipsis:true
|
||||
},
|
||||
{
|
||||
title:('申请人'),
|
||||
dataIndex: ['applicant','name'],
|
||||
|
||||
@@ -3,7 +3,7 @@ import {App, Button, Form, Input, Row, Select} from "antd";
|
||||
import {Link, useLocation, useNavigate, useParams} from "react-router-dom";
|
||||
import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx";
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE, VALIDATE_MESSAGE} from "@common/const/const.tsx";
|
||||
import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx";
|
||||
import {MemberItem} from "@common/const/type.ts";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import {DefaultOptionType} from "antd/es/cascader";
|
||||
@@ -197,7 +197,7 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((props,ref) => {
|
||||
<p className="text-left"><span className="font-bold">{$t('删除团队')}:</span>{$t('删除操作不可恢复,请谨慎操作!')}</p>
|
||||
<div className="text-left">
|
||||
<WithPermission access="system.organization.team.delete" disabled={!canDelete} tooltip={canDelete ? '':$t('服务数据清除后,方可删除')}>
|
||||
<Button className="m-auto mt-[16px] mb-[20px]" type="default" danger onClick={()=>deleteTeam(entity!)}>{$t('删除')}</Button>
|
||||
<Button className="m-auto mt-[16px] mb-[20px]" type="default" danger onClick={()=>deleteTeam()}>{$t('删除')}</Button>
|
||||
</WithPermission>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
|
||||
import PageList, { PageProColumns } from "@common/components/aoplatform/PageList.tsx"
|
||||
import PageList from "@common/components/aoplatform/PageList.tsx"
|
||||
import {ActionType} from "@ant-design/pro-components";
|
||||
import {FC, useEffect, useMemo, useRef, useState} from "react";
|
||||
import {useLocation, useNavigate} from "react-router-dom";
|
||||
import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx";
|
||||
import {App, Divider, Modal} from "antd";
|
||||
import {BasicResponse, COLUMNS_TITLE, DELETE_TIPS, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx";
|
||||
import {App, Modal} from "antd";
|
||||
import {BasicResponse, DELETE_TIPS, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx";
|
||||
import { SimpleMemberItem } from "@common/const/type.ts";
|
||||
import {useFetch} from "@common/hooks/http.ts";
|
||||
import { TEAM_TABLE_COLUMNS } from "../../const/team/const.tsx";
|
||||
import { TeamConfigFieldType, TeamConfigHandle, TeamTableListItem } from "../../const/team/type.ts";
|
||||
import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPermission.tsx";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
|
||||
import { checkAccess } from "@common/utils/permission.ts";
|
||||
import TeamConfig from "./TeamConfig.tsx";
|
||||
@@ -131,21 +130,6 @@ const TeamList:FC = ()=>{
|
||||
})
|
||||
}
|
||||
|
||||
const operation:PageProColumns<TeamTableListItem>[] =[
|
||||
{
|
||||
title: COLUMNS_TITLE.operate,
|
||||
key: 'option',
|
||||
fixed:'right',
|
||||
btnNums:2,
|
||||
valueType: 'option',
|
||||
render: (_: React.ReactNode, entity: TeamTableListItem) => [
|
||||
<TableBtnWithPermission access="" key="view" btnType="view" navigateTo={`../inside/${entity.id}/setting`} btnTitle="查看"/>,
|
||||
<Divider type="vertical" className="mx-0" key="div2"/>,
|
||||
<TableBtnWithPermission access="system.organization.team.delete" key="delete" btnType="delete" disabled={!entity.canDelete} tooltip="服务数据清除后,方可删除" onClick={()=>{openModal('delete',entity)}} btnTitle="删除"/>,
|
||||
],
|
||||
}
|
||||
]
|
||||
|
||||
useEffect(() => {
|
||||
setBreadcrumb([
|
||||
{title: $t('团队')}
|
||||
@@ -173,7 +157,7 @@ const TeamList:FC = ()=>{
|
||||
id="global_team"
|
||||
className="pl-btnbase"
|
||||
ref={pageListRef}
|
||||
columns = {[...columns,...operation]}
|
||||
columns = {[...columns]}
|
||||
request = {()=>getTeamList()}
|
||||
showPagination={false}
|
||||
addNewBtnTitle={$t('添加团队')}
|
||||
@@ -207,7 +191,7 @@ const TeamList:FC = ()=>{
|
||||
}
|
||||
return res})}
|
||||
>
|
||||
<TeamConfig ref={teamConfigRef} inModal entity={modalType === 'add' ? undefined : curTeam} />
|
||||
<TeamConfig ref={teamConfigRef} entity={modalType === 'add' ? undefined : curTeam} />
|
||||
</Modal>
|
||||
</InsidePage>
|
||||
)
|
||||
|
||||
@@ -231,9 +231,9 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`h-full overflow-hidden pb-btnybase flex flex-col bg-[#fff]`}>
|
||||
<div className={`h-full overflow-hidden pb-btnybase flex flex-col bg-[#fff] `}>
|
||||
<ScrollableSection>
|
||||
<div className="flex items-center flex-wrap pb-[10px] px-btnbase content-before bg-MAIN_BG">
|
||||
<div className="flex items-center flex-wrap pb-[10px] px-btnbase content-before bg-MAIN_BG pr-PAGE_INSIDE_X ">
|
||||
<TimeRangeSelector
|
||||
labelSize="small"
|
||||
initialTimeButton={timeButton}
|
||||
@@ -247,7 +247,7 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => {
|
||||
</div>
|
||||
<Spin wrapperClassName={`flex-1 ${totalEmpty ?'':'overflow-auto'}`} indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={queryBtnLoading}>
|
||||
{totalEmpty ?<Empty className="mt-[100px]" image={Empty.PRESENTED_IMAGE_SIMPLE} />:
|
||||
<div className=" h-full scroll-area">
|
||||
<div className=" h-full scroll-area pr-PAGE_INSIDE_X ">
|
||||
{/* 图表区域 */}
|
||||
<div className=" px-btnbase mt-[12px] mb-[16px] grid gap-[20px]" style={{ gridTemplateColumns: 'repeat(auto-fill, minmax(570px, 1fr))'}}>
|
||||
{/* 请求统计饼图 */}
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function Dashboard(){
|
||||
|
||||
return (
|
||||
<>
|
||||
<Spin wrapperClassName="h-full w-full pr-PAGE_INSIDE_X pb-PAGE_INSIDE_B " indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
|
||||
<Spin wrapperClassName="h-full w-full pb-PAGE_INSIDE_B " indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
|
||||
{
|
||||
!loading && <>
|
||||
{
|
||||
|
||||
@@ -76,9 +76,10 @@ const getServiceList = ()=>{
|
||||
|
||||
|
||||
const getTeamsList = ()=>{
|
||||
console.log('GetTeamList', accessInit,getGlobalAccessData)
|
||||
if(!accessInit){
|
||||
getGlobalAccessData()?.then?.(()=>{getTeamsList()})
|
||||
setTimeout(()=>{
|
||||
getGlobalAccessData()?.then?.(()=>{getTeamsList()})
|
||||
},200)
|
||||
return
|
||||
}
|
||||
setPageLoading(true)
|
||||
|
||||
Reference in New Issue
Block a user