From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 十月 2022 17:57:34 +0800
Subject: [PATCH] 2022-10-17

---
 src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx |   99 +++++++++++++++++++++++++++++--------------------
 1 files changed, 59 insertions(+), 40 deletions(-)

diff --git a/src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx b/src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx
index 9e71f6e..f8ea138 100644
--- a/src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx
+++ b/src/pc/components/navbar/normal-navbar/menusetting/menuform/index.jsx
@@ -1,6 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Tooltip, Icon, Select } from 'antd'
+import { Form, Row, Col, Input, Radio, Tooltip, Select } from 'antd'
+import { QuestionCircleOutlined } from '@ant-design/icons'
 
 import './index.scss'
 
@@ -14,6 +15,7 @@
 
   state = {
     property: this.props.menu.property || 'menu',
+    copyMenu: this.props.menu.copyMenuId || '',
     appMenus: [],
   }
 
@@ -71,7 +73,7 @@
   render() {
     const { menu } = this.props
     const { getFieldDecorator } = this.props.form
-    const { property, appMenus } = this.state
+    const { property, appMenus, copyMenu } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -100,7 +102,7 @@
               })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
             </Form.Item>
           </Col>
-          <Col span={22}>
+          {/* <Col span={22}>
             <Form.Item label="鑿滃崟鍙傛暟">
               {getFieldDecorator('MenuNo', {
                 initialValue: menu.MenuNo || '',
@@ -112,7 +114,7 @@
                 ]
               })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
             </Form.Item>
-          </Col>
+          </Col> */}
           <Col span={22}>
             <Form.Item label="鑿滃崟灞炴��">
               {getFieldDecorator('property', {
@@ -127,6 +129,59 @@
               )}
             </Form.Item>
           </Col>
+          {property === 'linkmenu' ? <Col span={22}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="鍏宠仈褰撳墠app涓凡鏈夌殑鑿滃崟銆�">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鍏宠仈鑿滃崟
+              </Tooltip>
+            }>
+              {getFieldDecorator('linkMenuId', {
+                initialValue: menu.linkMenuId || '',
+                rules: [{
+                  required: true,
+                  message: '璇烽�夋嫨鍏宠仈鑿滃崟!'
+                }]
+              })(
+                <Select>
+                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
+                </Select>
+              )}
+            </Form.Item>
+          </Col> : null}
+          {property === 'menu' ? <Col span={22}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="澶嶅埗鑿滃崟浠呭湪褰撳墠鑿滃崟涓嶅瓨鍦ㄦ椂鏈夋晥銆�">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                澶嶅埗鑿滃崟
+              </Tooltip>
+            }>
+              {getFieldDecorator('copyMenuId', {
+                initialValue: menu.copyMenuId || ''
+              })(
+                <Select allowClear onChange={(val) => this.setState({copyMenu: val})}>
+                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
+                </Select>
+              )}
+            </Form.Item>
+          </Col> : null}
+          {property === 'menu' && copyMenu ? <Col span={12}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="澶嶅埗鑿滃崟鏃讹紝鏄惁娓呯┖鍘熼〉闈腑鐨勫叧鑱旇彍鍗曘��">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                娓呯┖鍏宠仈鑿滃崟
+              </Tooltip>
+            }>
+              {getFieldDecorator('clearMenu', {
+                initialValue: menu.clearMenu || 'true'
+              })(
+                <Radio.Group>
+                  <Radio value="true">鏄�</Radio>
+                  <Radio value="false">鍚�</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col> : null}
           <Col span={22}>
             <Form.Item label="闅愯棌">
               {getFieldDecorator('hidden', {
@@ -160,42 +215,6 @@
                   message: '璇疯緭鍏ラ摼鎺ュ湴鍧�!'
                 }]
               })(<TextArea rows={2} />)}
-            </Form.Item>
-          </Col> : null}
-          {property === 'linkmenu' ? <Col span={22}>
-            <Form.Item label={
-              <Tooltip placement="topLeft" title="鍏宠仈褰撳墠app涓凡鏈夌殑鑿滃崟銆�">
-                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>
-                鍏宠仈鑿滃崟
-              </Tooltip>
-            }>
-              {getFieldDecorator('linkMenuId', {
-                initialValue: menu.linkMenuId || '',
-                rules: [{
-                  required: true,
-                  message: '璇烽�夋嫨鍏宠仈鑿滃崟!'
-                }]
-              })(
-                <Select>
-                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
-                </Select>
-              )}
-            </Form.Item>
-          </Col> : null}
-          {property === 'menu' ? <Col span={22}>
-            <Form.Item label={
-              <Tooltip placement="topLeft" title="澶嶅埗鑿滃崟浠呭湪褰撳墠鑿滃崟涓嶅瓨鍦ㄦ椂鏈夋晥銆�">
-                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>
-                澶嶅埗鑿滃崟
-              </Tooltip>
-            }>
-              {getFieldDecorator('copyMenuId', {
-                initialValue: menu.copyMenuId || ''
-              })(
-                <Select allowClear>
-                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
-                </Select>
-              )}
             </Form.Item>
           </Col> : null}
         </Row>

--
Gitblit v1.8.0