no message
This commit is contained in:
parent
f26c7ff6de
commit
fe65db5524
@ -1,12 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<xTable name="weixin"></xTable>
|
<xTable name="weixin"></xTable>
|
||||||
</el-main>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import xTable from '@/views/system/table'
|
import xTable from '@/views/table/1'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
xTable,
|
xTable,
|
||||||
@ -20,6 +17,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
||||||
|
169
src/components/xUser/index copy.vue
Normal file
169
src/components/xUser/index copy.vue
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
<template>
|
||||||
|
<el-container class="page-user">
|
||||||
|
<el-aside style="width: 176px;">
|
||||||
|
<el-container>
|
||||||
|
<el-header style="height: auto;display: block;">
|
||||||
|
<div class="user-info-top">
|
||||||
|
<x-upload
|
||||||
|
v-if="avatarupload"
|
||||||
|
v-model="user.avatar"
|
||||||
|
:data={token:token}
|
||||||
|
ref="uploader"
|
||||||
|
:api="avatarupload"
|
||||||
|
width="120"
|
||||||
|
height="120"
|
||||||
|
icon="el-icon-UploadFilled"
|
||||||
|
:onRemove="onRemove"
|
||||||
|
class="xuavatar"
|
||||||
|
round
|
||||||
|
:cropper="true"
|
||||||
|
title="上传头像"
|
||||||
|
:replaceupload="true"
|
||||||
|
:aspectRatio="1/1" />
|
||||||
|
<el-avatar :size="120" v-else :src="user.avatar"></el-avatar>
|
||||||
|
<h2 class="nickname">{{ user.nickname || user.username }}</h2>
|
||||||
|
<!-- <p><el-tag effect="dark" round size="large" disable-transitions>{{ user.role }}</el-tag></p> -->
|
||||||
|
<p>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button @click="xupdate('message', '发送消息', 'drawer')" type="info" size="small">
|
||||||
|
系统消息
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="xupdate('user', '编辑信息', 'fdsafdafafa')" type="info" color="#607d8b" size="small">
|
||||||
|
编辑资料
|
||||||
|
</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</p>
|
||||||
|
<div style="text-align: left; padding-top: 2px;">
|
||||||
|
<p v-if="user.uid"><el-button link size="small" v-copy="user.uid">UID:{{ user.uid }} </el-button> </p>
|
||||||
|
<p v-if="user.uin"><el-button link size="small" v-copy="user.uin">UIN:{{ user.uin }}</el-button> </p>
|
||||||
|
<p v-if="user.mobile"><el-button size="small" link v-copy="user.mobile">Mobile:{{ user.mobile }} </el-button> </p>
|
||||||
|
<p v-if="user.email"><el-button size="small" link v-copy="user.email">Email:{{ user.email }} </el-button> </p>
|
||||||
|
<!-- <p v-if="user.regdate"><el-button link v-copy="user.regdate">regdate: {{ user.regdate }} </el-button> </p> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<el-menu class="menu" :default-active="selectpage">
|
||||||
|
<el-menu-item-group v-for="(group,g) in menu" :key="g" :index="g" :title="group.title">
|
||||||
|
<el-menu-item v-for="(item,i) in group.list" :key="g+'-'+i" :index="g+'-'+i" @click="openPage(item)">
|
||||||
|
<el-icon v-if="item.icon"><component :is="item.icon"/></el-icon>
|
||||||
|
<template #title>
|
||||||
|
<span>{{item.title}}</span>
|
||||||
|
<el-badge :value="item.tag" :max="99" class="item"> </el-badge>
|
||||||
|
</template>
|
||||||
|
</el-menu-item>
|
||||||
|
</el-menu-item-group>
|
||||||
|
</el-menu>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-aside>
|
||||||
|
<el-main style="padding: 0px;">
|
||||||
|
<Suspense>
|
||||||
|
<template #default>
|
||||||
|
<component :data="user" :is="page"/>
|
||||||
|
</template>
|
||||||
|
<template #fallback>
|
||||||
|
<el-skeleton :rows="3" />
|
||||||
|
</template>
|
||||||
|
</Suspense>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<x-update v-if="updateKey" :name="updateKey" ref="xupdate" @success="handleSuccess" @closed="updateKey=''"></x-update>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.xuavatar {
|
||||||
|
margin: auto;
|
||||||
|
border-radius: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-user .user-info-top .nickname {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xuavatar .el-upload--picture-card {
|
||||||
|
--el-upload-picture-card-size:80px;
|
||||||
|
border-radius: 10px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.el-badge {
|
||||||
|
position: absolute; height: 18px; line-height: 18px; font-size: 12px; color: #fff; right: 8px; border-radius: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'userCenter',
|
||||||
|
components: {
|
||||||
|
account: defineAsyncComponent(() => import('./components/account')),
|
||||||
|
seting: defineAsyncComponent(() => import('./components/seting')),
|
||||||
|
pushSettings: defineAsyncComponent(() => import('./components/pushSettings')),
|
||||||
|
password: defineAsyncComponent(() => import('./components/password')),
|
||||||
|
space: defineAsyncComponent(() => import('./components/space')),
|
||||||
|
xtable: defineAsyncComponent(() => import('./components/table')),
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
modelValue: { type: Object, default: () => {} },
|
||||||
|
type: { type: String, default: "" }
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
user: {},
|
||||||
|
userData: this.modelValue,
|
||||||
|
token: '',
|
||||||
|
avatarupload: '',
|
||||||
|
updateKey: '',
|
||||||
|
page: "account",
|
||||||
|
selectpage: "0-0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loaddata();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
xupdate(key, name, type){
|
||||||
|
this.updateKey = key;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.xupdate.open().getComponentType(type).setConfig({
|
||||||
|
name:name,
|
||||||
|
remoteurl:'table/getUpdate?name='+key+'&token='+this.token
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loaddata(){
|
||||||
|
this.$http.post('user/index/get',{uid: this.userData.uid, type:this.type}).then((res) => {
|
||||||
|
if (res.code==200) {
|
||||||
|
Object.assign(this.$data, res.data);
|
||||||
|
|
||||||
|
if (res.data.menu) {
|
||||||
|
this.page = res.data.menu[0]['list'][0]['component']
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.$alert(res.message, "提示", {type: 'error'});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onRemove(){
|
||||||
|
this.$http.post('avatar/admin/delete',{token: this.token}).then((res) => {
|
||||||
|
if (res.code==200) {
|
||||||
|
this.userData.avatar = '';
|
||||||
|
this.$refs.uploader.clearFiles();
|
||||||
|
this.$message.success(res.message || "操作成功")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.$alert(res.message, "提示", {type: 'error'});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
openPage(item){
|
||||||
|
this.page = item.component
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,17 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-container class="page-user">
|
<el-container class="page-user">
|
||||||
<el-aside style="width: 176px;">
|
<el-header style="padding: 0; height: 150px;">
|
||||||
<el-container>
|
<div style="width: 100%;">
|
||||||
<el-header style="height: auto;display: block;">
|
<div class="acea-row user-row">
|
||||||
<div class="user-info-top">
|
<div class="avatar mr15">
|
||||||
|
<!-- <img :src="user.avatar"> -->
|
||||||
<x-upload
|
<x-upload
|
||||||
v-if="avatarupload"
|
v-if="avatarupload"
|
||||||
v-model="user.avatar"
|
v-model="user.avatar"
|
||||||
:data={token:token}
|
:data={token:token}
|
||||||
ref="uploader"
|
ref="uploader"
|
||||||
:api="avatarupload"
|
:api="avatarupload"
|
||||||
width="120"
|
width="60"
|
||||||
height="120"
|
height="60"
|
||||||
icon="el-icon-UploadFilled"
|
icon="el-icon-UploadFilled"
|
||||||
:onRemove="onRemove"
|
:onRemove="onRemove"
|
||||||
class="xuavatar"
|
class="xuavatar"
|
||||||
@ -20,76 +21,125 @@
|
|||||||
title="上传头像"
|
title="上传头像"
|
||||||
:replaceupload="true"
|
:replaceupload="true"
|
||||||
:aspectRatio="1/1" />
|
:aspectRatio="1/1" />
|
||||||
<el-avatar :size="120" v-else :src="user.avatar"></el-avatar>
|
<el-avatar :size="60" v-else :src="user.avatar"></el-avatar>
|
||||||
<h2 class="nickname">{{ user.nickname || user.username }}</h2>
|
</div>
|
||||||
<!-- <p><el-tag effect="dark" round size="large" disable-transitions>{{ user.role }}</el-tag></p> -->
|
<div class="user-row-text">
|
||||||
<p>
|
<div><span class="nickname">{{ user.nickname }}</span><i class="iconfont iconxiaochengxu"></i></div>
|
||||||
<el-button-group>
|
<div class="level">11111</div>
|
||||||
<el-button @click="xupdate('message', '发送消息', 'drawer')" type="info" size="small">
|
</div>
|
||||||
系统消息
|
<div class="user-row-action">
|
||||||
</el-button>
|
<el-button type="primary">编辑</el-button>
|
||||||
<el-button @click="xupdate('user', '编辑信息', 'fdsafdafafa')" type="info" color="#607d8b" size="small">
|
<el-button type="success">积分余额</el-button>
|
||||||
编辑资料
|
|
||||||
</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</p>
|
|
||||||
<div style="text-align: left; padding-top: 2px;">
|
|
||||||
<p v-if="user.uid"><el-button link size="small" v-copy="user.uid">UID:{{ user.uid }} </el-button> </p>
|
|
||||||
<p v-if="user.uin"><el-button link size="small" v-copy="user.uin">UIN:{{ user.uin }}</el-button> </p>
|
|
||||||
<p v-if="user.mobile"><el-button size="small" link v-copy="user.mobile">Mobile:{{ user.mobile }} </el-button> </p>
|
|
||||||
<p v-if="user.email"><el-button size="small" link v-copy="user.email">Email:{{ user.email }} </el-button> </p>
|
|
||||||
<!-- <p v-if="user.regdate"><el-button link v-copy="user.regdate">regdate: {{ user.regdate }} </el-button> </p> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
<el-row style="padding: 10px 25px;">
|
||||||
<el-main class="nopadding">
|
<el-col :span="4">
|
||||||
<el-menu class="menu" :default-active="selectpage">
|
<el-statistic title="Daily active users" :value="268500" />
|
||||||
<el-menu-item-group v-for="(group,g) in menu" :key="g" :index="g" :title="group.title">
|
</el-col>
|
||||||
<el-menu-item v-for="(item,i) in group.list" :key="g+'-'+i" :index="g+'-'+i" @click="openPage(item)">
|
<el-col :span="4">
|
||||||
<el-icon v-if="item.icon"><component :is="item.icon"/></el-icon>
|
<el-statistic :value="138">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>{{item.title}}</span>
|
<div style="display: inline-flex; align-items: center">
|
||||||
<el-badge :value="item.tag" :max="99" class="item"> </el-badge>
|
Ratio of men to women
|
||||||
|
<el-icon style="margin-left: 4px" :size="12">
|
||||||
|
<Male />
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
<template #suffix>/100</template>
|
||||||
</el-menu-item-group>
|
</el-statistic>
|
||||||
</el-menu>
|
</el-col>
|
||||||
</el-main>
|
<el-col :span="4">
|
||||||
</el-container>
|
<el-statistic title="Total Transactions" :value="172000" />
|
||||||
</el-aside>
|
</el-col>
|
||||||
<el-main style="padding: 0px;">
|
<el-col :span="4">
|
||||||
<Suspense>
|
<el-statistic title="Feedback number" :value="562">
|
||||||
<template #default>
|
<template #suffix>
|
||||||
<component :data="user" :is="page"/>
|
<el-icon style="vertical-align: -0.125em">
|
||||||
|
<ChatLineRound />
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
<template #fallback>
|
</el-statistic>
|
||||||
<el-skeleton :rows="3" />
|
</el-col>
|
||||||
</template>
|
</el-row>
|
||||||
</Suspense>
|
</div>
|
||||||
|
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="User" name="first">User</el-tab-pane>
|
||||||
|
<el-tab-pane label="Config" name="second">Config</el-tab-pane>
|
||||||
|
<el-tab-pane label="Role" name="third">Role</el-tab-pane>
|
||||||
|
<el-tab-pane label="Task" name="fourth">Task</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<x-update v-if="updateKey" :name="updateKey" ref="xupdate" @success="handleSuccess" @closed="updateKey = ''"></x-update>
|
<x-update v-if="updateKey" :name="updateKey" ref="xupdate" @success="handleSuccess" @closed="updateKey = ''"></x-update>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
|
||||||
.xuavatar {
|
|
||||||
margin: auto;
|
|
||||||
border-radius: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-user .user-info-top .nickname {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xuavatar .el-upload--picture-card {
|
|
||||||
--el-upload-picture-card-size:80px;
|
|
||||||
border-radius: 10px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.mr15 {
|
||||||
|
margin-right: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-row-action {
|
||||||
|
flex: 1;
|
||||||
|
align-self: center;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-row {
|
||||||
|
padding: 10px 20px 0;
|
||||||
|
width: 100%;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -moz-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-lines: multiple;
|
||||||
|
-moz-box-lines: multiple;
|
||||||
|
-o-box-lines: multiple;
|
||||||
|
-webkit-flex-wrap: wrap;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-row .nickname {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
color: rgba(0, 0, 0, .85);
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-row-text {
|
||||||
|
flex: 1;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-row .level {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.el-badge {
|
.el-badge {
|
||||||
position: absolute; height: 18px; line-height: 18px; font-size: 12px; color: #fff; right: 8px; border-radius: 18px;
|
position: absolute;
|
||||||
|
height: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
right: 8px;
|
||||||
|
border-radius: 18px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -116,6 +166,7 @@
|
|||||||
user: {},
|
user: {},
|
||||||
userData: this.modelValue,
|
userData: this.modelValue,
|
||||||
token: '',
|
token: '',
|
||||||
|
activeName: '',
|
||||||
avatarupload: '',
|
avatarupload: '',
|
||||||
updateKey: '',
|
updateKey: '',
|
||||||
page: "account",
|
page: "account",
|
||||||
|
@ -156,7 +156,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
deleteGroup() {
|
deleteGroup() {
|
||||||
this.$confirm('确认删除' + this.form.title + '用户组吗?', '提示', {
|
this.$confirm('相关绑定的用户会更换到默认默认用户组', '确认删除<' + this.form.title + '>用户组吗?', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '确定删除',
|
confirmButtonText: '确定删除',
|
||||||
confirmButtonClass: 'el-button--danger'
|
confirmButtonClass: 'el-button--danger'
|
||||||
|
Loading…
Reference in New Issue
Block a user