Browse Source

管理员只能添加普通账号

fanmiyou
nili 9 months ago
parent
commit
c430459158
  1. 2
      dist/index.html
  2. 1
      dist/p__AdminManagement.3d8845fe.async.js
  3. 1
      dist/p__AdminManagement.c8a5c155.async.js
  4. 4
      dist/umi.48417f56.js
  5. 5
      src/pages/AdminManagement.tsx

2
dist/index.html

@ -9,6 +9,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.679c5b41.js"></script>
<script src="/umi.48417f56.js"></script>
</body></html>

1
dist/p__AdminManagement.3d8845fe.async.js

File diff suppressed because one or more lines are too long

1
dist/p__AdminManagement.c8a5c155.async.js

File diff suppressed because one or more lines are too long

4
dist/umi.679c5b41.js → dist/umi.48417f56.js

File diff suppressed because one or more lines are too long

5
src/pages/AdminManagement.tsx

@ -1,3 +1,4 @@
import { useModel } from '@umijs/max';
import { Button, Form, Input, Modal, Select, Table, Tag } from 'antd';
import { ColumnsType } from 'antd/es/table';
import React, { useEffect, useState } from 'react';
@ -9,6 +10,8 @@ const AdminManagement = () => {
const [visible, setVisible] = useState(false);
const [form] = Form.useForm();
const [appArr, setAppArr] = useState<API.MatrixApp[]>([]);
const { initialState } = useModel('@@initialState');
const currentUser = initialState?.currentUser;
const getAppNameById = (appId:number) => {
const app = appArr.find(app => app.id === appId);
@ -144,7 +147,7 @@ const AdminManagement = () => {
</Form.Item>
<Form.Item label="角色" name="role">
<Select>
<Select.Option value={2}></Select.Option>
<Select.Option disabled={currentUser?.role && currentUser.role > 1} value={2}></Select.Option>
<Select.Option value={3}></Select.Option>
</Select>
</Form.Item>

Loading…
Cancel
Save