|
@@ -229,9 +229,15 @@ class SpreadDrop extends Component{
|
|
|
const linkStr = joint||'';
|
|
|
const name = item.name+linkStr;
|
|
|
if(isExclu){ //操作“互斥项”
|
|
|
- if([...noneIds,...exists,...withs].length>0){ //已选非互斥项,互斥项不可操作
|
|
|
+ if([...noneIds,...exists,...withs].length>0){ //已选非互斥项,清空已选项,选中该互斥项
|
|
|
+ this.clearState();
|
|
|
+ this.setState({
|
|
|
+ exclusion:id,
|
|
|
+ excluName:name
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
+ //未选中互斥项,直接选中该互斥项
|
|
|
let temp = '';
|
|
|
if(exclusion==''){
|
|
|
temp = id;
|
|
@@ -262,8 +268,11 @@ class SpreadDrop extends Component{
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
- if(exclusion!==''){ //互斥项被选中,其他不可操作
|
|
|
- return;
|
|
|
+ if(exclusion!==''){ //互斥项已选中,清空互斥项
|
|
|
+ this.setState({
|
|
|
+ exclusion:'',
|
|
|
+ excluName:''
|
|
|
+ });
|
|
|
}
|
|
|
if(+item.code===1){ //操作“伴”类型
|
|
|
this.setState({
|