Commit 0bc10c8b authored by wangqinghua's avatar wangqinghua

update

parent ea245b32
...@@ -539,7 +539,7 @@ ...@@ -539,7 +539,7 @@
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired >父分类 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired >父分类
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择父分类" (ngModelChange)="getTypeByParent($event)"> <nz-select name="secondLevelType" nzPlaceHolder="选择父分类" (nzListOfSelectedValueChange)="getTypeByParent($event)">
<ng-container *ngFor="let item of parentTypeList"> <ng-container *ngFor="let item of parentTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</thead> </thead>
<tbody> <tbody>
<ng-container *ngFor="let data of outList"> <ng-container *ngFor="let data of outList">
<tr (click)="getEcharts(data.itemid)"> <tr class="cursor" (click)="getEcharts(data.itemid)">
<td>{{data.itemName}}</td> <td>{{data.itemName}}</td>
<td>{{data.max | toUtil}}</td> <td>{{data.max | toUtil}}</td>
<td>{{data.min | toUtil}}</td> <td>{{data.min | toUtil}}</td>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<a>运维工作</a> <a>运维工作</a>
</nz-breadcrumb-item> </nz-breadcrumb-item>
<nz-breadcrumb-item> <nz-breadcrumb-item>
运维事 资产备
</nz-breadcrumb-item> </nz-breadcrumb-item>
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
......
<div nz-row class="breadcrumbs" >
<div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>运维工作</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
资产备件
</nz-breadcrumb-item>
<nz-breadcrumb-item>
子分类详情
</nz-breadcrumb-item>
<nz-breadcrumb-item>
资产详情
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div>
</div>
<nz-tabset class="tabs-smart ">
<nz-tab #thirdTabs nzTitle="资产信息" >
<div nz-form class="ant-advanced-search-form form-select">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称
</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产名称" name="name" [(ngModel)]="validateForm.inventoryExtend.name">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">负责人</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="负责人" name="person" [(ngModel)]="validateForm.inventoryExtend.person">
</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="secondLevelType">资产数量
</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产数量" name="inventorycount" [(ngModel)]="validateForm.inventoryExtend.inventorycount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="品牌" name="invertoryname" [(ngModel)]="validateForm.inventoryExtend.invertoryname">
</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 >库存</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="库存" name="stock" [(ngModel)]="validateForm.inventoryExtend.stock">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" >型号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="型号" name="serialnoA" [(ngModel)]="validateForm.inventoryExtend.serialnoA">
</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>使用</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="使用" name="usedcount" [(ngModel)]="validateForm.inventoryExtend.usedcount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" >MAC地址</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="MAC地址" name="mac" [(ngModel)]="validateForm.inventoryExtend.mac">
</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 >借出</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="借出" name="lendcount" [(ngModel)]="validateForm.inventoryExtend.lendcount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">维保到期</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="维保到期" name="maintenanceExpiration" [(ngModel)]="validateForm.inventoryExtend.maintenanceExpiration" >
</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>维修</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="维修" name="repaircount" [(ngModel)]="validateForm.inventoryExtend.repaircount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">存放地点</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="存放地点" name="storageLocation" [(ngModel)]="validateForm.inventoryExtend.storageLocation">
</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 >报废</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="报废" name="scrapcount" [(ngModel)]="validateForm.inventoryExtend.scrapcount">
</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 >父分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择父分类" (nzListOfSelectedValueChange)="getTypeByParent($event)">
<ng-container *ngFor="let item of parentTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</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 >子分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择子分类" [(ngModel)]="validateForm.inventoryExtend.inventoryTypeid">
<ng-container *ngFor="let item of typeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
</nz-tab>
<nz-tab #thirdTabs nzTitle="关联事件" >
<nz-table #nzTable [nzData]="warnList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)" [nzLoading]="loading">
<thead>
<tr>
<th nzShowSort>时间</th>
<th>事件编号</th>
<th>标题</th>
<th nzWidth="15%">事件来源</th>
<th>事件分类</th>
<th>处理人</th>
<th>状态</th>
<th style="text-align: center">发送记录</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of warnList">
<td class="table-timeline">
<nz-timeline-item>{{data.clock}}</nz-timeline-item>
</td>
<td class="round-tag tag-form">
<nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="'#fc0d1b'"></nz-tag>
<nz-tag *ngIf="data.priority == 2 || data.priority == 3" [nzColor]="'#fd9827'"></nz-tag>
</td>
<td>{{data.hostname}}</td>
<td>{{data.description}}</td>
<td>{{data.equipmentType}}</td>
<td>{{data.continuedTime}}</td>
<td>
<ng-container *ngIf="data.r_clock">已恢复</ng-container>
<ng-container *ngIf="!data.r_clock">告警中</ng-container>
</td>
<td class="list-icon" (click)="showLog(data)"><i class="anticon anticon-profile"></i></td>
</tr>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-assets-detail',
templateUrl: './assets-detail.component.html',
styles: []
})
export class AssetsDetailComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
<div nz-row class="breadcrumbs" >
<div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>运维工作</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
资产备件
</nz-breadcrumb-item>
<nz-breadcrumb-item>
子分类详情
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3">
<nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="选择分类" (ngModelChange)="changeType($event)">
<ng-container *ngFor="let item of parentList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</div>
<div nz-col nzSpan="3">
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>导入资产</button>
</div>
<div nz-col nzSpan="3">
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>下载</button>
</div>
<div nz-col nzSpan="6">
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>添加</button>
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>编辑</button>
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>删除</button>
</div>
</div>
<nz-table #nzTable [nzData]="childrenList">
<thead>
<tr>
<th>资产编号</th>
<th>资产名称</th>
<th>资产总数</th>
<th>库存</th>
<th>使用</th>
<th>借出</th>
<th>维修</th>
<th>报废</th>
<th>关联事件</th>
<th style="text-align: center">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of childrenList">
<td class="round-tag tag-form">
{{data.name}}
</td>
<td>
{{data.inventorycount}}
</td>
<td>{{data.stock}}</td>
<td>
{{data.usedcount}}
</td>
<td>{{data.lendcount}}</td>
<td>
{{data.repaircount}}
</td>
<td>
{{data.scrapcount}}
</td>
<td>关联事件</td>
<td class="handle text-center">
<span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteSend(data)">删除</span>
</td>
</tr>
</tbody>
</nz-table>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-child-assets',
templateUrl: './child-assets.component.html',
styles: []
})
export class ChildAssetsComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
<nz-modal [nzWidth]="1080" [nzFooter]="null" [(nzVisible)]="isBasicEdit" nzTitle="{{modalTitle}}"
(nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()">
<form nz-form [formGroup]="validateForm">
<div nz-form class="ant-advanced-search-form form-select">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称
</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产名称" name="name" formControlName="name">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">负责人</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="负责人" name="person"
formControlName="person">
</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="secondLevelType">资产数量
</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产数量" name="inventorycount"
formControlName="inventorycount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="品牌" name="invertoryname"
formControlName="invertoryname">
</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>库存</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="库存" name="stock" formControlName="stock">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">型号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="型号" name="serialnoA"
formControlName="serialnoA">
</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>使用</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="使用" name="usedcount"
formControlName="usedcount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">MAC地址</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="MAC地址" name="mac" formControlName="mac">
</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>借出</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="借出" name="lendcount"
formControlName="lendcount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">维保到期</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="维保到期" name="maintenanceExpiration"
formControlName="maintenanceExpiration">
</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>维修</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="维修" name="repaircount"
formControlName="repaircount">
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="12">
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">存放地点</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="存放地点" name="storageLocation"
formControlName="storageLocation">
</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>报废</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="报废" name="scrapcount"
formControlName="scrapcount">
</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>父分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择父分类"
(nzListOfSelectedValueChange)="getTypeByParent($event)">
<ng-container *ngFor="let item of parentTypeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</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>子分类
</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择子分类" formControlName="inventoryTypeid">
<ng-container *ngFor="let item of typeList">
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
</form>
</nz-modal>
\ No newline at end of file
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {WorkService} from '../../work.service';
@Component({
selector: 'smart-assets',
templateUrl: './assets.component.html',
styles: []
})
export class AssetsComponent implements OnInit {
isVisible = false;
title;
validateForm:FormGroup;
parentTypeList;
typeList;
constructor(private workSer:WorkService,private fb:FormBuilder) {
}
ngOnInit() {
this.initForm();
}
initForm(){
this.validateForm = this.fb.group({
serialnoA:[null],
invertoryname:[null],
name:[null],
hostid:[null],
person:[null],
ip:[null],
equipmentTypeid:[null],
inventorycount:[null],
secondlevelTypeid:[null],
stock:[null],
usedcount:[null],
lendcount:[null],
mac:[null],
repaircount:[null],
maintenanceExpiration:[null],
scrapcount:[null],
storageLocation:[null],
groupid:[null],
inventoryTypeid:[null],
});
}
//父级分类
getParentType(){
this.workSer.findByParentType().subscribe(
(res)=>{
const data = res.data;
this.parentTypeList = data;
}
)
}
//通过父级分类查询子级分类
getTypeByParent(parentid){
this.workSer.findByParentidCount(parentid).subscribe(
(res)=>{
const data = res.data;
this.typeList = data;
}
)
}
showAddModal(title) {
this.title = title;
this.isVisible = true;
this.getParentType();
}
showEditModal(title) {
this.title = title;
this.isVisible = true;
this.getParentType();
}
handEditleOk() {
for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
if(this.validateForm.invalid){
return false;
}
if(this.title == ""){
this.create();
}
if(this.title == ""){
this.update();
}
}
create(){
this.workSer.createInventory(this.validateForm.value).subscribe(
(res)=>{
this.isVisible = false;
}
)
}
update(){
}
handleEditCancel() {
this.isVisible = false;
}
}
<nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">分类类型</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-tag nzMode="checkable" [nzChecked]="true" (nzCheckedChange)="checkChange($event)">Tag1</nz-tag>
<nz-tag nzMode="checkable" [nzChecked]="true" (nzCheckedChange)="checkChange($event)">Tag2</nz-tag>
</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="comments">分类描述</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<textarea id="comments" row="4" nz-input formControlName="comments"></textarea>
<nz-form-explain *ngIf="validateForm.get('comments').dirty && validateForm.get('comments').errors">请输入角色说明!</nz-form-explain>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
import {Component, OnInit} from '@angular/core';
import {timeEnd} from '@ngtools/webpack/src/benchmark';
@Component({
selector: 'smart-type-asets',
templateUrl: './type-asets.component.html',
styles: []
})
export class TypeAsetsComponent implements OnInit {
title;
isVisible;
constructor() {
}
ngOnInit() {
}
showAddModal(title) {
this.isVisible = true;
this.title = title;
}
showEditModal(title) {
this.isVisible = true;
this.title = title;
}
handleCancel() {
this.isVisible = false;
}
handleOk() {
this.isVisible = false;
}
}
...@@ -113,4 +113,11 @@ export class WorkService { ...@@ -113,4 +113,11 @@ export class WorkService {
findByType(data): Observable<any>{ findByType(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/syseventType/findByType' ,data); return this.http.post(SERVER_API_URL + '/syseventType/findByType' ,data);
} }
//创建资产
createInventory(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/inventory/createInventory' ,data);
}
//
} }
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