|
@@ -4,9 +4,9 @@
|
|
<div class="contents">
|
|
<div class="contents">
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="addBtn" v-if="list.length == 0">
|
|
<div class="addBtn" v-if="list.length == 0">
|
|
- <!-- <el-button
|
|
|
|
|
|
+ <el-button
|
|
@click="addConcept"
|
|
@click="addConcept"
|
|
- >+ 新 增</el-button> -->
|
|
|
|
|
|
+ >+ 新 增</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="tree">
|
|
<div class="tree">
|
|
@@ -57,7 +57,7 @@
|
|
</div>
|
|
</div>
|
|
<SearchList
|
|
<SearchList
|
|
v-if="showSearch"
|
|
v-if="showSearch"
|
|
- :conceptList="conceptList"
|
|
|
|
|
|
+ :conceptList="conceptList||[]"
|
|
:addLevel="addLevel"
|
|
:addLevel="addLevel"
|
|
@closeSearch="closeSearch"
|
|
@closeSearch="closeSearch"
|
|
@selectConcept="selectConcept"
|
|
@selectConcept="selectConcept"
|
|
@@ -85,6 +85,77 @@ export default {
|
|
{name:'实验室检查类别',id:'6'},
|
|
{name:'实验室检查类别',id:'6'},
|
|
{name:'辅助检查类别',id:'7'},
|
|
{name:'辅助检查类别',id:'7'},
|
|
],
|
|
],
|
|
|
|
+ template:{
|
|
|
|
+ "conceptId": null,
|
|
|
|
+ "conceptName": "",
|
|
|
|
+ "nodeList": [{
|
|
|
|
+ "conceptId": 501,
|
|
|
|
+ "conceptName": "疾病相关主症状",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [103],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 502,
|
|
|
|
+ "conceptName": "疾病相关次症状",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [103],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 503,
|
|
|
|
+ "conceptName": "疾病相关体格检查结果",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [104],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 504,
|
|
|
|
+ "conceptName": "疾病相关实验室检查套餐",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [107],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 505,
|
|
|
|
+ "conceptName": "疾病相关辅助检查项目",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [109, 110],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 506,
|
|
|
|
+ "conceptName": "疾病相关药物治疗",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [101],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 507,
|
|
|
|
+ "conceptName": "疾病相关手术治疗",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [106],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }, {
|
|
|
|
+ "conceptId": 508,
|
|
|
|
+ "conceptName": "疾病相关鉴别诊断",
|
|
|
|
+ "nodeList": [],
|
|
|
|
+ "libType": [100],
|
|
|
|
+ "level": 1,
|
|
|
|
+ "sonRelationId": 17,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ }],
|
|
|
|
+ "level": 0,
|
|
|
|
+ "isExpanded": false
|
|
|
|
+ },
|
|
curId:'1',
|
|
curId:'1',
|
|
list: [],
|
|
list: [],
|
|
defaultProps: {
|
|
defaultProps: {
|
|
@@ -107,8 +178,11 @@ export default {
|
|
this.getTreeList(1)
|
|
this.getTreeList(1)
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ addConcept(e) {
|
|
|
|
+ this.addLevel = 0;
|
|
|
|
+ this.openSearch(e);
|
|
|
|
+ },
|
|
getTreeList(id){
|
|
getTreeList(id){
|
|
-
|
|
|
|
const { isEdit, data } = this.$route.params
|
|
const { isEdit, data } = this.$route.params
|
|
if(isEdit) {
|
|
if(isEdit) {
|
|
this.isEdit = isEdit
|
|
this.isEdit = isEdit
|
|
@@ -117,7 +191,7 @@ export default {
|
|
let result = paramData.diseaseDetailDTO||{}
|
|
let result = paramData.diseaseDetailDTO||{}
|
|
// this.relationTypes = paramData.types[0]||[]
|
|
// this.relationTypes = paramData.types[0]||[]
|
|
const itemStr = JSON.stringify(result)
|
|
const itemStr = JSON.stringify(result)
|
|
- let tmp = itemStr.replace(/disName/g,'conceptName').replace(/rname/g,'conceptName').replace(/datas/g,'nodeList').replace(/details/g,'nodeList').replace(/id/g,'conceptId').replace(/libName/g,'conceptName')
|
|
|
|
|
|
+ let tmp = itemStr.replace(/disName/g,'conceptName').replace(/rname/g,'conceptName').replace(/datas/g,'nodeList').replace(/details/g,'nodeList').replace(/id/g,'conceptId').replace(/sconceptId/g,'conceptId').replace(/rconceptId/g,'conceptId').replace(/libName/g,'conceptName')
|
|
let item = JSON.parse(tmp)
|
|
let item = JSON.parse(tmp)
|
|
item.level = 0
|
|
item.level = 0
|
|
item.isExpanded = false
|
|
item.isExpanded = false
|
|
@@ -162,7 +236,7 @@ export default {
|
|
this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
|
|
this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
|
|
param.nodeList = nodeListResult
|
|
param.nodeList = nodeListResult
|
|
this.saveDisable = true //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
this.saveDisable = true //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
- api.addTreeRelation(this.reparams(param)).then((res) => {
|
|
|
|
|
|
+ api.diseaseBaseSave(this.reparams(param)).then((res) => {
|
|
const { data } = res
|
|
const { data } = res
|
|
if(data.code == '0') {
|
|
if(data.code == '0') {
|
|
this.message(res.data.msg||'术语关系建立成功','success');
|
|
this.message(res.data.msg||'术语关系建立成功','success');
|
|
@@ -177,7 +251,7 @@ export default {
|
|
for(let i = 0; i <nodeList.length; i++) {
|
|
for(let i = 0; i <nodeList.length; i++) {
|
|
let newChild;
|
|
let newChild;
|
|
if(type == '0') { //添加的时候保存所有的id列表
|
|
if(type == '0') { //添加的时候保存所有的id列表
|
|
- newChild = {conceptId: nodeList[i].conceptId, relationId: 17,nodeList:[],sonRelationId: 17, isExpanded:false}
|
|
|
|
|
|
+ newChild = {conceptId: nodeList[i].conceptId,libType:nodeList[i].libType, relationId: 17,nodeList:[],sonRelationId: 17, isExpanded:false}
|
|
} else if(type == '1') { //修改的时候添加层级
|
|
} else if(type == '1') { //修改的时候添加层级
|
|
const item = JSON.parse(JSON.stringify(nodeList[i]))
|
|
const item = JSON.parse(JSON.stringify(nodeList[i]))
|
|
newChild = Object.assign(item, {level: level, nodeList: [],sonRelationId: 17, isExpanded:false})
|
|
newChild = Object.assign(item, {level: level, nodeList: [],sonRelationId: 17, isExpanded:false})
|
|
@@ -197,14 +271,15 @@ export default {
|
|
},
|
|
},
|
|
searchConcept(txt) {
|
|
searchConcept(txt) {
|
|
let excludedConceptIds = [];
|
|
let excludedConceptIds = [];
|
|
- if(this.list[0]) {
|
|
|
|
|
|
+ if(this.list.length>0) {
|
|
this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
|
|
this.excludedConceptIds = this.IteraNodeList(this.list[0].nodeList,excludedConceptIds, 2)
|
|
}
|
|
}
|
|
const {libType} = this.operaList
|
|
const {libType} = this.operaList
|
|
|
|
+
|
|
const params = {
|
|
const params = {
|
|
"name": txt,
|
|
"name": txt,
|
|
- "excludedConceptIds": this.excludedConceptIds,
|
|
|
|
- "libType": libType[0],
|
|
|
|
|
|
+ "excludedConceptIds": this.excludedConceptIds||[],
|
|
|
|
+ "libType": this.addLevel == 0?100:libType&&libType[0]||''
|
|
}
|
|
}
|
|
api.searchConcept(params).then((res) => {
|
|
api.searchConcept(params).then((res) => {
|
|
const { data } = res
|
|
const { data } = res
|
|
@@ -215,14 +290,16 @@ export default {
|
|
},
|
|
},
|
|
selectConcept(item) {
|
|
selectConcept(item) {
|
|
if(this.addLevel == 0) {
|
|
if(this.addLevel == 0) {
|
|
- this.list.push(Object.assign({}, item, {nodeList: [], level: 0, conceptId: item.conceptId, sonRelationId: 17}))
|
|
|
|
- this.list = JSON.parse(JSON.stringify(this.list))
|
|
|
|
|
|
+ let temp = JSON.parse(JSON.stringify(this.template))
|
|
|
|
+ temp.conceptId = item.conceptId
|
|
|
|
+ temp.conceptName = item.conceptName
|
|
|
|
+ this.list = [temp]
|
|
}else {
|
|
}else {
|
|
const data = this.operaList
|
|
const data = this.operaList
|
|
- const newChild = Object.assign({}, item, {nodeList: [], level: data.level+1, conceptId: item.conceptId, relationId: 17,sonRelationId: 17});
|
|
|
|
|
|
+ const newChild = Object.assign({}, item, {nodeList: [],libType:data.libType, level: data.level+1, conceptId: item.conceptId, relationId: 17,sonRelationId: 17});
|
|
// const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
|
|
// const newChild = { id: id++, label: 'nodeList', level: data.level+1, children: [] };
|
|
if (!data.nodeList) {
|
|
if (!data.nodeList) {
|
|
- this.$set(data, 'nodeList', []);
|
|
|
|
|
|
+ this.$set(data, 'nodeList', []);
|
|
}
|
|
}
|
|
data.nodeList.push(newChild);
|
|
data.nodeList.push(newChild);
|
|
}
|
|
}
|
|
@@ -267,11 +344,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
- "eid": item.conceptId,
|
|
|
|
- "eids": sonIds,
|
|
|
|
- "rid": this.relationTypes[1],
|
|
|
|
"sid": param.conceptId,
|
|
"sid": param.conceptId,
|
|
- "srid": this.relationTypes[3]
|
|
|
|
|
|
+ "rid": item.conceptId,
|
|
|
|
+ "eids": sonIds,
|
|
|
|
+ // "eid": item.libType[0],
|
|
|
|
+ // "srid": 0
|
|
}
|
|
}
|
|
params.push(obj)
|
|
params.push(obj)
|
|
}
|
|
}
|