组织菜单工作空间查询限制
This commit is contained in:
parent
b226f43b8d
commit
e554c951f4
|
@ -60,7 +60,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsCreateBox from "./CreateBox";
|
import MsCreateBox from "./CreateBox";
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
import {Message} from "element-ui";
|
import {Message} from "element-ui";
|
||||||
|
import {TokenKey} from "../../../common/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OrganizationWorkspace",
|
name: "OrganizationWorkspace",
|
||||||
|
@ -68,6 +70,13 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.list();
|
this.list();
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
currentUser: () => {
|
||||||
|
let user = Cookies.get(TokenKey);
|
||||||
|
window.console.log(user);
|
||||||
|
return JSON.parse(user);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
create() {
|
create() {
|
||||||
this.createVisible = true;
|
this.createVisible = true;
|
||||||
|
@ -118,11 +127,21 @@
|
||||||
},
|
},
|
||||||
list() {
|
list() {
|
||||||
let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize;
|
let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize;
|
||||||
|
let lastOrganizationId = this.currentUser.lastOrganizationId;
|
||||||
|
let userRole = this.currentUser.userRoles.filter(r => r.sourceId === lastOrganizationId);
|
||||||
|
if (userRole.length > 0) {
|
||||||
|
if (userRole[0].roleId === "org_admin") {
|
||||||
this.result = this.$post(url, {name: this.condition}, response => {
|
this.result = this.$post(url, {name: this.condition}, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.items = data.listObject;
|
this.items = data.listObject;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.items = [];
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleSizeChange(size) {
|
handleSizeChange(size) {
|
||||||
this.pageSize = size;
|
this.pageSize = size;
|
||||||
|
|
Loading…
Reference in New Issue