|
@@ -43,7 +43,7 @@
|
|
<tr v-for="(item, index) in disFeatureList" :key="item.index">
|
|
<tr v-for="(item, index) in disFeatureList" :key="item.index">
|
|
<td class="FeatureSort" >{{index+1}}</td>
|
|
<td class="FeatureSort" >{{index+1}}</td>
|
|
<td class="FeatureType" >
|
|
<td class="FeatureType" >
|
|
- <el-select size="mini" :class="{selectType: item.typeNull}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FeatureType')" clearable>
|
|
|
|
|
|
+ <el-select size="mini" :class="{selectType: item.typeNull}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FeatureType')">
|
|
<el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
<el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</td>
|
|
</td>
|
|
@@ -68,10 +68,27 @@
|
|
:class="{borderRed:item.verifyStandard||item.standardNull}"
|
|
:class="{borderRed:item.verifyStandard||item.standardNull}"
|
|
:title="item.standard"
|
|
:title="item.standard"
|
|
v-model.trim="item.standard"
|
|
v-model.trim="item.standard"
|
|
- @input="handleInp(index,$event,'FeatureStand')"
|
|
|
|
|
|
+ @input="handleInp(index,$event,'FeatureStand',item.type)"
|
|
@focus="clickItem(index,'FeatureStand')">
|
|
@focus="clickItem(index,'FeatureStand')">
|
|
</el-input>
|
|
</el-input>
|
|
- </el-tooltip>
|
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <div class="searchItemBox">
|
|
|
|
+ <ul
|
|
|
|
+ class="searchItemList"
|
|
|
|
+ v-if="showDiagList&&index === searchIndex && searchFiled ==='FeatureStand' && searchResultList.length > 0"
|
|
|
|
+ >
|
|
|
|
+ <li v-for="(item, ind) in searchResultList"
|
|
|
|
+ class="diagItem ellipsis"
|
|
|
|
+ :key="ind"
|
|
|
|
+ :title="item"
|
|
|
|
+ @click="selectSearchItem(index,item,'FeatureStand')"
|
|
|
|
+ >
|
|
|
|
+ {{item}}
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</td>
|
|
</td>
|
|
<td class="FeatureRelate">
|
|
<td class="FeatureRelate">
|
|
<el-tooltip :disabled="!item.verifyRelation&&!item.relationNull" class="item" effect="dark" :content="item.verifyRelation||item.relationNull" placement="top">
|
|
<el-tooltip :disabled="!item.verifyRelation&&!item.relationNull" class="item" effect="dark" :content="item.verifyRelation||item.relationNull" placement="top">
|
|
@@ -84,7 +101,25 @@
|
|
@input="handleInp(index,$event,'FeatureRelate',item.type)"
|
|
@input="handleInp(index,$event,'FeatureRelate',item.type)"
|
|
@focus="clickItem(index,'FeatureRelate')">
|
|
@focus="clickItem(index,'FeatureRelate')">
|
|
</el-input>
|
|
</el-input>
|
|
|
|
+
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
+ <div class="searchItemBox">
|
|
|
|
+ <ul
|
|
|
|
+ class="searchItemList"
|
|
|
|
+ v-if="showDiagList&&index === searchIndex && searchFiled ==='FeatureRelate' && searchResultList.length > 0"
|
|
|
|
+ >
|
|
|
|
+ <li v-for="(item, ind) in searchResultList"
|
|
|
|
+ class="diagItem ellipsis"
|
|
|
|
+ :key="ind"
|
|
|
|
+ :title="item"
|
|
|
|
+ @click="selectSearchItem(index,item,'FeatureRelate')"
|
|
|
|
+ >
|
|
|
|
+ {{item}}
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</td>
|
|
</td>
|
|
<td class="FeatureuniqueName">
|
|
<td class="FeatureuniqueName">
|
|
<el-tooltip :disabled="!item.verifyUnique" class="item" effect="dark" :content="item.verifyUnique" placement="top">
|
|
<el-tooltip :disabled="!item.verifyUnique" class="item" effect="dark" :content="item.verifyUnique" placement="top">
|
|
@@ -145,7 +180,7 @@
|
|
<tr v-for="(item, index) in disFormulaList" :key="item.index">
|
|
<tr v-for="(item, index) in disFormulaList" :key="item.index">
|
|
<td class="FormulaSort">{{index +1}}</td>
|
|
<td class="FormulaSort">{{index +1}}</td>
|
|
<td class="FormulaType">
|
|
<td class="FormulaType">
|
|
- <el-select size="mini" :class="{selectType: item.verifyType}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FormulaType')" clearable>
|
|
|
|
|
|
+ <el-select size="mini" :class="{selectType: item.verifyType}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FormulaType')">
|
|
<el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
<el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</td>
|
|
</td>
|
|
@@ -176,6 +211,11 @@
|
|
</table>
|
|
</table>
|
|
<div class="btn clearfix">
|
|
<div class="btn clearfix">
|
|
<div class="btnBox">
|
|
<div class="btnBox">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled = "isReady"
|
|
|
|
+ @click="saveTemp"
|
|
|
|
+ >临时保存</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
:disabled = "isReady"
|
|
:disabled = "isReady"
|
|
@@ -183,12 +223,12 @@
|
|
>校验并保存数据</el-button>
|
|
>校验并保存数据</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled = "hasQuestion == 1"
|
|
|
|
|
|
+ :disabled = "hasQuestion != 0"
|
|
@click="exportDiagnosticAll"
|
|
@click="exportDiagnosticAll"
|
|
>导出诊断依据</el-button>
|
|
>导出诊断依据</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
- :disabled = "hasQuestion == 1"
|
|
|
|
|
|
+ :disabled = "hasQuestion != 0"
|
|
@click="updateNeo"
|
|
@click="updateNeo"
|
|
>更新图谱</el-button>
|
|
>更新图谱</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -220,7 +260,7 @@
|
|
formulaTypeList: [],
|
|
formulaTypeList: [],
|
|
disFeatureList: [
|
|
disFeatureList: [
|
|
{
|
|
{
|
|
- type:'',
|
|
|
|
|
|
+ type:1,
|
|
code:'',
|
|
code:'',
|
|
standard:'',
|
|
standard:'',
|
|
relation:'',
|
|
relation:'',
|
|
@@ -233,7 +273,7 @@
|
|
disFeatureListResult:[], //疾病特征列表(保存用)
|
|
disFeatureListResult:[], //疾病特征列表(保存用)
|
|
disFormulaList:[
|
|
disFormulaList:[
|
|
{
|
|
{
|
|
- type:'',
|
|
|
|
|
|
+ type:92,
|
|
code:'',
|
|
code:'',
|
|
standard:'',
|
|
standard:'',
|
|
relation:'',
|
|
relation:'',
|
|
@@ -251,7 +291,10 @@
|
|
disNameExist: true, //诊断名称是否存在
|
|
disNameExist: true, //诊断名称是否存在
|
|
hasNoUniqueName: false, //是否存在没有公表项的化验
|
|
hasNoUniqueName: false, //是否存在没有公表项的化验
|
|
isReady:false,
|
|
isReady:false,
|
|
- showDiagList: false
|
|
|
|
|
|
+ showDiagList: false,
|
|
|
|
+ searchIndex: -1,
|
|
|
|
+ searchFiled: '',
|
|
|
|
+ searchResultList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -288,6 +331,12 @@
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
+ this.showConfirmDialog('是否离开当前页面?(如果未校验并保存数据/暂存数据时请先保存)',()=>{
|
|
|
|
+ next()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
getDropList() {
|
|
getDropList() {
|
|
return apis.getKnowledgeEnums().then((res) =>{
|
|
return apis.getKnowledgeEnums().then((res) =>{
|
|
@@ -324,13 +373,57 @@
|
|
this.searchDiagVal = ''
|
|
this.searchDiagVal = ''
|
|
this.diagList=[]
|
|
this.diagList=[]
|
|
},
|
|
},
|
|
|
|
+ selectSearchItem(index, item, searchType){
|
|
|
|
+ if(searchType === 'FeatureStand') {
|
|
|
|
+ const SelectResult = this.getSelectResult(this.disFeatureList[index].standard, item)
|
|
|
|
+ this.disFeatureList[index].standard = SelectResult
|
|
|
|
+ this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ } else if(searchType === 'FeatureRelate') {
|
|
|
|
+ const SelectResult = this.getSelectResult(this.disFeatureList[index].relation, item)
|
|
|
|
+ this.disFeatureList[index].relation = SelectResult
|
|
|
|
+ this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getSelectResult(val,item) {
|
|
|
|
+ const index = val.lastIndexOf('、')
|
|
|
|
+ if(index < 0) {
|
|
|
|
+ return item
|
|
|
|
+ } else {
|
|
|
|
+ return val.slice(0,index+1)+item
|
|
|
|
+ }
|
|
|
|
+ },
|
|
focuInput() {
|
|
focuInput() {
|
|
this.showDiagList = false
|
|
this.showDiagList = false
|
|
},
|
|
},
|
|
|
|
+ getSearchVal(val) {
|
|
|
|
+ const index = val.lastIndexOf('、')
|
|
|
|
+ if(index < 0) {
|
|
|
|
+ return val
|
|
|
|
+ } else {
|
|
|
|
+ return val.slice(index+1)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ diagBaseSearch(field, name, type) {
|
|
|
|
+ this.showDiagList = true
|
|
|
|
+ const param = {
|
|
|
|
+ field,
|
|
|
|
+ name,
|
|
|
|
+ type
|
|
|
|
+ }
|
|
|
|
+ api.diagBaseSearch(param).then((res)=>{
|
|
|
|
+ if(res.data.code == '0') {
|
|
|
|
+ this.searchResultList = res.data.data
|
|
|
|
+ } else {
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
addItem(index, type) {
|
|
addItem(index, type) {
|
|
if(type == 1) {
|
|
if(type == 1) {
|
|
const item = {
|
|
const item = {
|
|
- type:'',
|
|
|
|
|
|
+ type:1,
|
|
code:'',
|
|
code:'',
|
|
standard:'',
|
|
standard:'',
|
|
relation:'',
|
|
relation:'',
|
|
@@ -341,7 +434,7 @@
|
|
this.disFeatureList.splice(index+1, 0, item)
|
|
this.disFeatureList.splice(index+1, 0, item)
|
|
}else if(type == 2) {
|
|
}else if(type == 2) {
|
|
const item = {
|
|
const item = {
|
|
- type:'',
|
|
|
|
|
|
+ type:92,
|
|
code:'',
|
|
code:'',
|
|
standard:'',
|
|
standard:'',
|
|
relation:'',
|
|
relation:'',
|
|
@@ -488,6 +581,32 @@
|
|
})
|
|
})
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ saveTemp(){
|
|
|
|
+ if(!this.disName) {
|
|
|
|
+ this.warning('请选择诊断');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: 'Loading',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
+ });
|
|
|
|
+ this.hasQuestion= 1
|
|
|
|
+ const param = {
|
|
|
|
+ disFeature: this.disFeatureList,
|
|
|
|
+ disName: this.disName,
|
|
|
|
+ disformula: this.disFormulaList,
|
|
|
|
+ id: this.id,
|
|
|
|
+ modifier: this.modifier
|
|
|
|
+ }
|
|
|
|
+ api.tempSaveOrUpate(param).then((res)=>{
|
|
|
|
+ loading.close()
|
|
|
|
+ if(res.data.code === '0') {
|
|
|
|
+ this.warning('临时保存成功','success')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
submitForm(type) {
|
|
submitForm(type) {
|
|
if(!this.disName) {
|
|
if(!this.disName) {
|
|
this.warning('请选择诊断');
|
|
this.warning('请选择诊断');
|
|
@@ -560,7 +679,7 @@
|
|
},
|
|
},
|
|
errorDataVerify(loading) {
|
|
errorDataVerify(loading) {
|
|
for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
- if(this.disFormulaList[i].type || this.disFormulaList[i].formula ) {
|
|
|
|
|
|
+ if( this.disFormulaList[i].formula ) {
|
|
this.disFormulaListResult.push(this.disFormulaList[i])
|
|
this.disFormulaListResult.push(this.disFormulaList[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -805,7 +924,7 @@
|
|
}else {
|
|
}else {
|
|
this.disFormulaList = [
|
|
this.disFormulaList = [
|
|
{
|
|
{
|
|
- type:'',
|
|
|
|
|
|
+ type:92,
|
|
code:'',
|
|
code:'',
|
|
standard:'',
|
|
standard:'',
|
|
relation:'',
|
|
relation:'',
|
|
@@ -845,7 +964,21 @@
|
|
})
|
|
})
|
|
} else if(type==='FeatureStand') { //标准词不能输入顿号
|
|
} else if(type==='FeatureStand') { //标准词不能输入顿号
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.disFeatureList[index].standard = value.replace(/、/g,'')
|
|
|
|
|
|
+ const resultVal = value.replace(/、/g,'').replace(' ','')
|
|
|
|
+ this.disFeatureList[index].standard = resultVal
|
|
|
|
+ if(resultVal) {
|
|
|
|
+ const searchVal = this.getSearchVal(resultVal)
|
|
|
|
+ if(searchVal) {
|
|
|
|
+ this.searchIndex = index
|
|
|
|
+ this.searchFiled = 'FeatureStand'
|
|
|
|
+ this.diagBaseSearch(2,searchVal,itemType)
|
|
|
|
+ } else {
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
// this.disFeatureList[index].standard = value.replace(/、/g,'')
|
|
// this.disFeatureList[index].standard = value.replace(/、/g,'')
|
|
} else if ( type === 'FormulaNumber') {
|
|
} else if ( type === 'FormulaNumber') {
|
|
@@ -864,17 +997,37 @@
|
|
|
|
|
|
|
|
|
|
} else if ( type === 'FeatureRelate') {
|
|
} else if ( type === 'FeatureRelate') {
|
|
|
|
+ let resultVal;
|
|
|
|
+
|
|
if(itemType == 3) {
|
|
if(itemType == 3) {
|
|
- this.$nextTick(() => {
|
|
|
|
- this.disFeatureList[index].relation = value.replace(/、/g,'')
|
|
|
|
- })
|
|
|
|
|
|
+ resultVal = value.replace(/、/g,'').replace(' ','')
|
|
|
|
+ } else {
|
|
|
|
+ resultVal = value.replace(' ','')
|
|
}
|
|
}
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.disFeatureList[index].relation = resultVal
|
|
|
|
+ })
|
|
|
|
+ if(resultVal) {
|
|
|
|
+ const searchVal = this.getSearchVal(resultVal)
|
|
|
|
+ if(searchVal) {
|
|
|
|
+ this.searchIndex = index
|
|
|
|
+ this.searchFiled = 'FeatureRelate'
|
|
|
|
+ this.diagBaseSearch(3,searchVal,itemType)
|
|
|
|
+ } else [
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ ]
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.searchResultList = []
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
// const item = this.selectedIndexList[index].indexDesc;
|
|
// const item = this.selectedIndexList[index].indexDesc;
|
|
// e.target.value = value.replace(/[^\d]/g,'');
|
|
// e.target.value = value.replace(/[^\d]/g,'');
|
|
// this.selectedIndexList[index].indexDesc = item.replace(/[^\d]/g,'');
|
|
// this.selectedIndexList[index].indexDesc = item.replace(/[^\d]/g,'');
|
|
},
|
|
},
|
|
clickItem(index, type) {
|
|
clickItem(index, type) {
|
|
|
|
+ this.showDiagList = false
|
|
switch(type) {
|
|
switch(type) {
|
|
case 'FeatureType':
|
|
case 'FeatureType':
|
|
this.disFeatureList[index].typeNull = ''
|
|
this.disFeatureList[index].typeNull = ''
|
|
@@ -1187,6 +1340,22 @@
|
|
padding: 5px 0;
|
|
padding: 5px 0;
|
|
min-height: 30px;
|
|
min-height: 30px;
|
|
}
|
|
}
|
|
|
|
+ .searchItemBox{
|
|
|
|
+ position: relative;
|
|
|
|
+ bottom: 0px;
|
|
|
|
+ }
|
|
|
|
+ .searchItemList {
|
|
|
|
+ position: absolute;
|
|
|
|
+ border: 1px solid #a9a9a9;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ top: 4px;
|
|
|
|
+ z-index: 2;
|
|
|
|
+ width: 100%;
|
|
|
|
+ max-height: 150px;
|
|
|
|
+ overflow: auto;
|
|
|
|
+ background: #fff;
|
|
|
|
+ margin: 0 0 20px 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
</style>
|