Browse Source

[完善]重置密码框完善

beijing
邵佳豪 2 years ago
parent
commit
0e279ac44e
  1. 18
      src/app/system-management/user/user.component.html
  2. 11
      src/app/system-management/user/user.component.scss
  3. 577
      src/app/system-management/user/user.component.ts
  4. 5
      内网部署流程.md

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

@ -1,10 +1,26 @@
<div class="userBox" id="userBox">
<div class="resetPasswordContent" *ngIf="isShowNewPassword" cdkDrag>
<div class="titlebox">
<i nz-icon class="move" cdkDragHandle>
<svg t="1676340756365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="2843" width="18" height="18">
<path
d="M501.0944 1021.824c6.9376 2.8928 14.8224 2.8928 21.8112 0 3.4304-1.4336 6.528-3.4816 9.1136-6.0672 0.0256 0 0.0768-0.0256 0.0768-0.0256l158.9248-158.9248c11.1104-11.1104 11.1104-29.1328 0-40.2176-11.0848-11.0848-29.0816-11.0848-40.1664 0.0256l-110.4384 110.4128 0.0256-335.36c0-15.6928-12.7232-28.416-28.416-28.416s-28.416 12.6976-28.416 28.3904l0 335.3856-110.4128-110.4128c-11.1104-11.0848-29.1072-11.0848-40.1408 0-11.1104 11.1104-11.136 29.1072-0.0512 40.192l158.9504 158.9248c0.8192 0.8192 1.8944 1.1776 2.816 1.8688C496.7168 1019.1872 498.688 1020.8256 501.0944 1021.824z"
fill="#272636" p-id="2844"></path>
<path
d="M522.9056 2.176c-6.9376-2.8928-14.8224-2.8928-21.7856 0C497.6896 3.584 494.592 5.632 491.9808 8.2176c-0.0256 0-0.0768 0.0512-0.0768 0.0512L332.9792 167.168c-11.1104 11.1104-11.1104 29.1328 0 40.2176 11.0848 11.0848 29.0816 11.0848 40.1664-0.0256l110.4384-110.4128-0.0256 335.36c0 15.6928 12.7232 28.416 28.416 28.416 15.6928 0 28.4416-12.6976 28.4416-28.3904L540.416 96.9472l110.4128 110.4128c11.1104 11.0848 29.1072 11.0848 40.1408 0 11.1104-11.1104 11.1616-29.1072 0.0512-40.192l-158.9504-158.8992c-0.8192-0.8448-1.8944-1.2032-2.816-1.8944C527.2832 4.8128 525.312 3.1744 522.9056 2.176z"
fill="#272636" p-id="2845"></path>
<path
d="M1021.824 522.9056c2.8928-6.9376 2.8928-14.8224 0-21.8112-1.408-3.4304-3.456-6.528-6.0416-9.1136 0-0.0256-0.0512-0.0768-0.0512-0.0768l-158.8992-158.9248c-11.1104-11.1104-29.1584-11.1104-40.2432 0-11.0592 11.0848-11.0592 29.0816 0.0512 40.1664l110.3872 110.4384-335.36-0.0256c-15.6928 0-28.3904 12.7232-28.3904 28.416s12.6976 28.416 28.3904 28.416l335.36 0-110.3872 110.4128c-11.1104 11.1104-11.1104 29.1072 0 40.1408 11.1104 11.1104 29.1072 11.136 40.192 0.0512l158.8992-158.9504c0.8448-0.8192 1.2032-1.8944 1.8944-2.816C1019.1872 527.2832 1020.8256 525.312 1021.824 522.9056z"
fill="#272636" p-id="2846"></path>
<path
d="M2.176 501.0944c-2.8928 6.9376-2.8928 14.8224 0 21.7856 1.408 3.456 3.456 6.5536 6.0416 9.1392l0.0512 0.0512 158.8992 158.9504c11.1104 11.1104 29.1584 11.1104 40.2432 0 11.0592-11.1104 11.0592-29.1072-0.0512-40.192l-110.3872-110.4384 335.36 0.0512c15.6928 0 28.3904-12.7488 28.3904-28.416 0-15.6928-12.6976-28.4416-28.3904-28.4416l-335.36 0.0256 110.3872-110.4128c11.1104-11.1104 11.1104-29.1072 0-40.1408-11.1104-11.1104-29.1072-11.1616-40.192-0.0512l-158.8992 158.9504c-0.8448 0.8192-1.2032 1.8944-1.8944 2.816C4.8128 496.7168 3.1744 498.688 2.176 501.0944z"
fill="#272636" p-id="2847"></path>
</svg>
</i>
<i (click)="close()" class="close" nz-icon nzType="close" nzTheme="outline"></i>
<i nz-icon [nzType]="'check-circle'" [nzTheme]="'twotone'" [nzTwotoneColor]="'#52c41a'"></i>
<span class="title">用户{{newPasswordObj.userName}}的密码重置成功</span>
</div>
<div class="message">
当前密码为: {{newPasswordObj.newPassword}}

11
src/app/system-management/user/user.component.scss

@ -184,7 +184,7 @@
flex-direction: column;
justify-content: center;
box-sizing: border-box;
padding-left: 30px;
padding-left: 40px;
color: #000;
border-radius: 5px;
border-radius: 2px;
@ -208,11 +208,18 @@
.close {
position: absolute;
right: 0px;
right: 2px;
top: -22px;
font-size: 16px;
cursor: pointer;
}
.move {
position: absolute;
left: -32px;
top: -22px;
cursor: move;
}
}
.message {

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

@ -1,179 +1,224 @@
import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AdduserComponent } from './adduser/adduser.component';
import { NzMessageService } from 'ng-zorro-antd/message';
import { HttpClient } from '@angular/common/http';
import { EdituserComponent } from './edituser/edituser.component';
import { TreeService } from 'src/app/service/tree.service';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import {
Component,
OnInit,
TemplateRef,
ViewChild,
ViewContainerRef,
} from "@angular/core";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import {
NzFormatEmitEvent,
NzTreeComponent,
NzTreeNodeOptions,
} from "ng-zorro-antd/tree";
import { NzModalService } from "ng-zorro-antd/modal";
import { AdduserComponent } from "./adduser/adduser.component";
import { NzMessageService } from "ng-zorro-antd/message";
import { HttpClient } from "@angular/common/http";
import { EdituserComponent } from "./edituser/edituser.component";
import { TreeService } from "src/app/service/tree.service";
import { NzNotificationService } from "ng-zorro-antd/notification";
@Component({
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.scss']
selector: "app-user",
templateUrl: "./user.component.html",
styleUrls: ["./user.component.scss"],
})
export class UserComponent implements OnInit {
@ViewChild('newPassword', { static: false }) newPasswordtemplate?: TemplateRef<{}>;
@ViewChild("newPassword", { static: false })
newPasswordtemplate?: TemplateRef<{}>;
validateForm!: FormGroup;
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService, private notification: NzNotificationService, private notificationService: NzNotificationService) { }
constructor(
private fb: FormBuilder,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef,
private message: NzMessageService,
private http: HttpClient,
private toTree: TreeService,
private notification: NzNotificationService,
private notificationService: NzNotificationService
) {}
level
getAllUrl
addUrl
editUrl
deleteUrl
CountsByOrganizations
level;
getAllUrl;
addUrl;
editUrl;
deleteUrl;
CountsByOrganizations;
ngOnInit(): void {
this.validateForm = this.fb.group({
search: [null]
search: [null],
});
this.level = JSON.parse(sessionStorage.getItem("userdata")).organization.level
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'
this.CountsByOrganizations = '/api/services/app/User/GetCountsByOrganizations'
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";
this.CountsByOrganizations =
"/api/services/app/User/GetCountsByOrganizations";
} 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.CountsByOrganizations = '/api/services/app/EdittingUser/GetCountsByOrganizations'
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.CountsByOrganizations =
"/api/services/app/EdittingUser/GetCountsByOrganizations";
}
this.getAllOrganization()
this.getAllRoles()
this.getAllRoles2()
this.getAllOrganization();
this.getAllRoles();
this.getAllRoles2();
}
nzSelectedKeys: any[] = []
nzSelectedKeys: any[] = [];
defaultExpandedKeys = [];
IsContainsChildren = true
searchValue = '';
totalCount: string
IsContainsChildren = true;
searchValue = "";
totalCount: string;
//获取所有用户
usersLIst: any = []
usersNum: string
OrganizationUnitId
usersLIst: any = [];
usersNum: string;
OrganizationUnitId;
loading: boolean;
organizationsList = []
organizationsList = [];
getAllUsers() {
this.loading = true
this.loading = true;
let params = {
Keyword: this.validateForm.value.search ? this.validateForm.value.search : '',
Keyword: this.validateForm.value.search
? this.validateForm.value.search
: "",
SkipCount: String(this.SkipCount),
MaxResultCount: String(this.MaxResultCount),
OrganizationUnitId: this.OrganizationUnitId,
IsContainsChildren: String(this.IsContainsChildren),
// Sorting: 'BuildingBasicInfo.Id asc'
}
this.http.get(this.getAllUrl, {
params: params
}).subscribe((data: any) => {
this.usersLIst = data.result.items
this.usersNum = data.result.totalCount
console.log('所有用户', this.usersLIst)
this.loading = false
})
};
this.http
.get(this.getAllUrl, {
params: params,
})
.subscribe((data: any) => {
this.usersLIst = data.result.items;
this.usersNum = data.result.totalCount;
console.log("所有用户", this.usersLIst);
this.loading = false;
});
}
SkipCount: number = 0 //0 16 32 48
MaxResultCount: number = 16
SkipCount: number = 0; //0 16 32 48
MaxResultCount: number = 16;
pageChange($event) {
this.SkipCount = ($event - 1) * this.MaxResultCount
this.getAllUsers()
this.SkipCount = ($event - 1) * this.MaxResultCount;
this.getAllUsers();
}
listOfData: any = []
listOfData2: any = []
listOfData: any = [];
listOfData2: any = [];
//获取角色列表
async getAllRoles() {
let params = {
SkipCount: '0',
MaxResultCount: '999'
}
SkipCount: "0",
MaxResultCount: "999",
};
await new Promise<void>((resolve, reject) => {
this.http.get('/api/services/app/Role/GetAll', {
params: params
}).subscribe((data: any) => {
resolve(data)
this.listOfData = data.result.items
})
})
this.http
.get("/api/services/app/Role/GetAll", {
params: params,
})
.subscribe((data: any) => {
resolve(data);
this.listOfData = data.result.items;
});
});
}
async getAllRoles2() {
let params = {
SkipCount: '0',
MaxResultCount: '999',
IsViolationRoles: 'true'
}
SkipCount: "0",
MaxResultCount: "999",
IsViolationRoles: "true",
};
await new Promise<void>((resolve, reject) => {
this.http.get('/api/services/app/Role/GetAll', {
params: params
}).subscribe((data: any) => {
resolve(data)
this.listOfData2 = data.result.items
})
})
this.http
.get("/api/services/app/Role/GetAll", {
params: params,
})
.subscribe((data: any) => {
resolve(data);
this.listOfData2 = data.result.items;
});
});
}
//获取所有组织机构
nodes: any = []
organization
nodes: any = [];
organization;
async getAllOrganization() {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true"
}
IsContainsChildren: "true",
};
await new Promise<void>((resolve, reject) => {
this.http.get('/api/services/app/Organization/GetAll', {
params: params
}).subscribe(async (data: any) => {
this.organization = data.result.items
await this.getuser(data.result.items)
resolve(data)
this.getAllUsers()
})
})
this.http
.get("/api/services/app/Organization/GetAll", {
params: params,
})
.subscribe(async (data: any) => {
this.organization = data.result.items;
await this.getuser(data.result.items);
resolve(data);
this.getAllUsers();
});
});
}
async getuser(e) {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let OrganizationUnitId =
sessionStorage.getItem("isGasStation") == "true"
? JSON.parse(sessionStorage.getItem("userdataOfgasstation"))
.organization.id
: JSON.parse(sessionStorage.getItem("userdata")).organization.id;
let params = {
OrganizationUnitId: OrganizationUnitId,
IsContainsChildren: "true",
IsUsersCountContainsChildren: String(this.IsContainsChildren)
}
IsUsersCountContainsChildren: String(this.IsContainsChildren),
};
await new Promise<void>((resolve, reject) => {
this.http.get(this.CountsByOrganizations, {
params: params
}).subscribe((data: any) => {
resolve(data)
this.organizationsList = data.result
const arrs = e.map(item => {
const data = this.organizationsList.find(i => item.id == i.organizationId)
return {
...item,
products: data ? data : false
}
this.http
.get(this.CountsByOrganizations, {
params: params,
})
.subscribe((data: any) => {
resolve(data);
this.organizationsList = data.result;
const arrs = e.map((item) => {
const data = this.organizationsList.find(
(i) => item.id == i.organizationId
);
return {
...item,
products: data ? data : false,
};
});
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null
for (let index = 0; index < arrs.length; index++) {
if (arrs[index].id == OrganizationUnitId) {
arrs[index].parentId = null;
}
arrs[index].title = arrs[index].displayName;
arrs[index].key = arrs[index].id;
}
arrs[index].title = arrs[index].displayName
arrs[index].key = arrs[index].id
}
this.nodes = [...this.toTree.toTree(arrs)]
this.defaultExpandedKeys = [this.nodes[0].id]
this.nzSelectedKeys = [this.nodes[0].id]
this.OrganizationUnitId = [this.nodes[0].id]
console.log(this.nodes, 9000);
})
})
this.nodes = [...this.toTree.toTree(arrs)];
this.defaultExpandedKeys = [this.nodes[0].id];
this.nzSelectedKeys = [this.nodes[0].id];
this.OrganizationUnitId = [this.nodes[0].id];
console.log(this.nodes, 9000);
});
});
}
//搜索框提交
@ -182,72 +227,86 @@ export class UserComponent implements OnInit {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
this.getAllUsers()
this.getAllUsers();
}
nzClick(event: NzFormatEmitEvent) {
console.log(event);
this.nzSelectedKeys[0] = event.node.origin.id
this.nzSelectedKeys = [...this.nzSelectedKeys]
this.OrganizationUnitId = event.node.origin.id
this.getAllUsers()
this.nzSelectedKeys[0] = event.node.origin.id;
this.nzSelectedKeys = [...this.nzSelectedKeys];
this.OrganizationUnitId = event.node.origin.id;
this.getAllUsers();
}
//新增用户
addUser(): void {
const modal = this.modal.create({
nzTitle: '新增用户',
nzTitle: "新增用户",
nzContent: AdduserComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 460,
nzMaskClosable: false,
nzComponentParams: {
title: '',
subtitle: ''
title: "",
subtitle: "",
},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise(resolve => {
let roleNames = [...instance.validateForm.value.role, ...instance.validateForm.value.role2]
await new Promise((resolve) => {
let roleNames = [
...instance.validateForm.value.role,
...instance.validateForm.value.role2,
];
let body = {
userName: instance.validateForm.value.account,
name: instance.validateForm.value.name,
organizationUnitId: Number(instance.validateForm.value.organization),
organizationUnitId: Number(
instance.validateForm.value.organization
),
roleNames: roleNames,
phoneNumber: instance.validateForm.value.phonenum,
isActive: true
}
this.http.post(this.addUrl, body).subscribe((data: any) => {
resolve(data)
this.message.create('success', '创建成功!');
this.SkipCount = 0
this.getAllUsers()
this.notification.blank(
'用户' + data.result.userName + '创建成功',
'当前密码为:' + data.result.newPassword,
{ nzDuration: 0, nzPlacement: 'top', nzClass: 'resetPassword' }
);
return true
}, err => {
resolve(err)
this.message.create('warning', err.error.error.message);
return false
})
})
isActive: true,
};
this.http.post(this.addUrl, body).subscribe(
(data: any) => {
resolve(data);
this.message.create("success", "创建成功!");
this.SkipCount = 0;
this.getAllUsers();
this.notification.blank(
"用户" + data.result.userName + "创建成功",
"当前密码为:" + data.result.newPassword,
{
nzDuration: 0,
nzPlacement: "top",
nzClass: "resetPassword",
}
);
return true;
},
(err) => {
resolve(err);
this.message.create("warning", err.error.error.message);
return false;
}
);
});
} else {
this.message.create('warning', '请填写完整!');
return false
this.message.create("warning", "请填写完整!");
return false;
}
}
},
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
modal.afterOpen.subscribe(() => console.log("[afterOpen] emitted!"));
modal.afterClose.subscribe((result) =>
console.log("[afterClose] The result is:", result)
);
}
//编辑用户
editUser(data): void {
console.log(data)
console.log(data);
const modal = this.modal.create({
nzTitle: '编辑用户',
nzTitle: "编辑用户",
nzContent: EdituserComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 460,
@ -258,150 +317,172 @@ export class UserComponent implements OnInit {
listOfData: this.listOfData,
listOfData2: this.listOfData2,
nodes: this.nodes,
editUrl: this.editUrl
}
editUrl: this.editUrl,
},
});
const instance = modal.getContentComponent();
modal.afterClose.subscribe(result => this.getAllUsers());
modal.afterClose.subscribe((result) => this.getAllUsers());
}
//重置密码
isShowNewPassword: boolean
newPasswordObj: any
isShowNewPassword: boolean;
newPasswordObj: any;
resetPassword(item) {
// console.log(item)
this.modal.confirm({
nzTitle: `确定要重置${item.userName}这个账户的密码吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOkText: "确定",
nzOkType: "primary",
nzOnOk: () => {
let body = {
userId: item.id
}
this.http.post('/api/services/app/User/ResetPassword', body).subscribe((data: any) => {
this.isShowNewPassword = true
let obj = {
userName: item.userName,
newPassword: data.result.newPassword
}
this.newPasswordObj = obj
// this.openNewPassword(obj)
})
userId: item.id,
};
this.http
.post("/api/services/app/User/ResetPassword", body)
.subscribe((data: any) => {
this.isShowNewPassword = true;
let obj = {
userName: item.userName,
newPassword: data.result.newPassword,
};
this.newPasswordObj = obj;
// this.openNewPassword(obj)
});
},
nzCancelText: '取消',
nzOnCancel: () => {
}
nzCancelText: "取消",
nzOnCancel: () => {},
});
}
close() {
this.isShowNewPassword = false
this.isShowNewPassword = false;
}
openNewPassword(data) {
this.notificationService.template(this.newPasswordtemplate, { nzData: data, nzDuration: 0, nzPlacement: 'top', nzClass: 'resetPassword' });
this.notificationService.template(this.newPasswordtemplate, {
nzData: data,
nzDuration: 0,
nzPlacement: "top",
nzClass: "resetPassword",
});
}
handleCopyValue(text) {
//浏览器禁用了非安全域的 navigator.clipboard 对象
//在线上环境会报错 TypeError: Cannot read properties of undefined (reading 'writeText')
if (!navigator.clipboard && window.isSecureContext) {
return navigator.clipboard.writeText(text)
return navigator.clipboard.writeText(text);
} else {
// 判断是否支持拷贝
if (!document.execCommand('copy')) return Promise.reject()
if (!document.execCommand("copy")) return Promise.reject();
// 创建标签,并隐藏
const textArea = document.createElement('textarea')
textArea.style.position = 'fixed'
textArea.style.top = textArea.style.left = '-100vh'
textArea.style.opacity = '0'
textArea.value = text
document.body.appendChild(textArea)
const textArea = document.createElement("textarea");
textArea.style.position = "fixed";
textArea.style.top = textArea.style.left = "-100vh";
textArea.style.opacity = "0";
textArea.value = text;
document.body.appendChild(textArea);
// 聚焦、复制
textArea.focus()
textArea.select()
textArea.focus();
textArea.select();
return new Promise((resolve, reject) => {
// 不知为何,必须写这个三目,不然copy不上
document.execCommand('copy') ? resolve(0) : reject()
textArea.remove()
})
document.execCommand("copy") ? resolve(0) : reject();
textArea.remove();
});
}
}
copy() {
this.handleCopyValue(this.newPasswordObj.newPassword)
let str =
"用户" +
this.newPasswordObj.userName +
"的密码重置成功,当前密码为" +
this.newPasswordObj.newPassword;
this.handleCopyValue(str)
.then(() => {
this.message.create('success', '复制成功!');
this.message.create("success", "复制成功!");
})
.catch(() => {
this.message.create('success', '自动复制失败,请手动复制!');
})
this.message.create("success", "自动复制失败,请手动复制!");
});
}
//提交审核
audit(data, type) {
if (type && data.auditStatus == 5) {//提交审核
this.message.create('warning', '审核完成的不能重复提交,请编辑后提交');
return
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 ? '提交审核失败' : '撤销审核失败');
})
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
let url;
if (this.level == 1) {
type ? url = '/api/services/app/User/Activate' : url = '/api/services/app/User/DeActivate'
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'
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 ? '启用失败' : '停用失败');
})
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}这个账户吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOkText: "确定",
nzOkType: "primary",
nzOnOk: () => {
this.http.delete(this.deleteUrl, {
params: {
Id: item.id
}
}).subscribe(data => {
this.message.create('success', '注销成功!');
this.getAllUsers()
})
this.http
.delete(this.deleteUrl, {
params: {
Id: item.id,
},
})
.subscribe((data) => {
this.message.create("success", "注销成功!");
this.getAllUsers();
});
},
nzCancelText: '取消',
nzOnCancel: () => {
}
nzCancelText: "取消",
nzOnCancel: () => {},
});
}
}

5
内网部署流程.md

@ -6,10 +6,9 @@
其中:
- `main-es5.[hashCode].js` 包含 `9` 项;
- `main-es2015.[hashCode].js` 包含 `9` 项;文件
- `main.0ba64e9d9c60a3ff.js` 包含 `10` 项;
**总计 `18` 项**
文件**总计 `10` 项**
2. 找到 `[项目根目录]/dist/anxin119/` 文件夹
全选`anxin119`下所有文件,

Loading…
Cancel
Save