| | |
| | | const updateSetting = (res) => { |
| | | let _card = fromJS(card).toJS() |
| | | |
| | | let buttons = res.buttons |
| | | |
| | | delete res.buttons |
| | | |
| | | if (buttons) { |
| | | res.prevEnable = buttons.includes('prevEnable') ? 'true' : 'false' |
| | | res.subEnable = buttons.includes('subEnable') ? 'true' : 'false' |
| | | res.nextEnable = buttons.includes('nextEnable') ? 'true' : 'false' |
| | | } |
| | | |
| | | if (res.prevEnable) { |
| | | _card.prevButton.enable = res.prevEnable |
| | | delete res.prevEnable |
| | |
| | | }) |
| | | } |
| | | |
| | | let buttons = [] |
| | | |
| | | if (group.prevButton && group.prevButton.enable === 'true') { |
| | | buttons.push('prevEnable') |
| | | } |
| | | if (!group.subButton.enable || group.subButton.enable === 'true') { |
| | | buttons.push('subEnable') |
| | | } |
| | | if (group.nextButton && group.nextButton.enable === 'true') { |
| | | buttons.push('nextEnable') |
| | | } |
| | | |
| | | const groupForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'prevEnable', |
| | | label: '上一步', |
| | | initval: group.prevButton ? group.prevButton.enable || 'false' : 'false', |
| | | tooltip: '第一组不显示。注:除关闭功能外。', |
| | | type: 'checkbox', |
| | | field: 'buttons', |
| | | label: '按钮组', |
| | | initval: buttons, |
| | | tooltip: '上一步在第一组中不显示,跳过在最后一组不显示,注:除关闭功能外。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | {value: 'prevEnable', label: '上一步'}, |
| | | {value: 'subEnable', label: '提交'}, |
| | | {value: 'nextEnable', label: '跳过'}, |
| | | ], |
| | | forbid: !group.prevButton |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'prevEnable', |
| | | // label: '上一步', |
| | | // initval: group.prevButton ? group.prevButton.enable || 'false' : 'false', |
| | | // tooltip: '第一组不显示。注:除关闭功能外。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ], |
| | | // forbid: !group.prevButton |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'subEnable', |
| | |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'nextEnable', |
| | | label: '跳过', |
| | | initval: group.nextButton ? group.nextButton.enable || 'false' : 'false', |
| | | tooltip: '最后一组不显示。注:除关闭功能外。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ], |
| | | forbid: !group.nextButton |
| | | forbid: !!group.prevButton |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'nextEnable', |
| | | // label: '跳过', |
| | | // initval: group.nextButton ? group.nextButton.enable || 'false' : 'false', |
| | | // tooltip: '最后一组不显示。注:除关闭功能外。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ], |
| | | // forbid: !group.nextButton |
| | | // }, |
| | | ] |
| | | |
| | | return groupForm |
| | |
| | | |
| | | updateWrap = (res) => { |
| | | let _card = fromJS(this.state.card).toJS() |
| | | let buttons = res.buttons |
| | | |
| | | delete res.buttons |
| | | |
| | | res.enable = buttons.includes('enable') ? 'true' : 'false' |
| | | res.closeEnable = buttons.includes('closeEnable') ? 'true' : 'false' |
| | | |
| | | _card.wrap = res |
| | | |
| | | if (res.datatype === 'static') { |
| | |
| | | _card.subcards[0].setting.enable = _card.wrap.enable |
| | | _card.subcards[0].setting.verticalSpace = _card.wrap.verticalSpace |
| | | |
| | | |
| | | |
| | | if (_card.wrap.closeEnable === 'true' && !_card.subcards[0].closeButton) { |
| | | _card.subcards[0].closeButton = {label: '关闭', enable: 'true', type: 'close', style: {backgroundColor: '#ffffff', color: 'rgba(0,0,0,0.65)', borderColor: '#d9d9d9', borderWidth: '1px', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px', marginLeft: '10px'}} |
| | | } else if (_card.subcards[0].closeButton) { |
| | |
| | | } |
| | | } |
| | | |
| | | let buttons = [] |
| | | |
| | | if (!wrap.enable || wrap.enable === 'true') { |
| | | buttons.push('enable') |
| | | } |
| | | if (wrap.closeEnable === 'true') { |
| | | buttons.push('closeEnable') |
| | | } |
| | | |
| | | const wrapForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'enable', |
| | | label: '提交', |
| | | initval: wrap.enable || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'closeEnable', |
| | | label: '关闭', |
| | | initval: wrap.closeEnable || 'false', |
| | | type: 'checkbox', |
| | | field: 'buttons', |
| | | label: '按钮组', |
| | | initval: buttons, |
| | | tooltip: '管理系统中会关闭当前标签,子应用中为返回上一页。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ] |
| | | {value: 'enable', label: '提交'}, |
| | | {value: 'closeEnable', label: '关闭'}, |
| | | ], |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'enable', |
| | | // label: '提交', |
| | | // initval: wrap.enable || 'true', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ] |
| | | // }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'closeEnable', |
| | | // label: '关闭', |
| | | // initval: wrap.closeEnable || 'false', |
| | | // tooltip: '管理系统中会关闭当前标签,子应用中为返回上一页。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'true', label: '显示'}, |
| | | // {value: 'false', label: '隐藏'}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'formStyle', |
| | |
| | | |
| | | fieldArr.push('bid') |
| | | |
| | | let verIndex = _fields.findIndex(item => item.type === 'vercode') |
| | | if (verIndex > -1) { |
| | | _fields = fromJS(_fields).toJS() |
| | | _fields.splice(verIndex, 0, { |
| | | type: 'text', |
| | | fieldlength: 50, |
| | | writein: 'false', |
| | | field: 'mk_timestamp' |
| | | }, { |
| | | type: 'text', |
| | | fieldlength: 50, |
| | | writein: 'false', |
| | | field: 'mk_send_type' |
| | | }, { |
| | | type: 'text', |
| | | fieldlength: 50, |
| | | writein: 'false', |
| | | field: 'mk_n_id' |
| | | }) |
| | | } |
| | | |
| | | _fields = _fields.filter(_f => _f.field) |
| | | _fields.forEach(_f => { |
| | | if (_f.field.toLowerCase() === 'bid') { |