...
|
...
|
@@ -5179,6 +5179,12 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5179
|
5179
|
const act = currentNodeData.act ?? []
|
5180
|
5180
|
const event = currentNodeData.event ?? []
|
5181
|
5181
|
const actionType = {}
|
|
5182
|
+
|
|
5183
|
+ const hasExistEl = $(`.layui-form[lay-filter="${CONTAINER_FILTER}"]`).find('input[type="checkbox"]')
|
|
5184
|
+ $(hasExistEl).each((i) => {
|
|
5185
|
+ $(hasExistEl[i]).attr('disabled', true)
|
|
5186
|
+ })
|
|
5187
|
+
|
5182
|
5188
|
for (const item of act) {
|
5183
|
5189
|
const flag = !item.condition || !item.condition?.length
|
5184
|
5190
|
$(`.interaction__container input[name="${item.type}"]`).attr('disabled', flag)
|
...
|
...
|
@@ -5189,6 +5195,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
5189
|
5195
|
$(`.interaction__container input[name="${item.type}"]`).attr('disabled', flag)
|
5190
|
5196
|
actionType[item.type] = item.enabled
|
5191
|
5197
|
}
|
|
5198
|
+
|
5192
|
5199
|
form.val(CONTAINER_FILTER, actionType)
|
5193
|
5200
|
}
|
5194
|
5201
|
|
...
|
...
|
@@ -6471,7 +6478,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6471
|
6478
|
* @description 创建组织树
|
6472
|
6479
|
*/
|
6473
|
6480
|
async function createOrgTreeSelect() {
|
6474
|
|
- const [err, treeList] = await to(ConfigurationNodeApi.getOrgTree())
|
|
6481
|
+ const [err, res] = await to(ConfigurationNodeApi.getOrgTree())
|
|
6482
|
+ treeList = res
|
6475
|
6483
|
if (err) return
|
6476
|
6484
|
UseLayUi.createTreeSelect({
|
6477
|
6485
|
elem: `#${enumActionEl.ORG_EL}`,
|
...
|
...
|
@@ -6481,7 +6489,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
6481
|
6489
|
layVerify: 'required',
|
6482
|
6490
|
layVerType: 'tips',
|
6483
|
6491
|
treeProps: {
|
6484
|
|
- data: treeList,
|
|
6492
|
+ data: res,
|
6485
|
6493
|
onlyIconControl: true,
|
6486
|
6494
|
click(node) {
|
6487
|
6495
|
recordData.orgId = node.data.id
|
...
|
...
|
@@ -7059,7 +7067,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
7059
|
7067
|
</div>
|
7060
|
7068
|
</div>
|
7061
|
7069
|
<div class="layui-form-item" id="${enumActionEl.WAY_SELECT}" style="display:none">
|
7062
|
|
- <label class="layui-form-label">单向/双向</label>
|
|
7070
|
+ <label class="layui-form-label">单向/双向 ${createHelpMessage(`单向:服务器向网关设备、直连设备发送指令。发送指令后,设备不会返回任何信息。\n
|
|
7071
|
+ 双向:服务器向网关设备、直连设备发送指令。发送指令后,设备返回响应信息。`, 'way')}</label>
|
7063
|
7072
|
<div class="layui-input-block">
|
7064
|
7073
|
<input type="radio" name="${enumConst.WAY}" value="${enumWayType.ONE_WAY}" title="单向" checked="">
|
7065
|
7074
|
<input type="radio" name="${enumConst.WAY}" value="${enumWayType.TWO_WAY}" title="双向">
|
...
|
...
|
@@ -12530,7 +12539,7 @@ class UseLayUi { |
12530
|
12539
|
|
12531
|
12540
|
static topMsg(msg, options, icon) {
|
12532
|
12541
|
const { layer } = layui
|
12533
|
|
- layer.msg(`<div style="padding: 20px; display: flex; align-items: center;"><i class="layui-layer-ico layui-layer-ico6" style="width: 30px;height: 30px;"></i><span style="margin-left: 5px">${msg}</span></div>`, { ...options, type: 1, icon, time: 2000, })
|
|
12542
|
+ layer.msg(`<div style="padding: 20px; display: flex; align-items: center;"><i class="layui-layer-ico layui-layer-ico${icon}" style="width: 30px;height: 30px;"></i><span style="margin-left: 5px">${msg}</span></div>`, { ...options, type: 1, icon, time: 2000, })
|
12534
|
12543
|
}
|
12535
|
12544
|
|
12536
|
12545
|
static topSuccessMsg(msg = '操作成功', options) {
|
...
|
...
|
@@ -12801,7 +12810,7 @@ class Ws { |
12801
|
12810
|
* @description 发送消息
|
12802
|
12811
|
*/
|
12803
|
12812
|
send(message) {
|
12804
|
|
- if (this.ws.readyState !== 1) {
|
|
12813
|
+ if (!this.ws || this.ws.readyState !== 1) {
|
12805
|
12814
|
this.errorStack.push(message)
|
12806
|
12815
|
return
|
12807
|
12816
|
}
|
...
|
...
|
@@ -12832,6 +12841,7 @@ class Ws { |
12832
|
12841
|
this.close()
|
12833
|
12842
|
this.ws = null
|
12834
|
12843
|
this.errorStack = null
|
|
12844
|
+ Ws.instance = null
|
12835
|
12845
|
}
|
12836
|
12846
|
|
12837
|
12847
|
/**
|
...
|
...
|
@@ -13020,6 +13030,7 @@ class DispatchCenter { |
13020
|
13030
|
* @description 建立socket连接
|
13021
|
13031
|
*/
|
13022
|
13032
|
connectSocket() {
|
|
13033
|
+ Ws.instance?.destroy?.()
|
13023
|
13034
|
this.socket = Ws.getInstance({ url: GLOBAL_WS_URL(), onmessageCallback: this.socketOnmessage })
|
13024
|
13035
|
}
|
13025
|
13036
|
|
...
|
...
|
@@ -13061,9 +13072,6 @@ class DispatchCenter { |
13061
|
13072
|
if (!id) return
|
13062
|
13073
|
const [err, res] = await to(ConfigurationNodeApi.getConfigurationInfo('CONTENT', id))
|
13063
|
13074
|
this.contentData = res
|
13064
|
|
- // const { dataSources } = this.contentData = res
|
13065
|
|
- // const tsSubCmds = this.generatorDataSourceMapping(dataSources)
|
13066
|
|
- // this.sendMessageToGetRealTimeData({ tsSubCmds })
|
13067
|
13075
|
}
|
13068
|
13076
|
|
13069
|
13077
|
/**
|
...
|
...
|
@@ -14121,6 +14129,7 @@ class HandleDataInteraction { |
14121
|
14129
|
|
14122
|
14130
|
},
|
14123
|
14131
|
async success(layero, index) {
|
|
14132
|
+ $('.layui-layer-setwin a').removeAttr('href')
|
14124
|
14133
|
form.render()
|
14125
|
14134
|
},
|
14126
|
14135
|
})
|
...
|
...
|
|