|
@@ -250,8 +250,6 @@
|
|
|
:showMsg="showMsg"
|
|
|
:showMsg2="showMsg2"
|
|
|
:ruleTermCodeStr="ruleTermCodeStr"
|
|
|
- :isStaticChild="isStatic"
|
|
|
- :isRedMsgs="isRedMsg"
|
|
|
@subTypeChange="subTypeChange"
|
|
|
@searchConcept="searchConcept"
|
|
|
@addGroup="addGroup"
|
|
@@ -318,7 +316,6 @@ export default {
|
|
|
created() {
|
|
|
this.getTypeList();
|
|
|
this.setDict();
|
|
|
-
|
|
|
const param = this.$route.params;
|
|
|
let info = param.data;
|
|
|
if (info) {
|
|
@@ -331,22 +328,13 @@ export default {
|
|
|
this.initEdidData();
|
|
|
}
|
|
|
},
|
|
|
- mounted() {},
|
|
|
- watch: {},
|
|
|
methods: {
|
|
|
- //护理开单项子组件里面的传过来的值
|
|
|
- ruleContent(data) {
|
|
|
- this.staicData = data;
|
|
|
- },
|
|
|
clearValidate(data) {
|
|
|
this.$refs.ruleForm.clearValidate(data);
|
|
|
},
|
|
|
// 编辑初始化
|
|
|
async initEdidData() {
|
|
|
// 规则术语类型初始化
|
|
|
- this.contentRuls = false;
|
|
|
- this.isEdit = false;
|
|
|
- this.isRedMsg = [];
|
|
|
const newruleTermTypeList = await this.ruleTypeList.find(
|
|
|
(it) => it.id == this.form.parRuleType
|
|
|
);
|
|
@@ -355,67 +343,16 @@ export default {
|
|
|
const obj = await this.ruleTermTypeList.find(
|
|
|
(it1) => it1.code == this.form.parLenCode
|
|
|
);
|
|
|
+ console.log(obj);
|
|
|
this.baseTypeList = obj.subMenuList;
|
|
|
this.subRuleMaxNum = obj.number;
|
|
|
+
|
|
|
this.conceptList = [
|
|
|
{
|
|
|
conceptName: this.form.parlibName,
|
|
|
conceptId: this.form.parConceptId,
|
|
|
},
|
|
|
];
|
|
|
- // 加载护理开单项的推送内容
|
|
|
- if (!this.form.klRuleByIdSub) {
|
|
|
- this.isEdit = true;
|
|
|
- this.contentRuls = true;
|
|
|
- this.formEidt = JSON.parse(JSON.stringify(this.form));
|
|
|
- return;
|
|
|
- }
|
|
|
- //加载护理非开单项的关联静态知识
|
|
|
- if (this.form.parRuleType == 8) {
|
|
|
- this.isStatic = true;
|
|
|
- if (Array.isArray(this.form.klRuleByIdGroup)) {
|
|
|
- let itemCopy = {}; //用来存放对象
|
|
|
- let itemsCopy = {};
|
|
|
- let klRuleByIdSub = []; //中间数组
|
|
|
- this.form.klRuleByIdGroup.forEach((item, index) => {
|
|
|
- let obj = {
|
|
|
- groupType: item.groupType,
|
|
|
- klRuleStaticSub: item.klRuleStaticSub,
|
|
|
- };
|
|
|
- itemCopy = JSON.parse(JSON.stringify(obj));
|
|
|
- klRuleByIdSub.push(itemCopy);
|
|
|
- });
|
|
|
- if (Array.isArray(this.form.klRuleByIdSub)) {
|
|
|
- this.form.klRuleByIdSub.forEach((item) => {
|
|
|
- this.$set(item, "ruleStatic", []);
|
|
|
- this.$set(item, "ruleStaticList", []);
|
|
|
- this.$set(item, "ruleStaticLists", []);
|
|
|
- });
|
|
|
- }
|
|
|
- this.form.klRuleByIdSub.forEach((item, index) => {
|
|
|
- klRuleByIdSub.forEach((items) => {
|
|
|
- if (items.groupType == item.groupType) {
|
|
|
- this.form.klRuleByIdSub[index].ruleStaticLists =
|
|
|
- items.klRuleStaticSub;
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- this.form.klRuleByIdSub.forEach((item, index) => {
|
|
|
- if (Array.isArray(item.ruleStaticLists)) {
|
|
|
- item.ruleStaticLists.forEach((items) => {
|
|
|
- let obj = {
|
|
|
- id: items.conceptId,
|
|
|
- name: items.name,
|
|
|
- };
|
|
|
- itemsCopy = JSON.parse(JSON.stringify(obj));
|
|
|
- this.form.klRuleByIdSub[index].ruleStaticList.push(itemsCopy);
|
|
|
- this.form.klRuleByIdSub[index].ruleStatic.push(itemsCopy.id);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- //加载列表规则内容
|
|
|
if (this.form.parConceptId && this.checkFirstPlace && this.conceptList) {
|
|
|
this.firstPlace = this.conceptList.find(
|
|
|
(it) => it.conceptId === this.form.parConceptId
|
|
@@ -473,8 +410,6 @@ export default {
|
|
|
this.$set(item, "baseTermTypeList", screenArr);
|
|
|
}
|
|
|
} else {
|
|
|
- this.$set(item, "disabled", true);
|
|
|
-
|
|
|
if (this.form.parLenCode == "108" && this.form.parRuleType == "8") {
|
|
|
const subobj = this.baseTypeList.find((it) => it.type == "2");
|
|
|
subobj.subMenuList.push({
|
|
@@ -498,6 +433,7 @@ export default {
|
|
|
});
|
|
|
this.$set(item, "baseTermTypeList", subobj.subMenuList);
|
|
|
}
|
|
|
+ this.$set(item, "disabled", true);
|
|
|
}
|
|
|
}
|
|
|
const dragDel =
|
|
@@ -550,59 +486,32 @@ export default {
|
|
|
this.$set(item, "baseTermTypeList", screenArr);
|
|
|
}
|
|
|
}
|
|
|
+ console.log(this.form);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//药品数据处理
|
|
|
getDragData(info) {
|
|
|
let dataArr = [];
|
|
|
- //处理修改接口请求的数据
|
|
|
- //先将数据深拷贝,避免数据污染
|
|
|
- let infoCopy = JSON.parse(JSON.stringify(info));
|
|
|
- infoCopy.klRuleByIdSubCopy = [];
|
|
|
- if (info.klRuleByIdGroup.length > 0) {
|
|
|
- let klRuleByIdSub = {};
|
|
|
- info.klRuleByIdGroup.forEach((item) => {
|
|
|
- if (item.klRuleByIdSub && Array.isArray(item.klRuleByIdSub)) {
|
|
|
- item.klRuleByIdSub.forEach((items) => {
|
|
|
- klRuleByIdSub = JSON.parse(JSON.stringify(items));
|
|
|
- infoCopy.klRuleByIdSubCopy.push(klRuleByIdSub);
|
|
|
- });
|
|
|
- infoCopy.klRuleByIdSub = [...item.klRuleByIdSub];
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (
|
|
|
- Array.isArray(info.klRuleByIdGroup) &&
|
|
|
- info.klRuleByIdGroup.length == 0
|
|
|
- ) {
|
|
|
- this.form = JSON.parse(JSON.stringify(info));
|
|
|
- return;
|
|
|
- }
|
|
|
- //判断是否存在klRuleByIdSub,没有就是护理开单项直接赋值
|
|
|
- if (!info.klRuleByIdGroup[0].klRuleByIdSub) {
|
|
|
- this.form = JSON.parse(JSON.stringify(info));
|
|
|
- } else {
|
|
|
- let arr = JSON.parse(JSON.stringify(infoCopy.klRuleByIdSubCopy));
|
|
|
- arr.map((mapItem) => {
|
|
|
- if (dataArr.length == 0) {
|
|
|
- dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
|
|
|
- } else {
|
|
|
- let res = dataArr.some((item) => {
|
|
|
- //判断相同日期,有就添加到当前项
|
|
|
- if (item.groupType == mapItem.groupType) {
|
|
|
- item.List.push(mapItem);
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
- if (!res) {
|
|
|
- //如果没找相同日期添加一个新对象
|
|
|
- dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
|
|
|
+ let arr = JSON.parse(JSON.stringify(info.klRuleByIdSub));
|
|
|
+ arr.map((mapItem) => {
|
|
|
+ if (dataArr.length == 0) {
|
|
|
+ dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
|
|
|
+ } else {
|
|
|
+ let res = dataArr.some((item) => {
|
|
|
+ //判断相同日期,有就添加到当前项
|
|
|
+ if (item.groupType == mapItem.groupType) {
|
|
|
+ item.List.push(mapItem);
|
|
|
+ return true;
|
|
|
}
|
|
|
+ });
|
|
|
+ if (!res) {
|
|
|
+ //如果没找相同日期添加一个新对象
|
|
|
+ dataArr.push({ groupType: mapItem.groupType, List: [mapItem] });
|
|
|
}
|
|
|
- });
|
|
|
- this.getDragData2(info, dataArr);
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getDragData2(info, dataArr);
|
|
|
},
|
|
|
getDragData2(info, dataArr) {
|
|
|
let arr = [];
|
|
@@ -620,153 +529,34 @@ export default {
|
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.isErr = false;
|
|
|
- this.isRedMsg = [];
|
|
|
let params = JSON.parse(JSON.stringify(this.form));
|
|
|
- if (params.klRuleByIdSub) {
|
|
|
- params.klRuleInfoSaveSub = params.klRuleByIdSub;
|
|
|
- delete params.klRuleByIdSub;
|
|
|
- params.klRuleInfoSaveSub.forEach((item, i, arr) => {
|
|
|
- if (i === 0) {
|
|
|
- item.groupType = 1;
|
|
|
+ params.klRuleInfoSaveSub = params.klRuleByIdSub;
|
|
|
+ delete params.klRuleByIdSub;
|
|
|
+ params.klRuleInfoSaveSub.forEach((item, i, arr) => {
|
|
|
+ if (i === 0) {
|
|
|
+ item.groupType = 1;
|
|
|
+ } else {
|
|
|
+ if (item.groupId == arr[i - 1].groupId) {
|
|
|
+ item.groupType = arr[i - 1].groupType;
|
|
|
+ item.subMsg = arr[i - 1].subMsg;
|
|
|
} else {
|
|
|
- if (item.groupId == arr[i - 1].groupId) {
|
|
|
- item.groupType = arr[i - 1].groupType;
|
|
|
- item.subMsg = arr[i - 1].subMsg;
|
|
|
- } else {
|
|
|
- item.groupType = arr[i - 1].groupType + 1;
|
|
|
- }
|
|
|
+ item.groupType = arr[i - 1].groupType + 1;
|
|
|
}
|
|
|
- });
|
|
|
- params.klRuleInfoSaveSub.forEach((ite) => {
|
|
|
- delete ite.groupId;
|
|
|
- delete ite.groupChildId;
|
|
|
- delete ite.rowIndex;
|
|
|
- delete ite.baseTypes;
|
|
|
- delete ite.baseTermTypeList;
|
|
|
- delete ite.conceptList;
|
|
|
- });
|
|
|
- }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ params.klRuleInfoSaveSub.forEach((ite) => {
|
|
|
+ delete ite.groupId;
|
|
|
+ delete ite.groupChildId;
|
|
|
+ delete ite.rowIndex;
|
|
|
+ delete ite.baseTypes;
|
|
|
+ delete ite.baseTermTypeList;
|
|
|
+ delete ite.conceptList;
|
|
|
+ });
|
|
|
if (this.parId) {
|
|
|
params.parId = this.isCopy ? undefined : this.parId;
|
|
|
params.parStatus = this.isCopy ? 1 : this.form.parStatus;
|
|
|
}
|
|
|
- //改造params,保存护理开单项类型的
|
|
|
- let paramsCopy = JSON.parse(JSON.stringify(params));
|
|
|
- //先遍历子集klRuleInfoSaveSub
|
|
|
- paramsCopy.klRuleInfoSaveGroup = [];
|
|
|
- let obj = {
|
|
|
- groupType: 0,
|
|
|
- klRuleInfoSaveSub: [],
|
|
|
- };
|
|
|
- this.$set(obj, "ruleStatic", []);
|
|
|
- if (
|
|
|
- params.klRuleInfoSaveSub &&
|
|
|
- Array.isArray(params.klRuleInfoSaveSub)
|
|
|
- ) {
|
|
|
- if (params.klRuleInfoSaveSub.length > 0) {
|
|
|
- params.klRuleInfoSaveSub.forEach((item) => {
|
|
|
- obj.groupType = item.groupType;
|
|
|
- obj.klRuleInfoSaveSub = [item];
|
|
|
- let objCopy = JSON.parse(JSON.stringify(obj));
|
|
|
- //可以处理objCopy,将groupType相同的放入klRuleInfoSaveSub里面
|
|
|
- paramsCopy.klRuleInfoSaveGroup.push(objCopy);
|
|
|
- });
|
|
|
- } else {
|
|
|
- paramsCopy.klRuleInfoSaveGroup.push(obj);
|
|
|
- }
|
|
|
- } else {
|
|
|
- paramsCopy.klRuleInfoSaveGroup.push(obj);
|
|
|
- }
|
|
|
- if (
|
|
|
- paramsCopy.klRuleInfoSaveSub &&
|
|
|
- Array.isArray(paramsCopy.klRuleInfoSaveSub)
|
|
|
- ) {
|
|
|
- //护理非开单项的关联静态知识的处理
|
|
|
- paramsCopy.klRuleInfoSaveSub.forEach((item, ind) => {
|
|
|
- let ruleObj = {};
|
|
|
- if (Array.isArray(item.ruleStatic)) {
|
|
|
- item.ruleStatic.forEach((items, index) => {
|
|
|
- ruleObj.conceptId = items;
|
|
|
- ruleObj.orderNo = index;
|
|
|
- let ruleObjCopy = JSON.parse(JSON.stringify(ruleObj));
|
|
|
- //将关联静态知识的对象放入数组内
|
|
|
- paramsCopy.klRuleInfoSaveGroup[ind].ruleStatic.push(
|
|
|
- ruleObjCopy
|
|
|
- );
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- //删除第二层的klRuleInfoSaveSub
|
|
|
- delete paramsCopy.klRuleInfoSaveSub;
|
|
|
- //清除子集的关联静态知识
|
|
|
- paramsCopy.klRuleInfoSaveGroup.forEach((item, index) => {
|
|
|
- if (index + 1 >= paramsCopy.klRuleInfoSaveGroup.length) return;
|
|
|
- if (
|
|
|
- item.groupType ==
|
|
|
- paramsCopy.klRuleInfoSaveGroup[index + 1].groupType
|
|
|
- ) {
|
|
|
- paramsCopy.klRuleInfoSaveGroup[index + 1].ruleStatic = [];
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- //判断护理开单是否附加信息和关联静态信息是否都没存在值
|
|
|
- let flagRule = false;
|
|
|
- //附加信息
|
|
|
- if (this.staicData.fjxx) {
|
|
|
- paramsCopy.klRuleInfoSaveGroup[0].groupType = "1";
|
|
|
- paramsCopy.parMsg = this.staicData.fjxx;
|
|
|
- flagRule = true;
|
|
|
- } else {
|
|
|
- paramsCopy.parMsg = "";
|
|
|
- }
|
|
|
- //关联静态知识
|
|
|
- if (this.staicData.gljtxx.length > 0) {
|
|
|
- paramsCopy.klRuleInfoSaveGroup[0].groupType = "1";
|
|
|
- let rule = {};
|
|
|
- this.staicData.gljtxx.forEach((item, index) => {
|
|
|
- rule.conceptId = item;
|
|
|
- rule.orderNo = index;
|
|
|
- let ruleCopy = JSON.parse(JSON.stringify(rule));
|
|
|
- paramsCopy.klRuleInfoSaveGroup[0].ruleStatic.push(ruleCopy);
|
|
|
- });
|
|
|
- flagRule = true;
|
|
|
- }
|
|
|
- //如果是护理项并且静态知识和附加信息都没有值
|
|
|
- if (this.contentRuls && !flagRule) {
|
|
|
- this.isErr = true;
|
|
|
- return;
|
|
|
- }
|
|
|
- //如果护理非开单项关联静态知识和附加信息都没有值
|
|
|
- if (this.isStatic) {
|
|
|
- if (Array.isArray(paramsCopy.klRuleInfoSaveGroup)) {
|
|
|
- paramsCopy.klRuleInfoSaveGroup.forEach((item) => {
|
|
|
- if (Array.isArray(item.klRuleInfoSaveSub)) {
|
|
|
- item.klRuleInfoSaveSub.forEach((items) => {
|
|
|
- if (items.ruleStatic && Array.isArray(items.ruleStatic)) {
|
|
|
- if (items.ruleStatic.length > 0 || items.subMsg) {
|
|
|
- this.isRedMsg.push(false);
|
|
|
- } else {
|
|
|
- this.isRedMsg.push(true);
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.isRedMsg.push(false);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- //判断护理非开单项里面的附加信息和关联静态知识是否填写
|
|
|
- if (this.isStatic && this.isRedMsg.length > 0) {
|
|
|
- let flag = this.isRedMsg.some((item) => {
|
|
|
- return item;
|
|
|
- });
|
|
|
- //都填写了
|
|
|
- if (!flag) this.saveRule(paramsCopy);
|
|
|
- } else {
|
|
|
- this.saveRule(paramsCopy);
|
|
|
- }
|
|
|
+ this.saveRule(params);
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
@@ -778,14 +568,6 @@ export default {
|
|
|
},
|
|
|
// table_form 规则类型选中
|
|
|
ruleTypeChange(val) {
|
|
|
- //先初始化
|
|
|
- this.contentRuls = false;
|
|
|
- this.isStatic = false;
|
|
|
- this.isRedMsg = [];
|
|
|
- //是否护理非开单项
|
|
|
- if (val === 8) {
|
|
|
- this.isStatic = true;
|
|
|
- }
|
|
|
this.form.parLenCode = "";
|
|
|
const obj = this.ruleTypeList.find((it) => it.id === val);
|
|
|
this.ruleTermTypeList = obj.subMenuList;
|
|
@@ -794,24 +576,11 @@ export default {
|
|
|
},
|
|
|
// table_form 规则术语类型选中
|
|
|
ruleTermChange(val) {
|
|
|
- this.contentRuls = false;
|
|
|
- this.isRedMsg = [];
|
|
|
const obj = this.ruleTermTypeList.find((it) => it.code === val);
|
|
|
this.form.parLenName = obj.name;
|
|
|
this.baseTypeList = obj.subMenuList;
|
|
|
this.subRuleMaxNum = obj.number;
|
|
|
this.form.parHasSub = obj.subMenuList.length ? 1 : 0;
|
|
|
- if (!this.form.parHasSub) {
|
|
|
- this.contentRuls = true;
|
|
|
- }
|
|
|
- //初始化护理开单项的输入框
|
|
|
- if (this.contentRuls) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.isEdit = false;
|
|
|
- this.$refs.ruleContent.clearFormData();
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
this.isShow = obj.subMenuList.length ? 1 : 0;
|
|
|
this.setInitGroupData();
|
|
|
},
|
|
@@ -877,12 +646,6 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
this.$set(item, "disabled", true);
|
|
|
- // //因为字典传的时候第三个值没有护理所以重新赋值为9,因为这里后端逻辑问题先注释后面可能有用
|
|
|
- // this.baseTypeList.forEach((item)=>{
|
|
|
- // if(item.type==9){
|
|
|
- // types[2]='9'
|
|
|
- // }
|
|
|
- // })
|
|
|
this.$set(item, "subType", parseInt(types[2]));
|
|
|
const subobj = this.baseTypeList.find(
|
|
|
(it) => it.type == types[2]
|
|
@@ -920,9 +683,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.$set(this.form, "klRuleByIdSub", obj);
|
|
|
- if (this.form.parLenCode == "104" && this.form.parRuleType == "8") {
|
|
|
- this.form.klRuleByIdSub[0].dataType = "1";
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -1005,6 +765,7 @@ export default {
|
|
|
const list = obj.subMenuList.filter((it) => {
|
|
|
return it.code == val && it.remark.split("|")[0] == 3;
|
|
|
});
|
|
|
+ console.log(obj.subMenuList);
|
|
|
const dragArr = list[0].remark.split("|")[1].split(",");
|
|
|
this.dragArr = dragArr;
|
|
|
arr[1].dragArr = arr[2].dragArr = dragArr;
|
|
@@ -1023,6 +784,23 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ // const klRuleByIdSub = this.form.klRuleByIdSub;
|
|
|
+ // klRuleByIdSub.forEach((item, i) => {
|
|
|
+ // arr.forEach((it) => {
|
|
|
+ // if (item.groupId == it.groupId) {
|
|
|
+ // if (key == 0) {
|
|
|
+ // this.$set(item, "baseTypes", this.baseTypeList);
|
|
|
+ // } else {
|
|
|
+ // const arrList = this.baseTypeList.filter((it) => {
|
|
|
+ // return it.type == 1;
|
|
|
+ // });
|
|
|
+ // if (i > 0) {
|
|
|
+ // this.$set(item, "baseTypes", arrList);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
}
|
|
|
//危急值实验室子项目已选医学标准术语判断
|
|
|
if (this.form.parHasSub && this.firstPlace) {
|
|
@@ -1083,12 +861,6 @@ export default {
|
|
|
* arg:{index:添加规则用索引,groupId:添加分组用确切id}
|
|
|
*/
|
|
|
!date && (date = new Date().valueOf());
|
|
|
- let dataType = "";
|
|
|
- if (this.form.parLenCode == "104" && this.form.parRuleType == "8") {
|
|
|
- dataType = "1";
|
|
|
- } else {
|
|
|
- dataType = "";
|
|
|
- }
|
|
|
const obj = {
|
|
|
groupId: date,
|
|
|
groupChildId: "child" + new Date().valueOf(),
|
|
@@ -1107,7 +879,7 @@ export default {
|
|
|
subMinValue: "",
|
|
|
subEqValue: "",
|
|
|
subLenCode: "",
|
|
|
- dataType: dataType,
|
|
|
+ dataType: "",
|
|
|
};
|
|
|
if (
|
|
|
this.form.parLenCode == "108" &&
|
|
@@ -1189,12 +961,6 @@ export default {
|
|
|
.match(new RegExp(this.firstPlace.checkedType + "-\\d+", "g")) ||
|
|
|
[];
|
|
|
const types = dict[0].split("-");
|
|
|
- // //因为字典传的时候第三个值没有护理所以重新赋值为9,因为这里后端逻辑问题先注释后面可能有用
|
|
|
- // this.baseTypeList.forEach((item)=>{
|
|
|
- // if(item.type==9){
|
|
|
- // types[2]='9'
|
|
|
- // }
|
|
|
- // })
|
|
|
this.$set(obj, "disabled", true);
|
|
|
this.$set(obj, "subType", parseInt(types[2]));
|
|
|
const subobj = this.baseTypeList.find((it) => it.type == types[2]);
|
|
@@ -1516,21 +1282,18 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
- form: {
|
|
|
+ "form.klRuleByIdSub": {
|
|
|
handler(val) {
|
|
|
- if (val.klRuleByIdSub) {
|
|
|
- this.form.klRuleByIdSub.forEach((item, i, arr) => {
|
|
|
- if (i == 0) {
|
|
|
- item.rowIndex = 1;
|
|
|
- } else if (item.groupId == arr[i - 1].groupId) {
|
|
|
- item.rowIndex = arr[i - 1].rowIndex;
|
|
|
- } else {
|
|
|
- item.rowIndex = arr[i - 1].rowIndex + 1;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.form.klRuleByIdSub.forEach((item, i, arr) => {
|
|
|
+ if (i == 0) {
|
|
|
+ item.rowIndex = 1;
|
|
|
+ } else if (item.groupId == arr[i - 1].groupId) {
|
|
|
+ item.rowIndex = arr[i - 1].rowIndex;
|
|
|
+ } else {
|
|
|
+ item.rowIndex = arr[i - 1].rowIndex + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- immediate: true,
|
|
|
deep: true,
|
|
|
},
|
|
|
},
|
|
@@ -1573,6 +1336,8 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
showHasSub() {
|
|
|
+ console.log(this.ruleTermCodeStrs);
|
|
|
+ console.log(this.subDict);
|
|
|
if (this.ruleTermCodeStrs.length > 2) {
|
|
|
console.log(this.subDict.indexOf(this.ruleTermCodeStrs) != -1);
|
|
|
return this.subDict.indexOf(this.ruleTermCodeStrs) != -1;
|