Update index.html
This commit is contained in:
parent
3424f05f8e
commit
4550bdfc31
@ -165,26 +165,7 @@
|
||||
|
||||
if (mapping[m] === 'address') {
|
||||
obj._address = parseInt(val, 10) || 0;
|
||||
if (isAliases) {
|
||||
obj.address = alias2address(id, obj._address);
|
||||
} else {
|
||||
obj.address = obj._address;
|
||||
}
|
||||
} else if (mapping[m] === 'factor') {
|
||||
obj.factor = parseFloat(val) || 1;
|
||||
} else if (mapping[m] === 'offset') {
|
||||
obj.offset = parseFloat(val) || 0;
|
||||
} else if (mapping[m] === 'len') {
|
||||
obj.len = parseInt(val, 10) || 1;
|
||||
} else if (mapping[m] === 'poll') {
|
||||
obj[mapping[m]] = val || '';
|
||||
obj.poll = (obj.poll.toLowerCase() === 'true' || obj.poll === '1' || obj.poll === '+');
|
||||
} else if (mapping[m] === 'wp') {
|
||||
obj[mapping[m]] = val || '';
|
||||
obj.wp = (obj.wp.toLowerCase() === 'true' || obj.wp === '1' || obj.wp === '+');
|
||||
} else if (mapping[m] === 'cw') {
|
||||
obj[mapping[m]] = val || '';
|
||||
obj.cw = (obj.cw.toLowerCase() === 'true' || obj.cw === '1' || obj.cw === '+');
|
||||
obj.address = obj._address;
|
||||
} else {
|
||||
obj[mapping[m]] = val || '';
|
||||
}
|
||||
@ -714,6 +695,7 @@
|
||||
var data = {
|
||||
|
||||
//添加自定义数据类型
|
||||
config: settings.config || [],
|
||||
yz: settings.yz || [],
|
||||
dz: settings.dz || [],
|
||||
power: settings.power || [],
|
||||
@ -766,18 +748,6 @@
|
||||
recalculate(data, 'disInputs', offsets.disInputs, parseInt($(this).val(), 10));
|
||||
offsets.disInputs = parseInt($(this).val(), 10);
|
||||
}
|
||||
if (id === 'coilsOffset') {
|
||||
recalculate(data, 'coils', offsets.coils, parseInt($(this).val(), 10));
|
||||
offsets.coils = parseInt($(this).val(), 10);
|
||||
}
|
||||
if (id === 'inputRegsOffset') {
|
||||
recalculate(data, 'inputRegs', offsets.inputRegs, parseInt($(this).val(), 10));
|
||||
offsets.inputRegs = parseInt($(this).val(), 10);
|
||||
}
|
||||
if (id === 'holdingRegsOffset') {
|
||||
recalculate(data, 'holdingRegs', offsets.holdingRegs, parseInt($(this).val(), 10));
|
||||
offsets.holdingRegs = parseInt($(this).val(), 10);
|
||||
}
|
||||
|
||||
if (id === 'showAliases') {
|
||||
switchAll(data);
|
||||
@ -795,13 +765,6 @@
|
||||
isDirect = $(this).prop('checked');
|
||||
});
|
||||
|
||||
$('#modbus_showAliases').on('change', function () {
|
||||
if (!$(this).prop('checked')) {
|
||||
$('#modbus_directAddresses').prop('checked', false).prop('disabled', true);
|
||||
} else {
|
||||
$('#modbus_directAddresses').prop('disabled', false);
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
settings.params.type = settings.params.type || 'tcp';
|
||||
|
||||
@ -847,20 +810,7 @@
|
||||
}
|
||||
|
||||
var _rmap = {
|
||||
0: 15,
|
||||
1: 14,
|
||||
2: 13,
|
||||
3: 12,
|
||||
4: 11,
|
||||
5: 10,
|
||||
6: 9,
|
||||
7: 8,
|
||||
8: 7,
|
||||
9: 6,
|
||||
10: 5,
|
||||
11: 4,
|
||||
12: 3,
|
||||
13: 2,
|
||||
|
||||
14: 1,
|
||||
15: 0
|
||||
};
|
||||
@ -919,6 +869,7 @@
|
||||
|
||||
<ul>
|
||||
<li><a href="#modbus_tab_g" class="translate">General</a></li>
|
||||
<li><a href="#modbus_tab_config" class="translate">配置信息</a></li>
|
||||
<li><a href="#modbus_tab_yz" class="translate">门禁</a></li>
|
||||
<li><a href="#modbus_tab_dz" class="translate">车辆控制</a></li>
|
||||
<li><a href="#modbus_tab_power" class="translate">能源控制</a></li>
|
||||
@ -926,8 +877,6 @@
|
||||
|
||||
<!--
|
||||
<li><a href="#modbus_tab_coils" class="translate">Coils</a></li>
|
||||
<li><a href="#modbus_tab_input_regs" class="translate">Input Registers</a></li>
|
||||
<li><a href="#modbus_tab_holding_regs" class="translate">Holding Registers</a></li>
|
||||
-->
|
||||
</ul>
|
||||
|
||||
@ -936,6 +885,14 @@
|
||||
<img src="img/plc_back.png" class="back_image">
|
||||
|
||||
|
||||
</div>
|
||||
<div id="modbus_tab_config" class="modbus-tab">
|
||||
<div class="table_head_btn" data-grid="modbus_config">
|
||||
<button class="btn_delete_all translateB" data-table="config"></button>
|
||||
<button class="btn_export translateB" data-table="config"></button>
|
||||
<button class="btn_import translateB" data-table="config"></button>
|
||||
</div>
|
||||
<div id="modbus_config" class="modbus-grid"></div>
|
||||
</div>
|
||||
<div id="modbus_tab_yz" class="modbus-tab">
|
||||
<div class="table_head_btn" data-grid="modbus_yz">
|
||||
|
Loading…
Reference in New Issue
Block a user