Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
frontend
/
qqxb-self-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a1ec3ce3
authored
Jun 04, 2020
by
e
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
updata
parent
1209cb6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
23 deletions
src/components/archives/socialInfo.vue
src/views/SelectIdentity.vue
src/components/archives/socialInfo.vue
View file @
a1ec3ce3
...
...
@@ -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
);
...
...
src/views/SelectIdentity.vue
View file @
a1ec3ce3
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment