|
@@ -250,8 +250,9 @@
|
|
|
|
|
|
<div
|
|
|
v-if="v.title == '医学标准术语'"
|
|
|
- class="box-2"
|
|
|
- :class="items.basType===3 || items.basType===4|| items.basType===5 || items.basType===6? 'tmall' : 'taobao'"
|
|
|
+ v-show="items.basType == 1"
|
|
|
+ class="box-2 box-o"
|
|
|
+ :class="(items.basType===3 || items.basType===4 || items.basType===5 || items.basType===6)&& items.basType == 1? 'tmall' : 'taobao'"
|
|
|
>
|
|
|
<el-form-item
|
|
|
v-if="items.basType==1 || items.basType==2 || items.basType==''"
|
|
@@ -260,7 +261,7 @@
|
|
|
'.groupVO.' +
|
|
|
index +
|
|
|
'.klDiagnoseDetail.'+i+'.basConceptId'"
|
|
|
- :rules="rules.subConceptId"
|
|
|
+ :rules="items.basType == 1?rules.subConceptId : []"
|
|
|
>
|
|
|
<el-select
|
|
|
class="searchselect"
|
|
@@ -268,25 +269,49 @@
|
|
|
multiple
|
|
|
filterable
|
|
|
remote
|
|
|
+ :multiple-limit="50"
|
|
|
+ collapse-tags
|
|
|
reserve-keyword
|
|
|
- placeholder="请输入关键词"
|
|
|
+ placeholder="请选择"
|
|
|
:remote-method="(val)=>searchConcept(val,scope.$index,index,i)"
|
|
|
- @change="(val)=>conceptChange(val,scope.$index,index,i)"
|
|
|
+ @change="(val)=>conceptChange(val,scope.$index,index,i,items.basType)"
|
|
|
+ @visible-change="(val)=>changeValue1(val,scope.$index,index,i)"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in items.conceptList"
|
|
|
+ :title="item.conceptName"
|
|
|
:key="item.conceptId"
|
|
|
:label="item.conceptName"
|
|
|
:value="item.conceptId"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- <!-- <el-select
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="v.title == '医学标准术语'"
|
|
|
+ v-show="items.basType != 1"
|
|
|
+ class="box-2 box-o"
|
|
|
+ :class="(items.basType===3 || items.basType===4 || items.basType===5 || items.basType===6) && items.basType != 1? 'tmall' : 'taobao'"
|
|
|
+ >
|
|
|
+ <el-form-item
|
|
|
+ v-if="items.basType==1 || items.basType==2 || items.basType==''"
|
|
|
+ :prop="'klDiagnoseTypeVO.' +
|
|
|
+ scope.$index +
|
|
|
+ '.groupVO.' +
|
|
|
+ index +
|
|
|
+ '.klDiagnoseDetail.'+i+'.conceptId'"
|
|
|
+ :rules="items.basType != 1?[
|
|
|
+ { required: true, message: '请选择医学标准术语', trigger: 'blur' }
|
|
|
+ ]:[]"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-show="items.basType != 1"
|
|
|
clearable
|
|
|
remote
|
|
|
filterable
|
|
|
:remote-method="(val)=>searchConcept(val,scope.$index,index,i)"
|
|
|
- v-model.trim="items.basConceptId"
|
|
|
- @change="(val)=>conceptChange(val,scope.$index,index,i)"
|
|
|
+ v-model.trim="items.conceptId"
|
|
|
+ @change="(val)=>conceptChange(val,scope.$index,index,i,items.basType)"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in items.conceptList"
|
|
@@ -294,7 +319,7 @@
|
|
|
:label="item.conceptName"
|
|
|
:value="item.conceptId"
|
|
|
></el-option>
|
|
|
- </el-select>-->
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="last-box" v-if="v.title == '依据具体内容'">
|
|
@@ -447,7 +472,7 @@
|
|
|
'.groupVO.' +
|
|
|
index +
|
|
|
'.klDiagnoseDetail.'+i+'.eqValue'"
|
|
|
- v-if="items.basType===4 || items.basType===3||items.basType===6 || items.basType===5"
|
|
|
+ v-if="items.basType===4 || items.basType===3 || items.basType===5 || items.basType===6"
|
|
|
maxlength="200"
|
|
|
label="正则表达式:"
|
|
|
class="discDesc"
|
|
@@ -513,7 +538,7 @@ export default {
|
|
|
{ title: '基础依据名称', width: 160, istar: true },
|
|
|
{ title: '基础依据类型', width: 130, istar: true },
|
|
|
{ title: '基础依据术语类型', width: 160, istar: true },
|
|
|
- { title: '医学标准术语', width: 180, istar: true },
|
|
|
+ { title: '医学标准术语', width: 230, istar: true },
|
|
|
{ title: '依据具体内容', width: 850 }
|
|
|
],
|
|
|
dicts: {},
|
|
@@ -546,6 +571,8 @@ export default {
|
|
|
onlyTxtType: false,
|
|
|
basTypeName: '',
|
|
|
basConceptId: [],
|
|
|
+ conceptId: '',
|
|
|
+ basConceptList: [],
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
@@ -586,7 +613,10 @@ export default {
|
|
|
spanArr: [],
|
|
|
list: [], //提交数据数组,
|
|
|
i: 1,
|
|
|
- onshow: true
|
|
|
+ onshow: true,
|
|
|
+ arr: [],
|
|
|
+ basConceptId: [],
|
|
|
+ conceptId: ''
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -617,28 +647,48 @@ export default {
|
|
|
item => item.ruleType === this.form.klDiagnoseTypeVO[0].conditionType
|
|
|
);
|
|
|
this.baseTermTypeList = this.baseTypes[index2].subMenuList;
|
|
|
- const klDiagnoseTypeVO = this.form.klDiagnoseTypeVO,
|
|
|
- arr = [];
|
|
|
+ const klDiagnoseTypeVO = this.form.klDiagnoseTypeVO;
|
|
|
let groupVOi, klDiagnoseDetailj;
|
|
|
for (let i = 0; i < klDiagnoseTypeVO.length; i++) {
|
|
|
groupVOi = klDiagnoseTypeVO[i].groupVO;
|
|
|
for (let j = 0; j < groupVOi.length; j++) {
|
|
|
klDiagnoseDetailj = groupVOi[j].klDiagnoseDetail;
|
|
|
for (let k = 0; k < groupVOi[j].klDiagnoseDetail.length; k++) {
|
|
|
+ this.arr = [];
|
|
|
var index2 = this.baseTermTypeList.findIndex(
|
|
|
item => item.type === klDiagnoseDetailj[k].basType
|
|
|
);
|
|
|
klDiagnoseDetailj[k].basLibTypeList = this.baseTermTypeList[
|
|
|
index2
|
|
|
].subMenuList;
|
|
|
-
|
|
|
- klDiagnoseDetailj[k].conceptList = this.formatData2(
|
|
|
- klDiagnoseDetailj[k].libNameList
|
|
|
+ // klDiagnoseDetailj[k].conceptList = this.formatData2(
|
|
|
+ // klDiagnoseDetailj[k].libNameList
|
|
|
+ // );
|
|
|
+ // klDiagnoseDetailj[k].basConceptList = this.formatData2(
|
|
|
+ // klDiagnoseDetailj[k].libNameList
|
|
|
+ // );
|
|
|
+ this.$set(
|
|
|
+ klDiagnoseDetailj[k],
|
|
|
+ 'conceptList',
|
|
|
+ this.formatData2(klDiagnoseDetailj[k].libNameList)
|
|
|
);
|
|
|
- klDiagnoseDetailj[k].libNameList.forEach(item => {
|
|
|
- arr.push(item.basConceptId);
|
|
|
- });
|
|
|
- klDiagnoseDetailj[k].basConceptId = arr;
|
|
|
+ this.$set(
|
|
|
+ klDiagnoseDetailj[k],
|
|
|
+ 'basConceptList',
|
|
|
+ this.formatData2(klDiagnoseDetailj[k].libNameList)
|
|
|
+ );
|
|
|
+ if (klDiagnoseDetailj[k].basType == 1) {
|
|
|
+ klDiagnoseDetailj[k].libNameList.forEach(item => {
|
|
|
+ this.arr.push(item.basConceptId);
|
|
|
+ });
|
|
|
+ this.$set(klDiagnoseDetailj[k], 'basConceptId', this.arr);
|
|
|
+ } else if (klDiagnoseDetailj[k].basType == 2) {
|
|
|
+ klDiagnoseDetailj[k].libNameList.forEach(item => {
|
|
|
+ this.arr.push(item.basConceptId);
|
|
|
+ });
|
|
|
+ this.$set(klDiagnoseDetailj[k], 'conceptId', this.arr[0]);
|
|
|
+ }
|
|
|
+
|
|
|
if (
|
|
|
klDiagnoseDetailj[k].maxOperator ||
|
|
|
klDiagnoseDetailj[k].minOperator
|
|
@@ -797,8 +847,6 @@ export default {
|
|
|
newArr = arr;
|
|
|
}
|
|
|
});
|
|
|
- // console.log(newArr)
|
|
|
- // this.$set(this, 'form.klDiagnoseTypeVO', newArr);
|
|
|
this.getSpanArr(newArr);
|
|
|
},
|
|
|
getSpanArr(data) {
|
|
@@ -847,6 +895,8 @@ export default {
|
|
|
onlyTxtType: false,
|
|
|
basTypeName: '',
|
|
|
basConceptId: [],
|
|
|
+ conceptId: '',
|
|
|
+ basConceptList: [],
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
@@ -897,38 +947,6 @@ export default {
|
|
|
item.depart_id = this.i;
|
|
|
this.form.klDiagnoseTypeVO.splice(i + index + 1, 0, item);
|
|
|
});
|
|
|
- // console.log(this.form.klDiagnoseTypeVO);
|
|
|
-
|
|
|
- // let map = {},
|
|
|
- // dest = [];
|
|
|
- // for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
|
|
|
- // let ai = formData.klDiagnoseTypeVO[i];
|
|
|
- // if (!map[ai.depart_id]) {
|
|
|
- // dest.push({
|
|
|
- // depart_id: ai.depart_id,
|
|
|
- // conditionType: ai.conditionType,
|
|
|
- // groupVO: ai.groupVO
|
|
|
- // });
|
|
|
- // map[ai.depart_id] = ai;
|
|
|
- // } else {
|
|
|
- // for (let j = 0; j < dest.length; j++) {
|
|
|
- // var dj = dest[j];
|
|
|
- // if (dj.depart_id == ai.depart_id) {
|
|
|
- // dj.groupVO = dj.groupVO.concat(ai.groupVO);
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // var index = dest.findIndex(item => {
|
|
|
- // return item.depart_id == id;
|
|
|
- // });
|
|
|
- // JSON.parse(JSON.stringify(dest[index])).depart_id=this.i
|
|
|
- // dest.splice(index + 1, 0, JSON.parse(JSON.stringify(dest[index])));
|
|
|
- // dest.forEach((item, i) => {
|
|
|
- // item.depart_id = i;
|
|
|
- // });
|
|
|
- // this.form.klDiagnoseTypeVO = JSON.parse(JSON.stringify(dest));
|
|
|
},
|
|
|
//删除依据
|
|
|
delDiag(id, inx) {
|
|
@@ -955,6 +973,8 @@ export default {
|
|
|
onlyTxtType: false,
|
|
|
basTypeName: '',
|
|
|
basConceptId: [],
|
|
|
+ conceptId: '',
|
|
|
+ basConceptList: [],
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
@@ -984,6 +1004,8 @@ export default {
|
|
|
basNameType: false,
|
|
|
basTypeName: '',
|
|
|
basConceptId: [],
|
|
|
+ conceptId: '',
|
|
|
+ basConceptList: [],
|
|
|
basDescription: '',
|
|
|
basLename: '',
|
|
|
basLibName: '',
|
|
@@ -1048,7 +1070,10 @@ export default {
|
|
|
].dataType = '';
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
- ].conceptList = [];
|
|
|
+ ].basConceptId = [];
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptId = '';
|
|
|
this.clearConcept(val, inx, index, i); //清空医学标准术语
|
|
|
this.clearNumText(val, inx, index, i); //清空数值、医学内容
|
|
|
var index2 = this.baseTermTypeList.findIndex(item => item.type === val);
|
|
@@ -1124,28 +1149,53 @@ export default {
|
|
|
this.clearConcept(val, inx, index, i);
|
|
|
this.clearNumText2(val, inx, index, i);
|
|
|
},
|
|
|
- //医学标准术语
|
|
|
- conceptChange(val, inx, index, i) {
|
|
|
+ changeValue1(val, inx, index, i) {
|
|
|
+ const formData = JSON.parse(
|
|
|
+ JSON.stringify(
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
|
|
|
+ )
|
|
|
+ );
|
|
|
+ console.log(val);
|
|
|
+ let basConceptId = [];
|
|
|
+ // let data2 = formData.basConceptList.filter(it => {
|
|
|
+ // let arr = formData.basConceptId.map(v => v);
|
|
|
+ // return !arr.includes(it.conceptId);
|
|
|
+ // });
|
|
|
+ formData.basConceptId.forEach(item => {
|
|
|
+ formData.basConceptList.forEach(it => {
|
|
|
+ if (item == it.conceptId) {
|
|
|
+ basConceptId.push(it);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
- ].basConceptId = val;
|
|
|
- console.log(val);
|
|
|
- // if (val) {
|
|
|
- // this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
- // i
|
|
|
- // ].basLibName = this.form.klDiagnoseTypeVO[inx].groupVO[
|
|
|
- // index
|
|
|
- // ].klDiagnoseDetail[i].conceptList.find(
|
|
|
- // it => it.conceptId === val
|
|
|
- // ).conceptName;
|
|
|
- // } else {
|
|
|
- // this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
- // i
|
|
|
- // ].basLibName = '';
|
|
|
- // }
|
|
|
+ ].conceptList = basConceptId;
|
|
|
+ // this.searchConcept(val, inx, index, i)
|
|
|
+ },
|
|
|
+ //医学标准术语
|
|
|
+ conceptChange(val, inx, index, i, basType) {
|
|
|
+ if (basType == 1) {
|
|
|
+ this.$set(
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i],
|
|
|
+ 'basConceptId',
|
|
|
+ val
|
|
|
+ );
|
|
|
+ } else if (basType == 2) {
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptId = val;
|
|
|
+ }
|
|
|
},
|
|
|
searchConcept(val, inx, index, i) {
|
|
|
const formData = JSON.parse(JSON.stringify(this.form));
|
|
|
+ const basConceptId =
|
|
|
+ formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
|
|
|
+ .basConceptId;
|
|
|
+ if (val == '') {
|
|
|
+ this.changeValue1(val, inx, index, i);
|
|
|
+ return;
|
|
|
+ }
|
|
|
const param = {
|
|
|
excludedConceptIds: [
|
|
|
formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[i]
|
|
@@ -1160,13 +1210,40 @@ export default {
|
|
|
.searchConcept(param)
|
|
|
.then(res => {
|
|
|
if (res.data.code == '0') {
|
|
|
- const data = res.data.data;
|
|
|
-
|
|
|
+ let data = res.data.data;
|
|
|
this.$nextTick(() => {
|
|
|
// dom元素更新后执行,因此这里能正确打印更改之后的值
|
|
|
- formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
- i
|
|
|
- ].conceptList = data; // 改变了的值
|
|
|
+ if (
|
|
|
+ formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].basType == 1
|
|
|
+ ) {
|
|
|
+ let data2 = data.filter(it => {
|
|
|
+ let arr = basConceptId.map(v => v);
|
|
|
+ return !arr.includes(it.conceptId);
|
|
|
+ });
|
|
|
+ let obj = {};
|
|
|
+ let arr = formData.klDiagnoseTypeVO[inx].groupVO[
|
|
|
+ index
|
|
|
+ ].klDiagnoseDetail[i].basConceptList.concat(data2);
|
|
|
+ arr = arr.reduce(function(item, next) {
|
|
|
+ obj[next.conceptId]
|
|
|
+ ? ''
|
|
|
+ : (obj[next.conceptId] = true && item.push(next));
|
|
|
+ return item;
|
|
|
+ }, []);
|
|
|
+
|
|
|
+ formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptList = data2; // 改变了的值
|
|
|
+ formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].basConceptList = arr;
|
|
|
+ } else {
|
|
|
+ formData.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptList = data;
|
|
|
+ }
|
|
|
});
|
|
|
this.form = formData;
|
|
|
}
|
|
@@ -1194,6 +1271,9 @@ export default {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
i
|
|
|
].conceptList = [];
|
|
|
+ this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
|
+ i
|
|
|
+ ].conceptId = '';
|
|
|
},
|
|
|
clearNumText2(val, inx, index, i) {
|
|
|
this.form.klDiagnoseTypeVO[inx].groupVO[index].klDiagnoseDetail[
|
|
@@ -1429,6 +1509,7 @@ export default {
|
|
|
},
|
|
|
confirm() {
|
|
|
const formData = JSON.parse(JSON.stringify(this.form));
|
|
|
+
|
|
|
const _this = this;
|
|
|
for (let i = 0; i < formData.klDiagnoseTypeVO.length; i++) {
|
|
|
for (let j = 0; j < formData.klDiagnoseTypeVO[i].groupVO.length; j++) {
|
|
@@ -1442,6 +1523,17 @@ export default {
|
|
|
.basLibTypeList;
|
|
|
delete formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
|
|
|
.conceptList;
|
|
|
+ formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[
|
|
|
+ k
|
|
|
+ ].basConceptId =
|
|
|
+ formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
|
|
|
+ .basType == 2
|
|
|
+ ? JSON.stringify(
|
|
|
+ formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
|
|
|
+ .conceptId
|
|
|
+ ).split('')
|
|
|
+ : formData.klDiagnoseTypeVO[i].groupVO[j].klDiagnoseDetail[k]
|
|
|
+ .basConceptId;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1487,9 +1579,44 @@ export default {
|
|
|
<style lang="less" scoped>
|
|
|
@import '../../less/admin.less';
|
|
|
|
|
|
+.box-o {
|
|
|
+ /deep/ .el-select {
|
|
|
+ width: 210px;
|
|
|
+ }
|
|
|
+ /deep/.el-input--suffix .el-input__inner {
|
|
|
+ height: 30px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+/deep/ .el-select-dropdown__list, .el-select-dropdown__item {
|
|
|
+ padding: 6px 33px 6px 6px;
|
|
|
+}
|
|
|
/deep/ .searchselect {
|
|
|
- .el-input {
|
|
|
- height: 100% !important;
|
|
|
+ .el-select__tags {
|
|
|
+ max-width: 210px !important;
|
|
|
+ }
|
|
|
+ .el-tag {
|
|
|
+ min-width: 40px !important;
|
|
|
+ max-width: 75px !important;
|
|
|
+ .el-select__tags-text {
|
|
|
+ min-width: 40px !important;
|
|
|
+ max-width: 75px !important;
|
|
|
+ display: block;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+ .el-tag__close {
|
|
|
+ top: -22px;
|
|
|
+ right: -28px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-tag:last-child {
|
|
|
+ min-width: 40px !important;
|
|
|
+ max-width: 75px !important;
|
|
|
+ .el-select__tags-text {
|
|
|
+ min-width: 40px !important;
|
|
|
+ max-width: 75px !important;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.contents {
|
|
@@ -1517,14 +1644,12 @@ export default {
|
|
|
height: calc(100vh - 370px);
|
|
|
}
|
|
|
/deep/ .el-input {
|
|
|
- height: 24px;
|
|
|
- line-height: 24px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
.el-input__inner {
|
|
|
- height: 24px;
|
|
|
- line-height: 24px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
font-size: 12px;
|
|
|
- border-radius: 2px;
|
|
|
- border-color: #c9c9c9;
|
|
|
}
|
|
|
}
|
|
|
/deep/ .el-select .el-input .el-icon-arrow-up {
|
|
@@ -1573,7 +1698,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.el-form-item {
|
|
|
- margin-top: 8px;
|
|
|
+ margin-bottom: 10px;
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
.discDesc {
|
|
@@ -1687,7 +1812,6 @@ export default {
|
|
|
.icon {
|
|
|
padding: 0 3px;
|
|
|
cursor: pointer;
|
|
|
- vertical-align: middle;
|
|
|
}
|
|
|
.star {
|
|
|
color: #ff545b;
|