|
@@ -54,7 +54,7 @@
|
|
|
<!--普通单列拨盘-->
|
|
|
<Picker v-if="type==10" @confirm="updataResultSingle" :num="num" :defaultIndex = "defaultIndex"></Picker>
|
|
|
<!--时间拨盘,拨盘内容写死-->
|
|
|
- <Picker v-if="type == 9" :columns="getTimeColumns()" :defaultVal="pickDVal" @confirm="updataResultSingle" :num="num" :defaultIndex = "defaultIndex"></Picker>
|
|
|
+ <Picker v-if="type == 9" :symptomResult="symptomResult" :columns="getTimeColumns()" :defaultVal="pickDVal" @confirm="updataResultSingle" :num="num" :defaultIndex = "defaultIndex"></Picker>
|
|
|
<PushSymptom v-if="type == 99" @updataResult="updataResultSingle" :num="num"></PushSymptom>
|
|
|
<!-- 上传图片 -->
|
|
|
<UploadImg v-if="type==4"
|
|
@@ -78,7 +78,8 @@
|
|
|
<div class="submit" v-if="showPreview">
|
|
|
<a href="javascript:void(0)" @click="previewRes">提交并预览</a>
|
|
|
</div>
|
|
|
- <div v-if="wrong" class="tip">{{waring}}</div>
|
|
|
+ <!--<div v-if="wrong" class="tip">{{waring}}</div>-->
|
|
|
+ <TipWarning v-if="wrong" :text="waring" @close="closeTip"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -96,6 +97,7 @@ import PushSymptom from '../common/PushSymptom.vue';
|
|
|
import ConfirmBox from '../common/ConfirmBox'
|
|
|
import UsualSymptom from '../common/UsualSymptom';
|
|
|
import MultSelect from '../common/MultSelect.vue';
|
|
|
+import TipWarning from '../common/TipWarning.vue';
|
|
|
import api from "../utils/api.js";
|
|
|
import {mapState} from 'vuex';
|
|
|
import {moduleCP} from '@utils/tools'
|
|
@@ -114,10 +116,11 @@ export default {
|
|
|
selectedSymptom:{},
|
|
|
symptomResult:'',//症状选择
|
|
|
connectResult:[],//关联问题的id
|
|
|
- contentResult:'',//选中的结果name
|
|
|
+ contentResult:{},//选中的结果val医生端显示,valp患者端显示
|
|
|
allquestionLis:[],//症状详情所有的问题
|
|
|
diagQasList:[], //诊疗详情所有问题
|
|
|
otherQasList:[],//其他情况所有问题
|
|
|
+ moduleKeys:[1,51,3,52],
|
|
|
listMap:{
|
|
|
0:'allquestionLis',
|
|
|
1:'diagQasList',
|
|
@@ -132,8 +135,8 @@ export default {
|
|
|
order:0,
|
|
|
userInfo: {}, //用户信息
|
|
|
pdbm:'8.5rem',
|
|
|
- waring:'',
|
|
|
- wrong:false,
|
|
|
+ waring:'', //错误提示语
|
|
|
+ wrong:false, //是否显示错误toast
|
|
|
showConfirm: false,
|
|
|
time:1000,
|
|
|
}
|
|
@@ -214,11 +217,12 @@ export default {
|
|
|
this.type = -1;
|
|
|
let moduleName = this.listMap[this.activeTab];
|
|
|
let tmpArr = JSON.parse(JSON.stringify(this[moduleName]));
|
|
|
- tmpArr[num-1].content = contentResult;
|
|
|
+ tmpArr[num-1].content = contentResult.valp;
|
|
|
/*if(this.symptomResult.id===999999&&contentResult.indexOf("没有")!==-1){ //datas中show要处理
|
|
|
this[moduleName] = JSON.parse(JSON.stringify(this.$store.state.diagnose.datas));
|
|
|
}else{*/
|
|
|
this[moduleName] = tmpArr;
|
|
|
+ this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp,idx:contentResult.idx,flag:contentResult.flag });
|
|
|
/*}*/
|
|
|
console.log(this.$store.state); //最后一题答完
|
|
|
if(+num===this[moduleName].length){
|
|
@@ -226,6 +230,7 @@ export default {
|
|
|
this.showPreview=true;
|
|
|
return;
|
|
|
}
|
|
|
+ //this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp, pId: tmpNowItem.questionId,idx:'' });
|
|
|
const state = this.$store.state;
|
|
|
this.activeTab++; //进入下一个阶段问题
|
|
|
this.num = 0;
|
|
@@ -262,9 +267,13 @@ export default {
|
|
|
this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
|
|
|
})
|
|
|
},
|
|
|
+ closeTip(){
|
|
|
+ this.wrong=false;
|
|
|
+ },
|
|
|
selectUsual(sym){
|
|
|
this.getSymptomQas(sym.questionId); //获取症状下的关联问题
|
|
|
- this.$store.commit('setChoose', { choose: sym, type: moduleCP['symp'] });
|
|
|
+ sym.idx=1; //标记主诉
|
|
|
+ this.$store.commit('setChoose', { choose: [sym], type: moduleCP['symp'] });
|
|
|
this.selectedSymptom = sym; //设置搜索选中症状
|
|
|
this.showUsual=false; //关闭症状选择进入下一个问题
|
|
|
},
|
|
@@ -282,6 +291,11 @@ export default {
|
|
|
return ;
|
|
|
}
|
|
|
let qaLis = data.questionMapping;
|
|
|
+ if(qaLis.length===0){
|
|
|
+ this.wrong = true;
|
|
|
+ this.waring ='该症状数据未维护';
|
|
|
+ return ;
|
|
|
+ }
|
|
|
//qaLis.length=2; //开发测试代码,要删除
|
|
|
qaLis[0].show=true; //第一题自动显示
|
|
|
this.type = qaLis[0].controlType;
|
|
@@ -310,7 +324,8 @@ export default {
|
|
|
PushSymptom,
|
|
|
ConfirmBox,
|
|
|
UsualSymptom,
|
|
|
- MultSelect
|
|
|
+ MultSelect,
|
|
|
+ TipWarning
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -400,17 +415,6 @@ export default {
|
|
|
height: 0.8rem;
|
|
|
margin-right: .24rem;
|
|
|
}
|
|
|
-}
|
|
|
-.tip {
|
|
|
- max-width: 80%;
|
|
|
- padding: .2rem;
|
|
|
- border-radius: .1rem;
|
|
|
- background-color:rgba(0,0,0,0.7);
|
|
|
- position: fixed;
|
|
|
- top: 40%;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- color: #fff;
|
|
|
}
|
|
|
.submit{
|
|
|
position: fixed;
|