| | |
| | | return group |
| | | }) |
| | | |
| | | let error = false |
| | | |
| | | _groups = _groups.map(group => { |
| | | group.sublist = group.sublist.map(item => { |
| | | if (item.type === 'link') { |
| | | let supItem = _formlist.filter(form => form.field === item.linkField)[0] |
| | | |
| | | // 关联显示列中的字段值,通过该值过滤下拉选项 |
| | | if (!supItem && data && data.hasOwnProperty(item.linkField)) { |
| | | supItem = {initval: data[item.linkField]} |
| | | } |
| | | |
| | | if (!supItem) { |
| | | error = true |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未查询到表单《' + item.label + '》关联字段!', |
| | | duration: 10 |
| | | }) |
| | | } else { |
| | | item.options = item.oriOptions.filter(option => option.parentId === supItem.initval) |
| | | } |
| | |
| | | |
| | | return group |
| | | }) |
| | | |
| | | if (error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '关联菜单设置错误!', |
| | | duration: 10 |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | readtype: readtype, |