This commit is contained in:
张良(004796)
2024-04-19 16:35:43 +08:00
parent d6f859297d
commit 30c315b10d
6 changed files with 599 additions and 97 deletions

View File

@@ -66,6 +66,11 @@
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户类型" align="center" prop="userType" >
<template v-slot="scope">
<cai-dict-tag :options="appUserTypeList" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="编号" align="center" prop="usercode" />
<el-table-column label="昵称" align="center" prop="nickname" />
<el-table-column label="手机号" align="center" prop="mobile" />
@@ -106,7 +111,7 @@
<el-button
size="mini"
type="text"
@click="handleDelete(scope.row)"
@click="handleInfo(scope.row)"
>详情</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
@@ -135,6 +140,8 @@
/>
<bind-invite-dialog v-if="bindInviteDialogVisible" ref="bindInviteDialog" @refreshDataList="getList" />
<user-info-dialog v-if="userInfoDialogVisible" ref="userInfoDialog" />
<add-user-dialog v-if="addUserDialogVisible" ref="addUserDialog" />
</div>
</template>
@@ -150,16 +157,20 @@ import {
userResetNickname,
userLock, userUnlock
} from '@/api/xq/user'
import { genderList, userStatusList } from '@/constant/statusMap'
import { appUserTypeList, genderList, userStatusList } from '@/constant/statusMap'
import BindInviteDialog from '@/views/xq/user/bind-invite-dialog.vue'
import UserInfoDialog from '@/views/xq/user/user-info-dialog.vue'
import AddUserDialog from '@/views/xq/user/add-user-dialog.vue'
export default {
name: "User",
components: {BindInviteDialog},
components: { BindInviteDialog,UserInfoDialog,AddUserDialog},
data() {
return {
userStatusList,genderList,
userStatusList,genderList,appUserTypeList,
bindInviteDialogVisible: false,
userInfoDialogVisible: false,
addUserDialogVisible: false,
// 遮罩层
loading: true,
// 选中数组
@@ -216,9 +227,20 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.addUserDialogVisible = true
this.$nextTick(() => {
this.$refs.addUserDialog.init()
})
},
/** 修改按钮操作 */
handleUpdate(row) {
},
handleInfo(row) {
this.userInfoDialogVisible = true
this.$nextTick(() => {
this.$refs.userInfoDialog.init(row.id)
})
},
handleUserResetAvatar(row){
this.$modal.confirm('是否确认重置用户"' + row.nickname + '"的头像?').then(() => {