From 84804b405cb88f659d055b16eb3bd00b813ccb4a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 10 十二月 2020 10:58:38 +0800
Subject: [PATCH] 2020-12-10

---
 src/templates/modalconfig/index.jsx |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx
index 4c04d53..10f9a33 100644
--- a/src/templates/modalconfig/index.jsx
+++ b/src/templates/modalconfig/index.jsx
@@ -20,13 +20,13 @@
 import GroupForm from './groupform'
 import MenuForm from './menuform'
 import asyncComponent from '@/utils/asyncComponent'
-import EditComponent from '@/templates/zshare/editcomponent'
 import { BaseConfig, SearchItems } from './source'
 import './index.scss'
 
 const { Panel } = Collapse
 const { confirm } = Modal
 const CommonDict = localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
+const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
 const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
 const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
 
@@ -360,7 +360,7 @@
       if (_config.groups.length > 0) {
         _config.groups.forEach(group => {
           group.sublist = group.sublist.map(item => {
-            if (item.uuid !== res.uuid && item.field === res.field) {
+            if (item.uuid !== res.uuid && item.field.toLowerCase() === res.field.toLowerCase()) {
               fieldrepet = true
             } else if (item.uuid !== res.uuid && item.label === res.label) {
               labelrepet = true
@@ -375,7 +375,7 @@
         })
       } else {
         _config.fields = _config.fields.map(item => {
-          if (item.uuid !== res.uuid && item.field === res.field) {
+          if (item.uuid !== res.uuid && item.field.toLowerCase() === res.field.toLowerCase()) {
             fieldrepet = true
           } else if (item.uuid !== res.uuid && item.label === res.label) {
             labelrepet = true
@@ -749,7 +749,7 @@
   updateEditConfig = (res) => {
     if (res.type === 'paste') {
       this.setState({
-        config: res.content
+        config: res.config
       })
       this.handleForm(res.newform)
     }
@@ -803,7 +803,7 @@
           <div className="setting">
             <Card title={dict['header.menu.form.configurable']} bordered={false} extra={
               <div>
-                <EditComponent dict={dict} type="form" config={this.state.config} refresh={this.updateEditConfig}/>
+                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={this.updateEditConfig}/>
                 <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button>
                 <Button onClick={this.cancelConfig}>{dict['model.back']}</Button>
               </div>

--
Gitblit v1.8.0