diff --git a/src/components/piApiDocShow/index.vue b/src/components/piApiDocShow/index.vue deleted file mode 100644 index 9f3c003..0000000 --- a/src/components/piApiDocShow/index.vue +++ /dev/null @@ -1,237 +0,0 @@ - - - - - diff --git a/src/components/piApiDocShow/jsonParse.ts b/src/components/piApiDocShow/jsonParse.ts deleted file mode 100644 index 7d1f457..0000000 --- a/src/components/piApiDocShow/jsonParse.ts +++ /dev/null @@ -1,35 +0,0 @@ -export function parseSwagger(swaggerJson) { - const result: any[] = [] - let first: Object = {} - for (const [path, methods] of Object.entries(swaggerJson.paths)) { - for (const [method, api] of Object.entries(methods)) { - let currentLevel = result - api.tags.forEach((level, index) => { - let node = currentLevel.find(item => item.name === level) - if (!node) { - node = { name: level, children: []} - currentLevel.push(node) - } - if (index === api.tags.length - 1) { - node.children.push({ - path, - method: method.toUpperCase(), - name: api.summary || '', - ...api - }) - if (first) { - first = { - path, - method: method.toUpperCase(), - name: api.summary || '', - ...api - } - } - } else { - currentLevel = node.children - } - }) - } - } - return [result, first] -} diff --git a/src/utils/tools.ts b/src/utils/tools.ts index 61835ed..11ffb16 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -61,13 +61,13 @@ const tools = { // 数据格式处理 const tmp = { name: item['name'], - path: '/' + item['path'], + path: item['type'] == 0 ? '/' + item['path'] : item['path'], component: item['path'], meta: { 'title': item['title'], 'icon': item['icon'], 'hidden': item['hidden'], - 'type': 'menu' + 'type': item['type'] == 0 ? 'menu' : 'link' } }; const children = this.makeMenu(menus, item.menu_id); diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 15f507d..3f3e79f 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -13,12 +13,14 @@ {{ node.label }} - 菜单 - 按钮 - 接口 + 菜单 + 按钮 + 接口 + 外链 diff --git a/src/views/system/menu/save.vue b/src/views/system/menu/save.vue index f744bf4..47d8c64 100644 --- a/src/views/system/menu/save.vue +++ b/src/views/system/menu/save.vue @@ -19,9 +19,10 @@ 菜单 按钮 接口 + 外链 - + @@ -37,7 +38,10 @@ 隐藏菜单 - + + + +
数值越大越靠前
diff --git a/src/views/tool/doc/index.vue b/src/views/tool/doc/index.vue deleted file mode 100644 index 97e54f4..0000000 --- a/src/views/tool/doc/index.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - -