Commit 6cce3c71 authored by van.chen's avatar van.chen

提交一下

parent 420ec6fa
......@@ -29,6 +29,7 @@ import {SensorMgrComponent} from '../main/sensor-mgr/sensor-mgr.component';
import {SensorDetailComponent} from '../main/sensor-detail/sensor-detail.component';
import {ModuleDetailComponent} from '../main/module-detail/module-detail.component';
import {TopicModuleDetailComponent} from '../main/topic-module-detail/topic-module-detail.component';
import {TopicModuleWayComponent} from '../main/topic-module-way/topic-module-way.component';
// 通用组件
import {SearchDateComponent} from '../component/search-date/search-date.component';
import {SearchItemComponent} from '../component/search-item/search-item.component';
......@@ -84,7 +85,8 @@ import {BackComponent} from '../component/back/back.component';
SensorMgrComponent,
SensorDetailComponent,
ModuleDetailComponent,
TopicModuleDetailComponent
TopicModuleDetailComponent,
TopicModuleWayComponent
]
})
export class LayoutModule {
......
<div class="tableBar" @fade>
<div class="btnLine" style="margin-bottom: 10px">
<label class="subTitle"> 123456 通道模板{{'detail' | translate}}</label>
<label class="subTitle"> {{probesModelName}} 通道模板{{'detail' | translate}}</label>
<button nz-button [nzType]="'primary'" [nzLoading]="isLoading" (click)="add()"><span>{{'addWay' | translate}}</span></button>
<app-back [isLoading]="isLoading"></app-back>
</div>
......
......@@ -17,6 +17,7 @@ export class ModuleDetailComponent implements OnInit {
data = [];
isLoading = false;
probesModelNo = '';
probesModelName = '';
isV = false;
isUpdate = false;
......@@ -32,6 +33,7 @@ export class ModuleDetailComponent implements OnInit {
this.ac.queryParams.subscribe((params) => {
if (params.probesModelNo) {
this.probesModelNo = params.probesModelNo;
this.probesModelName = params.probesModelName;
this.getData();
}
});
......
......@@ -24,15 +24,15 @@
<tbody nz-tbody>
<tr *ngFor="let one of nzTable.data, let i = index">
<td nz-td>{{i + 1}}</td>
<td nz-td class="canClick" (click)="toDetail(one.probesModelNo)">{{one.probesModelName}}</td>
<td nz-td class="canClick" (click)="toDetail(one)">{{one.probesModelName}}</td>
<td nz-td>{{one.probesModelName}}</td>
<td nz-td>{{one.remark}}</td>
<td nz-td>
<span class="editSpan" (click)="update(one)">{{'update' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="deleteFontColor" (click)="deleteConfirm(one)">{{'delete' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="addSpan" (click)="saveOther(one)">{{'saveOther' | translate}}</span>
<!--<nz-divider nzType="vertical"></nz-divider>-->
<!--<span class="addSpan" (click)="saveOther(one)">{{'saveOther' | translate}}</span>-->
</td>
</tr>
</tbody>
......
......@@ -63,8 +63,8 @@ export class ModuleMgrComponent implements OnInit {
this.isLoading = false;
}
toDetail(a) {
this.router.navigate(['/app/deviceCenter/moduleMgr/moduleDetail'], {queryParams: {probesModelNo: a}});
toDetail(one) {
this.router.navigate(['/app/deviceCenter/moduleMgr/moduleDetail'], {queryParams: {probesModelNo: one.probesModelNo, probesModelName: one.probesModelName}});
}
saveOther(one) {
......
<div class="tableBar" @fade>
<div class="btnLine" style="margin-bottom: 10px">
<label class="subTitle"> 123456 主题配置模板{{'detail' | translate}}</label>
<label class="subTitle"> {{topicModelName}} 主题配置模板{{'detail' | translate}}</label>
<button nz-button class="btnAdd" [nzLoading]="isLoading" (click)="add()"><span>{{'addTopic' | translate}}</span></button>
<app-back [isLoading]="isLoading"></app-back>
</div>
......@@ -22,9 +22,9 @@
<tbody nz-tbody>
<tr *ngFor="let one of nzTable.data, let i = index">
<td nz-td>{{i + 1}}</td>
<td nz-td>{{one.topicName}}</td>
<td nz-td>{{one.topicType}}</td>
<td nz-td>{{one.dataType}}</td>
<td nz-td class="canClick" (click)="toConfig(one)">{{one.topicName}}</td>
<td nz-td>{{one.topicType === 0 ? 'pub' : one.topicType === 1 ? 'sub': 'pub and sub'}}</td>
<td nz-td>{{one.dataType === 0 ? 'json' : 'bin'}}</td>
<td nz-td>{{one.dataInterval}}</td>
<td nz-td>
<span class="editSpan" (click)="update(one)">{{'update' | translate}}</span>
......@@ -40,9 +40,11 @@
[nzFooter]="foot1" [nzTitle]="isUpdate ? ('update' | translate) : ('add' | translate)" (nzOnCancel)="cancel()" nzMaskClosable="false">
<ng-template #con1>
<app-search-item isMust="true" inModal="true" [label]="'topicName' | translate" [(value)]="req.topicName"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'topicType' | translate" [(value)]="req.topicType"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'dataType' | translate" [(value)]="req.dataType"></app-search-item>
<app-search-select isMust="true" inModal="true" [label]="'probesModel' | translate" [(value)]="req.probesModelNo"
<app-search-select isMust="true" inModal="true" [label]="'topicType' | translate" [(value)]="req.topicType"
[data]="[{a: 'pub', b: 0}, {a: 'sub', b: 1}, {a: 'pub and sub', b: 2}]" optL="a" optV="b"></app-search-select>
<app-search-select isMust="true" inModal="true" [label]="'dataType' | translate" [(value)]="req.dataType"
[data]="[{a: 'json', b: 0}, {a: 'bin', b: 1}]" optL="a" optV="b"></app-search-select>
<app-search-select *ngIf="!isUpdate" isMust="true" inModal="true" [label]="'probesModel' | translate" [(value)]="req.probesModelNo"
[data]="probesModels" optL="probesModelName" optV="probesModelNo"></app-search-select>
<app-search-item isMust="true" inModal="true" [label]="'dataInterval' | translate" [(value)]="req.dataInterval"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'frequency' | translate" [(value)]="req.frequency"></app-search-item>
......
......@@ -17,6 +17,7 @@ export class TopicModuleDetailComponent implements OnInit {
data = [];
isLoading = false;
topicModelNo = '';
topicModelName = '';
isV = false;
isUpdate = false;
probesModels = [];
......@@ -33,9 +34,11 @@ export class TopicModuleDetailComponent implements OnInit {
this.ac.queryParams.subscribe((params) => {
if (params.topicModelNo) {
this.topicModelNo = params.topicModelNo;
this.topicModelName = params.topicModelName;
this.getData();
}
});
this.getProbsModels();
}
getData() {
......@@ -43,6 +46,18 @@ export class TopicModuleDetailComponent implements OnInit {
this.api.topicModelInfo.getAll([{topicModelNo: this.topicModelNo}, this.next]);
}
getProbsModels() {
this.isLoading = true;
this.api.probesModel.getAll(['', (data) => {
if (data.constructor === Array) {
this.probesModels = data;
} else {
this.message.error(data && data.message ? data.message : '获取数据失败');
}
this.isLoading = false;
}]);
}
onSearch() {
this.query();
}
......@@ -69,7 +84,7 @@ export class TopicModuleDetailComponent implements OnInit {
this.message.error(data && data.message ? data.message : '获取数据失败');
}
this.isLoading = false;
}
};
add() {
this.req = {};
......@@ -80,7 +95,7 @@ export class TopicModuleDetailComponent implements OnInit {
update(one) {
this.isUpdate = true;
this.req = {...one};
this.req.oldName = one.name;
this.req.oldTopicName = one.topicName;
this.isV = true;
}
......@@ -90,24 +105,33 @@ export class TopicModuleDetailComponent implements OnInit {
save() {
this.isLoading = true;
this.req.topicModelNo = this.topicModelNo;
let req: any = {};
if (this.isUpdate) {
this.api.topicModelInfo.updateTopicModelInfo([this.req, this.next]);
req = this.req;
req.topicModelNo = this.topicModelNo;
this.api.topicModelInfo.updateTopicModelInfo([req, this.next]);
} else {
this.api.topicModelInfo.addTopicModelInfo([this.req, this.next]);
req.topicModelNo = this.topicModelNo;
req.addTopicModelForInfoVos = [this.req];
this.api.topicModelInfo.addTopicModelInfo([req, this.next]);
}
}
deleteConfirm(one) {
this.modalService.confirm({
nzTitle : '<i> </i>',
nzTitle: '<i> </i>',
nzContent: '<b>' + this.translate.instant('confirmDeleteThisRecord') + '</b>',
nzOnOk : () => this.delete(one)
nzOnOk: () => this.delete(one)
});
}
delete(one) {
this.isLoading = true;
this.api.topicModelInfo.delTopicModelInfo([{topicModelNo: one.topicModelNo, name: one.name}, this.next]);
this.api.topicModelInfo.delTopicModelInfo([{topicModelNo: one.topicModelNo, topicName: one.topicName}, this.next]);
}
toConfig(one) {
this.router.navigate(['/app/deviceCenter/topicModuleMgr/topicModuleDetail/topicModuleWay'],
{queryParams: {topicModelNo: one.topicModelNo, topicName: one.topicName}});
}
}
......@@ -26,7 +26,7 @@
<tbody nz-tbody>
<tr *ngFor="let one of nzTable.data, let i = index">
<td nz-td>{{i + 1}}</td>
<td nz-td class="canClick" (click)="toDetail(one.topicModelNo)">{{one.topicModelName}}</td>
<td nz-td class="canClick" (click)="toDetail(one)">{{one.topicModelName}}</td>
<td nz-td>{{one.prefixName}}</td>
<td nz-td>{{one.companyName}}</td>
<td nz-td>{{one.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
......@@ -35,8 +35,8 @@
<span class="editSpan" (click)="update(one)">{{'update' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="deleteFontColor" (click)="deleteConfirm(one)">{{'delete' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="addSpan" (click)="saveOther(one)">{{'saveOther' | translate}}</span>
<!--<nz-divider nzType="vertical"></nz-divider>-->
<!--<span class="addSpan" (click)="saveOther(one)">{{'saveOther' | translate}}</span>-->
</td>
</tr>
</tbody>
......
......@@ -63,8 +63,8 @@ export class TopicModuleMgrComponent implements OnInit {
this.isLoading = false;
}
toDetail(a) {
this.router.navigate(['/app/deviceCenter/topicModuleMgr/topicModuleDetail'], {queryParams: {topicModelNo: a}});
toDetail(one) {
this.router.navigate(['/app/deviceCenter/topicModuleMgr/topicModuleDetail'], {queryParams: {topicModelNo: one.topicModelNo, topicModuleName: one.topicModuleName}});
}
saveOther(one) {
......
<div class="tableBar" @fade>
<div class="btnLine" style="margin-bottom: 10px">
<label class="subTitle"> {{topicName}} 通道模板{{'detail' | translate}}</label>
<button nz-button [nzType]="'primary'" [nzLoading]="isLoading" (click)="add()"><span>{{'addWay' | translate}}</span></button>
<app-back [isLoading]="isLoading"></app-back>
</div>
<nz-table #nzTable
[nzData]="data"
[nzSize]="'middle'"
nzShowSizeChanger
[nzLoading]="isLoading">
<thead nz-thead>
<tr>
<th nz-th><span>{{'wayName' | translate}}</span></th>
<th nz-th><span>{{'wayAlias' | translate}}</span></th>
<th nz-th><span>{{'per' | translate}}</span></th>
<th nz-th><span>{{'wayType' | translate}}</span></th>
<th nz-th><span>{{'max' | translate}}</span></th>
<th nz-th><span>{{'min' | translate}}</span></th>
<th nz-th><span>{{'alarmMax' | translate}}</span></th>
<th nz-th><span>{{'alarmMaxMax' | translate}}</span></th>
<th nz-th><span>{{'alarmMin' | translate}}</span></th>
<th nz-th><span>{{'alarmMinMin' | translate}}</span></th>
<th nz-th><span>{{'isAlarm' | translate}}</span></th>
<th nz-th><span>{{'oper' | translate}}</span></th>
</tr>
</thead>
<tbody nz-tbody>
<tr *ngFor="let one of nzTable.data, let i = index">
<td nz-td>{{one.name}}</td>
<td nz-td>{{one.alias}}</td>
<td nz-td>{{one.unit}}</td>
<td nz-td>{{one.type}}</td>
<td nz-td>{{one.rangeMax}}</td>
<td nz-td>{{one.rangeMin}}</td>
<td nz-td>{{one.alarmUp}}</td>
<td nz-td>{{one.upperAlarmLimit}}</td>
<td nz-td>{{one.alarmDown}}</td>
<td nz-td>{{one.lowerAlarmLimit}}</td>
<td nz-td>{{one.isAlarm === 1 ? '是': '否'}}</td>
<td nz-td>
<span class="editSpan" (click)="update(one)">{{'update' | translate}}</span>
<nz-divider nzType="vertical"></nz-divider>
<span class="deleteFontColor" (click)="deleteConfirm(one)">{{'delete' | translate}}</span>
</td>
</tr>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isV" [nzContent]="con1" nzWidth="750"
[nzFooter]="foot1" [nzTitle]="isUpdate ? ('update' | translate) : ('add' | translate)" (nzOnCancel)="cancel()" nzMaskClosable="false">
<ng-template #con1>
<div class="half">
<app-search-item isMust="true" inModal="true" [label]="'wayName' | translate" [(value)]="req.name"></app-search-item>
<app-search-item inModal="true" [label]="'per' | translate" [(value)]="req.unit"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'wayDescription' | translate" [(value)]="req.description"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'max' | translate" [(value)]="req.rangeMax"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'alarmMax' | translate" [(value)]="req.alarmUp"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'alarmMaxMax' | translate" [(value)]="req.upperAlarmLimit"></app-search-item>
<div class="searchItem inModal">
<div class="item-label"><span class="deleteFontColor">* </span>{{'isAlarm' | translate}}</div>
<div class="item-input">
<nz-radio-group [(ngModel)]="req.isAlarm">
<label nz-radio [nzValue]="1"></label>
<label nz-radio [nzValue]="0"></label>
</nz-radio-group>
</div>
</div>
</div>
<div class="half">
<app-search-item inModal="true" [label]="'wayAlias' | translate" [(value)]="req.alias"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'wayType' | translate" [(value)]="req.type"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'min' | translate" [(value)]="req.rangeMin"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'alarmMin' | translate" [(value)]="req.alarmDown"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'alarmMinMin' | translate" [(value)]="req.lowerAlarmLimit"></app-search-item>
<app-search-item isMust="true" inModal="true" [label]="'alarmInterval' | translate" [(value)]="req.alarmInterval"></app-search-item>
</div>
<div class="searchItem inModal">
<div class="item-label" style="width: 149px;"><span class="deleteFontColor">* </span>{{'wayInfo' | translate}}</div>
<div class="item-input" style="width: calc(100% - 158px);">
<textarea nz-input [(ngModel)]="req.boxedart"></textarea>
</div>
</div>
</ng-template>
<ng-template #foot1>
<button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel()"><span>{{'cancel' | translate}}</span></button>
<button nz-button nzType="primary" [nzLoading]="isLoading" (click)="save()"><span>{{'confirm' | translate}}</span></button>
</ng-template>
</nz-modal>
import { Component, OnInit } from '@angular/core';
import {ApiService} from '../../service/api';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {ActivatedRoute, Router} from '@angular/router';
import {TranslateService} from '@ngx-translate/core';
import {fadeIn} from '../../animation/fade-in';
@Component({
selector: 'app-topic-module-way',
templateUrl: './topic-module-way.component.html',
styles: [],
animations: [fadeIn]
})
export class TopicModuleWayComponent implements OnInit {
req: any = {};
data = [];
isLoading = false;
topicModelNo = '';
topicName = '';
isV = false;
isUpdate = false;
constructor(private api: ApiService, private message: NzMessageService, private ac: ActivatedRoute,
private translate: TranslateService, private router: Router, private modalService: NzModalService) {
}
ngOnInit() {
this.init();
}
init() {
this.ac.queryParams.subscribe((params) => {
if (params.topicModelNo) {
this.topicModelNo = params.topicModelNo;
this.topicName = params.topicName;
this.getData();
}
});
}
getData() {
this.isLoading = true;
this.api.topicConfigModel.getAll([{topicModelNo: this.topicModelNo, topicName: this.topicName}, this.next]);
}
onSearch() {
this.query();
}
query() {
this.isLoading = true;
}
onGetAll() {
this.req = {};
this.getData();
}
next = (data) => {
if (data && data.constructor === Array) {
this.data = data;
} else if (data && data.code === 1) {
this.message.success(data.message ? data.message : '操作成功');
this.isV = false;
this.getData();
} else if (data && data.code === 0) {
this.message.error(data.message ? data.message : '操作失败');
} else {
this.message.error(data && data.message ? data.message : '获取数据失败');
}
this.isLoading = false;
}
add() {
this.req = {};
this.isUpdate = false;
this.isV = true;
}
update(one) {
this.isUpdate = true;
this.req = {...one};
this.req.oldName = one.name;
this.isV = true;
}
cancel() {
this.isV = false;
}
save() {
this.isLoading = true;
this.req.topicModelNo = this.topicModelNo;
this.req.topicName = this.topicName;
if (this.isUpdate) {
this.api.topicConfigModel.updateTopicConfigModel([this.req, this.next]);
} else {
this.api.topicConfigModel.addTopicConfigModel([this.req, this.next]);
}
}
deleteConfirm(one) {
this.modalService.confirm({
nzTitle : '<i> </i>',
nzContent: '<b>' + this.translate.instant('confirmDeleteThisRecord') + '</b>',
nzOnOk : () => this.delete(one)
});
}
delete(one) {
this.isLoading = true;
this.api.topicConfigModel.delProbesModelInfo([{topicModelNo: one.topicModelNo, topicName: this.topicName, name: one.name}, this.next]);
}
}
......@@ -20,6 +20,7 @@ import {SensorMgrComponent} from './main/sensor-mgr/sensor-mgr.component';
import {SensorDetailComponent} from './main/sensor-detail/sensor-detail.component';
import {ModuleDetailComponent} from './main/module-detail/module-detail.component';
import {TopicModuleDetailComponent} from './main/topic-module-detail/topic-module-detail.component';
import {TopicModuleWayComponent} from './main/topic-module-way/topic-module-way.component';
const AppRoutes: Routes = [
{path: '', redirectTo: '/extra/login', pathMatch: 'full'},
......@@ -45,6 +46,7 @@ const routes: Routes = [
{path: 'deviceCenter/moduleMgr/moduleDetail', component: ModuleDetailComponent},
{path: 'deviceCenter/topicModuleMgr', component: TopicModuleMgrComponent},
{path: 'deviceCenter/topicModuleMgr/topicModuleDetail', component: TopicModuleDetailComponent},
{path: 'deviceCenter/topicModuleMgr/topicModuleDetail/topicModuleWay', component: TopicModuleWayComponent},
{path: 'deviceCenter/setModuleMgr', component: SetModuleMgrComponent},
{path: 'deviceCenter/mqttSetMgr', component: MqttSetMgrComponent},
{path: 'systemMgr/userCenter', component: UserComponent},
......
......@@ -70,32 +70,68 @@ export class ApiService {
};
public probesModel = {
addProbesModel: (data) => this.trans('post', '/probesModel/addProbesModel', data),
delProbesModel: (data) => this.trans('post', '/probesModel/delProbesModel', data),
getAll: (data) => this.trans('get', '/probesModel/getAll', data),
updateProbesModel: (data) => this.trans('post', '/probesModel/updateProbesModel', data),
addProbesModel: (data) => this.trans('post', '/device/probesModel/addProbesModel', data),
delProbesModel: (data) => this.trans('post', '/device/probesModel/delProbesModel', data),
getAll: (data) => this.trans('get', '/device/probesModel/getAll', data),
updateProbesModel: (data) => this.trans('post', '/device/probesModel/updateProbesModel', data),
};
public probesModelInfo = {
addProbesModelInfo: (data) => this.trans('post', '/probesModelInfo/addProbesModelInfo', data),
delProbesModelInfo: (data) => this.trans('post', '/probesModelInfo/delProbesModelInfo', data),
getAll: (data) => this.trans('post', '/probesModelInfo/getAll', data),
updateProbesModelInfo: (data) => this.trans('post', '/probesModelInfo/updateProbesModelInfo', data),
addProbesModelInfo: (data) => this.trans('post', '/device/probesModelInfo/addProbesModelInfo', data),
delProbesModelInfo: (data) => this.trans('post', '/device/probesModelInfo/delProbesModelInfo', data),
getAll: (data) => this.trans('post', '/device/probesModelInfo/getAll', data),
updateProbesModelInfo: (data) => this.trans('post', '/device/probesModelInfo/updateProbesModelInfo', data),
};
public topicModelInfo = {
addTopicModelInfo: (data) => this.trans('post', '/topicModelInfo/addTopicModelInfo', data),
delTopicModelInfo: (data) => this.trans('post', '/topicModelInfo/delTopicModelInfo', data),
deployTopicModelInfo: (data) => this.trans('post', '/topicModelInfo/deployTopicModelInfo', data),
getAll: (data) => this.trans('post', '/topicModelInfo/getAll', data),
updateTopicModelInfo: (data) => this.trans('post', '/topicModelInfo/updateTopicModelInfo', data),
addTopicModelInfo: (data) => this.trans('post', '/device/topicModelInfo/addTopicModelInfo', data),
delTopicModelInfo: (data) => this.trans('post', '/device/topicModelInfo/delTopicModelInfo', data),
deployTopicModelInfo: (data) => this.trans('post', '/device/topicModelInfo/deployTopicModelInfo', data),
getAll: (data) => this.trans('post', '/device/topicModelInfo/getAll', data),
updateTopicModelInfo: (data) => this.trans('post', '/device/topicModelInfo/updateTopicModelInfo', data),
};
public topicModel = {
addTopicModel: (data) => this.trans('post', '/topicModel/addTopicModel', data),
delTopicModel: (data) => this.trans('post', '/topicModel/delTopicModel', data),
getAll: (data) => this.trans('get', '/topicModel/getAll', data),
updateTopic: (data) => this.trans('post', '/topicModel/updateTopic', data),
addTopicModel: (data) => this.trans('post', '/device/topicModel/addTopicModel', data),
delTopicModel: (data) => this.trans('post', '/device/topicModel/delTopicModel', data),
getAll: (data) => this.trans('get', '/device/topicModel/getAll', data),
updateTopic: (data) => this.trans('post', '/device/topicModel/updateTopic', data),
};
public topicConfigModel = {
addTopicConfigModel: (data) => this.trans('post', '/device/topicConfigModel/addTopicConfigModel', data),
delProbesModelInfo: (data) => this.trans('post', '/device/topicConfigModel/delProbesModelInfo', data),
getAll: (data) => this.trans('post', '/device/topicConfigModel/getAll', data),
updateTopicConfigModel: (data) => this.trans('post', '/device/topicConfigModel/updateTopicConfigModel', data),
};
public topic = {
addTopic: (data) => this.trans('post', '/device/topic/addTopic', data),
delTopic: (data) => this.trans('post', '/device/topic/delTopic', data),
getByDeviceNo: (data) => this.trans('post', '/device/topic/getByDeviceNo', data),
updateTopic: (data) => this.trans('post', '/device/topic/updateTopic', data),
};
public device = {
addGateway: (data) => this.trans('post', '/device/device/addGateway', data),
addSensorOrBlend: (data) => this.trans('post', '/device/device/addSensorOrBlend', data),
batchAddGateway: (data) => this.trans('post', '/device/device/batchAddGateway', data),
batchAddSensor: (data) => this.trans('post', '/device/device/batchAddSensor', data),
batchBindDevice: (data) => this.trans('post', '/device/device/batchBindDevice', data),
batchDelDevice: (data) => this.trans('post', '/device/device/batchDelDevice', data),
batchUnBindDevice: (data) => this.trans('post', '/device/device/batchUnBindDevice', data),
batchUpdateCompany: (data) => this.trans('post', '/device/device/batchUpdateCompany', data),
delDevice: (data) => this.trans('post', '/device/device/delDevice', data),
deploySensor: (data) => this.trans('post', '/device/device/deploySensor', data),
gatewayBindGateway: (data) => this.trans('post', '/device/device/gatewayBindGateway', data),
getAll: (data) => this.trans('post', '/device/device/getAll', data),
getByTerm: (data) => this.trans('post', '/device/device/getByTerm', data),
mountUninstallDevice: (data) => this.trans('post', '/device/device/mountUninstallDevice', data),
mountUninstallGateway: (data) => this.trans('post', '/device/device/mountUninstallGateway', data),
unBindDevice: (data) => this.trans('post', '/device/device/unBindDevice', data),
updateCompany: (data) => this.trans('post', '/device/device/updateCompany', data),
updateGateway: (data) => this.trans('post', '/device/device/updateGateway', data),
updateSensor: (data) => this.trans('post', '/device/device/updateSensor', data),
};
private trans(type, addr, data) {
......
......@@ -124,5 +124,10 @@
"alarmInterval": "报警时间间隔/ms",
"wayInfo": "通道报警信息模板",
"wayDescription": "通道描述",
"addTopic": "新增主题"
"addTopic": "新增主题",
"interval": "间隔时间/ms",
"dataInterval": "批量数据存储间隔时间/ms",
"frequency": "发送频率",
"probesModel": "通道模板",
"topicModuleWay": "主题配置模板通道"
}
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