diff --git a/src/components/commonFilter/index.vue b/src/components/commonFilter/index.vue index 8aefbd3..9a4675f 100644 --- a/src/components/commonFilter/index.vue +++ b/src/components/commonFilter/index.vue @@ -22,7 +22,7 @@ -
+
@@ -53,6 +53,12 @@ defineExpose({ filterPopover.value?.hide() }, }); + + +const onDownload = () => { + ElMessage.warning("功能开发中..."); + emit("download"); +}; \ No newline at end of file diff --git a/src/pages/Layout/index.vue b/src/pages/Layout/index.vue index 41a721d..c0b736d 100644 --- a/src/pages/Layout/index.vue +++ b/src/pages/Layout/index.vue @@ -12,7 +12,7 @@ {{ topTitle }} - + - + @@ -96,7 +97,15 @@ const menuList = computed(() => { const topLevelMenuList = computed(() => { return menuList.value.map((item) => { const { children, ...rest } = item; - return rest; + const hasChildren = children && Array.isArray(children) && children.length > 0; + const enhancedMeta = { + ...rest.meta, + disabled: !hasChildren + }; + return { + ...rest, + meta: enhancedMeta + }; }).filter(itv=>itv.name !== 'stage'); }); @@ -272,7 +281,7 @@ onUnmounted(() => { .mj-aside-title { font-size: 10px; color: #888; - padding: 10px var(--el-menu-base-level-padding); + padding: 10px calc(var(--el-menu-base-level-padding) + 16px); transition: opacity 0.3s; } } diff --git a/src/pages/stage/dict/dictFieldConfig.vue b/src/pages/stage/dict/dictFieldConfig.vue index b2018e7..1542f6a 100644 --- a/src/pages/stage/dict/dictFieldConfig.vue +++ b/src/pages/stage/dict/dictFieldConfig.vue @@ -19,7 +19,7 @@ placeholder="搜索字段名称..." class="custom-search-input auto-expand-input" :prefix-icon="Search" - @keyup.enter="onConfirmSuccess" + @keyup.enter="onSearchData" /> @@ -55,7 +55,7 @@ @@ -64,7 +64,7 @@ 应用筛选 @@ -86,19 +86,9 @@ - - (false); const parentId = ref(""); -const total = ref(0); -const list = ref([]); const hasChild = ref(false); //是否是子级弹窗 const childId = ref(""); // 子集的id const childModals = ref([]); //子弹窗的列表 @@ -160,7 +149,7 @@ const columns = computed(() => [ { prop: "id", align:'center', - label: "字典编码", + label: "字典编码" }, { prop: "label", @@ -341,10 +330,15 @@ const onCloseFilter = () => { filterForm.status = ""; }; +// 筛选 +const onSearchData = () =>{ + tableRef.value?.refresh(); +} + // 筛选重置 const onReset = () => { onCloseFilter(); - onConfirmSuccess(); + onSearchData(); }; // 添加二级字段 diff --git a/src/pages/stage/dict/index.vue b/src/pages/stage/dict/index.vue index 6d8589e..b3a629a 100644 --- a/src/pages/stage/dict/index.vue +++ b/src/pages/stage/dict/index.vue @@ -66,8 +66,6 @@ @@ -109,7 +107,6 @@ const dictTableRef = ref(null); const { handleAction, handleDelete: runDelete } = useTableAction(dictTableRef); const dictVisible = ref(false); const searchVal = ref(""); -const total = ref(0); const filterForm = reactive({ status: "", @@ -208,9 +205,6 @@ const columns = [ }, ]; -// 返回的data数据信息 -const dataValue = ref([]); - // popover关闭事件 const onPopoverHide = () => { filterForm.status = ""; @@ -275,14 +269,14 @@ const onConfirmSuccess = async () => { Promise.resolve(true), selectItem.id, getTableData, - { showMsg: false, silentUpdate: true } + { showMsg: false } ); } else { dictTableRef.value?.refresh(); } }; -// TODO:字段配置 +// 字段配置 const handlefieldsConfig = (ite) => { fieldsConfigRef.value.open({ ...ite, parentId: ite.id }); }; diff --git a/src/pages/stage/permission/index.vue b/src/pages/stage/permission/index.vue index 162644d..bf7fa9b 100644 --- a/src/pages/stage/permission/index.vue +++ b/src/pages/stage/permission/index.vue @@ -31,39 +31,8 @@ - - - - - - - - @@ -82,16 +51,19 @@ /> - + diff --git a/src/router/index.ts b/src/router/index.ts index 2421b21..84f6d28 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -164,12 +164,14 @@ const addDynamicRoutes = async () => { try { const { modules:backendRawData } = await getUserInfo(); const allRoutes = transformBackendTree(backendRawData); - // console.log('获取最终渲染的菜单数据格式:',allRoutes); + console.log('获取最终渲染的菜单数据格式:',allRoutes); if (allRoutes) { // 转换路由数据 const dynamicRoutes = transformRoutes( Array.isArray(allRoutes) ? allRoutes : [allRoutes] ); + + console.log('最终渲染的菜单数据:',dynamicRoutes) // 将动态路由添加到 Layout 的 children 中 const layoutRoute = router .getRoutes() diff --git a/src/router/routeMap.ts b/src/router/routeMap.ts index d5115ea..a4ca742 100644 --- a/src/router/routeMap.ts +++ b/src/router/routeMap.ts @@ -15,8 +15,27 @@ const businessRoute = { "business.opportunity":"businessOpport", } +const contractRoute = { + contract: "contractManage", +} + +const teamRoute = { + team: "teamManage", +} + +const financeRoute = { + finance: "financeManage", +} + +const recruitmentRoute = { + recruitment: "recruitmentManage", +} export const componentMap: Record = { ...stageRoute, - ...businessRoute + ...businessRoute, + ...contractRoute, + ...teamRoute, + ...financeRoute, + ...recruitmentRoute }; diff --git a/src/styles/common.scss b/src/styles/common.scss index 0b2a974..36edcd4 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -203,5 +203,6 @@ body { text-overflow: ellipsis; white-space: nowrap; word-break: break-all; + display: block; cursor: default; } \ No newline at end of file diff --git a/src/utils/permission.ts b/src/utils/permission.ts index 0ffcaf2..c82b81b 100644 --- a/src/utils/permission.ts +++ b/src/utils/permission.ts @@ -15,13 +15,16 @@ export const usePermission = () => { const userPermissions = appStore.role; const permissionArray = Array.isArray(requiredPermissions) ? requiredPermissions : [requiredPermissions]; + // 为*跳过权限校验 + const isSkipCheck = requiredPermissions === "*" || (permissionArray && permissionArray.includes("*")); + if (isSkipCheck) {return true;} + const hasPermission = permissionArray.some((permission) => userPermissions.includes(permission) ); return hasPermission; }; - return { checkPermission }; };