dbug 1
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="bootstrap admin template">
|
||||
<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">
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
roles : [],
|
||||
@@ -100,6 +63,43 @@ dbo.autorisationService = {
|
||||
this.access = data.pageaccess == 'T' ? true : false;
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user