Commit a1ec3ce3 by e

updata

parent 1209cb6e
......@@ -267,30 +267,27 @@ export default class socialInfo extends Vue {
console.log(this.parents);
//有父节点的数据
console.log(this.childrens);
//遍历父节点数据
// this.parents.forEach((parent: any) => {
// //遍历子节点数据
// this.childrens.forEach((current: any, index: any) => {
// //此时找到父节点对应的一个子节点
// if (current.parentId === parent.id) {
// //对子节点数据进行深复制,这里只支持部分类型的数据深复制,对深复制不了解的童靴可以先去了解下深复制
// let temp = JSON.parse(JSON.stringify(children));
// //让当前子节点从temp中移除,temp作为新的子节点数据,这里是为了让递归时,子节点的遍历次数更少,如果父子关系的层级越多,越有利
// temp.splice(index, 1);
// //让当前子节点作为唯一的父节点,去递归查找其对应的子节点
// translator([current], temp);
// //把找到子节点放入父节点的children属性中
// typeof parent.children !== "0"
// ? parent.children.push(current)
// : (parent.children = [current]);
// }
// let fliterEvent = (parents:any, childrens:any) => {
// parents.forEach(parent => {
// childrens.forEach((current:any, index:any) => {
// if (current.parentId === parent.id) {
// let temp = JSON.parse(JSON.stringify(children));
// temp.splice(index, 1);
// fliterEvent([current], temp);
// typeof parent.children !== "undefined"
// ? parent.children.push(current)
// : (parent.children = [current]);
// }
// });
// });
// });
// };
// function translator(parents, childrens) {
// fliterEvent(parents, childrens);
// return parents;
// }
})
.catch(error => {
console.log(error);
......
......@@ -8,14 +8,14 @@
</div>
</a>-->
<a class="si-child" id="dispatch-employee" @click="toIndex_click">
<img src="../assets/images/agent/company-employee.png" alt />
<img src="../assets/images/agent/dispatch-employee.png" alt />
<div class="si-child-desc">
<h4>我是派遣员工</h4>
<p>可查看编辑自己的劳务派遣员工档案信息</p>
</div>
</a>
<a class="si-child" id="flex-employee" @click="toFlex">
<img src="../assets/images/agent/company-employee.png" alt />
<img src="../assets/images/agent/flex-employee.png" alt />
<div class="si-child-desc">
<h4>我是灵活用工员工</h4>
<p>可查看灵活用工人员任务信息</p>
......
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 sign in to comment