Commit 8008b371 authored by Maofei94's avatar Maofei94

perf: web菜单配置增加隐藏字段

parent a01b8a62
Pipeline #23123 skipped with stages
import React from 'react';
import { Form, Input, Button, Select } from 'antd';
import { Form, Input, Button, Select, Radio } from 'antd';
import styles from './addForm.less';
import PicturesWall from '@/components/Upload/index';
import EditeConfigWrapper from './editConfigFileWrapper';
......@@ -15,7 +15,6 @@ const AddForm = props => {
configFiles,
productList,
} = props;
console.log(productList);
const [form] = Form.useForm();
const [otherForm] = Form.useForm();
const layout = {
......@@ -85,6 +84,12 @@ const AddForm = props => {
>
<PicturesWall picType="menuNew" />
</Item>
<Item label="菜单隐藏" name="hideInMenu" initialValue={false}>
<Radio.Group>
<Radio value></Radio>
<Radio value={false}></Radio>
</Radio.Group>
</Item>
<Item
label="功能路径"
name="pageUrl"
......
import React, { useState, useEffect } from 'react';
import { Form, Input, Button, Row, Col, Select } from 'antd';
import { Form, Input, Button, Row, Col, Select, Radio } from 'antd';
import styles from './addForm.less';
import PicturesWall from '@/components/Upload/index';
import EditeConfigWrapper from './editConfigFileWrapper';
......@@ -44,9 +44,10 @@ const EditForm = props => {
submitCallback(obj);
};
const onFinish = () => {
const onFinish = val => {
submit();
};
const radioChange = e => {};
return (
<div style={{ marginTop: '10px' }}>
{nodeType === 1 && (
......@@ -95,6 +96,12 @@ const EditForm = props => {
>
<PicturesWall picType="menuNew" />
</Item>
<Item label="菜单隐藏" name="hideInMenu" initialValue={false}>
<Radio.Group onChange={radioChange}>
<Radio value></Radio>
<Radio value={false}></Radio>
</Radio.Group>
</Item>
<Item
label="功能路径"
name="pageUrl"
......
......@@ -76,7 +76,6 @@ const MiniMenu = props => {
getWebModuleTree(userMode || 'super')
.then(res => {
setLoading(false);
console.log(res);
const { code, data } = res;
if (code === 0) {
let arr = data
......@@ -87,7 +86,6 @@ const MiniMenu = props => {
arr[0].children.find(item => item.text === '菜单管理').children ||
[];
setMenuList(arr2 || []);
console.log(arr, webid, arr2);
}
})
.catch(err => {
......@@ -98,7 +96,6 @@ const MiniMenu = props => {
};
}, [flag, webid]);
useEffect(() => {
console.log(menu, 'menu');
setNewTreeList(menuList || []);
}, [menuList]);
......@@ -392,7 +389,6 @@ const MiniMenu = props => {
_version: 9999,
_dc: Date.now(),
}).then(res => {
console.log(res);
if (res.success) {
// updateMenuTree();
setFlag(flag + 1);
......
......@@ -35,7 +35,6 @@ const ProductConfig = props => {
const {
data: { AllProducts, UserProducts },
} = res;
console.log(AllProducts, UserProducts);
setProductList(AllProducts);
setUserProductsList(UserProducts);
// if (!productObj && data.length > 0) {
......@@ -115,7 +114,6 @@ const ProductConfig = props => {
setLoading(true);
modifyProduct({ ...item })
.then(res => {
console.log(res);
setLoading(false);
if (res.code === 0) {
notification.success({
......@@ -141,12 +139,10 @@ const ProductConfig = props => {
let obj = userlist.find(i => i.PackageName === item.PackageName);
handleDel(obj);
}
console.log(e, item);
};
const handleClickItem = value => {
if (userProductsList.length > 0) {
let obj = userProductsList.find(i => i.PackageName === value.PackageName);
console.log(obj);
if (obj) {
setProductObt(obj);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment