king
2021-09-27 1dbd8e07e440e9245f10777e9e8fd2fe2b05f6af
2021-09-27
7个文件已修改
78 ■■■■ 已修改文件
src/menu/components/form/normal-form/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.jsx
@@ -282,6 +282,14 @@
    this.props.updateConfig(card)
  }
  plusFields = (items) => {
    let _group = fromJS(this.state.group).toJS()
    _group.fields.push(...items)
    this.updateGroup(_group)
  }
  changecols = (type) => {
    let card = fromJS(this.state.card).toJS()
    let config = fromJS(this.state.group).toJS()
@@ -651,7 +659,7 @@
        />
        {group ? <div className="form-area">
          <Icon className="plus" title="添加表单" onClick={this.addForm} type="plus" />
          <FieldsComponent config={group} type="form" updatefield={this.updateGroup} />
          <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
          <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1列</Button> : null}
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2列</Button> : null}
src/menu/components/form/tab-form/index.jsx
@@ -273,6 +273,14 @@
    this.setState({card, group})
    this.props.updateConfig(card)
  }
  plusFields = (items) => {
    let _group = fromJS(this.state.group).toJS()
    _group.fields.push(...items)
    this.updateGroup(_group)
  }
  
  changecols = (type) => {
    let card = fromJS(this.state.card).toJS()
@@ -644,7 +652,7 @@
        />
        {group ? <div className="form-area">
          <Icon className="plus" title="添加表单" onClick={this.addForm} type="plus" />
          <FieldsComponent config={group} type="form" updatefield={this.updateGroup} />
          <FieldsComponent config={group} type="form" plusFields={this.plusFields} />
          <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1列</Button> : null}
          {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2列</Button> : null}
src/menu/modalconfig/index.jsx
@@ -87,7 +87,7 @@
    let _config = fromJS(this.state.config).toJS()
    if (list.length > _config.fields.length) {
      _config.fields = list.filter(item => !item.origin)
      _config.fields = list
      this.setState({
        config: _config
@@ -212,8 +212,6 @@
        })
        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({
@@ -414,10 +412,6 @@
  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)
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1530,6 +1530,7 @@
   */
  execError = (res) => {
    const { btn } = this.props
    const { btnconfig } = this.state
    if (res.ErrCode === 'E') {
      Modal.error({
@@ -1599,6 +1600,10 @@
      }
    }
    if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
      MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
    }
    if (btn.execError !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn)
    }
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1241,6 +1241,7 @@
   */
  execError = (res) => {
    const { btn } = this.props
    const { btnconfig } = this.state
    if (res.ErrCode === 'E') {
      Modal.error({
@@ -1267,6 +1268,10 @@
      loading: false
    })
    if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
      MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
    }
    if (btn.execError !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn)
    }
src/templates/modalconfig/index.jsx
@@ -677,11 +677,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>
@@ -763,7 +759,6 @@
        >
          <SettingForm
            config={config}
            dict={dict}
            isSubTab={!!this.props.editTab}
            inputSubmit={this.settingSave}
            wrappedComponentRef={(inst) => this.settingRef = inst}
src/templates/modalconfig/settingform/index.jsx
@@ -7,7 +7,6 @@
class SettingForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,     // 字典项
    config: PropTypes.object,   // 表单配置信息
    isSubTab: PropTypes.bool,   // 是否为子标签
    inputSubmit: PropTypes.any  // 回车提交事件
@@ -64,7 +63,7 @@
  }
  render() {
    const { config, dict } = this.props
    const { config } = this.props
    const { fields, appType, display } = this.state
    const { getFieldDecorator } = this.props.form
@@ -115,17 +114,15 @@
            </Form.Item>
          </Col> : null}
          <Col span={12}>
            <Form.Item label="焦点">
            <Form.Item label="初始焦点">
              {getFieldDecorator('focus', {
                initialValue: config.setting.focus || ''
              })(
                <Select
                  showSearch
                  allowClear
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  <Select.Option value="">
                    {dict['model.empty']}
                  </Select.Option>
                  {fields.map(option =>
                    <Select.Option id={option.uuid} title={option.label} key={option.uuid} value={option.field}>
                      {option.label}
@@ -135,6 +132,30 @@
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="执行失败时需要聚焦的表单。">
                <Icon type="question-circle" />
                失败焦点
              </Tooltip>
            }>
              {getFieldDecorator('errFocus', {
                initialValue: config.setting.errFocus || ''
              })(
                <Select
                  showSearch
                  allowClear
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                >
                  {fields.map(option =>
                    <Select.Option key={option.uuid} value={option.uuid}>
                      {option.label}
                    </Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col>
          {appType !== 'mob' ? <Col span={12}>
            <Form.Item label="表单排列">
              {getFieldDecorator('align', {