Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
aaae8f20
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
10 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
aaae8f20
编写于
9月 20, 2022
作者:
m0_37741424
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交修改用户部门名称由输入框->树形选择
上级
45d32a59
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
14 deletion
+31
-14
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.html
...c/app/routes/users/user-editer/user-editer.component.html
+19
-11
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.ts
...src/app/routes/users/user-editer/user-editer.component.ts
+10
-3
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts
...axkey-web-mgt-app/src/app/routes/users/users.component.ts
+2
-0
未找到文件。
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.html
浏览文件 @
aaae8f20
...
...
@@ -307,20 +307,28 @@
</div>
<div
nz-row
>
<nz-form-item>
<nz-form-label
[nzSm]=
"8"
[nzXs]=
"24"
nzFor=
"departmentId"
>
{{ 'mxk.users.departmentId' | i18n }}
</nz-form-label>
<nz-form-label
[nzSm]=
"8"
[nzXs]=
"24"
nzFor=
"departmentId"
>
{{ 'mxk.users.departmentId' | i18n }}
</nz-form-label>
<nz-form-control
[nzSm]=
"16"
[nzMd]=
"16"
[nzXs]=
"36"
[nzXl]=
"48"
nzErrorTip=
"The input is not valid departmentId!"
>
<input
[(ngModel)]=
"form.model.departmentId"
[ngModelOptions]=
"{ standalone: true }"
nz-input
name=
"departmentId"
id=
"departmentId"
/>
nzErrorTip=
"The input is not valid departmentId!"
>
<input
[(ngModel)]=
"form.model.departmentId"
[ngModelOptions]=
"{ standalone: true }"
[disabled]=
"true"
nz-input
name=
"departmentId"
id=
"departmentId"
/>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[nzSm]=
"8"
[nzXs]=
"24"
nzFor=
"department"
>
{{ 'mxk.users.department' | i18n }}
</nz-form-label>
<nz-form-control
[nzSm]=
"16"
[nzMd]=
"16"
[nzXs]=
"36"
[nzXl]=
"48"
nzErrorTip=
"The input is not valid department!"
>
<input
[(ngModel)]=
"form.model.department"
[ngModelOptions]=
"{ standalone: true }"
nz-input
name=
"department"
id=
"department"
/>
<nz-form-label
[nzSm]=
"8"
[nzXs]=
"24"
nzFor=
"departmentId"
>
{{ 'mxk.users.department' | i18n }}
</nz-form-label>
<nz-form-control
[nzSm]=
"16"
[nzMd]=
"16"
[nzXs]=
"36"
[nzXl]=
"48"
nzErrorTip=
"The input is not valid departmentId!"
>
<!-- <input [(ngModel)]="form.model.departmentId" [ngModelOptions]="{ standalone: true }" nz-input name="departmentId" id="departmentId" />-->
<nz-tree-select
#orgTree
[nzNodes]=
"orgNodes"
nzShowSearch
nzPlaceHolder=
"Please select"
[(ngModel)]=
"form.model.departmentId"
[ngModelOptions]=
"{ standalone: true }"
(ngModelChange)=
"onDeptChange($event)"
nzVirtualHeight=
"300px"
></nz-tree-select>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -562,4 +570,4 @@
<div
*nzModalFooter
>
<button
nz-button
nzType=
"default"
(click)=
"onClose($event)"
>
{{ 'mxk.text.close' | i18n }}
</button>
<button
nz-button
nzType=
"primary"
(click)=
"onSubmit($event)"
>
{{ 'mxk.text.submit' | i18n }}
</button>
</div>
\ No newline at end of file
</div>
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.ts
浏览文件 @
aaae8f20
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import
{
Component
,
ChangeDetectorRef
,
Input
,
OnInit
,
Inject
}
from
'
@angular/core
'
;
import
{
Component
,
ChangeDetectorRef
,
Input
,
OnInit
,
Inject
,
ViewChild
}
from
'
@angular/core
'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
I18NService
}
from
'
@core
'
;
import
{
_HttpClient
,
ALAIN_I18N_TOKEN
,
SettingsService
}
from
'
@delon/theme
'
;
...
...
@@ -27,6 +27,7 @@ import { NzUploadFile, NzUploadChangeParam } from 'ng-zorro-antd/upload';
import
{
Users
}
from
'
../../../entity/Users
'
;
import
{
UsersService
}
from
'
../../../service/users.service
'
;
import
{
NzTreeSelectComponent
}
from
"
ng-zorro-antd/tree-select
"
;
const
getBase64
=
(
file
:
File
):
Promise
<
string
|
ArrayBuffer
|
null
>
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -66,7 +67,8 @@ export class UserEditerComponent implements OnInit {
@
Input
()
id
?:
String
;
@
Input
()
parentNode
?:
NzTreeNode
;
@
Input
()
isEdit
?:
boolean
;
@
Input
()
orgNodes
!
:
any
[];
@
ViewChild
(
"
orgTree
"
)
orgTree
!
:
NzTreeSelectComponent
;
form
:
{
submitting
:
boolean
;
model
:
Users
;
...
...
@@ -128,7 +130,12 @@ export class UserEditerComponent implements OnInit {
}
}
}
onDeptChange
(
key
:
string
):
void
{
let
node
=
this
.
orgTree
.
getTreeNodeByKey
(
key
);
if
(
node
){
this
.
form
.
model
.
department
=
node
.
title
}
}
onClose
(
e
:
MouseEvent
):
void
{
e
.
preventDefault
();
this
.
modalRef
.
destroy
({
refresh
:
false
});
...
...
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts
浏览文件 @
aaae8f20
...
...
@@ -183,6 +183,7 @@ export class UsersComponent implements OnInit {
nzComponentParams
:
{
isEdit
:
false
,
parentNode
:
this
.
treeNodes
.
activated
,
orgNodes
:
this
.
treeNodes
.
nodes
,
id
:
''
},
nzWidth
:
750
,
...
...
@@ -204,6 +205,7 @@ export class UsersComponent implements OnInit {
nzViewContainerRef
:
this
.
viewContainerRef
,
nzComponentParams
:
{
isEdit
:
true
,
orgNodes
:
this
.
treeNodes
.
nodes
,
id
:
editId
},
nzWidth
:
750
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录