menghao 2 months ago
parent
commit
ab1e8aefcc
  1. 1
      ruoyi-ui/src/assets/icons/svg/chongtu.svg
  2. 1
      ruoyi-ui/src/assets/icons/svg/circle.svg
  3. 1
      ruoyi-ui/src/assets/icons/svg/cj.svg
  4. 1
      ruoyi-ui/src/assets/icons/svg/cursor.svg
  5. 1
      ruoyi-ui/src/assets/icons/svg/dt.svg
  6. 1
      ruoyi-ui/src/assets/icons/svg/jx.svg
  7. 1
      ruoyi-ui/src/assets/icons/svg/ky.svg
  8. 1
      ruoyi-ui/src/assets/icons/svg/plan.svg
  9. 1
      ruoyi-ui/src/assets/icons/svg/sx.svg
  10. 22
      ruoyi-ui/src/views/cesiumMap/DrawingToolbar.vue
  11. 24
      ruoyi-ui/src/views/childRoom/LeftMenu.vue
  12. 10
      ruoyi-ui/src/views/childRoom/index.vue

1
ruoyi-ui/src/assets/icons/svg/chongtu.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770104908266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0z m0 76.8c240.128 0 435.2 194.56 435.2 434.688s-194.56 435.2-434.688 435.2c-240.128 0-435.2-195.072-435.2-435.2C76.8 271.872 271.872 76.8 512 76.8z" fill="#2F3238" p-id="1571"></path><path d="M566.784 274.944l-23.552 325.632c-2.048 17.408-17.408 30.208-34.816 28.16-14.848-1.536-26.624-13.312-28.16-28.16l-23.04-325.632c-3.072-30.208 19.456-56.832 49.664-59.904s57.344 19.456 59.904 50.176v9.728z m-12.8 540.16c23.552-22.528 24.064-60.416 1.536-83.456s-60.416-24.064-83.456-1.536l-1.536 1.536c-22.528 23.552-22.016 60.928 1.536 83.456 22.528 22.016 58.88 22.016 81.92 0z" fill="#2F3238" p-id="1572"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

1
ruoyi-ui/src/assets/icons/svg/circle.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770108504823" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8592" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 64c60.5 0 119.2 11.8 174.4 35.2 53.3 22.6 101.3 54.9 142.4 96 41.2 41.2 73.5 89.1 96 142.4C948.2 392.8 960 451.5 960 512s-11.8 119.2-35.2 174.4c-22.6 53.3-54.9 101.3-96 142.4-41.2 41.2-89.1 73.5-142.4 96C631.2 948.2 572.5 960 512 960s-119.2-11.8-174.4-35.2c-53.3-22.6-101.3-54.9-142.4-96-41.2-41.2-73.5-89.1-96-142.4C75.8 631.2 64 572.5 64 512s11.8-119.2 35.2-174.4c22.6-53.3 54.9-101.3 96-142.4s89.1-73.5 142.4-96C392.8 75.8 451.5 64 512 64m0-64C229.2 0 0 229.2 0 512s229.2 512 512 512 512-229.2 512-512S794.8 0 512 0z" p-id="8593"></path></svg>

After

Width:  |  Height:  |  Size: 884 B

1
ruoyi-ui/src/assets/icons/svg/cj.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770105055733" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3402" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M294.8 22.8L23.2 294.3c-12.5 12.5-12.5 32.8 0 45.3l656.2 656.2c12.5 12.5 32.8 12.5 45.3 0l271.5-271.5c12.5-12.5 12.5-32.8 0-45.3L340 22.8c-12.5-12.5-32.8-12.5-45.2 0z m-198 288.5l215-215c3.1-3.1 8.2-3.1 11.3 0l33.9 33.9c3.1 3.1 3.1 8.2 0 11.3l-96.2 96.2 45.3 45.3 96.2-96.2c3.1-3.1 8.2-3.1 11.3 0l22.4 22.4c3.1 3.1 3.1 8.2 0 11.3l-62.2 62.2L419 328l62.2-62.2c3.1-3.1 8.2-3.1 11.3 0l22.4 22.4c3.1 3.1 3.1 8.2 0 11.3l-62.2 62.2L498 407l62.2-62.2c3.1-3.1 8.2-3.1 11.3 0l23.1 23.1c3.1 3.1 3.1 8.2 0 11.3l-96.2 96.2 45.3 45.3 96.2-96.2c3.1-3.1 8.2-3.1 11.3 0l22.4 22.4c3.1 3.1 3.1 8.2 0 11.3l-62.2 62.2 45.3 45.3 62.2-62.2c3.1-3.1 8.2-3.1 11.3 0l22.4 22.4c3.1 3.1 3.1 8.2 0 11.3l-62.2 62.2 45.3 45.3 62.2-62.2c3.1-3.1 8.2-3.1 11.3 0l23.1 23.1c3.1 3.1 3.1 8.2 0 11.3l-96.3 96 45.3 45.3 96.2-96.2c3.1-3.1 8.2-3.1 11.3 0l33.9 33.9c3.1 3.1 3.1 8.2 0 11.3l-215 215c-3.1 3.1-8.2 3.1-11.3 0L96.8 322.6a7.85 7.85 0 0 1 0-11.3z" p-id="3403"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
ruoyi-ui/src/assets/icons/svg/cursor.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770086690201" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5610" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M132.608 132.864l719.552 252.8-184.32 131.584 243.52 243.456-150.848 150.848-243.456-243.456-131.648 184.256-252.8-719.488z m139.52 139.392l139.328 396.8 94.72-132.48 254.336 254.272 30.144-30.144L536.32 506.368l132.48-94.72-396.736-139.392z" p-id="5611"></path></svg>

After

Width:  |  Height:  |  Size: 601 B

1
ruoyi-ui/src/assets/icons/svg/dt.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770105218188" class="icon" viewBox="0 0 1185 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4428" xmlns:xlink="http://www.w3.org/1999/xlink" width="231.4453125" height="200"><path d="M1049.438316 571.661474l-438.972632 179.361684a45.433263 45.433263 0 0 1-34.70821 0h-0.592842l-438.972632-179.361684A44.894316 44.894316 0 0 1 153.546105 485.052632c5.928421 0.107789 11.802947 1.239579 17.354106 3.503157h0.700631l421.618526 172.409264 421.618527-172.409264A48.181895 48.181895 0 0 1 1032.192 485.052632a44.678737 44.678737 0 0 1 45.702737 43.654736 44.948211 44.948211 0 0 1-28.456421 42.954106z m0-208.680421l-438.972632 172.624842a46.996211 46.996211 0 0 1-34.70821 0h-0.592842L136.192 362.981053a41.930105 41.930105 0 0 1-25.6-54.433685 43.115789 43.115789 0 0 1 25.6-24.791579l438.972632-172.570947h0.646736a36.109474 36.109474 0 0 1 17.354106-3.341474 38.588632 38.588632 0 0 1 17.354105 3.341474l438.972632 172.624842c22.635789 8.192 34.061474 32.552421 25.6 54.433684a43.331368 43.331368 0 0 1-25.70779 24.791579zM153.492211 646.790737a37.241263 37.241263 0 0 1 17.354105 3.449263h0.700631l421.564632 172.139789 421.618526-172.139789c5.389474-2.533053 11.371789-3.718737 17.354106-3.449263a44.732632 44.732632 0 0 1 45.756631 43.762526v0.970105c0 18.432-11.317895 34.869895-28.456421 41.283369l-438.918737 179.846737a37.133474 37.133474 0 0 1-17.354105 3.503158 34.816 34.816 0 0 1-17.408-3.503158h-0.538947l-438.972632-179.846737a44.032 44.032 0 0 1-14.821053-73.242948 44.732632 44.732632 0 0 1 32.121264-12.773052z" fill="#5F6477" p-id="4429"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

1
ruoyi-ui/src/assets/icons/svg/jx.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770105419392" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5397" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M864 896H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h704a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zM192 832h640V192H192v640z" p-id="5398"></path></svg>

After

Width:  |  Height:  |  Size: 482 B

1
ruoyi-ui/src/assets/icons/svg/ky.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770105772490" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7581" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M511.6 98.8c227.6 0 412.8 185.2 412.8 412.8s-185.2 412.8-412.8 412.8S99.2 739.2 99.2 511.6 284 98.8 511.6 98.8m0-56c-258.8 0-468.8 210-468.8 468.8s210 468.8 468.8 468.8 468.8-210 468.8-468.8S770.4 42.8 511.6 42.8z" fill="#494949" p-id="7582"></path><path d="M105.2 344.8H916c14.8 0 26.4 12.4 26.4 28s-11.6 28-26.4 28H105.2c-14.8 0-26.4-12.4-26.4-28s11.6-28 26.4-28zM105.2 612.8H916c14.8 0 26.4 12.4 26.4 28s-11.6 28-26.4 28H105.2c-14.8 0-26.4-12.4-26.4-28s11.6-28 26.4-28z" fill="#494949" p-id="7583"></path><path d="M348.8 920.4V109.6c0-14.8 12.4-26.4 28-26.4s28 11.6 28 26.4v810.8c0 14.8-12.4 26.4-28 26.4s-28-11.6-28-26.4zM616.8 920.4V109.6c0-14.8 12.4-26.4 28-26.4s28 11.6 28 26.4v810.8c0 14.8-12.4 26.4-28 26.4s-28-11.6-28-26.4z" fill="#494949" p-id="7584"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
ruoyi-ui/src/assets/icons/svg/plan.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770104718600" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7572" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M751.5 160.5v608c0 17.7-14.3 32-32 32h-511c-17.7 0-32-14.3-32-32v-608c0-17.7 14.3-32 32-32h511c17.7 0 32 14.3 32 32z m0-96h-575c-35.3 0-64 28.7-64 64v672c0 35.3 28.7 64 64 64h575c35.3 0 64-28.7 64-64v-672c0-35.3-28.7-64-64-64z" p-id="7573"></path><path d="M639.5 288.5h-352c-17.7 0-32-14.3-32-32s14.3-32 32-32h352c17.7 0 32 14.3 32 32s-14.3 32-32 32zM639.5 480.5h-352c-17.7 0-32-14.3-32-32s14.3-32 32-32h352c17.7 0 32 14.3 32 32s-14.3 32-32 32zM447.5 672.5h-160c-17.7 0-32-14.3-32-32s14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32z" p-id="7574"></path><path d="M847.5 159.5h-0.5v90.4c0.3 1.8 0.5 3.7 0.5 5.6v608c0 17.7-14.3 32-32 32h-639c0 35.3 28.7 64 64 64h607c35.3 0 64-28.7 64-64v-672c0-35.3-28.7-64-64-64z" p-id="7575"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
ruoyi-ui/src/assets/icons/svg/sx.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770108774437" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9619" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1022.464 956.928V64c0-38.4-25.6-64-64-64C435.2 0 1.536 433.664 1.536 956.928c0 38.4 25.6 64 64 64h893.44c37.888 0 63.488-25.6 63.488-64z m-75.776-12.288H77.312c4.096-452.608 385.536-846.336 869.376-868.864v868.864z m-51.712-51.2" p-id="9620"></path></svg>

After

Width:  |  Height:  |  Size: 589 B

22
ruoyi-ui/src/views/cesiumMap/DrawingToolbar.vue

@ -9,7 +9,8 @@
@click="handleItemClick(item)"
:title="item.name"
>
<i :class="item.icon"></i>
<svg-icon v-if="isSvgIcon(item.icon)" :icon-class="item.icon" class="toolbar-svg-icon" />
<i v-else :class="item.icon"></i>
</div>
</div>
</div>
@ -42,9 +43,9 @@ export default {
allToolbarItems: [
{ id: 'mouse', name: '鼠标', icon: 'el-icon-position' },
{ id: 'polygon', name: '面', icon: 'el-icon-house' },
{ id: 'rectangle', name: '矩形', icon: 'el-icon-crop' },
{ id: 'circle', name: '圆形', icon: 'el-icon-circle-plus-outline' },
{ id: 'sector', name: '扇形', icon: 'el-icon-pie-chart' },
{ id: 'rectangle', name: '矩形', icon: 'jx' },
{ id: 'circle', name: '圆形', icon: 'circle' },
{ id: 'sector', name: '扇形', icon: 'sx' },
{ id: 'arrow', name: '箭头', icon: 'el-icon-right' },
{ id: 'text', name: '文本', icon: 'el-icon-document' },
{ id: 'image', name: '图片', icon: 'el-icon-picture-outline' },
@ -55,7 +56,7 @@ export default {
],
//
rangingToolbarItems: [
{ id: 'mouse', name: '鼠标', icon: 'el-icon-position' },
{ id: 'mouse', name: '鼠标', icon: 'cursor' },
{ id: 'point', name: '点', icon: 'el-icon-location' },
{ id: 'line', name: '线', icon: 'el-icon-edit-outline' },
{ id: 'clear', name: '清除', icon: 'el-icon-delete' }
@ -72,6 +73,11 @@ export default {
}
},
methods: {
/** 判断是否为本地 SVG 图标(非 Element 的 el-icon-* 类名) */
isSvgIcon(icon) {
return icon && typeof icon === 'string' && !icon.startsWith('el-icon-')
},
handleItemClick(item) {
if (item.id === 'clear') {
this.$emit('clear-all')
@ -148,6 +154,12 @@ export default {
box-shadow: 0 2px 8px rgba(0, 138, 255, 0.3);
}
.toolbar-item .toolbar-svg-icon {
width: 1em;
height: 1em;
font-size: 16px;
}
.toolbar-item:disabled {
opacity: 0.5;
cursor: not-allowed;

24
ruoyi-ui/src/views/childRoom/LeftMenu.vue

@ -30,24 +30,25 @@
@contextmenu.prevent="handleRightClick(item)"
:title="item.name"
>
<i :class="item.icon"></i>
<svg-icon v-if="isSvgIcon(item.icon)" :icon-class="item.icon" class="menu-item-svg-icon" />
<i v-else :class="item.icon"></i>
<div v-if="isEditMode" class="delete-icon" @click.stop="quickDelete(item)">
<i class="el-icon-close"></i>
</div>
</div>
</draggable>
<!-- 新增按钮仅在编辑模式下显示 -->
<div v-if="isEditMode" class="add-btn" @click="handleAdd" :title="$t('leftMenu.addNewMenu')">
<i class="el-icon-plus"></i>
</div>
<div v-if="isEditMode" class="save-btn" @click="handleSave" :title="$t('leftMenu.saveIconEdit')">
<i class="el-icon-check"></i>
</div>
</div>
</div>
<!-- 删除确认弹窗 -->
<el-dialog
:title="$t('leftMenu.confirmDelete')"
@ -66,7 +67,7 @@
<el-button type="danger" @click="confirmDelete" size="small">{{ $t('leftMenu.delete') }}</el-button>
</span>
</el-dialog>
<!-- 图标选择弹窗 -->
<icon-select-dialog
:visible.sync="showIconSelectDialog"
@ -140,6 +141,11 @@ export default {
}
},
methods: {
/** 判断是否为本地 SVG 图标(非 Element 的 el-icon-* 类名) */
isSvgIcon(icon) {
return icon && typeof icon === 'string' && !icon.startsWith('el-icon-')
},
handleHide() {
this.$emit('hide')
},
@ -439,6 +445,12 @@ export default {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.menu-item .menu-item-svg-icon {
width: 1em;
height: 1em;
font-size: 16px;
}
.menu-item.edit-mode {
cursor: grab;
}
@ -599,4 +611,4 @@ export default {
font-size: 14px;
color: #606266;
}
</style>
</style>

10
ruoyi-ui/src/views/childRoom/index.vue

@ -361,14 +361,14 @@ export default {
//
defaultMenuItems: [
{ id: 'file', name: '方案', icon: 'el-icon-folder-opened' },
{ id: 'start', name: '冲突', icon: 'el-icon-error' },
{ id: 'file', name: '方案', icon: 'plan' },
{ id: 'start', name: '冲突', icon: 'chongtu' },
{ id: 'insert', name: '平台', icon: 'el-icon-s-platform' },
{ id: 'pattern', name: '图案', icon: 'el-icon-picture-outline-round' },
{ id: 'pattern', name: '空域', icon: 'ky' },
{ id: 'deduction', name: '推演', icon: 'el-icon-video-play' },
{ id: 'modify', name: '修改', icon: 'el-icon-edit-outline' },
{ id: 'modify', name: '测距', icon: 'cj' },
{ id: 'refresh', name: '刷新', icon: 'el-icon-refresh' },
{ id: 'basemap', name: '底图', icon: 'el-icon-picture' },
{ id: 'basemap', name: '底图', icon: 'dt' },
{ id: 'save', name: '保存', icon: 'el-icon-document-checked' },
{ id: 'import', name: '导入', icon: 'el-icon-upload2' },
{ id: 'export', name: '导出', icon: 'el-icon-download' }

Loading…
Cancel
Save