Commit e3a1f5b8 by lishengfu

update

parent b94db16f
...@@ -7166,8 +7166,7 @@ ...@@ -7166,8 +7166,7 @@
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true, "dev": true
"optional": true
}, },
"pify": { "pify": {
"version": "4.0.1", "version": "4.0.1",
......
<template>
<div>
<van-picker show-toolbar title="标题" :columns="columns" @change="updateCity" />
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Picker } from "vant";
import { Component } from "vue-property-decorator";
@Component({
components: {
[Picker.name]: Picker
}
})
export default class cityList extends Vue {
private data: any = "";
private province: any = ""; //省份
private city: any = []; //市份
private area: any = ""; //区,县
private columns: any = [
{
text: "",
children: []
}
];
created() {
this.$server.EmployeeService.getCityList({}).then(res => {
this.data = res;
//展示省份数据
Object.values(this.data).map((item: any) => {
if (item.parentId == 0) {
this.province = {
text: item.name,
id: item.id
};
this.columns.push(this.province);
}
});
//展示市级数据
this.columns.map((i: any) => {
Object.values(this.data).map((item: any) => {
let obj = {};
if (item.parentId != 0) {
obj = {
text: item.name,
id: item.id,
parentId: item.parentId
};
// console.log(this.city)
this.city.push(obj);
// this.columns.children[0].push(this.city);
}
});
});
// console.log(this.city)
});
}
updateCity(picker: any, values: any, index: any) {
console.log(values);
picker.setColumnValues(1, this.cityData(this.city, values[0]));
}
cityData(data: any, provinceId: any) {
data.map((item: any) => {
if (item.text == provinceId) {
console.log(provinceId);
this.city = item;
}
});
return this.city.map((res: any) => {
console.log(res)
// return { text: res.name, code: res.code };
});
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -15,12 +15,7 @@ ...@@ -15,12 +15,7 @@
@cancel="showStartDate = false" @cancel="showStartDate = false"
/> />
</van-popup> </van-popup>
<van-field <van-field v-model="endDate" label="结束时间" placeholder="请选择结束时间(非必填)" @click="showEndDate=true" />
v-model="endDate"
label="结束时间"
placeholder="请选择结束时间(非必填)"
@click="showEndDate=true"
/>
<van-popup v-model="showEndDate" position="bottom"> <van-popup v-model="showEndDate" position="bottom">
<van-datetime-picker <van-datetime-picker
v-model="currentDate1" v-model="currentDate1"
...@@ -47,6 +42,8 @@ import { formatDate } from "../../utils/public"; ...@@ -47,6 +42,8 @@ import { formatDate } from "../../utils/public";
} }
}) })
export default class eduExperience extends Vue { export default class eduExperience extends Vue {
startTime: any = "";
endTime: any = "";
private showStartDate: boolean = false; private showStartDate: boolean = false;
private showEndDate: boolean = false; private showEndDate: boolean = false;
private currentDate: Date = new Date(); private currentDate: Date = new Date();
...@@ -63,17 +60,15 @@ export default class eduExperience extends Vue { ...@@ -63,17 +60,15 @@ export default class eduExperience extends Vue {
default: "" default: ""
}) })
endDate!: any; endDate!: any;
@Watch("dateItem")
getVisible(newVal: any, oldVal: any) {
// this.dateItem = newVal;
}
onConfirmStartDate(time: any) { onConfirmStartDate(time: any) {
this.startDate = formatDate(time, "yyyy-MM-dd"); this.startTime = formatDate(time, "yyyy-MM-dd");
this.$emit("childStartDate", this.startTime); //把值传回给父元素
this.showStartDate = false; this.showStartDate = false;
} }
onConfirmEndDate(time: any) { onConfirmEndDate(time: any) {
this.endDate = formatDate(time, "yyyy-MM-dd"); this.endTime = formatDate(time, "yyyy-MM-dd");
this.$emit("childEndDate", this.endTime); //把值传回给父元素
this.showEndDate = false; this.showEndDate = false;
} }
} }
......
...@@ -4,38 +4,13 @@ ...@@ -4,38 +4,13 @@
<van-field v-model="workUnit" label="就职公司" placeholder="请填写公司名称" /> <van-field v-model="workUnit" label="就职公司" placeholder="请填写公司名称" />
<van-field v-model="position" label="从事职位" placeholder="请填写职位名称" /> <van-field v-model="position" label="从事职位" placeholder="请填写职位名称" />
<van-field v-model="place" label="工作地点" placeholder="请填写工作地点(非必填)" /> <van-field v-model="place" label="工作地点" placeholder="请填写工作地点(非必填)" />
<van-field <date-select
v-model="workStartDate" :startDate="workStartDate"
label="开始时间" :endDate="workEndDate"
placeholder="请选择开始时间(非必填)" @childStartDate="childStartDate"
@click="showStartDate=true" @childEndDate="childEndDate"
/> />
<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="请填写工作内容(非必填)" /> <van-field v-model="description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="saveWorkInfo">保存</van-button> <van-button round block type="info" native-type="submit" @click="saveWorkInfo">保存</van-button>
</div> </div>
...@@ -56,6 +31,7 @@ import { ...@@ -56,6 +31,7 @@ import {
} from "vant"; } from "vant";
import { Component, Prop, Watch } from "vue-property-decorator"; import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public"; import { formatDate } from "@/utils/public";
import dateSelect from "@/components/common/dateSelect.vue";
@Component({ @Component({
components: { components: {
...@@ -64,13 +40,14 @@ import { formatDate } from "@/utils/public"; ...@@ -64,13 +40,14 @@ import { formatDate } from "@/utils/public";
[Form.name]: Form, [Form.name]: Form,
[Picker.name]: Picker, [Picker.name]: Picker,
[Field.name]: Field, [Field.name]: Field,
[DatetimePicker.name]: DatetimePicker [DatetimePicker.name]: DatetimePicker,
dateSelect
} }
}) })
export default class eduExperience extends Vue { export default class eduExperience extends Vue {
private description: any = ""; private description: any = "";
private position: any = ""; private position: any = "";
private place:any=""//缺少工作地点字段 private place: any = ""; //缺少工作地点字段
private workEndDate: any = ""; private workEndDate: any = "";
private workStartDate: any = ""; private workStartDate: any = "";
private workUnit: any = ""; private workUnit: any = "";
...@@ -78,26 +55,14 @@ export default class eduExperience extends Vue { ...@@ -78,26 +55,14 @@ export default class eduExperience extends Vue {
private showEdu: boolean = false; private showEdu: boolean = false;
private showStartDate: boolean = false; private showStartDate: boolean = false;
private showEndDate: 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; childStartDate(item: any) {
this.workStartDate = item;
} }
onConfirmEndDate(time: any) { childEndDate(item: any) {
this.workEndDate = formatDate(time, "yyyy-MM-dd"); this.workEndDate = item;
this.showEndDate = false;
} }
//TODO 新增工作经历 //TODO 新增工作经历
saveWorkInfo() { saveWorkInfo() {
...@@ -109,13 +74,11 @@ export default class eduExperience extends Vue { ...@@ -109,13 +74,11 @@ export default class eduExperience extends Vue {
workStartDate: this.workStartDate, workStartDate: this.workStartDate,
workUnit: this.workUnit workUnit: this.workUnit
}; };
this.$server.EmployeeService.addWorkInfo(params).then(res=>{ this.$server.EmployeeService.addWorkInfo(params).then(res => {
Toast.success("保存成功") Toast.success("保存成功");
this.$emit('showPopup') this.$emit("showPopup");
this.$emit('addChildItem',params) this.$emit("addChildItem", params);
}).catch(error=>{ });
console.log(error)
})
} }
} }
</script> </script>
......
<template>
<div>
<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>
<date-select
:startDate="eduStartDate"
:endDate="eduEndDate"
@childStartDate="childStartDate"
@childEndDate="childEndDate"
/>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="addEduInfo">保存</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, Emit } 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 graduateInstitutions: any = "";
private major: any = "";
private education: any = "";
private eduEndDate: string = "";
private eduStartDate: string = "";
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private columns: any = [
"小学",
"初中",
"高中",
"大专",
"本科",
"硕士研究生",
"博士研究生",
"职高",
"中专",
"技校",
"其他"
];
//获取日期组件中的值
childStartDate(item: any) {
this.eduStartDate = item;
}
childEndDate(item: any) {
this.eduEndDate = item;
}
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 => {
Toast.success("保存成功")
this.$emit('popupShow')
this.$emit('addChildItem',params)
});
}
onConfirmEdu(value: any) {
this.education = value;
this.showEdu = false;
}
//TODO 新增工作经历
saveWorkInfo() {}
// startDate(item: any) {
// this.eduStartDate = item;
// }
// ednDate(item: any) {
// this.eduEndDate = item;
// }
}
</script>
\ No newline at end of file
...@@ -19,60 +19,8 @@ ...@@ -19,60 +19,8 @@
</i> 添加教育经历 </i> 添加教育经历
</div> </div>
</div> </div>
<van-popup v-model="show" position="right" :style="{ height: '100%',width: '90%' }"> <van-popup v-model="addShow" position="right" :style="{ height: '100%',width: '90%' }">
<van-form> <edu-add-experience @popupShow="popupShow" @addChildItem="addChildItem" />
<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> </van-popup>
<div class="box" v-show="false"> <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">
...@@ -104,12 +52,12 @@ import { ...@@ -104,12 +52,12 @@ import {
Form, Form,
Picker, Picker,
Field, Field,
Toast, Toast
DatetimePicker
} from "vant"; } from "vant";
import { Component, Watch } from "vue-property-decorator"; import { Component, Watch } 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"
@Component({ @Component({
components: { components: {
...@@ -120,38 +68,15 @@ import eduUpdateExperience from "./eduUpdateExperience.vue"; ...@@ -120,38 +68,15 @@ import eduUpdateExperience from "./eduUpdateExperience.vue";
[Form.name]: Form, [Form.name]: Form,
[Picker.name]: Picker, [Picker.name]: Picker,
[Field.name]: Field, [Field.name]: Field,
[DatetimePicker.name]: DatetimePicker, eduUpdateExperience,
eduUpdateExperience eduAddExperience
} }
}) })
export default class eduExperience extends Vue { export default class eduExperience extends Vue {
obj: object = {}; obj: any = "";
private show: boolean = false; private addShow: boolean = false;
private showEdu: boolean = false;
private showStartDate: boolean = false;
private showEndDate: boolean = false;
private childShow: 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 childItem: any = "";
private columns: any = [
"小学",
"初中",
"高中",
"大专",
"本科",
"硕士研究生",
"博士研究生",
"职高",
"中专",
"技校",
"其他"
];
created() { created() {
let params = { let params = {
...@@ -169,54 +94,37 @@ export default class eduExperience extends Vue { ...@@ -169,54 +94,37 @@ export default class eduExperience extends Vue {
this.obj = newVal; this.obj = newVal;
} }
editInfo(): void { editInfo(): void {
this.show = true; this.addShow = 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) { openEduItem(item: any) {
this.childShow = true; this.childShow = true;
this.childItem = item; this.childItem = item;
} }
//通过子组件来添加父组件中的列表
addChildItem(item: any) {
let addItem = [];
for (let i in this.obj) {
addItem.push(this.obj[i]);
}
addItem.push(item);
this.obj = addItem;
}
//删除对应的列表 //删除对应的列表
removeEduItem(itemId:any){ removeEduItem(item:any){
console.log(itemId) let removeCliedArr = [];
var arr=Object.entries(this.obj) for (let i in this.obj) {
arr=arr.filter(item=>item!==itemId) removeCliedArr.push(this.obj[i]);
console.log(arr) }
// arr.forEach(item=>{ let removeList = removeCliedArr;
// item.forEach(i=>{ removeCliedArr.forEach((i, index) => {
// console.log(i.id) if (i.id === item) {
// }) removeList.splice(index, 1);
// }) }
});
this.obj = removeList;
} }
popupShow(){ popupShow(){
this.addShow=false
this.childShow=false this.childShow=false
} }
} }
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
@cancel="showEdu = false" @cancel="showEdu = false"
/> />
</van-popup> </van-popup>
<date-select :startDate="childItem.eduStartDate" :endDate="childItem.eduEndDate" /> <date-select
:startDate.sync="childItem.eduStartDate"
:endDate.sync="childItem.eduEndDate"
@childStartDate="childStartDate"
@childEndDate="childEndDate"
/>
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button> <van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
</div> </div>
...@@ -31,18 +36,10 @@ ...@@ -31,18 +36,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from "vue"; import Vue from "vue";
import { import { Dialog, Button, Popup, Form, Picker, Field, Toast } from "vant";
Dialog,
Button,
Popup,
Form,
Picker,
Field,
Toast
} from "vant";
import { Component, Prop, Watch } from "vue-property-decorator"; import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public"; import { formatDate } from "@/utils/public";
import dateSelect from "@/components/common/dateSelect.vue" import dateSelect from "@/components/common/dateSelect.vue";
@Component({ @Component({
components: { components: {
...@@ -87,13 +84,12 @@ export default class eduExperience extends Vue { ...@@ -87,13 +84,12 @@ export default class eduExperience extends Vue {
this.childItem.education = value; this.childItem.education = value;
this.showEdu = false; this.showEdu = false;
} }
onConfirmStartDate(time: any) { //获取日期组件中的值
this.childItem.eduStartDate = formatDate(time, "yyyy-MM-dd"); childStartDate(item: any) {
this.showStartDate = false; this.childItem.eduStartDate = item;
} }
onConfirmEndDate(time: any) { childEndDate(item: any) {
this.childItem.eduEndDate = formatDate(time, "yyyy-MM-dd"); this.childItem.eduEndDate = item;
this.showEndDate = false;
} }
//修改 //修改
updateEduInfo() { updateEduInfo() {
...@@ -108,11 +104,8 @@ export default class eduExperience extends Vue { ...@@ -108,11 +104,8 @@ export default class eduExperience extends Vue {
this.$server.EmployeeService.updateEduExperience(params) this.$server.EmployeeService.updateEduExperience(params)
.then(res => { .then(res => {
Toast.success("修改成功"); Toast.success("修改成功");
this.$emit('popupShow') this.$emit("popupShow");
}) })
.catch(error => {
console.log(error);
});
} }
//删除 //删除
deleteEduInfo() { deleteEduInfo() {
...@@ -123,14 +116,15 @@ export default class eduExperience extends Vue { ...@@ -123,14 +116,15 @@ export default class eduExperience extends Vue {
message: "确认删除?" message: "确认删除?"
}) })
.then(() => { .then(() => {
this.$emit('removeEduItem',this.childItem.id) this.$server.EmployeeService.deleteEduExperience(params)
// this.$server.EmployeeService.deleteEduExperience(params) .then(res => {
// .then(res => { Toast.success("删除成功!");
// Toast.success("删除成功!"); this.$emit("removeEduItem", this.childItem.id);
// }) this.$emit("popupShow");
// .catch(error => { })
// console.log(error); .catch(error => {
// }); console.log(error);
});
}) })
.catch(() => { .catch(() => {
// on cancel // on cancel
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
<van-field v-model="childItem.workUnit" label="就职公司" placeholder="请填写公司名称" /> <van-field v-model="childItem.workUnit" label="就职公司" placeholder="请填写公司名称" />
<van-field v-model="childItem.position" label="从事职位" placeholder="请填写职位名称" /> <van-field v-model="childItem.position" label="从事职位" placeholder="请填写职位名称" />
<van-field v-model="childItem.place" label="工作地点" placeholder="请填写工作地点(非必填)" /> <van-field v-model="childItem.place" label="工作地点" placeholder="请填写工作地点(非必填)" />
<date-select :startDate="childItem.workStartDate" :endDate="childItem.workEndDate" /> <date-select
:startDate="childItem.workStartDate"
:endDate="childItem.workEndDate"
@childStartDate="childStartDate"
@childEndDate="childEndDate"
/>
<van-field v-model="childItem.description" label="工作内容" placeholder="请填写工作内容(非必填)" /> <van-field v-model="childItem.description" label="工作内容" placeholder="请填写工作内容(非必填)" />
<div style="margin: 16px;"> <div style="margin: 16px;">
<van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button> <van-button round block type="info" native-type="submit" @click="updateEduInfo">修改</van-button>
...@@ -29,7 +34,7 @@ import { ...@@ -29,7 +34,7 @@ import {
} from "vant"; } from "vant";
import { Component, Prop, Watch } from "vue-property-decorator"; import { Component, Prop, Watch } from "vue-property-decorator";
import { formatDate } from "@/utils/public"; import { formatDate } from "@/utils/public";
import dateSelect from "@/components/common/dateSelect.vue" import dateSelect from "@/components/common/dateSelect.vue";
@Component({ @Component({
components: { components: {
...@@ -46,8 +51,6 @@ export default class eduExperience extends Vue { ...@@ -46,8 +51,6 @@ export default class eduExperience extends Vue {
private showEdu: boolean = false; private showEdu: boolean = false;
private showStartDate: boolean = false; private showStartDate: boolean = false;
private showEndDate: boolean = false; private showEndDate: boolean = false;
private currentDate: Date = new Date();
private currentDate1: Date = new Date();
//获取父组件中的值 //获取父组件中的值
@Prop({ @Prop({
...@@ -59,14 +62,12 @@ export default class eduExperience extends Vue { ...@@ -59,14 +62,12 @@ export default class eduExperience extends Vue {
getVisible(newVal: any, oldVal: any) { getVisible(newVal: any, oldVal: any) {
this.childItem = newVal; this.childItem = newVal;
} }
//获取日期组件中的值
onConfirmStartDate(time: any) { childStartDate(item: any) {
this.childItem.workStartDate = formatDate(time, "yyyy-MM-dd"); this.childItem.workStartDate = item;
this.showStartDate = false;
} }
onConfirmEndDate(time: any) { childEndDate(item: any) {
this.childItem.workEndDate = formatDate(time, "yyyy-MM-dd"); this.childItem.workEndDate = item;
this.showEndDate = false;
} }
//修改 //修改
updateEduInfo() { updateEduInfo() {
...@@ -78,13 +79,9 @@ export default class eduExperience extends Vue { ...@@ -78,13 +79,9 @@ export default class eduExperience extends Vue {
workStartDate: this.childItem.workStartDate, workStartDate: this.childItem.workStartDate,
workUnit: this.childItem.workUnit workUnit: this.childItem.workUnit
}; };
this.$server.EmployeeService.updateWorkInfo(params) this.$server.EmployeeService.updateWorkInfo(params).then(res => {
.then(res => { Toast.success("修改成功!");
Toast.success("修改成功!") this.$emit("showPopup");
this.$emit('showPopup')
})
.catch(error => {
console.log(error);
}); });
} }
//删除 //删除
...@@ -94,20 +91,12 @@ export default class eduExperience extends Vue { ...@@ -94,20 +91,12 @@ export default class eduExperience extends Vue {
}; };
Dialog.confirm({ Dialog.confirm({
message: "确认删除?" message: "确认删除?"
}) }).then(() => {
.then(() => { this.$server.EmployeeService.deleteWorkInfo(params).then(res => {
this.$server.EmployeeService.deleteWorkInfo(params)
.then(res => {
this.$emit("removeChileItem", this.childItem.id); this.$emit("removeChileItem", this.childItem.id);
this.$emit('showPopup') this.$emit("showPopup");
Toast.success("删除成功") Toast.success("删除成功");
})
.catch(error => {
console.log(error);
}); });
})
.catch(() => {
// on cancel
}); });
} }
} }
......
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