diff --git a/src/pages/upgrade/index.vue b/src/pages/upgrade/index.vue index 58b6395662c1c3214dc06249fa6d9051302f2925..f103a7a914cbf6ee7f3c3e94d6326da15eae1763 100644 --- a/src/pages/upgrade/index.vue +++ b/src/pages/upgrade/index.vue @@ -1,6 +1,8 @@ + + + + + + + + + + + + + + + + + {{ item.label }} + + + + + + + {{ item.label }} + + + + + +
+ + 取消 + + + 确定 + +
+
@@ -60,7 +147,8 @@ import { nodePkgOp } from '@/api/upgrade' { title: '状态', dataIndex: 'success', key: 'success', width: 100, ellipsis: true, scopedSlots: { customRender: 'status' }}, { title: '操作', dataIndex: 'operation', key: 'operation', align: 'center', width: 100, scopedSlots: { customRender: 'operation' }} ], - upgradeList: [] + upgradeList: [], + searchVisible: false } }, computed: { @@ -113,6 +201,23 @@ import { nodePkgOp } from '@/api/upgrade' this.listQuery.pageNum = pagination.current this.listQuery.pageSize = pagination.pageSize this.fetchTable() + }, + openSearch() { + this.searchVisible = true + }, + resetSearch() { + this.tableQuery.packageName = '' + this.tableQuery.nodeName = '' + this.tableQuery.timeRange = null + this.tableQuery.upgradeRes = '' + this.tableQuery.opType = '' + this.sumbitSearch() + }, + sumbitSearch() { + this.listQuery.pageNum = 1 + this.listQuery.pageSize = 10 + this.searchVisible = false + this.fetchTable() } } } diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 8948f2bef256fb04d99b8321cfe8c16997c7a4b7..7e6d877fa3edc858a60e3b440f47f76d1425f621 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -29,6 +29,10 @@ const app = { currentMenu = subMenu } }) + } else { + if (menu.path === tab.path) { + currentMenu = menu + } } }) tab.title = currentMenu.title diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 539f54ec833374728a06eeb6cd42242d656246e4..8bb5d3beef406c90790c06b2775febac8c86cb34 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -73,7 +73,9 @@ const user = { }) element.childs = childs } else { - element.path = routeMenuMap[element.id] + if (element && routeMenuMap && routeMenuMap[element.id]) { + element.path = routeMenuMap[element.id]; + } } }) commit('setMenus', res.data)