员工列表加上头像

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>
@ -273,7 +277,7 @@ export default {
date[0]._d.setHours(0, 0, 0, 0);
date[1]._d.setHours(23, 59, 59, 59);
this.start_time = parseInt(date[0]._d.getTime() / 1000); //
this.end_time = parseInt( date[1]._d.getTime() / 1000); //
this.end_time = parseInt(date[1]._d.getTime() / 1000); //
} else { //
this.start_time = 0; //
this.end_time = 0; //
@ -359,8 +363,8 @@ export default {
width: this.$mk.getWindowSize().width * 0.9,
height: this.$mk.getWindowSize().height * 0.9,
dataId: 0,
callback:({success})=>{
if(success){
callback: ({ success }) => {
if (success) {
this.$refs.xGrid.commitProxy('query')
}
}
@ -459,7 +463,7 @@ export default {
if (editPage != null) {
editPage.beforeTabClose().then(() => {
this.$closePage(this.options.editPageUrl);
this.showPageEdit( row[this.options.keyName]); //
this.showPageEdit(row[this.options.keyName]); //
});
} else {
this.showPageEdit(row[this.options.keyName]); //
@ -474,24 +478,24 @@ export default {
},
showPageEdit(dataId){
showPageEdit(dataId) {
if( this.options.editPage){
if (this.options.editPage) {
this.$mk.dialog.open({
page: this.options.editPage,
title: this.options.editPageTitle,
pageOptions: {
},
width: this.$mk.getWindowSize().width * 0.9,
height: this.$mk.getWindowSize().height * 0.9,
dataId: dataId,
callback:({success})=>{
if(success){
this.$refs.xGrid.commitProxy('query')
}
page: this.options.editPage,
title: this.options.editPageTitle,
pageOptions: {
},
width: this.$mk.getWindowSize().width * 0.9,
height: this.$mk.getWindowSize().height * 0.9,
dataId: dataId,
callback: ({ success }) => {
if (success) {
this.$refs.xGrid.commitProxy('query')
}
});
}else{
}
});
} else {
this.$openPage(this.options.editPageUrl + dataId);
}

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