Browse Source

Merge branch 'master_hella' into hella_zhaoxuebing

hella_zhaoxuebing
赵雪冰 1 month ago
parent
commit
8c6610e1ee
  1. 15
      src/views/system/user/index.vue

15
src/views/system/user/index.vue

@ -28,6 +28,12 @@
<el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" <el-date-picker v-model="queryParams.createTime" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange"
start-placeholder="开始日期" end-placeholder="结束日期" class="!w-240px" /> start-placeholder="开始日期" end-placeholder="结束日期" class="!w-240px" />
</el-form-item> </el-form-item>
<el-form-item label="是否冻结" prop="frozenStatus">
<el-select v-model="queryParams.frozenStatus" placeholder="请选择">
<el-option label="是" value="TRUE"></el-option>
<el-option label="否" value="FALSE"></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-form-item label="用户昵称" prop="nickeName"> <el-form-item label="用户昵称" prop="nickeName">
<el-input v-model="queryParams.nickeName" placeholder="请输入用户昵称" clearable @keyup.enter="handleQuery" <el-input v-model="queryParams.nickeName" placeholder="请输入用户昵称" clearable @keyup.enter="handleQuery"
@ -62,6 +68,8 @@
<el-table-column label="上次密码修改时间" align="center" prop="passwordUpdateTime" width="180" :formatter="dateFormatter"/> <el-table-column label="上次密码修改时间" align="center" prop="passwordUpdateTime" width="180" :formatter="dateFormatter"/>
<el-table-column label="密码到期时间" align="center" prop="passWordEndTime" width="180" :formatter="dateFormatter"/> <el-table-column label="密码到期时间" align="center" prop="passWordEndTime" width="180" :formatter="dateFormatter"/>
<el-table-column label="冻结到期时间" align="center" prop="frozenEndTime" width="180" :formatter="dateFormatter"/> <el-table-column label="冻结到期时间" align="center" prop="frozenEndTime" width="180" :formatter="dateFormatter"/>
<el-table-column label="最后登录时间" align="center" prop="loginDate" width="180" :formatter="dateFormatter"/>
<el-table-column label="最后登录IP" align="center" prop="loginIp" width="120" />
<el-table-column label="状态" align="center" key="status"> <el-table-column label="状态" align="center" key="status">
<template #default="scope"> <template #default="scope">
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" <el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1"
@ -123,6 +131,7 @@ import DeptTree from './DeptTree.vue'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import { el } from 'element-plus/es/locale'
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'SystemUser' }) defineOptions({ name: 'SystemUser' })
@ -138,21 +147,21 @@ const queryParams = reactive({
username: undefined, username: undefined,
mobile: undefined, mobile: undefined,
status: undefined, status: undefined,
frozenStatus: undefined,
deptId: undefined, deptId: undefined,
createTime: [], createTime: [],
nickeName:undefined nickeName:undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await UserApi.getUserPage(queryParams) const data = await UserApi.getUserPage(queryParams)
for(let i=0;i<data.list.length; i++){ for(let i=0;i<data.list.length; i++){
if(data.list[i].frozenEndTime){ if(data.list[i].frozenStatus == "TRUE"){
data.list[i].frozenStatus = "是" data.list[i].frozenStatus = "是"
}else{ }else if(data.list[i].frozenStatus == "FALSE"){
data.list[i].frozenStatus = "否" data.list[i].frozenStatus = "否"
} }
} }

Loading…
Cancel
Save