|
|
@ -1,8 +1,8 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<PageWrapper dense |
|
|
|
<PageWrapper contentClass="flex" |
|
|
|
contentFullHeight |
|
|
|
contentFullHeight |
|
|
|
fixedHeight |
|
|
|
fixedHeight |
|
|
|
contentClass="flex" |
|
|
|
dense |
|
|
|
> |
|
|
|
> |
|
|
|
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect"/> |
|
|
|
<DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect"/> |
|
|
|
<BasicTable class="w-3/4 xl:w-5/5" |
|
|
|
<BasicTable class="w-3/4 xl:w-5/5" |
|
|
@ -50,12 +50,19 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
</BasicTable> |
|
|
|
|
|
|
|
<!--弹出窗体区域--> |
|
|
|
<UserModal @register="registerModal" @success="handleSuccess"/> |
|
|
|
<UserModal @register="registerModal" @success="handleSuccess"/> |
|
|
|
<ResetPwdModal @register="registerResetPwdModal" @success="handleSuccess"/> |
|
|
|
<ResetPwdModal @register="registerResetPwdModal" @success="handleSuccess"/> |
|
|
|
</PageWrapper> |
|
|
|
</PageWrapper> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
<script lang="ts"> |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 提供模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
|
|
|
|
|
|
|
* 采用vben-动态表格表单封装组件编写,不采用 setup 写法 |
|
|
|
|
|
|
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
|
|
|
|
|
|
|
* author entfrm开发团队-王翔 |
|
|
|
|
|
|
|
*/ |
|
|
|
import { defineComponent, reactive, toRaw } from 'vue'; |
|
|
|
import { defineComponent, reactive, toRaw } from 'vue'; |
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
|
|
import { listUser, delUser } from '/@/api/system/user'; |
|
|
|
import { listUser, delUser } from '/@/api/system/user'; |
|
|
@ -68,9 +75,6 @@ |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { convertDateRange } from "/@/utils/dateUtil"; |
|
|
|
import { convertDateRange } from "/@/utils/dateUtil"; |
|
|
|
|
|
|
|
|
|
|
|
const { createConfirm } = useMessage(); |
|
|
|
|
|
|
|
const { createMessage } = useMessage(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
export default defineComponent({ |
|
|
|
name: 'UserManagement', |
|
|
|
name: 'UserManagement', |
|
|
|
components: { |
|
|
|
components: { |
|
|
@ -82,6 +86,8 @@ |
|
|
|
ResetPwdModal |
|
|
|
ResetPwdModal |
|
|
|
}, |
|
|
|
}, |
|
|
|
setup() { |
|
|
|
setup() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
const state = reactive({ |
|
|
|
const state = reactive({ |
|
|
|
// 选中数组 |
|
|
|
// 选中数组 |
|
|
|
ids: [], |
|
|
|
ids: [], |
|
|
@ -92,7 +98,8 @@ |
|
|
|
// 搜索信息 |
|
|
|
// 搜索信息 |
|
|
|
searchInfo: {} as Recordable |
|
|
|
searchInfo: {} as Recordable |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
const { createConfirm } = useMessage(); |
|
|
|
|
|
|
|
const { createMessage } = useMessage(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
const [registerResetPwdModal, { openModal: openResetPwdModal }] = useModal(); |
|
|
|
const [registerResetPwdModal, { openModal: openResetPwdModal }] = useModal(); |
|
|
|
const [registerTable, { reload }] = useTable({ |
|
|
|
const [registerTable, { reload }] = useTable({ |
|
|
@ -124,10 +131,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
/** 处理多选框选中数据 */ |
|
|
|
/** 处理多选框选中数据 */ |
|
|
|
function handleSelectionChange(selection?: Recordable) { |
|
|
|
function handleSelectionChange(selection?: Recordable) { |
|
|
|
const rawRows = toRaw(selection?.rows) || []; |
|
|
|
const rowSelection = toRaw(selection?.keys); |
|
|
|
state.ids = rawRows.map(item => item.id); |
|
|
|
state.ids = rowSelection; |
|
|
|
state.single = rawRows.length != 1; |
|
|
|
state.single = rowSelection.length != 1; |
|
|
|
state.multiple = !rawRows.length; |
|
|
|
state.multiple = !rowSelection.length; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
|
|
|
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
|
|
|