|
@@ -9,7 +9,7 @@
|
|
|
@click="selectResult(item,idx)"
|
|
|
>
|
|
|
<span v-if="((item.description||item.name).indexOf('${'))==-1">{{item.description||item.name}}</span>
|
|
|
- <OptionInp v-else :item="item" @handleInp="inpVal" :inx="idx" @handleSelec="handleClick(item,idx,false,true)"/>
|
|
|
+ <OptionInp v-else :item="item" @handleInp="inpVal" :inx="idx"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div :class="sure?'realSure sure':'sure'" @click="makeSuer">
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
let currItem = detailList[index];
|
|
|
currItem.value = val;
|
|
|
},
|
|
|
- handleClick(it,index,flg,ipt){
|
|
|
+ /*handleClick(it,index,flg,ipt){
|
|
|
if(flg){
|
|
|
document.activeElement.blur();
|
|
|
document.activeElement.scrollIntoViewIfNeeded(true);
|
|
@@ -72,28 +72,7 @@ export default {
|
|
|
document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
},300)
|
|
|
}
|
|
|
- /*let data = it.questionDetailList&&it.questionDetailList.slice(0); //数组深拷贝
|
|
|
- if(ipt){//输入框单选,输入了内容才算选中,删除内容算取消
|
|
|
- for(let i=0;i<data.length; i++){
|
|
|
- if(i==index){
|
|
|
- data[i].select=data[i].value?1:0;
|
|
|
- }else{
|
|
|
- data[i].select = 0
|
|
|
- }
|
|
|
- }
|
|
|
- }else{
|
|
|
- for(let i=0;i<data.length; i++){
|
|
|
- if(i==index){
|
|
|
- data[i].select = data[i].select==1?0:1;
|
|
|
- }else{
|
|
|
- data[i].select = 0
|
|
|
- }
|
|
|
- }*/
|
|
|
- /*}
|
|
|
- let temp = concatVal(data);
|
|
|
- const newData = Object.assign({},this.datas,{questionDetailList:data,value:temp.value,valueP:temp.valueP});
|
|
|
- this.$emit("updata",newData);*/
|
|
|
- },
|
|
|
+ },*/
|
|
|
makeSuer() {
|
|
|
if(!this.sure){return}
|
|
|
let result = this.result;
|
|
@@ -104,23 +83,23 @@ export default {
|
|
|
const msg = getExpStr(text);
|
|
|
const msgp = getExpStr(text);
|
|
|
if(result[i].select){
|
|
|
- if(result[i].name.indexOf("${input")!==-1){
|
|
|
+ if(result[i].name.indexOf("${")!==-1){
|
|
|
tmpResult=msg.prefix+(result[i].value||"")+msg.suffix;
|
|
|
tmpResultp=msgp.prefix+(result[i].value||"")+msgp.suffix;
|
|
|
}else{
|
|
|
- tmpResult=text;
|
|
|
- tmpResultp=textp;
|
|
|
+ tmpResult=text||"无";
|
|
|
+ tmpResultp=textp||"无";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if(+this.symptomResult.flag===2){ //为诱因控件
|
|
|
const orgChoose = this.$store.state.symptom.choose;
|
|
|
- orgChoose[0].reason = tmpResult;
|
|
|
- orgChoose[0].reasonP = tmpResultp;
|
|
|
+ orgChoose[0].reason = tmpResult||"无";
|
|
|
+ orgChoose[0].reasonP = tmpResultp||"无";
|
|
|
this.$store.commit('setChoose', { choose: orgChoose, type: 1 });
|
|
|
}
|
|
|
//this.contentResult = tmpResult;
|
|
|
- this.$emit("updataResultSingle", this.symptomResult, {val:tmpResult,valp:tmpResultp,flag:this.symptomResult.flag},++number);
|
|
|
+ this.$emit("updataResultSingle", this.symptomResult, {val:tmpResult||"无",valp:tmpResultp||"无",flag:this.symptomResult.flag},++number);
|
|
|
},
|
|
|
selectResult(item,idx) {
|
|
|
const { select } = item;
|
|
@@ -177,6 +156,8 @@ export default {
|
|
|
.noBorder{
|
|
|
border: none;
|
|
|
width: 100%;
|
|
|
+ padding: 0 0.2rem;
|
|
|
+ margin: 0 0.15rem;
|
|
|
&.liSelect{
|
|
|
background: none;
|
|
|
span{
|