Commit 8008b371 authored by Maofei94's avatar Maofei94

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

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