Commit 6a1eb39a by yufeng.tang

bug

parent a45161b8
......@@ -620,15 +620,16 @@ export default {
.catch((error) => {});
},
// setChildren(children, type) {
// // 编辑多个子层级
// children.map((j) => {
// this.toggleSelection(j, type);
// if (j.children) {
// this.setChildren(j.children, type);
// }
// });
// },
setChildren(children, type) {
// 编辑多个子层级
children.map((j) => {
j.tickTime = transformTimestampnow();
this.toggleSelection(j, type);
if (j.children && j.children.length) {
this.setChildren(j.children, type);
}
});
},
// 选中父节点时,子节点一起选中取消
select(selection, row) {
......@@ -640,13 +641,21 @@ export default {
})
) {
row.ischeck = 1;
if (row.children) {
if (row.children && row.children.length) {
row.children
.filter((item) => item.isForbidden)
.map((j) => {
if (j.children && j.children.length) {
j.children
.filter((r) => r.isForbidden)
.map((e) => {
e.tickTime = transformTimestampnow();
// e.edit = false;
this.toggleSelection(e, true);
});
}
j.tickTime = transformTimestampnow();
j.edit = false;
console.log(j.type);
// j.edit = false;
this.toggleSelection(j, true);
});
console.log(1);
......@@ -663,6 +672,12 @@ export default {
if (row.children && row.children.length) {
console.log(3, row);
row.children.map((p) => {
if (p.children && p.children.length) {
p.children.map((i) => {
i.ischeck = 2;
this.toggleSelection(i, false);
});
}
p.ischeck = 2;
this.toggleSelection(p, false);
});
......@@ -706,6 +721,13 @@ export default {
el.children
.filter((item) => item.isForbidden)
.map((j) => {
if (j.children) {
j.children
.filter((r) => r.isForbidden)
.map((e) => {
this.toggleSelection(e, true);
});
}
this.toggleSelection(j, true);
});
}
......@@ -731,23 +753,25 @@ export default {
this.multipleSelection1 = val.sort((a, b) => a.sort - b.sort);
// this.multipleSelection1 = val.filter((item) => !item.children).sort((a, b) => a.sort - b.sort);
}
console.log(this.multipleSelection.filter((item) => item.adviceType));
console.log(this.multipleSelection1.filter((item) => item.adviceType));
if (this.multipleSelection.length) {
this.multipleSelection
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.filter((item) => !item.children)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
if (this.multipleSelection1.length) {
this.multipleSelection1
.filter((item) => item.adviceType)
.filter((item) => item.type != 1)
.filter((item) => !item.children)
.map((item, index) => {
index == 0 ? (item.isedit = true) : (item.isedit = false);
});
}
console.log(this.multipleSelection);
},
//获取左侧时间线数据
......@@ -797,9 +821,6 @@ export default {
data.route1.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
// if (el.orderType == "药疗") {
// el.children = [];
// }
el.sort = i++;
el.isedit = false;
});
......@@ -808,9 +829,6 @@ export default {
data.route2.forEach((element) => {
if (element.children) {
element.children.map((el, i) => {
// if (el.orderType == "药疗") {
// el.children = [];
// }
el.sort = i++;
el.isedit = false;
});
......@@ -906,8 +924,8 @@ export default {
}, 300);
},
saveSetPatientRoutes() {
this.objtable.route1 = this.multipleSelection;
this.objtable.route2 = this.multipleSelection1;
this.objtable.route1 = this.multipleSelection.filter((item) => item.adviceType);
this.objtable.route2 = this.multipleSelection1.filter((item) => item.adviceType);
http
.post(`/ClinicalRoute/ClinicalRoute/SetPatientRoutes?pid=${this.$route.query.pid}`, this.objtable)
.then(async (data) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment