员工列表加上头像

This commit is contained in:
xielue 2023-07-05 11:37:32 +08:00
parent 8a4b002797
commit bcd894e924
3 changed files with 40 additions and 23 deletions

View File

@ -40,6 +40,10 @@
</div>
</template>
<template #column1="{ row }">
<slot name="column1" :row="row"></slot>
</template>
</vxe-grid>
</div>

View File

@ -1,5 +1,7 @@
<template>
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions">
</basic-page-edit>
</template>
<script>

View File

@ -1,5 +1,13 @@
<template>
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
<basic-page-list :desc="desc" :options="pageOptions">
<template v-slot:column1="{row}">
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;"/>
</template>
</basic-page-list>
</template>
<script>
@ -136,6 +144,10 @@ export default {
// =============================== Start ===============================
{ slots: { default: 'column1' },title: '员工头像', width: 250 },
{ field: 'name', sortable: true, title: '员工姓名', width: 250 }, //
{ field: 'code', sortable: true, title: '员工工号', width: 250 }, //
{ field: 'base_department', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, title: '部门', width: 250 },
@ -144,7 +156,6 @@ export default {
//{ field: 'password', sortable: true, title: '', width: 250 }, //
//{ field: 'salt', sortable: true, title: '', width: 250 }, //
{ field: 'nickname', sortable: true, title: '员工昵称', width: 250 }, //
// { field: 'avatar', sortable: true, title: '', width: 250 }, //
//{ field: 'openid', sortable: true, title: 'openid', width: 250 }, // openid
//{ field: 'unionid', sortable: true, title: 'unionid', width: 250 }, // unionid
//{ field: 'session_key', sortable: true, title: 'session_key', width: 250 }, // session_key