|
@@ -7,8 +7,8 @@
|
|
|
:class="[{'liSelect':item.select,'noBorder':((item.description||item.name).indexOf('${'))!=-1}]"
|
|
|
:key="item.id"
|
|
|
>
|
|
|
- <span v-if="((item.description||item.name).indexOf('${'))==-1">{{item.description||item.name}}</span>
|
|
|
- <OptionInp v-else :item="item" @handleInp="inpVal" :inx="idx"/>
|
|
|
+ <span v-if="((item.description||item.name).indexOf('${'))==-1">{{item.description||item.name}}s</span>
|
|
|
+ <OptionInp v-else :item="item" @handleInp="inpVal" @handleSelect="selectResult(item,idx)" :inx="idx"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div :class="sure?'realSure sure':'sure'" @click="makeSuer">
|
|
@@ -130,19 +130,19 @@ export default {
|
|
|
this.$emit("updataResult", this.symptomResult, {val:tmpResult.join('、'),valp:tmpResultp.join('、')},++number);
|
|
|
|
|
|
},
|
|
|
- /*selectResult(item,idx) {
|
|
|
+ selectResult(item,idx) {
|
|
|
const { exclusion, select } = item;
|
|
|
let result = JSON.parse(JSON.stringify(this.result));
|
|
|
if (select) {//判断是否选中,选中的取消,关联id删除,未选中判断是否互斥
|
|
|
for (let i = 0; i < result.length; i++) {
|
|
|
- if(i == idx){
|
|
|
+ if(i == idx&&!result[i].value){
|
|
|
result[i].select = false
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
if(+exclusion === 1){
|
|
|
for (let i = 0; i < result.length; i++) {
|
|
|
- if(i == idx){
|
|
|
+ if(i == idx&&result[i].value){
|
|
|
result[i].select = true
|
|
|
}else{
|
|
|
result[i].select = false
|
|
@@ -153,7 +153,7 @@ export default {
|
|
|
if(result[i].select&&+result[i].exclusion === 1){
|
|
|
result[i].select=false
|
|
|
}else{
|
|
|
- if(i == idx){
|
|
|
+ if(i == idx&&result[i].value){
|
|
|
result[i].select = true
|
|
|
}
|
|
|
}
|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.result = result
|
|
|
- }*/
|
|
|
+ }
|
|
|
},
|
|
|
components:{
|
|
|
OptionInp
|