| | |
| | | values.id = this.props.card.id |
| | | values.uuid = this.props.card.uuid |
| | | // 下拉菜单或关联菜单 |
| | | if ((values.type === 'select' || values.type === 'link') && values.resourceType === '0') { |
| | | if ((values.type === 'multiselect' || values.type === 'select' || values.type === 'link') && values.resourceType === '0') { |
| | | values.options = this.refs.editTable.state.dataSource |
| | | values.dataSource = '' |
| | | let emptys = [] |
| | | if (values.type === 'select') { |
| | | if (values.type === 'multiselect' || values.type === 'select') { |
| | | emptys = values.options.filter(op => !(op.Value && op.Text)) |
| | | } else { |
| | | emptys = values.options.filter(op => !(op.Value && op.Text && op.ParentID)) |
| | |
| | | if (emptys.length > 0) { |
| | | isvalid = false |
| | | } |
| | | } else if ((values.type === 'select' || values.type === 'link') && values.resourceType === '1') { |
| | | } else if ((values.type === 'multiselect' || values.type === 'select' || values.type === 'link') && values.resourceType === '1') { |
| | | values.options = [] |
| | | } |
| | | |