|
@@ -18,12 +18,17 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="label">
|
|
|
- <p class="quest" id="test">{{quesText}}<img
|
|
|
- @click="search(true)"
|
|
|
+ <p class="quest" id="test">{{quesText}}</p>
|
|
|
+ <div class="searchWrap" @click="search(true)">
|
|
|
+ <input type="text" placeholder="搜索">
|
|
|
+ <img
|
|
|
class="searchImg"
|
|
|
src="../images/search.png"
|
|
|
alt=""
|
|
|
- ></p>
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <p class="tips">常见症状(长按可解释该症状)</p>
|
|
|
+
|
|
|
<div class="showHide" ref="showHide">
|
|
|
<span
|
|
|
class="symp"
|
|
@@ -33,7 +38,12 @@
|
|
|
@touchend.prevent="touchend(it,ind+1)"
|
|
|
>{{it.description || it.name}}</span>
|
|
|
</div>
|
|
|
- <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明 <span @click="slideToggle" v-show="slide">{{slideTxt}}</span></p>
|
|
|
+ <p class="tip" @click="slideToggle" v-show="chooseSymp.length==0&&slide">
|
|
|
+ {{slideTxt}}
|
|
|
+ <span class="blueSlide" :style="{'transform':'rotate('+degNum+'deg)'}">
|
|
|
+ <img src="../images/blueSlide.png" />
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div
|
|
|
class="result"
|
|
@@ -51,14 +61,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="modluesLen>1"
|
|
|
- @click="toNext"
|
|
|
+ @click="toNext('',1)"
|
|
|
class="footer"
|
|
|
>
|
|
|
<div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">下一步</div>
|
|
|
</div>
|
|
|
<div v-if="modluesLen==1"
|
|
|
class="footer"
|
|
|
- @click="toNext"
|
|
|
+ @click="toNext(4)"
|
|
|
>
|
|
|
<div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">预览并提交病历</div>
|
|
|
</div>
|
|
@@ -73,9 +83,6 @@
|
|
|
v-if="this.$store.state.searchShow"
|
|
|
@search="search"
|
|
|
@showDetil="showDetil"
|
|
|
- :age="age"
|
|
|
- :chooseSymp="chooseSymp"
|
|
|
- :sexType="sexType"
|
|
|
></Search>
|
|
|
<Tiptoast :show="showExp" :data="message" @close="closeTip"/>
|
|
|
</div>
|
|
@@ -85,34 +92,25 @@ import api from '@utils/api.js';
|
|
|
import Toast from '../common/Toast.vue';
|
|
|
import Tiptoast from '../common/Tiptoast.vue';
|
|
|
import Search from './Search.vue';
|
|
|
-import {moduleCP,setScroll,trimDots} from '@utils/tools'
|
|
|
+import {moduleCP,setScroll,trimDots,setTitle,getRouteName} from '@utils/tools'
|
|
|
import Submit from "../common/Submit";
|
|
|
import BScroll from 'better-scroll';
|
|
|
+import {mapState} from 'vuex';
|
|
|
import $ from 'jquery';
|
|
|
export default {
|
|
|
name: 'Symptom',
|
|
|
- props:['modluesLen','nameStr'],
|
|
|
data() {
|
|
|
- let { datas, pathInfo,searchShow } = this.$store.state;
|
|
|
- const { choose, text } = this.$store.state.symptom;
|
|
|
return {
|
|
|
- age: pathInfo.patientAge,
|
|
|
- sexType: pathInfo.patientSex == '男' ? 1 : (pathInfo.patientSex == '女' ? 2 : 3),
|
|
|
- deptName: pathInfo.selfDeptName,
|
|
|
- hosCode: pathInfo.hospitalCode,
|
|
|
- chooseSymp: choose, //已选症状
|
|
|
symp: [], //症状
|
|
|
labelDetail: {}, //明细
|
|
|
- checkText: text, //症状情况文字
|
|
|
questId: null, //id
|
|
|
delText: "是否删除该信息?<br/>(已填内容将清除)",
|
|
|
delIndex: null,
|
|
|
showToast: false,
|
|
|
- searchShow: searchShow,//显示搜索界面
|
|
|
tmpItem:{},//检索的症状
|
|
|
isSearch:false,
|
|
|
scroll:null,
|
|
|
- quesText:"请问您这次哪里最不舒服?",
|
|
|
+ quesText:"您哪里不舒服?",
|
|
|
startTime:'',
|
|
|
timer:null,
|
|
|
showExp:false,
|
|
@@ -124,10 +122,38 @@ export default {
|
|
|
start:{},
|
|
|
end:{},
|
|
|
slide:false,
|
|
|
- slideTxt:'展开',
|
|
|
+ slideTxt:'点击展开',
|
|
|
failMsg: "无法选择症状,已超过最大个数",
|
|
|
+ modluesLen:null,
|
|
|
+ nameStr:'',
|
|
|
+ degNum:0
|
|
|
}
|
|
|
},
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ // setTitle('ishdsjahd')
|
|
|
+ document.title = 'title';
|
|
|
+ let i = document.createElement('iframe');//解决qq内title不刷新问题
|
|
|
+ i.style.display = 'none';
|
|
|
+ i.src = '.';
|
|
|
+ i.onload = ()=>{
|
|
|
+ setTimeout(()=>{
|
|
|
+ i.remove()
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ document.body.appendChild(i);
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ ...mapState({
|
|
|
+ activeModule: state => state.activeModule,
|
|
|
+ searchShow: state => state.searchShow,//搜索界面显示
|
|
|
+ chooseSymp: state => state.symptom.choose,//已选症状
|
|
|
+ checkText: state => state.symptom.text,//症状情况文字
|
|
|
+ pathInfo: state => state.pathInfo
|
|
|
+ }),
|
|
|
+ },
|
|
|
created() {
|
|
|
if (this.chooseSymp.length > 0) {
|
|
|
this.quesText = "请问您还有其他不适吗?";
|
|
@@ -139,7 +165,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.$store.commit('setFinish',1)
|
|
|
this.$nextTick(()=>{
|
|
|
+ let activePart = this.activeModule;
|
|
|
+ this.modluesLen = activePart.len
|
|
|
+ this.nameStr = activePart.obj.symptoms_show.name
|
|
|
+
|
|
|
let scroll = setScroll(BScroll,true,'.symper')
|
|
|
this.scroll = scroll
|
|
|
scroll.on('scroll', this.onScroll)
|
|
@@ -163,17 +194,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ toNext(flg,order) {
|
|
|
+ // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
|
|
|
+ if (this.chooseSymp.length == 0) { return }
|
|
|
+ // 把症状情况的数据存起-已选
|
|
|
+ this.$store.commit('setChoose', { choose: this.chooseSymp, type: moduleCP['symp'] });
|
|
|
+ this.$router.push({
|
|
|
+ path:getRouteName(flg?flg:'',this.activeModule.obj,order)
|
|
|
+ })
|
|
|
+ },
|
|
|
showSubmit(flg){
|
|
|
this.submit = flg;
|
|
|
},
|
|
|
slideToggle(){
|
|
|
let flg = this.slideTxt;
|
|
|
- if(flg == '展开'){
|
|
|
+ if(flg == '点击展开'){
|
|
|
this.$refs.showHide.style.height = 'auto'
|
|
|
- this.slideTxt = '收起'
|
|
|
+ this.slideTxt = '点击收起'
|
|
|
+ this.degNum = 180
|
|
|
}else{
|
|
|
this.$refs.showHide.style.height = '3rem'
|
|
|
- this.slideTxt = '展开'
|
|
|
+ this.slideTxt = '点击展开'
|
|
|
+ this.degNum = 0
|
|
|
}
|
|
|
},
|
|
|
touchend(item,flg) {//症状点开详情
|
|
@@ -188,7 +230,8 @@ export default {
|
|
|
item.idx = 1
|
|
|
}
|
|
|
this.common(item,flg);
|
|
|
- this.slideTxt = '展开'
|
|
|
+ this.slideTxt = '点击展开'
|
|
|
+ this.degNum = 0
|
|
|
}
|
|
|
this.startTime = "";
|
|
|
},
|
|
@@ -215,7 +258,6 @@ export default {
|
|
|
},
|
|
|
onScroll(data) {
|
|
|
this.$store.commit('setScroll', data);
|
|
|
- document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
},
|
|
|
search(flg) {
|
|
|
this.$store.commit('setSearchShow', flg);
|
|
@@ -223,9 +265,9 @@ export default {
|
|
|
|
|
|
getSympList() {
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
- "deptName": this.deptName,
|
|
|
- "sexType": this.sexType
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
+ "deptName": this.pathInfo.selfDeptName,
|
|
|
+ "sexType": this.pathInfo.sexType
|
|
|
}
|
|
|
api.getSymptom(param).then((res) => {
|
|
|
const result = res.data;
|
|
@@ -239,17 +281,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- toNext() {
|
|
|
- // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
|
|
|
- if (this.chooseSymp.length == 0) { return }
|
|
|
- // 把症状情况的数据存起-已选
|
|
|
- this.$store.commit('setChoose', { choose: this.chooseSymp, type: moduleCP['symp'] });
|
|
|
- if(this.modluesLen==1){
|
|
|
- this.$emit('next','preview')
|
|
|
- }else{
|
|
|
- this.$emit('next');
|
|
|
- }
|
|
|
- },
|
|
|
common(item,flg,sign){
|
|
|
if(this.chooseSymp.length>12){
|
|
|
this.$store.commit('setSearchShow', false);
|
|
@@ -265,9 +296,9 @@ export default {
|
|
|
//将选中的name存到store中的text
|
|
|
if (id&&this.chooseSymp.length == 0) {//只有第一次
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
"id": id,
|
|
|
- "sexType": this.sexType
|
|
|
+ "sexType": this.pathInfo.sexType
|
|
|
}
|
|
|
localStorage.setItem("staticSymp",null)
|
|
|
this.$store.commit('setText', { type: moduleCP['symp'], text: (this.chooseSymp.length == 0?'患者出现':'')+item.name,textP: (this.chooseSymp.length == 0?'患者出现':'')+(item.description||item.name), pId: this.questId,idx:this.chooseSymp.length == 0?1:'' });
|
|
@@ -347,9 +378,9 @@ export default {
|
|
|
},
|
|
|
getPush(symptoms) {//推理
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
- "hosCode": this.hosCode,
|
|
|
- "sex": this.sexType,
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
+ "hosCode": this.pathInfo.hospitalCode,
|
|
|
+ "sex": this.pathInfo.sexType,
|
|
|
"symptom": symptoms //症状+选择的明细,string
|
|
|
}
|
|
|
api.getPush(param).then((res) => {
|
|
@@ -449,10 +480,30 @@ export default {
|
|
|
overflow: hidden;
|
|
|
height: 3rem;
|
|
|
}
|
|
|
-.tip span {
|
|
|
- color: #colors[theme];
|
|
|
- float: right;
|
|
|
- font-size: .28rem;
|
|
|
+.tips {
|
|
|
+ color: #AAAAAA;
|
|
|
+ margin-bottom:.2rem;
|
|
|
+ font-size: .13rem;
|
|
|
+}
|
|
|
+.tip {
|
|
|
+ font-size: .28rem !important;
|
|
|
+ text-align:center;
|
|
|
+ color: #colors[theme] !important;
|
|
|
+ .blueSlide {
|
|
|
+ display: inline-block;
|
|
|
+ position: relative;
|
|
|
+ height: 14px;
|
|
|
+ width: 14px;
|
|
|
+ top: 1px;
|
|
|
+ img {
|
|
|
+ width: 14px;
|
|
|
+ height: 7px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 0;
|
|
|
+ margin-top: -3.5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.symp-wrap {
|
|
|
font-size: 0.3rem;
|
|
@@ -460,13 +511,31 @@ export default {
|
|
|
color: #colors[quest];
|
|
|
margin-bottom: 0.36rem;
|
|
|
font-weight: 700;
|
|
|
- .searchImg {
|
|
|
- width: 0.44rem;
|
|
|
- height: 0.44rem;
|
|
|
- float: right;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
+.searchWrap {
|
|
|
+ border: 1px solid #E6E6E6;
|
|
|
+ height: .64rem;
|
|
|
+ border-radius: .32rem;
|
|
|
+ margin-bottom: .4rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ input {
|
|
|
+ height: 100%;
|
|
|
+ border-radius: .32rem;
|
|
|
+ padding-left:.7rem;
|
|
|
+ color: #AAAAAA;
|
|
|
+ }
|
|
|
+ .searchImg {
|
|
|
+ width: 0.44rem;
|
|
|
+ height: 0.44rem;
|
|
|
+ float: right;
|
|
|
+ position: absolute;
|
|
|
+ left: .2rem;
|
|
|
+ top: .05rem;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
.choose{
|
|
|
padding-bottom: .2rem;
|
|
|
position: relative;
|