Commit 400d1359 authored by 晓彤's avatar 晓彤

菜单刷新修改

parent f3d38f77
...@@ -82,7 +82,9 @@ export default { ...@@ -82,7 +82,9 @@ export default {
jumpToDetail(name) { jumpToDetail(name) {
window.sessionStorage.setItem('env', name) window.sessionStorage.setItem('env', name)
// 向菜单栏中的下拉框传递环境名称 // 向菜单栏中的下拉框传递环境名称
bus.$emit('TransEnv', name) bus.$emit('testEnv', name)
// 向菜单栏中传递环境名称
bus.$emit('refreshEnv', name)
this.$router.push({ this.$router.push({
path: `/docker/env` path: `/docker/env`
}) })
......
...@@ -401,7 +401,10 @@ export default { ...@@ -401,7 +401,10 @@ export default {
} }
}, },
created() { created() {
bus.$on('TransEnv', (name) => { console.log('99999')
this.getServiceList()
bus.$on('refreshEnv', (name) => {
console.log('环境', name)
this.namespace = name this.namespace = name
this.getServiceList() this.getServiceList()
}) })
...@@ -435,6 +438,7 @@ export default { ...@@ -435,6 +438,7 @@ export default {
const tLoading = this.$loading.service(this.loadingOptions) const tLoading = this.$loading.service(this.loadingOptions)
getServiceList({ namespace: this.namespace }) getServiceList({ namespace: this.namespace })
.then((resp) => { .then((resp) => {
console.log('列表信息', resp.data.data)
const serviceList = resp.data.data const serviceList = resp.data.data
this.array2Object(serviceList) this.array2Object(serviceList)
tLoading.close() tLoading.close()
......
...@@ -82,9 +82,12 @@ export default { ...@@ -82,9 +82,12 @@ export default {
}, },
// 跳转到详情页面 // 跳转到详情页面
jumpToDetail(name) { jumpToDetail(name) {
console.log('777', name)
window.sessionStorage.setItem('env', name) window.sessionStorage.setItem('env', name)
// 向菜单栏中的下拉框传递环境名称 // 向菜单栏中的下拉框传递环境名称
bus.$emit('TransEnv', name) bus.$emit('testEnv', name)
// 向菜单栏中传递环境名称
bus.$emit('refreshEnv', name)
this.$router.push({ this.$router.push({
// 环境详情页面 // 环境详情页面
path: `/docker/env` path: `/docker/env`
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
} }
}, },
created() { created() {
this.$bus.$on('TransEnv', (name) => { this.$bus.$on('testEnv', (name) => {
this.env = name this.env = name
}) })
this.getEnvList() this.getEnvList()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment