feat:角色管理前端增加数据权限配置
This commit is contained in:
@@ -8,7 +8,8 @@
|
|||||||
name,
|
name,
|
||||||
create_time,
|
create_time,
|
||||||
update_time,
|
update_time,
|
||||||
tenant_id
|
tenant_id,
|
||||||
|
data_scope
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="where">
|
<sql id="where">
|
||||||
|
|||||||
@@ -44,6 +44,13 @@
|
|||||||
lay-verify="required" required />
|
lay-verify="required" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">数据权限</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="radio" name="dataScope" value="ALL" title="全部" checked/>
|
||||||
|
<input type="radio" name="dataScope" value="CREATOR" title="本人"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-form-item model-form-footer">
|
<div class="layui-form-item model-form-footer">
|
||||||
<button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
|
<button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
|
||||||
<button class="layui-btn" lay-filter="role-form-submit" lay-submit>保存</button>
|
<button class="layui-btn" lay-filter="role-form-submit" lay-submit>保存</button>
|
||||||
|
|||||||
+16
-1
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
ModalForm,
|
ModalForm,
|
||||||
ProForm,
|
ProForm, ProFormRadio,
|
||||||
ProFormText,
|
ProFormText,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Form } from 'antd';
|
import { Form } from 'antd';
|
||||||
@@ -59,6 +59,21 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
|
|||||||
label="Code"
|
label="Code"
|
||||||
placeholder="输入Code"
|
placeholder="输入Code"
|
||||||
/>
|
/>
|
||||||
|
<ProFormRadio.Group
|
||||||
|
name="dataScope"
|
||||||
|
label="数据权限"
|
||||||
|
width="lg"
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
label: '全部',
|
||||||
|
value: 'ALL',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '本人',
|
||||||
|
value: 'CREATOR',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</ProForm.Group>
|
</ProForm.Group>
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
ProFormText,
|
ProFormText,
|
||||||
ProForm,
|
ProForm,
|
||||||
ProTable,
|
ProTable,
|
||||||
QueryFilter,
|
QueryFilter, ProFormRadio,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Form, Popconfirm, Space, Typography } from 'antd';
|
import { Form, Popconfirm, Space, Typography } from 'antd';
|
||||||
import { Button, message } from 'antd';
|
import { Button, message } from 'antd';
|
||||||
@@ -122,6 +122,11 @@ const TableList: React.FC = () => {
|
|||||||
title: 'CODE',
|
title: 'CODE',
|
||||||
dataIndex: 'code',
|
dataIndex: 'code',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '数据权限',
|
||||||
|
dataIndex: 'dataScope',
|
||||||
|
renderText: (value) => (value === 'ALL' ? '全部' : '本人'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
@@ -230,6 +235,7 @@ const TableList: React.FC = () => {
|
|||||||
width={500}
|
width={500}
|
||||||
visible={createModalVisible}
|
visible={createModalVisible}
|
||||||
onVisibleChange={handleModalVisible}
|
onVisibleChange={handleModalVisible}
|
||||||
|
initialValues={{ dataScope: 'ALL' }}
|
||||||
modalProps={{ destroyOnClose: true }}
|
modalProps={{ destroyOnClose: true }}
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
const success = await handleAdd(values as SYSTEM.Role);
|
const success = await handleAdd(values as SYSTEM.Role);
|
||||||
@@ -266,6 +272,21 @@ const TableList: React.FC = () => {
|
|||||||
label="Code"
|
label="Code"
|
||||||
placeholder="输入Code"
|
placeholder="输入Code"
|
||||||
/>
|
/>
|
||||||
|
<ProFormRadio.Group
|
||||||
|
name="dataScope"
|
||||||
|
label="数据权限"
|
||||||
|
width="lg"
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
label: '全部',
|
||||||
|
value: 'ALL',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '本人',
|
||||||
|
value: 'CREATOR',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</ProForm.Group>
|
</ProForm.Group>
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
<UpdateForm
|
<UpdateForm
|
||||||
|
|||||||
Reference in New Issue
Block a user