Browse Source

跳转大屏

release/epdc
zhaoyongnian 3 years ago
parent
commit
ca6bf6e7ec
  1. 34
      src/views/main-navbar.vue
  2. 1
      src/views/main.vue

34
src/views/main-navbar.vue

@ -19,6 +19,12 @@
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
<el-menu-item v-if="isShowBnt" index="3" @click="goScreen()">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--promotion" aria-hidden="true">
<use xlink:href="#icon-earth"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal">
<!-- <el-menu-item index="1">
@ -77,12 +83,18 @@ export default {
data () {
return {
i18nMessages: messages,
updatePassowrdVisible: false
updatePassowrdVisible: false,
isShowBnt: true,
streetId: '',
communityId: ''
}
},
components: {
UpdatePassword
},
created () {
this.getGuess()
},
methods: {
//
fullscreenHandle () {
@ -118,6 +130,26 @@ export default {
this.$router.push({ name: 'login' })
}).catch(() => { })
}).catch(() => { })
},
getGuess () {
this.$http.post(`/sys/dept/guess/${this.$store.state.user.deptId}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data.gridId) {
this.isShowBnt = false
} else {
this.isShowBnt = true
this.streetId = res.data.streetId ? res.data.streetId : ''
this.communityId = res.data.communityId ? res.data.communityId : ''
}
}).catch(() => { })
},
goScreen () {
let url = 'http://localhost:8091/#/home'
let streetUrl = this.streetId ? `${url}?formPcStreetId=${this.streetId}` : url
let communityUrl = this.communityId ? `${url}?formPcStreetId=${this.streetId}&formPcCommunityId=${this.communityId}` : url
window.open(this.communityId ? communityUrl : streetUrl)
}
}
}

1
src/views/main.vue

@ -93,6 +93,7 @@ export default {
this.$store.state.user.superAdmin = res.data.superAdmin
// 2022/9/19
this.$store.state.user.deptName = res.data.deptName.replace('党工委', '')
this.$store.state.user.deptId = res.data.deptId
}).catch(() => { })
},
//

Loading…
Cancel
Save