1. 工作人员账号添加
2. 优化打包
3. 日志
4. 用户头像列表
This commit is contained in:
Zy
2026-10-21 08:59:48 +08:00
parent 5584ef1954
commit eeb842d278
36 changed files with 1514 additions and 602 deletions

View File

@@ -26,17 +26,17 @@
</el-select>
</el-form-item>
<el-form-item label="所在地区" prop="userName">
<el-select
v-model="queryParams.ipaddr"
:empty-values="[null, undefined]"
:value-on-clear="null"
clearable
<el-cascader
v-model="ipaddr"
size="large"
style="width: 190px;"
>
<el-option label="在线" value="0"></el-option>
<el-option label="离线" value="1"></el-option>
</el-select>
:clearable="true"
:options="Administrative"
:props="{
label:'name',
value:'name'
}"
@change="handelChangeQuery"
/>
</el-form-item>
<el-form-item label="注册时间段" prop="createTime">
@@ -97,9 +97,9 @@
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="手机号" prop="phonenumber">
<el-table-column :show-overflow-tooltip="true" align="center" label="手机号" prop="phonenumber" width="120">
<template #default="scope">
<span>{{ hiddenPhone(scope.row.phonenumber) }}</span>
<span>{{ scope.row.phonenumber }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="性别" prop="gender">
@@ -109,35 +109,48 @@
<span v-else style="color: #9CA3AF">未填写</span>
</template>
</el-table-column>
<el-table-column align="center" label="生日" prop="birthday"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="所在地区" prop="deptName"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="绑定设备量" prop="deviceCount"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="注册时间" prop="createTime"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="最后登录时间" prop="loginDate"/>
<el-table-column align="center" label="生日" prop="birthday" width="120"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="所在地区" min-width="180px"
prop="deptName">
<template #default="scope">
<span>{{ scope.row.province }}</span>
<span v-if="scope.row.province && scope.row.city">/</span>
<span>{{ scope.row.city }}</span>
<span v-if="scope.row.district && scope.row.city">/</span>
<span>{{ scope.row.district }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" label="绑定设备量" prop="deviceCount"
width="100"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="注册时间" min-width="120"
prop="createTime"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="最后登录时间" min-width="120"
prop="loginDate"/>
<el-table-column :show-overflow-tooltip="true" align="center" label="账号状态" prop="status">
<template #default="scope">
<el-tag v-if="scope.row.status === '0'" type="success">正常</el-tag>
<el-tag v-else type="danger">异常</el-tag>
<el-tag v-else type="danger">停用</el-tag>
</template>
</el-table-column>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" min-width="250">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作"
min-width="380">
<template #default="scope">
<el-button
v-hasPermi="['monitor:online:forceLogout']"
v-hasPermi="['customer:user:query']"
plain
type="primary"
@click="handleMain(scope.row)"
>查看详情
</el-button>
<el-button
v-hasPermi="['monitor:online:forceLogout']"
v-hasPermiAnd="['customer:user:edit','customer:user:query']"
plain
type="info"
@click="handleEdit(scope.row)"
>编辑
</el-button>
<el-button
v-hasPermi="['monitor:online:forceLogout']"
v-hasPermi="['customer:user:resetPwd']"
plain
type="info"
@click="handleReboot(scope.row)"
@@ -145,7 +158,7 @@
</el-button>
<el-button
v-if="scope.row.status === '0'"
v-hasPermi="['monitor:online:forceLogout']"
v-hasPermi="['customer:user:edit']"
plain
type="warning"
@click="changeStatus(scope.row, '1')"
@@ -153,7 +166,7 @@
</el-button>
<el-button
v-if="scope.row.status === '1'"
v-hasPermi="['monitor:online:forceLogout']"
v-hasPermi="['customer:user:edit']"
plain
type="success"
@click="changeStatus(scope.row, '0')"
@@ -167,6 +180,7 @@
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</el-card>
</div>
@@ -180,8 +194,8 @@ import pageCrumb from "@/components/Pagecrumb/index.vue";
import modal from "@/plugins/modal";
import {download as requestDownload} from '@/utils/request';
import {useTableSelection} from "@/hooks/table/useTableSelection";
import {PostVO} from "@/api/system/post/types";
import defaultImag from '@/assets/images/avatar.png';
import Administrative from '@/data/Administrative.json';
const router = useRouter();
@@ -208,10 +222,19 @@ function handleChangeTime(data) {
const queryParams = ref<UserQuery>({
pageNum: 1,
pageSize: 10,
ipaddr: '',
userName: ''
});
const ipaddr = ref([])
function handelChangeQuery(code: string[]) {
queryParams.value.province = code[0] || undefined
queryParams.value.city = code[1] || undefined
queryParams.value.district = code[2] || undefined
getList()
}
/** 查询登录日志列表 */
const getList = async () => {
loading.value = true;
@@ -231,6 +254,10 @@ const resetQuery = () => {
createTime.value = []
queryParams.value.beginTime = undefined
queryParams.value.endTime = undefined
ipaddr.value = []
queryParams.value.province = undefined
queryParams.value.city = undefined
queryParams.value.district = undefined
handleQuery();
};
@@ -279,6 +306,10 @@ const handleExport = () => {
async function selectDisableUser() {
if (ids.value?.length === 0) {
modal.msgWarning('请选择要禁用的用户')
return
}
await modal.confirm('禁用账号会立即退出该用户的 APP 登录状态,确定要禁用这些选择的用户吗?')
const userIds = ids.value || [];
batchDisableUsers(userIds as string[]).then(() => {