Browse Source

修改数据权限

dev
caoyizhong 2 years ago
parent
commit
5f72026f07
  1. 44
      src/views/suppliesstronger/ProcessSuppliesStrongerList.vue
  2. 54
      src/views/waste/ProcessWasteList.vue
  3. 46
      src/views/wastematerials/ProcessWasteMaterialsList.vue

44
src/views/suppliesstronger/ProcessSuppliesStrongerList.vue

@ -305,28 +305,28 @@
if (arg === 1) {
this.ipagination.current = 1;
}
let ue= sessionStorage.getItem('USER_INFORMATION');
let res=JSON.parse(ue);
// console.log("res",res);
let role = {
userid : res.id,
}
let isAdmin = false;
await getAction(this.url.userRoleUrl,role).then(res =>{
// console.log("res",res)
if(res.success){
let item = res.result;
item.forEach( re =>{
if(re.roleName === "管理员" || re.roleName === "超级管理员"){
isAdmin = true;
}
})
}
})
if(!isAdmin){
return ;
}
console.log(res);
/* let ue= sessionStorage.getItem('USER_INFORMATION');
let res=JSON.parse(ue);
console.log("res",res);
let role = {
userid : res.id,
}
let isAdmin = false;
await getAction(this.url.userRoleUrl,role).then(res =>{
console.log("res信息",res)
if(res.success){
let item = res.result;
item.forEach( re =>{
if(re.roleName === "管理员" || re.roleName === "超级管理员"){
isAdmin = true;
}
})
}
})
if(!isAdmin){
return ;
}
console.log(res);*/
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {

54
src/views/waste/ProcessWasteList.vue

@ -277,33 +277,33 @@
this.$message.error("请设置url.list属性!")
return
}
let ue= sessionStorage.getItem('USER_INFORMATION');
let res=JSON.parse(ue);
// console.log("res",res);
let role = {
userid : res.id,
}
let isAdmin = false;
await getAction(this.url.userRoleUrl,role).then(res =>{
// console.log("res",res)
if(res.success){
let item = res.result;
item.forEach( re =>{
if(re.roleName === "管理员" || re.roleName === "超级管理员"){
isAdmin = true;
}
})
}
})
if(!isAdmin){
console.log('==============',res.departIds)
if(!!res.departIds){
this.queryParam.departId = res.departIds ;
}else{
return ;
}
}
// let ue= sessionStorage.getItem('USER_INFORMATION');
// let res=JSON.parse(ue);
// // console.log("res",res);
//
// let role = {
// userid : res.id,
// }
// let isAdmin = false;
// await getAction(this.url.userRoleUrl,role).then(res =>{
// // console.log("res",res)
// if(res.success){
// let item = res.result;
// item.forEach( re =>{
// if(re.roleName === "" || re.roleName === ""){
// isAdmin = true;
// }
// })
// }
// })
// if(!isAdmin){
// console.log('==============',res.departIds)
// if(!!res.departIds){
// this.queryParam.departId = res.departIds ;
// }else{
// return ;
// }
// }
// 1
if (arg === 1) {

46
src/views/wastematerials/ProcessWasteMaterialsList.vue

@ -311,29 +311,29 @@
this.$message.error("请设置url.list属性!")
return
}
let ue= sessionStorage.getItem('USER_INFORMATION');
let res=JSON.parse(ue);
let role = {
userid : res.id,
}
let isAdmin = false;
await getAction(this.url.userRoleUrl,role).then(res =>{
if(res.success){
let item = res.result;
item.forEach( re =>{
if(re.roleName === "管理员" || re.roleName === "超级管理员"){
isAdmin = true;
}
})
}
})
if(!isAdmin){
if(!!res.departIds){
this.queryParam.departId = res.departIds ;
}else{
return ;
}
}
// let ue= sessionStorage.getItem('USER_INFORMATION');
// let res=JSON.parse(ue);
// let role = {
// userid : res.id,
// }
// let isAdmin = false;
// await getAction(this.url.userRoleUrl,role).then(res =>{
// if(res.success){
// let item = res.result;
// item.forEach( re =>{
// if(re.roleName === "" || re.roleName === ""){
// isAdmin = true;
// }
// })
// }
// })
// if(!isAdmin){
// if(!!res.departIds){
// this.queryParam.departId = res.departIds ;
// }else{
// return ;
// }
// }
// 1
if (arg === 1) {
this.ipagination.current = 1;

Loading…
Cancel
Save