修改用户
This commit is contained in:
parent
3936af6394
commit
fcfaee7f43
@ -138,13 +138,11 @@ export function userDelete(userId) {
|
||||
/**
|
||||
* @description: 批量删除用户
|
||||
*/
|
||||
export function userBatchDelete(params:any) {
|
||||
export function userBatchDelete(data:any) {
|
||||
return http.request({
|
||||
url: '/user/batchDelete',
|
||||
method: 'DELETE',
|
||||
params:{
|
||||
...params
|
||||
}
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@
|
||||
:type="item.type"
|
||||
:width="item.width"
|
||||
/>
|
||||
<el-table-column v-else :prop="item.prop" v-bind="item">
|
||||
<el-table-column v-else :prop="item.prop" v-bind="item" show-overflow-tooltip>
|
||||
<template #default="scope" v-if="item.render">
|
||||
<Render :column="item" :row="scope.row" :render="item.render" :index="scope.$index" />
|
||||
</template>
|
||||
|
@ -75,11 +75,10 @@
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import { deptAdd,deptUpdate,getDeptList,getDeptDetail } from '@/api/system/dept';
|
||||
import {onMounted, reactive, readonly, ref, shallowRef} from "vue";
|
||||
import {onMounted, reactive, ref, shallowRef} from "vue";
|
||||
import {getModulesKey} from "@/router";
|
||||
import {arrayToTree, treeToArray,message,buildTree} from "@/utils/auth";
|
||||
import {message,buildTree} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
import IconPicker from "@/components/icon/picker.vue";
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
|
@ -58,10 +58,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="menu">
|
||||
import {defineAsyncComponent, nextTick, onMounted, readonly, ref, shallowRef,onActivated} from "vue";
|
||||
import {defineAsyncComponent, nextTick, onMounted, ref, shallowRef} from "vue";
|
||||
import {getDeptList,deptDelete} from "@/api/system/dept";
|
||||
import type {ElTable} from "element-plus";
|
||||
import icon from "@/components/icon/index.vue";
|
||||
const tableRef = shallowRef<InstanceType<typeof ElTable>>();
|
||||
import {confirm, message,buildTree} from "@/utils/auth";
|
||||
|
||||
|
@ -173,7 +173,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type {FormInstance} from "element-plus";
|
||||
import { menuAdd,menuUpdate,getMenuList,getMenuDetail } from '@/api/system/menu';
|
||||
import {onMounted, reactive, readonly, ref, shallowRef} from "vue";
|
||||
import {onMounted, reactive, ref, shallowRef} from "vue";
|
||||
import {getModulesKey} from "@/router";
|
||||
import {arrayToTree, treeToArray,message,buildTree} from "@/utils/auth";
|
||||
import {useLockFn} from "@/utils/useLockFn";
|
||||
|
@ -6,9 +6,13 @@ export const columns = [
|
||||
type: 'selection',
|
||||
},
|
||||
{
|
||||
label: '用户名',
|
||||
label: '登录账号',
|
||||
prop: 'username',
|
||||
},
|
||||
{
|
||||
label: '用户姓名',
|
||||
prop: 'realname',
|
||||
},
|
||||
{
|
||||
label: '头像',
|
||||
prop: 'avatar',
|
||||
@ -22,14 +26,6 @@ export const columns = [
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
label: '手机号',
|
||||
prop: 'mobile',
|
||||
},
|
||||
{
|
||||
label: '邮箱',
|
||||
prop: 'email',
|
||||
},
|
||||
{
|
||||
label: '性别',
|
||||
prop: 'gender',
|
||||
@ -46,7 +42,12 @@ export const columns = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '角色',
|
||||
label: '手机号',
|
||||
prop: 'mobile',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
label: '用户角色',
|
||||
prop: 'role',
|
||||
render(record) {
|
||||
return h(
|
||||
@ -58,6 +59,19 @@ export const columns = [
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '职级',
|
||||
prop: 'levelName',
|
||||
},
|
||||
{
|
||||
label: '岗位',
|
||||
prop: 'positionName',
|
||||
},
|
||||
{
|
||||
label: '部门',
|
||||
prop: 'deptName',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
@ -73,6 +87,10 @@ export const columns = [
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '创建人',
|
||||
prop: 'createUser',
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createTime',
|
||||
|
@ -44,6 +44,7 @@
|
||||
:on-error="onError"
|
||||
:on-success="onSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:show-file-list="false"
|
||||
:limit="1"
|
||||
>
|
||||
<el-button type="danger">
|
||||
@ -82,7 +83,7 @@
|
||||
import { ColProps, ElMessage, UploadInstance } from 'element-plus';
|
||||
import { BasicTable, TableAction } from '@/components/Table';
|
||||
import { BasicForm, useForm } from '@/components/Form/index';
|
||||
import { getUserList,userDelete,userBatchDelete,userExport } from '@/api/system/user';
|
||||
import { getUserList,userDelete,userBatchDelete,userExport,resetPwd } from '@/api/system/user';
|
||||
import {message,confirm,loading, closeLoading} from "@/utils/auth";
|
||||
import { columns } from './columns';
|
||||
import { schemas } from './querySchemas';
|
||||
@ -173,9 +174,9 @@ const uploadHeaders = reactive({
|
||||
editVisible.value=true
|
||||
}
|
||||
async function handleResetPassWord(record: Recordable) {
|
||||
userId.value=record.row.id
|
||||
await nextTick();
|
||||
editVisible.value=true
|
||||
await confirm('确定重置密码?');
|
||||
await resetPwd({userId:record.row.id})
|
||||
message("重置成功");
|
||||
}
|
||||
|
||||
|
||||
@ -183,10 +184,9 @@ const uploadHeaders = reactive({
|
||||
let ids = ''
|
||||
if(!record){
|
||||
ids = selectionData.value.map(({id}) => id);
|
||||
console.log(ids)
|
||||
}
|
||||
await confirm('确定要删除?');
|
||||
record? await userDelete(record.row.id):await userBatchDelete({integers:ids});
|
||||
record? await userDelete(record.row.id):await userBatchDelete(ids);
|
||||
message("删除成功");
|
||||
reloadTable()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user