king
2020-02-22 592ff0aa0f2d45d143872b672a1468e268d3157f
2020-02-22
14个文件已修改
341 ■■■■ 已修改文件
src/components/sidemenu/editthdmenu/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/comtable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/editable/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/formconfig.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/searchform/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/editable/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/ushare/modalform/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sidemenu/editthdmenu/index.jsx
@@ -68,7 +68,8 @@
    btnTab: null,           // 打开新标签或当前页面刷新的按钮
    btnTabConfig: null,     // 打开新标签按钮配置
    handleMVisible: false,  // 添加或修改菜单模态框(角色权限分配等)
    sysMenu: false          // 添加或编辑菜单(角色权限分配等)
    sysMenu: false,         // 添加或编辑菜单(角色权限分配等)
    optionLibs: []          // 自定义下拉选项库
  }
  /**
@@ -166,6 +167,7 @@
            type: 'edit',
            editMenu: _menu,
            loading: false,
            optionLibs: new Map(), // 编辑时,初始化为空
            tabview: _Template.length > 0 ? _menu.PageParam.Template : 'template'
          }, () => {
            document.getElementById('root').style.overflowY = 'hidden'
@@ -451,6 +453,7 @@
      this.setState({
        loading: false,
        tabview: template.type,
        optionLibs: new Map(), // 新建时,初始化下拉选项库
        editMenu: {
          ...editMenu,
          type: template.type,
@@ -696,6 +699,7 @@
        {this.state.tabview === 'CommonTable' &&
          <ComTableConfig
            menu={this.state.editMenu}
            optionLibs={this.state.optionLibs}
            supMenuList={this.props.supMenuList}
            reloadmenu={() => {this.props.reload()}}
            handleView={this.handleView}
@@ -704,6 +708,7 @@
        {this.state.tabview === 'Modal' &&
          <ModalConfig
            menu={this.state.editMenu}
            optionLibs={this.state.optionLibs}
            editTab={this.state.editTab}
            tabConfig={this.state.tabConfig}
            editSubTab={this.state.editSubTab}
@@ -718,6 +723,7 @@
        {this.state.tabview === 'SubTable' &&
          <SubTable
            menu={this.state.editMenu}
            optionLibs={this.state.optionLibs}
            editTab={this.state.editTab}
            editSubTab={this.state.editSubTab}
            tabConfig={this.state.tabConfig}
@@ -730,6 +736,7 @@
        {this.state.tabview === 'FormTab' &&
          <FormTabConfig
            menu={this.state.editMenu}
            optionLibs={this.state.optionLibs}
            btnTab={this.state.btnTab}
            config={this.state.subConfig}
            handleView={this.handleView}
src/locales/en-US/comtable.js
@@ -209,6 +209,7 @@
  'header.form.afterExecError': '失败后',
  'header.form.pagination': '分页',
  'header.form.regular': '正则校验',
  'header.form.quickadd': '快捷添加',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/locales/zh-CN/comtable.js
@@ -209,6 +209,7 @@
  'header.form.afterExecError': '失败后',
  'header.form.pagination': '分页',
  'header.form.regular': '正则校验',
  'header.form.quickadd': '快捷添加',
  'header.modal.form.edit': '表单-编辑',
  'header.modal.search.edit': '搜索条件-编辑',
  'header.modal.action.edit': '按钮-编辑',
src/tabviews/subtable/index.jsx
@@ -60,6 +60,7 @@
   */
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
      this.refs.subTable.resetTable()
      this.loadmaindata(nextProps.BID, 'refresh')
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
@@ -514,6 +515,11 @@
    } else if (btn.popClose === 'equaltab' && type === 'pop') {
      this.reloadtable()
      this.props.handleMainTable('equaltab')
    } else if (btn.execSuccess === 'maingrid' && type === 'success') {
      this.props.handleMainTable('maingrid')
    } else if (btn.execSuccess === 'equaltab' && type === 'success') {
      this.reloadtable()
      this.props.handleMainTable('equaltab')
    }
  }
src/templates/comtableconfig/index.jsx
@@ -40,6 +40,7 @@
class ComTableConfig extends Component {
  static propTpyes = {
    menu: PropTypes.any,
    optionLibs: PropTypes.any,
    supMenuList: PropTypes.array,
    reloadmenu: PropTypes.func,
    handleView: PropTypes.func
@@ -70,7 +71,8 @@
    funcLoading: false,      // 存储过程创建中
    showColumnName: false,   // 显示列字段名控制
    tabviews: [],            // 所有标签页
    profileVisible: false    // 验证信息模态框
    profileVisible: false,   // 验证信息模态框
    optionLibs: null         // 自定义下拉选项库
  }
  /**
@@ -79,7 +81,7 @@
   * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单
   */
  UNSAFE_componentWillMount () {
    const { menu } = this.props
    const { menu, optionLibs } = this.props
    let _LongParam = menu.LongParam
    let _config = ''
@@ -92,6 +94,21 @@
      _config.isAdd = true
    } else {
      _config = _LongParam
      _config.search.forEach(item => {
        if (
          (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
          item.resourceType === '0' &&
          item.options && item.options.length > 0
        ) {
          optionLibs.set(item.uuid, {
            uuid: item.uuid,
            label: item.label,
            parname: menu.MenuName,
            type: 'search',
            options: item.options
          })
        }
      })
    }
    // 配置默认值,兼容
@@ -135,6 +152,7 @@
    this.setState({
      config: _config,
      optionLibs: optionLibs,
      originActions: _oriActions,
      originMenu: JSON.parse(JSON.stringify(menu)),
      selectedTables: _config.tables || [],
@@ -521,10 +539,24 @@
   */
  handleSubmit = () => {
    const { menu } = this.props
    const { config, card, modaltype } = this.state
    const { config, card, modaltype, optionLibs } = this.state
    if (modaltype === 'search') {
      this.searchFormRef.handleConfirm().then(res => {
        if ( // 更新下拉字典
          (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
            label: res.label,
            parname: menu.MenuName,
            type: 'search',
            options: res.options
          })
        }
        let _search = config.search.map(item => {
          if (item.uuid === res.uuid) {
            return res
@@ -536,6 +568,7 @@
        this.setState({
          config: {...config, search: _search},
          optionLibs: optionLibs,
          modaltype: ''
        })
      })
@@ -1126,7 +1159,7 @@
        return
      }
      if (setting.dataresource.length > 50 && config.setting.dataresource !== setting.dataresource) {
      if (/[^\s]+\s+[^\s]+/ig.test(setting.dataresource) && config.setting.dataresource !== setting.dataresource) {
        let param = {
          func: 's_DataSrc_Save',
          LText: setting.dataresource,
@@ -2301,7 +2334,7 @@
      if (
        res.interType === 'inner' &&
        !res.innerFunc &&
        res.dataresource.length > 50 &&
        /[^\s]+\s+[^\s]+/ig.test(res.dataresource) &&
        config.setting.dataresource !== res.dataresource
      ) {
        let param = {
@@ -2329,7 +2362,7 @@
   */
  setSubConfig = (item, type) => {
    const { menu } = this.props
    const { config, originMenu } = this.state
    const { config, originMenu, optionLibs } = this.state
    if (!originMenu.MenuID) { // menuID不存在时,为新建菜单,提示菜单尚未保存
      notification.warning({
@@ -2381,6 +2414,7 @@
        }
        let param = {
          optionLibs: optionLibs,
          editMenu: _originMenu,
          editTab: !isbutton ? item : '',
          tabConfig: null,
@@ -2815,6 +2849,7 @@
          <SearchForm
            dict={this.state.dict}
            card={this.state.card}
            optionLibs={this.state.optionLibs}
            formlist={this.state.formlist}
            wrappedComponentRef={(inst) => this.searchFormRef = inst}
          />
src/templates/formtabconfig/index.jsx
@@ -36,6 +36,7 @@
class ComTableConfig extends Component {
  static propTpyes = {
    menu: PropTypes.any,
    optionLibs: PropTypes.any,
    btnTab: PropTypes.object,
    config: PropTypes.any,
    handleView: PropTypes.func
@@ -64,7 +65,8 @@
    tabviews: [],            // 所有标签页
    profileVisible: false,   // 验证信息模态框
    editgroup: null,         // 当前编辑组
    groupVisible: false      // 编辑组模态框
    groupVisible: false,     // 编辑组模态框
    optionLibs: null         // 自定义下拉选项库
  }
  /**
@@ -73,7 +75,7 @@
   * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单
   */
  UNSAFE_componentWillMount () {
    const { menu, btnTab, config } = this.props
    const { menu, btnTab, config, optionLibs } = this.props
    let _config = ''
    let columns = []
@@ -86,6 +88,24 @@
      }
    } else {
      _config = config
      _config.groups.forEach(group => {
        group.sublist.forEach(item => {
          if (
            (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
            item.resourceType === '0' &&
            item.options && item.options.length > 0
          ) {
            optionLibs.set(item.uuid, {
              uuid: item.uuid,
              label: item.label,
              parname: btnTab.label,
              type: 'Modal',
              options: item.options
            })
          }
        })
      })
    }
    if (menu && menu.LongParam && menu.LongParam.columns) {
@@ -94,6 +114,7 @@
    this.setState({
      config: _config,
      optionLibs: optionLibs,
      columns: columns,
      originMenu: JSON.parse(JSON.stringify(_config)),
      selectedTables: _config.tables,
@@ -247,6 +268,7 @@
    let _tabview = menu ? menu.LongParam.Template : ''
    let param = {
      editMenu: menu,
      optionLibs: this.state.optionLibs,
      editTab: null,
      tabConfig: null,
      editSubTab: null,
@@ -493,10 +515,24 @@
   * 3、添加或编辑列,保存时,如按钮位置设置为表格,则修改操作列显示状态
   */
  handleSubmit = () => {
    const { config, modaltype } = this.state
    const { btnTab } = this.props
    const { config, modaltype, optionLibs } = this.state
    if (modaltype === 'search') {
      this.modalFormRef.handleConfirm().then(res => {
        if ( // 更新下拉字典
          (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
            label: res.label,
            parname: btnTab.label,
            type: 'Modal',
            options: res.options
          })
        }
        let _groups = config.groups.map(group => {
          group.sublist = group.sublist.map(item => {
            if (item.uuid === res.uuid) {
@@ -513,6 +549,7 @@
        this.setState({
          config: {...config, groups: _groups},
          optionLibs: optionLibs,
          modaltype: ''
        })
      })
@@ -882,7 +919,7 @@
        return
      }
      if (setting.dataresource.length > 50 && config.setting.dataresource !== setting.dataresource) {
      if (/[^\s]+\s+[^\s]+/ig.test(setting.dataresource) && config.setting.dataresource !== setting.dataresource) {
        let param = {
          func: 's_DataSrc_Save',
          LText: setting.dataresource,
@@ -1730,7 +1767,7 @@
      if (
        res.interType === 'inner' &&
        !res.innerFunc &&
        res.dataresource.length > 50 &&
        /[^\s]+\s+[^\s]+/ig.test(res.dataresource) &&
        config.setting.dataresource !== res.dataresource
      ) {
        let param = {
@@ -1783,6 +1820,7 @@
          let param = {
            editMenu: menu,
            optionLibs: this.state.optionLibs,
            editTab: btn,
            tabConfig: null,
            editSubTab: null,
@@ -2205,6 +2243,7 @@
            dict={this.state.dict}
            card={this.state.card}
            formlist={this.state.formlist}
            optionLibs={this.state.optionLibs}
            wrappedComponentRef={(inst) => this.modalFormRef = inst}
          />
        </Modal>
src/templates/modalconfig/index.jsx
@@ -31,6 +31,7 @@
class ComTableConfig extends Component {
  static propTpyes = {
    menu: PropTypes.any,
    optionLibs: PropTypes.any,
    editTab: PropTypes.any,
    editSubTab: PropTypes.any,
    tabConfig: PropTypes.any,
@@ -61,7 +62,8 @@
    selectedTables: [],    // 已选表名
    originConfig: null,    // 原始菜单
    groupVisible: false,   // 全局配置模态框
    curgroup: null         // 当前组,新建或编辑
    curgroup: null,        // 当前组,新建或编辑
    optionLibs: null       // 自定义下拉选项库
  }
  /**
@@ -72,7 +74,7 @@
   * 4、设置按钮基本信息
   */
  UNSAFE_componentWillMount () {
    const {menu, editAction, tabConfig, subTabConfig, subConfig} = this.props
    const {menu, editAction, tabConfig, subTabConfig, subConfig, optionLibs} = this.props
    let _config = ''
    let _tab = subTabConfig ? subTabConfig : tabConfig
@@ -87,6 +89,42 @@
    if (subConfig) {
      _config = subConfig
      if (_config.groups.length > 0) {
        _config.groups.forEach(group => {
          group.sublist.forEach(item => {
            if (
              (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
              item.resourceType === '0' &&
              item.options && item.options.length > 0
            ) {
              optionLibs.set(item.uuid, {
                uuid: item.uuid,
                label: item.label,
                parname: editAction.label,
                type: 'Modal',
                options: item.options
              })
            }
          })
        })
      } else {
        _config.fields.forEach(item => {
          if (
            (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
            item.resourceType === '0' &&
            item.options && item.options.length > 0
          ) {
            optionLibs.set(item.uuid, {
              uuid: item.uuid,
              label: item.label,
              parname: editAction.label,
              type: 'Modal',
              options: item.options
            })
          }
        })
      }
    } else {
      _config = JSON.parse(JSON.stringify((Source.baseConfig)))
    }
@@ -100,6 +138,7 @@
    this.setState({
      menu: _menu,
      optionLibs: optionLibs,
      config: _config,
      selectedTables: _config.tables || [],
      originConfig: JSON.parse(JSON.stringify(_config)),
@@ -231,6 +270,7 @@
    
    let param = {
      editMenu: menu,
      optionLibs: this.state.optionLibs,
      editTab: editTab,
      tabConfig: tabConfig,
      editSubTab: editSubTab,
@@ -364,8 +404,23 @@
   * 3、通过loading刷新
   */
  handleSubmit = () => {
    const {editAction, optionLibs} = this.props
    this.formRef.handleConfirm().then(res => {
      let _config = JSON.parse(JSON.stringify(this.state.config))
      if ( // 更新下拉字典
        (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
        res.resourceType === '0' &&
        res.options && res.options.length > 0
      ) {
        optionLibs.set(res.uuid, {
          uuid: res.uuid,
          label: res.label,
          parname: editAction.label,
          type: 'Modal',
          options: res.options
        })
      }
      if (_config.groups.length > 0) {
        _config.groups.forEach(group => {
@@ -391,6 +446,7 @@
      this.setState({
        config: _config,
        optionLibs: optionLibs,
        visible: false
      })
    })
@@ -1050,6 +1106,7 @@
            dict={this.state.dict}
            card={this.state.card}
            formlist={this.state.formlist}
            optionLibs={this.state.optionLibs}
            wrappedComponentRef={(inst) => this.formRef = inst}
          />}
        </Modal>
src/templates/subtableconfig/index.jsx
@@ -38,6 +38,7 @@
class SubTableConfig extends Component {
  static propTpyes = {
    menu: PropTypes.any,
    optionLibs: PropTypes.any,
    editTab: PropTypes.any,
    tabConfig: PropTypes.any,
    editSubTab: PropTypes.any,
@@ -75,7 +76,8 @@
    funcLoading: false,      // 存储过程创建中
    showColumnName: false,   // 显示列字段名控制
    tabviews: [],            // 所有标签页
    profileVisible: false    // 验证信息模态框
    profileVisible: false,   // 验证信息模态框
    optionLibs: null         // 自定义下拉选项库
  }
  /**
@@ -84,7 +86,7 @@
   * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单
   */
  UNSAFE_componentWillMount () {
    const { config, editTab, editSubTab } = this.props
    const { config, editTab, editSubTab, optionLibs } = this.props
    let _config = null
@@ -95,6 +97,22 @@
      _config.isAdd = true
    } else {
      _config = JSON.parse(JSON.stringify(config))
      _config.search.forEach(item => {
        if (
          (item.type === 'select' || item.type === 'multiselect' || item.type === 'link') &&
          item.resourceType === '0' &&
          item.options && item.options.length > 0
        ) {
          optionLibs.set(item.uuid, {
            uuid: item.uuid,
            label: item.label,
            parname: _config.tabName,
            type: 'search',
            options: item.options
          })
        }
      })
    }
    
    let _oriActions = []
@@ -117,6 +135,7 @@
    this.setState({
      originActions: _oriActions,
      optionLibs: optionLibs,
      config: _config,
      originConfig: _config,
      selectedTables: _config.tables || [],
@@ -293,6 +312,7 @@
    let param = {
      editMenu: menu,
      optionLibs: this.state.optionLibs,
      editTab: editSubTab ? editTab : null,
      tabConfig: null,
      editSubTab: null,
@@ -390,10 +410,24 @@
   * 3、添加或编辑列,保存时,如按钮位置设置为表格,则修改操作列显示状态
   */
  handleSubmit = () => {
    const { card, config, modaltype } = this.state
    const { card, config, modaltype, optionLibs } = this.state
    if (modaltype === 'search') {
      this.searchFormRef.handleConfirm().then(res => {
        if ( // 更新下拉字典
          (res.type === 'select' || res.type === 'multiselect' || res.type === 'link') &&
          res.resourceType === '0' &&
          res.options && res.options.length > 0
        ) {
          optionLibs.set(res.uuid, {
            uuid: res.uuid,
            label: res.label,
            parname: config.tabName,
            type: 'search',
            options: res.options
          })
        }
        let _search = config.search.map(item => {
          if (item.uuid === res.uuid) {
            return res
@@ -405,6 +439,7 @@
        this.setState({
          config: {...config, search: _search},
          optionLibs: optionLibs,
          modaltype: ''
        })
      })
@@ -900,7 +935,7 @@
        return
      }
      if (setting.dataresource.length > 50 && config.setting.dataresource !== setting.dataresource) {
      if (/[^\s]+\s+[^\s]+/ig.test(setting.dataresource) && config.setting.dataresource !== setting.dataresource) {
        let param = {
          func: 's_DataSrc_Save',
          LText: setting.dataresource,
@@ -1859,7 +1894,7 @@
      if (
        res.interType === 'inner' &&
        !res.innerFunc &&
        res.dataresource.length > 50 &&
        /[^\s]+\s+[^\s]+/ig.test(res.dataresource) &&
        config.setting.dataresource !== res.dataresource
      ) {
        let param = {
@@ -1923,6 +1958,7 @@
          let param = {
            editMenu: menu,
            optionLibs: this.state.optionLibs,
            editTab: editTab,
            tabConfig: editSubTab ? tabConfig : originConfig,
            editSubTab: _subtab,
src/templates/tableshare/editable/index.jsx
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import { is, fromJS } from 'immutable'
import { Table, Input, Button, Popconfirm, Form, Icon } from 'antd'
import Utils from '@/utils/utils.js'
import './index.scss'
@@ -211,6 +212,11 @@
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (this.props.type !== nextProps.type) {
      this.resetColumn(nextProps.type)
    } else if (!is(fromJS(this.props.data), fromJS(nextProps.data))) {
      this.setState({
        dataSource: nextProps.data,
        count: nextProps.data.length
      })
    }
  }
src/templates/tableshare/formconfig.js
@@ -203,6 +203,14 @@
        value: 'sso',
        text: Formdict['header.form.database.sso']
      }]
    },
    {
      type: 'select',
      key: 'quick',
      label: Formdict['header.form.quickadd'],
      initVal: '',
      required: false,
      options: []
    }
  ]
}
@@ -1031,6 +1039,14 @@
      label: Formdict['header.form.linkForm'],
      initVal: card.linkSubField || [],
      options: inputfields
    },
    {
      type: 'select',
      key: 'quick',
      label: Formdict['header.form.quickadd'],
      initVal: '',
      required: false,
      options: []
    }
  ]
}
src/templates/tableshare/searchform/index.jsx
@@ -9,9 +9,10 @@
class MainSearch extends Component {
  static propTpyes = {
    dict: PropTypes.object,  // 字典项
    formlist: PropTypes.any, // 表单
    card: PropTypes.object   // 搜索条件信息
    dict: PropTypes.object,    // 字典项
    formlist: PropTypes.any,   // 表单
    optionLibs: PropTypes.any, // 自定义下拉集
    card: PropTypes.object     // 搜索条件信息
  }
  state = {
@@ -26,14 +27,14 @@
   * 2、下拉选择,根据数据源类型显示相关配置
   */
  UNSAFE_componentWillMount () {
    const { formlist } = this.props
    const { formlist, optionLibs } = this.props
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    let resourceType = formlist.filter(cell => cell.key === 'resourceType')[0].initVal
    let _options = ['label', 'field', 'initval', 'type', 'match']                // 默认显示项
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
      _options = [..._options, 'resourceType', 'options', 'display']
      _options = [..._options, 'resourceType', 'options', 'display', 'quick']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 下拉选择类型、选项为后台数据源中获取
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
    }
@@ -68,6 +69,14 @@
          } else if (type === 'dateweek' || type === 'daterange') {
            form.options = matchReg.daterange
          }
        } else if (form.key === 'quick') {
          form.options = [...optionLibs.values()].filter(cell => cell.uuid !== this.props.card.uuid)
          form.options = form.options.map(cell => {
            return {
              value: cell.uuid,
              text: cell.label + '(' + cell.parname + ')'
            }
          })
        }
        form.hidden = !_options.includes(form.key)
        return form
@@ -98,7 +107,7 @@
      let _options = ['label', 'field', 'initval', 'type', 'match']
      if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '0') {        // 下拉选择类型、选项为自定义资源
        _options = [..._options, 'resourceType', 'options', 'display']
        _options = [..._options, 'resourceType', 'options', 'display', 'quick']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && resourceType === '1') { // 下拉选择类型、选项为后台数据源中获取
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'display', 'database']
      }
@@ -157,6 +166,18 @@
          })
        })
      })
    } else if (key === 'quick') {
      let option = this.props.optionLibs.get(value)
      this.setState({
        formlist: this.state.formlist.map(form => {
          if (form.key === 'options') {
            form.initVal = option.options
          }
          return form
        })
      })
    }
  }
@@ -171,7 +192,7 @@
      let _options = ['label', 'field', 'initval', 'type', 'match', 'resourceType', 'display']
      if (value === '0') {
        _options = [..._options, 'options']
        _options = [..._options, 'options', 'quick']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
src/templates/ushare/editable/index.jsx
@@ -307,6 +307,22 @@
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(fromJS(this.props.linkSubFields), fromJS(nextProps.linkSubFields)) || this.props.type !== nextProps.type) {
      this.resetColumn(nextProps.type, nextProps.linkSubFields)
    } else if (!is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = []
      nextProps.data.forEach(item => {
        let _item = {key: Utils.getuuid()}
        this.state.columns.forEach(col => {
          _item[col.dataIndex] = item[col.dataIndex] || ''
          if (col.dataIndex !== 'ParentID' && !_item[col.dataIndex]) {
            _item[col.dataIndex] = item.Text
          }
        })
        _data.push(_item)
      })
      this.setState({
        dataSource: _data,
        count: nextProps.data.length
      })
    }
  }
src/templates/ushare/modalform/index.jsx
@@ -10,7 +10,8 @@
class MainSearch extends Component {
  static propTpyes = {
    dict: PropTypes.object, // 字典项
    dict: PropTypes.object,    // 字典项
    optionLibs: PropTypes.any, // 自定义下拉集
    formlist: PropTypes.any,
    card: PropTypes.object
  }
@@ -23,6 +24,7 @@
  }
  UNSAFE_componentWillMount () {
    const { optionLibs } = this.props
    let formlist = JSON.parse(JSON.stringify(this.props.formlist))
    let type = ''
@@ -50,7 +52,7 @@
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin'] // 默认显示项
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 选择类型、自定义资源
      _options = [..._options, 'resourceType', 'options']
      _options = [..._options, 'resourceType', 'options', 'quick']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 选择类型、数据源
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
    } else if (type === 'number') {
@@ -87,7 +89,16 @@
          form.type = 'number'
          form.initVal = form.initVal || 0
          form.required = true
        } else if (form.key === 'quick') {
          form.options = [...optionLibs.values()].filter(cell => cell.uuid !== this.props.card.uuid)
          form.options = form.options.map(cell => {
            return {
              value: cell.uuid,
              text: cell.label + '(' + cell.parname + ')'
            }
          })
        }
        form.show = _options.includes(form.key)
        return form
      })
@@ -108,11 +119,12 @@
  }
  openTypeChange = (key, value) => {
    if (key === 'type') {
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden', 'readin']
      if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 选择类型、自定义资源
        _options = [..._options, 'resourceType', 'options']
        _options = [..._options, 'resourceType', 'options', 'quick']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 选择类型、数据源
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      } else if (value === 'number') {
@@ -180,6 +192,18 @@
          })
        })
      })
    } else if (key === 'quick') {
      let option = this.props.optionLibs.get(value)
      this.setState({
        formlist: this.state.formlist.map(form => {
          if (form.key === 'options') {
            form.initVal = option.options
          }
          return form
        })
      })
    }
  }
@@ -211,7 +235,7 @@
    if (key === 'resourceType') {
      let _options = ['label', 'field', 'initval', 'type', 'resourceType', 'readonly', 'required', 'hidden', 'readin']
      if (value === '0') {
        _options = [..._options, 'options']
        _options = [..._options, 'options', 'quick']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
src/utils/utils.js
@@ -1021,7 +1021,6 @@
      config.search.forEach(item => {
        if (item.field) {
          let type = ''
          let _f = item.field
          if (item.type.match(/date/ig)) {
            type = 'datetime=null'
@@ -1029,12 +1028,15 @@
            type = 'nvarchar(50)=\'\''
          }
          if (_fields.has(item.field)) {
            _f = _f + '1'
          }
          _fields.set(item.field, true)
          formParam = formParam + `mchr13k@${_f} ${type},`
          item.field.split(',').forEach(cell => {
            let _f = cell
            if (_fields.has(cell)) {
              _f = _f + '1'
            }
            _fields.set(cell, true)
            formParam = formParam + `mchr13k@${_f} ${type},`
          })
        }
      })
    }