标题修改

master
刘妍 2023-08-25 16:18:50 +08:00
parent 7be9e9ced9
commit 7e6aaa49a2
3 changed files with 57 additions and 47 deletions

View File

@ -102,7 +102,7 @@
}, },
created() { created() {
this.getList() // this.getList()
}, },
mounted() { mounted() {

View File

@ -2,10 +2,10 @@
<div class="gridman-container"> <div class="gridman-container">
<div class="gridman-header"> <div class="gridman-header">
<div class="back-button" @click="backPath"></div> <div class="back-button" @click="backPath"></div>
网格化管理 {{title}}
</div> </div>
<div class="gridman-body"> <div class="gridman-body">
<router-view></router-view> <router-view @updateProjectId="updateProjectIdParent"></router-view>
</div> </div>
</div> </div>
</template> </template>
@ -18,12 +18,15 @@
}, },
data() { data() {
return { return {
title : '网格化管理'
} }
}, },
methods: { methods: {
updateProjectIdParent(msg) {
this.title = msg
},
backPath() { backPath() {
console.log(this.$route); this.title = '网格化管理'
if (this.$route.path != '/gridman_navigation') { if (this.$route.path != '/gridman_navigation') {
this.$router.push({ 'path': '/gridman' }) this.$router.push({ 'path': '/gridman' })
} else { } else {
@ -63,6 +66,7 @@
cursor: pointer; cursor: pointer;
} }
.gridman-body { .gridman-body {
width: 100%; width: 100%;
height: calc(100% - 100px); height: calc(100% - 100px);

View File

@ -6,9 +6,9 @@
<p>欢迎进入网格化管理系统</p> <p>欢迎进入网格化管理系统</p>
</div> </div>
<div class="gridman-navigation"> <div class="gridman-navigation">
<div class="nav-item" v-for="(item,index) in navList" :key="index" :style="{'top':item.top+'px'}" @click="$router.push({'path':item.url})"> <div class="nav-item" v-for="(item,index) in navList" :key="index" :style="{'top':item.top+'px'}" @click="goItem(item)">
<img :src="'/img/gridman/nav-'+(index+1)+'.png'" alt="" @click="$router.push({'path':item.url})"> <img :src="'/img/gridman/nav-'+(index+1)+'.png'" alt="" @click="goItem(item)">
<div class="nav-lable" @click="$router.push({'path':item.url})">{{item.lable}}</div> <div class="nav-lable" @click="goItem(item)">{{item.lable}}</div>
</div> </div>
</div> </div>
</div> </div>
@ -60,6 +60,12 @@
}, },
] ]
} }
},
methods:{
goItem(item){
this.$router.push({'path':item.url})
this.$emit('updateProjectId',item.lable)
}
} }
} }
</script> </script>