| | |
| | | initval: setting.open || 'blank', |
| | | required: false, |
| | | options: [ |
| | | {value: 'blank', label: '新窗口'}, |
| | | {value: 'self', label: '当前窗口'}, |
| | | {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ], |
| | | forbid: appType !== 'pc' |
| | | forbid: appType !== 'pc' && appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'open', |
| | | label: '打开方式', |
| | | initval: setting.open || 'blank', |
| | | required: false, |
| | | options: [ |
| | | {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ], |
| | | forbid: appType !== 'pc' && appType !== 'mob' |
| | | }, |
| | | { |
| | | type: appType ? 'select' : 'cascader', |
| | | field: 'menu', |
| | | label: '关联菜单', |
| | |
| | | required: true, |
| | | options: [], |
| | | span: 24 |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'open', |
| | | label: '打开方式', |
| | | initval: setting.open || 'blank', |
| | | required: false, |
| | | options: [ |
| | | {value: 'blank', label: '新窗口'}, |
| | | {value: 'self', label: '当前窗口'}, |
| | | ], |
| | | forbid: appType !== 'pc' |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | options: appType ? appmenulist : menulist, |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | field: 'linkurl', |
| | | label: '链接', |
| | | initval: setting.linkurl || '', |
| | | required: true, |
| | | options: [], |
| | | span: 24 |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'open', |
| | | label: '打开方式', |
| | | initval: setting.open || 'blank', |
| | | required: false, |
| | | options: [ |
| | | {value: 'blank', label: '新窗口'}, |
| | | {value: 'self', label: '当前窗口'}, |
| | | {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ], |
| | | forbid: appType !== 'pc' |
| | | forbid: appType !== 'pc' && appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | {value: 'false', label: '否'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | field: 'linkurl', |
| | | label: '链接', |
| | | initval: setting.linkurl || '', |
| | | required: true, |
| | | options: [], |
| | | span: 24 |
| | | }, |
| | | ] |
| | | |
| | | return cardSettingForm |
| | |
| | | formlist: null, // 表单信息 |
| | | interType: null, // 接口类型:内部、外部 |
| | | procMode: null, // 参数方式 |
| | | linkmenu: null |
| | | } |
| | | |
| | | |
| | |
| | | let _intertype = card.intertype || 'system' // 接口类型 |
| | | let _procMode = card.procMode || 'system' // 参数请求方式 |
| | | |
| | | let _options = this.getOptions(_intertype, _procMode) |
| | | let _options = this.getOptions(_intertype, _procMode, card.linkmenu) |
| | | |
| | | this.setState({ |
| | | interType: _intertype, |
| | | procMode: _procMode, |
| | | linkmenu: card.linkmenu, |
| | | formlist: this.props.formlist.map(item => { |
| | | if (item.key === 'innerFunc' && _procMode === 'inner') { |
| | | item.required = true |
| | |
| | | }) |
| | | } |
| | | |
| | | getOptions = (_intertype, _procMode) => { |
| | | getOptions = (_intertype, _procMode, linkmenu) => { |
| | | const { card } = this.props |
| | | |
| | | if (card.type === 'prev') { |
| | |
| | | } else if (card.type === 'next') { |
| | | return ['type', 'label', 'enable'] |
| | | } |
| | | let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'open', 'enable', 'output', 'reload'] // 选项列表 |
| | | let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'enable', 'output', 'reload'] // 选项列表 |
| | | |
| | | if (_intertype === 'custom') { |
| | | _options.pop() |
| | |
| | | _options.push('sql', 'sqlType') |
| | | } |
| | | |
| | | if (linkmenu && linkmenu !== 'goback') { |
| | | _options.push('open') |
| | | } |
| | | |
| | | return _options |
| | | } |
| | | |
| | |
| | | * 3、切换标签类型,重置可选标签 |
| | | */ |
| | | optionChange = (key, value) => { |
| | | const { procMode } = this.state |
| | | const { procMode, linkmenu } = this.state |
| | | |
| | | if (key === 'intertype') { |
| | | let _options = this.getOptions(value, procMode) |
| | | let _options = this.getOptions(value, procMode, linkmenu) |
| | | |
| | | this.setState({ |
| | | interType: value, |
| | |
| | | }) |
| | | }) |
| | | } else if (key === 'procMode') { |
| | | let _options = this.getOptions(this.state.interType, value) |
| | | let _options = this.getOptions(this.state.interType, value, linkmenu) |
| | | |
| | | this.setState({ |
| | | procMode: value, |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'linkmenu') { |
| | | let _options = this.getOptions(this.state.interType, procMode, value) |
| | | |
| | | this.setState({ |
| | | linkmenu: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'sysInterface') { |
| | | if (value === 'true') { |
| | | this.props.form.setFieldsValue({ |
| | |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: false, |
| | | forbid: appType !== 'pc', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | | }, { |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | options: [ |
| | | {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'hidden'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open', 'hidden'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], |
| | | form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'width', 'refreshTab', 'title', 'hidden'] |
| | | } |
| | |
| | | reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | | |
| | | if (this.record.pageTemplate === 'custom') { |
| | | shows.push('url', 'joint') |
| | | shows.push('url', 'joint', 'open') |
| | | } else if (this.record.pageTemplate === 'linkpage') { |
| | | shows.push('linkmenu') |
| | | shows.push('linkmenu', 'open') |
| | | |
| | | if (Ot === 'requiredSgl') { |
| | | shows.push('joint') |
| | |
| | | key: 'open', |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | tooltip: '菜单打开方式。注:移动端只在小程序或app中有效。', |
| | | tooltip: '菜单打开方式。', |
| | | required: true, |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | | }, { |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | options: [ |
| | | {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |