From 46f79b491173d284a4900d19e7aecf7509481438 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 一月 2022 17:21:25 +0800
Subject: [PATCH] 2022-01-21

---
 src/mob/searchconfig/index.jsx |   33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx
index 2ad5662..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)
     })
   }
 
@@ -406,7 +420,7 @@
     let _g = {
       uuid: Utils.getuuid(),
       wrap: { name: 'name', icon: '' },
-      setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden' },
+      setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden', backgroundColor: sessionStorage.getItem('sysBgColor') },
       fields: []
     }
 
@@ -495,16 +509,17 @@
           </div>
           <div className="setting">
             <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}>
-              <div className="mob-shell-inner">
-                <Icon className="setting-group" onClick={this.changeSetting} type="setting" />
+              <div className="mob-shell-inner" style={{backgroundColor: group.setting.backgroundColor || '#ffffff'}}>
+                <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