|
@@ -1,110 +1,115 @@
|
|
|
<template>
|
|
|
- <div class="AddChemicalAndCommonMappingWrapper clearfix" @click="close">
|
|
|
+ <div class="AddChemicalAndCommonMappingWrapper clearfix">
|
|
|
<crumbs
|
|
|
:title="isEdit ? '检验关联维护--修改关联' : '检验关联维护--添加关联'"
|
|
|
class="topBack"
|
|
|
:param="$route.params"
|
|
|
linkTo="Lis"
|
|
|
></crumbs>
|
|
|
- <div class="AddChemicalAndCommonMappingBox clearfix">
|
|
|
- <div class="titleBox clearfix">
|
|
|
- <p class="title">医院术语</p>
|
|
|
- <p class="title">标准术语</p>
|
|
|
- </div>
|
|
|
- <div class="leftBox clearfix">
|
|
|
- <div class="itemLabel clearfix">
|
|
|
- <label class="itemLabelName">检验套餐:</label>
|
|
|
- <input class="searchInput" type="text" v-model="hisName" v-on:input="handleInput" />
|
|
|
- <span class="searchInputInfo" v-if="isVila">请输入检验套餐名称</span>
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-position="right"
|
|
|
+ label-width="140px"
|
|
|
+ ref="relationForm"
|
|
|
+ >
|
|
|
+ <div class="AddChemicalAndCommonMappingBox clearfix">
|
|
|
+ <div class="titleBox clearfix">
|
|
|
+ <p class="title">医院术语</p>
|
|
|
+ <p class="title">标准术语</p>
|
|
|
</div>
|
|
|
- <div class="itemLabel clearfix">
|
|
|
- <label class="itemLabelName">检验套餐预览:</label>
|
|
|
- <span class="selectItemName">{{hisName}}</span>
|
|
|
+ <div class="leftBox clearfix">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="检验套餐:" prop="hisName">
|
|
|
+ <el-input v-model="form.hisName" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="检验套餐预览:">
|
|
|
+ <span class="previewInfo">{{form.hisName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="检验细项:">
|
|
|
+ <el-input v-model="form.hisDetailName" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="检验细项预览:">
|
|
|
+ <span class="previewInfo">{{form.hisDetailName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- <div class="itemLabel clearfix">
|
|
|
- <label class="itemLabelName">检验细项:</label>
|
|
|
- <input class="searchInput" type="text" v-model="hisDetailName" />
|
|
|
+ <div class="midBox">
|
|
|
+ <img class="midLogo" src="../../../images/relation.png" alt />
|
|
|
+ <p class="midTitle">相互关联</p>
|
|
|
</div>
|
|
|
- <div class="itemLabel clearfix">
|
|
|
- <label class="itemLabelName">检验细项预览:</label>
|
|
|
- <span class="selectItemName">{{hisDetailName}}</span>
|
|
|
+ <div class="rightBox">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="检验标准术语:" prop="searchText">
|
|
|
+ <el-select
|
|
|
+ style="width:100%"
|
|
|
+ v-model="form.searchText"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ clearable
|
|
|
+ :loading="showDrop"
|
|
|
+ loading-text="加载中..."
|
|
|
+ @change="changeWord"
|
|
|
+ @focus="handleFocus"
|
|
|
+ placeholder="搜索"
|
|
|
+ :remote-method="searchTerms"
|
|
|
+ reserve-keyword
|
|
|
+ @click.native="handleclick"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,idx) in uniqueNameList"
|
|
|
+ :key="idx"
|
|
|
+ :label="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
+ :value="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="检验标准术语预览:">
|
|
|
+ <span class="previewInfo">{{form.searchText}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="midBox">
|
|
|
- <img class="midLogo" src="../../../images/relation.png" alt />
|
|
|
- <p class="midTitle">相互关联</p>
|
|
|
+ <div class="btn">
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
- <div class="rightBox">
|
|
|
- <div class="itemLabel">
|
|
|
- <label class="itemLabelName">检验标准术语:</label>
|
|
|
- <input class="searchInput" @focus="focuInput" type="text" v-model="uniqueText" />
|
|
|
- <span class="searchName" @click="searchMealItem()">搜索</span>
|
|
|
- <ul
|
|
|
- v-if="showUniqueNameList&&uniqueNameList.length >0"
|
|
|
- class="itemList uniqueNameList"
|
|
|
- ref="uniqueNameList"
|
|
|
- >
|
|
|
- <li
|
|
|
- v-for="item in uniqueNameList"
|
|
|
- class="mealNameItem ellipsis"
|
|
|
- :title="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
- @click="selectUniqueName(item)"
|
|
|
- :key="searchType === 2? `${item.uniqueName}(${item.name})` : item"
|
|
|
- >{{searchType === 2 ? `${item.uniqueName}(${item.name})` : item}}</li>
|
|
|
- </ul>
|
|
|
- <ul
|
|
|
- v-else-if="showUniqueNameList&&uniqueNameList.length === 0"
|
|
|
- class="itemList uniqueNameList"
|
|
|
- >
|
|
|
- <li class="mealNameItem ellipsis">无数据</li>
|
|
|
- </ul>
|
|
|
- <ul v-else-if=" isSendDataOver === 1" class="itemList uniqueNameList">
|
|
|
- <li class="mealNameItem ellipsis">加载中.....</li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="itemLabel">
|
|
|
- <!-- <label class="itemLabelName isRequired">诊断名称预览:</label> -->
|
|
|
- <label class="itemLabelName">检验标准术语预览:</label>
|
|
|
- <span class="selectItemName">{{form.uniqueName}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="btn">
|
|
|
- <!-- <span class="sumbit" @click="submitForm">建立关联</span> -->
|
|
|
- <el-button type="primary" :disabled="saveDisable" @click="submitForm">确定</el-button>
|
|
|
- </div>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import api from '@api/icss.js';
|
|
|
-
|
|
|
export default {
|
|
|
- name: 'AddOperation',
|
|
|
+ name: 'AddLis',
|
|
|
data() {
|
|
|
return {
|
|
|
- hisName: '', //检查项目
|
|
|
- hisDetailName: '',
|
|
|
- itemText: '', //化验小项搜索文字内容
|
|
|
- uniqueText: '', //公表项搜索文字内容
|
|
|
isEdit: false,
|
|
|
editId: '',
|
|
|
- mealNameList: [],
|
|
|
- itemNameList: [],
|
|
|
uniqueNameList: [],
|
|
|
- showMealNameList: false,
|
|
|
- showItemNameList: false,
|
|
|
- showUniqueNameList: false,
|
|
|
form: {
|
|
|
- mealName: '', //大项名称
|
|
|
- mealId: '', //大项Id
|
|
|
- itemName: '', //小项名称
|
|
|
- itemId: '', //小项Id
|
|
|
- uniqueName: '', //公表名称,必填
|
|
|
- uniqueId: '' //公表项Id
|
|
|
+ searchText: '', //搜索字段
|
|
|
+ hisName: '',
|
|
|
+ hisDetailName: ''
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ hisName: [
|
|
|
+ { required: true, message: '请输入检验套餐', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ searchText: [
|
|
|
+ { required: true, message: '请选择检验标准术语', trigger: 'change' }
|
|
|
+ ]
|
|
|
},
|
|
|
saveDisable: false, //保存按钮禁止点击
|
|
|
- isVila: false,
|
|
|
- isSendDataOver: 0, // 请求列表数据过程 0 发送请求前 1 请求过程 2请求结束
|
|
|
+ showDrop: false, //下拉框显示文字
|
|
|
searchType: 2
|
|
|
};
|
|
|
},
|
|
@@ -114,122 +119,71 @@ export default {
|
|
|
if (isEdit) {
|
|
|
this.isEdit = isEdit;
|
|
|
this.editId = data.id;
|
|
|
- this.uniqueText = data.uniqueName;
|
|
|
- this.hisName = data.hisName;
|
|
|
- this.hisDetailName = data.hisDetailName;
|
|
|
- this.form.uniqueName = data.uniqueName;
|
|
|
+ this.form.hisName = data.hisName;
|
|
|
+ this.form.searchText = data.uniqueName;
|
|
|
+ this.form.hisDetailName = data.hisDetailName;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- close() {
|
|
|
- this.mealNameList = [];
|
|
|
- this.itemNameList = [];
|
|
|
- this.uniqueNameList = [];
|
|
|
- this.showSearchList();
|
|
|
- },
|
|
|
- // 搜索
|
|
|
- searchMealItem() {
|
|
|
- const { hisName, hisDetailName } = this;
|
|
|
- this.isSendDataOver = 1; // 发送请求中
|
|
|
+ // 搜索列表
|
|
|
+ searchTerms(query) {
|
|
|
+ if (!query) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const { hisName, hisDetailName } = this.form;
|
|
|
let type = 2; // 1-化验大项、2-化验小项
|
|
|
if (hisName !== '' && hisDetailName === '') {
|
|
|
type = 1;
|
|
|
}
|
|
|
- this.getAllLisConcept(type);
|
|
|
- },
|
|
|
- // 标准术语搜索列表
|
|
|
- getAllLisConcept(type) {
|
|
|
- // console.log(type, type, '================');
|
|
|
this.searchType = type;
|
|
|
+ this.showDrop = true;
|
|
|
let params = {
|
|
|
- type: type, //手术/操作
|
|
|
- inputStr: this.uniqueText,
|
|
|
+ type: type,
|
|
|
+ inputStr: query,
|
|
|
sex: 3,
|
|
|
age: 0
|
|
|
};
|
|
|
- if (!params.inputStr) {
|
|
|
- return;
|
|
|
- }
|
|
|
api.retrievalSearch(params).then(res => {
|
|
|
+ this.showDrop = false;
|
|
|
if (res.data.code === '0') {
|
|
|
- this.isSendDataOver = 2; //请求发送结束
|
|
|
this.uniqueNameList =
|
|
|
type === 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
|
|
|
- this.showSearchList('showUniqueNameList');
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- // 获取焦点搜索
|
|
|
- focuInput() {
|
|
|
- this.showSearchList();
|
|
|
- },
|
|
|
-
|
|
|
- // 显示搜索列表数据
|
|
|
- showSearchList(type) {
|
|
|
- this.showMealNameList = false;
|
|
|
- this.showItemNameList = false;
|
|
|
- this.showUniqueNameList = false;
|
|
|
- if (type === 'showMealNameList') {
|
|
|
- this.showMealNameList = true;
|
|
|
- } else if (type === 'showItemNameList') {
|
|
|
- this.showItemNameList = true;
|
|
|
- } else if (type === 'showUniqueNameList') {
|
|
|
- this.showUniqueNameList = true;
|
|
|
- }
|
|
|
- },
|
|
|
- selectMealName(item) {
|
|
|
- this.form.mealName = item.conceptName;
|
|
|
- this.form.mealId = item.conceptId;
|
|
|
- // this.$refs['mealNameList'].style.display='none'
|
|
|
- this.hisName = '';
|
|
|
- this.hisDetailName = '';
|
|
|
- this.mealNameList = [];
|
|
|
- },
|
|
|
- selectItemName(item) {
|
|
|
- this.form.itemName = item.conceptName;
|
|
|
- this.form.itemId = item.conceptId;
|
|
|
- this.itemText = '';
|
|
|
- this.itemNameList = [];
|
|
|
+ changeWord() {},
|
|
|
+ // 获取焦点
|
|
|
+ handleFocus() {
|
|
|
+ // this.uniqueNameList = [];
|
|
|
},
|
|
|
- // 选中诊断标准术语
|
|
|
- selectUniqueName(item) {
|
|
|
- this.form.uniqueName =
|
|
|
- this.searchType === 2 ? `${item.uniqueName}(${item.name})` : item;
|
|
|
+ handleclick() {
|
|
|
this.uniqueNameList = [];
|
|
|
+ this.form.searchText = '';
|
|
|
},
|
|
|
+
|
|
|
// 初始化表单数据
|
|
|
initForm() {
|
|
|
- this.form.uniqueName = '';
|
|
|
- this.hisName = '';
|
|
|
- this.uniqueText = '';
|
|
|
- this.hisDetailName = '';
|
|
|
- },
|
|
|
-
|
|
|
- handleInput() {
|
|
|
- // console.log(event.target.value,'=============');
|
|
|
- if (event.target.value.length !== 0) {
|
|
|
- this.isVila = false;
|
|
|
- }
|
|
|
+ this.form.hisName = '';
|
|
|
+ this.form.hisDetailName = '';
|
|
|
+ this.form.searchText = '';
|
|
|
},
|
|
|
|
|
|
// 建立关联-参数处理
|
|
|
submitForm() {
|
|
|
- const { hisName, hisDetailName } = this;
|
|
|
- const { uniqueName } = this.form;
|
|
|
- if (!hisName) {
|
|
|
- this.isVila = true;
|
|
|
- }
|
|
|
- if (!hisName || !uniqueName) {
|
|
|
- this.warning('请填写相关数据');
|
|
|
- return;
|
|
|
- }
|
|
|
- let params = {
|
|
|
- hisName: hisName,
|
|
|
- hisDetailName,
|
|
|
- uniqueName: uniqueName
|
|
|
- };
|
|
|
- this.showSaveDialog(params);
|
|
|
+ this.$refs.relationForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const { searchText, hisName, hisDetailName } = this.form;
|
|
|
+ let params = {
|
|
|
+ hisName: hisName,
|
|
|
+ uniqueName: searchText,
|
|
|
+ hisDetailName: hisDetailName
|
|
|
+ };
|
|
|
+ this.showSaveDialog(params);
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 建立关联-映射关系是否已存在
|
|
|
showSaveDialog(params) {
|
|
@@ -246,9 +200,6 @@ export default {
|
|
|
this.saveLisMapping(params, '保存成功', 'success');
|
|
|
} else {
|
|
|
// 已存在,提示修改
|
|
|
- // this.showConfirmDialog('该关联已存在是否替换旧的关系信息', () => {
|
|
|
- // this.saveLisMapping(params, '关联建立成功', 'success');
|
|
|
- // });
|
|
|
this.warning('该条关联已存在,无法添加');
|
|
|
this.saveDisable = false;
|
|
|
}
|
|
@@ -263,7 +214,6 @@ export default {
|
|
|
api.saveOrUpdateLisRecord(params).then(res => {
|
|
|
if (res.data.code === '0') {
|
|
|
this.warning(res.data.msg || msg, type);
|
|
|
- // this.$router.push({name: 'ChemicalAndCommonMapping'});
|
|
|
this.initForm();
|
|
|
this.$router.push({
|
|
|
name: 'Lis',
|
|
@@ -313,17 +263,6 @@ export default {
|
|
|
.topBack {
|
|
|
top: 0;
|
|
|
}
|
|
|
- // .groupTitle {
|
|
|
- // width: calc(100% - 50px);
|
|
|
- // height: 40px;
|
|
|
- // background: #fff;
|
|
|
- // padding: 0 20px 0 30px;
|
|
|
- // margin-bottom: 20px;
|
|
|
- // line-height: 40px;
|
|
|
- // position: relative;
|
|
|
- // z-index: 5;
|
|
|
-
|
|
|
- // }
|
|
|
.titleBox {
|
|
|
padding: 0 0 10px 0px;
|
|
|
}
|
|
@@ -374,14 +313,6 @@ export default {
|
|
|
float: left;
|
|
|
color: #606266;
|
|
|
}
|
|
|
- .searchInputInfo {
|
|
|
- // margin-left: 8px;
|
|
|
- color: #ed808d;
|
|
|
- position: absolute;
|
|
|
- top: 26px;
|
|
|
- left: 150px;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
.itemLabelName {
|
|
|
width: 150px;
|
|
|
}
|
|
@@ -432,10 +363,21 @@ export default {
|
|
|
.mealNameItem:hover {
|
|
|
background: #f5f7fa;
|
|
|
}
|
|
|
- .selectItemName {
|
|
|
+ // .selectItemName {
|
|
|
+ // padding-left: 4px;
|
|
|
+ // display: inline-block;
|
|
|
+ // margin-top: 8px;
|
|
|
+ // // width: calc(100% - 160px);s
|
|
|
+ // line-height: 24px;
|
|
|
+ // overflow: hidden;
|
|
|
+ // word-wrap: break-word;
|
|
|
+ // word-break: break-all;
|
|
|
+ // }
|
|
|
+ .previewInfo {
|
|
|
+ padding-left: 4px;
|
|
|
display: inline-block;
|
|
|
margin-top: 8px;
|
|
|
- width: calc(100% - 160px);
|
|
|
+ // width: calc(100% - 160px);s
|
|
|
line-height: 24px;
|
|
|
overflow: hidden;
|
|
|
word-wrap: break-word;
|