king
2023-03-09 6f09319def608286218e562d8b270ee9e58444b4
2023-03-09
13个文件已修改
128 ■■■■ 已修改文件
src/menu/components/editor/braft-editor/index.jsx 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/editor/braft-editor/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/index.jsx
@@ -76,6 +76,10 @@
    }
  }
  componentDidMount() {
    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -86,6 +90,21 @@
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
  }
  mkUpdateInter = (inter, split) => {
    const { card } = this.state
    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
      let _card = {...card, columns: fromJS(inter.columns).toJS()}
      split.delay = split.delay + 10
      setTimeout(() => {
        this.updateComponent(_card)
      }, split.delay)
    }
  }
@@ -144,7 +163,21 @@
  }
  updateWrap = (res) => {
    this.updateComponent({...this.state.card, wrap: res})
    const { card } = this.state
    let _card = {...card, wrap: res}
    if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
      }
    }
    this.updateComponent(_card)
  }
  clickComponent = (e) => {
@@ -178,8 +211,7 @@
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            <EditorContent config={card} updateConfig={this.updateComponent}/>
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/menu/components/editor/braft-editor/options.jsx
@@ -69,6 +69,7 @@
      ],
      controlFields: [
        {field: 'field', values: ['dynamic', 'public']},
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'publicId', values: ['public']},
        {field: 'encryption', values: ['dynamic', 'public']},
      ]
@@ -86,7 +87,7 @@
      field: 'field',
      label: '文本字段',
      initval: wrap.field || '',
      tooltip: '选择动态值时,需设置文本字段才可生效。',
      tooltip: '选择动态值时,需设置文本字段才可生效,使用公共数据源时,需先保存数据源后再选取文本字段。',
      required: false,
      options: columns
    },
@@ -104,6 +105,19 @@
    },
    {
      type: 'radio',
      field: 'empty',
      label: '空值隐藏',
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},
      ],
    },
    {
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
src/menu/components/form/simple-form/index.jsx
@@ -461,7 +461,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
@@ -672,7 +672,7 @@
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        <div className="form-area">
        <div className={`form-area mk-${card.wrap.formStyle || ''}`}>
          <PlusOutlined className="plus" title="添加表单" onClick={this.addForm}/>
          <FieldsComponent config={card.subcards[0]} type="form" plusFields={this.plusFields} />
          <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>清空</span>
src/menu/components/form/simple-form/options.jsx
@@ -159,6 +159,18 @@
    },
    {
      type: 'radio',
      field: 'formStyle',
      label: '表单样式',
      initval: wrap.formStyle || '',
      required: false,
      options: [
        {value: '', label: '默认'},
        {value: 'shadow', label: '阴影'},
      ],
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      field: 'goback',
      label: '空值返回',
      initval: wrap.goback || 'false',
src/menu/components/form/step-form/index.jsx
@@ -563,7 +563,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
@@ -830,7 +830,7 @@
          closeGroup={this.closeGroup}
          selectGroup={this.selectGroup}
        />
        {group ? <div className="form-area">
        {group ? <div className={`form-area mk-${card.wrap.formStyle || ''}`}>
          <PlusOutlined className="plus" title="添加表单" onClick={this.addForm}/>
          <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
          <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>清空</span>
src/menu/components/form/step-form/options.jsx
@@ -124,6 +124,18 @@
    },
    {
      type: 'radio',
      field: 'formStyle',
      label: '表单样式',
      initval: wrap.formStyle || '',
      required: false,
      options: [
        {value: '', label: '默认'},
        {value: 'shadow', label: '阴影'},
      ],
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      field: 'goback',
      label: '空值返回',
      initval: wrap.goback || 'false',
src/menu/components/form/tab-form/index.jsx
@@ -568,7 +568,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
@@ -832,7 +832,7 @@
          closeGroup={this.closeGroup}
          selectGroup={this.selectGroup}
        />
        {group ? <div className="form-area">
        {group ? <div className={`form-area mk-${card.wrap.formStyle || ''}`}>
          <PlusOutlined className="plus" title="添加表单" onClick={this.addForm}/>
          <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
          <span style={{color: 'red', marginLeft: '30px', cursor: 'pointer'}} onClick={this.clearGroup}>清空</span>
src/menu/modalconfig/index.jsx
@@ -265,7 +265,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
src/mob/modalconfig/index.jsx
@@ -261,7 +261,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
src/tabviews/custom/components/editor/braft-editor/index.jsx
@@ -31,7 +31,7 @@
    const { data, initdata } = this.props
    let _config = fromJS(this.props.config).toJS()
    let _data = {}
    let _data = { $$empty: true }
    let _sync = false
    let BID = ''
@@ -50,20 +50,18 @@
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
        _data = data[_config.dataName] || {}
        _data = data[_config.dataName] || {$$empty: true}
        if (_data && Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      } else if (_sync && initdata) {
        _data = initdata || {}
        _data = initdata
        if (_data && Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      }
    } else {
      _data = {}
    }
    if (_config.wrap.minHeight) {
@@ -116,11 +114,11 @@
    const { sync, config } = this.state
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = {}
      let _data = {$$empty: true}
      if (nextProps.data && nextProps.data[config.dataName]) {
        _data = nextProps.data[config.dataName]
        if (_data && Array.isArray(_data)) {
          _data = _data[0]
          _data = _data[0] || {$$empty: true}
        }
      }
@@ -172,13 +170,13 @@
    
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {},
        data: {$$empty: true},
        loading: false
      })
      return
    } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
        data: {},
        data: {$$empty: true},
        loading: false
      })
      return
@@ -200,7 +198,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true}
      this.setState({
        data: _data,
@@ -221,6 +219,8 @@
  render() {
    const { config, loading, data } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
    return (
      <div className="custom-braft-editor-box" id={'anchor' + config.uuid} style={config.style}>
        {loading ?
src/tabviews/zshare/mutilform/index.jsx
@@ -544,7 +544,7 @@
    let cache = action.setting.cache !== 'false'
    let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')
    let _sql = `Declare @mk_organization nvarchar(512)  select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n`
    let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)  select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n`
    let _sso = _sql
    deForms.forEach(item => {
@@ -666,7 +666,7 @@
  improveSimpleActionForm = (deForms) => {
    let cache = this.props.action.setting.cache !== 'false'
    let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')
    let _sql = `Declare @mk_organization nvarchar(512)  select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n`
    let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)  select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n`
    let deffers = deForms.map((form, index) => {
      let param = {
@@ -901,7 +901,7 @@
    formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.empty === 'hidden' && item.options.length === 0) return
      if (item.empty === 'hidden' && item.oriOptions.length === 0) return
      if (item.type === 'split') {
        fields.push(
src/templates/formtabconfig/index.jsx
@@ -518,7 +518,7 @@
          let param = {
            func: 's_debug_sql',
            exec_type: 'y',
            LText: `declare @mk_organization nvarchar(512)
            LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
              ${res.dataSource}`
          }
src/templates/modalconfig/index.jsx
@@ -399,7 +399,7 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_organization nvarchar(512)
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }