From 389cad1e21348f4f1be4bc00d5fb1670a81f2ed3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 25 三月 2022 10:15:21 +0800
Subject: [PATCH] 2022-03-25

---
 src/mob/components/navbar/normal-navbar/menus/menuform/index.jsx    |   20 +++++++--
 src/menu/components/card/cardsimplecomponent/options.jsx            |    2 +
 src/menu/components/share/actioncomponent/actionform/index.jsx      |   43 +++++++++++++++------
 src/menu/components/share/actioncomponent/formconfig.jsx            |    1 
 src/views/appmanage/submutilform/index.jsx                          |    2 
 src/menu/components/card/cardcomponent/options.jsx                  |    1 
 src/mob/components/menubar/normal-menubar/menucomponent/options.jsx |    2 +
 src/components/normalform/modalform/mkSelect/index.jsx              |   46 ++++++++++++++++-------
 8 files changed, 84 insertions(+), 33 deletions(-)

diff --git a/src/components/normalform/modalform/mkSelect/index.jsx b/src/components/normalform/modalform/mkSelect/index.jsx
index 73c44d9..0c9e069 100644
--- a/src/components/normalform/modalform/mkSelect/index.jsx
+++ b/src/components/normalform/modalform/mkSelect/index.jsx
@@ -106,20 +106,38 @@
     const { value, config, options } = this.state
 
     if (config.type !== 'multiselect') {
-      return (
-        <Select
-          showSearch
-          allowClear
-          value={value}
-          filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
-          onSelect={this.selectChange}
-          onChange={(val) => val === undefined && this.selectChange('')}
-        >
-          {options.map((option, i) =>
-            <Select.Option key={i} disabled={option.disabled} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option>
-          )}
-        </Select>
-      )
+      if (config.extendName) {
+        return (
+          <Select
+            showSearch
+            allowClear
+            value={value}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+              option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onSelect={this.selectChange}
+            onChange={(val) => val === undefined && this.selectChange('')}
+          >
+            {options.map((option, i) =>
+              <Select.Option key={i} disabled={option.disabled} extend={option[config.extendName] || ''} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option>
+            )}
+          </Select>
+        )
+      } else {
+        return (
+          <Select
+            showSearch
+            allowClear
+            value={value}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onSelect={this.selectChange}
+            onChange={(val) => val === undefined && this.selectChange('')}
+          >
+            {options.map((option, i) =>
+              <Select.Option key={i} disabled={option.disabled} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option>
+            )}
+          </Select>
+        )
+      }
     } else {
       return (<Select
         showSearch
diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx
index 0be70fa..1c45644 100644
--- a/src/menu/components/card/cardcomponent/options.jsx
+++ b/src/menu/components/card/cardcomponent/options.jsx
@@ -135,6 +135,7 @@
       label: '鍏宠仈鑿滃崟',
       initval: setting.menu || (appType ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: menulist,
     },
     {
diff --git a/src/menu/components/card/cardsimplecomponent/options.jsx b/src/menu/components/card/cardsimplecomponent/options.jsx
index 6c649dd..28680d5 100644
--- a/src/menu/components/card/cardsimplecomponent/options.jsx
+++ b/src/menu/components/card/cardsimplecomponent/options.jsx
@@ -116,6 +116,7 @@
       label: '鍏宠仈鑿滃崟',
       initval: setting.menu || (appType ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: appType ? appmenulist : menulist,
     },
     {
@@ -219,6 +220,7 @@
       label: '鍏宠仈鑿滃崟',
       initval: setting.menu || (appType ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: appType ? appmenulist : menulist,
     },
     {
diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 3d0d78e..8eaa6b3 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -645,19 +645,36 @@
           { required: item.required, message: dict['form.required.select'] + item.label + '!' }
         ]
 
-        content = <Select
-          showSearch
-          allowClear={item.allowClear === true}
-          filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
-          onChange={(value) => {this.optionChange(item.key, value)}}
-          getPopupContainer={() => document.getElementById('winter')}
-        >
-          {item.options.map((option, index) =>
-            <Select.Option key={index} value={(option.value || option.field)}>
-              {(option.text || option.label)}
-            </Select.Option>
-          )}
-        </Select>
+        if (item.extendName) {
+          content = <Select
+            showSearch
+            allowClear={item.allowClear === true}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+              option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onChange={(value) => {this.optionChange(item.key, value)}}
+            getPopupContainer={() => document.getElementById('winter')}
+          >
+            {item.options.map((option, index) =>
+              <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}>
+                {(option.text || option.label)}
+              </Select.Option>
+            )}
+          </Select>
+        } else {
+          content = <Select
+            showSearch
+            allowClear={item.allowClear === true}
+            filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+            onChange={(value) => {this.optionChange(item.key, value)}}
+            getPopupContainer={() => document.getElementById('winter')}
+          >
+            {item.options.map((option, index) =>
+              <Select.Option key={index} value={(option.value || option.field)}>
+                {(option.text || option.label)}
+              </Select.Option>
+            )}
+          </Select>
+        }
       } else if (item.type === 'radio') {
         rules = [
           { required: item.required, message: dict['form.required.select'] + item.label + '!' }
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 4adfb52..36d5a74 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -284,6 +284,7 @@
       label: '鍏宠仈鑿滃崟',
       initVal: card.linkmenu || (isApp ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: isApp ? appMenus : menulist
     },
     {
diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
index b3d567f..ed3e96c 100644
--- a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
+++ b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
@@ -65,6 +65,7 @@
       tooltip: '澶嶅埗鑿滃崟浠呭湪褰撳墠鑿滃崟鍒涘缓鏃舵湁鏁堛��',
       required: false,
       options: menulist,
+      extendName: 'MenuNo',
       controlFields: [
         {field: 'clearMenu', notNull: true},
       ],
@@ -87,6 +88,7 @@
       label: '鍏宠仈鑿滃崟',
       initval: setting.linkMenuId || '',
       required: true,
+      extendName: 'MenuNo',
       options: [
         ...menulist,
         // {value: 'IM', label: '鍗虫椂閫氫俊锛堢郴缁熼〉锛�'},
diff --git a/src/mob/components/navbar/normal-navbar/menus/menuform/index.jsx b/src/mob/components/navbar/normal-navbar/menus/menuform/index.jsx
index 70e6d2f..8efdcec 100644
--- a/src/mob/components/navbar/normal-navbar/menus/menuform/index.jsx
+++ b/src/mob/components/navbar/normal-navbar/menus/menuform/index.jsx
@@ -193,10 +193,14 @@
                   message: '璇烽�夋嫨鍏宠仈鑿滃崟!'
                 }]
               })(
-                <Select>
-                  {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))}
+                <Select
+                  showSearch
+                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+                    option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                >
+                  {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))}
                   {/* <Select.Option key="IM" value="IM">鍗虫椂閫氫俊锛堢郴缁熼〉锛�</Select.Option> */}
-                  <Select.Option key="AIService" value="AIService">鏅鸿兘瀹㈡湇锛堢郴缁熼〉锛�</Select.Option>
+                  <Select.Option key="AIService" extend={''} value="AIService">鏅鸿兘瀹㈡湇锛堢郴缁熼〉锛�</Select.Option>
                 </Select>
               )}
             </Form.Item>
@@ -211,8 +215,14 @@
               {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
+                  allowClear
+                  showSearch
+                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+                    option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0}
+                  onChange={(val) => this.setState({copyMenu: val})}
+                >
+                  {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))}
                 </Select>
               )}
             </Form.Item>
diff --git a/src/views/appmanage/submutilform/index.jsx b/src/views/appmanage/submutilform/index.jsx
index bc52f1f..ef32089 100644
--- a/src/views/appmanage/submutilform/index.jsx
+++ b/src/views/appmanage/submutilform/index.jsx
@@ -247,7 +247,7 @@
           </Col> : null} */}
           {typename !== 'pc' && adapters.includes('app') ? <Col span={12}>
             <Form.Item label={
-              <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝椤甸潰鐨勫垏鎹㈡ā寮�">
+              <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄦ槑绉戜簯APP鏃讹紝椤甸潰鐨勫垏鎹㈡ā寮忋�傛敞锛氳嫻鏋淎PP鏆備笉鏀寔H5妯″紡銆�">
                 <QuestionCircleOutlined className="mk-form-tip" />
                 搴旂敤妯″紡
               </Tooltip>

--
Gitblit v1.8.0