Merge branch 'dev_product' of https://git.cloud.tencent.com/joylink/jl-nclient into dev_product
This commit is contained in:
commit
697deaa887
@ -155,7 +155,7 @@
|
||||
if (operate.selection && operate.selection.length) {
|
||||
operate.selection.forEach(elem => {
|
||||
if (operate.commit) {
|
||||
this.updateTableValue(elem.code, { result: `${$t('menu.menuDialog.senedMessageOne')} ,${this.timeout} ${$t('menu.menuDialog.senedMessageTwo')}` }, false);
|
||||
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')} ,${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
|
||||
} else if (operate.cancel) {
|
||||
this.updateTableValue(elem.code, { result: '' }, false);
|
||||
}
|
||||
@ -359,7 +359,7 @@
|
||||
}
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
@ -384,7 +384,7 @@
|
||||
}
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
@ -409,7 +409,7 @@
|
||||
}
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
operate.messages.push(`${$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
|
@ -154,7 +154,7 @@
|
||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `${$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation') }!`
|
||||
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation') }!`
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
|
@ -29,21 +29,37 @@ function hasPermission(roles, route, parentsRoles) {
|
||||
if (route.meta && route.meta.roles) {
|
||||
// 如果存在本级路由,则使用自己的roles过滤
|
||||
// debugger;
|
||||
if (getSessionStorage('design')) {
|
||||
if (route.meta.roles.indexOf(userDesign)===-1) {
|
||||
route.hidden = true;
|
||||
} else {
|
||||
if (!(route.meta.roles.indexOf(admin)>=0 && roles.indexOf(admin)>=0)) {
|
||||
route.hidden = true;
|
||||
}
|
||||
}
|
||||
// if (getSessionStorage('design')) {
|
||||
// if (route.meta.roles.indexOf(userDesign)===-1) {
|
||||
// route.hidden = true;
|
||||
// } else {
|
||||
// if ((route.meta.roles.indexOf(admin)>=0 && roles.indexOf(admin)>=0)) {
|
||||
// route.hidden = false;
|
||||
// } else if (route.meta.roles.indexOf(user)>=0 && roles.indexOf(user)>=0) {
|
||||
// route.hidden = false;
|
||||
// } else {
|
||||
// route.hidden = true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// } else {
|
||||
// if (route.meta.roles.indexOf(userDesign)>0) {
|
||||
// route.hidden = true;
|
||||
// }
|
||||
// }
|
||||
// return roles.some(role => route.meta.roles.indexOf(role) >= 0);
|
||||
if (getSessionStorage('design')) {
|
||||
roles= roles.filter(function (role) {
|
||||
return route.meta.roles.indexOf(role) >= 0;
|
||||
});
|
||||
const result=roles.every(role => route.meta.roles.indexOf(role) >= 0);
|
||||
return result && ((roles.indexOf(admin)>=0 && route.meta.roles.indexOf(admin)>=0) || (roles.indexOf(user)>=0 && route.meta.roles.indexOf(user)>=0 ));
|
||||
} else {
|
||||
if (route.meta.roles.indexOf(userDesign)>0) {
|
||||
route.hidden = true;
|
||||
}
|
||||
roles= roles.filter(function (role) {
|
||||
return route.meta.roles.indexOf(role) >= 0;
|
||||
});
|
||||
return roles.some(role => route.meta.roles.indexOf(role) >= 0) && route.meta.roles.indexOf(userDesign)<0;
|
||||
}
|
||||
return roles.some(role => route.meta.roles.indexOf(role) >= 0);
|
||||
} else if (parentsRoles) {
|
||||
// 如果没有本级路由,有父级路由,则使用父级路由过滤
|
||||
return roles.some(role => parentsRoles.indexOf(role) >= 0);
|
||||
@ -107,7 +123,6 @@ const permission = {
|
||||
// 生成其他权限路由
|
||||
GenerateRoutes({ commit }, data) {
|
||||
return new Promise(resolve => {
|
||||
// debugger;
|
||||
const { roles } = convertRouterRoles(data);
|
||||
let accessedRouters;
|
||||
// if (roles.indexOf(superAdmin) >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user