chore: 默认值
This commit is contained in:
parent
da4c612481
commit
60ae7cc0cc
@ -1,6 +1,6 @@
|
|||||||
import type { Dept } from './model';
|
import type { Dept } from './model';
|
||||||
|
|
||||||
import type { ID, PageQuery } from '#/api/common';
|
import type { ID } from '#/api/common';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ enum Api {
|
|||||||
root = '/system/dept',
|
root = '/system/dept',
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deptList(params?: PageQuery) {
|
export function deptList(params?: any) {
|
||||||
return requestClient.get<Dept[]>(Api.deptList, { params });
|
return requestClient.get<Dept[]>(Api.deptList, { params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { Menu, MenuOption, MenuResp } from './model';
|
import type { Menu, MenuOption, MenuResp } from './model';
|
||||||
|
|
||||||
import type { ID, IDS, PageQuery } from '#/api/common';
|
import type { ID, IDS } from '#/api/common';
|
||||||
|
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ enum Api {
|
|||||||
tenantPackageMenuTreeselect = '/system/menu/tenantPackageMenuTreeselect',
|
tenantPackageMenuTreeselect = '/system/menu/tenantPackageMenuTreeselect',
|
||||||
}
|
}
|
||||||
|
|
||||||
export function menuList(params?: PageQuery) {
|
export function menuList(params?: any) {
|
||||||
return requestClient.get<Menu[]>(Api.menuList, { params });
|
return requestClient.get<Menu[]>(Api.menuList, { params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
return await loginInfoList({
|
return await loginInfoList({
|
||||||
pageNum: page.currentPage,
|
pageNum: page.currentPage,
|
||||||
pageSize: page.pageSize,
|
pageSize: page.pageSize,
|
||||||
@ -147,7 +147,7 @@ async function handleUnlock() {
|
|||||||
:disabled="!checked"
|
:disabled="!checked"
|
||||||
danger
|
danger
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['monitor:logininfor:delete']"
|
v-access:code="['monitor:logininfor:remove']"
|
||||||
@click="handleMultiDelete"
|
@click="handleMultiDelete"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
@ -158,7 +158,6 @@ async function handleUnlock() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
|
||||||
<a-button size="small" type="link" @click.stop="handlePreview(row)">
|
<a-button size="small" type="link" @click.stop="handlePreview(row)">
|
||||||
{{ $t('pages.common.info') }}
|
{{ $t('pages.common.info') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@ -167,11 +166,16 @@ async function handleUnlock() {
|
|||||||
title="确认删除?"
|
title="确认删除?"
|
||||||
@confirm="() => handleDelete(row)"
|
@confirm="() => handleDelete(row)"
|
||||||
>
|
>
|
||||||
<a-button danger size="small" type="link" @click.stop="">
|
<a-button
|
||||||
|
danger
|
||||||
|
size="small"
|
||||||
|
type="link"
|
||||||
|
v-access:code="['monitor:logininfor:remove']"
|
||||||
|
@click.stop=""
|
||||||
|
>
|
||||||
删除
|
删除
|
||||||
</a-button>
|
</a-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Space>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<LoginInfoModal />
|
<LoginInfoModal />
|
||||||
|
@ -45,7 +45,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
return await clientList({
|
return await clientList({
|
||||||
pageNum: page.currentPage,
|
pageNum: page.currentPage,
|
||||||
pageSize: page.pageSize,
|
pageSize: page.pageSize,
|
||||||
|
@ -43,7 +43,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
@ -105,7 +105,7 @@ async function handleEdit(record: Recordable<any>) {
|
|||||||
|
|
||||||
async function handleDelete(row: Recordable<any>) {
|
async function handleDelete(row: Recordable<any>) {
|
||||||
await configRemove(row.configId);
|
await configRemove(row.configId);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
@ -117,14 +117,14 @@ function handleMultiDelete() {
|
|||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await configRemove(ids);
|
await configRemove(ids);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleRefreshCache() {
|
async function handleRefreshCache() {
|
||||||
await configRefreshCache();
|
await configRefreshCache();
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -187,6 +187,6 @@ async function handleRefreshCache() {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<ConfigModal @reload="tableApi.reload()" />
|
<ConfigModal @reload="tableApi.query()" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@ -117,13 +117,18 @@ export const drawerSchema: FormSchemaGetter = () => [
|
|||||||
rules: z
|
rules: z
|
||||||
.string()
|
.string()
|
||||||
.regex(/^1[3,4578]\d{9}$/, { message: '请输入正确的手机号' })
|
.regex(/^1[3,4578]\d{9}$/, { message: '请输入正确的手机号' })
|
||||||
.optional(),
|
.optional()
|
||||||
|
.or(z.literal('')),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
fieldName: 'email',
|
fieldName: 'email',
|
||||||
label: '邮箱',
|
label: '邮箱',
|
||||||
rules: z.string().email({ message: '请输入正确的邮箱' }).optional(),
|
rules: z
|
||||||
|
.string()
|
||||||
|
.email({ message: '请输入正确的邮箱' })
|
||||||
|
.optional()
|
||||||
|
.or(z.literal('')),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
|
@ -31,7 +31,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
},
|
},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async (_, formValues) => {
|
query: async (_, formValues = {}) => {
|
||||||
const resp = await deptList({
|
const resp = await deptList({
|
||||||
...formValues,
|
...formValues,
|
||||||
});
|
});
|
||||||
@ -117,7 +117,6 @@ function collapseAll() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
@ -141,7 +140,6 @@ function collapseAll() {
|
|||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Space>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<DeptDrawer @reload="tableApi.query()" />
|
<DeptDrawer @reload="tableApi.query()" />
|
||||||
|
@ -29,7 +29,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
},
|
},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async (_, formValues) => {
|
query: async (_, formValues = {}) => {
|
||||||
const resp = await menuList({
|
const resp = await menuList({
|
||||||
...formValues,
|
...formValues,
|
||||||
});
|
});
|
||||||
@ -109,7 +109,6 @@ function collapseAll() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
@ -127,13 +126,12 @@ function collapseAll() {
|
|||||||
danger
|
danger
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
v-access:code="['system:menu:delete']"
|
v-access:code="['system:menu:remove']"
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Space>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<MenuDrawer @reload="tableApi.query()" />
|
<MenuDrawer @reload="tableApi.query()" />
|
||||||
|
@ -37,7 +37,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
@ -100,7 +100,7 @@ async function handleEdit(record: Recordable<any>) {
|
|||||||
|
|
||||||
async function handleDelete(row: Recordable<any>) {
|
async function handleDelete(row: Recordable<any>) {
|
||||||
await noticeRemove(row.noticeId);
|
await noticeRemove(row.noticeId);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMultiDelete() {
|
function handleMultiDelete() {
|
||||||
@ -112,7 +112,7 @@ function handleMultiDelete() {
|
|||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await noticeRemove(ids);
|
await noticeRemove(ids);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -170,6 +170,6 @@ function handleMultiDelete() {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<NoticeModal @reload="tableApi.reload()" />
|
<NoticeModal @reload="tableApi.query()" />
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
@ -40,7 +40,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
|
@ -45,7 +45,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
@ -127,7 +127,7 @@ function handleMultiDelete() {
|
|||||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await postRemove(ids);
|
await postRemove(ids);
|
||||||
await tableApi.reload();
|
await tableApi.query();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -172,7 +172,6 @@ function handleMultiDelete() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
|
||||||
<a-button
|
<a-button
|
||||||
size="small"
|
size="small"
|
||||||
type="link"
|
type="link"
|
||||||
@ -196,7 +195,6 @@ function handleMultiDelete() {
|
|||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Space>
|
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<PostDrawer @reload="tableApi.query()" />
|
<PostDrawer @reload="tableApi.query()" />
|
||||||
|
@ -61,7 +61,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
|
@ -45,7 +45,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
|
@ -45,7 +45,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
|
@ -83,7 +83,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
pagerConfig: {},
|
pagerConfig: {},
|
||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues = {}) => {
|
||||||
// 区间选择器处理
|
// 区间选择器处理
|
||||||
if (formValues?.createTime) {
|
if (formValues?.createTime) {
|
||||||
formValues.params = {
|
formValues.params = {
|
||||||
|
Loading…
Reference in New Issue
Block a user