| | |
| | | }) |
| | | } |
| | | |
| | | _config.tabs = _config.tabs || [] |
| | | _config.tabgroups = _config.tabgroups || ['tabs'] |
| | | _config.setting.subtabs = _config.setting.subtabs || [] |
| | | // _config.tabs = _config.tabs || [] |
| | | // _config.tabgroups = _config.tabgroups || ['tabs'] |
| | | // _config.setting.subtabs = _config.setting.subtabs || [] |
| | | |
| | | this.setState({ |
| | | originActions: _oriActions, |
| | |
| | | initVal: card.OpenType, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'pop', |
| | | value: 'pop', |
| | | text: this.state.dict['header.form.popform'] |
| | | }, { |
| | | MenuID: 'prompt', |
| | | value: 'prompt', |
| | | text: this.state.dict['header.form.prompt'] |
| | | }, { |
| | | MenuID: 'exec', |
| | | value: 'exec', |
| | | text: this.state.dict['header.form.exec'] |
| | | }, { |
| | | MenuID: 'excelIn', |
| | | value: 'excelIn', |
| | | text: this.state.dict['header.form.excelIn'] |
| | | }, { |
| | | MenuID: 'excelOut', |
| | | value: 'excelOut', |
| | | text: this.state.dict['header.form.excelOut'] |
| | | }, { |
| | | MenuID: 'popview', |
| | | value: 'popview', |
| | | text: this.state.dict['header.form.popview'] |
| | | }, { |
| | | MenuID: 'tab', |
| | | value: 'tab', |
| | | text: this.state.dict['header.form.tab'] |
| | | }, { |
| | | MenuID: 'blank', |
| | | value: 'blank', |
| | | text: this.state.dict['header.form.blank'] |
| | | }, { |
| | | MenuID: 'innerpage', |
| | | value: 'innerpage', |
| | | text: this.state.dict['header.form.newpage.inner'] |
| | | }, { |
| | | MenuID: 'outerpage', |
| | | value: 'outerpage', |
| | | text: this.state.dict['header.form.newpage.outer'] |
| | | }] |
| | | }, { |
| | | type: 'select', |
| | | key: 'tabType', |
| | | label: this.state.dict['header.form.tabType'], |
| | | initVal: card.tabType || 'SubTable', |
| | | required: true, |
| | | options: [{ |
| | | value: 'SubTable', |
| | | text: this.state.dict['header.menu.tab.subtable'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkTab', |
| | | label: '关联标签', |
| | | initVal: card.linkTab || '', |
| | | required: false, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initVal: card.intertype, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'inner', |
| | | value: 'inner', |
| | | text: this.state.dict['header.form.interface.inner'] |
| | | }, { |
| | | MenuID: 'outer', |
| | | value: 'outer', |
| | | text: this.state.dict['header.form.interface.outer'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.position || 'toolbar', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'toolbar', |
| | | value: 'toolbar', |
| | | text: this.state.dict['header.form.toolbar'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | value: 'grid', |
| | | text: this.state.dict['header.form.grid'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.execSuccess || 'never', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'never', |
| | | value: 'never', |
| | | text: this.state.dict['header.form.refresh.never'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | value: 'grid', |
| | | text: this.state.dict['header.form.refresh.grid'] |
| | | }, { |
| | | MenuID: 'view', |
| | | value: 'view', |
| | | text: this.state.dict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.execError || 'never', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'never', |
| | | value: 'never', |
| | | text: this.state.dict['header.form.refresh.never'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | value: 'grid', |
| | | text: this.state.dict['header.form.refresh.grid'] |
| | | }, { |
| | | MenuID: 'view', |
| | | value: 'view', |
| | | text: this.state.dict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'popClose', |
| | | label: this.state.dict['header.form.popClose'], |
| | | initVal: card.popClose || 'never', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: this.state.dict['header.form.refresh.never'] |
| | | }, { |
| | | value: 'grid', |
| | | text: this.state.dict['header.form.refresh.grid'] |
| | | }, { |
| | | value: 'view', |
| | | text: this.state.dict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | |
| | | tooltipClass: 'middle', |
| | | required: false, |
| | | options: [{ |
| | | MenuID: 'S', |
| | | value: 'S', |
| | | text: 'S(提醒框-0)' |
| | | }, { |
| | | MenuID: '-1', |
| | | value: '-1', |
| | | text: '-1(不提示)' |
| | | }, { |
| | | MenuID: 'N', |
| | | value: 'N', |
| | | text: 'N(提醒框-1)' |
| | | }, { |
| | | MenuID: 'F', |
| | | value: 'F', |
| | | text: 'F(提醒框-2)' |
| | | }, { |
| | | MenuID: 'E', |
| | | value: 'E', |
| | | text: 'E(确认框)' |
| | | }, { |
| | | MenuID: 'NM', |
| | | value: 'NM', |
| | | text: 'NM(顶部提示)' |
| | | }] |
| | | }, |
| | |
| | | initVal: card.type, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'text', |
| | | value: 'text', |
| | | text: this.state.dict['header.form.text'] |
| | | }, { |
| | | MenuID: 'number', |
| | | value: 'number', |
| | | text: this.state.dict['header.form.number'] |
| | | }, { |
| | | MenuID: 'picture', |
| | | value: 'picture', |
| | | text: this.state.dict['header.form.picture'] |
| | | }, { |
| | | MenuID: 'textarea', |
| | | value: 'textarea', |
| | | text: this.state.dict['header.form.textarea'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.Align, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'left', |
| | | value: 'left', |
| | | text: this.state.dict['header.form.alignLeft'] |
| | | }, { |
| | | MenuID: 'right', |
| | | value: 'right', |
| | | text: this.state.dict['header.form.alignRight'] |
| | | }, { |
| | | MenuID: 'center', |
| | | value: 'center', |
| | | text: this.state.dict['header.form.alignCenter'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.Hide, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'true', |
| | | value: 'true', |
| | | text: this.state.dict['header.form.true'] |
| | | }, { |
| | | MenuID: 'false', |
| | | value: 'false', |
| | | text: this.state.dict['header.form.false'] |
| | | }] |
| | | }, |
| | |
| | | initVal: card.IsSort, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'true', |
| | | value: 'true', |
| | | text: this.state.dict['header.form.true'] |
| | | }, { |
| | | MenuID: 'false', |
| | | value: 'false', |
| | | text: this.state.dict['header.form.false'] |
| | | }] |
| | | }, |
| | |
| | | label: this.state.dict['header.form.format'], |
| | | initVal: card.format || '', |
| | | options: [{ |
| | | MenuID: '', |
| | | value: '', |
| | | text: this.state.dict['header.form.empty'] |
| | | }, { |
| | | MenuID: 'thdSeparator', |
| | | value: 'thdSeparator', |
| | | text: this.state.dict['header.form.thdSeparator'] |
| | | }], |
| | | required: false |
| | |
| | | label: this.state.dict['header.form.match'], |
| | | initVal: card.match || '', |
| | | options: [{ |
| | | MenuID: '', |
| | | value: '', |
| | | text: this.state.dict['header.form.empty'] |
| | | }, { |
| | | MenuID: '>', |
| | | value: '>', |
| | | text: '>' |
| | | }, { |
| | | MenuID: '<', |
| | | value: '<', |
| | | text: '<' |
| | | }, { |
| | | MenuID: '>=', |
| | | value: '>=', |
| | | text: '>=' |
| | | }, { |
| | | MenuID: '<=', |
| | | value: '<=', |
| | | text: '<=' |
| | | }], |
| | | required: false |
| | |
| | | label: this.state.dict['header.form.color'], |
| | | initVal: card.color || '', |
| | | options: [{ |
| | | MenuID: '', |
| | | value: '', |
| | | text: this.state.dict['header.form.empty'] |
| | | }, { |
| | | MenuID: 'red', |
| | | value: 'red', |
| | | text: '红色(内容)' |
| | | }, { |
| | | MenuID: 'redbg', |
| | | value: 'redbg', |
| | | text: '红色(背景)' |
| | | }, { |
| | | MenuID: 'orange', |
| | | value: 'orange', |
| | | text: '橙色(内容)' |
| | | }, { |
| | | MenuID: 'orangebg', |
| | | value: 'orangebg', |
| | | text: '橙色(背景)' |
| | | }, { |
| | | MenuID: 'green', |
| | | value: 'green', |
| | | text: '绿色(内容)' |
| | | }, { |
| | | MenuID: 'greenbg', |
| | | value: 'greenbg', |
| | | text: '绿色(背景)' |
| | | }], |
| | | required: false |
| | |
| | | _usedTabMap.set(subtab, true) |
| | | }) |
| | | }) |
| | | console.log(config) |
| | | |
| | | config.setting.subtabs.forEach(subtab => { // 主表已选的下级标签 |
| | | _usedTabMap.set(subtab, true) |
| | | }) |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'type', |
| | | label: this.state.dict['header.form.type'], |
| | | initVal: card.type || '', |
| | | label: this.state.dict['header.form.tabType'], |
| | | initVal: card.type || 'SubTable', |
| | | required: true, |
| | | options: [{ |
| | | value: 'SubTable', |
| | |
| | | * @description 设置可配置按钮 |
| | | */ |
| | | setSubConfig = (btn, type) => { |
| | | console.log(btn) |
| | | const { menu } = this.props |
| | | const { config, originMenu } = this.state |
| | | |
| | |
| | | message: '菜单配置已修改,请保存!', |
| | | duration: 10 |
| | | }) |
| | | } else if (type === 'button') { |
| | | } else { |
| | | this.setState({ |
| | | loading: true |
| | | }) |
| | | |
| | | let uuid = '' |
| | | let _type = type |
| | | if (type === 'button' && btn.OpenType === 'popview') { |
| | | _type = 'tab' |
| | | } |
| | | |
| | | if (_type === 'button') { |
| | | uuid = btn.uuid |
| | | } else { |
| | | uuid = btn.linkTab |
| | | } |
| | | |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: btn.uuid |
| | | MenuID: uuid |
| | | }).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | |
| | | _LongParam = '' |
| | | } |
| | | } |
| | | this.props.handleSubConfig(btn, originMenu, _LongParam, type) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | }) |
| | | } else if (type === 'tab') { |
| | | this.setState({ |
| | | loading: true |
| | | }) |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: btn.linkTab |
| | | }).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | } catch (e) { |
| | | _LongParam = '' |
| | | } |
| | | } |
| | | if (!_LongParam) { |
| | | |
| | | if (_type === 'tab' && !_LongParam) { |
| | | _LongParam = { |
| | | ...btn, |
| | | uuid: btn.linkTab, |
| | |
| | | } |
| | | } |
| | | |
| | | this.props.handleSubConfig(btn, originMenu, _LongParam, type) |
| | | this.props.handleSubConfig(btn, originMenu, _LongParam, _type) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | |
| | | <ActionForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | wrappedComponentRef={(inst) => this.formRef = inst} |
| | | /> : null |