Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -6,7 +6,7 @@ import { FreightAccountService } from '../../../services/freight-account.service
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-receipt-order-detail',
|
selector: 'app-receipt-order-detail',
|
||||||
templateUrl: './receipt-order-detail.component.html',
|
templateUrl: './receipt-order-detail.component.html',
|
||||||
styleUrls: ['./receipt-order-detail.component.less']
|
styleUrls: ['./receipt-order-detail.component.less'],
|
||||||
})
|
})
|
||||||
export class ReceiptOrderDetailComponent implements OnInit {
|
export class ReceiptOrderDetailComponent implements OnInit {
|
||||||
@ViewChild('st', { static: true })
|
@ViewChild('st', { static: true })
|
||||||
|
|||||||
@ -1,14 +1,47 @@
|
|||||||
<page-header-wrapper [title]="''"></page-header-wrapper>
|
<page-header-wrapper [title]="'菜单管理'"></page-header-wrapper>
|
||||||
|
|
||||||
<button nz-button (click)="menuImport(0)" [nzLoading]="service.http.loading">
|
<nz-card class="search-box">
|
||||||
导入货主菜单
|
<div nz-row nzGutter="8">
|
||||||
</button>
|
<div nz-col [nzSpan]="6">
|
||||||
<button nz-button (click)="menuImport(1)" [nzLoading]="service.http.loading">
|
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||||
导入运营后台菜单
|
[button]="'none'"></sf>
|
||||||
</button>
|
</div>
|
||||||
<button nz-button (click)="delMenu(0)" [nzLoading]="service.http.loading">
|
<div nz-col [nzSpan]="8" nzOffset="1">
|
||||||
清空货主菜单
|
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||||
</button>
|
<button nz-button (click)="resetSF()">重置</button>
|
||||||
<button nz-button (click)="delMenu(1)" [nzLoading]="service.http.loading">
|
<button nz-button (click)="menuImport(0)" [nzLoading]="service.http.loading">
|
||||||
清空运营后台菜单
|
导入货主菜单
|
||||||
</button>
|
</button>
|
||||||
|
<button nz-button (click)="menuImport(1)" [nzLoading]="service.http.loading">
|
||||||
|
导入运营后台菜单
|
||||||
|
</button>
|
||||||
|
<!-- <button nz-button (click)="delMenu(0)" [nzLoading]="service.http.loading">
|
||||||
|
清空货主菜单
|
||||||
|
</button>
|
||||||
|
<button nz-button (click)="delMenu(1)" [nzLoading]="service.http.loading">
|
||||||
|
清空运营后台菜单
|
||||||
|
</button> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-card class="content-box">
|
||||||
|
|
||||||
|
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
|
||||||
|
<nz-tab nzTitle="货主菜单" (nzClick)="changeMemu('1')"></nz-tab>
|
||||||
|
<nz-tab nzTitle="运营后台菜单" (nzClick)="changeMemu('2')"></nz-tab>
|
||||||
|
</nz-tabset>
|
||||||
|
<ng-template #extraTemplate>
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<div>
|
||||||
|
<button nz-button nzType="primary" (click)="roleAction()">新增</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<st #st [data]="service.$api_get_all" [columns]="columns"
|
||||||
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
|
||||||
|
[res]="{ reName: { list: 'data' } }"
|
||||||
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
|
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||||
|
</nz-card>
|
||||||
@ -1,23 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { MenuManagerComponentsIndexComponent } from './index.component';
|
|
||||||
|
|
||||||
describe('MenuManagerComponentsIndexComponent', () => {
|
|
||||||
let component: MenuManagerComponentsIndexComponent;
|
|
||||||
let fixture: ComponentFixture<MenuManagerComponentsIndexComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [MenuManagerComponentsIndexComponent],
|
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(MenuManagerComponentsIndexComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@ -1,13 +1,16 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||||
|
import { SFComponent, SFSchema } from '@delon/form';
|
||||||
import { Menu } from '@delon/theme';
|
import { Menu } from '@delon/theme';
|
||||||
import { EAEnvironmentService } from '@shared';
|
import { EAEnvironmentService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { SettingRoleEditComponent } from 'src/app/routes/sys-setting/components/role-management/edit/edit.component';
|
||||||
import { MenuManagerService } from './../../services/menu-manager.service';
|
import { MenuManagerService } from './../../services/menu-manager.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-menu-manager-components-index',
|
selector: 'app-menu-manager-components-index',
|
||||||
templateUrl: './index.component.html',
|
templateUrl: './index.component.html',
|
||||||
styleUrls: ['./index.component.less']
|
styleUrls: ['./index.component.less', '../../../commom/less/box.less']
|
||||||
})
|
})
|
||||||
export class MenuManagerComponentsIndexComponent implements OnInit {
|
export class MenuManagerComponentsIndexComponent implements OnInit {
|
||||||
selectedPlatform!: { name: string; appId: string; enName: string };
|
selectedPlatform!: { name: string; appId: string; enName: string };
|
||||||
@ -20,19 +23,61 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
dropNext: true,
|
dropNext: true,
|
||||||
dropInner: true
|
dropInner: true
|
||||||
};
|
};
|
||||||
constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private modal: NzModalService) {}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
@ViewChild('st', { static: true })
|
||||||
|
st!: STComponent;
|
||||||
|
@ViewChild('sf', { static: false })
|
||||||
|
sf!: SFComponent;
|
||||||
|
|
||||||
|
searchSchema: SFSchema = {
|
||||||
|
properties: {
|
||||||
|
roleName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '角色名称',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
columns: STColumn[] = [
|
||||||
|
{ title: '角色名称', index: 'roleName' },
|
||||||
|
{ title: '角色描述', index: 'roleDescription' },
|
||||||
|
{ title: '创建人手机号', index: 'telephone' },
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
index: 'createTime',
|
||||||
|
className: 'text-left',
|
||||||
|
type: 'date',
|
||||||
|
sort: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: '编辑',
|
||||||
|
click: item => this.roleAction(item)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '删除',
|
||||||
|
click: item => this.deleteAction(item)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
selectedRows: any[] = [];
|
||||||
|
constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private modal: NzModalService) {
|
||||||
this.initData();
|
this.initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {}
|
||||||
|
|
||||||
initData(): void {
|
initData(): void {
|
||||||
this.platforms = [
|
this.platforms = [
|
||||||
{ name: '货主PC', appId: 'A48F72F0A304427F921794BAD86B3522', enName: 'tms-smc-web' },
|
{ name: '货主PC', appId: 'A48F72F0A304427F921794BAD86B3522', enName: 'tms-smc-web' },
|
||||||
{ name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
|
{ name: '运营后台', appId: this.envSrv.env.appId, enName: 'tms-obc-web' }
|
||||||
];
|
];
|
||||||
this.selectedPlatform = this.platforms[0];
|
this.selectedPlatform = this.platforms[0];
|
||||||
// this.platformChange(this.selectedPlatform);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
platformChange(e: { name: string; appId: string }) {
|
platformChange(e: { name: string; appId: string }) {
|
||||||
@ -50,8 +95,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
editValueChange(event: any) {
|
editValueChange(event: any) {}
|
||||||
}
|
|
||||||
|
|
||||||
menuImport(index: number) {
|
menuImport(index: number) {
|
||||||
this.selectedPlatform = this.platforms[index];
|
this.selectedPlatform = this.platforms[index];
|
||||||
@ -123,4 +167,57 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.service.request(this.service.$api_del_many, ids).subscribe(res => {});
|
this.service.request(this.service.$api_del_many, ids).subscribe(res => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
if (this.sf) {
|
||||||
|
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||||
|
}
|
||||||
|
Object.assign(requestOptions.body, { appId: this.selectedPlatform.appId });
|
||||||
|
return requestOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
stChange(e: STChange): void {
|
||||||
|
switch (e.type) {
|
||||||
|
case 'sort':
|
||||||
|
this.selectedRows = e.checkbox!;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changeMemu(key: string) {}
|
||||||
|
|
||||||
|
roleAction(item?: any) {
|
||||||
|
const modal = this.modal.create({
|
||||||
|
nzContent: SettingRoleEditComponent,
|
||||||
|
nzWidth: 900,
|
||||||
|
nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } },
|
||||||
|
nzFooter: null
|
||||||
|
});
|
||||||
|
modal.afterClose.subscribe(res => {
|
||||||
|
this.st.load();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteAction(item: any) {
|
||||||
|
this.modal.error({
|
||||||
|
nzTitle: '确认删除?',
|
||||||
|
nzClosable: false,
|
||||||
|
nzCancelText: '取消',
|
||||||
|
nzOnOk: () => {
|
||||||
|
// this.service.request(this.service.$api_dalete_role, [item.id]).subscribe(res => {
|
||||||
|
// if (res) {
|
||||||
|
// this.service.msgSrv.success('删除角色成功');
|
||||||
|
// this.st.load();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置表单
|
||||||
|
*/
|
||||||
|
resetSF() {
|
||||||
|
this.sf.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export class MenuManagerService extends BaseService {
|
|||||||
$api_add_one = `/api/mdc/cuc/functionInfo/saveFunctionInfo`;
|
$api_add_one = `/api/mdc/cuc/functionInfo/saveFunctionInfo`;
|
||||||
|
|
||||||
// 根据应用ID获取所有菜单
|
// 根据应用ID获取所有菜单
|
||||||
$api_get_all = `/scm/cuc/cuc/functionInfo/getAllFunctionInfoByAppId`;
|
$api_get_all = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId`;
|
||||||
|
|
||||||
// 根据应用ID获取菜单
|
// 根据应用ID获取菜单
|
||||||
$api_get_one = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId?_allow_badcode=true`;
|
$api_get_one = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId?_allow_badcode=true`;
|
||||||
|
|||||||
@ -16,8 +16,6 @@ export class RoleManagementComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
|
|
||||||
url = `/rule?_allow_anonymous=true`;
|
|
||||||
|
|
||||||
searchSchema: SFSchema = {
|
searchSchema: SFSchema = {
|
||||||
properties: {
|
properties: {
|
||||||
roleName: {
|
roleName: {
|
||||||
|
|||||||
@ -505,6 +505,10 @@
|
|||||||
"text": "审核驳回理由配置",
|
"text": "审核驳回理由配置",
|
||||||
"link": "/system/audit-reason-config"
|
"link": "/system/audit-reason-config"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"text": "菜单管理",
|
||||||
|
"link": "/menu-management/index"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"text": "系统配置",
|
"text": "系统配置",
|
||||||
"link": "/system/system-config"
|
"link": "/system/system-config"
|
||||||
|
|||||||
Reference in New Issue
Block a user