提交 ff8cb4d0 作者: ZhangLingKun

优化:培训详情问题修复

上级 7ada02a8
流水线 #7113 已通过 于阶段
in 1 分 10 秒
......@@ -13,6 +13,7 @@ import {
listOrgPageType,
} from '~/api/interface/pilotTrainType';
import { filterObjAttr } from '~/utils';
import { useSelector } from 'react-redux';
//机构列表返回类型
type institutionListType = InterDataType<listOrgPageType>['list'];
......@@ -27,6 +28,7 @@ type listOrgPageParametersType = InterReqType<listOrgPageType>;
const InstitutionsList = () => {
const navigate = useNavigate();
const { userInfo } = useSelector((state: any) => state.UserInfo);
//机型下拉列表
const [modelsList, setModelsList] = useState<modelsListType>([]);
//等级下拉列表
......@@ -107,7 +109,12 @@ const InstitutionsList = () => {
<Button type='link' onClick={() => editInstitutionsClick(record)}>
编辑
</Button>
<Button type='link' danger onClick={() => deleteInstitutionsClick(record)}>
<Button
type='link'
danger
onClick={() => deleteInstitutionsClick(record)}
disabled={!!userInfo.roleInfo.superAdmin}
>
删除
</Button>
</>
......@@ -151,7 +158,7 @@ const InstitutionsList = () => {
onOk: () => {
PilotTrainAPI.removeOrg({ id: record.id }).then(({ code }) => {
if (code === '200') {
message.success('删除成功');
message.success('删除成功').then();
if (pagination.pageNo !== 1 && tableData.length === 1) {
pagination.pageNo -= 1;
}
......@@ -207,7 +214,12 @@ const InstitutionsList = () => {
<SearchBox
search={search}
child={
<Button icon={<PlusOutlined />} type='primary' onClick={toAddInstitutions}>
<Button
icon={<PlusOutlined />}
type='primary'
onClick={toAddInstitutions}
disabled={false}
>
新增
</Button>
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论