Commit 67ad5acc authored by wangqinghua's avatar wangqinghua

update

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