From 5cfe6db94c1449810a44660b299dba8e7e98e5c5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 10 六月 2021 14:43:39 +0800
Subject: [PATCH] 2021-06-10

---
 src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx |   43 ++++++++++++++++++++++++++++++-------------
 1 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx b/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx
index 8bf7a82..ed60f8b 100644
--- a/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx
+++ b/src/mob/components/navbar/normal-navbar/menusetting/menuform/index.jsx
@@ -2,13 +2,16 @@
 import PropTypes from 'prop-types'
 import { Form, Row, Col, Input, Radio, Tooltip, Icon, Select } from 'antd'
 
+import asyncComponent from '@/utils/asyncComponent'
 import './index.scss'
 
 const { TextArea } = Input
+const MkIcon = asyncComponent(() => import('@/components/mkIcon'))
 
 class SettingForm extends Component {
   static propTpyes = {
-    menu: PropTypes.object,    // 鍗$墖琛屼俊鎭�
+    menu: PropTypes.object,      // 鑿滃崟淇℃伅
+    cols: PropTypes.array,       // 瀛楁闆�
     inputSubmit: PropTypes.func  // 鍥炶溅浜嬩欢
   }
 
@@ -69,7 +72,7 @@
   }
 
   render() {
-    const { menu } = this.props
+    const { menu, cols } = this.props
     const { getFieldDecorator } = this.props.form
     const { property, appMenus } = this.state
 
@@ -87,7 +90,7 @@
     return (
       <Form {...formItemLayout}>
         <Row gutter={24}>
-          <Col span={22}>
+          <Col span={12}>
             <Form.Item label="鑿滃崟鍚嶇О">
               {getFieldDecorator('name', {
                 initialValue: menu.name,
@@ -100,7 +103,7 @@
               })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
             </Form.Item>
           </Col>
-          <Col span={22}>
+          <Col span={12}>
             <Form.Item label="鑿滃崟鍙傛暟">
               {getFieldDecorator('MenuNo', {
                 initialValue: menu.MenuNo || '',
@@ -113,23 +116,37 @@
               })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
             </Form.Item>
           </Col>
-          <Col span={22}>
+          <Col span={12}>
             <Form.Item label="鍥炬爣">
               {getFieldDecorator('icon', {
                 initialValue: menu.icon || ''
               })(
-                <Select>
-                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
+                <MkIcon allowClear />
+              )}
+            </Form.Item>
+          </Col>
+          <Col span={12}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="缁戝畾鎻愮ず瀛楁鍚庯紝浼氬湪鑿滃崟鍙充笂瑙掓樉绀烘彁绀轰俊鎭�傛敞锛氬湪娣诲姞鍥炬爣鏃舵湁鏁堛��">
+                <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>
+                鎻愮ず
+              </Tooltip>
+            }>
+              {getFieldDecorator('tip', {
+                initialValue: menu.tip || ''
+              })(
+                <Select allowClear>
+                  {cols.map(item => <Select.Option key={item.uuid} value={item.field}>{item.label}</Select.Option>)}
                 </Select>
               )}
             </Form.Item>
           </Col>
-          <Col span={22}>
+          <Col span={12}>
             <Form.Item label="鑿滃崟灞炴��">
               {getFieldDecorator('property', {
                 initialValue: menu.property || 'menu'
               })(
-                <Radio.Group onChange={this.changeProperty}>
+                <Radio.Group onChange={this.changeProperty} style={{whiteSpace: 'nowrap'}}>
                   <Radio value="menu">鑿滃崟</Radio>
                   <Radio value="link">閾炬帴</Radio>
                   <Radio value="linkmenu">鍏宠仈鑿滃崟</Radio>
@@ -137,7 +154,7 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={22}>
+          <Col span={12}>
             <Form.Item label="闅愯棌">
               {getFieldDecorator('hidden', {
                 initialValue: menu.hidden || 'false'
@@ -149,7 +166,7 @@
               )}
             </Form.Item>
           </Col>
-          {property === 'link' ? <Col span={22}>
+          {property === 'link' ? <Col span={12}>
             <Form.Item label="閾炬帴鍦板潃">
               {getFieldDecorator('link', {
                 initialValue: menu.link || '',
@@ -160,7 +177,7 @@
               })(<TextArea rows={2} />)}
             </Form.Item>
           </Col> : null}
-          {property === 'linkmenu' ? <Col span={22}>
+          {property === 'linkmenu' ? <Col span={12}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="鍏宠仈褰撳墠app涓凡鏈夌殑鑿滃崟銆�">
                 <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>
@@ -180,7 +197,7 @@
               )}
             </Form.Item>
           </Col> : null}
-          {property === 'menu' ? <Col span={22}>
+          {property === 'menu' ? <Col span={12}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="澶嶅埗鑿滃崟浠呭湪褰撳墠鑿滃崟涓嶅瓨鍦ㄦ椂鏈夋晥銆�">
                 <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}}/>

--
Gitblit v1.8.0