😎1、修复vxetable加载两次问题 2、升级npm依赖
This commit is contained in:
parent
22c81a7c5c
commit
3825bbc12b
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.07.25",
|
||||
"lastBuildTime": "2024.07.27",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -31,10 +31,10 @@
|
||||
"echarts": "^5.5.1",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.7.7",
|
||||
"element-plus": "^2.7.8",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit": "^1.0.0",
|
||||
"ezuikit-js": "^8.0.6",
|
||||
"ezuikit-js": "^8.0.8",
|
||||
"gcoord": "^1.0.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-table2excel": "^1.1.2",
|
||||
@ -45,12 +45,12 @@
|
||||
"mqtt": "^4.3.8",
|
||||
"nprogress": "^0.2.0",
|
||||
"ol": "^9.2.4",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia": "^2.2.0",
|
||||
"print-js": "^1.6.0",
|
||||
"push.js": "^1.0.12",
|
||||
"qrcodejs2-fixes": "^0.0.2",
|
||||
"qs": "^6.12.3",
|
||||
"relation-graph": "^2.2.2",
|
||||
"relation-graph": "^2.2.3",
|
||||
"screenfull": "^6.0.2",
|
||||
"sm-crypto-v2": "^1.9.1",
|
||||
"sortablejs": "^1.15.2",
|
||||
|
||||
@ -4,6 +4,7 @@ import { VxeGridProps, VxeGridPropTypes, VxeComponentSizeType } from 'vxe-table'
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
// 根据主题配置获取组件大小
|
||||
const vxeSize: VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini' : useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
|
||||
|
||||
/**
|
||||
@ -28,7 +29,6 @@ export const useVxeTable = <T>(opt: iVxeOption, extras?: VxeGridProps<T>) => {
|
||||
opt = Object.assign({ enableExport: true, remoteExport: false }, opt);
|
||||
// 创建tableId,表格id固定才可以记录调整列宽,再次刷新仍有效。
|
||||
opt.id = opt.id ? opt.id : String(new Date().getTime());
|
||||
// console.log(opt);
|
||||
const options = reactive<VxeGridProps>({
|
||||
id: opt.id,
|
||||
height: 'auto',
|
||||
@ -59,7 +59,7 @@ export const useVxeTable = <T>(opt: iVxeOption, extras?: VxeGridProps<T>) => {
|
||||
enabled: true,
|
||||
size: vxeSize,
|
||||
pageSize: 20,
|
||||
}, // 分页
|
||||
},
|
||||
printConfig: { sheetName: '' },
|
||||
proxyConfig: {
|
||||
enabled: true,
|
||||
|
||||
@ -146,7 +146,6 @@ const options = useVxeTable<SysCodeGen>(
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
|
||||
// 获取命名空间集合
|
||||
let res = await getAPI(SysCodeGenApi).apiSysCodeGenApplicationNamespacesGet();
|
||||
|
||||
@ -65,6 +65,7 @@ const props = defineProps({
|
||||
applicationNamespaces: { type: Array },
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
let resDicData = await getAPI(SysDictTypeApi).apiSysDictTypeDataListGet('code_gen_base_class');
|
||||
state.codeGenBaseClassName = resDicData.data.result;
|
||||
|
||||
@ -58,6 +58,7 @@ const state = reactive({
|
||||
rules: { position: [{ required: true, message: '请选择存放位置', trigger: 'blur' }] },
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
let resDicData = await getAPI(SysDictTypeApi).apiSysDictTypeDataListGet('code_gen_base_class');
|
||||
state.codeGenBaseClassName = resDicData.data.result;
|
||||
|
||||
@ -197,14 +197,14 @@ const optionsDictType = useVxeTable<SysDictType>(
|
||||
toolbarConfig: { export: false },
|
||||
// 行配置
|
||||
rowConfig: { isCurrent: true, isHover: true },
|
||||
// 多选配置
|
||||
checkboxConfig: { range: true, highlight: false },
|
||||
}
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParamDictType = Local.get(localPageParamKey) || state.localPageParamDictType;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
@ -312,6 +312,7 @@ const optionsDictData = useVxeTable<SysDictData>(
|
||||
|
||||
// 查询api
|
||||
const handleQueryDictDataApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
if (state.queryParamsDictData.dictTypeId == undefined) return;
|
||||
const params = Object.assign(state.queryParamsDictData, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' }) as PageDictDataInput;
|
||||
return getAPI(SysDictDataApi).apiSysDictDataPagePost(params);
|
||||
};
|
||||
|
||||
@ -211,9 +211,7 @@ const options = useVxeTable<SysFile>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
await handleQuery();
|
||||
});
|
||||
onMounted(() => {});
|
||||
|
||||
// 查询api
|
||||
const handleQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
|
||||
@ -152,9 +152,8 @@ const options = useVxeTable<SysLdap>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysDifflog/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysLogDiff/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
@ -31,7 +31,7 @@
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysDifflog/clear'"> 清空 </el-button>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysLogDiff/clear'"> 清空 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools>
|
||||
<vxe-button circle icon="vxe-icon-upload" name="导入" code="showImport" class="mr12" />
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysExlog/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysLogEx/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
@ -41,7 +41,7 @@
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents" @cell-dblclick="handleView">
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysExlog/clear'"> 清空 </el-button>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysLogEx/clear'"> 清空 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
@ -178,9 +178,8 @@ const options = useVxeTable<SysLogEx>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysOplog/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysLogOp/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
@ -41,7 +41,7 @@
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents" @cell-dblclick="handleView">
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysOplog/clear'"> 清空 </el-button>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysLogOp/clear'"> 清空 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysVislog/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysLogVis/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
@ -41,8 +41,8 @@
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysVislog/clear'"> 清空 </el-button>
|
||||
<el-button icon="ele-MapLocation" type="primary" @click="handleMap"> 热力图 </el-button>
|
||||
<el-button icon="ele-DeleteFilled" type="danger" @click="handleClear" v-auth="'sysLogVis/clear'"> 清空 </el-button>
|
||||
<el-button icon="ele-MapLocation" type="primary" @click="handleMap" v-auth="'sysLogVis/list'"> 热力图 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
@ -130,9 +130,8 @@ const options = useVxeTable<SysLogVis>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -123,6 +123,7 @@ const options = useVxeTable<SysMenu>(
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
stripe: false,
|
||||
// 多选配置
|
||||
checkboxConfig: { range: false },
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: true, ajax: { query: () => handleQueryApi() } },
|
||||
|
||||
@ -134,9 +134,8 @@ const options = useVxeTable<SysNotice>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -134,9 +134,8 @@ const options = useVxeTable<SysOAuthUser>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -121,9 +121,8 @@ const options = useVxeTable<OpenAccessOutput>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -97,6 +97,7 @@ const state = reactive({
|
||||
orgTypeList: [] as any,
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
let resDicData = await getAPI(SysDictDataApi).apiSysDictDataDataListCodeGet('org_type');
|
||||
state.orgTypeList = resDicData.data.result;
|
||||
|
||||
@ -128,6 +128,7 @@ const options = useVxeTable<SysOrg>(
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
stripe: false,
|
||||
// 多选配置
|
||||
checkboxConfig: { range: false },
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: true, ajax: { query: () => handleQueryApi() } },
|
||||
@ -135,13 +136,13 @@ const options = useVxeTable<SysOrg>(
|
||||
pagerConfig: { enabled: false },
|
||||
// 工具栏配置
|
||||
toolbarConfig: { export: false },
|
||||
// 树形配置
|
||||
treeConfig: { expandAll: false },
|
||||
}
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
await handleQuery();
|
||||
let resDicData = await getAPI(SysDictDataApi).apiSysDictDataDataListCodeGet('org_type');
|
||||
state.orgTypeList = resDicData.data.result;
|
||||
// 展开表格所有数据,数据量大时请勿开启
|
||||
|
||||
@ -115,9 +115,8 @@ const options = useVxeTable<SysPlugin>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -120,9 +120,8 @@ const options = useVxeTable<PagePosOutput>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -117,9 +117,8 @@ const options = useVxeTable<SysPrint>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -120,6 +120,7 @@ const options = useVxeTable<SysRegion>(
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
stripe: false,
|
||||
// 多选配置
|
||||
checkboxConfig: { range: false },
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
|
||||
@ -133,9 +134,8 @@ const options = useVxeTable<SysRegion>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
// 展开表格所有数据,数据量大时请勿开启
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
|
||||
@ -141,9 +141,8 @@ const options = useVxeTable<PageRoleOutput>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -171,9 +171,8 @@ const options = useVxeTable<TenantOutput>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
await handleQuery();
|
||||
});
|
||||
|
||||
// 查询api
|
||||
|
||||
@ -288,8 +288,8 @@ const state = reactive({
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
state.loading = true;
|
||||
const { data } = await getAPI(SysPosApi).apiSysPosPagePost({ page: 1, pageSize: 9999 });
|
||||
state.posData = data.result?.items ?? [];
|
||||
const { data } = await getAPI(SysPosApi).apiSysPosListGet();
|
||||
state.posData = data.result ?? [];
|
||||
const { data: res } = await getAPI(SysRoleApi).apiSysRoleListGet();
|
||||
state.roleData = res.result ?? [];
|
||||
state.loading = false;
|
||||
|
||||
@ -164,10 +164,9 @@ const options = useVxeTable<UserOutput>(
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||
fetchOrgData();
|
||||
await handleQuery();
|
||||
// fetchOrgData();
|
||||
});
|
||||
|
||||
// 组织架构节点切换
|
||||
|
||||
Loading…
Reference in New Issue
Block a user