提交 388ebda9 作者: ZhangLingKun

Merge branch 'develop'

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