king
2020-12-10 84804b405cb88f659d055b16eb3bd00b813ccb4a
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>