|
@@ -352,8 +352,24 @@ export default {
|
|
|
|
|
|
// disable
|
|
|
if (this.form.parHasSub && this.firstPlace) {
|
|
|
+ const del =
|
|
|
+ localStorage
|
|
|
+ .getItem('zskDelDict')
|
|
|
+ .match(
|
|
|
+ new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')
|
|
|
+ ) || [];
|
|
|
if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
|
|
|
this.$set(item, 'disabled', false);
|
|
|
+ if (del.length > 0 && item.subType == del[0].split('-')[2]) {
|
|
|
+ const delType = del[0].split('-');
|
|
|
+ const types = del[0].split('-');
|
|
|
+ let baseTypeList = JSON.parse(JSON.stringify(this.baseTypeList));
|
|
|
+ const subobj = this.baseTypeList.find(it => it.type == types[2]);
|
|
|
+ const screenArr = subobj.subMenuList.filter(item => {
|
|
|
+ return !types[3].includes(item.code);
|
|
|
+ });
|
|
|
+ this.$set(item, 'baseTermTypeList', screenArr);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$set(item, 'disabled', true);
|
|
|
}
|
|
@@ -370,7 +386,8 @@ export default {
|
|
|
//获取互斥项code
|
|
|
const list = obj.subMenuList.filter(it => {
|
|
|
return (
|
|
|
- it.code == arr[i - 1].subLenCode && it.remark.split('|')[0] == 3
|
|
|
+ it.code == arr[i - 1].subLenCode &&
|
|
|
+ it.remark.split('|')[0] == 3
|
|
|
);
|
|
|
});
|
|
|
const dragArr = list[0].remark.split('|')[1].split(',');
|
|
@@ -475,11 +492,45 @@ export default {
|
|
|
.getItem('zskDicts')
|
|
|
.match(new RegExp(this.firstPlace.checkedType + '-\\d+', 'g')) ||
|
|
|
[];
|
|
|
+ const del =
|
|
|
+ localStorage
|
|
|
+ .getItem('zskDelDict')
|
|
|
+ .match(
|
|
|
+ new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')
|
|
|
+ ) || [];
|
|
|
const types = dict[0].split('-');
|
|
|
let obj = this.form.klRuleByIdSub;
|
|
|
obj.forEach((item, i, arr) => {
|
|
|
if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
|
|
|
this.$set(item, 'disabled', false);
|
|
|
+ if (del.length > 0) {
|
|
|
+ const delType = del[0].split('-');
|
|
|
+ if (
|
|
|
+ item.subType == delType[2] ||
|
|
|
+ item.subLenCode == delType[3]
|
|
|
+ ) {
|
|
|
+ this.$set(this.form.klRuleByIdSub, i, {
|
|
|
+ groupId: item.groupId,
|
|
|
+ groupChildId: 'child' + new Date().valueOf(),
|
|
|
+ baseTypes: this.baseTypeList,
|
|
|
+ baseTermTypeList: [],
|
|
|
+ conceptList: [],
|
|
|
+ subDescription: '',
|
|
|
+ parRuleType: '',
|
|
|
+ subConceptId: '',
|
|
|
+ subType: '',
|
|
|
+ subMaxOperator: '',
|
|
|
+ subMaxUnit: '',
|
|
|
+ subMaxValue: '',
|
|
|
+ subMinOperator: '',
|
|
|
+ subMinUnit: '',
|
|
|
+ subMinValue: '',
|
|
|
+ subEqValue: '',
|
|
|
+ subLenCode: '',
|
|
|
+ dataType: ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$set(item, 'disabled', true);
|
|
|
this.$set(item, 'subType', parseInt(types[2]));
|
|
@@ -581,6 +632,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ let klRuleByIdSub = this.form.klRuleByIdSub;
|
|
|
+ klRuleByIdSub.forEach((item, i, arr) => {
|
|
|
+ if (arr[0].subType == 1) {
|
|
|
+ const arr = this.baseTypeList.filter(it => {
|
|
|
+ return it.type == 1;
|
|
|
+ });
|
|
|
+ this.$set(item, 'baseTypes', arr);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
//危急值实验室子项目已选医学标准术语判断
|
|
|
if (this.form.parHasSub && this.firstPlace) {
|
|
@@ -600,6 +660,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
this.$set(
|
|
|
this.form.klRuleByIdSub[index],
|
|
|
'baseTermTypeList',
|
|
@@ -637,6 +698,7 @@ export default {
|
|
|
* arg:{index:添加规则用索引,groupId:添加分组用确切id}
|
|
|
*/
|
|
|
!date && (date = new Date().valueOf());
|
|
|
+
|
|
|
const obj = {
|
|
|
groupId: date,
|
|
|
groupChildId: 'child' + new Date().valueOf(),
|
|
@@ -660,6 +722,21 @@ export default {
|
|
|
if (typeof arg.index == 'number') {
|
|
|
// 添加规则 直接在当前位置之后添加
|
|
|
this.form.klRuleByIdSub.splice(arg.index + 1, 0, obj);
|
|
|
+ const dragDel =
|
|
|
+ localStorage
|
|
|
+ .getItem('zskDragDict')
|
|
|
+ .match(new RegExp(this.ruleTermCodeStrs, 'g')) || [];
|
|
|
+ if (dragDel.length > 0) {
|
|
|
+ let obj = this.form.klRuleByIdSub;
|
|
|
+ obj.forEach((item, i, arr) => {
|
|
|
+ if (arr[0].subType == 1) {
|
|
|
+ const arr = this.baseTypeList.filter(it => {
|
|
|
+ return it.type == 1;
|
|
|
+ });
|
|
|
+ this.$set(item, 'baseTypes', arr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
// 添加分组 在列表中相同groupId之后添加
|
|
|
|
|
@@ -860,17 +937,19 @@ export default {
|
|
|
dragDel.length > 0 &&
|
|
|
index > 0 &&
|
|
|
this.form.klRuleByIdSub.length > 1 &&
|
|
|
- this.form.klRuleByIdSub[inx].subType == 1 &&
|
|
|
- this.form.klRuleByIdSub[index].subType == 1
|
|
|
+ this.form.klRuleByIdSub[0].subType == 1
|
|
|
) {
|
|
|
- if (!mutex) {
|
|
|
+ if (this.form.klRuleByIdSub.length == 3 && !mutex) {
|
|
|
//判断是否存在符合互斥条件的两条出具,若存在,置空另一条出具
|
|
|
if (this.dragArr.indexOf(this.dragVal) > -1) {
|
|
|
//剂型给药途径互斥判断
|
|
|
+ const arr = this.baseTypeList.filter(it => {
|
|
|
+ return it.type == 1;
|
|
|
+ });
|
|
|
this.$set(this.form.klRuleByIdSub, inx, {
|
|
|
groupId: this.form.klRuleByIdSub[inx].groupId,
|
|
|
groupChildId: 'child' + new Date().valueOf(),
|
|
|
- baseTypes: this.baseTypeList,
|
|
|
+ baseTypes: arr,
|
|
|
baseTermTypeList: [],
|
|
|
conceptList: [],
|
|
|
subDescription: '',
|
|
@@ -889,7 +968,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- //
|
|
|
const list = subobj.subMenuList.filter(it => {
|
|
|
return it.code == val && it.remark.split('|')[0] == 3;
|
|
|
});
|
|
@@ -902,31 +980,16 @@ export default {
|
|
|
ele => ele === item.code && item.remark.split('|')[0] == 3
|
|
|
)
|
|
|
);
|
|
|
- this.$set(
|
|
|
- this.form.klRuleByIdSub[inx],
|
|
|
- 'baseTermTypeList',
|
|
|
- screenArr
|
|
|
- );
|
|
|
+ if (this.form.klRuleByIdSub[inx]) {
|
|
|
+ this.$set(
|
|
|
+ this.form.klRuleByIdSub[inx],
|
|
|
+ 'baseTermTypeList',
|
|
|
+ screenArr
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
this.dragVal = val;
|
|
|
}
|
|
|
-
|
|
|
- //判断药品合理性总条数是否大于1条,并当前规则类型为1,
|
|
|
- if (
|
|
|
- dragDel.length > 0 &&
|
|
|
- index > 0 &&
|
|
|
- this.form.klRuleByIdSub.length > 1 &&
|
|
|
- this.form.klRuleByIdSub[index].subType == 1 &&
|
|
|
- mutex
|
|
|
- ) {
|
|
|
- //获取互斥项code
|
|
|
- const list = subobj.subMenuList.filter(it => {
|
|
|
- return it.code == val && it.remark.split('|')[0] == 3;
|
|
|
- });
|
|
|
- const dragArr = list[0].remark.split('|')[1].split(',');
|
|
|
- this.dragArr = dragArr;
|
|
|
- this.dragVal = val;
|
|
|
- }
|
|
|
if ((numTypes + ',').indexOf(val + ',') > -1) {
|
|
|
this.$set(this.form.klRuleByIdSub[index], 'dataType', '1');
|
|
|
} else {
|