Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
a8c649a0
Commit
a8c649a0
authored
Sep 18, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建运维团队
parent
d4792a52
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
209 additions
and
4 deletions
+209
-4
README.md
README.md
+1
-1
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+2
-0
create-company.component.html
...anager/modal/create-company/create-company.component.html
+67
-0
create-company.component.ts
...-manager/modal/create-company/create-company.component.ts
+123
-0
opr-company.component.html
...pp/project-manager/opr-company/opr-company.component.html
+4
-2
opr-company.component.ts
.../app/project-manager/opr-company/opr-company.component.ts
+12
-1
No files found.
README.md
View file @
a8c649a0
...
@@ -43,7 +43,7 @@ Module ng g module my-module
...
@@ -43,7 +43,7 @@ Module ng g module my-module
v2.0.1 修复选择节点之后 流量查询不出来
v2.0.1 修复选择节点之后 流量查询不出来
****
上传文件到服务器
****
**
****
上传文件到服务器
****
**
scp -r
22
build/master root@10.10.38.99:/home/nginx/www/
scp -r build/master root@10.10.38.99:/home/nginx/www/
scp -r 22 build/wx root@10.10.38.99:/home/nginx/html/www/
scp -r 22 build/wx root@10.10.38.99:/home/nginx/html/www/
...
...
src/main/webapp/app/app.main.module.ts
View file @
a8c649a0
...
@@ -125,6 +125,7 @@ import {OprProjectComponent} from './project-manager/opr-project/opr-project.com
...
@@ -125,6 +125,7 @@ import {OprProjectComponent} from './project-manager/opr-project/opr-project.com
import
{
OprCostComponent
}
from
'./project-manager/opr-cost/opr-cost.component'
;
import
{
OprCostComponent
}
from
'./project-manager/opr-cost/opr-cost.component'
;
import
{
OprCompanyComponent
}
from
'./project-manager/opr-company/opr-company.component'
;
import
{
OprCompanyComponent
}
from
'./project-manager/opr-company/opr-company.component'
;
import
{
ProjectService
}
from
'./project-manager/project.service'
;
import
{
ProjectService
}
from
'./project-manager/project.service'
;
import
{
CreateCompanyComponent
}
from
'./project-manager/modal/create-company/create-company.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -251,6 +252,7 @@ import {ProjectService} from './project-manager/project.service';
...
@@ -251,6 +252,7 @@ import {ProjectService} from './project-manager/project.service';
OprProjectComponent
,
OprProjectComponent
,
OprCostComponent
,
OprCostComponent
,
OprCompanyComponent
,
OprCompanyComponent
,
CreateCompanyComponent
,
],
],
providers
:
[
providers
:
[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/project-manager/modal/create-company/create-company.component.html
0 → 100644
View file @
a8c649a0
<nz-modal
[
nzWidth
]="
780
"
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
[
formGroup
]="
validateForm
"
nz-form
>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"name"
>
公司名称
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<input
nz-input
formControlName=
"name"
id=
"name"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
用户登录名为6到50个字符!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"principal"
>
维护负责人
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<input
nz-input
formControlName=
"principal"
id=
"principal"
>
<nz-form-explain
*
ngIf=
"validateForm.get('principal').dirty && validateForm.get('principal').errors"
>
用户登录名为2到16个字符!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"phone"
>
联系电话1
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<input
nz-input
formControlName=
"phone"
id=
"phone"
>
<nz-form-explain
*
ngIf=
"validateForm.get('phone').dirty && validateForm.get('phone').errors"
>
手机号码错误!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"phone2"
>
联系电话2
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<input
nz-input
formControlName=
"phone2"
id=
"phone2"
>
<nz-form-explain
*
ngIf=
"validateForm.get('phone2').dirty && validateForm.get('phone2').errors"
>
手机号码错误!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
nzFor=
"type"
>
维护类型
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-select
name=
"type"
formControlName=
"type"
id=
"type"
nzPlaceHolder=
"选择设备类型"
>
<ng-container
*
ngFor=
"let item of opr_company_type"
>
<nz-option
[
nzLabel
]="
item
.
value
"
[
nzValue
]="
item
.
key
"
></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"description"
>
职责描述
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<textarea
formControlName=
"description"
nz-input
rows=
"2"
placeholder=
"职责描述"
></textarea>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzFor=
"group"
>
相关附件
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-upload
[
nzBeforeUpload
]="
beforeUpload
"
[(
nzFileList
)]="
fileList
"
>
<button
nz-button
>
<i
class=
"anticon anticon-upload"
></i><span>
上传
</span>
</button>
</nz-upload>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
src/main/webapp/app/project-manager/modal/create-company/create-company.component.ts
0 → 100644
View file @
a8c649a0
import
{
Component
,
EventEmitter
,
OnInit
,
Output
}
from
'@angular/core'
;
import
{
FormBuilder
,
FormControl
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
import
{
SystemService
}
from
'../../../system/system.service'
;
import
{
NzMessageService
,
UploadFile
}
from
'ng-zorro-antd'
;
import
{
ProjectService
}
from
'../../project.service'
;
import
{
opr_company_type
}
from
'../../project.constants'
;
@
Component
({
selector
:
'smart-create-company'
,
templateUrl
:
'./create-company.component.html'
,
styles
:
[]
})
export
class
CreateCompanyComponent
implements
OnInit
{
@
Output
()
done
=
new
EventEmitter
<
any
>
();
title
;
isVisible
=
false
;
isOkLoading
=
false
;
validateForm
:
FormGroup
;
fileList
:
UploadFile
[]
=
[];
opr_company_type
=
opr_company_type
;
cID
;
constructor
(
private
fb
:
FormBuilder
,
private
systemSer
:
SystemService
,
private
message
:
NzMessageService
,
private
projectSer
:
ProjectService
)
{
}
ngOnInit
():
void
{
this
.
initForm
();
}
initForm
()
{
this
.
validateForm
=
this
.
fb
.
group
({
name
:
[
null
,
[
Validators
.
required
,
Validators
.
minLength
(
2
),
Validators
.
maxLength
(
50
)]],
principal
:
[
null
],
principalId
:
[
null
],
type
:
[
1
,
[
Validators
.
required
]],
phone
:
[
null
],
phone2
:
[
null
],
description
:
[
null
],
});
}
showAddModal
(
title
)
{
this
.
isVisible
=
true
;
this
.
title
=
title
;
}
showEditModal
(
data
,
title
)
{
this
.
isVisible
=
true
;
this
.
title
=
title
;
this
.
cID
=
data
.
id
;
console
.
log
(
data
);
}
handleCancel
()
{
this
.
isVisible
=
false
;
this
.
initForm
();
}
beforeUpload
=
(
file
:
UploadFile
):
boolean
=>
{
const
isExcel
=
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
'application/octet-stream'
;
if
(
!
isExcel
)
{
this
.
message
.
error
(
'请上传正确的文件!'
);
}
else
{
this
.
fileList
[
0
]
=
file
;
}
return
false
;
};
handleOk
()
{
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
}
if
(
this
.
validateForm
.
invalid
)
{
return
false
;
}
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'新增运维公司'
)
{
this
.
create
();
}
if
(
this
.
title
==
'编辑运维公司'
)
{
this
.
update
();
}
}
create
()
{
this
.
projectSer
.
addMaintainCompany
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
isVisible
=
false
;
this
.
initForm
();
this
.
done
.
emit
();
this
.
message
.
success
(
'新增运维公司成功'
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
isOkLoading
=
false
;
}
);
}
update
()
{
this
.
validateForm
.
addControl
(
'id'
,
new
FormControl
(
this
.
cID
));
this
.
systemSer
.
updateUser
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
isVisible
=
false
;
this
.
initForm
();
this
.
done
.
emit
();
this
.
message
.
success
(
'更新信息成功'
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
isOkLoading
=
false
;
}
);
}
}
src/main/webapp/app/project-manager/opr-company/opr-company.component.html
View file @
a8c649a0
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</nz-radio-group>
</nz-radio-group>
</div>
</div>
<div
nz-col
nzSpan=
"3"
>
<div
nz-col
nzSpan=
"3"
>
<button
(
click
)="
search
()"
<button
(
click
)="
handleAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
新增运维公司
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
新增运维公司
</button>
</button>
</div>
</div>
...
@@ -65,9 +65,11 @@
...
@@ -65,9 +65,11 @@
<td>
{{data.projectNum}}
</td>
<td>
{{data.projectNum}}
</td>
<td>
{{data.totalAmount}}
</td>
<td>
{{data.totalAmount}}
</td>
<td
class=
"handle text-center main-color"
>
<td
class=
"handle text-center main-color"
>
<span>
编辑
</span>
<span
(
click
)="
handleEditModa
(
data
)"
>
编辑
</span>
<span>
查看
</span>
<span>
查看
</span>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</nz-table>
</nz-table>
<smart-create-company
#
smartCreateCompany
(
done
)="
getList
()"
></smart-create-company>
src/main/webapp/app/project-manager/opr-company/opr-company.component.ts
View file @
a8c649a0
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
opr_company_type
,
project_status
}
from
'../project.constants'
;
import
{
opr_company_type
,
project_status
}
from
'../project.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WorkService
}
from
'../../work/work.service'
;
import
{
WorkService
}
from
'../../work/work.service'
;
...
@@ -7,6 +7,7 @@ import {ProjectService} from '../project.service';
...
@@ -7,6 +7,7 @@ import {ProjectService} from '../project.service';
import
{
Router
}
from
'@angular/router'
;
import
{
Router
}
from
'@angular/router'
;
import
{
CommonService
}
from
'../../shared/common/common.service'
;
import
{
CommonService
}
from
'../../shared/common/common.service'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
CreateCompanyComponent
}
from
'../modal/create-company/create-company.component'
;
@
Component
({
@
Component
({
selector
:
'app-opr-company'
,
selector
:
'app-opr-company'
,
...
@@ -15,6 +16,7 @@ import {DatePipe} from '@angular/common';
...
@@ -15,6 +16,7 @@ import {DatePipe} from '@angular/common';
})
})
export
class
OprCompanyComponent
implements
OnInit
{
export
class
OprCompanyComponent
implements
OnInit
{
@
ViewChild
(
'smartCreateCompany'
)
smartCreateCompany
:
CreateCompanyComponent
;
companyType
=
opr_company_type
;
companyType
=
opr_company_type
;
page
=
{
page
=
{
...
@@ -69,4 +71,13 @@ export class OprCompanyComponent implements OnInit {
...
@@ -69,4 +71,13 @@ export class OprCompanyComponent implements OnInit {
this
.
getList
();
this
.
getList
();
}
}
//新增运维公司
handleAddModal
()
{
this
.
smartCreateCompany
.
showAddModal
(
'新增运维公司'
);
}
handleEditModa
(
item
)
{
this
.
smartCreateCompany
.
showEditModal
(
item
,
'编辑运维公司'
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment