1
This commit is contained in:
@@ -99,30 +99,30 @@ const GoodsTableList: React.FC = () => {
|
||||
>
|
||||
编辑
|
||||
</Button>,
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
danger
|
||||
key="api/sys/menu/deleteBatchByIds"
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
title: '删除',
|
||||
content: '确定删除该项吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: async () => {
|
||||
const success = await handleRemoveOne(record);
|
||||
if (success) {
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>,
|
||||
// <Button
|
||||
// type="link"
|
||||
// size="small"
|
||||
// danger
|
||||
// key="api/sys/menu/deleteBatchByIds"
|
||||
// onClick={async () => {
|
||||
// Modal.confirm({
|
||||
// title: '删除',
|
||||
// content: '确定删除该项吗?',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: async () => {
|
||||
// const success = await handleRemoveOne(record);
|
||||
// if (success) {
|
||||
// if (actionRef.current) {
|
||||
// actionRef.current.reload();
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// }}
|
||||
// >
|
||||
// 删除
|
||||
// </Button>,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -106,30 +106,30 @@ const GoodsSetMealTableList: React.FC = () => {
|
||||
>
|
||||
编辑
|
||||
</Button>,
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
danger
|
||||
key="api/sys/menu/deleteBatchByIds"
|
||||
onClick={async () => {
|
||||
Modal.confirm({
|
||||
title: '删除',
|
||||
content: '确定删除该项吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: async () => {
|
||||
const success = await handleRemoveOne(record);
|
||||
if (success) {
|
||||
if (actionRef.current) {
|
||||
actionRef.current.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>,
|
||||
// <Button
|
||||
// type="link"
|
||||
// size="small"
|
||||
// danger
|
||||
// key="api/sys/menu/deleteBatchByIds"
|
||||
// onClick={async () => {
|
||||
// Modal.confirm({
|
||||
// title: '删除',
|
||||
// content: '确定删除该项吗?',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: async () => {
|
||||
// const success = await handleRemoveOne(record);
|
||||
// if (success) {
|
||||
// if (actionRef.current) {
|
||||
// actionRef.current.reload();
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// }}
|
||||
// >
|
||||
// 删除
|
||||
// </Button>,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -31,6 +31,7 @@ const MenuForm: React.FC<MenuFormProps> = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const [menuType, setmenuType] = useState<any>('M');
|
||||
const [isFrame, setIsFrame] = useState<any>('1');
|
||||
const [menuIconName, setMenuIconName] = useState<any>();
|
||||
const [iconSelectorOpen, setIconSelectorOpen] = useState<boolean>(false);
|
||||
|
||||
@@ -40,6 +41,7 @@ const MenuForm: React.FC<MenuFormProps> = (props) => {
|
||||
form.resetFields();
|
||||
setMenuIconName(props.values.icon);
|
||||
setmenuType(props.values.menuType)
|
||||
setmenuType(props.values.isFrame)
|
||||
form.setFieldsValue({
|
||||
id: props.values.id,
|
||||
name: props.values.name,
|
||||
@@ -192,27 +194,28 @@ const MenuForm: React.FC<MenuFormProps> = (props) => {
|
||||
defaultValue: 1
|
||||
}}
|
||||
/>
|
||||
<ProFormRadio.Group
|
||||
{/* <ProFormRadio.Group
|
||||
name="isFrame"
|
||||
valueEnum={{
|
||||
0: '是',
|
||||
1: '否',
|
||||
'0': '是',
|
||||
'1': '否',
|
||||
}}
|
||||
initialValue="1"
|
||||
label={'是否为外链'}
|
||||
colProps={{ md: 12, xl: 12 }}
|
||||
placeholder="请输入是否为外链"
|
||||
hidden={menuType === 'F'}
|
||||
rules={[
|
||||
{
|
||||
required: false,
|
||||
message: <FormattedMessage id="请输入是否为外链!" defaultMessage="请输入是否为外链!" />,
|
||||
message: '请选择是否为外链!',
|
||||
},
|
||||
]}
|
||||
fieldProps={{
|
||||
defaultValue: '1'
|
||||
onChange: (e) => {
|
||||
setIsFrame(e.target.value);
|
||||
},
|
||||
}}
|
||||
/>
|
||||
/> */}
|
||||
<ProFormText
|
||||
name="path"
|
||||
label={'路由地址'}
|
||||
|
||||
@@ -27,7 +27,6 @@ const handleAdd = async (fields: API.System.Menu) => {
|
||||
return true;
|
||||
} catch (error) {
|
||||
hide();
|
||||
message.error('添加失败请重试!');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -46,7 +45,6 @@ const handleUpdate = async (fields: API.System.Menu) => {
|
||||
return true;
|
||||
} catch (error) {
|
||||
hide();
|
||||
message.error('配置失败请重试!');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -62,7 +60,6 @@ const handleRemoveOne = async (selectedRow: API.System.Menu) => {
|
||||
return true;
|
||||
} catch (error) {
|
||||
hide();
|
||||
message.error('删除失败,请重试');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -131,7 +128,7 @@ const MenuTableList: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '菜单状态',
|
||||
dataIndex: 'status',
|
||||
dataIndex: 'statusName',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -135,7 +135,7 @@ const UserTableList: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'sex',
|
||||
dataIndex: 'sexName',
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user