|
@@ -15,7 +15,7 @@
|
|
|
<el-form-item class="addDepartFormItem" v-if="!isEdit" label="选择慢病标准术语(概念ID):" prop="department">
|
|
|
<input class="searchInput" @focus="focuInput" type="text" v-model = "searchDiagVal">
|
|
|
<span class="searchName" @click="searchDiag">搜索</span>
|
|
|
- <ul class="itemList diagList" ref="diagList">
|
|
|
+ <ul v-if="showDiagList&&diagList.length > 0" class="itemList diagList" ref="diagList">
|
|
|
<li
|
|
|
v-for="item in diagList"
|
|
|
class="diagItem ellipsis"
|
|
@@ -35,7 +35,7 @@
|
|
|
<label class="screenIndexLabel">选择化验指标公表项内容(概念ID):</label>
|
|
|
<input class="searchInput" @focus="focuInput" type="text" v-model = "searchIndexVal">
|
|
|
<span class="searchName" @click="searchIndex">搜索</span>
|
|
|
- <ul class="itemList indexList" ref="indexList">
|
|
|
+ <ul v-if="showIndexList&&indexList.length > 0" class="itemList indexList" ref="indexList">
|
|
|
<li
|
|
|
v-for="item in indexList"
|
|
|
class="diagItem ellipsis"
|
|
@@ -90,7 +90,9 @@
|
|
|
searchDiagVal: '',
|
|
|
searchIndexVal: '',
|
|
|
isEdit: false,
|
|
|
- saveDisable: false
|
|
|
+ saveDisable: false,
|
|
|
+ showDiagList: false,
|
|
|
+ showIndexList: false
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -123,38 +125,38 @@
|
|
|
close() {
|
|
|
this.diagList = [];
|
|
|
this.indexList = [];
|
|
|
- if(this.diagList.length>0){this.$refs['diagList'].style.display = 'none';}
|
|
|
- if(this.indexList.length>0){this.$refs['indexList'].style.display = 'none';}
|
|
|
},
|
|
|
back(){
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
searchDiag() {
|
|
|
+ if(!this.searchDiagVal.trim()) {
|
|
|
+ return
|
|
|
+ }
|
|
|
const param = {
|
|
|
"diseaseName": this.searchDiagVal,
|
|
|
}
|
|
|
api.queryIndexConfigDiseaseNames(param).then((res)=>{
|
|
|
if(res.data.code === '0') {
|
|
|
this.diagList = res.data.data
|
|
|
- if(this.diagList.length>0) {this.$refs['diagList'].style.display = 'block'}
|
|
|
- if(this.indexList.length>0) {this.$refs['indexList'].style.display = 'none'}
|
|
|
+ this.showDiagList = true
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
selectDiag(item) {
|
|
|
this.form.diseaseId = item.diseaseId
|
|
|
this.form.diseaseName = item.diseaseName
|
|
|
- this.$refs['diagList'].style.display='none'
|
|
|
this.searchDiagVal = ''
|
|
|
this.diagList=[]
|
|
|
},
|
|
|
focuInput() {
|
|
|
- if(this.$refs){
|
|
|
- this.$refs['diagList'].style.display='none';
|
|
|
- this.$refs['indexList'].style.display='none';
|
|
|
- }
|
|
|
+ this.showDiagList = false
|
|
|
+ this.showIndexList = false
|
|
|
},
|
|
|
searchIndex() {
|
|
|
+ if(!this.searchIndexVal.trim()) {
|
|
|
+ return
|
|
|
+ }
|
|
|
const param = {
|
|
|
conceptName: this.searchIndexVal,
|
|
|
excludedConceptNames: this.selectedIndexMap
|
|
@@ -170,8 +172,7 @@
|
|
|
// {conceptName : '糖化血红蛋白'},
|
|
|
// {conceptName : '血常规'},
|
|
|
// ]
|
|
|
- if(this.indexList.length > 0){this.$refs['indexList'].style.display='block'}
|
|
|
- if(this.diagList.length>0) {this.$refs['diagList'].style.display = 'none'}
|
|
|
+ this.showIndexList = true
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -179,7 +180,6 @@
|
|
|
this.selectedIndexList.push({indexUnique: item.conceptName, conceptId: item.conceptId, indexDesc:''})
|
|
|
this.selectedIndexMap.push(item.conceptName)
|
|
|
this.indexList = []
|
|
|
- this.$refs['indexList'].style.display='none'
|
|
|
},
|
|
|
delSelectedIndex(selectedItem, index) {
|
|
|
this.selectedIndexMap = this.selectedIndexMap.filter((item) => {return item != selectedItem.indexUnique})
|
|
@@ -295,7 +295,6 @@
|
|
|
}
|
|
|
.itemList {
|
|
|
position: absolute;
|
|
|
- display: none;
|
|
|
background: #fff;
|
|
|
width: 162px;
|
|
|
max-height: 150px;
|