|
|
|
@ -10,7 +10,8 @@ import {
|
|
|
|
|
deletePW,
|
|
|
|
|
deleteDeptManage,
|
|
|
|
|
queryRoleDateList,
|
|
|
|
|
deleteRole
|
|
|
|
|
deleteRole,
|
|
|
|
|
updateUserStatus
|
|
|
|
|
} from "@/api/system";
|
|
|
|
|
import { message } from "@/utils/message";
|
|
|
|
|
import accountDrawer from "./compontents/accountDrawer.vue";
|
|
|
|
@ -89,7 +90,7 @@ const getUserTableData = async () => {
|
|
|
|
|
const res: any = await getUserList({
|
|
|
|
|
userName: accountForm.userName,
|
|
|
|
|
deptId: accountForm.deptId,
|
|
|
|
|
roleId: accountForm.roleId,
|
|
|
|
|
roleName: accountForm.roleId,
|
|
|
|
|
pageNum: pagination.currentPage,
|
|
|
|
|
pageSize: pagination.pageSize
|
|
|
|
|
});
|
|
|
|
@ -130,7 +131,7 @@ const reset = () => {
|
|
|
|
|
accountForm.userName = "";
|
|
|
|
|
accountForm.roleId = "";
|
|
|
|
|
accountForm.deptId = "";
|
|
|
|
|
// search();
|
|
|
|
|
search();
|
|
|
|
|
};
|
|
|
|
|
const createFlag = ref(false);
|
|
|
|
|
const createDeptFlag = ref(false);
|
|
|
|
@ -299,10 +300,23 @@ const deleteName = (type: any) => {
|
|
|
|
|
const handleRolePermission = row => {
|
|
|
|
|
console.log(row);
|
|
|
|
|
};
|
|
|
|
|
//状态切换
|
|
|
|
|
const changeUserStatus = async row => {
|
|
|
|
|
console.log(row);
|
|
|
|
|
const res: any = await updateUserStatus({
|
|
|
|
|
id: row.id,
|
|
|
|
|
status: row.status ? 0 : 1
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
message("修改成功", { type: "success" });
|
|
|
|
|
getUserTableData();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getDeptData();
|
|
|
|
|
getUserTableData();
|
|
|
|
|
getRoleTableData();
|
|
|
|
|
// getUserTableData();
|
|
|
|
|
// getRoleTableData();
|
|
|
|
|
search();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@ -379,7 +393,10 @@ onMounted(() => {
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #status="{ row }">
|
|
|
|
|
<el-switch v-model="row.status" />
|
|
|
|
|
<el-switch
|
|
|
|
|
:model-value="row.status === 0 ? false : true"
|
|
|
|
|
@click="changeUserStatus(row)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #operation="{ row }">
|
|
|
|
|
<el-button link type="primary" @click="handleView(row, 'view')">
|
|
|
|
|