@flexem/fc-gui 3.0.0-alpha.123 → 3.0.0-alpha.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/@flexem/fc-gui.umd.js +2860 -1471
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/communication/variable/variable-communicator.d.ts +2 -0
- package/config/alarm/get-alarms-args.d.ts +4 -1
- package/config/alarm/get-alarms-args.js +5 -1
- package/config/alarm/get-alarms-args.metadata.json +1 -1
- package/config/history-data/get-history-data-args.d.ts +14 -3
- package/config/history-data/get-history-data-args.js +5 -3
- package/config/history-data/get-history-data-args.metadata.json +1 -1
- package/elements/alarm/alarm-element.d.ts +28 -3
- package/elements/alarm/alarm-element.js +124 -14
- package/elements/alarm/alarm-element.metadata.json +1 -1
- package/elements/base/readable-element.js +14 -5
- package/elements/base/state-control-element.js +2 -2
- package/elements/historical-curve/historical-curve.element.d.ts +24 -2
- package/elements/historical-curve/historical-curve.element.js +180 -34
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.js +12 -8
- package/elements/main-element.metadata.json +1 -1
- package/elements/numerical-display/numerical-display-element.d.ts +9 -2
- package/elements/numerical-display/numerical-display-element.js +22 -2
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +54 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +517 -0
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
- package/elements/shared/graph/graph-state-element.d.ts +0 -1
- package/elements/shared/graph/graph-state-element.js +1 -30
- package/elements/shared/graph/graph-state-element.metadata.json +1 -1
- package/elements/shared/text/text-element.d.ts +9 -0
- package/elements/shared/text/text-element.js +20 -0
- package/elements/shared/text/text-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +25 -1
- package/elements/shared/text/text-state-element.js +100 -2
- package/elements/shared/text/text-state-element.metadata.json +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +24 -2
- package/elements/static-elements/hyperlink-element.js +101 -3
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +23 -2
- package/elements/static-elements/text-element.js +96 -3
- package/elements/static-elements/text-element.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +10 -4
- package/elements/switch-indicator-light/switch-indicator-light-element.js +26 -25
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +23 -2
- package/elements/view-operation/view-operation.element.js +95 -1
- package/elements/view-operation/view-operation.element.metadata.json +1 -1
- package/gui/gui-context.d.ts +11 -2
- package/gui/gui-view.js +20 -4
- package/modal/write-value/write-value-modal-args.d.ts +3 -1
- package/modal/write-value/write-value-modal-args.js +2 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +4 -0
- package/modal/write-value/write-value-modal.component.js +25 -0
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/model/base/font-setting-model.d.ts +6 -0
- package/model/base/font-setting-model.metadata.json +1 -1
- package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
- package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
- package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
- package/model/scroll-alarm/scroll-alarm.model.js +0 -0
- package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
- package/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
- package/model/view-operation/view-operation-element.model.d.ts +7 -1
- package/package.json +1 -1
- package/public_api.js +1 -0
- package/remote/communication/variable/remote-variable-communicator.d.ts +15 -0
- package/remote/communication/variable/remote-variable-communicator.js +76 -2
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/service/index.d.ts +3 -0
- package/service/index.js +1 -0
- package/service/index.metadata.json +1 -1
- package/service/language.service.d.ts +37 -0
- package/service/language.service.js +0 -0
- package/service/language.service.metadata.json +1 -0
- package/service/system-text-library.service.d.ts +76 -0
- package/service/system-text-library.service.js +28 -0
- package/service/system-text-library.service.metadata.json +1 -0
- package/service/text-library.service.d.ts +49 -0
- package/service/text-library.service.js +0 -0
- package/service/text-library.service.metadata.json +1 -0
- package/shared/gui-consts.d.ts +1 -0
- package/shared/gui-consts.js +2 -1
- package/shared/gui-consts.metadata.json +1 -1
|
@@ -17,12 +17,15 @@ import { DisplayMode, GlobalSettings } from '../../settings';
|
|
|
17
17
|
import { VariableUtil } from '../../utils/variable-util';
|
|
18
18
|
import { VariableDefinition } from '../../communication/variable/variable-definition';
|
|
19
19
|
export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
20
|
-
constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId) {
|
|
20
|
+
constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
21
21
|
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
22
22
|
this.modalService = modalService;
|
|
23
23
|
this.graphStore = graphStore;
|
|
24
24
|
this.operationRecordService = operationRecordService;
|
|
25
25
|
this.securityChecker = securityChecker;
|
|
26
|
+
this.textLibraryService = textLibraryService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.guiContext = guiContext;
|
|
26
29
|
this.isBitRestoration = false; // 是否是 位设定且执行设置是复位
|
|
27
30
|
this.isVerifiedForRestoration = false; // 位设定且执行设置是复位情况下,是否已经完成了验证
|
|
28
31
|
this.isWriteRestorationDownValue = false;
|
|
@@ -208,7 +211,7 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
208
211
|
default:
|
|
209
212
|
throw new Error(`Unknown switchType:${settings.type}`);
|
|
210
213
|
}
|
|
211
|
-
this.
|
|
214
|
+
this.indicatorLightOperator.currentStateIdChanged.subscribe(statusIdValue => {
|
|
212
215
|
this.currentStateIdChange(statusIdValue);
|
|
213
216
|
});
|
|
214
217
|
this.indicatorLightOperator.requestData(this.signalRAppId);
|
|
@@ -238,39 +241,37 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
238
241
|
this.graphStateElement = new GraphStateElement(this.model.graphSetting, width, height, this.graphStore, this.logger, this.model.version, this.model.states);
|
|
239
242
|
this.$element.append(this.graphStateElement.Element);
|
|
240
243
|
}
|
|
241
|
-
this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states);
|
|
244
|
+
this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states, this.model.textLibrary, this.textLibraryService, this.languageService, this.guiContext);
|
|
242
245
|
this.$element.append(this.textStateElement.Element);
|
|
243
246
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
if (this.model.states.length < 2) {
|
|
249
|
-
throw new Error('The switch indicator light\'s states must greater than 2.');
|
|
250
|
-
}
|
|
251
|
-
}
|
|
247
|
+
/**
|
|
248
|
+
* 释放资源
|
|
249
|
+
*/
|
|
252
250
|
dispose() {
|
|
253
|
-
//
|
|
254
|
-
if (this.
|
|
255
|
-
|
|
251
|
+
// 释放文本元素资源(取消语种变化订阅等)
|
|
252
|
+
if (this.textStateElement) {
|
|
253
|
+
this.textStateElement.dispose();
|
|
256
254
|
}
|
|
257
|
-
//
|
|
255
|
+
// 释放指示灯操作器资源
|
|
256
|
+
if (this.indicatorLightOperator) {
|
|
257
|
+
// indicatorLightOperator 可能有自己的dispose方法
|
|
258
|
+
}
|
|
259
|
+
// 清除定时器
|
|
258
260
|
if (this.restorationTimer) {
|
|
259
261
|
clearTimeout(this.restorationTimer);
|
|
260
262
|
this.restorationTimer = undefined;
|
|
261
263
|
}
|
|
262
|
-
//
|
|
263
|
-
if (this.
|
|
264
|
-
this.
|
|
264
|
+
// 移除事件监听
|
|
265
|
+
if (this.onDocMouseUp) {
|
|
266
|
+
document.removeEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
|
|
265
267
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
}
|
|
269
|
+
checkState() {
|
|
270
|
+
if (!this.model.states) {
|
|
271
|
+
throw new Error('The switch indicator light\'s states is undefined.');
|
|
269
272
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
// TextStateElement 可能也需要 dispose,暂时先清理引用
|
|
273
|
-
this.textStateElement = null;
|
|
273
|
+
if (this.model.states.length < 2) {
|
|
274
|
+
throw new Error('The switch indicator light\'s states must greater than 2.');
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
277
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":33,"character":49},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":51,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":52,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":53,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":54,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":55,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":56,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":57,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":58,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":59,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":60,"character":22},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":62,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":63,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":64,"character":38}]}],"handleMouseUp":[{"__symbolic":"method"}],"initOnDocMouseUpEvent":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"doSwitchOperator":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"initSwitchOperator":[{"__symbolic":"method"}],"initIndictorLightOperator":[{"__symbolic":"method"}],"currentStateIdChange":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"checkState":[{"__symbolic":"method"}]}}}}]
|
|
@@ -3,11 +3,12 @@ import { BsModalService } from 'ngx-bootstrap/modal';
|
|
|
3
3
|
import { Localization } from '../../localization';
|
|
4
4
|
import { GraphStore, VariableStore } from '../../config';
|
|
5
5
|
import { ViewOperationElementModel } from '../../model';
|
|
6
|
-
import { PermissionChecker, OperationRecordService } from '../../service';
|
|
6
|
+
import { PermissionChecker, OperationRecordService, TextLibraryService, LanguageService } from '../../service';
|
|
7
7
|
import { VariableCommunicator } from '../../communication';
|
|
8
8
|
import { ConditionalEnableElement } from '../base/conditional-enable-element';
|
|
9
9
|
import { PopupViewService } from '../../view/popup-view.service';
|
|
10
10
|
import { SecurityChecker } from '../../security';
|
|
11
|
+
import { GuiContext } from '../../gui/gui-context';
|
|
11
12
|
export declare class ViewOperationElement extends ConditionalEnableElement {
|
|
12
13
|
private readonly modalService;
|
|
13
14
|
private readonly graphStore;
|
|
@@ -16,13 +17,17 @@ export declare class ViewOperationElement extends ConditionalEnableElement {
|
|
|
16
17
|
private readonly popupViewService;
|
|
17
18
|
private readonly hostContainerId;
|
|
18
19
|
private readonly el;
|
|
20
|
+
private readonly textLibraryService?;
|
|
21
|
+
private readonly languageService?;
|
|
22
|
+
private readonly guiContext?;
|
|
19
23
|
protected model: ViewOperationElementModel;
|
|
20
24
|
private readonly logger;
|
|
21
25
|
private readonly viewService;
|
|
22
26
|
private graphStateElement?;
|
|
27
|
+
private languageChangeSubscription?;
|
|
23
28
|
private touchedScreenX;
|
|
24
29
|
private touchedScreenY;
|
|
25
|
-
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, localization: Localization, popupViewService: PopupViewService, hostContainerId: string, el: ElementRef, signalRAppId: string);
|
|
30
|
+
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, localization: Localization, popupViewService: PopupViewService, hostContainerId: string, el: ElementRef, signalRAppId: string, textLibraryService?: TextLibraryService, languageService?: LanguageService, guiContext?: GuiContext);
|
|
26
31
|
private initElement;
|
|
27
32
|
private switchToState;
|
|
28
33
|
private initGraph;
|
|
@@ -33,4 +38,20 @@ export declare class ViewOperationElement extends ConditionalEnableElement {
|
|
|
33
38
|
private closeView;
|
|
34
39
|
private moveView;
|
|
35
40
|
private recordViewOperation;
|
|
41
|
+
/**
|
|
42
|
+
* 订阅语种变化事件
|
|
43
|
+
*/
|
|
44
|
+
private subscribeLanguageChange;
|
|
45
|
+
/**
|
|
46
|
+
* 更新文本内容(支持文本库和语种切换)
|
|
47
|
+
*/
|
|
48
|
+
private updateTextContent;
|
|
49
|
+
/**
|
|
50
|
+
* 获取显示文本
|
|
51
|
+
*/
|
|
52
|
+
private getDisplayText;
|
|
53
|
+
/**
|
|
54
|
+
* 释放资源
|
|
55
|
+
*/
|
|
56
|
+
dispose(): void;
|
|
36
57
|
}
|
|
@@ -9,7 +9,7 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
|
|
|
9
9
|
import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
|
|
10
10
|
import { ViewService } from '../../view/view.service';
|
|
11
11
|
export class ViewOperationElement extends ConditionalEnableElement {
|
|
12
|
-
constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId) {
|
|
12
|
+
constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
13
13
|
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
14
14
|
this.modalService = modalService;
|
|
15
15
|
this.graphStore = graphStore;
|
|
@@ -18,20 +18,27 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
18
18
|
this.popupViewService = popupViewService;
|
|
19
19
|
this.hostContainerId = hostContainerId;
|
|
20
20
|
this.el = el;
|
|
21
|
+
this.textLibraryService = textLibraryService;
|
|
22
|
+
this.languageService = languageService;
|
|
23
|
+
this.guiContext = guiContext;
|
|
21
24
|
this.touchedScreenX = 0;
|
|
22
25
|
this.touchedScreenY = 0;
|
|
23
26
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
24
27
|
this.viewService = injector.get(ViewService);
|
|
25
28
|
this.initElement();
|
|
29
|
+
this.subscribeLanguageChange();
|
|
26
30
|
}
|
|
27
31
|
initElement() {
|
|
28
32
|
const width = this.model.size.width;
|
|
29
33
|
const height = this.model.size.height;
|
|
30
34
|
this.initGraph(width, height);
|
|
31
35
|
this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', height).attr('fill', 'transparent');
|
|
36
|
+
// 初始化文本显示
|
|
32
37
|
const $dateTimeText = this.$element.find('text').last();
|
|
33
38
|
const fontStyle = this.model.label.font.fontStyle;
|
|
34
39
|
$dateTimeText.css('font', fontStyle + ',msyh');
|
|
40
|
+
// 设置初始文本内容(支持文本库)
|
|
41
|
+
this.updateTextContent($dateTimeText);
|
|
35
42
|
this.switchToState(0);
|
|
36
43
|
this.rootElement.on('mousedown', () => {
|
|
37
44
|
if (!this.isInitialized) {
|
|
@@ -199,4 +206,91 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
199
206
|
this.operationRecordService.record({ operationDescription: this.model.operationDescription });
|
|
200
207
|
}
|
|
201
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* 订阅语种变化事件
|
|
211
|
+
*/
|
|
212
|
+
subscribeLanguageChange() {
|
|
213
|
+
// 只有使用文本库时才需要订阅语种变化
|
|
214
|
+
if (!this.model.textLibrary || this.model.textLibrary.labelType !== 'textLibrary') {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (this.guiContext && this.guiContext.languageChanged$) {
|
|
218
|
+
this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
|
|
219
|
+
// 更新文本内容
|
|
220
|
+
const $dateTimeText = this.$element.find('text').last();
|
|
221
|
+
this.updateTextContent($dateTimeText);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 更新文本内容(支持文本库和语种切换)
|
|
227
|
+
*/
|
|
228
|
+
updateTextContent($textElement) {
|
|
229
|
+
const displayText = this.getDisplayText();
|
|
230
|
+
$textElement.text(displayText);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* 获取显示文本
|
|
234
|
+
*/
|
|
235
|
+
getDisplayText() {
|
|
236
|
+
var _a, _b, _c, _d, _e, _f;
|
|
237
|
+
// 检查是否使用文本库
|
|
238
|
+
if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
|
|
239
|
+
const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
|
|
240
|
+
const textItem = this.model.textLibrary.selectedTextItem;
|
|
241
|
+
if (textLibraryId && textItem && this.textLibraryService) {
|
|
242
|
+
// 获取文本库数据
|
|
243
|
+
const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
|
|
244
|
+
if (textLibraryData && textLibraryData.data) {
|
|
245
|
+
// 查找对应的文本条目
|
|
246
|
+
const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
|
|
247
|
+
if (textEntry) {
|
|
248
|
+
// 获取当前语种ID
|
|
249
|
+
const currentLanguageId = (_c = (_b = (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.getCurrentLanguageId) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
|
|
250
|
+
// 确定要使用的语种代码(culture)
|
|
251
|
+
let targetLanguage;
|
|
252
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
253
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
254
|
+
// 设备未设置当前语种,使用默认语种
|
|
255
|
+
targetLanguage = defaultLanguage;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
259
|
+
const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
|
|
260
|
+
if (currentLanguage) {
|
|
261
|
+
targetLanguage = currentLanguage;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
// 无法获取语种代码,使用默认语种
|
|
265
|
+
targetLanguage = defaultLanguage;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// 返回对应语种的文本
|
|
269
|
+
if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
|
|
270
|
+
return textEntry.cultures[targetLanguage];
|
|
271
|
+
}
|
|
272
|
+
// 如果没有对应语种,返回空字符串
|
|
273
|
+
return '';
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// 文本库配置但未找到数据,返回空字符串
|
|
278
|
+
return '';
|
|
279
|
+
}
|
|
280
|
+
// 默认返回文本内容
|
|
281
|
+
return this.model.label.content || '';
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* 释放资源
|
|
285
|
+
*/
|
|
286
|
+
dispose() {
|
|
287
|
+
// 取消语种变化订阅
|
|
288
|
+
if (this.languageChangeSubscription) {
|
|
289
|
+
this.languageChangeSubscription.unsubscribe();
|
|
290
|
+
this.languageChangeSubscription = undefined;
|
|
291
|
+
}
|
|
292
|
+
if (this.$element) {
|
|
293
|
+
this.$element.remove();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
202
296
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":22,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":34,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":35,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":36,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":37,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":38,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":39,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":40,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":41,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":42,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":43,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":29},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":47,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":48,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":49,"character":38}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"updateTextContent":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
|
package/gui/gui-context.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ConfigStore } from '../config';
|
|
2
2
|
import { VariableCommunicator } from '../communication';
|
|
3
3
|
import { SecurityChecker } from '../security';
|
|
4
|
-
import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService } from '../service';
|
|
4
|
+
import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService, TextLibraryService, LanguageService, SystemTextLibraryService } from '../service';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
5
6
|
export interface GuiContext {
|
|
6
7
|
readonly configStore: ConfigStore;
|
|
7
8
|
readonly variableCommunicator: VariableCommunicator;
|
|
@@ -11,7 +12,15 @@ export interface GuiContext {
|
|
|
11
12
|
readonly securityChecker: SecurityChecker;
|
|
12
13
|
readonly videoService: VideoService;
|
|
13
14
|
readonly weatherService: WeatherService;
|
|
15
|
+
readonly textLibraryService?: TextLibraryService;
|
|
16
|
+
readonly languageService?: LanguageService;
|
|
17
|
+
readonly systemTextLibraryService?: SystemTextLibraryService;
|
|
14
18
|
readonly configureViewId?: number;
|
|
15
19
|
readonly configureViewCode?: string;
|
|
16
|
-
|
|
20
|
+
readonly languageChanged$?: Subject<number | null>;
|
|
21
|
+
getCurrentLanguageId?(): number | null;
|
|
22
|
+
getDefaultLanguageId?(): number;
|
|
23
|
+
getLanguageCultureById?(languageId: number | null): string | null;
|
|
24
|
+
updateCurrentLanguageId?(languageId: number | null): Promise<void>;
|
|
25
|
+
dispose(): void;
|
|
17
26
|
}
|
package/gui/gui-view.js
CHANGED
|
@@ -72,7 +72,23 @@ export class GuiView {
|
|
|
72
72
|
this.openVariableStatesSubscription.unsubscribe();
|
|
73
73
|
}
|
|
74
74
|
this.openedVariableNames = this.mainElement.getVariableNames();
|
|
75
|
-
|
|
75
|
+
// 分离系统变量和普通变量
|
|
76
|
+
const systemVariables = [];
|
|
77
|
+
const normalVariablesForState = [];
|
|
78
|
+
this.openedVariableNames.forEach(variableName => {
|
|
79
|
+
if (variableName === '当前语种ID') {
|
|
80
|
+
// 系统变量直接订阅,不需要等待状态
|
|
81
|
+
systemVariables.push(variableName);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
normalVariablesForState.push(variableName);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
// 立即订阅系统变量
|
|
88
|
+
if (systemVariables.length > 0) {
|
|
89
|
+
this.normalOpenedVariableNames(systemVariables);
|
|
90
|
+
}
|
|
91
|
+
if (normalVariablesForState.indexOf('设备状态') !== -1) {
|
|
76
92
|
if (this.requestVirtualDeviceState) {
|
|
77
93
|
this.requestVirtualDeviceState.unsubscribe();
|
|
78
94
|
}
|
|
@@ -84,13 +100,13 @@ export class GuiView {
|
|
|
84
100
|
this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
|
|
85
101
|
complete: () => { }
|
|
86
102
|
});
|
|
87
|
-
|
|
103
|
+
normalVariablesForState.splice(normalVariablesForState.indexOf('设备状态'), 1);
|
|
88
104
|
}
|
|
89
|
-
if (
|
|
105
|
+
if (normalVariablesForState.length === 0) {
|
|
90
106
|
return;
|
|
91
107
|
}
|
|
92
108
|
this.openVariableStatesSubscription =
|
|
93
|
-
this.perViewVariableCommunicator.subscribeVariableStates(
|
|
109
|
+
this.perViewVariableCommunicator.subscribeVariableStates(normalVariablesForState).subscribe((states) => {
|
|
94
110
|
this.mainElement.reportVariableStates(states);
|
|
95
111
|
const normalVariableNames = [];
|
|
96
112
|
each(states, v => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NumericalOperation } from '../../model';
|
|
2
2
|
import { ReleasedVariableService } from '../../service';
|
|
3
|
+
import { GuiContext } from '../../gui/gui-context';
|
|
3
4
|
export declare class WriteValueModalArgs {
|
|
4
5
|
variableName: string;
|
|
5
6
|
dataType: number;
|
|
@@ -10,5 +11,6 @@ export declare class WriteValueModalArgs {
|
|
|
10
11
|
version: number;
|
|
11
12
|
enableDataParsed: boolean;
|
|
12
13
|
releasedVariableService: ReleasedVariableService;
|
|
13
|
-
|
|
14
|
+
guiContext?: GuiContext;
|
|
15
|
+
constructor(variableName: string, dataType: number, fBoxDataType: number, integerDigits: number, fractionDigits: number, numericalOperation: NumericalOperation, version: number, enableDataParsed: boolean, releasedVariableService: ReleasedVariableService, guiContext?: GuiContext);
|
|
14
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class WriteValueModalArgs {
|
|
2
|
-
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed, releasedVariableService) {
|
|
2
|
+
constructor(variableName, dataType, fBoxDataType, integerDigits, fractionDigits, numericalOperation, version, enableDataParsed, releasedVariableService, guiContext) {
|
|
3
3
|
this.variableName = variableName;
|
|
4
4
|
this.dataType = dataType;
|
|
5
5
|
this.fBoxDataType = fBoxDataType;
|
|
@@ -9,5 +9,6 @@ export class WriteValueModalArgs {
|
|
|
9
9
|
this.version = version;
|
|
10
10
|
this.enableDataParsed = enableDataParsed;
|
|
11
11
|
this.releasedVariableService = releasedVariableService;
|
|
12
|
+
this.guiContext = guiContext;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalArgs":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","module":"../../model","name":"NumericalOperation","line":11,"character":35},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"boolean"},{"__symbolic":"reference","module":"../../service","name":"ReleasedVariableService","line":14,"character":40},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":15,"character":28}]}]}}}}]
|
|
@@ -42,6 +42,10 @@ export declare class WriteValueModalComponent implements OnInit {
|
|
|
42
42
|
private setValueRangeAccordToDataParsed;
|
|
43
43
|
getWriteValueRangeText(): string;
|
|
44
44
|
save(): void;
|
|
45
|
+
/**
|
|
46
|
+
* 处理"当前语种ID"系统变量的保存
|
|
47
|
+
*/
|
|
48
|
+
private handleCurrentLanguageIdSave;
|
|
45
49
|
close(): void;
|
|
46
50
|
validate(event?: any): void;
|
|
47
51
|
private showValidationErrorInfo;
|
|
@@ -110,6 +110,11 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
110
110
|
value = this.formatWriteValue();
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
// 处理系统变量"当前语种ID"
|
|
114
|
+
if (this.variableName === '当前语种ID') {
|
|
115
|
+
this.handleCurrentLanguageIdSave(value);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
113
118
|
if (!this.args.releasedVariableService) {
|
|
114
119
|
this.onClosed({
|
|
115
120
|
value: value,
|
|
@@ -134,6 +139,26 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
134
139
|
});
|
|
135
140
|
});
|
|
136
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* 处理"当前语种ID"系统变量的保存
|
|
144
|
+
*/
|
|
145
|
+
handleCurrentLanguageIdSave(value) {
|
|
146
|
+
if (!this.args.guiContext || !this.args.guiContext.updateCurrentLanguageId) {
|
|
147
|
+
this.showValidationErrorInfo(this.localization.loadFailed);
|
|
148
|
+
this.isSubmitting = false;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// 转换为数字类型
|
|
152
|
+
const languageId = value === '' || value == null ? null : Number(value);
|
|
153
|
+
// 调用 GuiContext 的更新方法
|
|
154
|
+
this.args.guiContext.updateCurrentLanguageId(languageId).then(() => {
|
|
155
|
+
// 更新成功,关闭弹窗
|
|
156
|
+
this.bsModalRef.hide();
|
|
157
|
+
}).catch(() => {
|
|
158
|
+
this.showValidationErrorInfo(this.localization.loadFailed);
|
|
159
|
+
this.isSubmitting = false;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
137
162
|
close() {
|
|
138
163
|
this.bsModalRef.hide();
|
|
139
164
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"writeValueModal","template":"<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ","styles":[".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]}]}],"members":{"invalidErrorText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","module":"../../localization","name":"Localization","line":50,"character":51},{"__symbolic":"reference","module":"../../utils/data-type/data-type.service","name":"DataTypeService","line":51,"character":42},{"__symbolic":"reference","module":"../../utils/fraction-digit.service","name":"FractionDigitService","line":52,"character":47},{"__symbolic":"reference","module":"../../utils/numerical-operation.service","name":"NumericalOperationService","line":53,"character":52},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalRef","line":54,"character":37}]}],"ngOnInit":[{"__symbolic":"method"}],"initData":[{"__symbolic":"method"}],"setValueRangeAccordToDataParsed":[{"__symbolic":"method"}],"getWriteValueRangeText":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"showValidationErrorInfo":[{"__symbolic":"method"}],"hideValidationErrorInfo":[{"__symbolic":"method"}],"getFractionDigits":[{"__symbolic":"method"}],"formatWriteValue":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"WriteValueModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"writeValueModal","template":"<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ","styles":[".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]}]}],"members":{"invalidErrorText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","module":"../../localization","name":"Localization","line":50,"character":51},{"__symbolic":"reference","module":"../../utils/data-type/data-type.service","name":"DataTypeService","line":51,"character":42},{"__symbolic":"reference","module":"../../utils/fraction-digit.service","name":"FractionDigitService","line":52,"character":47},{"__symbolic":"reference","module":"../../utils/numerical-operation.service","name":"NumericalOperationService","line":53,"character":52},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalRef","line":54,"character":37}]}],"ngOnInit":[{"__symbolic":"method"}],"initData":[{"__symbolic":"method"}],"setValueRangeAccordToDataParsed":[{"__symbolic":"method"}],"getWriteValueRangeText":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"handleCurrentLanguageIdSave":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"showValidationErrorInfo":[{"__symbolic":"method"}],"hideValidationErrorInfo":[{"__symbolic":"method"}],"getFractionDigits":[{"__symbolic":"method"}],"formatWriteValue":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export interface TextLibrarySetting {
|
|
2
|
+
readonly labelType: 'text' | 'textLibrary';
|
|
3
|
+
readonly selectedTextLibraryItem?: string | number;
|
|
4
|
+
readonly selectedTextItem?: string | number;
|
|
5
|
+
}
|
|
1
6
|
export interface FontSettingModel {
|
|
2
7
|
readonly text: string;
|
|
3
8
|
readonly stroke: string;
|
|
@@ -5,4 +10,5 @@ export interface FontSettingModel {
|
|
|
5
10
|
readonly fontSize: string;
|
|
6
11
|
readonly isUnderline: boolean;
|
|
7
12
|
readonly textAlign: string;
|
|
13
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"FontSettingModel":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TextLibrarySetting":{"__symbolic":"interface"},"FontSettingModel":{"__symbolic":"interface"}}}]
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import { HistroicalCurveChannelModel } from './historical-curve-chanel.model';
|
|
2
|
+
/**
|
|
3
|
+
* 单个历史数据条目的运行时配置
|
|
4
|
+
*/
|
|
5
|
+
export interface HistoricalCurveDataItem {
|
|
6
|
+
/** 历史数据条目名称 */
|
|
7
|
+
readonly dataName: string;
|
|
8
|
+
/** 该条目的通道列表 */
|
|
9
|
+
readonly channels: Array<HistroicalCurveChannelModel>;
|
|
10
|
+
}
|
|
2
11
|
export interface HistoricalCurveDataSettings {
|
|
3
12
|
readonly dataSourceCode: number;
|
|
4
13
|
/**
|
|
5
|
-
*
|
|
14
|
+
* 【旧格式-兼容】历史数据名称,单条目模式
|
|
6
15
|
*/
|
|
7
16
|
readonly dataName: string;
|
|
17
|
+
/**
|
|
18
|
+
* 【旧格式-兼容】通道列表,单条目模式
|
|
19
|
+
*/
|
|
8
20
|
readonly channels: Array<HistroicalCurveChannelModel>;
|
|
21
|
+
/**
|
|
22
|
+
* 【新格式】多个历史数据条目配置
|
|
23
|
+
* 如果此字段有值,优先使用此字段
|
|
24
|
+
*/
|
|
25
|
+
readonly dataItems?: Array<HistoricalCurveDataItem>;
|
|
9
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveDataSettings":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveDataItem":{"__symbolic":"interface"},"HistoricalCurveDataSettings":{"__symbolic":"interface"}}}]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConditionalDynamicDisplayModel } from '../base/conditional-dynamic-display-model';
|
|
2
|
+
import { Point, Size } from '../shared';
|
|
3
|
+
import { DynamicDisplayModel } from '../shared/dynamic-display/dynamic-display-model';
|
|
4
|
+
export interface ScrollAlarmModel extends ConditionalDynamicDisplayModel {
|
|
5
|
+
readonly version: number;
|
|
6
|
+
readonly size: Size;
|
|
7
|
+
readonly location: Point;
|
|
8
|
+
readonly generalSetting?: any;
|
|
9
|
+
readonly filterSetting?: any;
|
|
10
|
+
readonly widths: number[];
|
|
11
|
+
readonly heights: number[];
|
|
12
|
+
readonly columLabels: string[];
|
|
13
|
+
readonly levelText: string[];
|
|
14
|
+
readonly scrollSetting?: {
|
|
15
|
+
readonly scrollInterval?: number;
|
|
16
|
+
readonly scrollDirection?: 'vertical' | 'horizontal';
|
|
17
|
+
readonly pauseOnHover?: boolean;
|
|
18
|
+
readonly autoPlay?: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly dynamicSetting?: DynamicDisplayModel;
|
|
21
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ScrollAlarmModel":{"__symbolic":"interface"}}}]
|
|
@@ -5,6 +5,7 @@ import { ConditionalEnableModel } from '../base/conditional-enable-model';
|
|
|
5
5
|
import { ConditionItemModel, GraphSetting, Point, Size } from '../shared';
|
|
6
6
|
import { DynamicDisplayModel } from '../shared/dynamic-display/dynamic-display-model';
|
|
7
7
|
import { SecurityModel } from '../base/security-model';
|
|
8
|
+
import { TextLibrarySetting } from '../base/font-setting-model';
|
|
8
9
|
export interface SwitchIndicatorLight extends ConditionalEnableModel, SecurityModel {
|
|
9
10
|
/**
|
|
10
11
|
* @type {(number)}
|
|
@@ -30,4 +31,5 @@ export interface SwitchIndicatorLight extends ConditionalEnableModel, SecurityMo
|
|
|
30
31
|
readonly isAwaysEnable?: boolean;
|
|
31
32
|
readonly enableItems?: ConditionItemModel[];
|
|
32
33
|
readonly fixedPositionType?: number;
|
|
34
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
33
35
|
}
|
|
@@ -2,12 +2,14 @@ import { Size, Text, GraphSetting } from '../shared';
|
|
|
2
2
|
import { ConditionalEnableModel } from '../base/conditional-enable-model';
|
|
3
3
|
import { SecurityModel } from '../base';
|
|
4
4
|
import { ViewOperationType } from './view-operation-type';
|
|
5
|
+
import { TextLibrarySetting } from '../base/font-setting-model';
|
|
5
6
|
export interface ViewOperationElementModel extends ConditionalEnableModel, SecurityModel {
|
|
6
7
|
/**
|
|
7
8
|
* 版本 2 : 动态行为调整
|
|
8
9
|
* 版本 3 :使能控制调整
|
|
9
10
|
* 版本 4 :新增操作记录
|
|
10
|
-
* 版本 5
|
|
11
|
+
* 版本 5 :新增页面操作类型,之前类型都为"切换页面"
|
|
12
|
+
* 版本 6 :新增文本库支持
|
|
11
13
|
*/
|
|
12
14
|
readonly version?: number;
|
|
13
15
|
readonly viewIndex?: number;
|
|
@@ -16,4 +18,8 @@ export interface ViewOperationElementModel extends ConditionalEnableModel, Secur
|
|
|
16
18
|
readonly useGraph: boolean;
|
|
17
19
|
readonly graphSetting: GraphSetting;
|
|
18
20
|
readonly operationType: ViewOperationType;
|
|
21
|
+
/**
|
|
22
|
+
* 文本库配置(版本6新增)
|
|
23
|
+
*/
|
|
24
|
+
readonly textLibrary?: TextLibrarySetting;
|
|
19
25
|
}
|