<!DOCTYPE html>
|
<html lang="en">
|
|
<head>
|
<meta charset="UTF-8">
|
<title>调试参数</title>
|
<link rel="stylesheet" href="../../../static/vue/element/element.css">
|
<script type="text/javascript" src="../../../static/js/jquery/jquery-3.3.1.min.js"></script>
|
<script type="text/javascript" src="../../../static/js/common.js"></script>
|
<script type="text/javascript" src="../../../static/vue/js/vue.min.js"></script>
|
<script type="text/javascript" src="../../../static/vue/element/element.js"></script>
|
<style>
|
.show-box {
|
width: 20%;
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
margin-bottom: 30px;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div id="app">
|
<div>
|
<el-card class="box-card">
|
<div slot="header" class="clearfix">
|
<span>调度参数</span>
|
</div>
|
|
<div style="display: flex;flex-wrap: wrap;">
|
<div class="show-box">
|
<div>调度小车同层最大数量</div>
|
<el-input v-model="codeMap.dispatchShuttleMaxNum" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>入库预留小车</div>
|
<el-input v-model="codeMap.shuttleWrkInObligateCount" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>避障内圈半径</div>
|
<el-input v-model="codeMap.avoidInnerCircle" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>避障外圈半径</div>
|
<el-input v-model="codeMap.avoidOuterCircle" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>地图母轨方向(x,y)</div>
|
<el-input v-model="codeMap.direction_map" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车出提升机近点距离</div>
|
<el-input v-model="codeMap.shuttleOutLiftLocationDistance" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车移动连续下发指令</div>
|
<el-radio border v-model="codeMap.shuttleMoveCommandsContinuously" label="Y">开</el-radio>
|
<el-radio border v-model="codeMap.shuttleMoveCommandsContinuously" label="N">关</el-radio>
|
</div>
|
|
<div class="show-box">
|
<div>允许交管重新规划路径</div>
|
<el-radio border v-model="codeMap.trafficControlRestartCalcPath" label="Y">开</el-radio>
|
<el-radio border v-model="codeMap.trafficControlRestartCalcPath" label="N">关</el-radio>
|
</div>
|
|
<div class="show-box">
|
<div>输出RCS调试日志</div>
|
<el-radio border v-model="codeMap.rcsDebugShowLog" label="true">开</el-radio>
|
<el-radio border v-model="codeMap.rcsDebugShowLog" label="false">关</el-radio>
|
</div>
|
</div>
|
|
<div style="margin-top: 20px;">
|
<el-button type="primary" @click="saveParam('shuttle')">保存</el-button>
|
</div>
|
</el-card>
|
</div>
|
|
<div style="margin-top: 20px;">
|
<el-card class="box-card">
|
<div slot="header" class="clearfix">
|
<span>充电参数</span>
|
</div>
|
|
<div style="display: flex;flex-wrap: wrap;">
|
<div class="show-box">
|
<div>小车充电最大阈值</div>
|
<el-input v-model="codeMap.chargeMaxValue" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车电量预警阈值</div>
|
<el-input v-model="codeMap.shuttlePowerEarlyValue" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车满电校准</div>
|
<el-radio border v-model="codeMap.shuttleMaxPowerVerify" label="true">开</el-radio>
|
<el-radio border v-model="codeMap.shuttleMaxPowerVerify" label="false">关</el-radio>
|
</div>
|
|
<div class="show-box">
|
<div>定时充电开关</div>
|
<el-radio border v-model="codeMap.timedCharge" label="Y">开</el-radio>
|
<el-radio border v-model="codeMap.timedCharge" label="N">关</el-radio>
|
</div>
|
|
<div class="show-box">
|
<div>定时充电时间段</div>
|
<el-input v-model="codeMap.timedChargeRange" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车默认充电线</div>
|
<el-input v-model="codeMap.shuttleDefaultChargePowerLine" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>小车定时充电线</div>
|
<el-input v-model="codeMap.timedChargePowerLine" style="width: 60%;"></el-input>
|
</div>
|
</div>
|
|
<div style="margin-top: 20px;">
|
<el-button type="primary" @click="saveParam('charge')">保存</el-button>
|
</div>
|
</el-card>
|
</div>
|
|
<div style="margin-top: 20px;">
|
<el-card class="box-card">
|
<div slot="header" class="clearfix">
|
<span>演示模式参数</span>
|
</div>
|
<div style="display: flex;flex-wrap: wrap;">
|
<div class="show-box">
|
<div>移动演示模式-楼层</div>
|
<el-input v-model="codeMap.demoRunLev" style="width: 60%;"></el-input>
|
</div>
|
|
<div class="show-box">
|
<div>移动演示模式-是否换层</div>
|
<el-radio border v-model="codeMap.demoSwitchLev" label="Y">开</el-radio>
|
<el-radio border v-model="codeMap.demoSwitchLev" label="N">关</el-radio>
|
</div>
|
|
<div class="show-box">
|
<div>演示模式-货物搬运</div>
|
<el-radio border v-model="codeMap.demoCargoMove" label="Y">开</el-radio>
|
<el-radio border v-model="codeMap.demoCargoMove" label="N">关</el-radio>
|
</div>
|
|
</div>
|
|
<div style="margin-top: 20px;">
|
<el-button type="primary" @click="saveParam('demo')">保存</el-button>
|
</div>
|
</el-card>
|
</div>
|
</div>
|
<script>
|
var app = new Vue({
|
el: '#app',
|
data: {
|
codeMap: {},
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
this.getConfigData()
|
},
|
getConfigData() {
|
let that = this;
|
$.ajax({
|
url: baseUrl + "/config/listAll/auth",
|
headers: {
|
'token': localStorage.getItem('token')
|
},
|
data: {},
|
dataType: 'json',
|
contentType: 'application/json;charset=UTF-8',
|
method: 'GET',
|
success: function(res) {
|
if (res.code == 200) {
|
let codeMap = {}
|
res.data.forEach((item) => {
|
codeMap[item.code] = item.value
|
})
|
that.codeMap = codeMap;
|
} else if (res.code === 403) {
|
top.location.href = baseUrl + "/";
|
} else {
|
that.$message({
|
message: res.msg,
|
type: 'error'
|
});
|
}
|
}
|
});
|
},
|
saveParam(type) {
|
let that = this;
|
let codeList = this.getParamData(type)
|
let updateCodeList = [];
|
|
codeList.forEach((key) => {
|
let value = this.codeMap[key]
|
updateCodeList.push({
|
code: key,
|
value: value
|
})
|
})
|
|
console.log(updateCodeList)
|
|
$.ajax({
|
url: baseUrl + "/config/updateBatch",
|
headers: {
|
'token': localStorage.getItem('token')
|
},
|
data: JSON.stringify(updateCodeList),
|
dataType: 'json',
|
contentType: 'application/json;charset=UTF-8',
|
method: 'POST',
|
success: function(res) {
|
if (res.code == 200) {
|
that.$message({
|
message: '保存成功',
|
type: 'success'
|
});
|
} else if (res.code === 403) {
|
top.location.href = baseUrl + "/";
|
} else {
|
that.$message({
|
message: res.msg,
|
type: 'error'
|
});
|
}
|
}
|
});
|
},
|
getParamData(type) {
|
let data = []
|
if(type == "shuttle") {
|
data.push('dispatchShuttleMaxNum');
|
data.push('shuttleWrkInObligateCount');
|
data.push('avoidInnerCircle');
|
data.push('avoidOuterCircle');
|
data.push('direction_map');
|
data.push('shuttleOutLiftLocationDistance');
|
data.push('shuttleMoveCommandsContinuously');
|
data.push('trafficControlRestartCalcPath');
|
data.push('rcsDebugShowLog');
|
}else if (type == "charge") {
|
data.push('chargeMaxValue');
|
data.push('shuttlePowerEarlyValue');
|
data.push('shuttleMaxPowerVerify');
|
data.push('timedCharge');
|
data.push('timedChargeRange');
|
data.push('shuttleDefaultChargePowerLine');
|
data.push('timedChargePowerLine');
|
}else if (type == "demo") {
|
data.push('demoRunLev');
|
data.push('demoSwitchLev');
|
data.push('demoCargoMove');
|
}
|
|
return data;
|
},
|
},
|
})
|
</script>
|
</body>
|
|
</html>
|