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
0e09e2e4
authored
Jun 07, 2020
by
lishengfu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
c6cadf95
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
46 deletions
src/views/archives/addWorkExperience.vue
src/views/archives/socialInfo.vue
src/views/archives/updateWorkExperience.vue
src/views/archives/workExperience.vue
src/views/archives/addWorkExperience.vue
View file @
0e09e2e4
...
...
@@ -112,6 +112,7 @@ export default class eduExperience extends Vue {
this
.
$server
.
EmployeeService
.
addWorkInfo
(
params
).
then
(
res
=>
{
Toast
.
success
(
"保存成功"
)
this
.
$emit
(
'showPopup'
)
this
.
$emit
(
'addChildItem'
,
params
)
}).
catch
(
error
=>
{
console
.
log
(
error
)
})
...
...
src/views/archives/socialInfo.vue
View file @
0e09e2e4
...
...
@@ -266,12 +266,12 @@ export default class socialInfo extends Vue {
//没有父节点的数据
// console.log(this.parents);
//有父节点的数据
console
.
log
(
this
.
childrens
);
//
console.log(this.childrens);
this
.
parents
.
forEach
((
parent
:
any
)
=>
{
this
.
childrens
.
forEach
((
children
:
any
)
=>
{
if
(
parent
.
id
==
children
.
parentId
){
console
.
log
(
parent
.
name
+
parent
.
id
+
"++"
+
children
.
name
+
children
.
parentId
)
//
console.log(parent.name+parent.id+"++"+children.name+children.parentId)
}
})
...
...
@@ -329,7 +329,7 @@ export default class socialInfo extends Vue {
this
.
$server
.
EmployeeService
.
getSalaryInfo
(
params
)
.
then
(
res
=>
{
console
.
log
(
"res="
+
JSON
.
stringify
(
res
)
+
'工资条'
);
//
console.log("res=" + JSON.stringify(res)+'工资条');
this
.
obj
=
res
;
})
...
...
src/views/archives/updateWorkExperience.vue
View file @
0e09e2e4
...
...
@@ -96,14 +96,15 @@ export default class eduExperience extends Vue {
message
:
"确认删除?"
})
.
then
(()
=>
{
// this.$emit("removeEduItem", this.childItem.id);
// this.$server.EmployeeService.deleteWorkInfo(params)
// .then(res => {
// console.log(res);
// })
// .catch(error => {
// console.log(error);
// });
this
.
$server
.
EmployeeService
.
deleteWorkInfo
(
params
)
.
then
(
res
=>
{
this
.
$emit
(
"removeChileItem"
,
this
.
childItem
.
id
);
this
.
$emit
(
'showPopup'
)
Toast
.
success
(
"删除成功"
)
})
.
catch
(
error
=>
{
console
.
log
(
error
);
});
})
.
catch
(()
=>
{
// on cancel
...
...
src/views/archives/workExperience.vue
View file @
0e09e2e4
...
...
@@ -11,16 +11,20 @@
</van-cell>
</div>
<van-popup
v-model=
"childShow"
position=
"right"
:style=
"{ height: '100%',width: '90%' }"
>
<update-work-experience
:childItem=
"childItem"
@
showPopup=
"showPopup"
/>
<update-work-experience
:childItem=
"childItem"
@
showPopup=
"showPopup"
@
removeChileItem=
"removeChileItem"
/>
</van-popup>
<div
class=
"addEdu"
@
click=
"addWork"
>
<i>
<img
src=
"@/assets/images/add.png"
alt
/>
</i>
添加工作经历
</div>
<i>
<img
src=
"@/assets/images/add.png"
alt
/>
</i>
添加工作经历
</div>
<!-- 添加工作经历 -->
<van-popup
v-model=
"addShow"
position=
"right"
:style=
"{ height: '100%',width: '90%' }"
>
<add-work-experience
@
showPopup=
"showPopup"
/>
<add-work-experience
@
showPopup=
"showPopup"
@
addChildItem=
"addChildItem"
/>
</van-popup>
</div>
<div
class=
"box"
v-show=
"false"
>
...
...
@@ -32,7 +36,9 @@
<div
class=
"lineBox"
></div>
</div>
<div
class=
"unEiteItemBox"
>
<div
class=
"timeLine"
>
{{item.workStartDate | subDate(0,7)}} 至 {{item.workEndDate | subDate(0,7)}}
</div>
<div
class=
"timeLine"
>
{{item.workStartDate | subDate(0,7)}} 至 {{item.workEndDate | subDate(0,7)}}
</div>
<div
class=
"schoolName"
>
{{item.workUnit}}
</div>
<div
class=
"eduInfo"
>
{{item.position}} | 缺少城市字段
</div>
<div
class=
"ditale"
>
{{item.description}}
</div>
...
...
@@ -44,10 +50,10 @@
<
script
lang=
"ts"
>
import
Vue
from
"vue"
;
import
{
Icon
,
Cell
,
Popup
}
from
"vant"
;
import
{
Icon
,
Cell
,
Popup
}
from
"vant"
;
import
{
Component
}
from
"vue-property-decorator"
;
import
addWorkExperience
from
"./addWorkExperience.vue"
import
updateWorkExperience
from
"./updateWorkExperience.vue"
import
addWorkExperience
from
"./addWorkExperience.vue"
;
import
updateWorkExperience
from
"./updateWorkExperience.vue"
;
@
Component
({
components
:
{
...
...
@@ -59,9 +65,9 @@ import updateWorkExperience from "./updateWorkExperience.vue"
}
})
export
default
class
workExperience
extends
Vue
{
obj
:
object
=
{}
;
private
addShow
:
boolean
=
false
private
childShow
:
boolean
=
false
obj
:
any
=
""
;
private
addShow
:
boolean
=
false
;
private
childShow
:
boolean
=
false
;
private
childItem
:
any
=
""
;
created
()
{
let
params
=
{
...
...
@@ -69,23 +75,45 @@ export default class workExperience extends Vue {
};
this
.
$server
.
EmployeeService
.
getWorkInfoList
(
params
)
.
then
(
res
=>
{
console
.
log
(
"work-res="
+
JSON
.
stringify
(
res
));
this
.
obj
=
res
;
})
.
catch
(
error
=>
{});
}
addWork
(){
this
.
addShow
=
true
addWork
()
{
this
.
addShow
=
true
;
}
//通过子组件来添加父组件中的列表
addChildItem
(
item
:
any
)
{
let
addItem
=
[];
for
(
let
i
in
this
.
obj
)
{
addItem
.
push
(
this
.
obj
[
i
]);
}
addItem
.
push
(
item
);
this
.
obj
=
addItem
;
}
//
openWorkItem
(
item
:
any
)
{
openWorkItem
(
item
:
any
)
{
this
.
childShow
=
true
;
this
.
childItem
=
item
;
}
//子组件调用父组件方法
showPopup
(){
this
.
addShow
=
false
this
.
childShow
=
false
showPopup
()
{
this
.
addShow
=
false
;
this
.
childShow
=
false
;
}
//通过子组件删除父组件对应的列表
removeChileItem
(
item
:
any
)
{
let
removeCliedArr
=
[];
for
(
let
i
in
this
.
obj
)
{
removeCliedArr
.
push
(
this
.
obj
[
i
]);
}
let
removeList
=
removeCliedArr
;
removeCliedArr
.
forEach
((
i
,
index
)
=>
{
if
(
i
.
id
===
item
)
{
removeList
.
splice
(
index
,
1
);
}
});
this
.
obj
=
removeList
;
}
}
</
script
>
...
...
@@ -123,23 +151,23 @@ export default class workExperience extends Vue {
}
}
.addEdu
{
height
:
15px
;
font-size
:
15px
;
font-weight
:
500
;
color
:
rgba
(
34
,
189
,
122
,
1
);
line-height
:
15px
;
text-align
:
center
;
margin
:
25px
auto
12px
;
display
:
flex
;
justify-content
:
center
;
i
{
margin-right
:
10px
;
img
{
width
:
16px
;
height
:
17px
;
}
height
:
15px
;
font-size
:
15px
;
font-weight
:
500
;
color
:
rgba
(
34
,
189
,
122
,
1
);
line-height
:
15px
;
text-align
:
center
;
margin
:
25px
auto
12px
;
display
:
flex
;
justify-content
:
center
;
i
{
margin-right
:
10px
;
img
{
width
:
16px
;
height
:
17px
;
}
}
}
.unEiteItem
{
display
:
flex
;
.line
{
...
...
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