king
2021-08-24 1a11f7115e61c548f9ffc77d0a9e504307ca71b2
2021-08-24
29个文件已修改
422 ■■■■ 已修改文件
src/menu/datasource/verifycard/columnform/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/popview/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/tabtransfer/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tabs/antv-tabs/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/source.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/columnform/index.jsx
@@ -43,19 +43,6 @@
      <Form {...formItemLayout} className="verify-form" id="verifycard1">
        <Row gutter={24}>
          <Col span={6}>
            <Form.Item label={'名称'}>
              {getFieldDecorator('label', {
                initialValue: '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '名称!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col>
          <Col span={6}>
            <Form.Item label={'字段'}>
              {getFieldDecorator('field', {
                initialValue: '',
@@ -69,6 +56,19 @@
            </Form.Item>
          </Col>
          <Col span={6}>
            <Form.Item label={'名称'}>
              {getFieldDecorator('label', {
                initialValue: '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '名称!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" />)}
            </Form.Item>
          </Col>
          <Col span={6}>
            <Form.Item label={'数据类型'}>
              {getFieldDecorator('datatype', {
                initialValue: '',
src/menu/modalconfig/index.jsx
@@ -16,6 +16,7 @@
import SettingForm from '@/templates/modalconfig/settingform'
import asyncComponent from '@/utils/asyncComponent'
import { SearchItems } from '@/templates/modalconfig/source'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { Panel } = Collapse
@@ -43,7 +44,8 @@
    originConfig: null,    // 原始菜单
    sqlVerifing: false,    // sql验证
    showField: false,      // 显示表单字段值
    standardform: null
    standardform: null,
    saving: false
  }
  /**
@@ -61,6 +63,10 @@
    })
  }
  componentDidMount () {
    MKEmitter.addListener('completeSave', this.completeSave)
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -68,6 +74,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('completeSave', this.completeSave)
  }
  /**
@@ -288,13 +295,16 @@
  submitConfig = () => {
    const { config } = this.state
    this.setState({originConfig: fromJS(config).toJS()})
    this.setState({originConfig: fromJS(config).toJS(), saving: true})
    this.props.handleSave(config)
    notification.success({
      top: 92,
      message: '保存成功。',
      duration: 2
    })
    setTimeout(() => {
      MKEmitter.emit('triggerMenuSave')
    }, 100)
  }
  completeSave = () => {
    this.setState({saving: false})
  }
  cancelConfig = () => {
@@ -400,7 +410,7 @@
  }
  render () {
    const { config, dict } = this.state
    const { config, dict, saving } = this.state
    return (
      <div className="modal-form-board">
@@ -425,7 +435,7 @@
            <Card title={dict['header.menu.form.configurable']} bordered={false} extra={
              <div>
                <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={(res) => this.updateConfig(res.config)}/>
                <Button type="primary" onClick={this.submitConfig}>保存</Button>
                <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button>
                <Button onClick={this.cancelConfig}>返回</Button>
              </div>
            } style={{ width: '100%' }}>
src/menu/pastecontroller/index.jsx
@@ -51,7 +51,7 @@
        }
        tab.components = tab.components.map(cell => {
          cell = this.resetconfig(cell, tab, copyBtns)
          cell = this.resetconfig(cell, tab, false, copyBtns)
          return cell
        })
      })
src/menu/popview/index.jsx
@@ -62,6 +62,7 @@
  componentDidMount () {
    MKEmitter.addListener('delButtons', this.delButtons)
    MKEmitter.addListener('triggerMenuSave', this.submitConfig)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    this.updateCustomComponent()
@@ -79,6 +80,7 @@
      return
    }
    MKEmitter.removeListener('delButtons', this.delButtons)
    MKEmitter.removeListener('triggerMenuSave', this.submitConfig)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
@@ -422,6 +424,7 @@
          config.open_edition = res.open_edition || ''
          this.setState({
            config,
            oriConfig: fromJS(config).toJS()
          })
@@ -447,29 +450,22 @@
        if (!res) return
        
        if (res.status) {
          this.setState({
            menuloading: false,
            config: {...config, components: []}
          }, () => {
            this.setState({
              config: {...this.state.config, components: this.state.oriConfig.components}
            })
          })
          notification.success({
            top: 92,
            message: '保存成功',
            duration: 2
          })
        } else {
          this.setState({
            menuloading: false
          })
          notification.warning({
            top: 92,
            message: res.message,
            duration: 5
          })
        }
        this.setState({
          menuloading: false
        })
        MKEmitter.emit('completeSave')
      })
    }, 300)
  }
src/mob/modalconfig/index.jsx
@@ -15,6 +15,7 @@
import SourceElement from '@/templates/modalconfig/dragelement/source'
import SettingForm from '@/templates/modalconfig/settingform'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import { SearchItems } from './source'
import './index.scss'
@@ -43,7 +44,8 @@
    originConfig: null,    // 原始菜单
    sqlVerifing: false,    // sql验证
    showField: false,      // 显示表单字段值
    standardform: null
    standardform: null,
    saving: false
  }
  /**
@@ -61,6 +63,10 @@
    })
  }
  componentDidMount () {
    MKEmitter.addListener('completeSave', this.completeSave)
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -68,6 +74,11 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('completeSave', this.completeSave)
  }
  completeSave = () => {
    this.setState({saving: false})
  }
  /**
@@ -288,13 +299,12 @@
  submitConfig = () => {
    const { config } = this.state
    this.setState({originConfig: fromJS(config).toJS()})
    this.setState({originConfig: fromJS(config).toJS(), saving: true})
    this.props.handleSave(config)
    notification.success({
      top: 92,
      message: '保存成功。',
      duration: 2
    })
    setTimeout(() => {
      MKEmitter.emit('triggerMenuSave')
    }, 100)
  }
  cancelConfig = () => {
@@ -374,7 +384,7 @@
  }
  render () {
    const { config, dict } = this.state
    const { config, dict, saving } = this.state
    return (
      <div className="mob-form-board">
@@ -397,7 +407,7 @@
          </div>
          <div className="modal-control">
            <Button icon="setting" onClick={this.changeSetting}>设置</Button>
            <Button type="primary" onClick={this.submitConfig}>保存</Button>
            <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button>
            <Button onClick={this.cancelConfig}>返回</Button>
            <PasteComponent config={config} updateConfig={this.insert} />
            <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
src/tabviews/custom/components/card/balcony/index.jsx
@@ -26,6 +26,7 @@
    loading: false,
    sync: false,
    data: {},
    BData: null,
    syncData: [],
    show: true,
    checked: false
@@ -190,14 +191,14 @@
    this.setState({syncData: data, checked})
  }
  resetParentParam = (MenuID, id) => {
  resetParentParam = (MenuID, id, data) => {
    const { config, syncConfig } = this.state
    if (syncConfig) {
      if (!syncConfig.setting.supModule || syncConfig.setting.supModule !== MenuID) return
  
      if (id !== this.state.BID) {
        this.setState({ BID: id }, () => {
        this.setState({ BID: id, BData: data }, () => {
          this.loadData()
        })
      }
@@ -209,7 +210,7 @@
      }
  
      if (id !== this.state.BID) {
        this.setState({ BID: id }, () => {
        this.setState({ BID: id, BData: data }, () => {
          this.loadData()
        })
      }
@@ -226,16 +227,16 @@
  async loadData () {
    const { menuType } = this.props
    const { config, arr_field, BID } = this.state
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || ''},
        data: {$$BID: BID || '', $$BData: BData},
      })
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: {$$BID: BID || ''},
        data: {$$BID: BID || '', $$BData: BData},
      })
      return
    }
@@ -253,6 +254,7 @@
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      _data.$$BID = BID || ''
      _data.$$BData = BData
      this.setState({
        data: _data,
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -631,6 +631,7 @@
          <Col key={card.uuid} className="mk-cell-btn" span={card.width}>
            <NormalButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              btn={card}
              show={card.show}
              style={card.style}
@@ -670,6 +671,7 @@
          <Col key={card.uuid} className="mk-cell-btn" span={card.width}>
            <PopupButton
              BID={data.$$BID}
              BData={data.$$BData || ''}
              btn={card}
              show={card.show}
              style={card.style}
@@ -721,6 +723,7 @@
            <Col key={card.uuid} className="mk-cell-btn" span={card.width}>
              <PrintButton
                BID={data.$$BID}
                BData={data.$$BData || ''}
                btn={card}
                show={card.show}
                style={card.style}
src/tabviews/custom/components/card/data-card/index.jsx
@@ -307,7 +307,7 @@
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, pageIndex, search, BID } = this.state
    const { config, arr_field, pageIndex, search, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -363,6 +363,7 @@
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + start + ''
          return item
        }),
@@ -390,7 +391,7 @@
   */ 
  async loadLinedata (id) {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, pageIndex, search, BID } = this.state
    const { config, arr_field, pageIndex, search, BID, BData } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch && mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -421,6 +422,7 @@
              _data.key = item.key
              _data.$$uuid = _data[config.setting.primaryKey] || ''
              _data.$$BID = BID || ''
              item.$$BData = BData || ''
              _data.$Index = item.$Index
              return _data
            } else {
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -32,7 +32,8 @@
    activeKey: '',             // 选中数据
    sync: false,               // 是否统一请求数据
    data: {},                  // 数据
    timer: null                // 定时器时间间隔
    timer: null,               // 定时器时间间隔
    BData: null
  }
  UNSAFE_componentWillMount () {
@@ -240,12 +241,12 @@
    }
  }
  resetParentParam = (MenuID, id) => {
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
      this.setState({ BID: id, BData: data }, () => {
        this.loadData()
      })
    }
@@ -261,16 +262,16 @@
  async loadData (hastimer) {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID } = this.state
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || ''},
        data: {$$BID: BID || '', $$BData: BData},
      })
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: {$$BID: BID || ''},
        data: {$$BID: BID || '', $$BData: BData},
      })
      return
    }
@@ -295,6 +296,7 @@
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      _data.$$BID = BID || ''
      _data.$$BData = BData
      this.setState({
        activeKey: '',
src/tabviews/custom/components/card/table-card/index.jsx
@@ -31,6 +31,7 @@
    total: 0,                  // 总数
    sync: false,               // 是否统一请求数据
    data: null,                // 数据
    BData: null
  }
  /**
@@ -175,12 +176,12 @@
    }
  }
  resetParentParam = (MenuID, id) => {
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
    if (!config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id, pageIndex: 1 }, () => {
      this.setState({ BID: id, BData: data, pageIndex: 1 }, () => {
        this.loadData()
      })
    }
@@ -223,7 +224,7 @@
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, pageIndex, search, BID } = this.state
    const { config, arr_field, pageIndex, search, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -267,6 +268,7 @@
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = index + start + ''
          return item
        }),
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -29,6 +29,7 @@
    sync: false,               // 是否统一请求数据
    card: null,                // 卡片设置
    data: null,                // 数据
    BData: null
  }
  UNSAFE_componentWillMount () {
@@ -163,7 +164,7 @@
    if (!config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
      this.setState({ BID: id, BData: data }, () => {
        this.loadData()
      })
    }
@@ -190,7 +191,7 @@
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID } = this.state
    const { config, arr_field, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -220,6 +221,7 @@
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          return item
        }),
        loading: false
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -27,7 +27,8 @@
    config: null,              // 图表配置信息
    loading: false,            // 数据加载状态
    sync: false,               // 是否统一请求数据
    data: {}                   // 数据
    data: {},                  // 数据
    BData: null
  }
  UNSAFE_componentWillMount () {
@@ -165,12 +166,12 @@
    }
  }
  resetParentParam = (MenuID, id) => {
  resetParentParam = (MenuID, id, data) => {
    const { config } = this.state
    if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return
    if (id !== this.state.BID) {
      this.setState({ BID: id }, () => {
      this.setState({ BID: id, BData: data }, () => {
        this.loadData()
      })
    }
@@ -186,16 +187,16 @@
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID } = this.state
    const { config, arr_field, BID, BData } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {$$BID: BID || ''}
        data: {$$BID: BID || '', $$BData: BData}
      })
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: {$$BID: BID || ''}
        data: {$$BID: BID || '', $$BData: BData}
      })
      return
    }
@@ -218,6 +219,7 @@
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      _data.$$BID = BID || ''
      _data.$$BData = BData || ''
      this.setState({
        data: _data,
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1674,7 +1674,7 @@
    chart.on('element:click', (ev) => {
      let data = ev.data.data
      MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), null)
      MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), data)
    })
    if (plot.interaction && plot.interaction.length) {
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -186,7 +186,7 @@
    if (config.uuid !== menuId) return
    this.loadData(null, 'refresh')
    this.loadData('refresh')
  }
  /**
@@ -205,7 +205,7 @@
    }
    if (config.wrap.datatype !== 'static' && config.setting) {
      this.loadData(btn)
      this.loadData()
    }
    if (id) {
@@ -266,7 +266,7 @@
    }
  }
  async loadData (btn, type) {
  async loadData (type) {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID, group } = this.state
@@ -274,7 +274,6 @@
      this.setState({
        data: {}
      })
      btn && this.execSuccess(btn)
      return
    }
@@ -282,7 +281,6 @@
    let requireFields = searches.filter(item => item.required && item.value === '')
    if (requireFields.length > 0) {
      btn && this.execSuccess(btn)
      return
    }
@@ -296,34 +294,25 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      let _group = group
      if (btn) {
        this.setState({
          data: _data || {},
          loading: false
        })
        this.execSuccess(btn)
      } else {
        let _group = group
        if (type === 'refresh') {
          _group = config.subcards[0]
        }
        if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
          let _status = _data[config.wrap.statusControl]
          let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
          _group = _groups || _group
        }
        this.setState({
          group: null,
          step: _group.sort - 1,
          data: _data || {},
          loading: false
        }, () => {
          this.setState({group: _group})
        })
      if (type === 'refresh') {
        _group = config.subcards[0]
      }
      if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
        let _status = _data[config.wrap.statusControl]
        let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
        _group = _groups || _group
      }
      this.setState({
        group: null,
        step: _group.sort - 1,
        data: _data || {},
        loading: false
      }, () => {
        this.setState({group: _group})
      })
    } else {
      this.setState({
        loading: false,
@@ -333,7 +322,6 @@
        message: result.message,
        duration: 10
      })
      btn && this.execSuccess(btn)
    }
  }
@@ -393,7 +381,7 @@
          dict={dict}
          data={data}
          action={group}
          inputSubmit={this.handleOk}
          inputSubmit={() => this.mkFormSubmit(group.uuid)}
          wrappedComponentRef={(inst) => this.formRef = inst}
        /> : null}
        {group && data ? <div className={'mk-form-action ' + (group.$button || '')}>
src/tabviews/custom/components/form/normal-form/index.scss
@@ -4,7 +4,7 @@
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  min-height: 200px;
  min-height: 50px;
  .mk-normal-form-title {
    display: flex;
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -103,19 +103,10 @@
      return group
    })
    let _group = config.subcards[0]
    if (_data && config.wrap.statusControl && _data[config.wrap.statusControl]) {
      let _status = _data[config.wrap.statusControl]
      let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
      _group = _groups || _group
    }
    this.setState({
      sync: _sync,
      data: _data,
      group: _group,
      group: config.subcards[0],
      BID: BID || '',
      config: config,
      arr_field: config.columns.map(col => col.field).join(','),
@@ -162,13 +153,10 @@
          _data = _data[0] || {}
        }
      }
      if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
        let _status = _data[config.wrap.statusControl]
        let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
        _group = _groups || _group
      }
      this.setState({sync: false, data: _data, group: _group})
      this.setState({sync: false, data: _data, group: null}, () => {
        this.setState({group: _group})
      })
    } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
        this.loadData()
@@ -181,7 +169,7 @@
    if (config.uuid !== menuId) return
    this.loadData(null, 'refresh')
    this.loadData()
  }
  /**
@@ -204,7 +192,7 @@
    }
    if (config.wrap.datatype !== 'static' && config.setting) {
      this.loadData(btn)
      this.loadData()
    }
    this.execSuccess(btn, id)
@@ -249,7 +237,7 @@
    }
  }
  async loadData (btn, type) {
  async loadData () {
    const { mainSearch, menuType } = this.props
    const { config, arr_field, BID, group } = this.state
@@ -257,7 +245,6 @@
      this.setState({
        data: {}
      })
      btn && this.execSuccess(btn)
      return
    }
@@ -265,7 +252,6 @@
    let requireFields = searches.filter(item => item.required && item.value === '')
    if (requireFields.length > 0) {
      btn && this.execSuccess(btn)
      return
    }
@@ -280,32 +266,15 @@
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      if (btn) {
        this.setState({
          data: _data || {},
          loading: false
        })
        this.execSuccess(btn)
      } else {
        let _group = group
      let _group = group
        if (type === 'refresh') {
          _group = config.subcards[0]
        }
        if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
          let _status = _data[config.wrap.statusControl]
          let _groups = config.subcards.filter(item => item.setting.status === _status)[0]
          _group = _groups || _group
        }
        this.setState({
          group: null,
          data: _data || {},
          loading: false
        }, () => {
          this.setState({group: _group})
        })
      }
      this.setState({
        group: null,
        data: _data || {},
        loading: false
      }, () => {
        this.setState({group: _group})
      })
    } else {
      this.setState({
        loading: false,
@@ -315,7 +284,6 @@
        message: result.message,
        duration: 10
      })
      btn && this.execSuccess(btn)
    }
  }
@@ -360,7 +328,7 @@
          dict={dict}
          data={data}
          action={group}
          inputSubmit={this.handleOk}
          inputSubmit={() => this.mkFormSubmit(group.uuid)}
          wrappedComponentRef={(inst) => this.formRef = inst}
        /> : null}
        {group && data ? <div className={'mk-form-action ' + (group.$button || '')}>
src/tabviews/custom/components/form/tab-form/index.scss
@@ -4,7 +4,7 @@
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  min-height: 200px;
  min-height: 50px;
  .mk-normal-form-title {
    display: flex;
@@ -16,6 +16,7 @@
      position: relative;
      flex: 1;
      text-align: center;
      cursor: pointer;
    }
  }
  .mk-normal-form-title.mkbtn {
src/tabviews/custom/components/group/normal-group/index.jsx
@@ -25,6 +25,7 @@
const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form'))
const TabForm = asyncComponent(() => import('@/tabviews/custom/components/form/tab-form'))
const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree'))
const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card'))
@@ -133,11 +134,9 @@
    if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />)
    return config.components.map(item => {
      let _bid = ''
      if (bids && item.setting && item.setting.supModule) {
        _bid = bids[item.setting.supModule] || ''
      } else if (!bids && BID && (!item.setting || !item.setting.supModule)) {
        _bid = BID
      let _bid = BID || ''
      if (item.setting && item.setting.supModule) {
        _bid = bids ? bids[item.setting.supModule] || '' : ''
      }
      if (item.type === 'bar' || item.type === 'line') {
@@ -158,12 +157,18 @@
            <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form') {
      } else if (item.type === 'form' && item.subtype === 'stepform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form' && item.subtype === 'tabform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'scatter') {
        return (
          <Col span={item.width} key={item.uuid}>
src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -28,6 +28,7 @@
const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form'))
const TabForm = asyncComponent(() => import('@/tabviews/custom/components/form/tab-form'))
const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree'))
const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card'))
@@ -155,7 +156,7 @@
    if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />)
    return config.components.map(item => {
      let BID = ''
      let BID = this.props.BID || ''
      if (item.setting && item.setting.supModule) {
        BID = bids[item.setting.supModule] || ''
      }
@@ -187,13 +188,13 @@
      } else if (item.type === 'search') {
        return (
          <Col span={item.width} key={item.uuid}>
            <MainSearch config={item} menuType={menuType} refreshdata={this.resetSearch} />
            <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} />
          </Col>
        )
      } else if (item.type === 'tabs') {
        return (
          <Col span={item.width} key={item.uuid}>
            <AntvTabs config={item} bids={bids} mainSearch={mainSearch} menuType={menuType} />
            <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'card' && item.subtype === 'datacard') {
@@ -235,15 +236,21 @@
      } else if (item.type === 'group' && item.subtype === 'normalgroup') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalGroup config={item} bids={bids} mainSearch={mainSearch} menuType={menuType} />
            <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form') {
      } else if (item.type === 'form' && item.subtype === 'stepform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form' && item.subtype === 'tabform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <TabForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'tree') {
        return (
          <Col span={item.width} key={item.uuid}>
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -138,7 +138,7 @@
   */
  async loadmaindata (reset, repage) {
    const { mainSearch } = this.props
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize } = this.state
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    if (setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -191,6 +191,7 @@
          item.key = index
          item.$$uuid = item[setting.primaryKey] || ''
          item.$$BID = BID || ''
          item.$$BData = BData || ''
          item.$Index = start + index + ''
          return item
        }),
@@ -218,7 +219,7 @@
   */ 
  async loadmainLinedata (id) {
    const { mainSearch } = this.props
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize } = this.state
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch && mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -245,6 +246,7 @@
        let _data = result.data[0] || {}
        _data.$$uuid = _data[setting.primaryKey] || ''
        _data.$$BID = BID || ''
        _data.$$BData = BData || ''
        try {
          data = data.map(item => {
            if (item.$$uuid === _data.$$uuid) {
src/tabviews/custom/components/tabs/antv-tabs/index.jsx
@@ -12,6 +12,7 @@
class antvTabs extends Component {
  static propTpyes = {
    BID: PropTypes.any,              // 页面BID
    bids: PropTypes.any,             // 父级Id集
    config: PropTypes.object,        // 组件配置信息
    mainSearch: PropTypes.any,       // 外层搜索条件
@@ -62,7 +63,7 @@
  }
  render() {
    const { mainSearch } = this.props
    const { mainSearch, BID } = this.props
    const { tabs, bids } = this.state
    return (
@@ -70,7 +71,7 @@
        <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}>
          {tabs.subtabs.map(tab => (
            <TabPane tab={<span>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>} key={tab.uuid}>
              <TabTransfer config={tab} bids={bids} mainSearch={mainSearch}/>
              <TabTransfer BID={BID} config={tab} bids={bids} mainSearch={mainSearch}/>
            </TabPane>
          ))}
        </Tabs>
src/tabviews/custom/index.jsx
@@ -24,6 +24,7 @@
const DataCard = asyncComponent(() => import('./components/card/data-card'))
const PropCard = asyncComponent(() => import('./components/card/prop-card'))
const NormalForm = asyncComponent(() => import('./components/form/normal-form'))
const TabForm = asyncComponent(() => import('./components/form/tab-form'))
const CarouselDataCard = asyncComponent(() => import('./components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('./components/carousel/prop-card'))
const TableCard = asyncComponent(() => import('./components/card/table-card'))
@@ -983,7 +984,8 @@
      viewlost: false,      // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用
      config: null,         // 页面配置信息,包括组件等
      loading: false,       // 列表数据加载中
      shortcuts: null
      shortcuts: null,
      data: ''
    }, () => {
      this.loadconfig()
    })
@@ -1031,10 +1033,16 @@
            <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form') {
      } else if (item.type === 'form' && item.subtype === 'stepform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form' && item.subtype === 'tabform') {
        return (
          <Col span={item.width} key={item.uuid}>
            <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'search') {
@@ -1046,7 +1054,7 @@
      } else if (item.type === 'tabs') {
        return (
          <Col span={item.width} key={item.uuid}>
            <AntvTabs config={item} mainSearch={mainSearch} />
            <AntvTabs config={item} BID={BID} mainSearch={mainSearch} />
          </Col>
        )
      } else if (item.type === 'card' && item.subtype === 'datacard') {
src/templates/modalconfig/index.jsx
@@ -97,22 +97,12 @@
    // 主菜单已有选择的表名,模态框没有表名时,复制主菜单表名
    _config.tables = _config.tables.length === 0 ? _menu.tables : _config.tables
    let _source = fromJS(SearchItems).toJS()
    if (!!this.props.editTab) {
      _source.push({
        type: 'form',
        label: this.state.dict['header.form.linkMain'],
        subType: 'linkMain',
        url: ''
      })
    }
    _config = updateForm(_config)
    this.setState({
      openEdition: editAction.open_edition || '',
      menu: _menu,
      source: _source,
      config: _config,
      originConfig: fromJS(_config).toJS(),
      modalformlist: [
@@ -611,7 +601,7 @@
  }
  render () {
    const { config, source, dict } = this.state
    const { config, dict } = this.state
    return (
      <div className="modal-form-board">
@@ -632,7 +622,7 @@
              </Panel>
              <Panel header={dict['header.menu.form']} key="1">
                <div className="search-element">
                  {source.map((item, index) => {
                  {SearchItems.map((item, index) => {
                    return (<SourceElement key={index} content={item}/>)
                  })}
                </div>
src/templates/modalconfig/source.jsx
@@ -81,115 +81,101 @@
    type: 'form',
    label: CommonDict['model.form.text'],
    subType: 'text',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.number'],
    subType: 'number',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.select'],
    subType: 'select',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.multiselect'],
    subType: 'multiselect',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.link'],
    subType: 'link',
    url: ''
  },
  {
    type: 'form',
    label: '开关',
    subType: 'switch',
    url: ''
  },
  {
    type: 'form',
    label: '多选框',
    subType: 'checkbox',
    url: ''
  },
  {
    type: 'form',
    label: '单选框',
    subType: 'radio',
    url: ''
  },
  {
    type: 'form',
    label: '选项卡',
    subType: 'checkcard',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['header.form.fileupload'],
    subType: 'fileupload',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.dateday'],
    subType: 'date',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.datemonth'],
    subType: 'datemonth',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.datetime'],
    subType: 'datetime',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.textarea'],
    subType: 'textarea',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['model.form.color'],
    subType: 'color',
    url: ''
  },
  {
    type: 'form',
    label: '富文本',
    subType: 'brafteditor',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['header.form.funcvar'],
    subType: 'funcvar',
    url: ''
  },
  {
    type: 'form',
    label: '提示',
    subType: 'hint',
    url: ''
  },
  {
    type: 'form',
    label: '分割线',
    subType: 'split',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['header.form.linkMain'],
    subType: 'linkMain',
  }
]
src/templates/sharecomponent/searchcomponent/index.scss
@@ -14,7 +14,7 @@
    position: absolute;
    z-index: 1;
    right: 20px;
    bottom: 10px;
    bottom: 5px;
  }
  > .ant-row {
    min-height: 65px;
src/templates/zshare/formconfig.jsx
@@ -2228,6 +2228,9 @@
  }, {
    value: 'split',
    text: '分隔线'
  }, {
    value: 'linkMain',
    text: Formdict['header.form.linkMain']
  }]
  let _fieldlength = 50
@@ -2282,11 +2285,6 @@
      value: 'split',
      text: '分隔线'
    }]
  } else if (subtable) {
    _openType.push({
      value: 'linkMain',
      text: Formdict['header.form.linkMain']
    })
  }
  if (['fileupload', 'multiselect', 'checkbox'].includes(card.type)) {
src/views/menudesign/index.jsx
@@ -103,6 +103,7 @@
    MKEmitter.addListener('thawButtons', this.thawButtons)
    MKEmitter.addListener('copyButtons', this.copyButtons)
    MKEmitter.addListener('changePopview', this.initPopview)
    MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    setTimeout(() => {
@@ -123,8 +124,15 @@
    MKEmitter.removeListener('thawButtons', this.thawButtons)
    MKEmitter.removeListener('copyButtons', this.copyButtons)
    MKEmitter.removeListener('changePopview', this.initPopview)
    MKEmitter.removeListener('triggerMenuSave', this.triggerMenuSave)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
  triggerMenuSave = () => {
    if (this.state.visible) return
    this.submitConfig()
  }
  getAppPictures = () => {
@@ -783,6 +791,7 @@
            menuloading: false
          })
        }
        MKEmitter.emit('completeSave')
      })
    }, 300)
  }
src/views/mobdesign/index.jsx
@@ -132,6 +132,7 @@
      return
    }
    MKEmitter.addListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.addListener('triggerMenuSave', this.submitConfig)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    setTimeout(() => {
@@ -150,6 +151,7 @@
      return
    }
    MKEmitter.removeListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.removeListener('triggerMenuSave', this.submitConfig)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
@@ -1063,6 +1065,7 @@
            menuloading: false
          })
        }
        MKEmitter.emit('completeSave')
      })
    }, 300)
  }
src/views/pcdesign/index.jsx
@@ -127,6 +127,7 @@
    MKEmitter.addListener('copyButtons', this.copyButtons)
    MKEmitter.addListener('changePopview', this.initPopview)
    MKEmitter.addListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    setTimeout(() => {
@@ -149,8 +150,15 @@
    MKEmitter.removeListener('copyButtons', this.copyButtons)
    MKEmitter.removeListener('changePopview', this.initPopview)
    MKEmitter.removeListener('changeEditMenu', this.changeEditMenu)
    MKEmitter.removeListener('triggerMenuSave', this.triggerMenuSave)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
  triggerMenuSave = () => {
    if (this.state.visible) return
    this.submitConfig()
  }
  changeEditMenu = (menu) => {
@@ -1313,6 +1321,7 @@
            menuloading: false
          })
        }
        MKEmitter.emit('completeSave')
      })
    }, 300)
  }