Browse Source

测量与六步法优化

lbj
sd 1 month ago
parent
commit
03d33118ce
  1. 1
      ruoyi-ui/public/element-ui.css
  2. BIN
      ruoyi-ui/public/fonts/element-icons.woff
  3. 24
      ruoyi-ui/public/stepEditor.html
  4. 34
      ruoyi-ui/src/views/cesiumMap/index.vue
  5. 4
      ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue

1
ruoyi-ui/public/element-ui.css

File diff suppressed because one or more lines are too long

BIN
ruoyi-ui/public/fonts/element-icons.woff

Binary file not shown.

24
ruoyi-ui/public/stepEditor.html

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>六步法编辑器</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./element-ui.css">
<style>
* {
margin: 0;
@ -135,18 +135,18 @@
.editor-content {
flex: 1;
overflow: hidden;
padding: 32px;
padding: 16px;
display: flex;
justify-content: center;
}
.editor-area {
width: 100%;
max-width: 840px;
max-width: 100%;
height: 100%;
background: #fff;
border-radius: 8px;
padding: 40px;
padding: 24px;
overflow-y: auto;
outline: none;
font-size: 16px;
@ -231,11 +231,6 @@
<i class="el-icon-picture"></i>
</el-button>
</el-tooltip>
<el-tooltip content="插入链接" placement="top">
<el-button type="text" @click="insertLink" class="toolbar-btn">
<i class="el-icon-link"></i>
</el-button>
</el-tooltip>
</div>
<div class="toolbar-divider"></div>
@ -501,17 +496,6 @@
}
reader.readAsDataURL(file)
},
insertLink() {
this.$prompt('请输入链接地址', '插入链接', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
if (value) {
const link = `<a href="${value}" target="_blank" style="color: #409EFF; text-decoration: underline;">${value}</a>`
this.insertHTML(link)
}
})
},
insertText(text) {
const editor = this.$refs.editor
const selection = window.getSelection()

34
ruoyi-ui/src/views/cesiumMap/index.vue

@ -187,8 +187,8 @@ export default {
routeLabelVisible: {},
//
defaultStyles: {
point: { color: '#FF0000', size: 12 },
line: { color: '#00FF00', width: 3 },
point: { color: '#808080', size: 8 },
line: { color: '#000000', width: 1 },
polygon: { color: '#0000FF', opacity: 0, width: 4 },
rectangle: { color: '#FFA500', opacity: 0, width: 4 },
circle: { color: '#800080', opacity: 0, width: 4 },
@ -2131,7 +2131,7 @@ this.viewer.scene.postProcessStages.fxaa.enabled = true
// 使
this.hoverTooltip = {
visible: true,
content: `${(cumulativeLength / 1000).toFixed(1)}km ,${bearingType === 'magnetic' ? '磁' : '真'}${bearing.toFixed(1)}°`,
content: `${(cumulativeLength / 1000).toFixed(1)}km ,${bearing.toFixed(1)}°`,
position: {
x: movement.endPosition.x + 10,
y: movement.endPosition.y - 10
@ -2472,7 +2472,7 @@ this.viewer.scene.postProcessStages.fxaa.enabled = true
// 使
this.hoverTooltip = {
visible: true,
content: `${(length / 1000).toFixed(1)}km ,真:${bearing.toFixed(1)}°`,
content: `${(length / 1000).toFixed(1)}km ,${bearing.toFixed(1)}°`,
position: {
x: movement.endPosition.x + 10,
y: movement.endPosition.y - 10
@ -2500,9 +2500,16 @@ this.viewer.scene.postProcessStages.fxaa.enabled = true
const position = this.getClickPosition(click.position);
if (position) {
this.drawingPoints.push(position);
//
let cumulativeDistance = 0;
if (this.drawingPoints.length > 1) {
cumulativeDistance = this.calculateLineLength(this.drawingPoints);
}
//
this.entityCounter++;
const pointId = `point_${this.entityCounter}`;
//
const isStartPoint = this.drawingPoints.length === 1;
const pointEntity = this.viewer.entities.add({
id: pointId,
position: position,
@ -2511,6 +2518,17 @@ this.viewer.scene.postProcessStages.fxaa.enabled = true
color: Cesium.Color.fromCssColorString(this.defaultStyles.point.color),
outlineColor: Cesium.Color.WHITE,
outlineWidth: 2
},
label: {
text: isStartPoint ? '起点' : `${(cumulativeDistance / 1000).toFixed(2)}km`,
font: '14px Microsoft YaHei, sans-serif',
fillColor: Cesium.Color.BLACK,
backgroundColor: Cesium.Color.WHITE.withAlpha(0.8),
showBackground: true,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
verticalOrigin: Cesium.VerticalOrigin.CENTER,
pixelOffset: new Cesium.Cartesian2(15, 0),
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
});
this.drawingPointEntities.push(pointEntity);
@ -2585,6 +2603,14 @@ this.viewer.scene.postProcessStages.fxaa.enabled = true
this.viewer.entities.remove(this.tempPreviewEntity);
this.tempPreviewEntity = null;
}
// ""
if (this.drawingPointEntities.length > 0) {
const lastPointEntity = this.drawingPointEntities[this.drawingPointEntities.length - 1];
const length = this.calculateLineLength([...this.drawingPoints]);
if (lastPointEntity.label) {
lastPointEntity.label.text = `${(length / 1000).toFixed(2)}km`;
}
}
// 线
const entity = this.addLineEntity([...this.drawingPoints], [...this.drawingPointEntities]);
//

4
ruoyi-ui/src/views/childRoom/BottomLeftPanel.vue

@ -63,8 +63,8 @@ export default {
showPanel: true,
showSixStepsBar: false,
sixStepsData: [
{ title: '理解', desc: '明确任务目标和要求', active: true, completed: true },
{ title: '判断', desc: '评估可用资源和能力', active: false, completed: true },
{ title: '理解', desc: '明确任务目标和要求', active: false, completed: false },
{ title: '判断', desc: '评估可用资源和能力', active: false, completed: false },
{ title: '规划', desc: '制定详细执行方案', active: false, completed: false },
{ title: '准备', desc: '识别和评估潜在风险', active: false, completed: false },
{ title: '执行', desc: '实时监控执行过程', active: false, completed: false },

Loading…
Cancel
Save