| | |
| | | <div class="system-user-container"> |
| | | <el-card shadow="hover"> |
| | | <div class="system-user-search mb15"> |
| | | <el-input size="default" v-model.trim="userTableData.listQuery.roleId" placeholder="请输入用户名" style="max-width: 180px"> </el-input> |
| | | <!-- <el-input size="default" v-model.trim="userTableData.listQuery.roleId" placeholder="请输入用户名" style="max-width: 180px"> </el-input>--> |
| | | <el-button size="default" type="primary" class="ml10" @click="initUserTableData"> |
| | | <el-icon> |
| | | <ele-Search /> |
| | |
| | | <el-table-column prop="role.name" label="关联角色" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="department.name" label="部门" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="phone" label="手机号" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="email" label="邮箱" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="status" label="用户状态" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag type="success" v-if="scope.row.status">启用</el-tag> |
| | | <el-tag type="info" v-else>禁用</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <!-- <el-table-column prop="email" label="邮箱" show-overflow-tooltip></el-table-column>--> |
| | | <!-- <el-table-column prop="status" label="用户状态" show-overflow-tooltip>--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-tag type="success" v-if="scope.row.status">启用</el-tag>--> |
| | | <!-- <el-tag type="info" v-else>禁用</el-tag>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>--> |
| | | <el-table-column label="操作" width="100"> |
| | | <template #default="scope"> |
| | | <el-button :disabled="scope.row.userName === 'admin'" size="small" text type="primary" @click="onOpenUserDialog('修改', scope.row)">修改</el-button> |
| | |
| | | // 初始化表格数据 |
| | | const initUserTableData = async () => { |
| | | let res = await userApi().getUserList(state.userTableData.listQuery); |
| | | if (res.data.code === '200') { |
| | | if (res.data.code === 100) { |
| | | state.userTableData.data = res.data.data; |
| | | state.userTableData.total = res.data.total; |
| | | } else { |
| | |
| | | |
| | | const getRoleData = async () => { |
| | | let res = await useRoleApi().getRoleList(); |
| | | if (res.data.code === '200') { |
| | | if (res.data.code === 100) { |
| | | state.roleList = res.data.data; |
| | | } else { |
| | | ElMessage({ |