车辆对接
This commit is contained in:
@ -18,11 +18,11 @@
|
||||
|
||||
<div class="d-flex justify-content-end mb-sm">
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="roleAction()" >新建角色</button>
|
||||
<button nz-button nzType="primary" (click)="roleAction()">新建角色</button>
|
||||
</div>
|
||||
</div>
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
<st #st [data]="service.$api_get_role_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[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>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
@ -20,7 +20,7 @@ export class RoleManagementComponent implements OnInit {
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
receiveName: {
|
||||
roleName: {
|
||||
type: 'string',
|
||||
title: '角色名称',
|
||||
ui: { placeholder: '请输入' }
|
||||
@ -29,13 +29,14 @@ export class RoleManagementComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '角色名称', index: 'no' },
|
||||
{ title: '角色描述', index: 'description' },
|
||||
{ title: '创建人手机号', index: 'description' },
|
||||
{ title: '角色名称', index: 'roleName' },
|
||||
{ title: '角色描述', index: 'roleDescription' },
|
||||
{ title: '创建人手机号', index: 'telephone' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
index: 'createTime',
|
||||
type: 'date',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -54,20 +55,25 @@ export class RoleManagementComponent implements OnInit {
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
if (requestOptions.body?.createTime) {
|
||||
Object.assign(requestOptions.body, { sort: 'createTime.' + requestOptions.body.createTime });
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
case 'sort':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-20 17:18:43
|
||||
* @LastEditTime: 2021-12-27 11:33:56
|
||||
* @LastEditTime: 2021-12-27 14:09:14
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\sys-setting\services\system.service.ts
|
||||
@ -13,8 +13,6 @@ import { BaseService } from 'src/app/shared/services';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SystemService extends BaseService {
|
||||
|
||||
|
||||
// 分页查询企业项目员工列表
|
||||
$api_get_enterprise_staff_page = '/api/mdc/cuc/userApp/getEnterpriseProjectStaffListPage';
|
||||
// 添加员工
|
||||
@ -25,7 +23,10 @@ export class SystemService extends BaseService {
|
||||
$api_delete_staff = '/api/mdc/cuc/userApp/deleteAppUser';
|
||||
// 冻结或恢复员工
|
||||
$api_free_or_resume_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff';
|
||||
|
||||
|
||||
// 分页获取应用角色列表
|
||||
$api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList';
|
||||
|
||||
// 查询字典选项列表
|
||||
$api_get_dict_page = '/api/mdc/pbc/dictItems/list/page';
|
||||
// 根据id批量删除字典选项
|
||||
@ -35,7 +36,6 @@ export class SystemService extends BaseService {
|
||||
// 更新字典选项
|
||||
$api_update_dict = '/api/mdc/pbc/dictItems/update';
|
||||
|
||||
|
||||
// 获取CRM客户信息表
|
||||
$api_get_crmCustomer = '/api/mdc/crmCustomer/get';
|
||||
// 查询CRM客户信息表
|
||||
|
||||
Reference in New Issue
Block a user