|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <crumbs :title="minTitle" :param="$route.params" linkTo="MedicalName"></crumbs>
|
|
|
+ <crumbs :title="minTitle" :param="$route.params" linkTo="BasicTermsMaintenance"></crumbs>
|
|
|
<div class="contents">
|
|
|
<div class="content">
|
|
|
<h3>添加术语:</h3>
|
|
@@ -72,7 +72,7 @@
|
|
|
v-for="item in group.options"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
- :value="item.name"
|
|
|
+ :value="item.code"
|
|
|
></el-option>
|
|
|
</el-option-group>
|
|
|
</el-select>
|
|
@@ -95,7 +95,7 @@
|
|
|
<td class="descs">术语性质</td>
|
|
|
<td v-if="id">操作</td>
|
|
|
</tr>
|
|
|
- <tr v-for="(item,index) in allwords">
|
|
|
+ <tr v-for="(item,index) in allwords" :key="index">
|
|
|
<td class="ind">{{index+1}}</td>
|
|
|
<td :title="item.name&&item.name.length>9?item.name:''">
|
|
|
<!-- 使用原生input,输入限制 -->
|
|
@@ -175,6 +175,7 @@
|
|
|
<el-radio
|
|
|
v-for="(item,index) in allwords"
|
|
|
:label="index"
|
|
|
+ :key="index"
|
|
|
:disabled="index == 0"
|
|
|
>选为标准词</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -191,7 +192,7 @@
|
|
|
<td class="desc">说明</td>
|
|
|
<td v-if="id">操作</td>
|
|
|
</tr>
|
|
|
- <tr v-for="(item,index) in synonymous">
|
|
|
+ <tr v-for="(item,index) in synonymous" :key="index">
|
|
|
<td class="ind">{{index+1}}</td>
|
|
|
<td :title="item.name&&item.name.length>9?item.name:''">
|
|
|
<!-- 使用原生input,输入限制 -->
|
|
@@ -236,7 +237,7 @@
|
|
|
<el-form label-width="150px">
|
|
|
<el-form-item label="性别:">
|
|
|
<el-select v-model="sexType">
|
|
|
- <el-option v-for="(it,i) in sex" :label="it.name" :value="it.name"></el-option>
|
|
|
+ <el-option v-for="(it,i) in sex" :key="i" :label="it.name" :value="it.name"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="年龄:" class="ages">
|
|
@@ -259,7 +260,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="归属类型:" v-if="dioType" class="marT">
|
|
|
<el-select v-model="dioType">
|
|
|
- <el-option v-for="(it,i) in dioTypeList" :label="it.name" :value="it.val"></el-option>
|
|
|
+ <el-option v-for="(it,i) in dioTypeList" :key="i" :label="it.name" :value="it.val"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -290,7 +291,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script type="text/javascript">
|
|
|
-import api from '@api/icss.js';
|
|
|
+import api from '@api/knowledgeTree.js';
|
|
|
import pinyin from '../../js/Convert_Pinyin.js';
|
|
|
import utils from '@api/utils.js';
|
|
|
import SimilarListDrag from './SimilarListDrag';
|
|
@@ -354,7 +355,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getTypeList();
|
|
|
- const id = this.$route.params.id || '';
|
|
|
+ const id = this.$route.params.id;
|
|
|
const copy = this.$route.params.copy || '';
|
|
|
this.copy = copy;
|
|
|
if (id) {
|
|
@@ -402,7 +403,6 @@ export default {
|
|
|
if (data.code == 0) {
|
|
|
this.deptList = data.data;
|
|
|
if (!conptId) {
|
|
|
- console.log('this.deptListArr');
|
|
|
this.dept = '全科'; //默认展示全科
|
|
|
} else {
|
|
|
// 科室id转成name显示
|
|
@@ -456,30 +456,55 @@ export default {
|
|
|
this.radioVal = '';
|
|
|
}
|
|
|
},
|
|
|
+ reViewData(data) {
|
|
|
+ let tmpObj = [{
|
|
|
+ isConcept: data.isConcept,
|
|
|
+ name: data.libName,
|
|
|
+ remark: data.remark,
|
|
|
+ spell: data.spell,
|
|
|
+ type: data.typeName,
|
|
|
+ conceptId: data.conceptId,
|
|
|
+ libId: data.libId,
|
|
|
+ isHasCommon: data.isHasCommon,
|
|
|
+ synonymName: data.synonymName,
|
|
|
+ status: data.status,
|
|
|
+ typeId: data.libType
|
|
|
+ }]
|
|
|
+ for(let i = 0;i < data.klConceptSub.length;i++){
|
|
|
+ let tmp = data.klConceptSub[i]
|
|
|
+ tmp.name = tmp.libName
|
|
|
+ tmp.type = tmp.typeName
|
|
|
+ tmp.typeId = tmp.libType
|
|
|
+ }
|
|
|
+ data.libName = tmpObj
|
|
|
+ data.otherNames = data.klConceptSub
|
|
|
+ return data
|
|
|
+ },
|
|
|
getDetail(ids) {
|
|
|
if (ids) {
|
|
|
- api.getMedicalDetail({ conceptId: ids }).then(res => {
|
|
|
+ api.getBaseConceptAll({ conceptId: ids }).then(res => {
|
|
|
const result = res.data;
|
|
|
+ let redata = this.reViewData(result.data)
|
|
|
if (result.code == 0) {
|
|
|
- this.data = result.data.libName[0];
|
|
|
- this.singleword = result.data.libName;
|
|
|
- this.synonymous = result.data.otherNames;
|
|
|
- this.allwords = result.data.libName.concat(result.data.otherNames);
|
|
|
- this.showMore = result.data.isHasCommon;
|
|
|
- this.maxAge = result.data.maxAge;
|
|
|
- this.minAge = result.data.minAge;
|
|
|
- this.description = result.data.description;
|
|
|
- this.explains = result.data.explains;
|
|
|
- const type = result.data.type;
|
|
|
+ this.data = redata.libName[0];
|
|
|
+ this.singleword = redata.libName;
|
|
|
+ this.synonymous = redata.otherNames;
|
|
|
+ this.allwords = redata.libName.concat(result.data.otherNames);
|
|
|
+ this.showMore = redata.isHasCommon;
|
|
|
+ this.maxAge = redata.maxAge;
|
|
|
+ this.minAge = redata.minAge;
|
|
|
+ this.description = redata.description;
|
|
|
+ this.explains = redata.explains;
|
|
|
+ const type = redata.type;
|
|
|
|
|
|
if (type == '诊断') {
|
|
|
- this.dioType = result.data.classify || 'Ⅰ'; //类型,默认展示Ⅰ类
|
|
|
- const deptConptId = result.data.deptId;
|
|
|
+ this.dioType = redata.classify || 'Ⅰ'; //类型,默认展示Ⅰ类
|
|
|
+ const deptConptId = redata.deptId;
|
|
|
this.getDioType(true);
|
|
|
this.getDdeptList(deptConptId);
|
|
|
}
|
|
|
// this.sexType = result.data.sexType;
|
|
|
- let sexType = result.data.sexType;
|
|
|
+ let sexType = redata.sexType;
|
|
|
this.sex.map((v, i) => {
|
|
|
if (v.value == sexType) {
|
|
|
this.sexType = v.name;
|
|
@@ -495,27 +520,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getTypeList() {
|
|
|
- api
|
|
|
- .allKnowledgeType({ name: '' })
|
|
|
+ api.baseTypeGetPage({ name: '',size: 1000 })
|
|
|
.then(res => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
- // this.typeList = data.data.records;
|
|
|
- this.typeList = data.data;
|
|
|
+ let types = data.data.records
|
|
|
+ this.typeList = types;
|
|
|
+ // this.typeList = data.data;
|
|
|
// 类型改成平铺
|
|
|
- if (data.data.length > 0) {
|
|
|
- const total = data.data.length;
|
|
|
+ if (types.length > 0) {
|
|
|
+ const total = types.length;
|
|
|
const average = parseInt(total / 3);
|
|
|
const mod = total % 3; //余数
|
|
|
- const firstGroup = data.data.slice(0, average);
|
|
|
+ const firstGroup = types.slice(0, average);
|
|
|
let secGroup = [];
|
|
|
let thirdGroup = [];
|
|
|
if (mod == 2) {
|
|
|
- secGroup = data.data.slice(average, average * 2 + 1);
|
|
|
- thirdGroup = data.data.slice(average * 2 + 1, total);
|
|
|
+ secGroup = types.slice(average, average * 2 + 1);
|
|
|
+ thirdGroup = types.slice(average * 2 + 1, total);
|
|
|
} else {
|
|
|
- secGroup = data.data.slice(average, average * 2);
|
|
|
- thirdGroup = data.data.slice(average * 2, total);
|
|
|
+ secGroup = types.slice(average, average * 2);
|
|
|
+ thirdGroup = types.slice(average * 2, total);
|
|
|
}
|
|
|
this.options.push(
|
|
|
{ label: 1, options: firstGroup },
|
|
@@ -628,6 +653,8 @@ export default {
|
|
|
// e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
|
|
|
},
|
|
|
getSimilarList(name) {
|
|
|
+ //不知道还有没有用
|
|
|
+ return
|
|
|
if (!name) {
|
|
|
this.closeTable();
|
|
|
return;
|
|
@@ -735,9 +762,7 @@ export default {
|
|
|
return item.name;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
let detailList = [];
|
|
|
- detailList[0] = this.data;
|
|
|
for (let i = 0; i < realData.length; i++) {
|
|
|
realData[i].type = this.data.type;
|
|
|
detailList.push(realData[i]);
|
|
@@ -764,69 +789,54 @@ export default {
|
|
|
this.warning('请输入填写单患者界面展示通俗内容');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- let params;
|
|
|
- if (this.showMore == 1) {
|
|
|
- // 下拉文字转code
|
|
|
- let sexCode;
|
|
|
+ console.log(this.data)
|
|
|
+ let params,sexCode=null;
|
|
|
+ if (this.showMore == 1) {// 下拉文字转code
|
|
|
this.sex.map((v, i) => {
|
|
|
if (v.name == this.sexType) {
|
|
|
sexCode = v.value;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- if (this.dioType) {
|
|
|
- const deptList = this.deptList;
|
|
|
- let conptId = null;
|
|
|
- for (let i in deptList) {
|
|
|
- if (deptList[i].name == this.dept) {
|
|
|
- conptId = deptList[i].conceptId;
|
|
|
- }
|
|
|
- }
|
|
|
- params = {
|
|
|
- addCptDiseaseExtVO: {
|
|
|
- classify: this.dioType,
|
|
|
- deptId: conptId
|
|
|
- },
|
|
|
- name: this.data.name,
|
|
|
- type: this.data.type,
|
|
|
- detailList: detailList,
|
|
|
- conceptId: this.copy ? '' : this.id, //复制当新增,把id置空
|
|
|
- sexType: sexCode,
|
|
|
- maxAge: this.maxAge,
|
|
|
- minAge: this.minAge
|
|
|
- };
|
|
|
- } else {
|
|
|
- params = {
|
|
|
- name: this.data.name,
|
|
|
- type: this.data.type,
|
|
|
- detailList: detailList,
|
|
|
- conceptId: this.copy ? '' : this.id, //复制当新增,把id置空
|
|
|
- sexType: sexCode,
|
|
|
- maxAge: this.maxAge,
|
|
|
- minAge: this.minAge,
|
|
|
- symptomExtVO: {
|
|
|
- description: this.description,
|
|
|
- explains: this.explains
|
|
|
- }
|
|
|
- };
|
|
|
+ params = {
|
|
|
+ conceptId: this.copy ? '' : this.id,
|
|
|
+ isConcept: this.data.isConcept,
|
|
|
+ libName: this.data.name,
|
|
|
+ remark: this.data.remark,
|
|
|
+ spell: this.data.spell,
|
|
|
+ status: this.data.status,
|
|
|
+ libType: this.data.typeId,
|
|
|
+ synonymName: this.data.synonymName,
|
|
|
+ isHasCommon: this.data.isHasCommon,
|
|
|
+ libId: this.data.libId,
|
|
|
+ klConceptSub:detailList,
|
|
|
+ sexType:sexCode,
|
|
|
+ maxAge:this.maxAge,
|
|
|
+ minAge:this.minAge
|
|
|
}
|
|
|
- } else {
|
|
|
+ }else{
|
|
|
params = {
|
|
|
- name: this.data.name,
|
|
|
- type: this.data.type,
|
|
|
- detailList: detailList,
|
|
|
- conceptId: this.copy ? '' : this.id
|
|
|
+ conceptId: this.copy ? '' : this.id,
|
|
|
+ isConcept: this.data.isConcept,
|
|
|
+ libName: this.data.name,
|
|
|
+ remark: this.data.remark,
|
|
|
+ spell: this.data.spell,
|
|
|
+ libType: this.data.typeId||this.data.type,
|
|
|
+ libId: this.data.libId||0,
|
|
|
+ status: this.data.status,
|
|
|
+ isHasCommon: this.data.isHasCommon,
|
|
|
+ synonymName: this.data.synonymName,
|
|
|
+ klConceptSub: [],
|
|
|
};
|
|
|
}
|
|
|
+ // return
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
- api.addMedicalName(params).then(res => {
|
|
|
+ api.saveBaseConceptInfo(params).then(res => {
|
|
|
const result = res.data;
|
|
|
if (result.code == 0) {
|
|
|
this.warning(res.data.msg || '操作成功', 'success');
|
|
|
//返回带搜索条件的首页
|
|
|
this.$router.push({
|
|
|
- name: 'MedicalName',
|
|
|
+ name: 'BasicTermsMaintenance',
|
|
|
params: Object.assign({}, this.$route.params, { currentPage: 1 })
|
|
|
});
|
|
|
/*if(flg == 14){
|
|
@@ -872,6 +882,7 @@ tr,
|
|
|
td {
|
|
|
list-style: none;
|
|
|
}
|
|
|
+
|
|
|
/deep/ .radioWrap .el-radio {
|
|
|
display: block;
|
|
|
height: 41px;
|