Commit 3e9ec20b authored by wangqinghua's avatar wangqinghua

update

parent 258f38d1
...@@ -18,9 +18,13 @@ ...@@ -18,9 +18,13 @@
</a> </a>
<ul nz-menu> <ul nz-menu>
<li nz-menu-item>设置</li> <li nz-menu-item>设置</li>
<li (click)="showSeparationModal()" nz-menu-item>三员分立</li>
<li nz-menu-item (click)="logout()" >退出</li> <li nz-menu-item (click)="logout()" >退出</li>
</ul> </ul>
</nz-dropdown> </nz-dropdown>
</div> </div>
</div> </div>
</nz-header> </nz-header>
<!--三员分立-->
<smart-separation #smartSeparation></smart-separation>
...@@ -7,6 +7,7 @@ import { Principal, LoginService } from '../../shared'; ...@@ -7,6 +7,7 @@ import { Principal, LoginService } from '../../shared';
import { VERSION } from '../../app.constants'; import { VERSION } from '../../app.constants';
import {LocalStorageService} from 'ngx-webstorage'; import {LocalStorageService} from 'ngx-webstorage';
import {SeparationComponent} from '../../system/modal/separation/separation.component';
@Component({ @Component({
selector: 'jhi-navbar', selector: 'jhi-navbar',
...@@ -18,6 +19,7 @@ import {LocalStorageService} from 'ngx-webstorage'; ...@@ -18,6 +19,7 @@ import {LocalStorageService} from 'ngx-webstorage';
export class NavbarComponent implements OnInit ,AfterViewChecked{ export class NavbarComponent implements OnInit ,AfterViewChecked{
@ViewChild('parent') parent:ElementRef; @ViewChild('parent') parent:ElementRef;
@ViewChild('children') children:ElementRef; @ViewChild('children') children:ElementRef;
@ViewChild("smartSeparation") smartSeparation:SeparationComponent;
inProduction: boolean; inProduction: boolean;
isNavbarCollapsed: boolean; isNavbarCollapsed: boolean;
languages: any[]; languages: any[];
...@@ -82,4 +84,9 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{ ...@@ -82,4 +84,9 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
this.isBool = false; this.isBool = false;
} }
} }
//三员分立
showSeparationModal(){
this.smartSeparation.showModal("三员分立");
}
} }
...@@ -22,6 +22,7 @@ export class SelectPersonComponent implements OnInit { ...@@ -22,6 +22,7 @@ export class SelectPersonComponent implements OnInit {
disabledButton = true; disabledButton = true;
indeterminate = false; indeterminate = false;
roleId; roleId;
deleteList=[];
displayData: Array<{ key1: string; key2: number; key3: string; key4: string; checked: boolean }> = []; displayData: Array<{ key1: string; key2: number; key3: string; key4: string; checked: boolean }> = [];
constructor(private systemSer: SystemService, private commonSer: CommonService) { constructor(private systemSer: SystemService, private commonSer: CommonService) {
...@@ -39,17 +40,28 @@ export class SelectPersonComponent implements OnInit { ...@@ -39,17 +40,28 @@ export class SelectPersonComponent implements OnInit {
selectItem(item,e){ selectItem(item,e){
if(e){ if(e){
this.selectList.push(item); this.selectList.push(item);
this.deleteList.forEach((value,index)=>{
if(value.id == item.id){
this.deleteList.splice(index,1)
}
})
}else{ }else{
this.selectList.forEach((value,index)=>{ this.selectList.forEach((value,index)=>{
if(value.id == item.id){ if(value.id == item.id){
this.selectList.splice(index,1) this.selectList.splice(index,1)
} }
}) });
if(item.isRole == 1){
this.deleteList.push(item);
}
} }
this.refreshStatus() this.refreshStatus()
} }
deleteSelect(index){ deleteSelect(index){
if(this.selectList[index].isRole == 1){
this.deleteList.push(this.selectList[index]);
}
this.selectList.splice(index,1); this.selectList.splice(index,1);
} }
...@@ -68,6 +80,7 @@ export class SelectPersonComponent implements OnInit { ...@@ -68,6 +80,7 @@ export class SelectPersonComponent implements OnInit {
init(){ init(){
this.selectList = []; this.selectList = [];
this.deleteList=[];
this.allChecked = false; this.allChecked = false;
this.checkedNumber = 0; this.checkedNumber = 0;
this.disabledButton = true; this.disabledButton = true;
...@@ -130,6 +143,12 @@ export class SelectPersonComponent implements OnInit { ...@@ -130,6 +143,12 @@ export class SelectPersonComponent implements OnInit {
this.systemSer.getUserByOrgIdAboutRole(data).subscribe( this.systemSer.getUserByOrgIdAboutRole(data).subscribe(
(res)=>{ (res)=>{
this.userList = res.data; this.userList = res.data;
this.userList.forEach(e=>{
if(e.isRole == 1){
e.checked = true;
this.selectList.push(e);
}
})
} }
) )
} }
...@@ -149,7 +168,11 @@ export class SelectPersonComponent implements OnInit { ...@@ -149,7 +168,11 @@ export class SelectPersonComponent implements OnInit {
handEditleOk(){ handEditleOk(){
if(this.title == "授予用户"){ if(this.title == "授予用户"){
const data = {
'select':this.selectList,
'delete':this.deleteList
}
this.done.emit(data);
}else{ }else{
this.done.emit(this.selectList); this.done.emit(this.selectList);
} }
......
...@@ -121,6 +121,7 @@ export class NeTopologyComponent implements OnInit, AfterViewInit { ...@@ -121,6 +121,7 @@ export class NeTopologyComponent implements OnInit, AfterViewInit {
//获取设备图片 //获取设备图片
setImg(e){ setImg(e){
console.log(e);
editor.utils.addNode(e[0].icon,'图片'); editor.utils.addNode(e[0].icon,'图片');
} }
......
...@@ -29,24 +29,24 @@ ...@@ -29,24 +29,24 @@
</div> </div>
<div class="releative" #checkEle> <div class="releative" #checkEle>
<div #colorEle class="checkTags tag-form"> <div #colorEle class="checkTags tag-form">
<span (click)="getCheckList('正常')"> <span (click)="changeState('正常')">
<nz-tag [nzColor]="color.green"></nz-tag> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>{{checkStatus.normal}} <i *ngIf="!checkStatus.normal && checkStatus.normal !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>{{checkStatus.normal}}
</span> </span>
<span (click)="getCheckList('告警')"> <nz-tag [nzColor]="color.yellow"></nz-tag> <span (click)="changeState('告警')"> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!checkStatus.warning && checkStatus.warning !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.warning && checkStatus.warning !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.warning}} {{checkStatus.warning}}
</span> </span>
<span (click)="getCheckList('严重')"> <nz-tag [nzColor]="color.red"></nz-tag> <span (click)="changeState('严重')"> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!checkStatus.high && checkStatus.high !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.high && checkStatus.high !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.high}} {{checkStatus.high}}
</span> </span>
<span (click)="getCheckList('禁用')"> <nz-tag [nzColor]="color.gray"></nz-tag> <span (click)="changeState('禁用')"> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!checkStatus.disabled && checkStatus.disabled !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!checkStatus.disabled && checkStatus.disabled !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{checkStatus.disabled}} {{checkStatus.disabled}}
</span> </span>
</div> </div>
<nz-tabset class="tabs-smart "> <nz-tabset [nzSelectedIndex]="tabNum" class="tabs-smart">
<nz-tab nzTitle="资源详情"> <nz-tab nzTitle="资源详情">
<section> <section>
...@@ -169,7 +169,6 @@ ...@@ -169,7 +169,6 @@
<td>{{data.lastclock}}</td> <td>{{data.lastclock}}</td>
<td>{{data.itemType}}</td> <td>{{data.itemType}}</td>
<td>{{data.delay}}</td> <td>{{data.delay}}</td>
<!--<td>{{data.source}}</td>-->
<td class="cursor"> <td class="cursor">
<span (click)="showImageModal(data)">图表</span> <span (click)="showImageModal(data)">图表</span>
</td> </td>
......
...@@ -41,10 +41,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -41,10 +41,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
color = color; color = color;
loading = false; loading = false;
hostId: string; hostId: string;
tabNum = 0;
hostName; hostName;
realName; realName;
size = 'default'; size = 'default';
hostType: string; hostType: string;
changeStates;
chartOption1; chartOption1;
responseTimeStr; responseTimeStr;
losedStr; losedStr;
...@@ -615,7 +617,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -615,7 +617,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加or编辑监测点 之后 //添加or编辑监测点 之后
getList(){ getList(){
this.getCheckList(null); this.getCheckList();
this.findItemType(); this.findItemType();
} }
...@@ -646,7 +648,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -646,7 +648,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
} }
//监测点列表 //监测点列表
getCheckList(state) { getCheckList() {
this.getCheckStatus(); this.getCheckStatus();
this.loading = true; this.loading = true;
const data = { const data = {
...@@ -655,7 +657,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -655,7 +657,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
obj:{ obj:{
applicationid: this.applicationId, applicationid: this.applicationId,
hostid: this.hostId, hostid: this.hostId,
priorityName:state priorityName:this.changeStates
} }
}; };
this.overAllSer.findCheckByType(data).subscribe( this.overAllSer.findCheckByType(data).subscribe(
...@@ -667,16 +669,22 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -667,16 +669,22 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
); );
} }
changeState(state){
this.tabNum = 1;
this.changeStates = state;
this.getCheckList();
}
//分页 //分页
change(e) { change(e) {
this.pageIndex = e; this.pageIndex = e;
this.getCheckList(null); this.getCheckList();
} }
changeType(type) { changeType(type) {
this.pageIndex = 1; this.pageIndex = 1;
this.applicationId = type; this.applicationId = type;
this.getCheckList(null); this.getCheckList();
} }
//监测点状态 //监测点状态
...@@ -705,7 +713,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -705,7 +713,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.success('删除成功'); this.message.success('删除成功');
this.getCheckList(null); this.getCheckList();
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
...@@ -810,7 +818,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -810,7 +818,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this.overAllSer.itemUpdate(data).subscribe( this.overAllSer.itemUpdate(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.getCheckList(null); this.getCheckList();
} }
this.message.info(res.errMsg); this.message.info(res.errMsg);
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<button nz-button nzType="default"><i class="anticon anticon-search"></i>选择角色</button> <button (click)="selectRoleModal()" nz-button nzType="default"><i class="anticon anticon-search"></i>选择角色</button>
<button (click)="showModal()" nz-button nzType="default"><i class="anticon anticon-search"></i>选择部门</button> <button (click)="showModal()" nz-button nzType="default"><i class="anticon anticon-search"></i>选择部门</button>
</div> </div>
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<div class="padding-15-0"> <div class="padding-15-0">
<button (click)="showUserModal()" nz-button nzType="primary">新增用户</button> <button (click)="showUserModal()" nz-button nzType="primary">新增用户</button>
<button (click)="batchDelete()" nz-button nzType="default">批量删除</button> <button (click)="batchDelete()" nz-button nzType="default">批量删除</button>
<!--<button nz-button nzType="default">批量修改</button>--> <button nz-button nzType="default">批量修改</button>
<button nz-button nzType="default">导出模版</button> <button nz-button nzType="default">导出模版</button>
<button nz-button nzType="default">导入组织</button> <button nz-button nzType="default">导入组织</button>
<button nz-button nzType="default">导入用户</button> <button nz-button nzType="default">导入用户</button>
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
<tr> <tr>
<th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th> <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
<th>姓名</th> <th>姓名</th>
<th>登录名</th>
<th>手机号码</th> <th>手机号码</th>
<th>角色</th> <th>角色</th>
<th>操作</th> <th>操作</th>
...@@ -71,12 +70,11 @@ ...@@ -71,12 +70,11 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td> <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="selectItem(data,$event)"></td>
<td>{{data.user.name}}</td> <td>{{data.name}}</td>
<td>{{data.loginName}}</td> <td>{{data.phoneNumber}}</td>
<td>{{data.user.phoneNumber}}</td>
<td> <td>
<span *ngFor="let item of data.roles">{{item.name}}</span> <span *ngFor="let item of data.roles">{{item.name}} </span>
</td> </td>
<td class="handle"> <td class="handle">
<span (click)="grantRole(data)">授权</span> <span (click)="grantRole(data)">授权</span>
......
...@@ -26,7 +26,8 @@ export class GroupComponent implements OnInit { ...@@ -26,7 +26,8 @@ export class GroupComponent implements OnInit {
nodes: any[]; nodes: any[];
isVisible = true; isVisible = true;
userId; userId;
// displayData: Array<{ key1: string; key2: number; key3: string; key4: string; checked: boolean }> = []; setType;
selectList = [];
constructor(private systemSer: SystemService, private message: NzMessageService, constructor(private systemSer: SystemService, private message: NzMessageService,
private modalSer: NzModalService, private commonSer: CommonService) { private modalSer: NzModalService, private commonSer: CommonService) {
...@@ -41,6 +42,19 @@ export class GroupComponent implements OnInit { ...@@ -41,6 +42,19 @@ export class GroupComponent implements OnInit {
this.dataSet = $event; this.dataSet = $event;
} }
selectItem(item,e){
if(e){
this.selectList.push(item);
}else{
this.selectList.forEach((value,index)=>{
if(value.id == item.id){
this.selectList.splice(index,1)
}
});
}
this.refreshStatus()
}
refreshStatus(): void { refreshStatus(): void {
const allChecked = this.dataSet.every(value => value.checked === true); const allChecked = this.dataSet.every(value => value.checked === true);
const allUnChecked = this.dataSet.every(value => !value.checked); const allUnChecked = this.dataSet.every(value => !value.checked);
...@@ -118,7 +132,7 @@ export class GroupComponent implements OnInit { ...@@ -118,7 +132,7 @@ export class GroupComponent implements OnInit {
//编辑用户 //编辑用户
showEditModal(item){ showEditModal(item){
this.smartUser.showEditModal(this.groupList,"编辑用户",item.user.id); this.smartUser.showEditModal(this.groupList,"编辑用户",item.id);
} }
//删除用户--单个 //删除用户--单个
...@@ -130,7 +144,7 @@ export class GroupComponent implements OnInit { ...@@ -130,7 +144,7 @@ export class GroupComponent implements OnInit {
nzCancelText: '取消', nzCancelText: '取消',
nzOnOk: () => { nzOnOk: () => {
const data = { const data = {
id:item.user.id id:item.id
}; };
this.systemSer.deleteUser(data).subscribe( this.systemSer.deleteUser(data).subscribe(
(res) => { (res) => {
...@@ -187,19 +201,43 @@ export class GroupComponent implements OnInit { ...@@ -187,19 +201,43 @@ export class GroupComponent implements OnInit {
//授予角色 //授予角色
grantRole(data){ grantRole(data){
this.userId = data.user.id; this.setType = "单个";
this.userId = data.id;
this.smartSelectRole.showModal("选择角色",this.userId); this.smartSelectRole.showModal("选择角色",this.userId);
} }
//设置用户角色 //设置用户角色
setRole(event){ setRole(event){
if(this.setType == "批量"){
const data = {
userId:this.selectList.map(
e=>{
return e.id;
}
),
roles:event.map(e=>{
return e.id;
}),
};
this.systemSer.batchUserToAuth(data).subscribe(
(res)=>{
if(res.errCode == 10000){
this.getUser();
this.message.success("授予角色成功");
}else{
this.message.error(res.errMsg);
}
}
)
}
if(this.setType == "单个"){
const data = { const data = {
userId:this.userId, userId:this.userId,
roles:event.map(e=>{ roles:event.map(e=>{
return e.id; return e.id;
}), }),
}; };
this.systemSer.batchAuthRoleToUser(data).subscribe( this.systemSer.aloneUserToAuth(data).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
this.getUser(); this.getUser();
...@@ -210,5 +248,13 @@ export class GroupComponent implements OnInit { ...@@ -210,5 +248,13 @@ export class GroupComponent implements OnInit {
} }
) )
} }
}
selectRoleModal(){
this.setType = "批量";
this.smartSelectRole.showModal("选择角色",null);
}
} }
...@@ -60,11 +60,13 @@ export class PowerComponent implements OnInit { ...@@ -60,11 +60,13 @@ export class PowerComponent implements OnInit {
batchAdduserToRole(e){ batchAdduserToRole(e){
const data = { const data = {
roleId:this.roleId, roleId:this.roleId,
addUsers:e.map(e=>{ addUsers:e.select.map(e=>{
return e.id; return e.id;
}), }),
deleteUsers:[] deleteUsers:e.delete.map(e=>{
} return e.id;
}),
};
this.systemSer.batchAuthRoleToUser(data).subscribe( this.systemSer.batchAuthRoleToUser(data).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
......
...@@ -95,17 +95,22 @@ export class SystemService { ...@@ -95,17 +95,22 @@ export class SystemService {
return this.http.get(SERVER_API_URL_COMS + '/log?'+this.commonSer.toQuery(data)); return this.http.get(SERVER_API_URL_COMS + '/log?'+this.commonSer.toQuery(data));
} }
//对单一角色批量添加用户 //单个角色to多个用户
batchGrantUserToRole(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/role/batchGrantUserToRole',data);
}
//对单一用户批量授权角色
batchAuthRoleToUser(data): Observable<any>{ batchAuthRoleToUser(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/role/batchAuthRoleToUser',data); return this.http.post(SERVER_API_URL_COMS + '/role/batchAuthRoleToUser',data);
} }
//对单一用户批量授权角色 //对单一用户批量授权角色
aloneUserToAuth(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/user/auth',data);
}
//对多个用户 批量授权角色
batchUserToAuth(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/user/batchAuth',data);
}
//根据部门查询角色
getUserByOrgIdAboutRole(data): Observable<any>{ getUserByOrgIdAboutRole(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/user/getUserByOrgIdAboutRole?'+this.commonSer.toQuery(data) ); return this.http.get(SERVER_API_URL_COMS + '/user/getUserByOrgIdAboutRole?'+this.commonSer.toQuery(data) );
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<div nz-row [nzGutter]="4" class="search-form"> <div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="4"> <div nz-col nzSpan="4">
<nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="选择分类" (ngModelChange)="changeType()"> <nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="选择分类" (ngModelChange)="changeType()">
<nz-option nzLabel="全部" nzValue="all"></nz-option>
<ng-container *ngFor="let item of parentList"> <ng-container *ngFor="let item of parentList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of childrenList"> <tr *ngFor="let data of childrenList">
<td class="round-tag tag-form main-font-color"> <td class="round-tag tag-form main-font-color cursor">
<span (click)="showCEditModal(data.id)">{{data.name}}</span> <span (click)="showCEditModal(data.id)">{{data.name}}</span>
</td> </td>
<td> <td>
......
...@@ -29,7 +29,7 @@ export class AssetPartComponent implements OnInit { ...@@ -29,7 +29,7 @@ export class AssetPartComponent implements OnInit {
pageCount:null, pageCount:null,
pageNum:null, pageNum:null,
searchStr:'', searchStr:'',
type:null, type:'all',
status:null, status:null,
source:null, source:null,
startTime:'', startTime:'',
...@@ -40,6 +40,7 @@ export class AssetPartComponent implements OnInit { ...@@ -40,6 +40,7 @@ export class AssetPartComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.getList(); this.getList();
this.changeType();
} }
getTypeList(){ getTypeList(){
......
...@@ -84,5 +84,8 @@ ...@@ -84,5 +84,8 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!--新增巡检计划-->
<smart-plan-modal #smartPlanMoadl (done)="getList()"></smart-plan-modal> <smart-plan-modal #smartPlanMoadl (done)="getList()"></smart-plan-modal>
<!--查看计划-->
<smart-look-plan #smartLookPlan></smart-look-plan> <smart-look-plan #smartLookPlan></smart-look-plan>
\ No newline at end of file
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</div> </div>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="serviceid">计划工作量</nz-form-label> <nz-form-label [nzSpan]="4" nzFor="serviceid">计划工作量</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
</nz-form-control> </nz-form-control>
...@@ -133,14 +133,14 @@ ...@@ -133,14 +133,14 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="description">计划描述</nz-form-label> <nz-form-label [nzSpan]="4" nzFor="description">计划描述</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<textarea nz-input id="description" name="description" formControlName="description" placeholder="发送信息" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea> <textarea nz-input id="description" name="description" formControlName="description" placeholder="发送信息" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="group">附件</nz-form-label> <nz-form-label [nzSpan]="7" nzFor="group">附件</nz-form-label>
<nz-form-control [nzSpan]="12"> <nz-form-control [nzSpan]="12">
<nz-upload <nz-upload
[nzBeforeUpload]="beforeUpload" [nzBeforeUpload]="beforeUpload"
......
...@@ -44,6 +44,8 @@ export class PlanModalComponent implements OnInit { ...@@ -44,6 +44,8 @@ export class PlanModalComponent implements OnInit {
number: [null], number: [null],
workload: [null], workload: [null],
description: [null], description: [null],
principals: [this.principalsList], //负责人
participants: [this.participantsList], //参与人
}); });
} }
...@@ -102,6 +104,8 @@ export class PlanModalComponent implements OnInit { ...@@ -102,6 +104,8 @@ export class PlanModalComponent implements OnInit {
this.fileList.forEach((file: any) => { this.fileList.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.principals = this.principalsList;
this.validateForm.value.participants = this.participantsList;
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
this.workSer.createPlan(formData).subscribe( this.workSer.createPlan(formData).subscribe(
(res) => { (res) => {
...@@ -121,6 +125,8 @@ export class PlanModalComponent implements OnInit { ...@@ -121,6 +125,8 @@ export class PlanModalComponent implements OnInit {
this.fileList.forEach((file: any) => { this.fileList.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.principals = this.principalsList;
this.validateForm.value.participants = this.participantsList;
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
formData.append('id', this.planId); formData.append('id', this.planId);
this.workSer.updatePlan(formData).subscribe( this.workSer.updatePlan(formData).subscribe(
......
...@@ -56,13 +56,16 @@ ...@@ -56,13 +56,16 @@
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<button (click)="selectPerson()" nz-button><span>选择</span></button> <button (click)="selectPerson()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item of operatorsList;let i = index;"> <ng-container *ngFor="let item of operatorsList;let i = index;">
<span>{{item.username}}</span><span (click)="deletePerson(i)">X</span> <span style="margin-right: 10px">
<span>{{item.username}}</span>
<span (click)="deletePerson(i)">X</span>
</span>
</ng-container> </ng-container>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="description">详细描述</nz-form-label> <nz-form-label [nzSpan]="4" nzFor="description">详细描述</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<textarea nz-input id="description" name="description" formControlName="description" <textarea nz-input id="description" name="description" formControlName="description"
placeholder="发送信息" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea> placeholder="发送信息" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
...@@ -70,7 +73,7 @@ ...@@ -70,7 +73,7 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired>附件</nz-form-label> <nz-form-label [nzSpan]="7">附件</nz-form-label>
<nz-form-control [nzSpan]="12"> <nz-form-control [nzSpan]="12">
<nz-upload <nz-upload
[nzBeforeUpload]="beforeUpload" [nzBeforeUpload]="beforeUpload"
......
...@@ -35,7 +35,6 @@ export class EventComponent implements OnInit { ...@@ -35,7 +35,6 @@ export class EventComponent implements OnInit {
description: [null], description: [null],
type: [null], type: [null],
requester: [null], requester: [null],
file: [null],
requesterPhone: [null], requesterPhone: [null],
operators: [null], operators: [null],
} }
...@@ -98,6 +97,7 @@ export class EventComponent implements OnInit { ...@@ -98,6 +97,7 @@ export class EventComponent implements OnInit {
this.fileList.forEach((file: any) => { this.fileList.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.operators = this.operatorsList;
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
this.workSer.create(formData).subscribe( this.workSer.create(formData).subscribe(
(res) => { (res) => {
...@@ -119,6 +119,7 @@ export class EventComponent implements OnInit { ...@@ -119,6 +119,7 @@ export class EventComponent implements OnInit {
this.fileList.forEach((file: any) => { this.fileList.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.operators = this.operatorsList;
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
formData.append('id', this.eventId); formData.append('id', this.eventId);
this.workSer.update(formData).subscribe( this.workSer.update(formData).subscribe(
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
<nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="事件分类"> <nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="事件分类">
<nz-option nzLabel="全部" nzValue="all"></nz-option>
<ng-container *ngFor="let item of eventTypeList"> <ng-container *ngFor="let item of eventTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
......
...@@ -33,7 +33,7 @@ export class WorkHandleComponent implements OnInit { ...@@ -33,7 +33,7 @@ export class WorkHandleComponent implements OnInit {
pageCount: null, pageCount: null,
pageNum: null, pageNum: null,
searchStr: '', searchStr: '',
type: 'all', type: null,
status: null, status: null,
source: null, source: null,
startTime: '', startTime: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment