Commit 424adade by lishengfu

udpate

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