提交 9848de48 编写于 作者: chengxiang.li's avatar chengxiang.li

update multi select to single select

上级 5c2da0f9
......@@ -7,7 +7,7 @@
<span class="close-btn el-icon-close" @click="hideSelf"></span>
<p class="title-text">添加诊断</p>
<div class="search-input">
<el-input v-model="searchInput" placeholder="搜索疾病" class="search-disease" @input="handleInputSearch" @blur="handleSearchListBlur"></el-input>
<el-input v-model="searchInput" placeholder="搜索诊断" class="search-disease" @input="handleInputSearch" @blur="handleSearchListBlur"></el-input>
</div>
<div class="main-content">
<div class="left-box left">
......@@ -21,7 +21,7 @@
infinite-scroll-immediate-check="false"
>
<ul class="search-list">
<li v-for="(searchLi, index) in searchList" @mousedown.prevent="handleSearchLiClick(searchLi)">
<li v-for="(searchLi, index) in searchList" @mousedown="handleSearchLiClick(searchLi)">
<div class="left">
<p class="disease-name" v-html="searchLi.diseaseName"></p>
<div class="one-line">
......@@ -81,7 +81,7 @@
:visible.sync="limitTipsVisible"
width="400px"
center>
<span>最多只能选择20种疾病</span>
<span>最多只能选择20种诊断</span>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" >我知道了</el-button> -->
<div class="know-confirm" @mousedown.prevent="hideNumLimitTips" >我知道了</div>
......@@ -163,7 +163,7 @@
return this.hasItem(this.choosedList, item) > -1 ? true : false;
},
handleSearchLiClick(item) {
this.searchInput = '';
let hasIndex = this.hasItem(this.choosedList, item);
if( hasIndex > -1 ){
this.choosedList.splice(hasIndex, 1);
......@@ -304,7 +304,7 @@
let list = JSON.parse(JSON.stringify(this.choosedList));
this.$store.dispatch('patientsDiagnose/changeDiagnoseList', list)
this.showDiagnoseModal = false;
this.searchInput == '';
this.searchInput = '';
this.searchList = [];
},
handleClose(tag) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册