| | |
| | | if (values.OpenType === 'excelIn') { |
| | | values.position = 'toolbar' |
| | | } else if (values.OpenType === 'excelOut') { |
| | | if (values.intertype === 'inner' && !values.innerFunc) { |
| | | if ((setting.interType === 'inner' && setting.innerFunc) || setting.interType === 'outer') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '表格数据查询未使用数据源,导出Excel使用内部接口时,需自定义内部函数!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (values.intertype === 'system' && setting.interType !== 'system') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '表格数据查询未使用数据源,导出Excel使用内部接口时,需自定义内部函数!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | values.position = 'toolbar' |
| | |
| | | } |
| | | |
| | | // 创建存储过程,必须填写内部函数名 |
| | | if (!btn.innerFunc) { |
| | | if (btn.intertype !== 'inner') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请填写内部函数!', |
| | | message: '使用内部函数时,才可以创建存储过程!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | |
| | | window.open(url) |
| | | } else if (btn.pageTemplate === 'custom') { |
| | | let url = btn.url |
| | | let con = '?' |
| | | |
| | | if (/\?/ig.test(url)) { |
| | | con = '&' |
| | | } |
| | | |
| | | if (btn.Ot === 'requiredSgl' && btn.joint !== 'false') { |
| | | url = url + `?id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` |
| | | url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` |
| | | } else if (btn.Ot === 'requiredSgl' && btn.joint === 'false') { |
| | | url = url + `?id=${Id}` |
| | | url = url + `${con}id=${Id}` |
| | | } else if (btn.joint !== 'false') { |
| | | url = url + `?appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` |
| | | url = url + `${con}appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` |
| | | } |
| | | |
| | | window.open(url) |
| | |
| | | }) |
| | | |
| | | |
| | | if (((config.setting.interType === 'inner' && !config.setting.innerFunc) || config.setting.interType === 'system') && config.setting.default !== 'false' && !config.setting.dataresource) { |
| | | if (config.setting.interType === 'system' && config.setting.default !== 'false' && !config.setting.dataresource) { |
| | | return '菜单尚未设置数据源,不可启用!' |
| | | } else if (!config.setting.primaryKey) { |
| | | return '菜单尚未设置主键,不可启用!' |
| | |
| | | } else if (_opentype === 'outerpage') { |
| | | card.pageTemplate = 'custom' |
| | | _opentype = 'innerpage' |
| | | } else if (_opentype === 'blank') { |
| | | _opentype = 'tab' |
| | | } |
| | | |
| | | let _tabs = this.props.tabs.filter(tab => tab.type === _tabType) |
| | |
| | | } |
| | | |
| | | // 创建存储过程,必须填写内部函数名 |
| | | if (!btn.innerFunc) { |
| | | if (btn.intertype !== 'inner') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请填写内部函数!', |
| | | message: '使用内部函数时,才可以创建存储过程!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | |
| | | const { actionlist, visible, card, dict, copying, profVisible } = this.state |
| | | |
| | | let hasbtncrtinter = false |
| | | if (card && !card.copyType && config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.dataresource) { |
| | | if (card && !card.copyType && config.setting.interType === 'system' && config.setting.dataresource) { |
| | | hasbtncrtinter = true |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | if (config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.default !== 'false' && !config.setting.dataresource) { |
| | | if (config.setting.interType === 'system' && config.setting.default !== 'false' && !config.setting.dataresource) { |
| | | return '尚未设置数据源,不可启用!' |
| | | } else if (!config.setting.primaryKey) { |
| | | return '尚未设置主键,不可启用!' |
| | |
| | | * @description 触发创建写入接口(按钮) |
| | | */ |
| | | triggerInInterface = (btn, config, menu) => { |
| | | if (!['pop', 'exec', 'prompt'].includes(btn.OpenType) || btn.funcType || btn.intertype !== 'inner' || btn.innerFunc ) { |
| | | if (!['pop', 'exec', 'prompt'].includes(btn.OpenType) || btn.funcType || btn.intertype !== 'system') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '打开方式为 弹窗(表单)、提示框或直接执行,且使用系统函数时,才可以创建接口!', |