Commit cf955aab by 展昭
parents 84599d82 40992319
......@@ -7145,8 +7145,7 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true,
"optional": true
"dev": true
},
"pify": {
"version": "4.0.1",
......
<template>
<div class="content">
<div class="header">
<div class="tip"></div>
<div class="title">教育经历</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" />
</div>
<div class="box">
<div class="editItem">
<van-cell title="北京大学" is-link value="2019-2019" />
<van-cell title="北京大学" is-link value="2019-2019" />
<div class="addEdu"><i><img src="@/assets/images/add.png" alt=""></i> 添加教育经历</div>
</div>
</div>
<div class="box" v-show="false">
<div class="unEiteItem">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<div class="timeLine">2010-2008</div>
<div class="schoolName">北京大学</div>
<div class="eduInfo">北京|计算机科学与技术</div>
</div>
</div>
<div class="unEiteItem">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<div class="timeLine">2010-2008</div>
<div class="schoolName">北京大学</div>
<div class="eduInfo">北京|计算机科学与技术</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon, Cell } from "vant";
import { Component } from "vue-property-decorator";
@Component({
components: {
[Icon.name]: Icon,
[Cell.name]: Cell
}
})
export default class eduExperience extends Vue {
obj: object = {};
created() {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getEduExperience(params)
.then(res => {
console.log("edu-res=" + JSON.stringify(res));
this.obj = res;
})
.catch(error => {});
}
}
</script>
<style lang="less" scoped>
.content {
margin-top: 10px;
background: white;
.header {
height: 50px;
display: flex;
align-items: center;
.tip {
width: 3px;
height: 16px;
background: rgba(34, 189, 122, 1);
}
.title {
margin-left: 17px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
}
i {
margin: 0 20px 0 auto;
}
}
.box {
margin: 0 20px;
padding: 12px 0;
border-top: 1px solid #eaeef5;
.editItem {
.van-cell {
padding: 8px 0;
}
.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;
}
}
}
}
.unEiteItem {
display: flex;
.line {
.lineTitle {
width: 10px;
height: 10px;
background: #c8eede;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
i {
height: 6px;
width: 6px;
background: #22bd7a;
display: block;
border-radius: 50%;
}
}
.lineBox {
width: 1px;
height: 100px;
background: rgba(225, 228, 235, 1);
margin: 0 auto;
}
}
.unEiteItemBox {
margin-left: 10px;
.timeLine {
height: 16px;
font-size: 16px;
color: rgba(34, 189, 122, 1);
line-height: 16px;
}
.schoolName {
margin-top: 16px;
height: 16px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
line-height: 16px;
}
.eduInfo {
height: 14px;
font-size: 14px;
color: rgba(149, 152, 158, 1);
line-height: 14px;
margin-top: 12px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="content">
<div class="header">
<div class="tip"></div>
<div class="title">工作经历</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" />
</div>
<div class="box" v-show="false">
<div class="editItem">
<van-cell title="亲亲小保" is-link value="2019-2019" />
<van-cell title="亲亲小保" is-link value="2019-2019" />
<div class="addEdu"><i><img src="@/assets/images/add.png" alt=""></i>添加工作经历</div>
</div>
</div>
<div class="box" v-show="true">
<div class="unEiteItem">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<div class="timeLine">2010-2008</div>
<div class="schoolName">北京大学</div>
<div class="eduInfo">北京|计算机科学与技术</div>
<div class="ditale">审核日常员工报销,办理公司收、付款;录入现金、银行有关收付款凭证,做到日清月结,每日用友软件中的现 缴纳税款、办理投标用。</div>
</div>
</div>
<div class="unEiteItem">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<div class="timeLine">2010-2008</div>
<div class="schoolName">北京大学</div>
<div class="eduInfo">北京|计算机科学与技术</div>
<div class="ditale">审核日常员工报销,办理公司收、付款;录入现金、银行有关收付款凭证,做到日清月结,每日用友软件中的现 缴纳税款、办理投标用。</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon, Cell } from "vant";
import { Component } from "vue-property-decorator";
@Component({
components: {
[Icon.name]: Icon,
[Cell.name]: Cell
}
})
export default class workExperience extends Vue {
obj: object = {};
}
</script>
<style lang="less" scoped>
.content {
margin-top: 10px;
background: white;
.header {
height: 50px;
display: flex;
align-items: center;
.tip {
width: 3px;
height: 16px;
background: rgba(34, 189, 122, 1);
}
.title {
margin-left: 17px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
}
i {
margin: 0 20px 0 auto;
}
}
.box {
margin: 0 20px;
padding: 12px 0;
border-top: 1px solid #eaeef5;
.editItem {
.van-cell {
padding: 8px 0;
}
.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;
}
}
}
}
.unEiteItem {
display: flex;
.line {
.lineTitle {
width: 10px;
height: 10px;
background: #c8eede;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
i {
height: 6px;
width: 6px;
background: #22bd7a;
display: block;
border-radius: 50%;
}
}
.lineBox {
width: 1px;
height: 100px;
background: rgba(225, 228, 235, 1);
margin: 0 auto;
}
}
.unEiteItemBox {
margin-left: 10px;
.timeLine {
height: 16px;
font-size: 16px;
color: rgba(34, 189, 122, 1);
line-height: 16px;
}
.schoolName {
margin-top: 16px;
height: 16px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
line-height: 16px;
}
.eduInfo {
height: 14px;
font-size: 14px;
color: rgba(149, 152, 158, 1);
line-height: 14px;
margin-top: 12px;
}
.ditale {
margin-top: 17px;
height: 72px;
font-size: 14px;
color: rgba(94, 96, 102, 1);
line-height: 24px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<van-field
v-model="startDate"
label="开始时间"
placeholder="请选择开始时间(非必填)"
@click="showStartDate=true"
/>
<van-popup v-model="showStartDate" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
@confirm="onConfirmStartDate"
@cancel="showStartDate = false"
/>
</van-popup>
<van-field
v-model="endDate"
label="结束时间"
placeholder="请选择结束时间(非必填)"
@click="showEndDate=true"
/>
<van-popup v-model="showEndDate" position="bottom">
<van-datetime-picker
v-model="currentDate1"
type="date"
title="选择年月日"
@confirm="onConfirmEndDate"
@cancel="showEndDate = false"
/>
</van-popup>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Dialog, Popup, Picker, Field, Toast, DatetimePicker } from "vant";
import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "../../utils/public";
@Component({
components: {
[Popup.name]: Popup,
[Picker.name]: Picker,
[Field.name]: Field,
[DatetimePicker.name]: DatetimePicker
}
})
export default class eduExperience extends Vue {
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
//获取父组件中的值
@Prop({
required: true,
default: ""
})
startDate!: any;
@Prop({
required: true,
default: ""
})
endDate!: any;
@Watch("dateItem")
getVisible(newVal: any, oldVal: any) {
// this.dateItem = newVal;
}
onConfirmStartDate(time: any) {
this.startDate = formatDate(time, "yyyy-MM-dd");
this.showStartDate = false;
}
onConfirmEndDate(time: any) {
this.endDate = formatDate(time, "yyyy-MM-dd");
this.showEndDate = false;
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<!--TODO 这里封装公用的picker组件-->
<template>
<div>
<van-field
readonly
clickable
:value="infoNation"
:label="label"
placeholder="请选择"
@click="showNation = true"
/>
<van-popup v-model="showNation" position="bottom">
<van-picker
show-toolbar
:columns="columns.nation"
@confirm="onConfirmNation"
@cancel="showNation = false"
/>
</van-popup>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon, Cell, Popup, Field, Picker } from "vant";
import { Component, Prop } from "vue-property-decorator";
@Component({
components: {
[Icon.name]: Icon,
[Cell.name]: Cell,
[Popup.name]: Popup,
[Picker.name]: Picker,
[Field.name]: Field
}
})
export default class workExperience extends Vue {
//获取父组件中的值
private infoNation: any = "";
private showNation: boolean = false;
private columns: any = {
nation: ["汉族", "回族", "蒙古族"],
political: ["群众", "共青团员", "预备党员", "中共党员", "其他"],
edu: [
"小学",
"初中",
"高中",
"大专",
"本科",
"硕士研究生",
"博士研究生",
"职高",
"中专",
"技校",
"其他"
],
marry: ["已婚", "未婚"],
maternity: ["未育", "已育一孩", "已育多孩"]
};
@Prop({
required: true,
default: ""
})
label!: any;
created() {}
onConfirmNation() {}
}
</script>
\ No newline at end of file
......@@ -6,9 +6,14 @@ import 'amfe-flexible/index.js'
import server from '@/services/install'
// import FastClick from 'fastclick'
import '@/assets/css/index.less'
import * as filters from "@/utils/filters";
Vue.config.productionTip = false;
// FastClick.attach(document.body);
Object.keys(filters).forEach((key: string) => {
Vue.filter(key, (filters as any)[key]);
});
Vue.use(server)
new Vue({
......
......@@ -3,12 +3,14 @@
*/
export interface EmployeeInterface {
getUserInfo(params: any): Promise<any>;
getCityList(params: any): Promise<any>; // 获取城市列表
getDispatchList(params: any): Promise<any>; //根据身份证获取用户所属派遣公司列表
getDispatchInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
getWorkInfoList(params: any): Promise<any>; //获取工作信息列表
getWorkInfoDetail(params: any): Promise<any>; //获取工作信息详情
updateWorkInfo(params: any): Promise<any>; //修改工作信息
addWorkInfo(params: any): Promise<any>; //新增工作信息
deleteWorkInfo(params: any): Promise<any>; //新增工作信息
getPersonInfo(params: any): Promise<any>; //获取个人信息
savePersonInfo(params: any): Promise<any>; //保存个人信息
getContactInfo(params: any): Promise<any>; //获取联系信息
......@@ -21,8 +23,12 @@ export interface EmployeeInterface {
getEduExperienceDetial(params: any): Promise<any>; //获取教育信息详情
addEduExperience(params: any): Promise<any>; //新增教育信息
updateEduExperience(params: any): Promise<any>; //修改教育信息
deleteEduExperience(params: any): Promise<any>; //删除教育信息
getTechnologyExperience(params: any): Promise<any>; //获取技术特长
updateTechnologyExperience(params: any): Promise<any>; //修改技术特长
getSalaryInfo(params: any): Promise<any>; //通过身份证号和派遣公司ID拿到派遣员工的工资条信息
getFiles(params:any):Promise<any>;// 获取文件
getAgileWorker(params: any): Promise<any>; //灵活用工
}
......@@ -105,6 +105,16 @@ class EmployeeService implements EmployeeInterface {
}
/**
* 删除工作信息
* @param params 请求参数
*/
public deleteWorkInfo(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/work/${params.edId}/info`;
return request.delete(url, params, this.header)
}
/**
* 获取个人信息
* @param params 请求参数
*/
......@@ -214,6 +224,15 @@ class EmployeeService implements EmployeeInterface {
}
/**
* 删除教育信息
* @param params
*/
public deleteEduExperience(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/edu/${params.eduId}/info`;
return request.delete(url, params, this.header)
}
/**
* 获取技术特长
* @param params
*/
......@@ -231,6 +250,36 @@ class EmployeeService implements EmployeeInterface {
return request.put(url, params, this.header)
}
/**
* 获取城市列表
* @param params
*/
public getCityList(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/dispatch/cities`;
return request.get(url, params, this.header)
}
/**
*
* 通过身份证号和派遣公司ID拿到派遣员工的工资条信息
* @param params
*/
public getSalaryInfo(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/dispatch/companies/${params.idNo}/employee/${params.spId}/payroll`;
return request.get(url, params, this.header)
}
/**
*
* 获取文件
* @param params
*/
public getFiles(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/${params.edId}/files`;
return request.get(url, params, this.header)
}
public getAgileWorker(params: any): Promise<any> {
let url = urls.employeeUrl + `/api/user/employee/${params.idNo}/bill/item`;
return request.get(url, params, this.header)
......
import { toMoney, formatDate, isNull } from "../utils/public";
//格式化日期
export const subDate = (value: string, startNum: number, endNum: number) => {
if (value == null) {
return null;
}
return value.substring(startNum, endNum);
// formatDate(value,'yyyy-MM')
};
export const money = (value: String, isSymbol: boolean, isConvertPoint: boolean) => {
toMoney(value, isSymbol, isConvertPoint)
};
export const format = (value: String, pattern: String) => {
return value.replace(/\d{2}:\d{2}:\d{2}/i, "");
};
export const isEmpty = (value: string) => { isNull(value) }
\ No newline at end of file
......@@ -27,15 +27,15 @@
import Vue from "vue";
import { Button } from "vant";
import { Component } from "vue-property-decorator";
import workInfo from "@/components/archives/workInfo.vue";
import personInfo from "@/components/archives/personInfo.vue";
import contactInfo from "@/components/archives/contactInfo.vue";
import socialInfo from "@/components/archives/socialInfo.vue";
import wageCardInfo from "@/components/archives/wageCardInfo.vue";
import eduExperience from "@/components/archives/eduExperience.vue";
import workExperience from "@/components/archives/workExperience.vue";
import teachnologyExperience from "@/components/archives/technologyExperience.vue";
import archiveQuestion from "@/components/archives/archiveQuestion.vue";
import workInfo from "./archives/workInfo.vue";
import personInfo from "./archives/personInfo.vue";
import contactInfo from "./archives/contactInfo.vue";
import socialInfo from "./archives/socialInfo.vue";
import wageCardInfo from "./archives/wageCardInfo.vue";
import eduExperience from "./archives/eduExperience.vue";
import workExperience from "./archives/workExperience.vue";
import teachnologyExperience from "./archives/technologyExperience.vue";
import archiveQuestion from "./archives/archiveQuestion.vue";
@Component({
name: "Archives",
......
......@@ -8,9 +8,7 @@
<h3>{{name}}</h3>
<p>{{birthday}}</p>
</div>
<div class="person-information-right">
<img src="../assets/images/agent/123.jpg" alt />
</div>
</div>
<div class="person-information-bottom">
<div class="person-information-bottom-child" id="person-information-yjrw">
......@@ -69,21 +67,21 @@
<script lang='ts'>
import { Component, Vue } from "vue-property-decorator";
import { toMoney, formatDate, isNull } from "../utils/public";
// import { toMoney, formatDate, isNull } from "../utils/public";
@Component({
filters: {
money: (value: String, isSymbol: boolean, isConvertPoint: boolean) =>
toMoney(value, isSymbol, isConvertPoint),
format: (value: String, pattern: String) => {
return value.replace(/\d{2}:\d{2}:\d{2}/i, "");
},
isEmpty: (value: string) => isNull(value)
}
// filters: {
// money: (value: String, isSymbol: boolean, isConvertPoint: boolean) =>
// toMoney(value, isSymbol, isConvertPoint),
// format: (value: String, pattern: String) => {
// return value.replace(/\d{2}:\d{2}:\d{2}/i, "");
// },
// isEmpty: (value: string) => isNull(value)
// }
})
export default class FlexEmployee extends Vue {
private name: string = "迪丽热巴";
private birthday: string = "1987-10-16";
private name: string = "迪丽热巴";//入参
private birthday: string = "1987-10-16";//入参
private accept_work: string = "";
private perform_work: string = "";
......@@ -111,8 +109,9 @@ export default class FlexEmployee extends Vue {
}
mounted() {
let params = {
idNo: this.$route.query.id_no
idNo: this.$route.query.id_no //371327198511175134
};
this.$server.EmployeeService.getAgileWorker(params).then((res: any) => {
console.log(res);
......
......@@ -3,22 +3,19 @@
<div class="info-card-box">
<div class="info-card-top">
<div class="info-card-top-left">
<h4>{{user_name}}</h4>
<h4>{{name}}</h4>
<p>{{birthday}}</p>
</div>
<div class="info-card-top-right">
<img src="../assets/images/agent/123.jpg" alt="头像" title="头像" />
</div>
</div>
<div class="info-card-bottom">
<p>
<label>用工单位</label>
<span>{{company_name}}</span>
<span>{{ceFullName}}</span>
</p>
<p>
<label>工作地点</label>
<span>{{work_address}}</span>
<span>{{workAddress}}</span>
</p>
<p>
<label>工作职位</label>
......@@ -26,7 +23,7 @@
</p>
<p>
<label>入职时间</label>
<span>{{entry_date}}</span>
<span>{{employeeEntryDate}}</span>
</p>
</div>
</div>
......@@ -35,7 +32,7 @@
<img src="../assets/images/ic_unfold@2x.png" />
</div>
<router-link class="entrance" :to="`/archives?ed_id=${ed_id}`">
<router-link class="entrance" :to="`/archives?ed_id=${ed_id}&sp_id=${sp_id}&id_no=${id_no}`">
<img src="../assets/images/archives_icon.png" alt="我的档案" title="我的档案" />
<div>
<h4>我的档案</h4>
......@@ -54,7 +51,7 @@
<img class="arrow" src="../assets/images/right_arrow.png" alt="arrow" title="arrow" />
</router-link>
<router-link class="entrance" :to="`/PaySlips?ed_id=${ed_id}`">
<router-link class="entrance" :to="`/PaySlips?sp_id=${sp_id}&id_no=371327198511175134`">
<img src="../assets/images/slips_icon.png" alt="我的工资条" title="我的工资条" />
<div>
<h4>我的工资条</h4>
......@@ -73,29 +70,35 @@ import { Component, Vue } from "vue-property-decorator";
components: {}
})
export default class Index extends Vue {
private user_name: string = "";
private name: string = "";
private birthday: string = "";
private company_name: string = "";
private work_address: string = "";
private ceFullName: string = "";
private workAddress: string = "";
private position: string = "";
private entry_date: string = "";
private employeeEntryDate: string = "";
private id_no: string = "";
private sp_id: string = "";
private ed_id: string = "";
created() {
const id_no = this.$route.query.id_no as string;
this.id_no = window.atob(encodeURI(id_no));
// this.id_no = window.atob(encodeURI(id_no));
this.sp_id = this.$route.query.sp_id as string;
let params = {
spId: this.sp_id,
idNo: this.id_no
spId: "85",
idNo: "51090219750505229X"
};
// 通过身份证号和派遣公司ID拿到派遣员工的信息(劳务派遣首页数据)
this.$server.EmployeeService.getDispatchInfo(params)
.then(res => {
console.log(res);
this.name = res.name;
this.birthday = res.birthday;
this.ceFullName = res.ceFullName;
this.workAddress = res.workAddress;
this.position = res.position;
this.employeeEntryDate = res.employeeEntryDate;
})
.catch(error => {
console.log(error);
......
<template>
<div class="main main-information" id="main_information">
<div class="info-box">
<div class="info-item">
<div class="info-picture">
<img class="uploaded" />
</div>
<p>
<span>title</span>
</p>
</div>
</div>
<div class="main">
<p>请先补充我的档案,如已补充完成,请下载并打印入职登记表.pdf,在打印文件上签字,然后拍照上传。</p>
</div>
</template>
<script>
import "../assets/css/labor.css";
export default {};
<script lang='ts'>
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
@Component({
components: {
[Button.name]: Button,
[Icon.name]: Icon,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field
}
})
export default class Information extends Vue {
private obj: any = {};
private getFiles(): void {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getFiles(params)
.then(res => {
console.log("res=" + JSON.stringify(res)+'文件');
console.log(res);
this.obj = res;
})
.catch(error => {});
}
created() {
this.getFiles();
}
}
</script>
<style lang="less">
......
......@@ -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>
......
<template>
<div>
<van-form>
<van-field v-model="workUnit" label="就职公司" placeholder="请填写公司名称" />
<van-field v-model="position" label="从事职位" placeholder="请填写职位名称" />
<van-field v-model="place" label="工作地点" placeholder="请填写工作地点(非必填)" />
<van-field
v-model="workStartDate"
label="开始时间"
placeholder="请选择开始时间(非必填)"
@click="showStartDate=true"
/>
<van-popup v-model="showStartDate" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
@confirm="onConfirmStartDate"
@cancel="showStartDate = false"
/>
</van-popup>
<van-field
v-model="workEndDate"
label="结束时间"
placeholder="请选择结束时间(非必填)"
@click="showEndDate=true"
/>
<van-popup v-model="showEndDate" position="bottom">
<van-datetime-picker
v-model="currentDate1"
type="date"
title="选择年月日"
@confirm="onConfirmEndDate"
@cancel="showEndDate = false"
/>
</van-popup>
<van-field v-model="description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="saveWorkInfo">保存</van-button>
</div>
</van-form>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import {
Dialog,
Button,
Popup,
Form,
Picker,
Field,
Toast,
DatetimePicker
} from "vant";
import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public";
@Component({
components: {
[Button.name]: Button,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
[DatetimePicker.name]: DatetimePicker
}
})
export default class eduExperience extends Vue {
private description: any = "";
private position: any = "";
private place:any=""//缺少工作地点字段
private workEndDate: any = "";
private workStartDate: any = "";
private workUnit: any = "";
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
//获取父组件中的值
// @Prop({
// required: true,
// default: ""
// })
// childItem!: any;
// @Watch("childItem")
// getVisible(newVal: any, oldVal: any) {
// this.childItem = newVal;
// }
onConfirmStartDate(time: any) {
this.workStartDate = formatDate(time, "yyyy-MM-dd");
this.showStartDate = false;
}
onConfirmEndDate(time: any) {
this.workEndDate = formatDate(time, "yyyy-MM-dd");
this.showEndDate = false;
}
//TODO 新增工作经历
saveWorkInfo() {
let params = {
description: this.description,
edId: this.$route.query.ed_id,
position: this.position,
workEndDate: this.workEndDate,
workStartDate: this.workStartDate,
workUnit: this.workUnit
};
this.$server.EmployeeService.addWorkInfo(params).then(res=>{
Toast.success("保存成功")
this.$emit('showPopup')
this.$emit('addChildItem',params)
}).catch(error=>{
console.log(error)
})
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -7,30 +7,30 @@
<div class="box">
<div class="item">
<span>是否有传染病、精神病及任何慢性疾病史?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio-group v-model="radio1" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否与其他公司签订过“竞业禁止协议”?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio2" direction="horizontal" class="item-radio">
<van-radio name="3" checked-color="#07c160"></van-radio>
<van-radio name="4" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否曾因个人行为不检而被其他公司解雇?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio3" direction="horizontal" class="item-radio">
<van-radio name="5" checked-color="#07c160"></van-radio>
<van-radio name="6" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
<div class="item">
<span>是否愿意接受我公司及派至公司一切规章制度?</span>
<van-radio-group v-model="radio" direction="horizontal" class="item-radio">
<van-radio name="1" checked-color="#07c160"></van-radio>
<van-radio name="2" checked-color="#07c160"></van-radio>
<van-radio-group v-model="radio4" direction="horizontal" class="item-radio">
<van-radio name="7" checked-color="#07c160"></van-radio>
<van-radio name="8" checked-color="#07c160"></van-radio>
</van-radio-group>
</div>
</div>
......@@ -48,7 +48,10 @@ import { Component } from "vue-property-decorator";
},
data() {
return {
radio: 1
radio1: 1,
radio2: 2,
radio3: 3,
radio4: 4
};
}
})
......
<template>
<div class="content">
<div class="header">
<div class="tip"></div>
<div class="title">教育经历</div>
</div>
<div class="box" v-show="true">
<div class="editItem" v-for="(item,key) in obj" :key="key">
<van-cell :title="item.graduateInstitutions" is-link @click="openEduItem(item)">
<template>{{item.eduStartDate | subDate(0,7) }}{{item.eduEndDate | subDate(0,7) }}</template>
</van-cell>
</div>
<van-popup v-model="childShow" position="right" :style="{ height: '100%',width: '90%' }">
<edu-update-experience :childItem="childItem" @removeEduItem="removeEduItem" @popupShow="popupShow" />
</van-popup>
<div class="addEdu" @click="editInfo">
<i>
<img src="@/assets/images/add.png" alt />
</i> 添加教育经历
</div>
</div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<van-form>
<van-field v-model="graduateInstitutions" label="学校名称" placeholder="请填写学校名称" />
<van-field v-model="major" label="专业名称" placeholder="请填写专业名称" />
<van-field
readonly
clickable
:value="education"
label="学历"
placeholder="请选择学历"
@click="showEdu = true"
/>
<van-popup v-model="showEdu" position="bottom">
<van-picker
show-toolbar
:columns="columns"
@confirm="onConfirmEdu"
@cancel="showEdu = false"
/>
</van-popup>
<van-field
v-model="eduStartDate"
label="开始时间"
placeholder="请选择开始时间"
@click="showStartDate=true"
/>
<van-popup v-model="showStartDate" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
@confirm="onConfirmStartDate"
@cancel="showStartDate = false"
/>
</van-popup>
<van-field
v-model="eduEndDate"
label="结束时间"
placeholder="请选择结束时间"
@click="showEndDate=true"
/>
<van-popup v-model="showEndDate" position="bottom">
<van-datetime-picker
v-model="currentDate1"
type="date"
title="选择年月日"
@confirm="onConfirmEndDate"
@cancel="showEndDate = false"
/>
</van-popup>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="addEduInfo">保存</van-button>
</div>
</van-form>
</van-popup>
<div class="box" v-show="false">
<div class="unEiteItem" v-for="(item,key) in obj" :key="key">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<div
class="timeLine"
>{{item.eduStartDate | subDate(0,4)}}-{{item.eduEndDate | subDate(0,4)}}</div>
<div class="schoolName">{{item.graduateInstitutions}}</div>
<div class="eduInfo">{{item.major}} | {{item.education}}</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import {
Button,
Cell,
Icon,
Popup,
Form,
Picker,
Field,
Toast,
DatetimePicker
} from "vant";
import { Component, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public";
import eduUpdateExperience from "./eduUpdateExperience.vue";
@Component({
components: {
[Icon.name]: Icon,
[Button.name]: Button,
[Cell.name]: Cell,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
[DatetimePicker.name]: DatetimePicker,
eduUpdateExperience
}
})
export default class eduExperience extends Vue {
obj: object = {};
private show: boolean = false;
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private childShow: boolean = false;
private major: string = "";
private eduEndDate: string = "";
private eduStartDate: string = "";
private graduateInstitutions: string = "";
private education: string = "";
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
private childItem: any = "";
private columns: any = [
"小学",
"初中",
"高中",
"大专",
"本科",
"硕士研究生",
"博士研究生",
"职高",
"中专",
"技校",
"其他"
];
created() {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getEduExperience(params)
.then(res => {
// console.log("edu-res=" + JSON.stringify(res));
this.obj = res;
})
.catch(error => {});
}
@Watch("obj")
getVisible(newVal: any, oldVal: any) {
this.obj = newVal;
}
editInfo(): void {
this.show = true;
}
addEduInfo() {
let params = {
eduEndDate: this.eduEndDate,
eduStartDate: this.eduStartDate,
education: this.education,
graduateInstitutions: this.graduateInstitutions,
id: this.$route.query.ed_id,
major: this.major
};
this.$server.EmployeeService.addEduExperience(params)
.then(res => {
console.log(res);
})
.catch(error => {
// console.log(error)
});
}
onConfirmEdu(value: any) {
this.education = value;
this.showEdu = false;
}
onConfirmStartDate(time: any) {
this.eduStartDate = formatDate(time, "yyyy-MM-dd");
this.showStartDate = false;
}
onConfirmEndDate(time: any) {
this.eduEndDate = formatDate(time, "yyyy-MM-dd");
this.showEndDate = false;
}
openEduItem(item: any) {
this.childShow = true;
this.childItem = item;
}
//删除对应的列表
removeEduItem(itemId:any){
console.log(itemId)
var arr=Object.entries(this.obj)
arr=arr.filter(item=>item!==itemId)
console.log(arr)
// arr.forEach(item=>{
// item.forEach(i=>{
// console.log(i.id)
// })
// })
}
popupShow(){
this.childShow=false
}
}
</script>
<style lang="less" scoped>
.content {
margin-top: 10px;
background: white;
.header {
height: 50px;
display: flex;
align-items: center;
.tip {
width: 3px;
height: 16px;
background: rgba(34, 189, 122, 1);
}
.title {
margin-left: 17px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
}
i {
margin: 0 20px 0 auto;
}
}
.box {
margin: 0 20px;
padding: 12px 0;
border-top: 1px solid #eaeef5;
.editItem {
.van-cell {
padding: 8px 0;
}
}
.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;
}
}
}
.unEiteItem {
display: flex;
.line {
.lineTitle {
width: 10px;
height: 10px;
background: #c8eede;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
i {
height: 6px;
width: 6px;
background: #22bd7a;
display: block;
border-radius: 50%;
}
}
.lineBox {
width: 1px;
height: 100px;
background: rgba(225, 228, 235, 1);
margin: 0 auto;
}
}
.unEiteItemBox {
margin-left: 10px;
.timeLine {
height: 16px;
font-size: 16px;
color: rgba(34, 189, 122, 1);
line-height: 16px;
}
.schoolName {
margin-top: 16px;
height: 16px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
line-height: 16px;
}
.eduInfo {
height: 14px;
font-size: 14px;
color: rgba(149, 152, 158, 1);
line-height: 14px;
margin-top: 12px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<van-form>
<van-field v-model="childItem.graduateInstitutions" label="学校名称" placeholder="请填写学校名称" />
<van-field v-model="childItem.major" label="专业名称" placeholder="请填写专业名称" />
<van-field
readonly
clickable
:value="childItem.education"
label="学历"
placeholder="请选择学历"
@click="showEdu = true"
/>
<van-popup v-model="showEdu" position="bottom">
<van-picker
show-toolbar
:columns="columns"
@confirm="onConfirmEdu"
@cancel="showEdu = false"
/>
</van-popup>
<date-select :startDate="childItem.eduStartDate" :endDate="childItem.eduEndDate" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
</div>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="deleteEduInfo">删除</van-button>
</div>
</van-form>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import {
Dialog,
Button,
Popup,
Form,
Picker,
Field,
Toast
} from "vant";
import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public";
import dateSelect from "@/components/common/dateSelect.vue"
@Component({
components: {
[Button.name]: Button,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
dateSelect
}
})
export default class eduExperience extends Vue {
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
private columns: any = [
"小学",
"初中",
"高中",
"大专",
"本科",
"硕士研究生",
"博士研究生",
"职高",
"中专",
"技校",
"其他"
];
//获取父组件中的值
@Prop({
required: true,
default: ""
})
childItem!: any;
@Watch("childItem")
getVisible(newVal: any, oldVal: any) {
this.childItem = newVal;
}
onConfirmEdu(value: any) {
this.childItem.education = value;
this.showEdu = false;
}
onConfirmStartDate(time: any) {
this.childItem.eduStartDate = formatDate(time, "yyyy-MM-dd");
this.showStartDate = false;
}
onConfirmEndDate(time: any) {
this.childItem.eduEndDate = formatDate(time, "yyyy-MM-dd");
this.showEndDate = false;
}
//修改
updateEduInfo() {
let params = {
eduEndDate: this.childItem.eduEndDate,
eduStartDate: this.childItem.eduStartDate,
education: this.childItem.education,
graduateInstitutions: this.childItem.graduateInstitutions,
id: this.childItem.id,
major: this.childItem.major
};
this.$server.EmployeeService.updateEduExperience(params)
.then(res => {
Toast.success("修改成功");
this.$emit('popupShow')
})
.catch(error => {
console.log(error);
});
}
//删除
deleteEduInfo() {
let params = {
eduId: this.childItem.id
};
Dialog.confirm({
message: "确认删除?"
})
.then(() => {
this.$emit('removeEduItem',this.childItem.id)
// this.$server.EmployeeService.deleteEduExperience(params)
// .then(res => {
// Toast.success("删除成功!");
// })
// .catch(error => {
// console.log(error);
// });
})
.catch(() => {
// on cancel
});
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -42,7 +42,7 @@
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }">
<!-- <select-info /> -->
<van-form>
<!-- 出生地 -->
<!-- 出生地TODO -->
<van-field
readonly
clickable
......@@ -59,7 +59,7 @@
/>
</van-popup>
<!-- 民族 -->
<van-field
<!-- <van-field
readonly
clickable
:value="obj.infoNation"
......@@ -74,7 +74,8 @@
@confirm="onConfirmNation"
@cancel="showNation = false"
/>
</van-popup>
</van-popup> -->
<popup-picker :label="label"/>
<!-- 政治面貌 -->
<van-field
readonly
......@@ -161,7 +162,7 @@
/>
</van-popup>
<!-- 开始工作时间 -->
<van-field
<!-- <van-field
readonly
clickable
:value="obj.infoWorkStartDate"
......@@ -176,7 +177,7 @@
@confirm="onConfirmWorkDate"
@cancel="showMaternity = false"
/>
</van-popup>
</van-popup> -->
</van-form>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updatePersonInfo">保存</van-button>
......@@ -189,7 +190,7 @@
import Vue from "vue";
import { Icon, Button, Popup, Form, Picker, Field, Area, Toast } from "vant";
import { Component,Prop } from "vue-property-decorator";
// import selectInfo from "@/components/archives/selectInfo.vue";
import popupPicker from "@/components/common/popupPicker.vue"
// import AreaList from "@/assets/js/area.js";
@Component({
components: {
......@@ -199,8 +200,8 @@ import { Component,Prop } from "vue-property-decorator";
[Picker.name]: Picker,
[Field.name]: Field,
// [Area.name]: Area,
[Form.name]: Form
// selectInfo
[Form.name]: Form,
popupPicker
}
})
export default class personInfo extends Vue {
......@@ -212,6 +213,7 @@ export default class personInfo extends Vue {
}) isEdit !:string
private obj: any = {};
private show: boolean = false;
private label: any = "民族";
// private areaList: object = AreaList;
private showBirthplace: boolean = false;
......
......@@ -41,7 +41,7 @@
<van-field
readonly
clickable
:value="obj.infoRegisteredResidence"
v-model="obj.infoRegisteredResidence"
label="户口性质"
placeholder="请选择"
@click="showCategory = true"
......@@ -50,7 +50,7 @@
<van-field
readonly
clickable
:value="obj.unitPreSocialStatus"
v-model="obj.unitPreSocialStatus"
label="前期社保状态"
placeholder="请选择"
@click="showSocialStatus = true"
......@@ -59,7 +59,7 @@
<van-field
readonly
clickable
:value="obj.unitPrePaymentType"
v-model="obj.unitPrePaymentType"
label="前期缴费种类"
placeholder="请选择"
@click="showPaymentType = true"
......@@ -68,7 +68,7 @@
<van-field
readonly
clickable
:value="obj.unitPreSocialCity"
v-model="obj.unitPreSocialCity"
label="原社保缴纳省市"
placeholder="请选择"
@click="showSocialCity = true"
......@@ -79,7 +79,7 @@
<van-field
readonly
clickable
:value="obj.unitRelationUnit"
v-model="obj.unitRelationUnit"
label="与原单位关系"
placeholder="请选择"
@click="showRelationUnit = true"
......@@ -88,14 +88,20 @@
<van-field
readonly
clickable
:value="obj.unitPreEmploymentStatus"
v-model="obj.unitPreEmploymentStatus"
label="前期就业状态"
placeholder="请选择"
@click="showEmploymentStatus = true"
/>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateContactInfo">保存</van-button>
<van-button
round
block
type="info"
native-type="submit"
@click="updateContactInfo_click"
>保存</van-button>
</div>
<!-- 户口性质 -->
......@@ -159,7 +165,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast} from "vant";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
@Component({
......@@ -169,11 +175,14 @@ import { Component } from "vue-property-decorator";
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
[Field.name]: Field
}
})
export default class socialInfo extends Vue {
private obj: any = {};
private city: any = {};
private parents: any = [];
private childrens: any = [];
private show: boolean = false;
private showCategory: boolean = false;
private showSocialStatus: boolean = false;
......@@ -184,50 +193,118 @@ export default class socialInfo extends Vue {
private columns: any = {
category: ["城镇", "农业"],
socialStatus:["曾上过社会保险","从未上过社会保险"],
paymentType:["养老","失业","工伤","生育","医疗","住房"],
relationUnit:["与原单位已不存在任何劳动关系","与原单位仍保持劳动关系,社保由原单位缴纳"],
employmentStatus:["下岗","内退","其他"],
socialCity:["北京市","郑州市"]
socialStatus: ["曾上过社会保险", "从未上过社会保险"],
paymentType: ["养老", "失业", "工伤", "生育", "医疗", "住房"],
relationUnit: [
"与原单位已不存在任何劳动关系",
"与原单位仍保持劳动关系,社保由原单位缴纳"
],
employmentStatus: ["下岗", "内退", "其他"],
socialCity: [
{
text: "浙江",
children: [
{
text: "杭州",
children: [{ text: "西湖区" }, { text: "余杭区" }]
},
{
text: "温州",
children: [{ text: "鹿城区" }, { text: "瓯海区" }]
}
]
}
]
};
// 户口性质
onConfirmCategory(value:string, index:any) {
onConfirmCategory(value: string, index: any) {
this.obj.infoRegisteredResidence = value;
this.showCategory = false;
}
// 前期社保状态
onConfirmSocialStatus(value:string, index:any) {
onConfirmSocialStatus(value: string, index: any) {
this.obj.unitPreSocialStatus = value;
this.showSocialStatus = false;
}
// 前期缴费种类
onConfirmPaymentType(value:string, index:any) {
onConfirmPaymentType(value: string, index: any) {
this.obj.unitPrePaymentType = value;
this.showPaymentType = false;
}
// 原社保缴纳省市
onConfirmSocialCity(value:string, index:any) {
onConfirmSocialCity(value: string, index: any) {
this.obj.unitPreSocialCity = value;
this.showSocialCity = false;
}
// 与原单位关系
onConfirmRelationUnit(value:string, index:any) {
onConfirmRelationUnit(value: string, index: any) {
this.obj.unitRelationUnit = value;
this.showRelationUnit = false;
}
// 前期就业状态
onConfirmEmploymentStatus(value:string, index:any) {
// 前期就业状态 getSalaryInfo decodeURI
onConfirmEmploymentStatus(value: string, index: any) {
this.obj.unitPreEmploymentStatus = value;
this.showEmploymentStatus = false;
}
private getCityList(): void {
this.$server.EmployeeService.getCityList({})
.then(res => {
// console.log("citylist", res);
this.city = res;
for (let i = 0; i < this.city.length; i++) {
if (this.city[i].parentId == 0) {
this.parents.push(this.city[i]);
}
if (this.city[i].parentId != 0) {
this.childrens.push(this.city[i]);
}
}
//没有父节点的数据
// console.log(this.parents);
//有父节点的数据
// 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)
}
})
});
// https://blog.csdn.net/MySunshine07/article/details/104960244?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1
// 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]);
// }
// });
// });
// };
created() {
// function translator(parents, childrens) {
// fliterEvent(parents, childrens);
// return parents;
// }
})
.catch(error => {
console.log(error);
});
}
private getSocialInfo(): void {
let params = {
edId: this.$route.query.ed_id
};
......@@ -239,10 +316,31 @@ export default class socialInfo extends Vue {
})
.catch(error => {});
}
private getSalaryInfo(): void {
const id_no = this.$route.query.id_no as string;
const sp_id = this.$route.query.sp_id as string;
let params = {
idNo: id_no,
spId: sp_id
};
console.log(params);
this.$server.EmployeeService.getSalaryInfo(params)
.then(res => {
// console.log("res=" + JSON.stringify(res)+'工资条');
this.obj = res;
})
.catch(error => {});
}
editInfo(): void {
this.show = true;
}
updateContactInfo() {
updateContactInfo_click() {
let data = {
id: this.$route.query.ed_id,
infoRegisteredResidence: this.obj.infoRegisteredResidence, // 户口性质
......@@ -293,6 +391,13 @@ export default class socialInfo extends Vue {
console.log(error);
});
}
created() {
this.getSalaryInfo();
this.getSocialInfo();
this.getCityList();
}
}
</script>
......
<template>
<div>
<van-form>
<van-field v-model="childItem.workUnit" label="就职公司" placeholder="请填写公司名称" />
<van-field v-model="childItem.position" label="从事职位" placeholder="请填写职位名称" />
<van-field v-model="childItem.place" label="工作地点" placeholder="请填写工作地点(非必填)" />
<date-select :startDate="childItem.workStartDate" :endDate="childItem.workEndDate" />
<van-field v-model="childItem.description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
</div>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="deleteEduInfo">删除</van-button>
</div>
</van-form>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import {
Dialog,
Button,
Popup,
Form,
Picker,
Field,
Toast,
DatetimePicker
} from "vant";
import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public";
import dateSelect from "@/components/common/dateSelect.vue"
@Component({
components: {
[Button.name]: Button,
[Popup.name]: Popup,
[Form.name]: Form,
[Picker.name]: Picker,
[Field.name]: Field,
[DatetimePicker.name]: DatetimePicker,
dateSelect
}
})
export default class eduExperience extends Vue {
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
//获取父组件中的值
@Prop({
required: true,
default: ""
})
childItem!: any;
@Watch("childItem")
getVisible(newVal: any, oldVal: any) {
this.childItem = newVal;
}
onConfirmStartDate(time: any) {
this.childItem.workStartDate = formatDate(time, "yyyy-MM-dd");
this.showStartDate = false;
}
onConfirmEndDate(time: any) {
this.childItem.workEndDate = formatDate(time, "yyyy-MM-dd");
this.showEndDate = false;
}
//修改
updateEduInfo() {
let params = {
description: this.childItem.description,
edId: this.childItem.id,
position: this.childItem.position,
workEndDate: this.childItem.workEndDate,
workStartDate: this.childItem.workStartDate,
workUnit: this.childItem.workUnit
};
this.$server.EmployeeService.updateWorkInfo(params)
.then(res => {
Toast.success("修改成功!")
this.$emit('showPopup')
})
.catch(error => {
console.log(error);
});
}
//删除
deleteEduInfo() {
let params = {
edId: this.childItem.id
};
Dialog.confirm({
message: "确认删除?"
})
.then(() => {
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
});
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<div class="content">
<div class="header">
<div class="tip"></div>
<div class="title">工作经历</div>
</div>
<div class="box" v-show="true">
<div class="editItem" v-for="(item,key) in obj" :key="key">
<van-cell :title="item.workUnit" is-link @click="openWorkItem(item)">
<template>{{item.workStartDate | subDate(0,7) }}{{item.workEndDate | subDate(0,7) }}</template>
</van-cell>
</div>
<van-popup v-model="childShow" position="right" :style="{ height: '100%',width: '90%' }">
<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>
<!-- 添加工作经历 -->
<van-popup v-model="addShow" position="right" :style="{ height: '100%',width: '90%' }">
<add-work-experience @showPopup="showPopup" @addChildItem="addChildItem" />
</van-popup>
</div>
<div class="box" v-show="false">
<div class="unEiteItem" v-for="(item,key) in obj" :key="key">
<div class="line">
<div class="lineTitle">
<i></i>
</div>
<div class="lineBox"></div>
</div>
<div class="unEiteItemBox">
<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>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Icon, Cell, Popup } from "vant";
import { Component } from "vue-property-decorator";
import addWorkExperience from "./addWorkExperience.vue";
import updateWorkExperience from "./updateWorkExperience.vue";
@Component({
components: {
[Icon.name]: Icon,
[Cell.name]: Cell,
[Popup.name]: Popup,
addWorkExperience,
updateWorkExperience
}
})
export default class workExperience extends Vue {
obj: any = "";
private addShow: boolean = false;
private childShow: boolean = false;
private childItem: any = "";
created() {
let params = {
edId: this.$route.query.ed_id //工作信息里返回的id
};
this.$server.EmployeeService.getWorkInfoList(params)
.then(res => {
this.obj = res;
})
.catch(error => {});
}
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) {
this.childShow = true;
this.childItem = item;
}
//子组件调用父组件方法
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>
<style lang="less" scoped>
.content {
margin-top: 10px;
background: white;
.header {
height: 50px;
display: flex;
align-items: center;
.tip {
width: 3px;
height: 16px;
background: rgba(34, 189, 122, 1);
}
.title {
margin-left: 17px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
}
i {
margin: 0 20px 0 auto;
}
}
.box {
margin: 0 20px;
padding: 12px 0;
border-top: 1px solid #eaeef5;
.editItem {
.van-cell {
padding: 8px 0;
}
}
.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;
}
}
}
.unEiteItem {
display: flex;
.line {
.lineTitle {
width: 10px;
height: 10px;
background: #c8eede;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
i {
height: 6px;
width: 6px;
background: #22bd7a;
display: block;
border-radius: 50%;
}
}
.lineBox {
width: 1px;
height: 100px;
background: rgba(225, 228, 235, 1);
margin: 0 auto;
}
}
.unEiteItemBox {
margin-left: 10px;
.timeLine {
height: 16px;
font-size: 16px;
color: rgba(34, 189, 122, 1);
line-height: 16px;
}
.schoolName {
margin-top: 16px;
height: 16px;
font-size: 16px;
font-weight: 500;
color: rgba(61, 64, 71, 1);
line-height: 16px;
}
.eduInfo {
height: 14px;
font-size: 14px;
color: rgba(149, 152, 158, 1);
line-height: 14px;
margin-top: 12px;
}
.ditale {
margin-top: 17px;
height: 72px;
font-size: 14px;
color: rgba(94, 96, 102, 1);
line-height: 24px;
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -19,11 +19,11 @@
</div>
<div class="item">
<span>工作职位</span>
<label>{{obj.position}}</label>
<label>xx</label>
</div>
<div class="item">
<span>入职时间</span>
<label>{{obj.workStartDate}}</label>
<label>xxx</label>
</div>
</div>
</div>
......@@ -41,17 +41,8 @@ import { Component } from "vue-property-decorator";
})
export default class workInfo extends Vue {
obj:object={}
created() {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.getWorkInfoDetail(params).then(res => {
console.log("res="+JSON.stringify(res))
this.obj=res
}).catch(error=>{
})
}
// @Emit('bindSend') send(msg: string){};
}
</script>
......
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