MTN6-253, MTN6-247

This commit is contained in:
b.makharadze 2025-06-10 16:52:32 +04:00
parent a5a556a258
commit f802c5a863
2 changed files with 130 additions and 215 deletions

View File

@ -36,7 +36,7 @@
"params": {
"forceFaultStatus": null,
"tagProps": [
"/System/Buttons/UL1_3_JR_PB1",
"/System/Station/Buttons/UL1_3_JR_PB1",
"value",
"value",
"value",
@ -66,7 +66,7 @@
"params": {
"forceFaultStatus": null,
"tagProps": [
"/System/Buttons/UL1_3_JR_PB2",
"/System/Station/Buttons/UL1_3_JR_PB2",
"value",
"value",
"value",

View File

@ -1,13 +1,21 @@
{
"custom": {
"PLC_list": null,
"PLC_list": [
"MCM01",
"MCM02",
"MCM03",
"MCM04",
"MCM05",
"MCM06",
"MCM07"
],
"running_state": -1,
"state": 5,
"state": 1,
"views_data": []
},
"params": {
"tagProps": [
"UL1_3_JR_PB1/HMI",
"/System/Station/Buttons/UL1_3_JR_PB2",
"value",
"value",
"value",
@ -64,7 +72,7 @@
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
@ -75,25 +83,21 @@
"fallback": null,
"inputType": "scalar",
"mappings": [
{
"input": 4,
"output": 1
},
{
"input": 3,
"output": 2
},
{
"input": 2,
"output": 3
},
{
"input": 2,
"output": 2
},
{
"input": 1,
"output": 4
"output": 1
},
{
"input": 0,
"output": 5
"output": 0
}
],
"outputType": "scalar",
@ -216,164 +220,6 @@
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"basis": "200px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "session.custom.command_auth.enabled"
},
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"expression": "\u0027Control Enabled Timeout: \\n\u0027 + ({session.custom.command_auth.timeout_sp} - {session.custom.command_auth.auth_timeout}) + \u0027 seconds\u0027"
},
"type": "expr"
}
}
},
"props": {
"style": {
"color": "#000000",
"fontFamily": "Arial",
"fontSize": 14,
"fontWeight": "bold",
"marginBottom": 5,
"marginLeft": 5,
"marginRight": 5,
"marginTop": 5,
"whiteSpace": "pre"
},
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tif self.session.custom.command_auth.enabled:\n\t\t\tself.session.custom.command_auth.enabled \u003d False\n\telse:\n\t\t#self.session.custom.command_auth.enabled \u003d True\n\t\tsystem.perspective.openPopup(\u0027command-auth\u0027, \u0027PopUp-Views/Command-Authenticate\u0027, showCloseIcon \u003d False, draggable \u003d False, modal \u003d True, overlayDismiss \u003d True)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button_0",
"tooltip": {
"enabled": true,
"location": "bottom",
"style": {
"whiteSpace": "pre"
}
}
},
"position": {
"basis": "170px",
"shrink": 0
},
"propConfig": {
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "//if({this.props.enabled}, \u0027Re-Authenticate to Enable Command Controls\u0027, \u0027Insufficient Privileges - User Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)\r\nif({session.custom.command_auth.enabled},\u0027Click to Disable Controls.\u0027, \u0027Re-Authenticate to Enable Command Controls \\nUser Role Required: \u0027 + {session.custom.fc} + \u0027-rme-all\u0027)"
},
"type": "expr"
}
},
"props.image.icon.path": {
"binding": {
"config": {
"expression": "if({session.custom.command_auth.enabled},\u0027material/lock_open\u0027,\u0027material/lock\u0027)"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"expression": "if({session.custom.command_auth.enabled},\u0027Disable Controls\u0027,\u0027Enable Controls\u0027)"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {}
},
"primary": false,
"style": {
"marginBottom": 5,
"marginRight": 25,
"marginTop": 5
}
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FlexContainer"
},
"position": {
"basis": "50px",
"grow": 1
},
"props": {
"justify": "center"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "FlexContainer_0"
},
"position": {
"basis": "100px",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"code": "\n\tplcList \u003d self.view.custom.PLC_list\n\n\tshowCommand \u003d False\n\n\tfor i in plcList:\n\t\tif value \u003d\u003d i:\n\t\t\tshowCommand \u003d True\n\n\treturn showCommand",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"classes": "Buttons/Clear-Background"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
@ -385,7 +231,8 @@
"name": "Label"
},
"position": {
"basis": "32px"
"basis": "32px",
"display": false
},
"propConfig": {
"position.display": {
@ -393,6 +240,7 @@
"config": {
"expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)"
},
"enabled": false,
"type": "expr"
}
}
@ -408,48 +256,64 @@
},
{
"meta": {
"name": "AlarmTable"
"name": "AlarmStatusTable"
},
"position": {
"basis": "733px",
"basis": "400px",
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "if({this.props.params.length_of_table_data} \u003e 0, True, False)"
},
"type": "expr"
}
},
"props.params.tagProps[0]": {
"props.filters.active.text": {
"binding": {
"config": {
"path": "view.params.tagProps[0]"
},
"transforms": [
{
"code": "\treturn value[1:]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"alarm_states": [
"Shelved",
"Active",
"Not Active"
],
"length_of_table_data": 0,
"show_severity_column": true,
"show_state_column": true,
"table_type": "Docked-East",
"tagProps": [
null
]
"columns": {
"active": {
"displayPath": {
"enabled": false
},
"priority": {
"enabled": false
},
"source": {
"enabled": false
},
"state": {
"enabled": false
}
}
},
"path": "Alarm-Views/AlarmTable"
"filters": {
"active": {
"priorities": {
"critical": false,
"high": false,
"low": false,
"medium": false
},
"states": {
"clearUnacked": false
}
}
},
"refreshRate": 500,
"toolbar": {
"enabled": false
}
},
"type": "ia.display.view"
"type": "ia.display.alarmstatustable"
}
],
"meta": {
@ -498,7 +362,7 @@
},
"transforms": [
{
"code": "\treturn value[:-4]",
"code": "\treturn value[24:]",
"type": "script"
}
],
@ -524,7 +388,8 @@
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
"classes": "PopUp-Styles/InfoLabel",
"overflow": "hidden"
}
},
"type": "ia.container.flex"
@ -602,22 +467,27 @@
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}"
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[MTN6_SCADA_TAG_PROVIDER]{0}/JR_PB_LT"
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},0)",
"type": "expression"
},
{
"fallback": "OFF",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "ON"
},
{
"input": false,
"output": "OFF"
},
{
"input": true,
"output": "ON"
}
],
"outputType": "scalar",
@ -697,7 +567,10 @@
"tabIndex": 1
},
"props": {
"direction": "column"
"direction": "column",
"style": {
"margin-left": ""
}
},
"type": "ia.container.flex"
},
@ -712,7 +585,7 @@
"component": {
"onActionPerformed": {
"config": {
"script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[MTN6_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.perspective.print(tag_path)\n\tsystem.tag.writeBlocking([tag_path],[True])\n\tsystem.perspective.print(tag_path)\n"
"script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Maintenance/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])"
},
"scope": "G",
"type": "script"
@ -726,8 +599,24 @@
"basis": "80px",
"grow": 1
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0"
},
"type": "expr"
}
}
},
"props": {
"image": {
"icon": {
"path": "material/sync_problem"
}
},
"style": {
"backgroundColor": "#FE9240",
"classes": "Background-Styles/Controller"
},
"text": "RESET JAM"
@ -741,9 +630,20 @@
"position": {
"basis": "35px"
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "if(isNull(tag(\"[\" + {session.custom.fc} + \"_SCADA_TAG_PROVIDER]\" + {view.params.tagProps[0]} + \"/Maintenance/Start_PB\")), False, True)"
},
"type": "expr"
}
}
},
"props": {
"style": {
"classes": "PopUp-Styles/InfoLabel"
"classes": "PopUp-Styles/InfoLabel",
"padding": ""
}
},
"type": "ia.container.flex"
@ -757,7 +657,14 @@
"grow": 1
},
"props": {
"direction": "column"
"direction": "column",
"style": {
"gap": 6,
"paddingBottom": 20,
"paddingLeft": 10,
"paddingRight": 10,
"paddingTop": 13
}
},
"type": "ia.container.flex"
}
@ -769,7 +676,10 @@
"tabIndex": 2
},
"props": {
"direction": "column"
"direction": "column",
"style": {
"paddingTop": 1
}
},
"type": "ia.container.flex"
}
@ -781,7 +691,6 @@
"grow": 1
},
"props": {
"currentTabIndex": 2,
"menuType": "modern",
"tabSize": {
"width": 1000
@ -820,6 +729,12 @@
"basis": "670px",
"grow": 1
},
"props": {
"style": {
"border-top": "1px solid white",
"gap": ""
}
},
"type": "ia.container.flex"
}
],