Commit 808838e6 authored by wangqinghua's avatar wangqinghua

update

parent 03e756cc
...@@ -15,15 +15,3 @@ export const color = { ...@@ -15,15 +15,3 @@ export const color = {
gray:'#bfbfbf', gray:'#bfbfbf',
black:'#6064' black:'#6064'
}; };
// //图片地址
// export const serverPath = "http://10.10.38.99:8282";
// export const imgUrl = serverPath + "/file/icon/";
// export const fileUrl = serverPath + "/file/";
//图片地址
const urlPath = window.document.location.href; //浏览器显示地址
const docPath = window.document.location.pathname; //文件在服务器相对地址
const index = urlPath.indexOf(docPath);
const serverPath = urlPath.substring(0, index);//服务器地址
export const imgUrl = serverPath + "/file/icon/";
export const fileUrl = serverPath + "/file/";
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<tr *ngFor="let data of iconList"> <tr *ngFor="let data of iconList">
<td>{{data.firstTypeName}}</td> <td>{{data.firstTypeName}}</td>
<td> <td>
<img style="width: 40px;" [src]="imgUrl + data.url"> <img style="width: 40px;" [src]="data.url">
</td> </td>
<td class="handle main-color"> <td class="handle main-color">
<span (click)="editIcon(data)">更换图标</span> <span (click)="editIcon(data)">更换图标</span>
......
...@@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core'; ...@@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core';
import {TopologyService} from '../topology.service'; import {TopologyService} from '../topology.service';
import {NzMessageService, NzModalService, NzMode} from 'ng-zorro-antd'; import {NzMessageService, NzModalService, NzMode} from 'ng-zorro-antd';
import {IconComponent} from '../model/icon/icon.component'; import {IconComponent} from '../model/icon/icon.component';
import {imgUrl, pageSize} from '../../app.constants'; import { pageSize} from '../../app.constants';
@Component({ @Component({
selector: 'smart-topology-img', selector: 'smart-topology-img',
...@@ -12,7 +12,6 @@ import {imgUrl, pageSize} from '../../app.constants'; ...@@ -12,7 +12,6 @@ import {imgUrl, pageSize} from '../../app.constants';
export class TopologyImgComponent implements OnInit { export class TopologyImgComponent implements OnInit {
@ViewChild('smartIcon') smartIcon:IconComponent; @ViewChild('smartIcon') smartIcon:IconComponent;
imgUrl = imgUrl;
iconList; iconList;
pageNum = 1; pageNum = 1;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</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)="searchKey()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div> </div>
</div> </div>
<nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNumber" [nzPageSize]="pageSize" (nzPageIndexChange)="changePage($event)"> <nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNumber" [nzPageSize]="pageSize" (nzPageIndexChange)="changePage($event)">
......
...@@ -69,6 +69,11 @@ export class AuditComponent implements OnInit { ...@@ -69,6 +69,11 @@ export class AuditComponent implements OnInit {
); );
} }
searchKey(){
this.pageNumber = 1;
this.getList();
}
changePage(e){ changePage(e){
this.pageNumber = e; this.pageNumber = e;
this.getList(); this.getList();
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roleName">角色名称</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roleName">角色名称</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input id="roleName" formControlName="name"> <input nz-input id="roleName" formControlName="name">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请填写角色名称! <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">角色名称最多输入20个字符!</nz-form-explain>
</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<!--<nz-form-item>--> <!--<nz-form-item>-->
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<textarea id="comment " row="4" nz-input formControlName="comment"></textarea> <textarea id="comment " row="4" nz-input formControlName="comment"></textarea>
<nz-form-explain *ngIf="validateForm.get('comment').dirty && validateForm.get('comment').errors"> <nz-form-explain *ngIf="validateForm.get('comment').dirty && validateForm.get('comment').errors">
请输入角色说明! 角色说明最多输入300个字符!
</nz-form-explain> </nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
...@@ -53,5 +52,13 @@ ...@@ -53,5 +52,13 @@
</div> </div>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24">模版权限</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<div class="tree-div" style="padding-left: 10px;">
<p *ngFor="let item of viewTempGroupList"><label nz-checkbox [(ngModel)]="item.checked" [ngModelOptions]="{standalone: true}">{{item.name}}</label></p>
</div>
</nz-form-control>
</nz-form-item>
</form> </form>
</nz-modal> </nz-modal>
...@@ -36,6 +36,9 @@ export class RoleComponent implements OnInit { ...@@ -36,6 +36,9 @@ export class RoleComponent implements OnInit {
initGroupList = []; //分组权限 initGroupList = []; //分组权限
viewGroupList = []; //分组权限 viewGroupList = []; //分组权限
initTempGroupList = []; //模版权限
viewTempGroupList = [];
initModuleList = []; //菜单权限 initModuleList = []; //菜单权限
dataModuleList = []; //菜单数据 dataModuleList = []; //菜单数据
...@@ -47,14 +50,15 @@ export class RoleComponent implements OnInit { ...@@ -47,14 +50,15 @@ export class RoleComponent implements OnInit {
this.ininForm(); this.ininForm();
this.getMenu(); this.getMenu();
this.getGroup(); this.getGroup();
this.getTempGroup();
} }
ininForm() { ininForm() {
this.viewGroupList = []; this.viewGroupList = [];
this.viewTempGroupList = [];
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
name: [null, [Validators.required]], name: [null, [Validators.required,Validators.maxLength(20)]],
// status: [null, [Validators.required]], comment: [null, [Validators.required,Validators.maxLength(300)]],
comment: [null, [Validators.required]],
}); });
} }
...@@ -69,9 +73,9 @@ export class RoleComponent implements OnInit { ...@@ -69,9 +73,9 @@ export class RoleComponent implements OnInit {
); );
} }
//获取分组 //获取资源分组
getGroup() { getGroup() {
this.overAllSer.findGroup().subscribe( this.overAllSer.getEditGroups(0).subscribe(
(res) => { (res) => {
this.initGroupList = res.data; this.initGroupList = res.data;
this.viewGroupList = res.data; this.viewGroupList = res.data;
...@@ -82,6 +86,19 @@ export class RoleComponent implements OnInit { ...@@ -82,6 +86,19 @@ export class RoleComponent implements OnInit {
); );
} }
//获取模版分组
getTempGroup() {
this.overAllSer.getEditGroups(1).subscribe(
(res) => {
this.initTempGroupList = res.data;
this.viewTempGroupList = res.data;
this.viewTempGroupList.forEach(e => {
e.checked = false;
});
}
);
}
toNode(data) { toNode(data) {
this.nodes = data.map(res => { this.nodes = data.map(res => {
return new NzTreeNode(res); return new NzTreeNode(res);
...@@ -146,6 +163,23 @@ export class RoleComponent implements OnInit { ...@@ -146,6 +163,23 @@ export class RoleComponent implements OnInit {
} }
return data; return data;
}); });
//模版分组回显
this.viewTempGroupList = this.initTempGroupList.map(e => {
const data = {
groupid: e.groupid,
name: e.name,
checked: false,
};
if (modulrArr.indexOf(e.groupid) > -1) {
data.checked = true;
}
return data;
});
}else{
this.viewGroupList = this.initGroupList;
this.viewTempGroupList = this.initTempGroupList;
} }
this.dataModuleList = data.modules; this.dataModuleList = data.modules;
...@@ -169,7 +203,6 @@ export class RoleComponent implements OnInit { ...@@ -169,7 +203,6 @@ export class RoleComponent implements OnInit {
this.toNode(list); this.toNode(list);
} }
); );
} }
} }
...@@ -199,6 +232,15 @@ export class RoleComponent implements OnInit { ...@@ -199,6 +232,15 @@ export class RoleComponent implements OnInit {
resourceArr.push(data); resourceArr.push(data);
} }
}); });
this.viewTempGroupList.forEach(e => {
if (e.checked) {
const data = {
groupId: e.groupid,
groupName: e.name
};
resourceArr.push(data);
}
});
if (this.title == '新增角色') { if (this.title == '新增角色') {
this.create(resourceArr); this.create(resourceArr);
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<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" nzRequired nzFor="name">资产名称 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="name">资产名称</nz-form-label>
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产名称" name="name" formControlName="name"> <input nz-input placeholder="资产名称" name="name" formControlName="name">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">资产名称最多输入20字符</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">负责人</nz-form-label> <nz-form-label [nzSpan]="6">负责人</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="负责人" name="person" <input nz-input placeholder="负责人" name="person" formControlName="person">
formControlName="person">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -26,8 +25,7 @@ ...@@ -26,8 +25,7 @@
<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">父分类 <nz-form-label [nzOffset]="4" [nzSpan]="6">父分类</nz-form-label>
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select name="secondLevelType" nzPlaceHolder="选择父分类" [ngModelOptions]="{standalone: true}" [(ngModel)]="parentId" (ngModelChange)="getTypeByParent($event)"> <nz-select name="secondLevelType" nzPlaceHolder="选择父分类" [ngModelOptions]="{standalone: true}" [(ngModel)]="parentId" (ngModelChange)="getTypeByParent($event)">
<ng-container *ngFor="let item of parentTypeList"> <ng-container *ngFor="let item of parentTypeList">
...@@ -39,8 +37,7 @@ ...@@ -39,8 +37,7 @@
</div> </div>
<div nz-col [nzSpan]="12"> <div nz-col [nzSpan]="12">
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzRequired>子分类 <nz-form-label [nzSpan]="6" nzRequired>子分类</nz-form-label>
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select nzAllowClear name="secondLevelType" nzPlaceHolder="选择子分类" formControlName="inventoryTypeid"> <nz-select nzAllowClear name="secondLevelType" nzPlaceHolder="选择子分类" formControlName="inventoryTypeid">
<ng-container *ngFor="let item of typeList"> <ng-container *ngFor="let item of typeList">
...@@ -55,11 +52,9 @@ ...@@ -55,11 +52,9 @@
<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="secondLevelType">资产数量 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">资产数量</nz-form-label>
</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产数量" name="inventorycount" <input nz-input placeholder="资产数量" name="inventorycount" formControlName="inventorycount">
formControlName="inventorycount">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -68,8 +63,7 @@ ...@@ -68,8 +63,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label> <nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="品牌" name="invertoryname" <input nz-input placeholder="品牌" name="invertoryname" formControlName="invertoryname">
formControlName="invertoryname">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -89,8 +83,7 @@ ...@@ -89,8 +83,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">型号</nz-form-label> <nz-form-label [nzSpan]="6">型号</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="型号" name="serialnoA" <input nz-input placeholder="型号" name="serialnoA" formControlName="serialnoA">
formControlName="serialnoA">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -101,8 +94,7 @@ ...@@ -101,8 +94,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6">使用</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">使用</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="使用" name="usedcount" <input nz-input placeholder="使用" name="usedcount" formControlName="usedcount">
formControlName="usedcount">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -121,8 +113,7 @@ ...@@ -121,8 +113,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6">借出</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">借出</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="借出" name="lendcount" <input nz-input placeholder="借出" name="lendcount" formControlName="lendcount">
formControlName="lendcount">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -131,8 +122,7 @@ ...@@ -131,8 +122,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">维保到期</nz-form-label> <nz-form-label [nzSpan]="6">维保到期</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="维保到期" name="maintenanceExpiration" <input nz-input placeholder="维保到期" name="maintenanceExpiration" formControlName="maintenanceExpiration">
formControlName="maintenanceExpiration">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -143,8 +133,7 @@ ...@@ -143,8 +133,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6">维修</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">维修</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="维修" name="repaircount" <input nz-input placeholder="维修" name="repaircount" formControlName="repaircount">
formControlName="repaircount">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -153,8 +142,7 @@ ...@@ -153,8 +142,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">存放地点</nz-form-label> <nz-form-label [nzSpan]="6">存放地点</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="存放地点" name="storageLocation" <input nz-input placeholder="存放地点" name="storageLocation" formControlName="storageLocation">
formControlName="storageLocation">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -165,8 +153,7 @@ ...@@ -165,8 +153,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6">报废</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6">报废</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="报废" name="scrapcount" <input nz-input placeholder="报废" name="scrapcount" formControlName="scrapcount">
formControlName="scrapcount">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
......
...@@ -34,7 +34,7 @@ export class AssetsComponent implements OnInit { ...@@ -34,7 +34,7 @@ export class AssetsComponent implements OnInit {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
serialnoA:[null], serialnoA:[null],
invertoryname:[null], invertoryname:[null],
name:[null,[Validators.required]], name:[null,[Validators.required,Validators.maxLength(20)]],
hostid:[null], hostid:[null],
person:[null], person:[null],
ip:[null], ip:[null],
......
import { Component, OnInit } from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {fileUrl} from '../../../app.constants';
import {CommonService} from '../../../shared/common/common.service'; import {CommonService} from '../../../shared/common/common.service';
@Component({ @Component({
selector: 'smart-look-plan', selector: 'smart-look-plan',
templateUrl: './look-plan.component.html', templateUrl: './look-plan.component.html',
styles: [] styles: []
}) })
export class LookPlanComponent implements OnInit { export class LookPlanComponent implements OnInit {
isVisible = false; isVisible = false;
title; title;
plan; plan;
planId; planId;
url = fileUrl + "/planFile/";
constructor(private workSer: WorkService, private commonSer: CommonService) {
constructor(private workSer:WorkService,private commonSer:CommonService) { } }
ngOnInit() { ngOnInit() {
} }
showModal(id,name){ showModal(id, name) {
this.planId = id; this.planId = id;
this.title = "计划:"+name; this.title = '计划:' + name;
this.isVisible = true; this.isVisible = true;
this.workSer.findPlan(id).subscribe( this.workSer.findPlan(id).subscribe(
(res)=>{ (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.plan = res.data; this.plan = res.data;
} }
} }
) );
} }
handleEditCancel(){ handleEditCancel() {
this.isVisible = false; this.isVisible = false;
} }
downLoad(){ downLoad() {
this.workSer.downloadTemplate("plan",this.planId).subscribe( this.workSer.downloadTemplate('plan', this.planId).subscribe(
(data)=>{ (data) => {
this.commonSer.downloadFile(this.plan.fileName,data) this.commonSer.downloadFile(this.plan.fileName, data);
} }
) );
} }
} }
...@@ -23,21 +23,21 @@ ...@@ -23,21 +23,21 @@
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="typeName">分类名称</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="typeName">分类名称</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input type="text" nz-input formControlName="name" name="typeName" id="typeName"> <input type="text" nz-input formControlName="name" name="typeName" id="typeName">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请选择分类名称!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">分类名称最多输入20字符</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="typeno">分类编号</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="status" nzRequired nzFor="typeno">分类编号</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<input type="text" nz-input formControlName="typeno" name="typeno" id="typeno"> <input type="text" nz-input formControlName="typeno" name="typeno" id="typeno">
<nz-form-explain *ngIf="validateForm.get('typeno').dirty && validateForm.get('typeno').errors">请选择分类编号!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('typeno').dirty && validateForm.get('typeno').errors">分类编号最多输入30字符!</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="tyoeDescribe">分类描述</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="tyoeDescribe">分类描述</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<textarea id="tyoeDescribe" row="4" nz-input formControlName="tyoeDescribe"></textarea> <textarea id="tyoeDescribe" row="4" nz-input formControlName="tyoeDescribe"></textarea>
<nz-form-explain *ngIf="validateForm.get('tyoeDescribe').dirty && validateForm.get('tyoeDescribe').errors">请输入分类描述!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('tyoeDescribe').dirty && validateForm.get('tyoeDescribe').errors">分类描述最多300字符!</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form> </form>
......
...@@ -70,9 +70,9 @@ export class TypeAsetsComponent implements OnInit { ...@@ -70,9 +70,9 @@ export class TypeAsetsComponent implements OnInit {
this.validateForm = this.fb.group( this.validateForm = this.fb.group(
{ {
parentid:[null], parentid:[null],
name:[null,[Validators.required]], name:[null,[Validators.required,Validators.maxLength(20)]],
typeno:[null,[Validators.required]], typeno:[null,[Validators.required,Validators.maxLength(30)]],
tyoeDescribe:[null], tyoeDescribe:[null,[Validators.maxLength(300)]],
} }
) )
} }
......
...@@ -1038,7 +1038,7 @@ TopologyEditor.prototype.drag = function (modeDiv, drawArea, text) { ...@@ -1038,7 +1038,7 @@ TopologyEditor.prototype.drag = function (modeDiv, drawArea, text) {
// 节点坐标 // 节点坐标
node.setBound((event.layerX ? event.layerX : event.offsetX) - self.scene.translateX - self.config.nodeDefaultWidth / 2, (event.layerY ? event.layerY : event.offsetY) - self.scene.translateY - self.config.nodeDefaultHeight / 2, self.config.nodeDefaultWidth, self.config.nodeDefaultHeight) node.setBound((event.layerX ? event.layerX : event.offsetX) - self.scene.translateX - self.config.nodeDefaultWidth / 2, (event.layerY ? event.layerY : event.offsetY) - self.scene.translateY - self.config.nodeDefaultHeight / 2, self.config.nodeDefaultWidth, self.config.nodeDefaultHeight)
// 节点图片 // 节点图片
node.setImage(topoImgPath + img) node.setImage(img)
// 节点数据 // 节点数据
node.nodeId = generateUUID() node.nodeId = generateUUID()
node.nodeType = nodeType node.nodeType = nodeType
...@@ -1081,7 +1081,7 @@ editor.utils = { ...@@ -1081,7 +1081,7 @@ editor.utils = {
node.setBound(320, -200, 50, 50); node.setBound(320, -200, 50, 50);
// 默认节点图片 // 默认节点图片
node.setImage(topoImgPath + img); node.setImage(img);
// 节点数据 // 节点数据
node.nodeId = generateUUID() node.nodeId = generateUUID()
node.text = text node.text = text
...@@ -1201,8 +1201,6 @@ editor.utils = { ...@@ -1201,8 +1201,6 @@ editor.utils = {
var node = editor.scene.selectedElements; var node = editor.scene.selectedElements;
node[0].text = ""; node[0].text = "";
node[0].text = item.name; node[0].text = item.name;
// node[0].setImage(topoImgPath + item.img);
// node[0].nodeImage = item.img;
editor.stage.paint(); editor.stage.paint();
}, },
// 放大 // 放大
......
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