提交代码

master
胡锐 7 months ago
parent de6fa34226
commit 5aa3324715
  1. 4
      src/app/pages/account/sys-role/sys-role.component.html
  2. 24
      src/app/pages/account/sys-role/sys-role.component.less
  3. 19
      src/app/pages/account/sys-role/sys-role.component.ts

@ -18,12 +18,10 @@
</div>
</form>
<nz-table #basicTable
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
[nzScroll]="{ x: '1100px' }"
[nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="queryData()"
@ -32,7 +30,7 @@
<thead>
<tr>
<th nzWidth="80px">角色名称</th>
<th nzWidth="150px">角色描述</th>
<th nzWidth="100px">角色描述</th>
<th nzWidth="50px">创建时间</th>
<th nzWidth="50px">修改时间</th>
<th nzWidth="50px">操作</th>

@ -1,33 +1,9 @@
.ant-advanced-search-form {
padding: 24px;
background: #fbfbfb;
border: 1px solid #d9d9d9;
border-radius: 6px;
}
.search-result-list {
margin-top: 16px;
border: 1px dashed #e9e9e9;
border-radius: 6px;
background-color: #fafafa;
min-height: 200px;
text-align: center;
padding-top: 80px;
}
[nz-form-label] {
overflow: visible;
}
button {
margin-left: 8px;
}
.collapse {
margin-left: 8px;
font-size: 12px;
}
.search-area {
text-align: right;
}

@ -1,5 +1,11 @@
import {Component, ViewChild} from '@angular/core';
import {NzTableComponent, NzTbodyComponent, NzTheadComponent, NzThMeasureDirective} from "ng-zorro-antd/table";
import {
NzTableComponent,
NzTableModule,
NzTbodyComponent,
NzTheadComponent,
NzThMeasureDirective
} from "ng-zorro-antd/table";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzFormDirective, NzFormModule} from "ng-zorro-antd/form";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
@ -18,9 +24,8 @@ import {NzModalComponent, NzModalModule, NzModalService} from "ng-zorro-antd/mod
import {NzMessageService} from "ng-zorro-antd/message";
import {NzInputNumberComponent} from "ng-zorro-antd/input-number";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {DATA} from "../../../data/login/localStorage.namespace";
import {MenuService} from "../../../servies/menu/menu.service";
import {NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions} from "ng-zorro-antd/tree";
import {NzTreeComponent, NzTreeNodeOptions} from "ng-zorro-antd/tree";
@Component({
selector: 'app-sys-role',
@ -49,6 +54,7 @@ import {NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions} from "ng-zorro-an
NzModalModule,
NgIf,
NzTreeComponent,
NzTableModule
],
templateUrl: './sys-role.component.html',
styleUrl: './sys-role.component.less'
@ -75,9 +81,9 @@ export class SysRoleComponent {
// 当前需要分配权限角色
currentAssignRoleId: any = null;
// 菜单树
menuTree: any = [];
menuTree: NzTreeNodeOptions[] = [];
// 菜单已勾选数据
menuTreeCheckedKeys: any = [];
menuTreeCheckedKeys = [];
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
@ -123,6 +129,7 @@ export class SysRoleComponent {
*
*/
searchFormSubmit(): void {
this.tablePageNum = 1;
this.queryData();
}
@ -221,7 +228,6 @@ export class SysRoleComponent {
this.currentAssignRoleId = roleId;
this.menuService.queryRoleMenuArray(roleId, (data: any) => {
this.menuTreeCheckedKeys = data['return_data'];
console.log(this.menuTreeCheckedKeys);
});
this.assignRoleMenuVisible = true;
}
@ -267,6 +273,7 @@ export class SysRoleComponent {
this.menuService.assignMenu(param, (data: any) => {
if (data['return_code'] == '000000') {
this.message.create('success', '操作成功');
this.closeAssignRoleMenu();
} else {
this.message.create('error', data['return_msg']);
}

Loading…
Cancel
Save