no message

This commit is contained in:
小陌 2023-08-17 18:58:46 +08:00
parent 522d101ac1
commit 74b08dc8f5

View File

@ -34,18 +34,22 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<xTable ref="table" @selection-change="selectionChange" stripe remoteSort remoteFilter> <xTable ref="table" @selection-change="selectionChange" :api="userlistApi" stripe remoteSort remoteFilter>
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="UID" prop="uid" width="80" sortable='custom'></el-table-column> <el-table-column label="UID" prop="uid" width="80" sortable='custom'></el-table-column>
<el-table-column label="头像" width="80" column-key="filterAvatar" :filters="[{text: '已上传', value: '1'}, {text: '未上传', value: '0'}]"> <el-table-column label="头像" width="200" column-key="filterAvatar" :filters="[{text: '已上传', value: '1'}, {text: '未上传', value: '0'}]">
<template #default="scope"> <template #default="scope">
<el-avatar :src="scope.row.avatar" size="small"></el-avatar> <div class="xavatar" @click="getUser(scope.row)">
<el-avatar :src="scope.row.avatar" size="small"></el-avatar>
<label class="input-mask">
<input class="el-input__inner" type="text" readonly :value="scope.row.nickname || scope.row.username">
</label>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="登录账号" prop="nickname" width="150" sortable='custom' column-key="filterUserName" :filters="[{text: '系统账号', value: '1'}, {text: '普通账号', value: '0'}]"></el-table-column>
<el-table-column label="姓名" prop="name" width="150" sortable='custom'></el-table-column>
<el-table-column label="所属角色" prop="groupName" width="200" sortable='custom'></el-table-column> <el-table-column label="所属角色" prop="groupName" width="200" sortable='custom'></el-table-column>
<el-table-column label="加入时间" prop="date" width="170" sortable='custom'></el-table-column> <el-table-column label="加入时间" prop="date" width="170" sortable='regdate'></el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="160"> <el-table-column label="操作" fixed="right" align="right" width="160">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
@ -64,6 +68,11 @@
</el-container> </el-container>
</el-container> </el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog> <save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog>
<el-drawer :with-header="false" append-to-body="true" v-if="visible" v-model="visible" :size="1000" :show-close="false" style="overflow: initial;" destroy-on-close @closed="visible=false;$emit('closed')">
<el-button type="danger" @click="visible=false" class="userdrawerclose" icon="el-icon-close"> </el-button>
<x-user v-model="copiedData"></x-user>
</el-drawer>
</template> </template>
<script> <script>
@ -82,8 +91,11 @@
save: false save: false
}, },
showGrouploading: false, showGrouploading: false,
visible: false,
groupFilterText: '', groupFilterText: '',
userlistApi: 'user/index/lists',
group: [], group: [],
copiedData: {},
selection: [], selection: [],
leftSides: [ leftSides: [
{ {
@ -197,6 +209,10 @@
this.getGroup() this.getGroup()
}, },
methods: { methods: {
getUser(o){
this.visible = true
this.copiedData = o;
},
// //
add(){ add(){
this.dialog.save = true this.dialog.save = true
@ -256,13 +272,8 @@
// //
async getGroup(){ async getGroup(){
this.showGrouploading = true; this.showGrouploading = true;
// var res = await this.$api.system.dept.list.get(); var res = await this.$http.get('user/index/typeList');
var res = {
data:[]
};
this.showGrouploading = false; this.showGrouploading = false;
var allNode ={id: '', label: '所有'}
res.data.unshift(allNode);
this.group = res.data; this.group = res.data;
}, },
// //
@ -296,5 +307,47 @@
} }
</script> </script>
<style> <style scoped>
.xavatar{
display: flex;align-items: center;cursor: pointer;
}
.userdrawerclose {
cursor: pointer;
width: 25px;
height: 25px;
border-radius: 50%;
font-size: 12px;
left: -10px;
top: 120px;
background-color: #9facc3;
background-repeat: no-repeat;
background-position: 50%;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
border-color: #fff;
padding: 6px;
font-weight: bolder;
}
.xavatar .input-mask {
margin-left: 28px;
z-indexz: 1;
position: absolute;
}
.xavatar .input-mask::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: auto;
cursor: pointer;
}
</style> </style>