Browse Source

用户管理页面样式优化

beijing
陈鹏飞 3 years ago
parent
commit
dab147a512
  1. 2
      src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html
  2. 12
      src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html
  3. 1
      src/app/pages/audit/audit-ing/audit-ing.component.html
  4. 21
      src/app/pages/audit/audit-ing/audit-ing.component.ts
  5. 25
      src/app/pages/audit/audit-ing/user-details/user-details.component.html
  6. 66
      src/app/pages/audit/audit-ing/user-details/user-details.component.scss
  7. 21
      src/app/pages/audit/audit-ing/user-details/user-details.component.ts
  8. 2
      src/app/pages/audit/audit-record/audit-record.component.html
  9. 14
      src/app/pages/audit/audit-record/audit-record.component.ts
  10. 8
      src/app/pages/pages.module.ts
  11. 4
      src/app/system-management/system-management.module.ts
  12. 7
      src/app/system-management/user/adduser/adduser.component.ts
  13. 3
      src/app/system-management/user/edituser/edituser.component.ts
  14. 26
      src/app/system-management/user/user.component.html
  15. 94
      src/app/system-management/user/user.component.ts
  16. 7
      src/theme.less

2
src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html

@ -31,6 +31,4 @@
<div class="cutoffrule"></div>
<p>审核说明: {{data.auditLog? data.auditLog.rejectReason : ''}}</p>
</div>
</div>

12
src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html

@ -64,6 +64,18 @@
<div class="cutoffrule"></div>
<p>说明: &nbsp;&nbsp;{{data.getData.remark}}</p>
</div>
<div *ngIf="data.auditType == 4">
<p>账号: &nbsp;&nbsp;{{data.getData.userName}}</p>
<div class="cutoffrule"></div>
<p>姓名: &nbsp;&nbsp;{{data.getData.name}}</p>
<div class="cutoffrule"></div>
<p>所属机构: &nbsp;&nbsp;{{data.getData.organizationName}}</p>
<div class="cutoffrule"></div>
<p>角色: &nbsp;&nbsp; <span style="margin-right: 8px;"
*ngFor="let item of data.getData.roleDisplayNames">{{item}}</span></p>
<div class="cutoffrule"></div>
<p>手机号: &nbsp;&nbsp;{{data.getData.phoneNumber}}</p>
</div>
<div class="cutoffrule"></div>
<p [hidden]="data.getData.imageUrl === undefined">附件: &nbsp;&nbsp;</p>
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'img'" [src]="data.getData.imageUrl"

1
src/app/pages/audit/audit-ing/audit-ing.component.html

@ -26,6 +26,7 @@
<span *ngIf="item.auditType == 1">经营类证照提醒时间</span>
<span *ngIf="item.auditType == 2">经营类证照</span>
<span *ngIf="item.auditType == 3">资产类证照</span>
<span *ngIf="item.auditType == 4">用户信息</span>
</td>
<td><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td>

21
src/app/pages/audit/audit-ing/audit-ing.component.ts

@ -9,6 +9,7 @@ import { DetailsUpdateCategoryComponent } from '../../license/update-category/de
import { AuditDetailsInformTimeComponent } from '../audit-inform-time/audit-details-inform-time/audit-details-inform-time.component';
import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component';
import { AuditDisposeComponent } from './audit-dispose/audit-dispose.component';
import { UserDetailsComponent } from './user-details/user-details.component';
@Component({
selector: 'app-audit-ing',
@ -80,10 +81,9 @@ export class AuditIngComponent implements OnInit {
dispose(item) {
// if (item.auditStatus != 1) {
// return
// }
console.log(item)
this.getData(item).then(res => {
console.log('审批具体信息', res)
item.getData = res
const modal = this.modal.create({
nzContent: AuditDisposeComponent,
@ -107,15 +107,6 @@ export class AuditIngComponent implements OnInit {
nzOnOk: async () => {
await new Promise(resolve => {
let url = '/api/services/app/ContentAuditLog/Audit'
// if (item.auditType == 0) {
// url = '/api/services/app/GasStation/Audit'
// } else if (item.auditType == 1) {
// url = '/api/services/app/OrganizationValidityLicenseRule/Audit'
// } else if (item.auditType == 2) {
// url = '/api/services/app/StationValidityLicense/Audit'
// } else if (item.auditType) {
// url = '/api/services/app/StationFileLicense/Audit'
// }
let params = {
id: item.id,
rejectReason: instance.textarea
@ -144,14 +135,14 @@ export class AuditIngComponent implements OnInit {
component = GasBaseInfoComponent
} else if (item.auditType == 1) {
component = AuditDetailsInformTimeComponent
} else if (item.auditType == 2) {
component = DetailsUpdateCategoryComponent
} else if (item.auditType == 4) {
component = UserDetailsComponent
} else if (item.auditType) {
component = DetailsFileCategoryComponent
}
this.getData(item).then((res: any) => {
// console.log('res', res)
item.getData = res
if (item.auditType == 1) {
item.getData.isYearlyCheckDefault = res.licenseType.isYearlyCheck
@ -191,6 +182,8 @@ export class AuditIngComponent implements OnInit {
url = '/api/services/app/OrganizationValidityLicenseRule/Get'
} else if (item.auditType == 2) {
url = '/api/services/app/StationValidityLicense/Get'
} else if (item.auditType == 4) {
url = '/api/services/app/EdittingUser/Get'
} else if (item.auditType) {
url = '/api/services/app/StationFileLicense/Get'
}

25
src/app/pages/audit/audit-ing/user-details/user-details.component.html

@ -0,0 +1,25 @@
<div class="box" id="detailsUser">
<div class="title">
<div class="titlecontent">
详情
</div>
<i nz-icon nzType="close" nzTheme="outline" (click)="destroyModal()"></i>
</div>
<div class="content">
<p>账号: {{ data.userName}}</p>
<div class="cutoffrule"></div>
<p>姓名: {{ data.name}}</p>
<div class="cutoffrule"></div>
<p>所属机构: {{data.organizationName}}</p>
<div class="cutoffrule"></div>
<p>角色: <span style="margin-right: 8px;" *ngFor="let item of data.roleDisplayNames">{{item}}</span></p>
<div class="cutoffrule"></div>
<p>手机号: {{ data.phoneNumber}}</p>
<div class="cutoffrule"></div>
<p>审核状态: {{data.auditStatus | auditStatus}}</p>
<div class="cutoffrule"></div>
<p>审核说明: {{data.auditLog? data.auditLog.rejectReason : ''}}</p>
</div>
</div>

66
src/app/pages/audit/audit-ing/user-details/user-details.component.scss

@ -0,0 +1,66 @@
.box {
.title {
font-family: sybold;
width: 100%;
height: 48px;
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
display: flex;
align-items: center;
position: relative;
.titlecontent {
width: 100%;
height: 32px;
line-height: 32px;
background: linear-gradient(270deg, rgba(35, 153, 255, 0) 0%, rgba(35, 153, 255, 0.57) 50%, rgba(35, 153, 255, 0) 100%);
text-align: center;
color: #91CCFF;
font-size: 16px;
}
i {
position: absolute;
right: 12px;
color: #fff;
font-size: 18px;
cursor: pointer;
}
}
.content {
box-sizing: border-box;
padding: 0 15px;
max-height: 580px;
overflow-y: auto;
.circle {
width: 8px;
height: 8px;
background: linear-gradient(180deg, #36A2FF 0%, #FFFFFF 100%);
opacity: 1;
}
.recordP {
display: flex;
justify-content: space-between;
align-items: center;
}
}
p {
margin-bottom: 0;
color: #C4E2FC;
margin: 12px 0;
img {
width: 88px;
height: 56px;
cursor: pointer;
}
}
.flexp {
display: flex;
justify-content: space-between;
}
}

21
src/app/pages/audit/audit-ing/user-details/user-details.component.ts

@ -0,0 +1,21 @@
import { Component, Input, OnInit } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-user-details',
templateUrl: './user-details.component.html',
styleUrls: ['./user-details.component.scss']
})
export class UserDetailsComponent implements OnInit {
@Input() data?: any;
constructor(private modal: NzModalRef) { }
ngOnInit(): void {
console.log(this.data)
}
destroyModal() {
this.modal.destroy({ data: 'this the result data' });
}
}

2
src/app/pages/audit/audit-record/audit-record.component.html

@ -9,6 +9,7 @@
<nz-option *ngIf="level" nzValue="1" nzLabel="经营类证照提醒时间"></nz-option>
<nz-option *ngIf="!level" nzValue="2" nzLabel="经营类证照"></nz-option>
<nz-option *ngIf="!level" nzValue="3" nzLabel="资产类证照"></nz-option>
<nz-option *ngIf="level" nzValue="4" nzLabel="用户信息"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -115,6 +116,7 @@
<span *ngIf="item.auditType == 1">经营类证照提醒时间</span>
<span *ngIf="item.auditType == 2">经营类证照</span>
<span *ngIf="item.auditType == 3">资产类证照</span>
<span *ngIf="item.auditType == 4">用户信息</span>
</td>
<!-- <td><label *ngIf="item.gasStation">{{item.gasStation.stationName}}</label></td>
<td><label *ngIf="item.gasStation">{{item.gasStation.locationName}}</label></td> -->

14
src/app/pages/audit/audit-record/audit-record.component.ts

@ -8,6 +8,7 @@ import { TreeService } from 'src/app/service/tree.service';
import { DetailsFileCategoryComponent } from '../../license/file-category/details-file-category/details-file-category.component';
import { DetailsUpdateCategoryComponent } from '../../license/update-category/details-update-category/details-update-category.component';
import { AuditDetailsInformTimeComponent } from '../audit-inform-time/audit-details-inform-time/audit-details-inform-time.component';
import { UserDetailsComponent } from '../audit-ing/user-details/user-details.component';
import { GasBaseInfoComponent } from '../gas-base-info/gas-base-info.component';
@Component({
@ -123,7 +124,7 @@ export class AuditRecordComponent implements OnInit {
typeLoading
typeList
typeListOfUsers
typeListOfStationData
typeListOfUpdate
typeListOfFile
@ -153,10 +154,11 @@ export class AuditRecordComponent implements OnInit {
Promise.all(promiseArr).then((result) => {
// console.log('审批类型', result)
this.typeListOfUsers = [{ licenseName: '用户信息' }]
this.typeListOfStationData = [{ licenseName: '油站信息' }]
this.typeListOfUpdate = result[0].result.items
this.typeListOfFile = result[1].result.items
this.typeList = [...this.typeListOfStationData, ...this.typeListOfUpdate, ...this.typeListOfFile]
this.typeList = [...this.typeListOfUsers, ...this.typeListOfStationData, ...this.typeListOfUpdate, ...this.typeListOfFile]
this.typeLoading = false
}).catch((error) => {
@ -212,6 +214,7 @@ export class AuditRecordComponent implements OnInit {
}
details(item) {
console.log('item', item)
let or = item
let component
if (item.auditType == 0) {
@ -220,6 +223,8 @@ export class AuditRecordComponent implements OnInit {
component = AuditDetailsInformTimeComponent
} else if (item.auditType == 2) {
component = DetailsUpdateCategoryComponent
} else if (item.auditType == 4) {
component = UserDetailsComponent
} else if (item.auditType) {
component = DetailsFileCategoryComponent
}
@ -263,6 +268,8 @@ export class AuditRecordComponent implements OnInit {
url = '/api/services/app/OrganizationValidityLicenseRule/Get'
} else if (item.auditType == 2) {
url = '/api/services/app/StationValidityLicense/Get'
} else if (item.auditType == 4) {
url = '/api/services/app/EdittingUser/Get'
} else if (item.auditType) {
url = '/api/services/app/StationFileLicense/Get'
}
@ -280,6 +287,9 @@ export class AuditRecordComponent implements OnInit {
if (item.auditType == 2 || item.auditType == 3) {
data.result.auditLogId = item.id
}
if (item.auditType == 4) {
data.result.auditLog = auditLog
}
resolve(data.result)
})
})

8
src/app/pages/pages.module.ts

@ -86,11 +86,12 @@ import { EditAnnualInspectionComponent } from './audit/annual-inspection/edit-an
import { DisposeequipmentComponent } from './records/warning-statistics-list/disposeequipment/disposeequipment.component';
import { WarningStatisticsListComponent } from './records/warning-statistics-list/warning-statistics-list.component';
import { RecordsNavComponent } from './records/records-nav/records-nav.component';
import { UserDetailsComponent } from './audit/audit-ing/user-details/user-details.component';
@NgModule({
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent,
TodayWarningAdminComponent, CriminalRecordsAdminComponent, LeftDomainComponent, EquipmentInfoComponent, OilStationInfoComponent,
AddequipmentComponent, EditequipmentComponent, PlanAdminComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, HomePageComponent, OilUnloadingProcessListComponent, ChangePasswordComponent, FacilitySortPipe, WarningStatisticsListComponent, DisposeequipmentComponent, NavBarComponent, InformComponent, UpdateCategoryComponent, FileCategoryComponent, HistoriesComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, OilStationListComponent, UpdateLicenseListComponent, FileLicenseListComponent, AuditNavComponent, AuditIngComponent, AuditRecordComponent, AuditInformTimeComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, auditStatusPipe, GasBaseInfoComponent, notificationContent, licenseViolationType, handleState, AnnualInspectionComponent, EditAnnualInspectionComponent, RecordsNavComponent],
AddequipmentComponent, EditequipmentComponent, PlanAdminComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, HomePageComponent, OilUnloadingProcessListComponent, ChangePasswordComponent, FacilitySortPipe, WarningStatisticsListComponent, DisposeequipmentComponent, NavBarComponent, InformComponent, UpdateCategoryComponent, FileCategoryComponent, HistoriesComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, OilStationListComponent, UpdateLicenseListComponent, FileLicenseListComponent, AuditNavComponent, AuditIngComponent, AuditRecordComponent, AuditInformTimeComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, auditStatusPipe, GasBaseInfoComponent, notificationContent, licenseViolationType, handleState, AnnualInspectionComponent, EditAnnualInspectionComponent, RecordsNavComponent, UserDetailsComponent],
imports: [
@ -134,8 +135,9 @@ import { RecordsNavComponent } from './records/records-nav/records-nav.component
NzToolTipModule,
NzTimelineModule
],
entryComponents: [AddequipmentComponent, EditequipmentComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, ChangePasswordComponent, DisposeequipmentComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, GasBaseInfoComponent, EditAnnualInspectionComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
entryComponents: [AddequipmentComponent, EditequipmentComponent, GetOutOfLineDetailsComponent, DispositionComponent, OilUnloadingProcessComponent, ChangePasswordComponent, DisposeequipmentComponent, EditUpdateCategoryComponent, DetailsUpdateCategoryComponent, EditFileCategoryComponent, DetailsFileCategoryComponent, PdfWordLookComponent, AuditDisposeComponent, EditInformTimeComponent, AuditDetailsInformTimeComponent, GasBaseInfoComponent, EditAnnualInspectionComponent, UserDetailsComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
exports: [auditStatusPipe]
})
export class PagesModule { }

4
src/app/system-management/system-management.module.ts

@ -44,6 +44,7 @@ import { MenuComponent } from './menu/menu.component';
import { AddmenuComponent } from './menu/addmenu/addmenu.component';
import { EditmenuComponent } from './menu/editmenu/editmenu.component';
import { MenusComponent } from './role/menus/menus.component';
import { PagesModule } from '../pages/pages.module';
@NgModule({
declarations: [OrganizationComponent, UserComponent, RoleComponent, NavigationComponent, AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, PushComponent, EditPushItemComponent, FileOfLicenseComponent, UpdateOfLicenseComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent, MenuComponent, AddmenuComponent, EditmenuComponent, MenusComponent],
imports: [
@ -65,7 +66,8 @@ import { MenusComponent } from './role/menus/menus.component';
NzTreeModule,
NzSpinModule,
NzTreeSelectModule,
NzCheckboxModule
NzCheckboxModule,
PagesModule
],
entryComponents: [AdduserComponent, EdituserComponent, AddroleComponent, EditroleComponent, AddorComponent, EditorComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, EditPushItemComponent, AddFileOfLicenseComponent, EditFileOfLicenseComponent, AddUpdateOfLicenseComponent, EditUpdateOfLicenseComponent, AddmenuComponent, EditmenuComponent, MenusComponent]

7
src/app/system-management/user/adduser/adduser.component.ts

@ -43,12 +43,12 @@ export class AdduserComponent implements OnInit {
this.http.get('/api/services/app/Role/GetAll', {
params: params
}).subscribe((data: any) => {
console.log('角色列表', data.result.items)
// console.log('角色列表', data.result.items)
this.listOfData = data.result.items
})
}
//获取所有组织机构
nodes:any = []
nodes: any = []
getAllOrganization() {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = {
@ -59,6 +59,9 @@ export class AdduserComponent implements OnInit {
params: params
}).subscribe((data: any) => {
data.result.items.forEach(element => {
if (element.id == OrganizationUnitId) {
element.parentId = null
}
element.key = element.id
element.title = element.displayName
});

3
src/app/system-management/user/edituser/edituser.component.ts

@ -66,6 +66,9 @@ export class EdituserComponent implements OnInit {
params: params
}).subscribe((data: any) => {
data.result.items.forEach(element => {
if (element.id == OrganizationUnitId) {
element.parentId = null
}
element.key = element.id
element.title = element.displayName
});

26
src/app/system-management/user/user.component.html

@ -71,8 +71,9 @@
<th>姓名</th>
<th [width]="'30%'">角色</th>
<th>所属机构</th>
<th>状态</th>
<th [width]="'20%'">操作</th>
<th *ngIf="level == 2">审核状态</th>
<th>用户状态</th>
<th [width]="'25%'">操作</th>
</tr>
</thead>
<tbody>
@ -86,17 +87,26 @@
<td>
{{data.organizationName}}
</td>
<td *ngIf="level == 2">
{{data.auditStatus | auditStatus}}
</td>
<td>
状态
<ng-container *ngIf="data.isActive; else elseTemplate">
<span class="greenColor2">已启用</span>
</ng-container>
<ng-template #elseTemplate>
<span class="redColor">已停用</span>
</ng-template>
</td>
<td class="operation">
<a (click)="editUser(data)">编辑</a>
<a (click)="resetPassword(data)">重置密码</a>
<a (click)="audit(data,true)">提交审核</a>
<a (click)="audit(data,false)">撤销审核</a>
<a class="redColor" (click)="cancel(data,true)">注销</a>
<a class="greenColor2" (click)="cancel(data,false)">启用</a>
<!-- <a (click)="delete(data)">删除</a> -->
<a (click)="audit(data,true)"
*ngIf="data.auditStatus == 0 || data.auditStatus == 3 || data.auditStatus == 4 || data.auditStatus == 5">提交审核</a>
<a (click)="audit(data,false)" *ngIf="data.auditStatus == 1">撤销审核</a>
<a *ngIf="!data.isActive" class="greenColor2" (click)="cancel(data,true)">启用</a>
<a *ngIf="data.isActive" class="redColor" (click)="cancel(data,false)">停用</a>
<a class="redColor" (click)="delete(data)">注销</a>
</td>
</tr>
</tbody>

94
src/app/system-management/user/user.component.ts

@ -16,10 +16,27 @@ export class UserComponent implements OnInit {
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
level
getAllUrl
addUrl
editUrl
deleteUrl
ngOnInit(): void {
this.validateForm = this.fb.group({
search: [null]
});
this.level = JSON.parse(sessionStorage.getItem("userdata")).organization.level
if (this.level == 1) {
this.getAllUrl = '/api/services/app/User/GetAll'
this.addUrl = '/api/services/app/User/Create'
this.editUrl = '/api/services/app/User/Update'
this.deleteUrl = '/api/services/app/User/Delete'
} else {
this.getAllUrl = '/api/services/app/EdittingUser/GetAll'
this.addUrl = '/api/services/app/EdittingUser/Create'
this.editUrl = '/api/services/app/EdittingUser/Update'
this.deleteUrl = '/api/services/app/EdittingUser/Delete'
}
this.getAllOrganization()
this.getAllRoles()
}
@ -43,7 +60,7 @@ export class UserComponent implements OnInit {
OrganizationUnitId: this.OrganizationUnitId,
IsContainsChildren: String(this.IsContainsChildren)
}
this.http.get('/api/services/app/User/GetAll', {
this.http.get(this.getAllUrl, {
params: params
}).subscribe((data: any) => {
this.usersLIst = data.result.items
@ -169,7 +186,7 @@ export class UserComponent implements OnInit {
phoneNumber: instance.validateForm.value.phonenum,
isActive: true
}
this.http.post('/api/services/app/User/Create', body).subscribe(data => {
this.http.post(this.addUrl, body).subscribe(data => {
resolve(data)
this.message.create('success', '创建成功!');
this.SkipCount = 0
@ -218,7 +235,7 @@ export class UserComponent implements OnInit {
phoneNumber: instance.validateForm.value.phonenum,
isActive: true
}
this.http.put('/api/services/app/User/Update', body).subscribe(data => {
this.http.put(this.editUrl, body).subscribe(data => {
resolve(data)
this.message.create('success', '编辑成功!');
this.getAllUsers()
@ -260,19 +277,60 @@ export class UserComponent implements OnInit {
});
}
//提交审核
audit(data, type) {
if (type && data.auditStatus == 5) {//提交审核
this.message.create('warning', '审核完成的不能重复提交,请编辑后提交');
return
}
let url
type ? url = '/api/services/app/EdittingUser/Commit' : url = '/api/services/app/EdittingUser/Uncommit'
this.http.post(url, '', {
params: {
id: data.id
}
}).subscribe(data => {
this.message.create('success', type ? '提交审核成功' : '撤销审核成功');
this.getAllUsers()
}, err => {
this.message.create('error', type ? '提交审核失败' : '撤销审核失败');
})
}
//停用启用
cancel(data, type) {
let url
if (this.level == 1) {
type ? url = '/api/services/app/User/Activate' : url = '/api/services/app/User/DeActivate'
} else {
type ? url = '/api/services/app/EdittingUser/Activate' : url = '/api/services/app/EdittingUser/DeActivate'
}
let body = {
id: data.id
}
this.http.post(url, body).subscribe(data => {
this.message.create('success', type ? '启用成功' : '停用成功');
this.getAllUsers()
}, err => {
this.message.create('error', type ? '启用失败' : '停用失败');
})
}
//删除
delete(item) {
this.modal.confirm({
nzTitle: `确定要删除${item.userName}这个账户吗?`,
nzTitle: `确定要注销${item.userName}这个账户吗?`,
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
this.http.delete('/api/services/app/User/Delete', {
this.http.delete(this.deleteUrl, {
params: {
Id: item.id
}
}).subscribe(data => {
this.message.create('success', '删除成功!');
this.message.create('success', '注销成功!');
this.getAllUsers()
})
},
@ -282,28 +340,4 @@ export class UserComponent implements OnInit {
}
});
}
audit(data, type) {
}
cancel(data, type) {
this.modal.confirm({
nzTitle: `判定要注销${data.userName}用户吗?`,
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
let body = {
// id: this.data.id,
}
this.http.post('/api/services/app/ViolateRecordVerification/VerifyViolateRecord', body).subscribe(data => {
this.message.create('success', '已注销');
}, err => {
this.message.create('error', '注销失败');
})
},
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')
});
}
}

7
src/theme.less

@ -22,6 +22,10 @@
color: rgb(24, 187, 24);
}
.greenColor2:hover {
color: rgb(24, 187, 24);
}
.redColor {
color: #FF4B65;
}
@ -188,6 +192,7 @@
#disposeequipment,
#editupdatecategory,
#detailsupdatecategory,
#detailsUser,
#editfilecategory,
#detailsfilecategory {
@ -231,6 +236,7 @@
#disposeequipment,
#editupdatecategory,
#detailsupdatecategory,
#detailsUser,
#editfilecategory,
#detailsfilecategory,
#inform {
@ -277,6 +283,7 @@
//证件弹出框
#editupdatecategory,
#detailsupdatecategory,
#detailsUser,
#editfilecategory,
#detailsfilecategory {
nz-form-item {

Loading…
Cancel
Save