Commit 43edf30e authored by 胥静's avatar 胥静

增加选择数据类型(STRING和BOOL)

parent 7082c995
Pipeline #1636 passed with stage
in 0 seconds
......@@ -60,7 +60,7 @@
<app-search-item nz-tooltip nzTitle="此处输入为英文或数字" isMust="true" inModal="true" [label]="'wayName' | translate"
[(value)]="req.name"></app-search-item>
<app-search-select isMust="true" inModal="true" [label]="'wayType' | translate" [(value)]="req.type"
[data]="[{a: 'AI'}, {a: 'AO'}, {a: 'DI'}, {a: 'DO'}]" optL="a" optV="a"></app-search-select>
[data]="[{a: 'AI'}, {a: 'AO'}, {a: 'DI'}, {a: 'DO'}, {a: 'STRING'}, {a: 'BOOL'}]" optL="a" optV="a"></app-search-select>
<div class="searchItem inModal">
<div class="item-label"><span class="deleteFontColor">* </span>{{'isId' | translate}}
......
......@@ -77,6 +77,10 @@ export class ModuleDetailComponent implements OnInit {
add() {
this.req = {unit: '-', isTag: 0, isAlarm: 0};
// 新增时通道类型初期表示默认值'AI'
if (this.req.type === undefined) {
this.req.type = 'AI';
}
this.isUpdate = false;
this.isV = true;
this.try = {
......@@ -88,6 +92,7 @@ export class ModuleDetailComponent implements OnInit {
num: ['alarmInterval'],
eng: ['name', 'alias']
};
}
update(one) {
......
......@@ -58,7 +58,7 @@
<app-search-item nz-tooltip nzTitle="此处输入为英文或数字" isMust="true" inModal="true" [label]="'wayName' | translate"
[(value)]="req.name"></app-search-item>
<app-search-select isMust="true" inModal="true" [label]="'wayType' | translate" [(value)]="req.type"
[data]="[{a: 'AI'}, {a: 'AO'}, {a: 'DI'}, {a: 'DO'}]" optL="a" optV="a"></app-search-select>
[data]="[{a: 'AI'}, {a: 'AO'}, {a: 'DI'}, {a: 'DO'}, {a: 'STRING'}, {a: 'BOOL'}]" optL="a" optV="a"></app-search-select>
<div class="searchItem inModal">
<div class="item-label"><span class="deleteFontColor">* </span>{{'isId' | translate}}
......
......@@ -77,6 +77,10 @@ export class TopicModuleWayComponent implements OnInit {
add() {
this.req = {unit: '-', isTag: 0, isAlarm: 0};
// 新增时通道类型初期表示默认值'AI'
if (this.req.type === undefined) {
this.req.type = 'AI';
}
this.isUpdate = false;
this.isV = true;
this.try = {
......
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