Commit 424adade by lishengfu

udpate

parent a5b2696c
<template>
<div>
<van-picker
show-toolbar
title=""
:loading="loading"
:columns="columns"
@confirm="onConfirm"
/>
<van-picker show-toolbar title :loading="loading" :columns="columns" @confirm="onConfirm" @cancel="onCancel" />
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Picker } from "vant";
import { Component } from "vue-property-decorator";
import { Component, Prop } from "vue-property-decorator";
@Component({
components: {
......@@ -20,6 +14,11 @@ import { Component } from "vue-property-decorator";
}
})
export default class cityList extends Vue {
// @Prop({
// type: Boolean,
// required: true,
// default: ""
// }) showCancel!: boolean;
private data: any = "";
private province: any = ""; //省份
private city: any = []; //市份
......@@ -100,8 +99,16 @@ export default class cityList extends Vue {
}
onConfirm(values: any) {
console.log(values)
this.$emit('childCityList',values)
let ary: any = [];
values.find((item: any) => {
if (item != "请选择") {
ary.push(item);
}
});
this.$emit("childCityList", ary);
}
onCancel(){
//this.showCancel=false
}
}
</script>
......
......@@ -8,24 +8,24 @@
<div class="header_name">{{employee_name}}</div>
<div class="header_info">{{employee_sex}}|{{employee_birthday}}</div>
</div>
<work-info />
<work-info :obj="obj" :query="query" />
<person-info :isEdit="isEdit" />
<contact-info />
<social-info />
<wage-card-info />
<edu-experience />
<work-experience />
<teachnology-experience />
<archive-question />
<div class="saveBtn">
<van-button type="primary" block>提交信息</van-button>
<contact-info :isEdit="isEdit" />
<social-info :isEdit="isEdit" />
<wage-card-info :isEdit="isEdit" />
<edu-experience :isEdit="isEdit" />
<work-experience :isEdit="isEdit" />
<teachnology-experience :isEdit="isEdit" />
<!-- <archive-question /> -->
<div class="saveBtn" v-if="this.isEdit==0 || this.isEdit==-1">
<van-button type="primary" block @click="handleSave">提交信息</van-button>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Button } from "vant";
import { Button,Toast } from "vant";
import { Component } from "vue-property-decorator";
import workInfo from "./archives/workInfo.vue";
import personInfo from "./archives/personInfo.vue";
......@@ -53,14 +53,47 @@ import archiveQuestion from "./archives/archiveQuestion.vue";
}
})
export default class archives extends Vue {
private isEdit:any="123";
private employee_name:any="";
private employee_birthday:any="";
private employee_sex:any="";
created(){
this.employee_name=localStorage.getItem("name") as string;
this.employee_birthday=localStorage.getItem("birthday") as string;
this.employee_sex=localStorage.getItem("sex") as string;
private isEdit: string = "";
private employee_name: any = "";
private employee_birthday: any = "";
private employee_sex: any = "";
private obj: object = {};
private query: object = {};
created() {
this.employee_name = localStorage.getItem("name") as string;
this.employee_birthday = localStorage.getItem("birthday") as string;
this.employee_sex = localStorage.getItem("sex") as string;
this.handleInfo();
}
sortKey(array: any, key: any) {
return array.sort(function(a: any, b: any) {
var x = a[key];
var y = b[key];
return x > y ? -1 : x < y ? 1 : 0;
});
}
handleInfo() {
let params = {
spId: this.$route.query.sp_id,
idNo: this.$route.query.id_no
};
this.$server.EmployeeService.getDispatchInfo(params).then(res => {
this.query = res;
this.isEdit = res.auditInfoStatus;
this.obj = this.sortKey(res.workData, "res.workData.workStartDate")[0];
});
}
handleSave() {
let params = {
edId: this.$route.query.ed_id
};
this.$server.EmployeeService.updateBaseInfo(params).then(res => {
if (res == true) {
Toast.success("保存成功");
} else {
Toast(res.message);
}
});
}
}
</script>
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tip"></div>
<div class="title">联系信息</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
<van-icon v-if="this.isEdit==0 || this.isEdit==-1" size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
</div>
<div class="box">
<div class="item">
......@@ -51,7 +51,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
import { Component ,Prop} from "vue-property-decorator";
import qs from "qs";
@Component({
......@@ -65,6 +65,13 @@ import qs from "qs";
}
})
export default class contactInfo extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
private obj: any = {};
private show: boolean = false;
created() {
......
......@@ -4,7 +4,7 @@
<div class="tip"></div>
<div class="title">教育经历</div>
</div>
<div class="box" v-show="true">
<div class="box" v-if="this.isEdit==0 || this.isEdit==-1">
<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>
......@@ -19,10 +19,7 @@
</i> 添加教育经历
</div>
</div>
<van-popup v-model="addShow" position="right" :style="{ height: '100%',width: '90%' }">
<edu-add-experience @popupShow="popupShow" @addChildItem="addChildItem" />
</van-popup>
<div class="box" v-show="false">
<div class="box" v-else>
<div class="unEiteItem" v-for="(item,key) in obj" :key="key">
<div class="line">
<div class="lineTitle">
......@@ -33,12 +30,16 @@
<div class="unEiteItemBox">
<div
class="timeLine"
>{{item.eduStartDate | subDate(0,4)}}-{{item.eduEndDate | subDate(0,4)}}</div>
>{{item.eduStartDate | subDate(0,7)}}至{{item.eduEndDate | subDate(0,7)}}</div>
<div class="schoolName">{{item.graduateInstitutions}}</div>
<div class="eduInfo">{{item.major}} | {{item.education}}</div>
</div>
</div>
</div>
<!-- -->
<van-popup v-model="addShow" position="right" :style="{ height: '100%',width: '90%' }">
<edu-add-experience @popupShow="popupShow" @addChildItem="addChildItem" />
</van-popup>
</div>
</template>
......@@ -54,7 +55,7 @@ import {
Field,
Toast
} from "vant";
import { Component, Watch } from "vue-property-decorator";
import { Component, Watch ,Prop} from "vue-property-decorator";
import { formatDate } from "@/utils/public";
import eduUpdateExperience from "./eduUpdateExperience.vue";
import eduAddExperience from "./eduAddExperience.vue"
......@@ -73,6 +74,12 @@ import eduAddExperience from "./eduAddExperience.vue"
}
})
export default class eduExperience extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
obj: any = "";
private addShow: boolean = false;
private childShow: boolean = false;
......
......@@ -3,7 +3,13 @@
<div class="header">
<div class="tip"></div>
<div class="title">个人信息</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
<van-icon
v-if="this.isEdit==0 || this.isEdit==-1"
size="14px"
color="#E1E4EB"
name="arrow"
@click="editInfo"
/>
</div>
<div class="box">
<div class="item">
......@@ -52,6 +58,7 @@
@click="showBirthplace = true"
/>
<van-popup v-model="showBirthplace" position="bottom">
<!-- <city-list @childCityList="birthCity" :showBirthplace="showCancel" /> -->
<city-list @childCityList="birthCity" />
</van-popup>
<!-- 民族 -->
......@@ -220,6 +227,7 @@ export default class personInfo extends Vue {
private show: boolean = false;
private label: any = "民族";
// private showCancel: boolean = false;
private showBirthplace: boolean = false;
private showNation: boolean = false;
private showPolitical: boolean = false;
......@@ -360,24 +368,23 @@ export default class personInfo extends Vue {
updatePersonInfo() {
let params = {
id: this.$route.query.ed_id,
infoBirthCity: '',//this.obj.infoBirthCity,
infoFileLocation: '',//this.obj.infoFileLocation,
infoHighestEducation: '',//this.obj.infoHighestEducation,
infoMaritalStatus: '',//this.obj.infoMaritalStatus,
infoMaternityStatus: '',//this.obj.infoMaternityStatus,
infoNation: '',//this.obj.infoNation,
infoPoliticalStatus: '',//this.obj.infoPoliticalStatus,
infoWorkStartDate: '',//this.obj.infoWorkStartDate,
infoBirthCity: this.obj.infoBirthCity,
infoFileLocation: this.obj.infoFileLocation,
infoHighestEducation: this.obj.infoHighestEducation,
infoMaritalStatus: this.obj.infoMaritalStatus,
infoMaternityStatus: this.obj.infoMaternityStatus,
infoNation: this.obj.infoNation,
infoPoliticalStatus: this.obj.infoPoliticalStatus,
infoWorkStartDate: this.obj.infoWorkStartDate
};
this.$server.EmployeeService.savePersonInfo(params)
.then(res => {
this.$server.EmployeeService.savePersonInfo(params).then(res => {
if (res == true) {
Toast.success("保存成功");
this.show = false;
})
.catch(error => {
console.log(error);
});
} else {
Toast(res.message);
}
});
}
}
</script>
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tip"></div>
<div class="title">社保信息</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
<van-icon v-if="this.isEdit==0 || this.isEdit==-1" size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
</div>
<div class="box">
<div class="item">
......@@ -154,7 +154,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
import { Component,Prop } from "vue-property-decorator";
import cityList from "@/components/common/cityList.vue";
@Component({
......@@ -169,6 +169,12 @@ import cityList from "@/components/common/cityList.vue";
}
})
export default class socialInfo extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
private obj: any = {};
private city: any = {};
private parents: any = [];
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tip"></div>
<div class="title">技术特长</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
<van-icon v-if="this.isEdit==0 || this.isEdit==-1" size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
</div>
<div class="box">
<div class="item">
......@@ -35,7 +35,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
import { Component,Prop } from "vue-property-decorator";
@Component({
components: {
......@@ -48,6 +48,12 @@ import { Component } from "vue-property-decorator";
}
})
export default class technologyExperience extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
private obj: any = {};
private show: boolean = false;
created() {
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tip"></div>
<div class="title">工资卡信息</div>
<van-icon size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
<van-icon v-if="this.isEdit==0 || this.isEdit==-1" size="14px" color="#E1E4EB" name="arrow" @click="editInfo" />
</div>
<div class="box">
<div class="item">
......@@ -40,7 +40,7 @@
<script lang="ts">
import Vue from "vue";
import { Button, Icon, Popup, Form, Picker, Field, Toast } from "vant";
import { Component } from "vue-property-decorator";
import { Component ,Prop} from "vue-property-decorator";
@Component({
components: {
......@@ -53,6 +53,12 @@ import { Component } from "vue-property-decorator";
}
})
export default class wageCardInfo extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
private show: boolean = false;
obj: any = {};
created() {
......
......@@ -4,7 +4,7 @@
<div class="tip"></div>
<div class="title">工作经历</div>
</div>
<div class="box" v-show="true">
<div class="box" v-if="this.isEdit==0 || this.isEdit==-1">
<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>
......@@ -27,7 +27,7 @@
<add-work-experience @showPopup="showPopup" @addChildItem="addChildItem" />
</van-popup>
</div>
<div class="box" v-show="false">
<div class="box" v-else>
<div class="unEiteItem" v-for="(item,key) in obj" :key="key">
<div class="line">
<div class="lineTitle">
......@@ -40,7 +40,7 @@
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="eduInfo">{{item.position}}</div>
<div class="ditale">{{item.description}}</div>
</div>
</div>
......@@ -51,7 +51,7 @@
<script lang="ts">
import Vue from "vue";
import { Icon, Cell, Popup } from "vant";
import { Component } from "vue-property-decorator";
import { Component,Prop } from "vue-property-decorator";
import addWorkExperience from "./addWorkExperience.vue";
import updateWorkExperience from "./updateWorkExperience.vue";
......@@ -65,6 +65,12 @@ import updateWorkExperience from "./updateWorkExperience.vue";
}
})
export default class workExperience extends Vue {
//获取父组件中的isEdit
@Prop({
type: String,
required: true,
default: ""
}) isEdit!: string;
obj: any = "";
private addShow: boolean = false;
private childShow: boolean = false;
......@@ -76,8 +82,8 @@ export default class workExperience extends Vue {
this.$server.EmployeeService.getWorkInfoList(params)
.then(res => {
this.obj = res;
console.log(res)
})
.catch(error => {});
}
addWork() {
this.addShow = true;
......
......@@ -7,23 +7,23 @@
<div class="box">
<div class="item">
<span>派遣公司</span>
<label>{{query.spFullName}}</label>
<label>{{this.query.spFullName}}</label>
</div>
<div class="item">
<span>用工单位</span>
<label>{{obj.workUnit}}</label>
<label>{{this.obj.workUnit}}</label>
</div>
<div class="item">
<span>工作地点</span>
<label>{{query.workAddress}}</label>
<label>{{this.query.workAddress}}</label>
</div>
<div class="item">
<span>工作职位</span>
<label>{{obj.position}}</label>
<label>{{this.obj.position}}</label>
</div>
<div class="item">
<span>入职时间</span>
<label>{{obj.workStartDate}}</label>
<label>{{this.obj.workStartDate}}</label>
</div>
</div>
</div>
......@@ -32,7 +32,7 @@
<script lang="ts">
import Vue from "vue";
import { Icon } from "vant";
import { Component } from "vue-property-decorator";
import { Component, Prop } from "vue-property-decorator";
@Component({
components: {
......@@ -40,27 +40,17 @@ import { Component } from "vue-property-decorator";
}
})
export default class workInfo extends Vue {
obj: any = "";
query:any=""
sortKey(array: any, key: any) {
return array.sort(function(a: any, b: any) {
var x = a[key];
var y = b[key];
return x > y ? -1 : x < y ? 1 : 0;
});
}
created() {
let params = {
spId: this.$route.query.sp_id,
idNo: this.$route.query.id_no
};
this.$server.EmployeeService.getDispatchInfo(params).then(res => {
console.log('get base info ',res);
this.query=res
this.obj = this.sortKey(res.workData, "res.workData.workStartDate")[0];
});
}
@Prop({
type: Object,
required: true,
default: ""
})
obj!: string;
@Prop({
type: Object,
required: true,
default: ""
}) query!: 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