|
@@ -3,6 +3,8 @@
|
|
|
$tag_header = 'set';
|
|
|
include 'head.php';
|
|
|
$obj = json_decode(trim($output[3]));//var_dump($obj);
|
|
|
+ $system = json_decode(trim($output[0]));
|
|
|
+ $ModelName = $system->{'ModelName'};
|
|
|
$OcppConnStatus='';
|
|
|
switch ($obj->{'OcppConnStatus'}){
|
|
|
case 0:
|
|
@@ -98,6 +100,15 @@ img {
|
|
|
<label>Charge Point Vendor</label>
|
|
|
<input type="text" name="chargePointVendor" id="chargePointVendor" class="form-control" value="<?php echo $obj->{'chargePointVendor'};?>">
|
|
|
</div>
|
|
|
+<?php if(substr($ModelName,0,2)=="AX"){?>
|
|
|
+ <div class="form-group" style="display:block">
|
|
|
+ <label>Local Loading Balance</label>
|
|
|
+ <select class="form-control" id="isEnableLocalPowerSharging" name="isEnableLocalPowerSharging" onChange="isEnableLocalPowerSharging_changed()">
|
|
|
+ <option value="0" <?php echo $obj->{'isEnableLocalPowerSharging'}=="0"?"selected":""?>>disable</option>
|
|
|
+ <option value="1" <?php echo $obj->{'isEnableLocalPowerSharging'}=="1"?"selected":""?>>enable</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+<?php } ?>
|
|
|
</section>
|
|
|
</article>
|
|
|
<article class="envor-sorting-item css">
|
|
@@ -116,7 +127,11 @@ img {
|
|
|
?>
|
|
|
|
|
|
<script type="text/JavaScript">
|
|
|
-
|
|
|
+<?php if(substr($ModelName,0,2)=="AX"){?>
|
|
|
+ $(document).ready(function(){
|
|
|
+ isEnableLocalPowerSharging_changed();
|
|
|
+ });
|
|
|
+<?php } ?>
|
|
|
document.getElementById("save").onclick = function() {
|
|
|
if(formCheck())
|
|
|
{
|
|
@@ -134,7 +149,8 @@ img {
|
|
|
// "&OcppConnStatus=" + document.getElementById("OcppConnStatus").value+
|
|
|
"&OcppServerURL=" + document.getElementById("OcppServerURL").value+
|
|
|
"&ChargeBoxId=" + document.getElementById("ChargeBoxId").value+
|
|
|
- "&chargePointVendor=" + document.getElementById("chargePointVendor").value;
|
|
|
+ "&chargePointVendor=" + document.getElementById("chargePointVendor").value+
|
|
|
+ "&isEnableLocalPowerSharging=" + document.getElementById("isEnableLocalPowerSharging").value;
|
|
|
|
|
|
// POST 請求必須設置表頭在 open() 下面,send() 上面
|
|
|
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
@@ -186,7 +202,20 @@ img {
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+<?php if(substr($ModelName,0,2)=="AX"){?>
|
|
|
+ function isEnableLocalPowerSharging_changed(){
|
|
|
+ if(document.getElementById("isEnableLocalPowerSharging").selectedIndex==1){
|
|
|
+ document.getElementById("OcppServerURL").setAttribute("readOnly","true");
|
|
|
+ document.getElementById("ChargeBoxId").setAttribute("readOnly","true");
|
|
|
+ document.getElementById("chargePointVendor").setAttribute("readOnly","true");
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById("OcppServerURL").removeAttribute("readOnly");
|
|
|
+ document.getElementById("ChargeBoxId").removeAttribute("readOnly");
|
|
|
+ document.getElementById("chargePointVendor").removeAttribute("readOnly");
|
|
|
+ }
|
|
|
+ }
|
|
|
+<?php } ?>
|
|
|
function isNumberKey(evt)
|
|
|
{
|
|
|
var charCode = (evt.which) ? evt.which : event.keyCode
|