This commit is contained in:
2018-07-30 14:50:52 +02:00
parent e16ed4f780
commit 6db58e9dc6
2 changed files with 39 additions and 39 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
<meta name="description" content="bootstrap admin template"> <meta name="description" content="bootstrap admin template">
<meta name="author" content=""> <meta name="author" content="">
<title>Login V3 | Remark Admin Template</title> <title>-*-*-LOGIN DBOIS-*-*-</title>*
<link rel="icon" href="css/images/dbo-01-80x80.png" type="image/png"> <link rel="icon" href="css/images/dbo-01-80x80.png" type="image/png">
@@ -6,43 +6,6 @@
*/ */
dbo.authorisationInit = function() {
new Vue( {
el : "#AUTHORISATION",
data : {
roles: [],
pages: []
},
created: function () {
var self = this;
var srv = dbo.autorisationService;
srv.createRoles( function ( data ) {
console.log( data.pages );
self.roles = data.roles;
self.pages = data.pages;
} );
},
methods: {
toggleAccess: function ( pageIndex, roleIndex ) {
var page = this.pages[pageIndex];
var access = page.accessPages[roleIndex];
page.accessPages[roleIndex].access = !page.accessPages[roleIndex].access;
var submitDATA = {
pageID : page.pageID,
roleLevel: access.roleLevel,
access : page.accessPages[roleIndex].access ? 'T' : 'F'
}
dbo.authorisationDataService.toggleAuhorisation( submitDATA );
}
}
} );
};
dbo.autorisationService = { dbo.autorisationService = {
roles : [], roles : [],
@@ -100,6 +63,43 @@ dbo.autorisationService = {
this.access = data.pageaccess == 'T' ? true : false; this.access = data.pageaccess == 'T' ? true : false;
this.roleLevel = data.rolelevel; this.roleLevel = data.rolelevel;
} }
} };
dbo.authorisationInit = function() {
new Vue( {
el : "#AUTHORISATION",
data : {
roles: [],
pages: []
},
created: function () {
var self = this;
var srv = dbo.autorisationService;
srv.createRoles( function ( data ) {
console.log( data.pages );
self.roles = data.roles;
self.pages = data.pages;
} );
},
methods: {
toggleAccess: function ( pageIndex, roleIndex ) {
var page = this.pages[pageIndex];
var access = page.accessPages[roleIndex];
page.accessPages[roleIndex].access = !page.accessPages[roleIndex].access;
var submitDATA = {
pageID : page.pageID,
roleLevel: access.roleLevel,
access : page.accessPages[roleIndex].access ? 'T' : 'F'
}
dbo.authorisationDataService.toggleAuhorisation( submitDATA );
}
}
} );
};