用户列表新增抽屉效果详细信息

This commit is contained in:
RuoYi
2026-04-09 14:13:45 +08:00
parent 85447bbc62
commit a67ca21f15
5 changed files with 242 additions and 3 deletions

View File

@@ -46,7 +46,11 @@
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns.userId.visible" />
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns.userName.visible" :show-overflow-tooltip="true" />
<el-table-column label="用户名称" align="center" key="userName" v-if="columns.userName.visible" :show-overflow-tooltip="true">
<template slot-scope="scope">
<a class="link-type" style="cursor:pointer" @click="handleViewData(scope.row)">{{ scope.row.userName }}</a>
</template>
</el-table-column>
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns.nickName.visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns.deptName.visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns.phonenumber.visible" width="120" />
@@ -163,6 +167,8 @@
</div>
</el-dialog>
<!-- 用户详情抽屉 -->
<user-view-drawer ref="userViewRef" />
<!-- 用户导入对话框 -->
<excel-import-dialog ref="importUserRef" title="用户导入" action="/system/user/importData" template-action="/system/user/importTemplate" template-file-name="user_template" update-support-label="是否更新已经存在的用户数据" @success="getList" />
</div>
@@ -174,11 +180,12 @@ import Treeselect from "@riophae/vue-treeselect"
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import TreePanel from "@/components/TreePanel"
import ExcelImportDialog from "@/components/ExcelImportDialog"
import UserViewDrawer from "./view"
export default {
name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'],
components: { Treeselect, TreePanel, ExcelImportDialog },
components: { Treeselect, TreePanel, ExcelImportDialog, UserViewDrawer },
data() {
return {
// 遮罩层
@@ -456,6 +463,10 @@ export default {
...this.queryParams
}, `user_${new Date().getTime()}.xlsx`)
},
/** 详情按钮操作 */
handleViewData(row) {
this.$refs.userViewRef.open(row.userId)
},
/** 导入按钮操作 */
handleImport() {
this.$refs.importUserRef.open()