Merge branch 'dev' of gitee.com:yudaocode/yudao-ui-admin-vue3 into dev
Signed-off-by: puhui999 <puhui999@163.com>
This commit is contained in:
commit
60daa54d3b
6
src/types/auto-components.d.ts
vendored
6
src/types/auto-components.d.ts
vendored
@ -52,13 +52,16 @@ declare module '@vue/runtime-core' {
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElLink: typeof import('element-plus/es')['ElLink']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
@ -69,6 +72,9 @@ declare module '@vue/runtime-core' {
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
|
@ -69,7 +69,6 @@ import * as TenantPackageApi from '@/api/system/tenantPackage'
|
||||
import * as MenuApi from '@/api/system/menu'
|
||||
import { ElTree } from 'element-plus'
|
||||
import { handleTree } from '@/utils/tree'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@ -133,8 +132,8 @@ const submitForm = async () => {
|
||||
try {
|
||||
const data = formData.value as unknown as TenantPackageApi.TenantPackageVO
|
||||
data.menuIds = [
|
||||
...(treeRef.value!.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
||||
...(treeRef.value!.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
||||
...(treeRef.value.getCheckedKeys(false) as unknown as Array<number>), // 获得当前选中节点
|
||||
...(treeRef.value.getHalfCheckedKeys() as unknown as Array<number>) // 获得半选中的父节点
|
||||
]
|
||||
if (formType.value === 'create') {
|
||||
await TenantPackageApi.createTenantPackage(data)
|
||||
@ -168,17 +167,19 @@ const resetForm = () => {
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
// 全选/全不选
|
||||
/** 全选/全不选 */
|
||||
const handleCheckedTreeNodeAll = () => {
|
||||
treeRef.value!.setCheckedNodes(treeNodeAll.value ? menuOptions.value : [])
|
||||
treeRef.value.setCheckedNodes(treeNodeAll.value ? menuOptions.value : [])
|
||||
}
|
||||
|
||||
// 全部(展开/折叠)TODO:for循环全部展开和折叠树组件数据
|
||||
/** 展开/折叠全部 */
|
||||
const handleCheckedTreeExpand = () => {
|
||||
const nodes = treeRef.value?.store.nodesMap
|
||||
for (let node in nodes) {
|
||||
if (nodes[node].expanded === menuExpand.value) continue
|
||||
nodes[node].expanded = !nodes[node].expanded
|
||||
if (nodes[node].expanded === menuExpand.value) {
|
||||
continue
|
||||
}
|
||||
nodes[node].expanded = menuExpand.value
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<content-wrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<content-wrap class="h-1/1">
|
||||
<UserDeptTree @node-click="handleDeptNodeClick" />
|
||||
</content-wrap>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<content-wrap>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
@ -43,9 +44,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="dict.value as number"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value as number"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -61,44 +62,32 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"
|
||||
><Icon icon="ep:search" />搜索</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleQuery"><Icon icon="ep:search" />搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" />重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb-8px">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:create']"
|
||||
><Icon icon="ep:plus" />新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain @click="handleAdd" v-hasPermi="['system:user:create']">
|
||||
<Icon icon="ep:plus" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
size="small"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:user:import']"
|
||||
><Icon icon="ep:upload" />导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<Icon icon="ep:upload" /> 导入
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['system:user:export']"
|
||||
><Icon icon="ep:download" />导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<Icon icon="ep:download" />导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</content-wrap>
|
||||
<content-wrap>
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column
|
||||
label="用户编号"
|
||||
@ -216,16 +205,16 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</content-wrap>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</content-wrap>
|
||||
|
||||
<!-- 添加或修改用户对话框 -->
|
||||
<UserForm ref="userFormRef" @success="getList" />
|
||||
<!-- 用户导入对话框 -->
|
||||
<UserImportForm ref="userImportFormRef" @success="getList" />
|
||||
<!-- 分配角色 -->
|
||||
<UserAssignRoleForm ref="userAssignRoleFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="User">
|
||||
@ -280,7 +269,8 @@ const columns = ref([
|
||||
{ key: 5, label: `状态`, visible: true },
|
||||
{ key: 6, label: `创建时间`, visible: true }
|
||||
])
|
||||
/* 查询列表 */
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = () => {
|
||||
loading.value = true
|
||||
getUserPageApi(queryParams).then((response) => {
|
||||
@ -289,6 +279,7 @@ const getList = () => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
|
Loading…
Reference in New Issue
Block a user