From 09e0de52a398dd08a0dc3f4b43e4589d211e9c27 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 30 十二月 2021 12:44:45 +0800
Subject: [PATCH] 2021-12-30

---
 src/mob/searchconfig/index.jsx |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx
index 5e1e966..127b319 100644
--- a/src/mob/searchconfig/index.jsx
+++ b/src/mob/searchconfig/index.jsx
@@ -4,7 +4,8 @@
 import { DndProvider } from 'react-dnd'
 import HTML5Backend from 'react-dnd-html5-backend'
 import moment from 'moment'
-import { Button, Modal, Collapse, notification, Switch, Icon } from 'antd'
+import { Button, Modal, Collapse, notification, Switch } from 'antd'
+import { SettingOutlined, LeftOutlined, SearchOutlined, PlusOutlined } from '@ant-design/icons'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -143,12 +144,25 @@
    * @description 琛ㄥ崟缂栬緫
    */
   handleForm = (_card) => {
+    const { group } = this.state
     let card = fromJS(_card).toJS()
+    let linkableFields = []
+
+    group.fields.forEach(item => {
+      if (item.uuid === card.uuid) return
+      if (!['select', 'link', 'checkcard'].includes(item.type)) return
+      if (item.type === 'checkcard' && item.multiple === 'true') return
+      
+      linkableFields.push({
+        value: item.field,
+        text: item.label
+      })
+    })
 
     this.setState({
       visible: true,
       card: card,
-      formlist: getSearchForm(card, [])
+      formlist: getSearchForm(card, linkableFields)
     })
   }
 
@@ -496,16 +510,16 @@
           <div className="setting">
             <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
               <div className="mob-shell-inner" style={{backgroundColor: group.setting.backgroundColor || '#ffffff'}}>
-                <Icon className="setting-group" onClick={this.changeSetting} type="setting" />
+                <SettingOutlined className="setting-group" onClick={this.changeSetting}/>
                 {group.setting.type === 'title' ? <div className="am-navbar">
-                  <Icon type="left" />
+                  <LeftOutlined />
                   <div className="am-navbar-title">{group.setting.title}</div>
                 </div> : <div className="am-navbar">
-                  {/* <Icon type="left" /> */}
-                  <div className="search-bar"><Icon type="search" /></div>
+                  {/* <LeftOutlined /> */}
+                  <div className="search-bar"><SearchOutlined /></div>
                   <Button >鍙栨秷</Button>
                 </div>}
-                {group.floor === 1 ? <Icon className="plus-group" type="plus" onClick={this.plusGroup} /> : null}
+                {group.floor === 1 ? <PlusOutlined className="plus-group" onClick={this.plusGroup} /> : null}
                 <div style={{minHeight: 'calc(100% - 100px)'}}>
                   {group.floor === 1 && group.groups.length > 0 ? <GDragElement
                     list={group.groups}

--
Gitblit v1.8.0