|
@@ -347,11 +347,30 @@ export default {
|
|
} else if (item.subEqValue) {
|
|
} else if (item.subEqValue) {
|
|
item.dataType = '2';
|
|
item.dataType = '2';
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ const del =
|
|
|
|
+ localStorage
|
|
|
|
+ .getItem('zskDelDict')
|
|
|
|
+ .match(
|
|
|
|
+ new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')
|
|
|
|
+ ) || [];
|
|
// disable
|
|
// disable
|
|
if (this.form.parHasSub && this.firstPlace) {
|
|
if (this.form.parHasSub && this.firstPlace) {
|
|
if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
|
|
if (arr[i - 1] && arr[i - 1].groupId == item.groupId) {
|
|
this.$set(item, 'disabled', false);
|
|
this.$set(item, 'disabled', false);
|
|
|
|
+ if (del.length > 0) {
|
|
|
|
+ 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 {
|
|
} else {
|
|
this.$set(item, 'disabled', true);
|
|
this.$set(item, 'disabled', true);
|
|
}
|
|
}
|
|
@@ -439,8 +458,9 @@ export default {
|
|
const del =
|
|
const del =
|
|
localStorage
|
|
localStorage
|
|
.getItem('zskDelDict')
|
|
.getItem('zskDelDict')
|
|
- .match(new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')) ||
|
|
|
|
- [];
|
|
|
|
|
|
+ .match(
|
|
|
|
+ new RegExp(this.firstPlace.checkedType + '-\\d+' + '-\\d+', 'g')
|
|
|
|
+ ) || [];
|
|
const types = dict[0].split('-');
|
|
const types = dict[0].split('-');
|
|
let obj = this.form.klRuleByIdSub;
|
|
let obj = this.form.klRuleByIdSub;
|
|
obj.forEach((item, i, arr) => {
|
|
obj.forEach((item, i, arr) => {
|
|
@@ -448,11 +468,14 @@ export default {
|
|
this.$set(item, 'disabled', false);
|
|
this.$set(item, 'disabled', false);
|
|
if (del.length > 0) {
|
|
if (del.length > 0) {
|
|
const delType = del[0].split('-');
|
|
const delType = del[0].split('-');
|
|
- if (item.subType == delType[2] || item.subLenCode == delType[3]) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ item.subType == delType[2] ||
|
|
|
|
+ item.subLenCode == delType[3]
|
|
|
|
+ ) {
|
|
this.$set(this.form.klRuleByIdSub, i, {
|
|
this.$set(this.form.klRuleByIdSub, i, {
|
|
- groupId:item.groupId,
|
|
|
|
|
|
+ groupId: item.groupId,
|
|
groupChildId: 'child' + new Date().valueOf(),
|
|
groupChildId: 'child' + new Date().valueOf(),
|
|
- baseTypes:this.baseTypeList,
|
|
|
|
|
|
+ baseTypes: this.baseTypeList,
|
|
baseTermTypeList: [],
|
|
baseTermTypeList: [],
|
|
conceptList: [],
|
|
conceptList: [],
|
|
subDescription: '',
|
|
subDescription: '',
|
|
@@ -485,7 +508,6 @@ export default {
|
|
});
|
|
});
|
|
this.$set(this.form, 'klRuleByIdSub', obj);
|
|
this.$set(this.form, 'klRuleByIdSub', obj);
|
|
}
|
|
}
|
|
-
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 初始化表格
|
|
// 初始化表格
|
|
@@ -538,8 +560,6 @@ export default {
|
|
},
|
|
},
|
|
// 基础规则类型切换
|
|
// 基础规则类型切换
|
|
subTypeChange(val, index) {
|
|
subTypeChange(val, index) {
|
|
- console.log(val);
|
|
|
|
-
|
|
|
|
// index
|
|
// index
|
|
let isDel = false;
|
|
let isDel = false;
|
|
let screenArr;
|
|
let screenArr;
|
|
@@ -564,7 +584,7 @@ export default {
|
|
this.$set(
|
|
this.$set(
|
|
this.form.klRuleByIdSub[index],
|
|
this.form.klRuleByIdSub[index],
|
|
'baseTermTypeList',
|
|
'baseTermTypeList',
|
|
- isDel && val == 2?screenArr:obj.subMenuList
|
|
|
|
|
|
+ isDel && val == 2 ? screenArr : obj.subMenuList
|
|
);
|
|
);
|
|
this.$set(this.form.klRuleByIdSub[index], 'subLenCode', '');
|
|
this.$set(this.form.klRuleByIdSub[index], 'subLenCode', '');
|
|
this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
|
|
this.$set(this.form.klRuleByIdSub[index], 'dataType', '');
|