|
@@ -46,6 +46,7 @@
|
|
|
style="minWidth: 240px"
|
|
|
@input="onchange"
|
|
|
@blur="onblur"
|
|
|
+ @clear="clear"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="detail+'预览:'">
|
|
@@ -80,9 +81,10 @@
|
|
|
<el-option
|
|
|
v-for="item in uniqueNameList"
|
|
|
:key="item.icd10Code"
|
|
|
- :label="item.name"
|
|
|
- :value="item"
|
|
|
- :title="item.name"
|
|
|
+ :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
|
|
|
+ :value="searchType == 2 ? `${item.uniqueName}` : item"
|
|
|
+ :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
|
|
|
+ @click.native="handleChoose(searchType == 2 ? `${item.uniqueName}` : item.name,item.id)"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -150,7 +152,10 @@
|
|
|
</div>
|
|
|
<div class="mapList">
|
|
|
已关联标准术语:
|
|
|
- <span v-for="item in mapList" :key="item.id">{{item.uniqueName}} {{item.form}};</span>
|
|
|
+ <span
|
|
|
+ v-for="item in mapList"
|
|
|
+ :key="item.id"
|
|
|
+ >{{item.uniqueName}} {{item.form}}{{item.hisCode}};</span>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<button class="confirm btns" :disabled="saveDisable" @click="submitForm">确定</button>
|
|
@@ -165,7 +170,7 @@ import config from '@api/config.js';
|
|
|
import utils from '@api/utils.js';
|
|
|
export default {
|
|
|
name: 'lt-modal',
|
|
|
- props: ['modalVisiable', 'meal', 'detail', 'standard', 'type', 'data','tip'],
|
|
|
+ props: ['modalVisiable', 'meal', 'detail', 'standard', 'type', 'data', 'tip'],
|
|
|
data() {
|
|
|
return {
|
|
|
form: {
|
|
@@ -199,7 +204,7 @@ export default {
|
|
|
getIndex: 6,
|
|
|
ty: this.type,
|
|
|
searchType: '',
|
|
|
- title: '添加',
|
|
|
+ title: '添加'
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -220,17 +225,25 @@ export default {
|
|
|
this.form.form = this.data.form;
|
|
|
this.form.source = this.data.source;
|
|
|
this.form.hisCode = this.data.hisCode;
|
|
|
- let name
|
|
|
- if (this.data.hisName !== '' && this.data.hisDetailName === '') {
|
|
|
+ let name;
|
|
|
+ if (
|
|
|
+ this.data.hisName !== '' &&
|
|
|
+ this.data.hisDetailName === '' &&
|
|
|
+ this.type == 1
|
|
|
+ ) {
|
|
|
this.ty = 1; // 1-化验大项、2-化验小项
|
|
|
- this.searchType = 1
|
|
|
+ this.searchType = 1;
|
|
|
name = this.data.hisName;
|
|
|
- } else if (this.data.hisName !== '' && this.data.hisDetailName !== '') {
|
|
|
+ } else if (
|
|
|
+ this.data.hisName !== '' &&
|
|
|
+ this.data.hisDetailName !== '' &&
|
|
|
+ this.type == 1
|
|
|
+ ) {
|
|
|
this.ty = 2;
|
|
|
- this.searchType = 2
|
|
|
+ this.searchType = 2;
|
|
|
name = this.data.hisDetailName;
|
|
|
}
|
|
|
- this.getTermMatching(this.ty,name);
|
|
|
+ this.getTermMatching(this.ty, name);
|
|
|
this.getRelatedMapping();
|
|
|
}
|
|
|
},
|
|
@@ -239,7 +252,7 @@ export default {
|
|
|
if (this.getIndex === rowIndex) {
|
|
|
return {
|
|
|
'background-color': '#EBEEF5',
|
|
|
- 'color':'#48C5D7'
|
|
|
+ color: '#48C5D7'
|
|
|
};
|
|
|
}
|
|
|
},
|
|
@@ -247,6 +260,14 @@ export default {
|
|
|
row.index = rowIndex;
|
|
|
},
|
|
|
btn(row) {
|
|
|
+ const { hisName, hisDetailName } = this.form;
|
|
|
+ if (hisName !== '' && hisDetailName === '' && this.type == 1) {
|
|
|
+ this.ty = 1;
|
|
|
+ } else if (hisName !== '' && hisDetailName !== '' && this.type == 1) {
|
|
|
+ this.ty = 2;
|
|
|
+ }
|
|
|
+ console.log(this.ty)
|
|
|
+ this.searchType = this.ty;
|
|
|
if (this.getIndex == row.index) {
|
|
|
this.getIndex = 6;
|
|
|
this.form.searchText = '';
|
|
@@ -261,6 +282,11 @@ export default {
|
|
|
this.form.source = row.source;
|
|
|
}
|
|
|
},
|
|
|
+ handleChoose(val, id) {
|
|
|
+ this.form.conceptId = id;
|
|
|
+ this.form.searchTextPre = val;
|
|
|
+ this.form.searchText = val;
|
|
|
+ },
|
|
|
// 搜索列表
|
|
|
searchTerms(query) {
|
|
|
if (!query) {
|
|
@@ -268,9 +294,9 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
const { hisName, hisDetailName } = this.form;
|
|
|
- if (hisName !== '' && hisDetailName === '') {
|
|
|
+ if (hisName !== '' && hisDetailName === '' && this.type == 1) {
|
|
|
this.ty = 1;
|
|
|
- }else if(hisName !== '' && hisDetailName !== ''){
|
|
|
+ } else if (hisName !== '' && hisDetailName !== '' && this.type == 1) {
|
|
|
this.ty = 2;
|
|
|
}
|
|
|
this.searchType = this.ty;
|
|
@@ -346,22 +372,26 @@ export default {
|
|
|
// 获取焦点
|
|
|
handleFocus() {},
|
|
|
onblur() {
|
|
|
- let type,name
|
|
|
+ let type, name;
|
|
|
if (this.type == 1) {
|
|
|
const { hisName, hisDetailName } = this.form;
|
|
|
type = 1; // 1-化验大项、2-化验小项
|
|
|
- name = hisName
|
|
|
+ name = hisName;
|
|
|
if (hisName !== '' && hisDetailName !== '') {
|
|
|
type = 2;
|
|
|
- name = hisDetailName
|
|
|
+ name = hisDetailName;
|
|
|
}
|
|
|
}
|
|
|
- this.getTermMatching(type,name);
|
|
|
+ this.getTermMatching(type, name);
|
|
|
},
|
|
|
- getTermMatching(type,name) {
|
|
|
+ clear(){
|
|
|
+ const { hisName, hisDetailName } = this.form;
|
|
|
+ this.getTermMatching(1, hisName);
|
|
|
+ },
|
|
|
+ getTermMatching(type, name) {
|
|
|
let params = {
|
|
|
type: type ? type : this.type,
|
|
|
- inputStr: name ? name :this.form.hisName
|
|
|
+ inputStr: name ? name : this.form.hisName
|
|
|
};
|
|
|
api.getTermMatching(params).then(res => {
|
|
|
this.showDrop = false;
|
|
@@ -489,7 +519,7 @@ export default {
|
|
|
showClose: true,
|
|
|
message: msg,
|
|
|
type: type || 'warning',
|
|
|
- duration:'1000'
|
|
|
+ duration: '1000'
|
|
|
});
|
|
|
},
|
|
|
closeModal() {
|
|
@@ -620,11 +650,12 @@ export default {
|
|
|
.titleBox {
|
|
|
padding: 0 0 10px 0px;
|
|
|
}
|
|
|
-/deep/.el-table th{
|
|
|
- background: #F7F7F7;
|
|
|
+/deep/.el-table th {
|
|
|
+ background: #f7f7f7;
|
|
|
}
|
|
|
-/deep/ .el-table td, .el-table th.is-leaf{
|
|
|
- border-bottom:none
|
|
|
+/deep/ .el-table td,
|
|
|
+.el-table th.is-leaf {
|
|
|
+ border-bottom: none;
|
|
|
}
|
|
|
.title-l {
|
|
|
font-size: 14px;
|
|
@@ -641,7 +672,7 @@ export default {
|
|
|
.rightBox {
|
|
|
width: 380px;
|
|
|
float: left;
|
|
|
- min-height: 248px;
|
|
|
+ height: 248px;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.midBox {
|