| | |
| | | } |
| | | |
| | | function fetchOperationRecordPage(params = {}) { |
| | | return request.post({ url: '/operationRecord/page', params: buildOperationRecordPageParams(params) }) |
| | | return request.post({ |
| | | url: '/operationRecord/page', |
| | | params: buildOperationRecordPageParams(params) |
| | | }) |
| | | } |
| | | |
| | | function fetchConfigPage(params = {}) { |
| | |
| | | } |
| | | |
| | | function fetchGetMenuList(params = {}) { |
| | | return request.post({ url: '/menu/list', params }).then((menuList) => adaptLegacyMenuTree(buildLegacyMenuTree(menuList))) |
| | | return request |
| | | .post({ url: '/menu/list', params }) |
| | | .then((menuList) => adaptLegacyMenuTree(buildLegacyMenuTree(menuList))) |
| | | } |
| | | |
| | | function adaptLegacyMenuTree(menuTree) { |
| | |
| | | return [] |
| | | } |
| | | |
| | | return menuTree |
| | | .map((node) => adaptLegacyMenuNode(node)) |
| | | .filter(Boolean) |
| | | return menuTree.map((node) => adaptLegacyMenuNode(node)).filter(Boolean) |
| | | } |
| | | |
| | | function buildLegacyMenuTree(menuList) { |
| | |
| | | } |
| | | |
| | | function buildLegacyMenuPath(node) { |
| | | const rawPath = typeof node.route === 'string' && node.route.trim() |
| | | ? node.route |
| | | : typeof node.path === 'string' |
| | | ? node.path |
| | | : '' |
| | | const rawPath = |
| | | typeof node.route === 'string' && node.route.trim() |
| | | ? node.route |
| | | : typeof node.path === 'string' |
| | | ? node.path |
| | | : '' |
| | | return normalizeLegacyPath(rawPath) |
| | | } |
| | | |