|
@@ -23,7 +23,7 @@
|
|
<i class="el-icon-coordinate"></i>
|
|
<i class="el-icon-coordinate"></i>
|
|
<span slot="title">其他系统管理员管理</span>
|
|
<span slot="title">其他系统管理员管理</span>
|
|
</el-menu-item> -->
|
|
</el-menu-item> -->
|
|
- <el-menu-item index="client" v-permission="'/admin/client'">
|
|
|
|
|
|
+ <el-menu-item index="client" v-if="$permission('/admin/client')">
|
|
<i class="el-icon-film"></i>
|
|
<i class="el-icon-film"></i>
|
|
<span slot="title">租户管理</span>
|
|
<span slot="title">租户管理</span>
|
|
</el-menu-item>
|
|
</el-menu-item>
|
|
@@ -51,7 +51,7 @@
|
|
</template>
|
|
</template>
|
|
</el-menu-item>
|
|
</el-menu-item>
|
|
</el-submenu> -->
|
|
</el-submenu> -->
|
|
- <el-menu-item index="apply" v-permission="'/admin/apply'">
|
|
|
|
|
|
+ <el-menu-item index="apply">
|
|
<i class="el-icon-setting"></i>
|
|
<i class="el-icon-setting"></i>
|
|
<span slot="title">应用功能管理</span>
|
|
<span slot="title">应用功能管理</span>
|
|
</el-menu-item>
|
|
</el-menu-item>
|
|
@@ -97,11 +97,12 @@
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
import UserBar from "./components/UserBar";
|
|
import UserBar from "./components/UserBar";
|
|
-
|
|
|
|
|
|
+import { webSocket } from "./mixins";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
UserBar,
|
|
UserBar,
|
|
},
|
|
},
|
|
|
|
+ mixins: [webSocket],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
isCollapse: true,
|
|
isCollapse: true,
|
|
@@ -114,6 +115,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ ...mapGetters(['webSocket'])
|
|
|
|
+ },
|
|
|
|
+ created(){
|
|
|
|
+ this.getPermissionList()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.$store.commit('SET_PREFIX', '/admin')
|
|
this.$store.commit('SET_PREFIX', '/admin')
|
|
@@ -121,6 +126,21 @@ export default {
|
|
this.getSelect()
|
|
this.getSelect()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ changePermission(){
|
|
|
|
+ this.webSocket.onmessage = (e) => {
|
|
|
|
+ console.log(JSON.parse(e.data) )
|
|
|
|
+ if(JSON.parse(e.data).code=='903' ){
|
|
|
|
+ this.getPermissionList()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getPermissionList(){
|
|
|
|
+ this.$api.getPermissionList().then(response=>{
|
|
|
|
+ // localStorage.permission =JSON.stringify(JSON.parse(response.data).data)
|
|
|
|
+ this.$store.commit('SET_ADMIN_PERMISSION', JSON.stringify(JSON.parse(response.data).data))
|
|
|
|
+ console.log(JSON.stringify(JSON.parse(response.data).data))
|
|
|
|
+ })
|
|
|
|
+ },
|
|
handleSelect(index, path) {
|
|
handleSelect(index, path) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/admin/' + index
|
|
path: '/admin/' + index
|
|
@@ -128,18 +148,11 @@ export default {
|
|
},
|
|
},
|
|
getUserinfo() {
|
|
getUserinfo() {
|
|
this.$api.getUserInfo().then(response => {
|
|
this.$api.getUserInfo().then(response => {
|
|
- // console.log(response)
|
|
|
|
|
|
+ console.log(response)
|
|
|
|
+ localStorage.tenant = response.data.tenantId
|
|
this.$store.commit('SET_ADMIN_USERINFO', response.data)
|
|
this.$store.commit('SET_ADMIN_USERINFO', response.data)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 获取类型字典项
|
|
|
|
- getSelect() {
|
|
|
|
- this.$api.getDict().then(response => {
|
|
|
|
- localStorage.setItem('IS_ENABLE', response.data.IS_ENABLE)
|
|
|
|
- localStorage.setItem('SEX', response.data.SEX)
|
|
|
|
- localStorage.setItem('TENANT_TYPE', JSON.stringify(response.data.TENANT_TYPE))
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|