2.9和2.10一并提交,

2.9:添加了初始化屏幕方向
2.10:添加了init.json,进行初始化ip等,使用mt管理器进行修改,从而实现医院不用配置ip
This commit is contained in:
2025-09-23 09:09:47 +08:00
parent bc8142c157
commit c3e3d6de61
7 changed files with 189 additions and 58 deletions

View File

@ -96,7 +96,24 @@
outline: -webkit-focus-ring-color auto 0px;
}
.radio-group {
display: flex;
padding: 10px;
}
.radio-group>span {
display: inline-block;
width: 110px;
min-width: 110px;
}
.radio-group .radio-group-box {
display: flex;
flex-wrap: wrap; /* 允许换行 */
gap: 10px 20px; /* 垂直和水平间距 */
width: 100%;
}
.radio-group .radio-group-box .radio-item {
width: calc(50% - 10px);
}
</style>
@ -118,13 +135,60 @@
<label>访问子路径</label>
<input id="path" name="path" placeholder="访问子路径">
</div>
<div class="net-list">
<label>屏幕旋转</label>
<input id="screen_rotation" value="3" name="screen_rotation" placeholder="1:强制竖屏2:强制横屏3:横竖都转">
<div class="radio-group">
<span>屏幕旋转</span>
<div class="radio-group-box">
<label class="radio-item">
<input type="radio" name="screen_rotation" value="1" checked>
竖屏
</label>
<label class="radio-item">
<input type="radio" name="screen_rotation" value="2">
横屏
</label>
<label class="radio-item">
<input type="radio" name="screen_rotation" value="3">
横竖
</label>
<label class="radio-item">
<input type="radio" name="screen_rotation" value="4">
禁止
</label>
</div>
</div>
<div class="net-list">
<label>隐藏状态栏</label>
<input id="hide_bar" value="1" name="hide_bar" placeholder="1:隐藏0:显示">
<div class="radio-group">
<span>隐藏状态栏</span>
<div class="radio-group-box">
<label class="radio-item">
<input type="radio" name="hide_bar" value="1" checked>
隐藏
</label>
<label class="radio-item">
<input type="radio" name="hide_bar" value="2">
显示
</label>
</div>
</div>
<div class="radio-group">
<span>默认屏幕方向</span>
<div class="radio-group-box">
<label class="radio-item">
<input type="radio" name="start_direction" value="1" checked>
正竖屏
</label>
<label class="radio-item">
<input type="radio" name="start_direction" value="2">
倒竖屏
</label>
<label class="radio-item">
<input type="radio" name="start_direction" value="3">
正横屏
</label>
<label class="radio-item">
<input type="radio" name="start_direction" value="4">
倒横屏
</label>
</div>
</div>
</div>
<div class="operation">
@ -143,8 +207,9 @@
document.getElementById('address').value = d.address;
document.getElementById('port').value = d.port;
document.getElementById('path').value = d.path;
document.getElementById('screen_rotation').value = d.screen_rotation;
document.getElementById('hide_bar').value = d.hide_bar;
document.querySelector('input[name="screen_rotation"][value="'+d.screen_rotation+'"]').checked = true;
document.querySelector('input[name="hide_bar"][value="'+d.hide_bar+'"]').checked = true;
document.querySelector('input[name="start_direction"][value="'+d.start_direction+'"]').checked = true;
console.log("d_data_end_=========================");
}
}
@ -156,8 +221,9 @@
"address":document.getElementById('address').value,
"port":document.getElementById('port').value,
"path":document.getElementById('path').value,
"screen_rotation":document.getElementById('screen_rotation').value,
"hide_bar":document.getElementById('hide_bar').value
"screen_rotation":document.querySelector('input[name="screen_rotation"]:checked').value,
"hide_bar":document.querySelector('input[name="hide_bar"]:checked').value,
"start_direction":document.querySelector('input[name="start_direction"]:checked').value,
});
window.NetworkSettingEngine.saveSetting(data);
window.View.reload();