|
@@ -10,11 +10,9 @@
|
|
|
:class="[{'liSelect':item.select}]"
|
|
|
:key="idx"
|
|
|
@click="selectResult(item,idx)"
|
|
|
- @touchstart.prevent="touchstart(item,idx)"
|
|
|
- @touchend.prevent="touchend(item,idx+1)"
|
|
|
>
|
|
|
{{item.description||item.name}}
|
|
|
- <img src="../images/icon_que.png" alt="解释说明" v-if="item.explains"/>
|
|
|
+ <img src="../images/icon_que.png" alt="解释说明" @click.stop="showExplain(item)" v-if="item.explains"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
@@ -27,13 +25,18 @@
|
|
|
@search="search"
|
|
|
@showDetil="showDetil"
|
|
|
></Search>
|
|
|
- <!--<ConfirmBox :show="showConfirm" @confirmDialog="confirmDialog" @cancelDialog = "cancelDialog"></ConfirmBox>-->
|
|
|
+
|
|
|
+ <Tiptoast :show="showExp" :data="message" @close="closeTip"/>
|
|
|
+ <!-- <ConfirmBox :show="showConfirm" @confirmDialog="confirmDialog" @cancelDialog = "cancelDialog"></ConfirmBox> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Radio from './Radio';
|
|
|
import Search from '../components/Search.vue';
|
|
|
- import ConfirmBox from '../common/ConfirmBox'
|
|
|
+ // import ConfirmBox from '../common/ConfirmBox'
|
|
|
+ import Tiptoast from '../common/Tiptoast.vue';
|
|
|
+ import {mapState} from 'vuex';
|
|
|
+ import api from '@utils/api.js';
|
|
|
export default {
|
|
|
name:'UsualSymptom',
|
|
|
props:[],
|
|
@@ -44,47 +47,36 @@
|
|
|
portaled:false, //是否将radio渲染到最外层
|
|
|
showConfirm:false,
|
|
|
len:10, //显示常用症状个数
|
|
|
+ showExp:false,
|
|
|
+ message:{
|
|
|
+ title:'',
|
|
|
+ text:''
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapState({
|
|
|
+ pathInfo: state => state.pathInfo,
|
|
|
+ }),
|
|
|
+ },
|
|
|
methods:{
|
|
|
back(){
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
- touchend(item,flg) {//症状点开详情
|
|
|
- clearTimeout(this.timer);
|
|
|
- this.end = this.$store.state.scroll
|
|
|
- if(JSON.stringify(this.start) != JSON.stringify(this.end)){
|
|
|
- this.startNum = 0
|
|
|
- return
|
|
|
- }
|
|
|
- let endTime = +new Date();
|
|
|
- if(endTime - this.startTime < 500){//点击事件
|
|
|
- if(this.startNum == 1){
|
|
|
- this.common(item,flg);
|
|
|
- }
|
|
|
- this.startNum = 0
|
|
|
- this.slideTxt = '点击展开'
|
|
|
- this.degNum = 0
|
|
|
+ showExplain(it){
|
|
|
+ if(it.explains){
|
|
|
+ this.message.title = it.description || it.name;
|
|
|
+ this.message.text = it.explains;
|
|
|
+ }else{
|
|
|
+ this.message.title = "";
|
|
|
+ this.message.text = "暂无资料";
|
|
|
}
|
|
|
- this.startTime = "";
|
|
|
+ this.showExp = true
|
|
|
},
|
|
|
- touchstart(it){
|
|
|
- this.startNum = ++this.startNum;
|
|
|
- this.start = this.$store.state.scroll;
|
|
|
- this.startTime = +new Date();
|
|
|
- const that = this;
|
|
|
- this.timer = setTimeout(function(){
|
|
|
- // 长按事件
|
|
|
- that.showExp = true;
|
|
|
- if(it.explains){
|
|
|
- that.message.title = it.description || it.name;
|
|
|
- that.message.text = it.explains;
|
|
|
- }else{
|
|
|
- that.message.title = "";
|
|
|
- that.message.text = "暂无资料";
|
|
|
- }
|
|
|
- this.startNum = 0
|
|
|
- },600)
|
|
|
+ closeTip(){
|
|
|
+ this.showExp = false;
|
|
|
+ this.message.title = '';
|
|
|
+ this.message.text = '';
|
|
|
},
|
|
|
formatData(data){
|
|
|
data.length=data.length>10?10:data.length;
|
|
@@ -100,6 +92,32 @@
|
|
|
selectResult(item,idx){
|
|
|
this.$emit('selectUsual',item,idx);
|
|
|
this.$store.commit('setSearchShow', false);
|
|
|
+ let obj = {
|
|
|
+ "labelName": item.tagName,//标签名称
|
|
|
+ "operationNum": 1,//次数
|
|
|
+ "operationType": 1,//1常见2搜索
|
|
|
+ }
|
|
|
+ this.$store.commit('addBuriedSome', obj);
|
|
|
+ },
|
|
|
+ saveBuriedSome(){
|
|
|
+ let params = {
|
|
|
+ "doctorId": this.pathInfo.doctorId||'',
|
|
|
+ "hospitalDeptId": this.pathInfo.hospitalDeptId||'',
|
|
|
+ "hospitalId": this.pathInfo.hospitalDeptId||'',
|
|
|
+ "inquiryCode": this.pathInfo.hospitalDeptId||'',
|
|
|
+ "patientId": this.pathInfo.hospitalDeptId||'',
|
|
|
+ "taggeds": [
|
|
|
+ {
|
|
|
+ "labelName": "string",//标签名称
|
|
|
+ "operationNum": 0,//次数
|
|
|
+ "operationType": "string",//1常见2搜索
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ api.saveBuriedSome(params).then((res)=>{
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
confirmDialog(){
|
|
|
|
|
@@ -117,8 +135,9 @@
|
|
|
},
|
|
|
components:{
|
|
|
Radio,
|
|
|
- ConfirmBox,
|
|
|
- Search
|
|
|
+ // ConfirmBox,
|
|
|
+ Search,
|
|
|
+ Tiptoast
|
|
|
}
|
|
|
}
|
|
|
</script>
|