|
@@ -37,7 +37,7 @@
|
|
|
<el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="16" v-if="type == 1">
|
|
|
+ <el-col :span="16" v-if="type == 1 || type == 2">
|
|
|
<el-form-item :label="detail+':'" prop="hisDetailName">
|
|
|
<el-input
|
|
|
v-model.trim="form.hisDetailName"
|
|
@@ -86,12 +86,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="tableData.length >0">
|
|
|
<el-table
|
|
|
+ :header-row-style="{height:'40px'}"
|
|
|
+ :header-cell-style="{height:'40px',padding:'0'}"
|
|
|
:row-class-name="tableRowClassName"
|
|
|
:row-style="selectedstyle"
|
|
|
:data="tableData"
|
|
|
@row-click="btn"
|
|
|
size="mini"
|
|
|
- :class="{tabs:uniqueNameList}"
|
|
|
class="tab"
|
|
|
>
|
|
|
<el-table-column prop="name" :show-overflow-tooltip="true" label="词名"></el-table-column>
|
|
@@ -200,12 +201,14 @@ export default {
|
|
|
drugList: [],
|
|
|
tableData: [],
|
|
|
mapList: [],
|
|
|
- getIndex: 6
|
|
|
+ getIndex: 6,
|
|
|
+ ty:this.type,
|
|
|
+ searchType:''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
//修改
|
|
|
- if (this.data != {}) {
|
|
|
+ if (JSON.stringify(this.data) != '{}') {
|
|
|
this.isEdit = true;
|
|
|
this.editId = this.data.id;
|
|
|
this.form.hisName = this.data.hisName;
|
|
@@ -247,16 +250,24 @@ export default {
|
|
|
this.form.source = row.source;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 搜索列表
|
|
|
searchTerms(query) {
|
|
|
if (!query) {
|
|
|
this.uniqueNameList = [];
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.type == 1) {
|
|
|
+ const { hisName, hisDetailName } = this.form;
|
|
|
+ this.ty = 2; // 1-化验大项、2-化验小项
|
|
|
+ if (hisName !== '' && hisDetailName === '') {
|
|
|
+ this.ty = 1;
|
|
|
+ }
|
|
|
+ this.searchType = this.ty;
|
|
|
+ }
|
|
|
this.showDrop = true;
|
|
|
let params = {
|
|
|
- type: this.type,
|
|
|
+ type: this.ty ? this.ty : this.type,
|
|
|
inputStr: query,
|
|
|
sex: 3,
|
|
|
age: 0
|
|
@@ -327,7 +338,7 @@ export default {
|
|
|
},
|
|
|
getTermMatching() {
|
|
|
let params = {
|
|
|
- type: this.ty ? this.ty : this.type,
|
|
|
+ type: this.type,
|
|
|
inputStr: this.form.hisName
|
|
|
};
|
|
|
api.getTermMatching(params).then(res => {
|
|
@@ -353,6 +364,21 @@ export default {
|
|
|
source
|
|
|
} = this.form;
|
|
|
// 当标准术语是套餐时,细项必须为空
|
|
|
+ if (this.searchType === 1 && hisDetailName !== '') {
|
|
|
+ this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 当标准术语是细项时,医院术语套餐和细项均不能为空
|
|
|
+ if (this.searchType === 2) {
|
|
|
+ if (hisName === '') {
|
|
|
+ this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
+ return;
|
|
|
+ } else if (hisDetailName === '') {
|
|
|
+ this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
let params = {
|
|
|
hisName: hisName,
|
|
|
uniqueName: searchText,
|
|
@@ -518,7 +544,7 @@ export default {
|
|
|
// top: 0;
|
|
|
z-index: 999;
|
|
|
margin-bottom: 15px;
|
|
|
- margin-top: -40px;
|
|
|
+ margin-top: -62px;
|
|
|
}
|
|
|
// .tabs {
|
|
|
// max-width: 240px;
|