样式等问题修复

This commit is contained in:
BianLzhaoMin 2025-07-29 09:22:00 +08:00
parent d5ddd971f4
commit 4f94e80dc8
4 changed files with 66 additions and 39 deletions

View File

@ -125,7 +125,7 @@ function initTable(dataList, limit, page) {
d.verticalDistance +
"(m)<br><br>";
html +=
"安全裕度:" + d.safetyMargin + "(°)<br><br>";
"安全裕度:" + d.safetyMargin + "(m)<br><br>";
return html;
} else if (d.spanType == 2) {
var html = "";

View File

@ -849,7 +849,7 @@ async function addAllMapPoints() {
</div>
<div class="map-container-item-ropeway">
<span>安全裕度</span>
<span>${pointData.safetyMargin} °</span>
<span>${pointData.safetyMargin} m</span>
</div>
</div>
</div>`;
@ -879,15 +879,29 @@ async function addMapLine() {
let lineMaterial = null; // 用于存储线材质
// 判断条件部分保持不变
if (
startPoint.towerProgress === 8 &&
endPoint.towerProgress === 8
) {
lineColor = "#FFFF00";
lineMaterial = new Cesium.ColorMaterialProperty({
// 实线
color: Cesium.Color.fromCssColorString(lineColor),
if (startPoint.towerProgress == 8 && endPoint.towerProgress == 8) {
// lineColor = "#FFFF00";
// lineMaterial = new Cesium.ColorMaterialProperty({
// // 实线
// color: Cesium.Color.fromCssColorString("#FFFF00"),
// });
// 创建线段点数组
const positions = [
[startPoint.baiduLon, startPoint.baiduLat, 500],
[endPoint.baiduLon, endPoint.baiduLat, 500],
];
const polyline = new mars3d.graphic.PolylineEntity({
positions: positions,
eventParent: false,
style: {
width: 2, // 线宽(像素)
color: "#FFFF00", // 使用动态设置的材质
clampToGround: true, // 是否贴地山区建议设为true
},
});
graphicLayer.addGraphic(polyline);
graphicLayerList.push(polyline);
} else if (
endPoint.existSpan === 1 &&
startPoint.existSpan === 1 &&
@ -904,17 +918,51 @@ async function addMapLine() {
color: Cesium.Color.fromCssColorString(lineColor),
dashLength: 16.0, // 可调整虚线长度
});
// 创建线段点数组
const positions = [
[startPoint.baiduLon, startPoint.baiduLat, 500],
[endPoint.baiduLon, endPoint.baiduLat, 500],
];
const polyline = new mars3d.graphic.PolylineEntity({
positions: positions,
eventParent: false,
style: {
width: 2, // 线宽(像素)
material: lineMaterial, // 使用动态设置的材质
clampToGround: true, // 是否贴地山区建议设为true
},
});
graphicLayer.addGraphic(polyline);
graphicLayerList.push(polyline);
} else if (
(startPoint.towerProgress === 9 &&
endPoint.towerProgress === 9) ||
(startPoint.towerProgress === 10 &&
endPoint.towerProgress === 10)
) {
lineColor = "#d81e06";
lineMaterial = new Cesium.ColorMaterialProperty({
// 实线
color: Cesium.Color.fromCssColorString(lineColor),
// lineColor = "#d81e06";
// lineMaterial = new Cesium.ColorMaterialProperty({
// // 实线
// color: Cesium.Color.fromCssColorString(lineColor),
// });
// 创建线段点数组
const positions = [
[startPoint.baiduLon, startPoint.baiduLat],
[endPoint.baiduLon, endPoint.baiduLat],
];
const polyline = new mars3d.graphic.PolylineEntity({
positions: positions,
eventParent: false,
style: {
width: 2, // 线宽(像素)
color: "#d81e06", // 使用动态设置的材质
clampToGround: true, // 是否贴地山区建议设为true
},
});
graphicLayer.addGraphic(polyline);
graphicLayerList.push(polyline);
} else {
lineColor = "#fff";
lineMaterial = new Cesium.PolylineDashMaterialProperty({
@ -924,28 +972,6 @@ async function addMapLine() {
dashLength: 16.0, // 可调整虚线长度
});
}
// 创建线段点数组
const positions = [
[startPoint.baiduLon, startPoint.baiduLat],
[endPoint.baiduLon, endPoint.baiduLat],
];
// const positions2 = positions.map((item) => {
// return mars3d.PointTrans.bd2wgs(item);
// });
const polyline = new mars3d.graphic.PolylineEntity({
positions: positions,
eventParent: false,
style: {
width: 2, // 线宽(像素)
material: lineMaterial, // 使用动态设置的材质
clampToGround: true, // 是否贴地山区建议设为true
},
});
graphicLayer.addGraphic(polyline);
graphicLayerList.push(polyline);
}
}

View File

@ -904,7 +904,7 @@ function addAllMapPoints() {
</div>
<div class="map-container-item-ropeway">
<span>安全裕度</span>
<span>${pointData.safetyMargin} °</span>
<span>${pointData.safetyMargin} m</span>
</div>
</div>
</div>`;

View File

@ -120,7 +120,7 @@
</div>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required-mark">*</span>安全裕度(°):</label>
<label class="layui-form-label"><span class="required-mark">*</span>安全裕度(m):</label>
<div class="layui-input-inline">
<input type="text" name="safetyMargin" lay-verify="required|number" autocomplete="off"
placeholder="请输入安全裕度" class="layui-input" maxlength="30">
@ -255,7 +255,8 @@
</div>
<div class="btn-box">
<button class="layui-btn layui-btn-normal save" id="setting" onclick="setSpanTowerLonAndLatData()">配置跨越杆塔经纬度</button>
<button class="layui-btn layui-btn-normal save" id="setting"
onclick="setSpanTowerLonAndLatData()">配置跨越杆塔经纬度</button>
<button class="layui-btn layui-btn-normal save" onclick="saveData2()">确定</button>
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
</div>