WorkInfo.vue
1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<template>
<div class="work-info">
<el-table v-loading="loading" :data="workList" style="width: 100%">
<el-table-column label="工作单位" prop="companyName" align="center" />
<el-table-column label="工作职位" prop="position" align="center" />
<el-table-column label="开始日期" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.beginDate) }}
</template>
</el-table-column>
<el-table-column label="结束日期" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.endDate) }}
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" align="center" :show-overflow-tooltip="true" />
</el-table>
</div>
</template>
<script>
import { getWorkRecord } from "@/api/resource/person";
export default {
name: "WorkInfo",
props: {
personId: {
type: String,
required: true
}
},
data() {
return {
loading: false,
workList: []
};
},
created() {
this.getWorkRecord();
},
methods: {
getWorkRecord() {
this.loading = true;
getWorkRecord(this.personId).then(response => {
this.workList = response.data;
this.loading = false;
}).catch(() => {
this.loading = false;
});
}
}
};
</script>