|
@@ -415,7 +415,6 @@ export default {
|
|
|
this.subRuleMaxNum = obj.number;
|
|
|
this.form.parHasSub = obj.subMenuList.length ? 1 : 0;
|
|
|
this.setInitGroupData();
|
|
|
- console.log(val);
|
|
|
},
|
|
|
// 医学标准术语
|
|
|
parConceptIdChange(val) {
|
|
@@ -515,11 +514,13 @@ export default {
|
|
|
.match(new RegExp(this.ruleTermCodeStrs, 'g')) || [];
|
|
|
const obj = this.baseTypeList.find(it => it.type === val);
|
|
|
let dragType = false;
|
|
|
- let subMenuList;
|
|
|
+ let isDel = false;
|
|
|
+ let screenArr;
|
|
|
+ //药品开单合理判断
|
|
|
if (dragDel.length > 0) {
|
|
|
dragType = true;
|
|
|
const types = dragDel[0].split('-');
|
|
|
- subMenuList = obj.subMenuList.filter(item => {
|
|
|
+ screenArr = obj.subMenuList.filter(item => {
|
|
|
if (item.remark == '') {
|
|
|
return item;
|
|
|
} else {
|
|
@@ -527,11 +528,34 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ //危急值实验室子项目已选医学标准术语判断
|
|
|
+ if (this.form.parHasSub && this.firstPlace) {
|
|
|
+ const del =
|
|
|
+ localStorage
|
|
|
+ .getItem('zskDelDict')
|
|
|
+ .match(
|
|
|
+ new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')
|
|
|
+ ) || [];
|
|
|
+ if (del.length > 0) {
|
|
|
+ isDel = true;
|
|
|
+ const types = del[0].split('-');
|
|
|
+ let baseTypeList = JSON.parse(JSON.stringify(this.baseTypeList));
|
|
|
+ const subobj = this.baseTypeList.find(it => it.type == types[2]);
|
|
|
+ screenArr = subobj.subMenuList.filter(item => {
|
|
|
+ return !types[3].includes(item.code);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$set(
|
|
|
this.form.klRuleByIdSub[index],
|
|
|
'baseTermTypeList',
|
|
|
- dragType ? subMenuList : obj.subMenuList
|
|
|
+ (isDel && val == 2) || dragType ? screenArr : obj.subMenuList
|
|
|
);
|
|
|
+ // this.$set(
|
|
|
+ // this.form.klRuleByIdSub[index],
|
|
|
+ // 'baseTermTypeList',
|
|
|
+ // dragType ? subMenuList : obj.subMenuList
|
|
|
+ // );
|
|
|
|
|
|
this.$set(this.form.klRuleByIdSub[index], 'subLenCode', '');
|
|
|
this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
|
|
@@ -630,10 +654,50 @@ export default {
|
|
|
this.form.klRuleByIdSub = list;
|
|
|
},
|
|
|
// 删除规则
|
|
|
- delGroupChild(groupChildId) {
|
|
|
- const newGroupList = this.form.klRuleByIdSub.filter(
|
|
|
- item => item.groupChildId != groupChildId
|
|
|
- );
|
|
|
+ delGroupChild(groupChildId, index) {
|
|
|
+ let newGroupList;
|
|
|
+ const dragDel =
|
|
|
+ localStorage
|
|
|
+ .getItem('zskDragDict')
|
|
|
+ .match(new RegExp(this.ruleTermCodeStrs, 'g')) || [];
|
|
|
+ let list;
|
|
|
+ if (dragDel.length > 0) {
|
|
|
+ if (index == 0) {
|
|
|
+ const date = new Date().valueOf();
|
|
|
+ newGroupList = [{
|
|
|
+ groupId: date,
|
|
|
+ groupChildId: 'child' + new Date().valueOf(),
|
|
|
+ baseTypes: this.baseTypeList,
|
|
|
+ baseTermTypeList: [],
|
|
|
+ conceptList: [],
|
|
|
+ subDescription: '',
|
|
|
+ parRuleType: '',
|
|
|
+ subConceptId: '',
|
|
|
+ subType: '',
|
|
|
+ subMaxOperator: '',
|
|
|
+ subMaxUnit: '',
|
|
|
+ subMaxValue: '',
|
|
|
+ subMinOperator: '',
|
|
|
+ subMinUnit: '',
|
|
|
+ subMinValue: '',
|
|
|
+ subEqValue: '',
|
|
|
+ subLenCode: '',
|
|
|
+ dataType: ''
|
|
|
+ }];
|
|
|
+ } else if (index == 0 || index == 1) {
|
|
|
+ newGroupList = this.form.klRuleByIdSub.filter((item, i) => {
|
|
|
+ return i == 0;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ newGroupList = this.form.klRuleByIdSub.filter(
|
|
|
+ item => item.groupChildId != groupChildId
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ newGroupList = this.form.klRuleByIdSub.filter(
|
|
|
+ item => item.groupChildId != groupChildId
|
|
|
+ );
|
|
|
+ }
|
|
|
this.form.klRuleByIdSub = newGroupList;
|
|
|
},
|
|
|
setDict() {
|
|
@@ -744,6 +808,7 @@ export default {
|
|
|
'form.klRuleByIdSub': {
|
|
|
handler(val) {
|
|
|
this.form.klRuleByIdSub.forEach((item, i, arr) => {
|
|
|
+
|
|
|
if (i == 0) {
|
|
|
item.rowIndex = 1;
|
|
|
} else if (item.groupId == arr[i - 1].groupId) {
|