Commit 67ad5acc authored by wangqinghua's avatar wangqinghua

update

parent 233fea0c
......@@ -864,7 +864,6 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')
});
}
//删除单个资源
......
......@@ -81,8 +81,8 @@
<span (click)="showEditModal(data)">编辑监测点</span>
<span (click)="deleteCheckItem(data)">删除监测点</span>
<br>
<span *ngIf="data.triggerCount == 0" (click)="showAddThresholdModal(data)">添加阈值</span>
<span *ngIf="data.triggerCount > 0" (click)="showEditThresholdModal(data)">编辑阈值</span>
<!--<span *ngIf="data.triggerCount == 0" (click)="showAddThresholdModal(data)">添加阈值</span>-->
<!--<span *ngIf="data.triggerCount > 0" (click)="showEditThresholdModal(data)">编辑阈值</span>-->
</ng-container>
<span *ngIf="data.status == 0 && data.state==0" (click)="updateItem(data.itemid,1)" style="color: red">停止</span>
<span *ngIf="data.status == 0 && data.state==1" (click)="updateItem(data.itemid,1)" style="color: red">不支持的</span>
......
......@@ -5,7 +5,7 @@ import {color, pageSize} from '../../../../app.constants';
import {CheckPrototypeComponent} from '../../modal/check-prototype/check-prototype.component';
import {SystemService} from '../../../../system/system.service';
import {CommonService} from '../../../../shared/common/common.service';
import {NzMessageService} from 'ng-zorro-antd';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {TriModalComponent} from '../tri-modal/tri-modal.component';
import {BasiCheckComponent} from '../../../../modal/basi-check/basi-check.component';
......@@ -69,7 +69,7 @@ export class ItemListComponent implements OnInit {
applicationId; //分类ID
constructor(private overAllSer: OverAllService, private routerInfo: ActivatedRoute, private router: Router,
private message: NzMessageService, private systemSer: SystemService,
private message: NzMessageService, private systemSer: SystemService,private modalService:NzModalService,
private commonSer: CommonService) {
this.routerInfo.queryParams.subscribe(
(res) => {
......@@ -170,4 +170,58 @@ export class ItemListComponent implements OnInit {
this.smartBasiCheck.showEditModal(this.hostId,item.itemid,this.tempName,item.templateid,'编辑模版监测点');
}
//删除监测点
deleteCheckItem(item) {
this.modalService.confirm({
nzTitle: '删除',
nzContent: '<b style="color: red;">确认删除该监测点吗?</b>',
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
const data = {
itemids:[item.itemid],
templateid:item.templateid
};
this.overAllSer.deleteItem(data).subscribe(
(res) => {
if (res.errCode == 10000) {
this.message.success('删除成功');
this.getCheckList();
} else {
this.message.error(res.errMsg);
}
}
);
},
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')
});
}
//停止/启用监控项 0 启用 1停止
updateItem(itemid, status) {
const data = {
'status': status,
'itemid': itemid
};
this.modalService.confirm({
nzTitle: '',
nzContent: '<b style="color: red;">确认修改监控项状态吗?</b>',
nzOkText: '确定',
nzOkType: 'danger',
nzOnOk: () => {
this.overAllSer.itemUpdate(data).subscribe(
(res) => {
if (res.errCode == 10000) {
this.getCheckList();
}
this.message.info(res.errMsg);
}
);
},
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')
});
}
}
......@@ -42,7 +42,7 @@
</ng-container>
</div>
<div nz-col nzSpan="8" class="text-right">
<input style="width: 50%;" [(ngModel)]="obj.content" nz-input placeholder="角色/权限模块/资源权限">
<input style="width: 50%;" [(ngModel)]="obj.content" nz-input placeholder="操作内容">
<button (click)="getList()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div>
</div>
......
......@@ -8,18 +8,18 @@
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="status">是否有效</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select id="status" nzPlaceHolder="选择状态" formControlName="status">
<nz-option nzValue="0" nzLabel="有效"></nz-option>
<nz-option nzValue="1" nzLabel="无效"></nz-option>
</nz-select>
<nz-form-explain *ngIf="validateForm.get('status').dirty && validateForm.get('status').errors">
请选择是否有效!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<!--<nz-form-item>-->
<!--<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="status">是否有效</nz-form-label>-->
<!--<nz-form-control [nzSm]="14" [nzXs]="24">-->
<!--<nz-select id="status" nzPlaceHolder="选择状态" formControlName="status">-->
<!--<nz-option nzValue="0" nzLabel="有效"></nz-option>-->
<!--<nz-option nzValue="1" nzLabel="无效"></nz-option>-->
<!--</nz-select>-->
<!--<nz-form-explain *ngIf="validateForm.get('status').dirty && validateForm.get('status').errors">-->
<!--请选择是否有效!-->
<!--</nz-form-explain>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="comment">角色说明</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
......
......@@ -53,7 +53,7 @@ export class RoleComponent implements OnInit {
this.viewGroupList = [];
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
status: [null, [Validators.required]],
// status: [null, [Validators.required]],
comment: [null, [Validators.required]],
});
}
......@@ -118,7 +118,7 @@ export class RoleComponent implements OnInit {
(res) => {
if (res.errCode == 10000) {
const data = res.data.role;
data.status += '';
// data.status += '';
this.validateForm.patchValue(data);
this.editInit(res.data);
}
......@@ -213,7 +213,7 @@ export class RoleComponent implements OnInit {
const data = {
role: {
name: this.validateForm.value.name,
status: this.validateForm.value.status,
// status: this.validateForm.value.status,
comment: this.validateForm.value.comment,
},
modules: this.dataModuleList,
......@@ -239,7 +239,7 @@ export class RoleComponent implements OnInit {
role: {
id: this.roleId,
name: this.validateForm.value.name,
status: this.validateForm.value.status,
// status: this.validateForm.value.status,
comment: this.validateForm.value.comment,
},
modules: this.dataModuleList,
......
......@@ -51,15 +51,15 @@
<nz-form-explain *ngIf="validateForm.get('position').dirty && validateForm.get('position').errors">请选择职位!</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="status">是否有效</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select id="status" formControlName="status">
<nz-option nzValue="0" nzLabel="有效"></nz-option>
<nz-option nzValue="1" nzLabel="无效"></nz-option>
</nz-select>
<nz-form-explain *ngIf="validateForm.get('status').dirty && validateForm.get('status').errors">请选择状态!</nz-form-explain>
</nz-form-control>
</nz-form-item>
<!--<nz-form-item>-->
<!--<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="status">是否有效</nz-form-label>-->
<!--<nz-form-control [nzSm]="14" [nzXs]="24">-->
<!--<nz-select id="status" formControlName="status">-->
<!--<nz-option nzValue="0" nzLabel="有效"></nz-option>-->
<!--<nz-option nzValue="1" nzLabel="无效"></nz-option>-->
<!--</nz-select>-->
<!--<nz-form-explain *ngIf="validateForm.get('status').dirty && validateForm.get('status').errors">请选择状态!</nz-form-explain>-->
<!--</nz-form-control>-->
<!--</nz-form-item>-->
</form>
</nz-modal>
......@@ -39,7 +39,7 @@ export class UserComponent implements OnInit {
email:[null,],
organizationId:[null,[Validators.required]],
position:[null,[Validators.required]],
status:[null,[Validators.required]],
// status:[null,[Validators.required]],
})
}
......@@ -59,7 +59,7 @@ export class UserComponent implements OnInit {
if(res.errCode == 10000){
res.data.gender += "";
res.data.position += "";
res.data.status += "";
// res.data.status += "";
res.data.organizationId += "";
this.validateForm.patchValue(res.data);
}
......@@ -78,7 +78,7 @@ export class UserComponent implements OnInit {
this.validateForm.controls[i].updateValueAndValidity();
}
this.validateForm.value.gender = Number(this.validateForm.value.gender);
this.validateForm.value.status = Number(this.validateForm.value.status);
// this.validateForm.value.status = Number(this.validateForm.value.status);
if(this.validateForm.invalid){
return false;
}
......
......@@ -25,8 +25,8 @@
</button>
</div>
<div nz-col nzSpan="8" class="text-right">
<input style="width: 50%;" nz-input placeholder="角色/权限模块/资源权限">
<button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
<!--<input style="width: 50%;" nz-input placeholder="角色/权限模块/资源权限">-->
<!--<button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>-->
</div>
</div>
<nz-table #basicTable [nzData]="dataSet">
......
......@@ -89,14 +89,14 @@
</td>
<td class="handle text-center main-color">
<span (click)="lookPlan(data.id,data.title)">查看</span>
<span (click)="editPlan(data.id)">编辑</span>
<span *ngIf="data.status != 2" (click)="editPlan(data.id)">编辑</span>
<span (click)="deletePlan(data)">删除</span>
</td>
</tr>
</tbody>
</nz-table>
<!--新增巡检计划-->
<!--巡检计划-->
<smart-plan-modal #smartPlanMoadl (done)="getList()"></smart-plan-modal>
<!--查看计划-->
......
......@@ -93,9 +93,7 @@
<nz-option nzValue="5" nzLabel="5"></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control [nzSpan]="6">
</nz-form-control>
<nz-form-control [nzSpan]="6"></nz-form-control>
</nz-form-item>
</div>
......@@ -136,17 +134,11 @@
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">负责人</nz-form-label>
<nz-form-label [nzSpan]="6" nzFor="description">计划描述</nz-form-label>
<nz-form-control [nzSpan]="14">
<button (click)="selectPerson2()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item2 of principalsList;let i = index;">
<span>{{item2.username}}</span><span (click)="delete2(i)">X</span>
</ng-container>
<textarea nz-input id="description" name="description" formControlName="description" placeholder="计划描述" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
</nz-form-control>
</nz-form-item>
</div>
......@@ -155,9 +147,12 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="description">计划描述</nz-form-label>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">负责人</nz-form-label>
<nz-form-control [nzSpan]="14">
<textarea nz-input id="description" name="description" formControlName="description" placeholder="计划描述" [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
<button (click)="selectPerson2()" nz-button><span>选择</span></button>
<ng-container *ngFor="let item2 of principalsList;let i = index;">
<span>{{item2.username}}</span><span class="cursor main-color" style="margin: 0px 10px 0px 5px;" (click)="delete2(i)">X</span>
</ng-container>
</nz-form-control>
</nz-form-item>
</div>
......
......@@ -88,6 +88,7 @@ export class PlanModalComponent implements OnInit {
this.workSer.findPlan(id).subscribe(
(res)=>{
res.data.number += "";
res.data.cycleNum += "";
this.participantsList = res.data.participants;
this.principalsList = res.data.principals;
if(res.data.fileName){
......
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