king
2021-09-27 54d01e6ef9ac31f10de4a0e92824eba50b77eda6
2021-09-27
27个文件已修改
2个文件已添加
940 ■■■■ 已修改文件
src/menu/components/form/normal-form/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulesource/option.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/advanceform/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/mkInput/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/mkInput/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/calendarconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/index.jsx 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/editcard/index.scss 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/index.jsx 320 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editcomponent/index.jsx 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.jsx
@@ -504,13 +504,10 @@
    this.formRef.handleConfirm().then(res => {
      let _config = fromJS(this.state.group).toJS()
      let fieldrepet = false // 字段重复
      let labelrepet = false // 提示文字重复
      _config.fields = _config.fields.map(item => {
        if (item.uuid !== res.uuid && res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
          fieldrepet = true
        } else if (res.label && item.uuid !== res.uuid && item.label === res.label) {
          labelrepet = true
        }
        if (item.uuid === res.uuid) {
@@ -524,13 +521,6 @@
        notification.warning({
          top: 92,
          message: '字段已存在!',
          duration: 10
        })
        return
      } else if (labelrepet) {
        notification.warning({
          top: 92,
          message: '名称已存在!',
          duration: 10
        })
        return
@@ -586,13 +576,10 @@
  pasteForm = (res) => {
    let _config = fromJS(this.state.group).toJS()
    let fieldrepet = false // 字段重复
    let labelrepet = false // 提示文字重复
    _config.fields.forEach(item => {
      if (res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
        fieldrepet = true
      } else if (res.label && item.label === res.label) {
        labelrepet = true
      }
    })
@@ -600,13 +587,6 @@
      notification.warning({
        top: 92,
        message: '字段已存在!',
        duration: 10
      })
      return
    } else if (labelrepet) {
      notification.warning({
        top: 92,
        message: '名称已存在!',
        duration: 10
      })
      return
src/menu/components/form/tab-form/index.jsx
@@ -496,13 +496,10 @@
    this.formRef.handleConfirm().then(res => {
      let _config = fromJS(this.state.group).toJS()
      let fieldrepet = false // 字段重复
      let labelrepet = false // 提示文字重复
      _config.fields = _config.fields.map(item => {
        if (item.uuid !== res.uuid && res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
          fieldrepet = true
        } else if (res.label && item.uuid !== res.uuid && item.label === res.label) {
          labelrepet = true
        }
        if (item.uuid === res.uuid) {
@@ -516,13 +513,6 @@
        notification.warning({
          top: 92,
          message: '字段已存在!',
          duration: 10
        })
        return
      } else if (labelrepet) {
        notification.warning({
          top: 92,
          message: '名称已存在!',
          duration: 10
        })
        return
@@ -578,13 +568,10 @@
  pasteForm = (res) => {
    let _config = fromJS(this.state.group).toJS()
    let fieldrepet = false // 字段重复
    let labelrepet = false // 提示文字重复
    _config.fields.forEach(item => {
      if (res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
        fieldrepet = true
      } else if (res.label && item.label === res.label) {
        labelrepet = true
      }
    })
@@ -592,13 +579,6 @@
      notification.warning({
        top: 92,
        message: '字段已存在!',
        duration: 10
      })
      return
    } else if (labelrepet) {
      notification.warning({
        top: 92,
        message: '名称已存在!',
        duration: 10
      })
      return
src/menu/components/search/main-search/index.jsx
@@ -76,6 +76,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('plusSearch', this.plusSearch)
  }
  /**
@@ -86,6 +87,7 @@
      return
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('plusSearch', this.plusSearch)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -365,10 +367,28 @@
    })
  }
  updatefields = (config) => {
    this.setState({card: config}, ()=> {
      this.props.updateConfig(config)
    })
  plusSearch = (MenuId, item, type) => {
    const { card } = this.state
    if (MenuId !== card.uuid) return
    let _card = fromJS(card).toJS()
    if (type === 'simple') {
      _card.search.push(item)
      this.setState({
        card: _card,
      }, () => {
        this.props.updateConfig(_card)
      })
    } else if (type === 'multil') {
      _card.search.push(...item)
      this.setState({
        card: _card,
      }, () => {
        this.props.updateConfig(_card)
      })
    }
  }
  getWrapForms = () => {
@@ -394,7 +414,7 @@
    return (
      <div className={`main-search-edit-list ${card.wrap.float} ${card.wrap.show || ''}`} onClick={this.clickComponent} id={card.uuid} style={_style}>
        <FieldsComponent config={card} type="search" updatefield={this.updatefields} />
        <FieldsComponent config={card} type="search" />
        <Switch checkedChildren={dict['model.switch.open']} size="small" unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} />
        <DragElement
          list={card.search}
src/menu/modalconfig/index.jsx
@@ -191,13 +191,10 @@
    this.formRef.handleConfirm().then(res => {
      let _config = fromJS(this.state.config).toJS()
      let fieldrepet = false // 字段重复
      let labelrepet = false // 提示文字重复
      _config.fields = _config.fields.map(item => {
        if (item.uuid !== res.uuid && res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
          fieldrepet = true
        } else if (res.label && item.uuid !== res.uuid && item.label === res.label) {
          labelrepet = true
        }
        if (item.uuid === res.uuid) {
@@ -211,13 +208,6 @@
        notification.warning({
          top: 92,
          message: '字段已存在!',
          duration: 10
        })
        return
      } else if (labelrepet) {
        notification.warning({
          top: 92,
          message: '名称已存在!',
          duration: 10
        })
        return
@@ -422,6 +412,24 @@
    })
  }
  plusFields = (items) => {
    let _config = fromJS(this.state.config).toJS()
    if (_config.fields[0] && _config.fields[0].origin) {
      _config.fields = _config.fields.filter(item => !item.origin)
    }
    _config.fields.push(...items)
    this.setState({
      config: _config
    }, () => {
      if (items.length === 1 && items[0].focus) {
        this.handleForm(items[0])
      }
    })
  }
  render () {
    const { config, dict, saving } = this.state
@@ -436,11 +444,7 @@
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
                <FieldsComponent
                  config={config}
                  type="form"
                  updatefield={this.updateConfig}
                />
                <FieldsComponent config={config} type="form" plusFields={this.plusFields}/>
              </Panel>
            </Collapse>
          </div>
@@ -448,7 +452,7 @@
            <Card title={dict['header.menu.form.configurable']} bordered={false} extra={
              <div>
                <Button type="danger" onClick={this.clearConfig}>清空</Button>
                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={(res) => this.updateConfig(res.config)}/>
                <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/>
                <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button>
                <Button onClick={this.cancelConfig}>返回</Button>
              </div>
src/menu/modulesource/option.jsx
@@ -36,6 +36,7 @@
  { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 },
  // { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格(卡片)', width: 12 },
  { type: 'menu', url: tree, component: 'tree', subtype: 'normaltree', title: '树形列表', width: 12 },
  { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 },
src/mob/modalconfig/index.jsx
@@ -91,8 +91,6 @@
    let _config = fromJS(this.state.config).toJS()
    if (list.length > _config.fields.length) {
      _config.fields = list.filter(item => !item.origin)
      this.setState({
        config: _config
      }, () => {
@@ -195,13 +193,10 @@
    this.formRef.handleConfirm().then(res => {
      let _config = fromJS(this.state.config).toJS()
      let fieldrepet = false // 字段重复
      let labelrepet = false // 提示文字重复
      _config.fields = _config.fields.map(item => {
        if (item.uuid !== res.uuid && res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
          fieldrepet = true
        } else if (res.label && item.uuid !== res.uuid && item.label === res.label) {
          labelrepet = true
        }
        if (item.uuid === res.uuid) {
@@ -218,16 +213,7 @@
          duration: 10
        })
        return
      } else if (labelrepet) {
        notification.warning({
          top: 92,
          message: '名称已存在!',
          duration: 10
        })
        return
      }
      _config.fields = _config.fields.filter(item => !item.origin)
      if (['select', 'multiselect', 'link', 'checkbox', 'radio', 'checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) {
        this.setState({
@@ -369,9 +355,17 @@
  /**
   * @description 更新
   */
  updateConfig = (config) => {
  plusFields = (items) => {
    let _config = fromJS(this.state.config).toJS()
    _config.fields.push(...items)
    this.setState({
      config
      config: _config
    }, () => {
      if (items.length === 1 && items[0].focus) {
        this.handleForm(items[0])
      }
    })
  }
@@ -397,11 +391,7 @@
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
                <FieldsComponent
                  config={config}
                  type="form"
                  updatefield={this.updateConfig}
                />
                <FieldsComponent config={config} type="form" plusFields={this.plusFields}/>
              </Panel>
            </Collapse>
          </div>
src/tabviews/zshare/topSearch/advanceform/index.jsx
@@ -6,7 +6,6 @@
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { Search } = Input
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard'))
const MKSelect = asyncComponent(() => import('../mkSelect'))
const MKDatePicker = asyncComponent(() => import('../mkDatePicker'))
@@ -42,11 +41,7 @@
      item.initval = record[item.field] || ''
      if (item.type === 'text') {
        if (item.inputType === 'search') {
          content = <Search allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/>
        } else {
          content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} />
        }
        content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} />
      } else if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') {
        content = (<MKSelect config={item}/>)
      } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') {
src/tabviews/zshare/topSearch/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Button, notification, Modal, Icon } from 'antd'
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Button, notification, Modal, Icon } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -11,9 +11,8 @@
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import MKInput from './mkInput'
import './index.scss'
const { Search } = Input
const MutilForm = asyncSpinComponent(() => import('./advanceform'))
const MKCheckCard = asyncComponent(() => import('@/tabviews/zshare/mutilform/checkCard'))
@@ -201,6 +200,10 @@
        this.improveSearch(mainItems, localItems)
      }
    })
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  // 查询下拉菜单
@@ -446,15 +449,12 @@
      ]
      let content = null
      let className = ''
      let field = item.field
      lastRadio = item.ratio || 6
      if (item.type === 'text') {
        if (item.inputType === 'search') {
          content = <Search allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/>
        } else {
          content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} />
        }
        content = (<MKInput config={item} onInputSubmit={this.handleSubmit} />)
      } else if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') {
        content = (<MKSelect config={item} onChange={(val, defer) => this.recordChange(val, defer, item)} />)
      } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') {
@@ -463,13 +463,14 @@
        field = item.datefield
        content = <DateGroup position={index} config={item} onChange={(val, type) => this.dateGroupChange(val, type, item)} />
      } else if (item.type === 'checkcard') {
        className = 'checkcard'
        content = <MKCheckCard card={item} onChange={this.handleSubmit} />
      }
      if (content) {
        fields.push(
          <Col span={item.ratio || 6} key={index}>
            <Form.Item label={item.labelShow !== 'false' ? item.label : ''}>
            <Form.Item className={className} label={item.labelShow !== 'false' ? item.label : ''}>
              {getFieldDecorator(field, {
                initialValue: item.initval,
                rules: _rules
src/tabviews/zshare/topSearch/index.scss
@@ -8,6 +8,11 @@
      white-space: nowrap;
    }
  }
  .ant-form-item.checkcard {
    .ant-form-item-control {
      line-height: 1;
    }
  }
  .ant-form-item-control-wrapper {
    flex: 1;
    width: calc(100% - 100px);
@@ -86,6 +91,9 @@
      opacity: 0;
    }
  }
  .check-card-search-box {
    margin-top: 3px;
  }
}
.top-search.right {
  >.ant-row {
src/tabviews/zshare/topSearch/mkInput/index.jsx
New file
@@ -0,0 +1,18 @@
import React, {Component} from 'react'
import { Input } from 'antd'
const { Search } = Input
class MKSearchInput extends Component {
  render() {
    const { config, onChange, onInputSubmit } = this.props
    if (config.inputType === 'search') {
      return <Search defaultValue={config.initval} allowClear placeholder={config.labelShow === 'false' ? config.label : ''} autoComplete="off" onChange={onChange} onSearch={onInputSubmit} enterButton/>
    } else {
      return <Input defaultValue={config.initval} allowClear placeholder={config.labelShow === 'false' ? config.label : ''} autoComplete="off" onChange={onChange} onPressEnter={onInputSubmit} />
    }
  }
}
export default MKSearchInput
src/tabviews/zshare/topSearch/mkInput/index.scss
src/templates/calendarconfig/index.jsx
@@ -755,11 +755,7 @@
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
                <FieldsComponent
                  config={config}
                  type="search"
                  updatefield={this.updateconfig}
                />
                <FieldsComponent config={config} type="search" />
              </Panel>
            </Collapse>
          </div>
@@ -771,7 +767,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <EditComponent dict={this.state.dict} options={['search']} config={this.state.config} refresh={this.updateConfig}/>
                <EditComponent dict={this.state.dict} options={['search']} config={this.state.config}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
src/templates/comtableconfig/index.jsx
@@ -91,6 +91,7 @@
    _config.MenuNo = menu.MenuNo || ''
    _config.OpenType = menu.PageParam ? menu.PageParam.OpenType : ''
    _config.easyCode = _config.easyCode || ''
    _config.uuid = menu.MenuID || ''
    // 版本兼容
    _config = updateCommonTable(_config)
@@ -1034,14 +1035,10 @@
   * @description 编辑功能完成更新,包括解冻按钮、粘贴、替换等
   */
  editConfig = (res) => {
    if (res.type === 'thaw') {
      this.setState({
        thawButtons: res.thawButtons,
        config: res.config
      })
    } else if (res.type === 'paste') {
      this.setState({config: res.config})
    }
    this.setState({
      thawButtons: res.thawButtons,
      config: res.config
    })
  }
  /**
@@ -1190,11 +1187,7 @@
                <div className="search-element">
                  {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                <FieldsComponent
                  config={config}
                  type="search"
                  updatefield={this.updateconfig}
                />
                <FieldsComponent config={config} type="search" />
              </Panel>
              {/* 按钮添加 */}
              <Panel header={this.state.dict['header.menu.action']} key="2">
@@ -1229,11 +1222,7 @@
                <div className="search-element">
                  {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))}
                </div>
                <FieldsComponent
                  config={config}
                  type="columns"
                  updatefield={this.updateconfig}
                />
                <FieldsComponent config={config} type="columns"/>
              </Panel>
              {/* 添加标签 */}
              <Panel header={this.state.dict['header.menu.tab']} key="4">
src/templates/formtabconfig/index.jsx
@@ -537,7 +537,6 @@
        let _groups = null
        let fieldrepet = false  // 字段重复
        let labelrepeat = false // 提示文字重复
        if (card.iscopy) {
          _groups = _config.groups.map(group => {
@@ -549,8 +548,6 @@
              if (item.uuid !== res.uuid && item.field === res.field) {
                fieldrepet = true
              } else if (item.uuid !== res.uuid && item.label === res.label) {
                labelrepeat = true
              }
            })
@@ -568,8 +565,6 @@
            group.sublist = group.sublist.map(item => {
              if (item.uuid !== res.uuid && item.field === res.field) {
                fieldrepet = true
              } else if (item.uuid !== res.uuid && item.label === res.label) {
                labelrepeat = true
              }
              if (item.uuid === res.uuid) {
@@ -589,13 +584,6 @@
          notification.warning({
            top: 92,
            message: '字段已存在!',
            duration: 5
          })
          return
        } else if (labelrepeat) {
          notification.warning({
            top: 92,
            message: '名称已存在!',
            duration: 5
          })
          return
src/templates/modalconfig/index.jsx
@@ -297,13 +297,10 @@
    this.formRef.handleConfirm().then(res => {
      let _config = fromJS(this.state.config).toJS()
      let fieldrepet = false // 字段重复
      let labelrepet = false // 提示文字重复
      _config.fields = _config.fields.map(item => {
        if (item.uuid !== res.uuid && res.field && item.field && item.field.toLowerCase() === res.field.toLowerCase()) {
          fieldrepet = true
        } else if (res.label && item.uuid !== res.uuid && item.label === res.label) {
          labelrepet = true
        }
        if (item.uuid === res.uuid) {
@@ -317,13 +314,6 @@
        notification.warning({
          top: 92,
          message: '字段已存在!',
          duration: 10
        })
        return
      } else if (labelrepet) {
        notification.warning({
          top: 92,
          message: '名称已存在!',
          duration: 10
        })
        return
@@ -547,18 +537,6 @@
  }
  /**
   * @description 编辑功能完成更新,包括解冻按钮、粘贴、替换等
   */
  updateEditConfig = (res) => {
    if (res.type === 'paste') {
      this.setState({
        config: res.config
      })
      this.handleForm(res.newform)
    }
  }
  /**
   * @description 更新配置信息
   */
  updateconfig = (config) => {
@@ -652,6 +630,24 @@
    })
  }
  plusFields = (items) => {
    let _config = fromJS(this.state.config).toJS()
    if (_config.fields[0] && _config.fields[0].origin) {
      _config.fields = _config.fields.filter(item => !item.origin)
    }
    _config.fields.push(...items)
    this.setState({
      config: _config
    }, () => {
      if (items.length === 1 && items[0].focus) {
        this.handleForm(items[0])
      }
    })
  }
  render () {
    const { editAction } = this.props
    const { config, dict, openEdition } = this.state
@@ -694,7 +690,7 @@
              <div>
                <Versions MenuId={editAction.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/>
                <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={this.updateEditConfig}/>
                <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/>
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{dict['model.back']}</Button>
              </div>
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -16,6 +16,7 @@
import CreateInterface from '@/templates/zshare/createinterface'
import { updateForm } from '@/utils/utils-update.js'
import DragElement from './dragaction'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
@@ -54,24 +55,22 @@
    })
  }
  /**
   * @description 监听到按钮复制时,触发按钮编辑
   */
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { actionlist } = this.state
    if (!is(fromJS(nextProps.config.action), fromJS(this.props.config.action)) && !is(fromJS(nextProps.config.action), fromJS(actionlist))) {
      let len = nextProps.config.action.length
      let item = nextProps.config.action[len - 1]
      if (item && item.focus) {
        this.handleAction(item)
      }
      this.setState({actionlist: fromJS(nextProps.config.action).toJS()})
    }
  }
  componentDidMount () {
    this.getBillPrintTemp()
    MKEmitter.addListener('pasteButton', this.pasteButton)
  }
  pasteButton = (MenuId, btn) => {
    const { config } = this.props
    const { actionlist } = this.state
    if (MenuId !== config.uuid) return
    this.setState({
      actionlist: [...actionlist, btn],
    }, () => {
      this.handleAction(btn)
    })
  }
  getBillPrintTemp = () => {
@@ -835,7 +834,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -845,6 +844,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('pasteButton', this.pasteButton)
  }
  render() {
src/templates/sharecomponent/columncomponent/index.jsx
@@ -12,6 +12,7 @@
import GridBtnForm from './gridbtnform'
import DragElement from './dragcolumn'
import MarkColumn from './markcolumn'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
@@ -38,18 +39,6 @@
    this.setState({
      columnlist: fromJS(this.props.config.columns).toJS()
    })
  }
  /**
   * @description 监听到显示列复制时,触发显示列编辑
   */
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { config } = this.props
    const { columnlist } = this.state
    if (!is(fromJS(nextProps.config.columns), fromJS(config.columns)) && !is(fromJS(nextProps.config.columns), fromJS(columnlist))) {
      this.setState({columnlist: fromJS(nextProps.config.columns).toJS()})
    }
  }
  /**
@@ -460,8 +449,31 @@
    })
  }
  plusColumns = (MenuId, items) => {
    const { config } = this.props
    const { columnlist } = this.state
    if (MenuId !== config.uuid) return
    let list = [...columnlist, ...items]
    if (list[0] && list[0].origin) {
      list = list.filter(col => !col.origin)
    }
    this.setState({
      columnlist: list
    }, () => {
      this.props.updatecolumn({...config, columns: list})
    })
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('plusColumns', this.plusColumns)
  }
  /**
@@ -471,6 +483,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('plusColumns', this.plusColumns)
  }
  render() {
src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import { is, fromJS } from 'immutable'
import { Row, Col, Icon, Radio, Input, Button } from 'antd'
import './index.scss'
@@ -29,8 +30,21 @@
    }
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { card } = this.state
    if (nextProps.card.origin !== card.origin) {
      this.setState({
        card: {...card, origin: nextProps.card.origin}
      })
    }
  }
  changeSelect = () => {
    const { card } = this.state
    if (card.origin) return
    this.setState({
      card: {...card, selected: !card.selected}
    }, () => {
@@ -40,38 +54,41 @@
  changeType = (e) => {
    const { card } = this.state
    if (card.origin) return
    this.setState({
      card: {...card, type: e.target.value}
    }, () => {
      this.props.changeCard(this.state.card)
      this.props.changeCard(this.state.card, 'update')
    })
  }
  render() {
    const { card, type } = this.state
    return (
      <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')} >
      <div className={'ant-card ant-card-bordered ' + (card.selected ? 'selected' : '')  + (card.origin ? ' fixed' : '')} >
        <div className="base" onClick={this.changeSelect}>
          <Icon type="check" />
          <p title={card.field}>{this.props.dict['model.form.field']}: <span>{card.field}</span></p>
          <p title={card.label}>{this.props.dict['model.name']}: <span>{card.label}</span></p>
          <p title={card.field}>字段: <span>{card.field}</span></p>
          <p title={card.label}>名称: <span>{card.label}</span></p>
        </div>
        {type === 'search' ?
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}>
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
            <Radio value="text">text</Radio>
            <Radio value="select">select</Radio>
            <Radio value="daterange">dateRange</Radio>
          </Radio.Group> : null
        }
        {type === 'columns' ?
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}>
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
            <Radio value="text">text</Radio>
            <Radio value="number">number</Radio>
            <Radio value="picture">picture</Radio>
          </Radio.Group> : null
        }
        {type === 'form' ?
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected}>
          <Radio.Group onChange={this.changeType} value={card.type} disabled={!card.selected || card.origin}>
            <Radio value="text">text</Radio>
            <Radio value="number">number</Radio>
            <Radio value="select">select</Radio>
@@ -88,18 +105,31 @@
    super(props)
    this.state = {
      dataSource: props.data,
      selectCards: props.data.filter(item => item.selected),
      selectCards: [],
      type: props.type,
      searchKey: '',
      loading: false
    }
  }
  changeCard = (item) => {
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { data } = this.props
    if (!is(fromJS(nextProps.data), fromJS(data))) {
      this.setState({selectCards: []})
    }
  }
  changeCard = (item, m) => {
    let cards = JSON.parse(JSON.stringify(this.state.selectCards))
    if (!item.selected) {
    if (m === 'update') {
      cards = cards.map(card => {
        if (card.field === item.field) {
          return item
        }
        return card
      })
    } else if (!item.selected) {
      cards = cards.filter(card => card.field !== item.field)
    } else {
      cards.push(item)
@@ -107,42 +137,37 @@
    this.setState({
      selectCards: cards
    }, () => {
      this.props.onChange(cards)
    })
  }
  reset = () => {
    this.setState({
      searchKey: '',
      loading: true
    }, () => {
      this.setState({
        loading: false
      })
    })
  }
  render() {
    const { dict } = this.props
    const { dataSource, type, loading } = this.state
    const { data } = this.props
    const { type } = this.state
    return (
      <div className="common-modal-edit-card">
        <Row className="search-row">
          <Col span={8}>
            {!loading ? <Search placeholder={dict['form.required.input'] + dict['model.form.field']} onSearch={value => {this.setState({searchKey: value})}} enterButton /> : null}
            <Search placeholder="请输入字段" onSearch={value => {this.setState({searchKey: value})}} enterButton />
          </Col>
          <Col span={8}>
            <Button onClick={this.reset}>
              {this.props.dict['header.reset']}
            </Button>
            <Button onClick={this.reset}>重置</Button>
          </Col>
        </Row>
        <Row>
          {dataSource.map((item, index) => {
          {data.map((item, index) => {
            if (item.field.toLowerCase().indexOf(this.state.searchKey.toLowerCase()) >= 0 || item.label.indexOf(this.state.searchKey) >= 0) {
              return (
                <Col key={index} span={8}>
                  <EditCardCell ref={'cellCard' + index} type={type} card={item} dict={this.props.dict} changeCard={this.changeCard} />
                  <EditCardCell type={type} card={item} changeCard={this.changeCard} />
                </Col>
              )
            } else {
src/templates/sharecomponent/fieldscomponent/editcard/index.scss
@@ -29,7 +29,7 @@
        cursor: pointer;
      }
    }
    .ant-card.selected {
    .ant-card.selected, .ant-card.fixed {
      border-color: #1890ff;
      box-shadow: 0px 0px 4px #1890ff;
      .anticon {
@@ -40,6 +40,11 @@
        color: #1890ff;
      }
    }
    .ant-card.fixed {
      .base {
        cursor: default;
      }
    }
  }
  .search-row {
    .ant-col {
src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -8,6 +8,7 @@
import enUS from '@/locales/en-US/model.js'
import EditCard from './editcard'
import MKEmitter from '@/utils/events.js'
import './index.scss'
class FieldsComponent extends Component {
@@ -20,8 +21,9 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    appType: sessionStorage.getItem('appType'),
    fields: [],          // 字段集
    tableVisible: false,    // 模态框控制
    fields: [],             // 字段集
    visible: false,         // 模态框控制
    selectCards: []
  }
  queryField = () => {
@@ -49,7 +51,7 @@
      config.search.forEach(item => {
        if (columns.has(item.field.toLowerCase())) {
          let _datatype = columns.get(item.field.toLowerCase()).datatype
          columns.set(item.field.toLowerCase(), {...item, selected: true, datatype: _datatype})
          columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype})
        }
      })
    } else if (type === 'columns') {
@@ -57,248 +59,171 @@
      config.columns.forEach(item => {
        if (item.field && columns.has(item.field.toLowerCase())) {
          let _datatype = columns.get(item.field.toLowerCase()).datatype
          columns.set(item.field.toLowerCase(), {...item, selected: true, datatype: _datatype})
          columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype})
        }
      })
    } else if (type === 'fields') {
      config.columns.forEach(item => {
        if (columns.has(item.field.toLowerCase())) {
          let _datatype = columns.get(item.field.toLowerCase()).datatype
          columns.set(item.field.toLowerCase(), {...item, selected: true, datatype: _datatype})
          columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype})
        }
      })
    } else if (type === 'form') {
      config.fields.forEach(item => {
        if (item.field && columns.has(item.field.toLowerCase())) {
          let _datatype = columns.get(item.field.toLowerCase()).datatype
          columns.set(item.field.toLowerCase(), {...item, selected: true, datatype: _datatype})
          columns.set(item.field.toLowerCase(), {...item, origin: true, datatype: _datatype})
        }
      })
    }
    // 显示字段集弹窗
    this.setState({
      tableVisible: true,
      visible: true,
      selectCards: [],
      fields: [...columns.values()]
    })
  }
  addFieldSubmit = () => {
    const { type } = this.props
    const { selectCards, fields } = this.state
    // 字段集为空,关闭弹窗
    if (!this.state.fields || this.state.fields.length === 0) {
      this.setState({
        tableVisible: false
      })
    if (!fields || fields.length === 0) {
      this.setState({ visible: false })
    }
    let config = fromJS(this.props.config).toJS()
    // 获取已选字段集合
    let cards = this.refs.searchcard.state.selectCards
    let cards = selectCards
    let columnsMap = new Map()
    cards.forEach(card => {
      columnsMap.set(card.field.toLowerCase(), card)
    })
    let items = []
    let keys = []
    if (type === 'search') {
      config.search.forEach(item => {
        if (columnsMap.has(item.field.toLowerCase())) {
          let cell = columnsMap.get(item.field.toLowerCase())
          if (cell.selected && cell.type === item.type) { // 数据未修改
            items.push(item)
          } else if (cell.selected) { // 数据类型修改
            item.initval = ''
            if (cell.type === 'select') {
              item.match = '='
            } else if (cell.type === 'daterange') {
              item.initval = '[30, 0]'
              item.match = 'between'
            } else {
              cell.type = 'text'
              item.match = 'like'
            }
            item.type = cell.type
            items.push(item)
          }
          columnsMap.delete(item.field.toLowerCase())
        } else if (!item.origin) {
          items.push(item)
        }
      })
      let _columns = [...columnsMap.values()]
      _columns.forEach(item => {
        if (item.selected) {
          let _match = ''
          if (item.type === 'select') {
            _match = '='
          } else if (item.type === 'daterange') {
            _match = 'between'
          } else {
            item.type = 'text'
            _match = 'like'
          }
          let newcard = {
            uuid: Utils.getuuid(),
            label: item.label,
            field: item.field,
            initval: '',
            type: item.type,
            resourceType: '0',
            setAll: 'false',
            options: [],
            orderType: 'asc',
            match: _match,
            display: 'dropdown'
          }
          items.push(newcard)
        }
      })
      config.search = items
    } else if (type === 'columns') {
      config.columns.forEach(item => {
        if (item.field && columnsMap.has(item.field.toLowerCase())) {
          let cell = columnsMap.get(item.field.toLowerCase())
          if (cell.selected) {
            items.push(item)
          }
          columnsMap.delete(item.field.toLowerCase())
        } else if (!item.origin) {
          items.push(item)
        }
      })
      let _columns = [...columnsMap.values()]
      _columns.forEach(item => {
        if (item.selected) {
          let newcard = {
            uuid: Utils.getuuid(),
            Align: 'left',
            label: item.label,
            field: item.field,
            Hide: 'false',
            IsSort: item.type === 'picture' ? 'false' : 'true',
            type: item.type,
            Width: 120
          }
          if (item.type === 'number') {
            newcard.decimal = item.decimal
          } else {
            newcard.fieldlength = item.length || 50
          }
          items.push(newcard)
        }
      })
      config.columns = items
    } else if (type === 'fields') {
      config.columns.forEach(item => {
        if (columnsMap.has(item.field.toLowerCase())) {
          let cell = columnsMap.get(item.field.toLowerCase())
          if (cell.selected) {
            items.push(item)
          }
          columnsMap.delete(item.field.toLowerCase())
      selectCards.forEach(item => {
        let _match = ''
        let initval = ''
        if (item.type === 'select') {
          _match = '='
        } else if (item.type === 'daterange') {
          initval = '[30, 0]'
          _match = 'between'
        } else {
          items.push(item)
          item.type = 'text'
          _match = 'like'
        }
        let newcard = {
          uuid: Utils.getuuid(),
          label: item.label,
          field: item.field,
          initval: initval,
          type: item.type,
          resourceType: '0',
          setAll: 'false',
          options: [],
          orderType: 'asc',
          match: _match,
          display: 'dropdown'
        }
        items.push(newcard)
        keys.push(item.field.toLowerCase())
      })
      MKEmitter.emit('plusSearch', config.uuid, items, 'multil')
    } else if (type === 'columns') {
      selectCards.forEach(item => {
        let newcard = {
          uuid: Utils.getuuid(),
          Align: 'left',
          label: item.label,
          field: item.field,
          Hide: 'false',
          IsSort: item.type === 'picture' ? 'false' : 'true',
          type: item.type,
          Width: 120
        }
      let _columns = [...columnsMap.values()]
        if (item.type === 'number') {
          newcard.decimal = item.decimal
        } else {
          newcard.fieldlength = item.length || 50
        }
      _columns.forEach(item => {
        items.push(newcard)
        keys.push(item.field.toLowerCase())
      })
      MKEmitter.emit('plusColumns', config.uuid, items)
    } else if (type === 'fields') {
      items = [...config.columns]
      selectCards.forEach(item => {
        let _t = item.$datatype || (item.type === 'number' ? 'Decimal(18,0)' : 'Nvarchar(50)')
        if (item.selected) {
          let newcard = {
            uuid: Utils.getuuid(),
            label: item.label,
            field: item.field,
            datatype: _t
          }
        let newcard = {
          uuid: Utils.getuuid(),
          label: item.label,
          field: item.field,
          datatype: _t
        }
        items.push(newcard)
        keys.push(item.field.toLowerCase())
      })
          items.push(newcard)
        }
      })
      this.props.updatefield(items)
    } else if (type === 'form') {
      config.fields.forEach(item => {
        if (item.field && columnsMap.has(item.field.toLowerCase())) {
          let cell = columnsMap.get(item.field.toLowerCase())
          if (cell.selected && cell.type === item.type) { // 数据选择状态及类型未修改时,直接添加
            items.push(item)
          } else if (cell.selected) {                     // 数据类型修改时,重置类型及初始值
            item.type = cell.type
            item.initval = ''
            items.push(item)
          }
          columnsMap.delete(item.field.toLowerCase())
        } else if (!item.origin) {                        // 过滤示例项
          items.push(item)
        }
      })
      let _columns = [...columnsMap.values()]
      let lastItem = config.fields[config.fields.length - 1]
      let span = this.state.appType === 'mob' ? 24 : 12
      if (lastItem && lastItem.span) {
        span = lastItem.span
      }
      _columns.forEach(item => { // 循环添加新增字段
        if (item.selected) {
          let newcard = {
            uuid: Utils.getuuid(),
            label: item.label,
            field: item.field,
            initval: '',
            type: item.type,
            resourceType: '0',
            setAll: 'false',
            span: span,
            labelwidth: 33.3,
            options: [],
            dataSource: '',
            decimal: item.decimal,
            orderType: 'asc',
            readonly: 'false',
            required: 'true'
          }
          items.push(newcard)
      selectCards.forEach(item => { // 循环添加新增字段
        let newcard = {
          uuid: Utils.getuuid(),
          label: item.label,
          field: item.field,
          initval: '',
          type: item.type,
          resourceType: '0',
          setAll: 'false',
          span: span,
          labelwidth: 33.3,
          options: [],
          dataSource: '',
          decimal: item.decimal,
          orderType: 'asc',
          readonly: 'false',
          required: 'true'
        }
        items.push(newcard)
        keys.push(item.field.toLowerCase())
      })
      config.fields = items
      this.props.plusFields(items)
    }
    if (type === 'search' || type === 'columns' || type === 'form') {
      this.props.updatefield(config)
      notification.success({
        top: 92,
        message: '操作成功',
        duration: 2
    this.setState({
      selectCards: [],
      fields: fromJS(fields).toJS().map(cell => {
        if (keys.includes(cell.field.toLowerCase())) {
          cell.origin = true
        }
        return cell
      })
    } else if (type === 'fields') {
      this.props.updatefield(items)
    })
      notification.success({
        top: 92,
        message: '操作成功',
        duration: 2
      })
    }
    notification.success({
      top: 92,
      message: '操作成功',
      duration: 2
    })
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -314,6 +239,10 @@
    }
  }
  onChange = (selectCards) => {
    this.setState({selectCards})
  }
  render() {
    const { type } = this.props
    const { dict, fields } = this.state
@@ -325,24 +254,15 @@
        <Modal
          wrapClassName="model-table-fieldmanage-modal"
          title={dict['model.edit']}
          visible={this.state.tableVisible}
          visible={this.state.visible}
          width={'65vw'}
          maskClosable={false}
          cancelText={dict['model.close']}
          onOk={this.addFieldSubmit}
          onCancel={() => { // 取消添加
            this.setState({
              tableVisible: false
            })
          }}
          onCancel={() => this.setState({ visible: false })}
          destroyOnClose
        >
          {fields.length > 0 ?
            <EditCard data={fields} ref="searchcard" type={type} dict={dict} /> : null
          }
          {(!fields || fields.length === 0) &&
            <Empty />
          }
          {fields.length > 0 ? <EditCard data={fields} onChange={this.onChange} type={type} /> : <Empty />}
        </Modal>
      </div>
    )
src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx
@@ -7,6 +7,7 @@
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { Search } = Input
const { MonthPicker, WeekPicker, RangePicker } = DatePicker
const CheckCard = asyncComponent(() => import('@/templates/modalconfig/checkCard'))
@@ -60,8 +61,13 @@
  }
  let formItem = null
  let type = ''
  if (card.type === 'text') {
    formItem = (<Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} />)
    if (card.inputType === 'search') {
      formItem = (<Search style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} enterButton />)
    } else {
      formItem = (<Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} />)
    }
  } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') {
    formItem = (<Select value={_defaultValue}></Select>)
  } else if (card.type === 'date') {
@@ -80,6 +86,7 @@
  } else if (card.type === 'group') {
    formItem = (<DateGroup card={card} />)
  } else if (card.type === 'checkcard') {
    type = 'checkcard'
    formItem = <CheckCard config={card} />
  }
@@ -91,7 +98,7 @@
        <Icon className="close" title="delete" type="close" onClick={() => delCard(id)} />
      </div>
    } trigger="hover">
      <div className={'page-card ' + (card.labelShow || '')} style={{ opacity: opacity}}>
      <div className={'page-card ' + (card.labelShow || '') + ' ' + type} style={{ opacity: opacity}}>
        <div ref={node => drag(drop(node))} onDoubleClick={() => editCard(id)}>
          <Form.Item
            labelCol={{xs: { span: 24 }, sm: { span: 8 }}}
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx
@@ -7,7 +7,7 @@
import Card from './card'
import './index.scss'
const Container = ({list, placeholder, showField, handleList, handleMenu, deleteMenu }) => {
const Container = ({list, show, placeholder, showField, handleList, handleMenu, deleteMenu }) => {
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
    const { card, index } = findCard(id)
@@ -144,7 +144,7 @@
          />
        </Col>
      ))}
      {cards.length > 0 ? <Col key="action" className="action" span={radio < 6 ? 6 : radio}>
      {cards.length > 0 && show !== 'false' ? <Col key="action" className="action" span={radio < 6 ? 6 : radio}>
        <div className="ant-row ant-form-item" style={{whiteSpace: 'nowrap', lineHeight: '40px', height: '55px', marginBottom: 0}}>
          <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8">
          </div>
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -10,6 +10,7 @@
import enUS from '@/locales/en-US/model.js'
import { getSearchForm } from '@/templates/zshare/formconfig'
import MKEmitter from '@/utils/events.js'
import SearchForm from './searchform'
import DragElement from './dragsearch'
import './index.scss'
@@ -53,6 +54,32 @@
        this.handleSearch(item)
      }
      this.setState({searchlist: fromJS(nextProps.config.search).toJS()})
    }
  }
  componentDidMount () {
    MKEmitter.addListener('plusSearch', this.plusSearch)
  }
  plusSearch = (MenuId, item, type) => {
    const { config } = this.props
    const { searchlist } = this.state
    if (MenuId !== config.uuid) return
    if (type === 'simple') {
      this.setState({
        searchlist: [...searchlist, item],
      }, () => {
        this.handleSearch(item)
      })
    } else if (type === 'multil') {
      let list = [...searchlist, ...item]
      this.setState({
        searchlist: list
      }, () => {
        this.props.updatesearch({...config, search: list})
      })
    }
  }
@@ -280,13 +307,15 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('plusSearch', this.plusSearch)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState)) || this.props.config.setting.show !== nextProps.config.setting.show
  }
  render() {
    const { config } = this.props
    const { dict, searchlist, visible, sqlVerifing, card, showField } = this.state
    return (
@@ -297,6 +326,7 @@
        <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} />
        <DragElement
          list={searchlist}
          show={config.setting.show}
          showField={showField}
          handleList={this.handleList}
          handleMenu={this.handleSearch}
src/templates/sharecomponent/searchcomponent/index.scss
@@ -71,6 +71,13 @@
      width: 100%;
    }
  }
  .page-card.checkcard {
    .ant-form-item-control-wrapper {
      .ant-form-item-control {
        line-height: 1;
      }
    }
  }
  .ant-calendar-picker {
    min-width: 100px!important;
    width: 100%;
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -654,6 +654,8 @@
            }
          } else if (['multiselect', 'select', 'link', 'checkcard'].includes(values.type) && values.resourceType === '1') {
            values.options = []
          } else if (values.type === 'text' && values.advanced === 'true') {
            values.inputType = 'input'
          }
          if (values.type === 'range') {
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -679,6 +679,22 @@
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="在搜索条件存在时,是否显示搜索和重置按钮。">
                  <Icon type="question-circle" />
                  搜索按钮
                </Tooltip>
              }>
                {getFieldDecorator('show', {
                  initialValue: setting.show || 'true'
                })(
                <Radio.Group>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。">
                  <Icon type="question-circle" />
                  高级搜索
src/templates/subtableconfig/index.jsx
@@ -863,17 +863,13 @@
  }
  /**
   * @description 编辑功能完成更新,包括解冻按钮、粘贴、替换等
   * @description 编辑功能完成更新,包括解冻按钮等
   */
  updateConfig = (res) => {
    if (res.type === 'thaw') {
      this.setState({
        thawButtons: res.thawButtons,
        config: res.config
      })
    } else if (res.type === 'paste') {
      this.setState({config: res.config})
    }
    this.setState({
      thawButtons: res.thawButtons,
      config: res.config
    })
  }
  /**
@@ -1008,11 +1004,7 @@
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
                <FieldsComponent
                  config={config}
                  type="search"
                  updatefield={this.updateconfig}
                />
                <FieldsComponent config={config} type="search" />
              </Panel>
              {/* 按钮添加 */}
              <Panel header={this.state.dict['header.menu.action']} key="2">
@@ -1051,11 +1043,7 @@
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
                <FieldsComponent
                  config={config}
                  type="columns"
                  updatefield={this.updateconfig}
                />
                <FieldsComponent config={config} type="columns" />
              </Panel>
            </Collapse>
          </div>
src/templates/zshare/editcomponent/index.jsx
@@ -9,6 +9,7 @@
import TransferForm from '@/templates/zshare/basetransferform'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
class editComponent extends Component {
@@ -116,30 +117,16 @@
  }
  pasteSubmit = () => {
    const { options } = this.props
    const { options, config } = this.props
    let _config = fromJS(this.props.config).toJS()
    this.pasteFormRef.handleConfirm().then(res => {
      if (res.copyType === 'action' && options.includes('action')) {
        res.uuid = Utils.getuuid()
        _config.action = _config.action.filter(item => !item.origin)
        _config.action.push(res)
        this.setState({
          pasteVisible: false
        }, () => {
          this.props.refresh({
            type: 'paste',
            config: _config
          })
        })
        MKEmitter.emit('pasteButton', config.uuid, res)
      } else if (options.includes('search') && res.copyType === 'search') {
        res.uuid = Utils.getuuid()
        _config.search = _config.search.filter(item => !item.origin)
        let keys = _config.search.map(item => item.field.toLowerCase())
        _config.search.push(res)
        let keys = _config.search.map(item => item.field ? item.field.toLowerCase() : '')
        if (res.field && keys.includes(res.field.toLowerCase())) {
          notification.warning({
@@ -149,83 +136,37 @@
          })
          return
        }
        this.setState({
          pasteVisible: false
        }, () => {
          this.props.refresh({
            type: 'paste',
            config: _config
          })
        })
        MKEmitter.emit('plusSearch', config.uuid, res, 'simple')
      } else if (options.includes('columns') && res.copyType === 'columns') {
        _config.columns = _config.columns.filter(col => !col.origin)
        let keys = _config.columns.map(item => item.field ? item.field.toLowerCase() : '')
        if (_config.columns.length === 0) {
          _config.columns = res.columns
        } else {
          res.columns.forEach(col => {
            if (!col.field) return
            let _key = col.field.toLowerCase()
            if (!keys.includes(_key)) {
              keys.push(_key)
              _config.columns.push(col)
            }
          })
        }
        let items = res.columns.filter(col => col.field && !keys.includes(col.field.toLowerCase()))
        
        this.setState({
          pasteVisible: false
        }, () => {
          this.props.refresh({
            type: 'paste',
            config: _config
          })
        })
        MKEmitter.emit('plusColumns', config.uuid, items)
      } else if (options.includes('form') && res.copyType === 'form') {
        let fields = []
        let labels = []
        let keys = _config.fields.map(item => item.field ? item.field.toLowerCase() : '')
        res.uuid = Utils.getuuid()
        _config.fields.forEach(item => {
          item.field && fields.push(item.field.toLowerCase())
          labels.push(item.label)
        })
        _config.fields.push(res)
        if (res.field && fields.includes(res.field.toLowerCase())) {
        if (res.field && keys.includes(res.field.toLowerCase())) {
          notification.warning({
            top: 92,
            message: '字段已存在!',
            duration: 10
          })
          return
        } else if (labels.includes(res.label)) {
          notification.warning({
            top: 92,
            message: '名称已存在!',
            duration: 10
          })
          return
        }
        
        this.setState({
          pasteVisible: false
        }, () => {
          this.props.refresh({
            type: 'paste',
            config: _config,
            newform: res
          })
        })
        this.props.plusFields([res])
      } else {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
          duration: 5
        })
        return
      }
      this.setState({
        pasteVisible: false
      })
    })
  }
src/templates/zshare/formconfig.jsx
@@ -749,8 +749,8 @@
      key: 'inputType',
      label: '输入样式',
      initVal: card.inputType || 'input',
      tooltip: '使用高级搜索时无效。',
      required: false,
      forbid: appType === null,
      options: [{
        value: 'input',
        text: '输入框'