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

bug fix

上级 a889b313
......@@ -74,6 +74,7 @@
</div>
<!-- 已选数量不能超过20个 提示 -->
<div class="tips-wrap" @mousedown.prevent="preventDefault">
<el-dialog
title="提示"
:close-on-click-modal="false"
......@@ -82,10 +83,13 @@
center>
<span>最多只能选择20种疾病</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="limitTipsVisible = false">我知道了</el-button>
<!-- <el-button type="primary" >我知道了</el-button> -->
<div class="know-confirm" @mousedown.prevent="hideNumLimitTips" >我知道了</div>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
......@@ -148,14 +152,26 @@
this.searchList = [];
this.searchInput = ''
},
preventDefault() {
// console.log('prevent>>>>>>>>>>>>>>>>>>>')
},
hideNumLimitTips() {
this.limitTipsVisible = false;
},
isSearchLiSelected(item) {
return this.hasItem(this.choosedList, item) > -1 ? true : false;
},
handleSearchLiClick(item) {
let hasIndex = this.hasItem(this.choosedList, item);
if( hasIndex > -1 ){
this.choosedList.splice(hasIndex, 1);
}else{
// 已选20个后,不能再添加,出Tips
if( this.choosedList && this.choosedList.length == 20 ){
this.limitTipsVisible = true;
return;
}
this.choosedList.push(item);
}
},
......@@ -205,6 +221,10 @@
that.totalPageNum = Math.ceil(res.data.total/that.pageSize); // 总页数
let list = res.data.icdContentsList || [];
if(list.length > 0){
if(that.searchInput == ''){
that.searchList = [];
return;
}
that.searchList = list;
that.hasNoResult = false;
}else{
......@@ -282,11 +302,16 @@
}
},
handleEachCommonLiClick(item) {
console.log('ddd', item);
// console.log('ddd', item);
let hasIndex = this.hasItem(this.choosedList, item);
if( hasIndex > -1 ){
this.choosedList.splice(hasIndex, 1);
}else{
// 已选20个后,不能再添加,出Tips
if( this.choosedList && this.choosedList.length == 20 ){
this.limitTipsVisible = true;
return;
}
this.choosedList.push(item);
}
},
......@@ -523,6 +548,21 @@
text-align: center;
margin: 20px auto;
}
}
.tips-wrap {
.know-confirm{
width: 98px;
height: 40px;
background: #449284;
border-radius: 4px;
text-align: center;
line-height: 40px;
color: #FFF;
margin: 0 auto;
font-size: 14px;
cursor: pointer;
}
}
}
</style>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册