Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

xzw 2 лет назад
Родитель
Сommit
394ae0b675
40 измененных файлов с 1847 добавлено и 514 удалено
  1. 1 1
      server/test/a0k4xu045_202305311600080410/attach/sceneStore
  2. 647 3
      src/components/base/components/icon/iconfont/demo_index.html
  3. 115 3
      src/components/base/components/icon/iconfont/iconfont.css
  4. 1 1
      src/components/base/components/icon/iconfont/iconfont.js
  5. 196 0
      src/components/base/components/icon/iconfont/iconfont.json
  6. BIN
      src/components/base/components/icon/iconfont/iconfont.ttf
  7. BIN
      src/components/base/components/icon/iconfont/iconfont.woff
  8. BIN
      src/components/base/components/icon/iconfont/iconfont.woff2
  9. 5 1
      src/graphic/Controls/AddPoint.js
  10. 72 4
      src/graphic/Controls/MoveLine.js
  11. 1 0
      src/graphic/Controls/MoveMagnifier.js
  12. 94 79
      src/graphic/Controls/UIControl.js
  13. 2 2
      src/graphic/Geometry/CurveRoadEdge.js
  14. 19 0
      src/graphic/Geometry/Geometry.js
  15. 1 4
      src/graphic/Geometry/Line.js
  16. 26 22
      src/graphic/Geometry/Magnifier.js
  17. 0 12
      src/graphic/Geometry/Point.js
  18. 4 1
      src/graphic/History/History.js
  19. 10 5
      src/graphic/History/HistoryUtil.js
  20. 402 163
      src/graphic/Layer.js
  21. 16 10
      src/graphic/ListenLayer.js
  22. 3 0
      src/graphic/Load.js
  23. 2 2
      src/graphic/Renderer/Draw.js
  24. 2 2
      src/graphic/Service/CurveEdgeService.js
  25. 9 0
      src/graphic/Service/DataService.js
  26. 11 5
      src/graphic/Service/StateService.js
  27. 3 2
      src/graphic/Service/UIService.js
  28. 1 0
      src/graphic/enum/VectorCategory.js
  29. 3 3
      src/graphic/enum/VectorStyle.js
  30. 8 0
      src/graphic/enum/VectorWeight.js
  31. 0 1
      src/hook/custom/setup.ts
  32. 0 1
      src/hook/useEdit.ts
  33. 0 1
      src/hook/useGraphic.ts
  34. 3 1
      src/views/graphic/geos/arrow.vue
  35. 10 9
      src/views/graphic/geos/normalLine.vue
  36. 27 17
      src/views/graphic/geos/roadEdge.vue
  37. 148 156
      src/views/graphic/menus.ts
  38. 3 2
      src/views/graphic/setting.vue
  39. 1 1
      src/views/photos/index.vue
  40. 1 0
      src/views/sys/menu/item/item.vue

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 647 - 3
src/components/base/components/icon/iconfont/demo_index.html

@@ -55,6 +55,174 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe79d;</span>
+                <div class="name">sc_sc</div>
+                <div class="code-name">&amp;#xe79d;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe79e;</span>
+                <div class="name">sc_shangc</div>
+                <div class="code-name">&amp;#xe79e;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe79f;</span>
+                <div class="name">sc_shic</div>
+                <div class="code-name">&amp;#xe79f;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe79a;</span>
+                <div class="name">rt_shit</div>
+                <div class="code-name">&amp;#xe79a;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe79b;</span>
+                <div class="name">rt_rt</div>
+                <div class="code-name">&amp;#xe79b;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe79c;</span>
+                <div class="name">rt_st</div>
+                <div class="code-name">&amp;#xe79c;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe794;</span>
+                <div class="name">fjdc_canjiren_p</div>
+                <div class="code-name">&amp;#xe794;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe795;</span>
+                <div class="name">fjdc_canjiren_s</div>
+                <div class="code-name">&amp;#xe795;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe796;</span>
+                <div class="name">fjdc_xuliche</div>
+                <div class="code-name">&amp;#xe796;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe797;</span>
+                <div class="name">fjdc_renliche</div>
+                <div class="code-name">&amp;#xe797;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe798;</span>
+                <div class="name">fjdc_zixingche</div>
+                <div class="code-name">&amp;#xe798;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe799;</span>
+                <div class="name">fjdc_sanlunche</div>
+                <div class="code-name">&amp;#xe799;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe784;</span>
+                <div class="name">mb_dzlk</div>
+                <div class="code-name">&amp;#xe784;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe785;</span>
+                <div class="name">mb_gdlj</div>
+                <div class="code-name">&amp;#xe785;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe786;</span>
+                <div class="name">mb_gssfz</div>
+                <div class="code-name">&amp;#xe786;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe787;</span>
+                <div class="name">mb_gsld</div>
+                <div class="code-name">&amp;#xe787;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe788;</span>
+                <div class="name">mb_gsgw</div>
+                <div class="code-name">&amp;#xe788;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe789;</span>
+                <div class="name">mb_kbzld</div>
+                <div class="code-name">&amp;#xe789;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78a;</span>
+                <div class="name">mb_szlk</div>
+                <div class="code-name">&amp;#xe78a;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78b;</span>
+                <div class="name">mb_zjwd</div>
+                <div class="code-name">&amp;#xe78b;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78c;</span>
+                <div class="name">mb_jkzd</div>
+                <div class="code-name">&amp;#xe78c;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78d;</span>
+                <div class="name">mb_ckzd</div>
+                <div class="code-name">&amp;#xe78d;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78e;</span>
+                <div class="name">mb_wclk</div>
+                <div class="code-name">&amp;#xe78e;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe78f;</span>
+                <div class="name">mb_lclk</div>
+                <div class="code-name">&amp;#xe78f;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe790;</span>
+                <div class="name">mb_snld</div>
+                <div class="code-name">&amp;#xe790;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe791;</span>
+                <div class="name">mb_sxwl</div>
+                <div class="code-name">&amp;#xe791;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe792;</span>
+                <div class="name">mb_jzwd</div>
+                <div class="code-name">&amp;#xe792;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe793;</span>
+                <div class="name">mb_wd</div>
+                <div class="code-name">&amp;#xe793;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe773;</span>
                 <div class="name">jg_q</div>
                 <div class="code-name">&amp;#xe773;</div>
@@ -732,9 +900,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1686539943595') format('woff2'),
-       url('iconfont.woff?t=1686539943595') format('woff'),
-       url('iconfont.ttf?t=1686539943595') format('truetype');
+  src: url('iconfont.woff2?t=1686814186940') format('woff2'),
+       url('iconfont.woff?t=1686814186940') format('woff'),
+       url('iconfont.ttf?t=1686814186940') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -761,6 +929,258 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-sc_sc"></span>
+            <div class="name">
+              sc_sc
+            </div>
+            <div class="code-name">.icon-sc_sc
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-sc_shangc"></span>
+            <div class="name">
+              sc_shangc
+            </div>
+            <div class="code-name">.icon-sc_shangc
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-sc_shic"></span>
+            <div class="name">
+              sc_shic
+            </div>
+            <div class="code-name">.icon-sc_shic
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-rt_shit"></span>
+            <div class="name">
+              rt_shit
+            </div>
+            <div class="code-name">.icon-rt_shit
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-rt_rt"></span>
+            <div class="name">
+              rt_rt
+            </div>
+            <div class="code-name">.icon-rt_rt
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-rt_st"></span>
+            <div class="name">
+              rt_st
+            </div>
+            <div class="code-name">.icon-rt_st
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_canjiren_p"></span>
+            <div class="name">
+              fjdc_canjiren_p
+            </div>
+            <div class="code-name">.icon-fjdc_canjiren_p
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_canjiren_s"></span>
+            <div class="name">
+              fjdc_canjiren_s
+            </div>
+            <div class="code-name">.icon-fjdc_canjiren_s
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_xuliche"></span>
+            <div class="name">
+              fjdc_xuliche
+            </div>
+            <div class="code-name">.icon-fjdc_xuliche
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_renliche"></span>
+            <div class="name">
+              fjdc_renliche
+            </div>
+            <div class="code-name">.icon-fjdc_renliche
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_zixingche"></span>
+            <div class="name">
+              fjdc_zixingche
+            </div>
+            <div class="code-name">.icon-fjdc_zixingche
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-fjdc_sanlunche"></span>
+            <div class="name">
+              fjdc_sanlunche
+            </div>
+            <div class="code-name">.icon-fjdc_sanlunche
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_dzlk"></span>
+            <div class="name">
+              mb_dzlk
+            </div>
+            <div class="code-name">.icon-mb_dzlk
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_gdlj"></span>
+            <div class="name">
+              mb_gdlj
+            </div>
+            <div class="code-name">.icon-mb_gdlj
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_gssfz"></span>
+            <div class="name">
+              mb_gssfz
+            </div>
+            <div class="code-name">.icon-mb_gssfz
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_gsld"></span>
+            <div class="name">
+              mb_gsld
+            </div>
+            <div class="code-name">.icon-mb_gsld
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_gsgw"></span>
+            <div class="name">
+              mb_gsgw
+            </div>
+            <div class="code-name">.icon-mb_gsgw
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_kbzld"></span>
+            <div class="name">
+              mb_kbzld
+            </div>
+            <div class="code-name">.icon-mb_kbzld
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_szlk"></span>
+            <div class="name">
+              mb_szlk
+            </div>
+            <div class="code-name">.icon-mb_szlk
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_zjwd"></span>
+            <div class="name">
+              mb_zjwd
+            </div>
+            <div class="code-name">.icon-mb_zjwd
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_jkzd"></span>
+            <div class="name">
+              mb_jkzd
+            </div>
+            <div class="code-name">.icon-mb_jkzd
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_ckzd"></span>
+            <div class="name">
+              mb_ckzd
+            </div>
+            <div class="code-name">.icon-mb_ckzd
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_wclk"></span>
+            <div class="name">
+              mb_wclk
+            </div>
+            <div class="code-name">.icon-mb_wclk
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_lclk"></span>
+            <div class="name">
+              mb_lclk
+            </div>
+            <div class="code-name">.icon-mb_lclk
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_snld"></span>
+            <div class="name">
+              mb_snld
+            </div>
+            <div class="code-name">.icon-mb_snld
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_sxwl"></span>
+            <div class="name">
+              mb_sxwl
+            </div>
+            <div class="code-name">.icon-mb_sxwl
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_jzwd"></span>
+            <div class="name">
+              mb_jzwd
+            </div>
+            <div class="code-name">.icon-mb_jzwd
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-mb_wd"></span>
+            <div class="name">
+              mb_wd
+            </div>
+            <div class="code-name">.icon-mb_wd
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-jg_q"></span>
             <div class="name">
               jg_q
@@ -1779,6 +2199,230 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-sc_sc"></use>
+                </svg>
+                <div class="name">sc_sc</div>
+                <div class="code-name">#icon-sc_sc</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-sc_shangc"></use>
+                </svg>
+                <div class="name">sc_shangc</div>
+                <div class="code-name">#icon-sc_shangc</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-sc_shic"></use>
+                </svg>
+                <div class="name">sc_shic</div>
+                <div class="code-name">#icon-sc_shic</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-rt_shit"></use>
+                </svg>
+                <div class="name">rt_shit</div>
+                <div class="code-name">#icon-rt_shit</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-rt_rt"></use>
+                </svg>
+                <div class="name">rt_rt</div>
+                <div class="code-name">#icon-rt_rt</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-rt_st"></use>
+                </svg>
+                <div class="name">rt_st</div>
+                <div class="code-name">#icon-rt_st</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_canjiren_p"></use>
+                </svg>
+                <div class="name">fjdc_canjiren_p</div>
+                <div class="code-name">#icon-fjdc_canjiren_p</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_canjiren_s"></use>
+                </svg>
+                <div class="name">fjdc_canjiren_s</div>
+                <div class="code-name">#icon-fjdc_canjiren_s</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_xuliche"></use>
+                </svg>
+                <div class="name">fjdc_xuliche</div>
+                <div class="code-name">#icon-fjdc_xuliche</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_renliche"></use>
+                </svg>
+                <div class="name">fjdc_renliche</div>
+                <div class="code-name">#icon-fjdc_renliche</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_zixingche"></use>
+                </svg>
+                <div class="name">fjdc_zixingche</div>
+                <div class="code-name">#icon-fjdc_zixingche</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-fjdc_sanlunche"></use>
+                </svg>
+                <div class="name">fjdc_sanlunche</div>
+                <div class="code-name">#icon-fjdc_sanlunche</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_dzlk"></use>
+                </svg>
+                <div class="name">mb_dzlk</div>
+                <div class="code-name">#icon-mb_dzlk</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_gdlj"></use>
+                </svg>
+                <div class="name">mb_gdlj</div>
+                <div class="code-name">#icon-mb_gdlj</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_gssfz"></use>
+                </svg>
+                <div class="name">mb_gssfz</div>
+                <div class="code-name">#icon-mb_gssfz</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_gsld"></use>
+                </svg>
+                <div class="name">mb_gsld</div>
+                <div class="code-name">#icon-mb_gsld</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_gsgw"></use>
+                </svg>
+                <div class="name">mb_gsgw</div>
+                <div class="code-name">#icon-mb_gsgw</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_kbzld"></use>
+                </svg>
+                <div class="name">mb_kbzld</div>
+                <div class="code-name">#icon-mb_kbzld</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_szlk"></use>
+                </svg>
+                <div class="name">mb_szlk</div>
+                <div class="code-name">#icon-mb_szlk</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_zjwd"></use>
+                </svg>
+                <div class="name">mb_zjwd</div>
+                <div class="code-name">#icon-mb_zjwd</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_jkzd"></use>
+                </svg>
+                <div class="name">mb_jkzd</div>
+                <div class="code-name">#icon-mb_jkzd</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_ckzd"></use>
+                </svg>
+                <div class="name">mb_ckzd</div>
+                <div class="code-name">#icon-mb_ckzd</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_wclk"></use>
+                </svg>
+                <div class="name">mb_wclk</div>
+                <div class="code-name">#icon-mb_wclk</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_lclk"></use>
+                </svg>
+                <div class="name">mb_lclk</div>
+                <div class="code-name">#icon-mb_lclk</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_snld"></use>
+                </svg>
+                <div class="name">mb_snld</div>
+                <div class="code-name">#icon-mb_snld</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_sxwl"></use>
+                </svg>
+                <div class="name">mb_sxwl</div>
+                <div class="code-name">#icon-mb_sxwl</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_jzwd"></use>
+                </svg>
+                <div class="name">mb_jzwd</div>
+                <div class="code-name">#icon-mb_jzwd</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-mb_wd"></use>
+                </svg>
+                <div class="name">mb_wd</div>
+                <div class="code-name">#icon-mb_wd</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-jg_q"></use>
                 </svg>
                 <div class="name">jg_q</div>

+ 115 - 3
src/components/base/components/icon/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4084834 */
-  src: url('iconfont.woff2?t=1686539943595') format('woff2'),
-       url('iconfont.woff?t=1686539943595') format('woff'),
-       url('iconfont.ttf?t=1686539943595') format('truetype');
+  src: url('iconfont.woff2?t=1686814186940') format('woff2'),
+       url('iconfont.woff?t=1686814186940') format('woff'),
+       url('iconfont.ttf?t=1686814186940') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,118 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-sc_sc:before {
+  content: "\e79d";
+}
+
+.icon-sc_shangc:before {
+  content: "\e79e";
+}
+
+.icon-sc_shic:before {
+  content: "\e79f";
+}
+
+.icon-rt_shit:before {
+  content: "\e79a";
+}
+
+.icon-rt_rt:before {
+  content: "\e79b";
+}
+
+.icon-rt_st:before {
+  content: "\e79c";
+}
+
+.icon-fjdc_canjiren_p:before {
+  content: "\e794";
+}
+
+.icon-fjdc_canjiren_s:before {
+  content: "\e795";
+}
+
+.icon-fjdc_xuliche:before {
+  content: "\e796";
+}
+
+.icon-fjdc_renliche:before {
+  content: "\e797";
+}
+
+.icon-fjdc_zixingche:before {
+  content: "\e798";
+}
+
+.icon-fjdc_sanlunche:before {
+  content: "\e799";
+}
+
+.icon-mb_dzlk:before {
+  content: "\e784";
+}
+
+.icon-mb_gdlj:before {
+  content: "\e785";
+}
+
+.icon-mb_gssfz:before {
+  content: "\e786";
+}
+
+.icon-mb_gsld:before {
+  content: "\e787";
+}
+
+.icon-mb_gsgw:before {
+  content: "\e788";
+}
+
+.icon-mb_kbzld:before {
+  content: "\e789";
+}
+
+.icon-mb_szlk:before {
+  content: "\e78a";
+}
+
+.icon-mb_zjwd:before {
+  content: "\e78b";
+}
+
+.icon-mb_jkzd:before {
+  content: "\e78c";
+}
+
+.icon-mb_ckzd:before {
+  content: "\e78d";
+}
+
+.icon-mb_wclk:before {
+  content: "\e78e";
+}
+
+.icon-mb_lclk:before {
+  content: "\e78f";
+}
+
+.icon-mb_snld:before {
+  content: "\e790";
+}
+
+.icon-mb_sxwl:before {
+  content: "\e791";
+}
+
+.icon-mb_jzwd:before {
+  content: "\e792";
+}
+
+.icon-mb_wd:before {
+  content: "\e793";
+}
+
 .icon-jg_q:before {
   content: "\e773";
 }

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
src/components/base/components/icon/iconfont/iconfont.js


+ 196 - 0
src/components/base/components/icon/iconfont/iconfont.json

@@ -6,6 +6,202 @@
   "description": "交通事故现场勘验系统",
   "glyphs": [
     {
+      "icon_id": "36016563",
+      "name": "sc_sc",
+      "font_class": "sc_sc",
+      "unicode": "e79d",
+      "unicode_decimal": 59293
+    },
+    {
+      "icon_id": "36016564",
+      "name": "sc_shangc",
+      "font_class": "sc_shangc",
+      "unicode": "e79e",
+      "unicode_decimal": 59294
+    },
+    {
+      "icon_id": "36016565",
+      "name": "sc_shic",
+      "font_class": "sc_shic",
+      "unicode": "e79f",
+      "unicode_decimal": 59295
+    },
+    {
+      "icon_id": "36016489",
+      "name": "rt_shit",
+      "font_class": "rt_shit",
+      "unicode": "e79a",
+      "unicode_decimal": 59290
+    },
+    {
+      "icon_id": "36016490",
+      "name": "rt_rt",
+      "font_class": "rt_rt",
+      "unicode": "e79b",
+      "unicode_decimal": 59291
+    },
+    {
+      "icon_id": "36016491",
+      "name": "rt_st",
+      "font_class": "rt_st",
+      "unicode": "e79c",
+      "unicode_decimal": 59292
+    },
+    {
+      "icon_id": "36016287",
+      "name": "fjdc_canjiren_p",
+      "font_class": "fjdc_canjiren_p",
+      "unicode": "e794",
+      "unicode_decimal": 59284
+    },
+    {
+      "icon_id": "36016288",
+      "name": "fjdc_canjiren_s",
+      "font_class": "fjdc_canjiren_s",
+      "unicode": "e795",
+      "unicode_decimal": 59285
+    },
+    {
+      "icon_id": "36016289",
+      "name": "fjdc_xuliche",
+      "font_class": "fjdc_xuliche",
+      "unicode": "e796",
+      "unicode_decimal": 59286
+    },
+    {
+      "icon_id": "36016290",
+      "name": "fjdc_renliche",
+      "font_class": "fjdc_renliche",
+      "unicode": "e797",
+      "unicode_decimal": 59287
+    },
+    {
+      "icon_id": "36016291",
+      "name": "fjdc_zixingche",
+      "font_class": "fjdc_zixingche",
+      "unicode": "e798",
+      "unicode_decimal": 59288
+    },
+    {
+      "icon_id": "36016292",
+      "name": "fjdc_sanlunche",
+      "font_class": "fjdc_sanlunche",
+      "unicode": "e799",
+      "unicode_decimal": 59289
+    },
+    {
+      "icon_id": "36002516",
+      "name": "mb_dzlk",
+      "font_class": "mb_dzlk",
+      "unicode": "e784",
+      "unicode_decimal": 59268
+    },
+    {
+      "icon_id": "36002517",
+      "name": "mb_gdlj",
+      "font_class": "mb_gdlj",
+      "unicode": "e785",
+      "unicode_decimal": 59269
+    },
+    {
+      "icon_id": "36002518",
+      "name": "mb_gssfz",
+      "font_class": "mb_gssfz",
+      "unicode": "e786",
+      "unicode_decimal": 59270
+    },
+    {
+      "icon_id": "36002519",
+      "name": "mb_gsld",
+      "font_class": "mb_gsld",
+      "unicode": "e787",
+      "unicode_decimal": 59271
+    },
+    {
+      "icon_id": "36002520",
+      "name": "mb_gsgw",
+      "font_class": "mb_gsgw",
+      "unicode": "e788",
+      "unicode_decimal": 59272
+    },
+    {
+      "icon_id": "36002521",
+      "name": "mb_kbzld",
+      "font_class": "mb_kbzld",
+      "unicode": "e789",
+      "unicode_decimal": 59273
+    },
+    {
+      "icon_id": "36002522",
+      "name": "mb_szlk",
+      "font_class": "mb_szlk",
+      "unicode": "e78a",
+      "unicode_decimal": 59274
+    },
+    {
+      "icon_id": "36002523",
+      "name": "mb_zjwd",
+      "font_class": "mb_zjwd",
+      "unicode": "e78b",
+      "unicode_decimal": 59275
+    },
+    {
+      "icon_id": "36002524",
+      "name": "mb_jkzd",
+      "font_class": "mb_jkzd",
+      "unicode": "e78c",
+      "unicode_decimal": 59276
+    },
+    {
+      "icon_id": "36002525",
+      "name": "mb_ckzd",
+      "font_class": "mb_ckzd",
+      "unicode": "e78d",
+      "unicode_decimal": 59277
+    },
+    {
+      "icon_id": "36002526",
+      "name": "mb_wclk",
+      "font_class": "mb_wclk",
+      "unicode": "e78e",
+      "unicode_decimal": 59278
+    },
+    {
+      "icon_id": "36002527",
+      "name": "mb_lclk",
+      "font_class": "mb_lclk",
+      "unicode": "e78f",
+      "unicode_decimal": 59279
+    },
+    {
+      "icon_id": "36002528",
+      "name": "mb_snld",
+      "font_class": "mb_snld",
+      "unicode": "e790",
+      "unicode_decimal": 59280
+    },
+    {
+      "icon_id": "36002529",
+      "name": "mb_sxwl",
+      "font_class": "mb_sxwl",
+      "unicode": "e791",
+      "unicode_decimal": 59281
+    },
+    {
+      "icon_id": "36002530",
+      "name": "mb_jzwd",
+      "font_class": "mb_jzwd",
+      "unicode": "e792",
+      "unicode_decimal": 59282
+    },
+    {
+      "icon_id": "36002531",
+      "name": "mb_wd",
+      "font_class": "mb_wd",
+      "unicode": "e793",
+      "unicode_decimal": 59283
+    },
+    {
       "icon_id": "35940165",
       "name": "jg_q",
       "font_class": "jg_q",

BIN
src/components/base/components/icon/iconfont/iconfont.ttf


BIN
src/components/base/components/icon/iconfont/iconfont.woff


BIN
src/components/base/components/icon/iconfont/iconfont.woff2


+ 5 - 1
src/graphic/Controls/AddPoint.js

@@ -101,11 +101,12 @@ export default class AddPoint {
       VectorCategory.Line.GuidePositionLine
     );
 
-    lineService.createByPointId(
+    let guidePositionLine = lineService.createByPointId(
       basePoint.vectorId,
       join.vectorId,
       VectorCategory.Line.PositionLine
     );
+    guidePositionLine.setLocationMode(Constant.angleLocationMode);
   }
 
   //综合定位法
@@ -159,6 +160,9 @@ export default class AddPoint {
     if (testPoint.getCategory() != VectorCategory.Point.TestPoint) {
       return;
     }
+    if (!Settings.baseLineId) {
+      return;
+    }
     let lineGeometry = dataService.getLine(Settings.baseLineId);
     let startPoint = dataService.getPoint(lineGeometry.startId);
     let endPoint = dataService.getPoint(lineGeometry.endId);

+ 72 - 4
src/graphic/Controls/MoveLine.js

@@ -1,5 +1,9 @@
+import Constant from "../Constant";
 import { dataService } from "../Service/DataService";
+import { lineService } from "../Service/LineService";
+import { pointService } from "../Service/PointService";
 import { mathUtil } from "../Util/MathUtil";
+import VectorCategory from "../enum/VectorCategory";
 
 export default class MoveLine {
   constructor() {}
@@ -10,10 +14,74 @@ export default class MoveLine {
     let line = dataService.getLine(lineId);
     let startPoint = dataService.getPoint(line.startId);
     let endPoint = dataService.getPoint(line.endId);
-    startPoint.x += dx;
-    startPoint.y += dy;
-    endPoint.x += dx;
-    endPoint.y += dy;
+    //垂直移动
+    if (
+      line.getCategory() == VectorCategory.Line.PositionLine &&
+      line.getLocationMode() == Constant.angleLocationMode
+    ) {
+      let point1 = {
+        x: startPoint.x + dx,
+        y: startPoint.y + dy,
+      };
+      let point2 = {
+        x: endPoint.x + dx,
+        y: endPoint.y + dy,
+      };
+      let lineGeometry = mathUtil.createLine1(point1, point2);
+      point1 = mathUtil.getJoinLinePoint(startPoint, lineGeometry);
+      //startPoint本来是基准点
+      if (startPoint.getCategory() == VectorCategory.Point.BasePoint) {
+        //达到一定距离才能移动
+        if (mathUtil.getDistance(startPoint, point1) < Constant.minAdsorbPix) {
+          return false;
+        }
+        let newStartPoint = pointService.create(point1);
+        lineService.createByPointId(
+          startPoint.vectorId,
+          newStartPoint.vectorId,
+          VectorCategory.Line.ExtendedPositionLine
+        );
+        dataService.deletePointParent(startPoint.vectorId, lineId);
+        line.startId = newStartPoint.vectorId;
+        newStartPoint.setPointParent(line.vectorId, "start");
+      } else {
+        startPoint.x = point1.x;
+        startPoint.y = point1.y;
+        let parents = Object.keys(startPoint.parent);
+        let extendedLine = dataService.getLine(parents[0]);
+        if (
+          extendedLine.getCategory() != VectorCategory.Line.ExtendedPositionLine
+        ) {
+          extendedLine = dataService.getLine(parents[1]);
+        }
+        if (
+          extendedLine.getCategory() == VectorCategory.Line.ExtendedPositionLine
+        ) {
+          //point1是基准点
+          point1 = dataService.getPoint(extendedLine.startId);
+          point2 = dataService.getPoint(extendedLine.endId);
+          if (mathUtil.getDistance(point1, point2) < Constant.minAdsorbPix) {
+            dataService.deleteLine(extendedLine.vectorId);
+            dataService.deletePoint(extendedLine.endId);
+
+            line.startId = point1.vectorId;
+            point1.setPointParent(line.vectorId, "start");
+
+            lineGeometry = mathUtil.createLine3(lineGeometry, point1);
+          }
+        }
+      }
+
+      point2 = mathUtil.getJoinLinePoint(endPoint, lineGeometry);
+      endPoint.x = point2.x;
+      endPoint.y = point2.y;
+    } else {
+      startPoint.x += dx;
+      startPoint.y += dy;
+      endPoint.x += dx;
+      endPoint.y += dy;
+    }
+    return true;
   }
 
   moveCurveLine(curveLineId, dx, dy) {

+ 1 - 0
src/graphic/Controls/MoveMagnifier.js

@@ -14,6 +14,7 @@ export default class MoveMagnifier {
         x: popPosition.x,
         y: popPosition.y,
       };
+      magnifier.setPopPosition(position);
     }
   }
 }

+ 94 - 79
src/graphic/Controls/UIControl.js

@@ -1,37 +1,38 @@
-import { coordinate } from "../Coordinate.js";
-import LayerEvents from "../enum/LayerEvents.js";
-import UIEvents from "../enum/UIEvents.js";
-import RoadTemplate from "../enum/RoadTemplate.js";
-import RoadStructure from "../enum/RoadStructure.js";
-import VectorType from "../enum/VectorType.js";
-import VectorStyle from "../enum/VectorStyle.js";
-import GeoActions from "../enum/GeoActions.js";
-import VectorEvents from "../enum/VectorEvents.js";
-import SVGType from "../enum/SVGType.js";
-import { stateService } from "../Service/StateService.js";
-import { uiService } from "../Service/UIService.js";
-import { dataService } from "../Service/DataService.js";
-import { historyService } from "../Service/HistoryService.js";
-import { elementService } from "../Service/ElementService";
-import { lineService } from "../Service/LineService.js";
-import { circleService } from "../Service/CircleService.js";
-import { textService } from "../Service/TextService.js";
-import { magnifierService } from "../Service/MagnifierService.js";
-import { mathUtil } from "../Util/MathUtil";
-import Constant from "../Constant";
+import { coordinate } from '../Coordinate.js';
+import LayerEvents from '../enum/LayerEvents.js';
+import UIEvents from '../enum/UIEvents.js';
+import RoadTemplate from '../enum/RoadTemplate.js';
+import RoadStructure from '../enum/RoadStructure.js';
+import VectorType from '../enum/VectorType.js';
+import VectorStyle from '../enum/VectorStyle.js';
+import VectorWeight from '../enum/VectorWeight.js';
+import GeoActions from '../enum/GeoActions.js';
+import VectorEvents from '../enum/VectorEvents.js';
+import SVGType from '../enum/SVGType.js';
+import { stateService } from '../Service/StateService.js';
+import { uiService } from '../Service/UIService.js';
+import { dataService } from '../Service/DataService.js';
+import { historyService } from '../Service/HistoryService.js';
+import { elementService } from '../Service/ElementService';
+import { lineService } from '../Service/LineService.js';
+import { circleService } from '../Service/CircleService.js';
+import { textService } from '../Service/TextService.js';
+import { magnifierService } from '../Service/MagnifierService.js';
+import { mathUtil } from '../Util/MathUtil';
+import Constant from '../Constant';
 // import { roomsUtil } from "../Room/RoomsUtil.js";
-import { addRoad } from "../Controls/AddRoad";
-import { addLine } from "./AddLine.js";
-import VectorCategory from "../enum/VectorCategory.js";
+import { addRoad } from '../Controls/AddRoad';
+import { addLine } from './AddLine.js';
+import VectorCategory from '../enum/VectorCategory.js';
 // import { floorplanData } from "../VectorData.js";
-import Message from "@/components/base/components/message/message.vue";
-import { pointService } from "../Service/PointService.js";
-import Settings from "../Settings.js";
-import { addPoint } from "./AddPoint.js";
-import { ellipticService } from "../Service/EllipticService.js";
-import { curveRoadPointService } from "../Service/CurveRoadPointService.js";
-import { roadService } from "../Service/RoadService.js";
-import { curveRoadService } from "../Service/CurveRoadService.js";
+import Message from '@/components/base/components/message/message.vue';
+import { pointService } from '../Service/PointService.js';
+import Settings from '../Settings.js';
+import { addPoint } from './AddPoint.js';
+import { ellipticService } from '../Service/EllipticService.js';
+import { curveRoadPointService } from '../Service/CurveRoadPointService.js';
+import { roadService } from '../Service/RoadService.js';
+import { curveRoadService } from '../Service/CurveRoadService.js';
 
 export default class UIControl {
   constructor(layer, newsletter, graphicStateUI) {
@@ -87,7 +88,7 @@ export default class UIControl {
         }
 
         //执行新的事件
-        if (uiService.isBelongRoad(selectUI) || selectUI == "road") {
+        if (uiService.isBelongRoad(selectUI) || selectUI == 'road') {
           stateService.setEventName(LayerEvents.AddRoad);
         } else if (selectUI == UIEvents.CurveRoad) {
           stateService.setEventName(LayerEvents.AddCurveRoad);
@@ -120,15 +121,51 @@ export default class UIControl {
   }
 
   updateVectorForSelectUI(selectUI) {
+    console.log('selectUI', selectUI);
     const focusItem = stateService.getFocusItem();
+
+    // if (selectUI == VectorStyle.Bold || selectUI == VectorStyle.Thinning) {
+    //   if (focusItem.type == VectorType.Line) {
+    //     let Line = dataService.getLine(focusItem.vectorId);
+    //     Line.setStyle(selectUI);
+    //   } else if (focusItem.type == VectorType.RoadEdge) {
+    //     let roadEdge = dataService.getRoadEdge(focusItem.vectorId);
+    //     if (roadEdge) {
+    //       roadEdge.setStyle(selectUI);
+    //     } else {
+    //       roadEdge = dataService.getCurveRoadEdge(focusItem.vectorId);
+    //       roadEdge.setStyle(selectUI);
+    //     }
+    //   }
+    //   this.layer.history.save();
+    //   this.layer.renderer.autoRedraw();
+    // }
+    // else
     if (uiService.isBelongRoadEdgeStyle(selectUI)) {
-      let roadEdge = dataService.getRoadEdge(focusItem.vectorId);
-      if (roadEdge) {
-        roadEdge.setStyle(selectUI);
+      let key = null;
+      if (VectorStyle[selectUI]) {
+        key = 'setStyle';
+      } else if (VectorWeight[selectUI]) {
+        key = 'setWeight';
+      }
+      console.log(key);
+
+      if (focusItem.type == VectorType.Line) {
+        let Line = dataService.getLine(focusItem.vectorId);
+        // Line.setStyle(selectUI);
+        Line[key](selectUI);
       } else {
-        roadEdge = dataService.getCurveRoadEdge(focusItem.vectorId);
-        roadEdge.setStyle(selectUI);
+        let roadEdge = dataService.getRoadEdge(focusItem.vectorId);
+        if (roadEdge) {
+          // roadEdge.setStyle(selectUI);
+          roadEdge[key](selectUI);
+        } else {
+          roadEdge = dataService.getCurveRoadEdge(focusItem.vectorId);
+          // roadEdge.setStyle(selectUI);
+          roadEdge[key](selectUI);
+        }
       }
+
       this.layer.history.save();
       this.layer.renderer.autoRedraw();
     } else if (selectUI == VectorEvents.AddLane) {
@@ -379,18 +416,18 @@ export default class UIControl {
   }
 
   getCadBlob(canvas) {
-    var type = "jpg";
+    var type = 'jpg';
     return new Promise((resolve) => canvas.toBlob(resolve, `${type}/image`));
   }
 
   downloadCadImg(canvas, filename) {
     // 图片导出为 jpg 格式
-    var type = "jpg";
+    var type = 'jpg';
     var imgData = canvas.toDataURL(type, 3);
     canvas.toBlob(`${type}/image`);
 
     // 加工image data,替换mime type
-    imgData = imgData.replace(this._fixType(type), "image/octet-stream");
+    imgData = imgData.replace(this._fixType(type), 'image/octet-stream');
     // 下载后的图片名
     //var filename = 'cad_' + new Date().getTime() + '.' + type
     // download
@@ -398,38 +435,19 @@ export default class UIControl {
   }
 
   saveFile(data, filename) {
-    var save_link = document.createElementNS(
-      "http://www.w3.org/1999/xhtml",
-      "a"
-    );
+    var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
     save_link.href = data;
     save_link.download = filename;
 
-    var event = document.createEvent("MouseEvents");
-    event.initMouseEvent(
-      "click",
-      true,
-      false,
-      window,
-      0,
-      0,
-      0,
-      0,
-      0,
-      false,
-      false,
-      false,
-      false,
-      0,
-      null
-    );
+    var event = document.createEvent('MouseEvents');
+    event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
     save_link.dispatchEvent(event);
   }
 
   _fixType(type) {
-    type = type.toLowerCase().replace(/jpg/i, "jpeg");
+    type = type.toLowerCase().replace(/jpg/i, 'jpeg');
     var r = type.match(/png|jpeg|bmp|gif/)[0];
-    return "image/" + r;
+    return 'image/' + r;
   }
   /****************************************************************************针对菜单*******************************************************************************/
 
@@ -488,9 +506,7 @@ export default class UIControl {
   /******************************************************************************************************************************************************************/
 
   prompt(msg) {
-    this._prompts.push(
-      Message.success(typeof msg === "string" ? { msg } : msg)
-    );
+    this._prompts.push(Message.success(typeof msg === 'string' ? { msg } : msg));
   }
 
   // 进入持续添加出确认与取消框
@@ -498,7 +514,7 @@ export default class UIControl {
     this.graphicStateUI.continuedMode = true;
   }
   confirmEntry() {
-    console.log("确认");
+    console.log('确认');
     this.graphicStateUI.continuedMode = false;
     this.layer.exit();
     uiService.setSelectLineCategory(VectorCategory.Line.NormalLine);
@@ -507,7 +523,7 @@ export default class UIControl {
     this.layer.renderer.autoRedraw();
   }
   confirmCancel() {
-    console.log("取消");
+    console.log('取消');
     this.graphicStateUI.continuedMode = false;
     addPoint.deleteTestPoints();
     this.layer.exit();
@@ -519,16 +535,14 @@ export default class UIControl {
 
   // 设置默认设置
   setDefaultSetting(setting) {
-    console.log("获得设置", setting);
-
-    uiService.setRoadMidDivideWidth(
-      setting.roadQuarantineWidth / coordinate.res
-    );
-    uiService.setCurveRoadMidDivideWidth(
-      setting.roadQuarantineWidth / coordinate.res
-    );
+    console.log('获得设置', setting);
+
+    uiService.setRoadMidDivideWidth(setting.roadQuarantineWidth / coordinate.res);
+    uiService.setCurveRoadMidDivideWidth(setting.roadQuarantineWidth / coordinate.res);
     uiService.setSingleLaneWidth(setting.singleRoadWidth / coordinate.res);
-    uiService.setLineWidth(setting.lineWidth / 1000 / coordinate.res);
+    // uiService.setLineWidth(setting.lineWidth / 1000 / coordinate.res);
+    uiService.setLineWidth(setting.lineWidth);
+    this.layer.renderer.autoRedraw();
   }
 
   // 获取默认设置
@@ -540,6 +554,7 @@ export default class UIControl {
       singleRoadWidth: singleLaneWidth * coordinate.res,
       roadQuarantineWidth: roadMidDivideWidth * coordinate.res,
       lineWidth: lineWidth * coordinate.res * 1000,
+      lineWidth: lineWidth,
     };
   }
 

+ 2 - 2
src/graphic/Geometry/CurveRoadEdge.js

@@ -4,14 +4,14 @@ import VectorType from "../enum/VectorType.js";
 import { mathUtil } from "../Util/MathUtil.js";
 
 export default class CurveRoadEdge extends Geometry {
-  constructor(start, end, vectorId, parentId) {
+  constructor(start, end, vectorId, parentId, points) {
     super();
     this.parent = parentId;
     this.start = {};
     this.end = {};
     this.vectorId = null;
     this.style = null;
-    this.points = [];
+    this.points = points || [];
     this.curves = [];
     this.geoType = VectorType.CurveRoadEdge;
     this.setId(vectorId);

+ 19 - 0
src/graphic/Geometry/Geometry.js

@@ -107,6 +107,13 @@ export default class Geometry {
   setStyle(style) {
     this.style = style;
   }
+  getStyle() {
+    return this.weight;
+  }
+
+  setWeight(weight) {
+    this.weight = weight;
+  }
 
   getType() {
     return this.type;
@@ -116,6 +123,18 @@ export default class Geometry {
     this.type = type;
   }
 
+  getCategory() {
+    return this.category;
+  }
+
+  setLocationMode(value) {
+    this.locationMode = value;
+  }
+
+  getLocationMode() {
+    return this.locationMode;
+  }
+
   // ptSrc: 圆上某点(初始点);
   // ptRotationCenter: 圆心点;
   // angle: 旋转角度°  -- [angle * M_PI / 180]:将角度换算为弧度

+ 1 - 4
src/graphic/Geometry/Line.js

@@ -12,6 +12,7 @@ export default class Line extends Geometry {
     this.startId = startId;
     this.endId = endId;
     this.category = Settings.selectLineCategory;
+    this.locationMode = null;
     this.color = Style.SingleArrowLine.strokeStyle; //箭头类型会用到
     this.value = null; //测量线会用到
     this.geoType = VectorType.Line;
@@ -27,10 +28,6 @@ export default class Line extends Geometry {
     this.category = value;
   }
 
-  getCategory() {
-    return this.category;
-  }
-
   getDir(pointId) {
     if (this.startId == pointId) {
       return "start";

+ 26 - 22
src/graphic/Geometry/Magnifier.js

@@ -1,10 +1,10 @@
 //放大镜
 
-import { coordinate } from "../Coordinate.js";
-import { mathUtil } from "../Util/MathUtil.js";
-import VectorType from "../enum/VectorType.js";
-import Geometry from "./Geometry";
-import {api} from '@/store/sync.ts'
+import { coordinate } from '../Coordinate.js';
+import { mathUtil } from '../Util/MathUtil.js';
+import VectorType from '../enum/VectorType.js';
+import Geometry from './Geometry';
+import { api } from '@/store/sync.ts';
 
 const distance = 500;
 export default class Magnifier extends Geometry {
@@ -26,8 +26,8 @@ export default class Magnifier extends Geometry {
     this.position.x = positionRaw.x;
     this.position.y = positionRaw.y;
     let position = {
-      x: this.position.x,
-      y: this.position.y,
+      // x: this.position.x,
+      // y: this.position.y,
     };
     //let position = coordinate.getScreenXY(this.position);
     // let center = {
@@ -111,7 +111,7 @@ export default class Magnifier extends Geometry {
   //     };
   //   }
   // }
-  setPopPosition() {
+  setPopPosition(positionRaw) {
     const position = coordinate.getScreenXY(this.position);
     const center = coordinate.getScreenXY(coordinate.center);
     let line = mathUtil.createLine1(position, center);
@@ -120,20 +120,24 @@ export default class Magnifier extends Geometry {
     let join1 = mathUtil.getIntersectionPoint(line, parallelLines.line1);
     let join2 = mathUtil.getIntersectionPoint(line, parallelLines.line2);
 
-    if (
-      mathUtil.getDistance(join1, center) < mathUtil.getDistance(join2, center)
-    ) {
-      this.popPosition = {
-        x: join1.x,
-        y: join1.y,
-      };
-    } else if (
-      mathUtil.getDistance(join2, center) < mathUtil.getDistance(join1, center)
-    ) {
-      this.popPosition = {
-        x: join2.x,
-        y: join2.y,
-      };
+    if (mathUtil.getDistance(join1, center) < mathUtil.getDistance(join2, center)) {
+      if (positionRaw) {
+        this.popPosition =  coordinate.getScreenXY(positionRaw);
+      } else {
+        this.popPosition = {
+          x: join1.x,
+          y: join1.y,
+        };
+      }
+    } else if (mathUtil.getDistance(join2, center) < mathUtil.getDistance(join1, center)) {
+      if (positionRaw) {
+        this.popPosition = coordinate.getScreenXY(positionRaw);
+      } else {
+        this.popPosition = {
+          x: join2.x,
+          y: join2.y,
+        };
+      }
     }
   }
 

+ 0 - 12
src/graphic/Geometry/Point.js

@@ -24,10 +24,6 @@ export default class Point extends Geometry {
     this.y = position.y;
   }
 
-  getCategory() {
-    return this.category;
-  }
-
   getLinkedBasePointId() {
     return this.linkedBasePointId;
   }
@@ -52,12 +48,4 @@ export default class Point extends Geometry {
       this.category = value;
     }
   }
-
-  setLocationMode(value) {
-    this.locationMode = value;
-  }
-
-  getLocationMode() {
-    return this.locationMode;
-  }
 }

+ 4 - 1
src/graphic/History/History.js

@@ -782,12 +782,14 @@ export default class History {
   goNextForCurveRoadEdges(itemForCurveRoadEdges) {
     for (let i = 0; i < itemForCurveRoadEdges.length; ++i) {
       const item = itemForCurveRoadEdges[i];
+ 
       if (item.handle == HistoryEvents.AddCurveRoadEdge) {
         let vCurveRoadEdge = curveEdgeService.create(
           item.curveRoadEdge.start,
           item.curveRoadEdge.end,
           item.curveRoadEdge.id,
-          item.curveRoadEdge.parent
+          item.curveRoadEdge.parent,
+          item.curveRoadEdge.points,
         );
         historyUtil.assignCurveRoadEdgeFromCurveRoadEdge(
           vCurveRoadEdge,
@@ -873,6 +875,7 @@ export default class History {
     historyService.redoHistoryRecord();
     const item = historyService.getHistoryRecord();
     if (item) {
+ 
       stateService.clear();
 
       this.goNextForPoints(item.points);

+ 10 - 5
src/graphic/History/HistoryUtil.js

@@ -27,7 +27,8 @@ export default class HistoryUtil {
     if (
       line1.startId == line2.startId &&
       line1.endId == line2.endId &&
-      line1.category == line2.category
+      line1.category == line2.category &&
+      line1.locationMode == line2.locationMode
     ) {
       return false;
     } else {
@@ -295,6 +296,7 @@ export default class HistoryUtil {
     lineInfo.start = line2.start;
     lineInfo.end = line2.end;
     lineInfo.category = line2.category;
+    lineInfo.locationMode = line2.locationMode;
     lineInfo.value = line2.value;
     this.setLineInfo(lineInfo);
   }
@@ -425,7 +427,8 @@ export default class HistoryUtil {
     curveRoadPointInfo.parent = JSON.parse(
       JSON.stringify(curveRoadPoint2.parent)
     );
-    curveRoadPointInfo.index = curveRoadPoint1.index;
+
+    curveRoadPointInfo.index = curveRoadPoint2.index;
     this.setCurveRoadPointInfo(curveRoadPointInfo);
   }
 
@@ -486,7 +489,8 @@ export default class HistoryUtil {
     curveRoadInfo.points = [];
     for (let i = 0; i < curveRoad2.points.length; ++i) {
       curveRoadInfo.points[i] = {};
-      curveRoadInfo.points[i].vectorId = curveRoad2.points[i].vectorId;
+      // curveRoadInfo.points[i].vectorId = curveRoad2.points[i].vectorId;
+      curveRoadInfo.points[i] = curveRoad2.points[i];
     }
     this.setCurveRoadInfo(curveRoadInfo);
   }
@@ -542,6 +546,7 @@ export default class HistoryUtil {
     data.start = line.startId;
     data.end = line.endId;
     data.category = line.category;
+    data.locationMode = line.locationMode;
     data.type = line.geoType;
     return data;
   }
@@ -715,7 +720,6 @@ export default class HistoryUtil {
     data.rightEdgeId = curveRoad.rightEdgeId;
     data.points = JSON.parse(JSON.stringify(curveRoad.points));
     data.curves = JSON.parse(JSON.stringify(curveRoad.curves));
-
     data.way = curveRoad.way;
     if (curveRoad.way == Constant.oneWay) {
       data.singleCurveRoadWidth = curveRoad.singleRoadWidth;
@@ -780,6 +784,7 @@ export default class HistoryUtil {
     line.startId = lineInfo.start;
     line.endId = lineInfo.end;
     line.category = lineInfo.category;
+    line.locationMode = lineInfo.locationMode;
     line.value = lineInfo.value;
     return line;
   }
@@ -925,7 +930,7 @@ export default class HistoryUtil {
     //   );
     // }
     curveRoad.points = JSON.parse(JSON.stringify(curveRoadInfo.points));
-    curveRoad.curves = JSON.parse(JSON.stringify(curveRoadInfo.midDivide));
+    curveRoad.curves = JSON.parse(JSON.stringify(curveRoadInfo.curves));
 
     if (curveRoad.way == Constant.oneWay) {
       curveRoad.singleCurveRoadWidth = curveRoadInfo.singleCurveRoadWidth;

+ 402 - 163
src/graphic/Layer.js

@@ -1,49 +1,49 @@
-import Load from './Load';
-import { stateService } from './Service/StateService';
-import { elementService } from './Service/ElementService';
-import { dataService } from './Service/DataService';
-import { textService } from './Service/TextService';
-import { historyService } from './Service/HistoryService';
-import UIControl from './Controls/UIControl';
+import Load from "./Load";
+import { stateService } from "./Service/StateService";
+import { elementService } from "./Service/ElementService";
+import { dataService } from "./Service/DataService";
+import { textService } from "./Service/TextService";
+import { historyService } from "./Service/HistoryService";
+import UIControl from "./Controls/UIControl";
 // import { moveRectangle } from "./Controls/MoveRectangle";
-import { moveText } from './Controls/MoveText';
-import { moveSVG } from './Controls/MoveSVG';
-import { moveMagnifier } from './Controls/MoveMagnifier';
-import { addRoad } from './Controls/AddRoad';
-import { addCrossRoad } from './Controls/AddCrossRoad';
-import { addLine } from './Controls/AddLine';
-import { addPoint } from './Controls/AddPoint';
-import { addCircle } from './Controls/AddCircle';
-import { addElliptic } from './Controls/AddElliptic';
-import { addText } from './Controls/AddText';
-import { addMagnifier } from './Controls/AddMagnifier';
-import { addSVG } from './Controls/AddSVG';
-import { moveRoad } from './Controls/MoveRoad';
-import { moveLine } from './Controls/MoveLine';
-import { movePoint } from './Controls/MovePoint';
-import { moveCircle } from './Controls/MoveCircle';
-import { moveElliptic } from './Controls/MoveElliptic';
-import { coordinate } from './Coordinate';
-import Render from './Renderer/Render';
-import { draw } from './Renderer/Draw';
-import { listenLayer } from './ListenLayer';
-import LayerEvents from './enum/LayerEvents.js';
-import UIEvents from './enum/UIEvents.js';
-import SelectState from './enum/SelectState.js';
-import VectorType from './enum/VectorType';
-import { mathUtil } from './Util/MathUtil';
-import History from './History/History';
-import mitt from 'mitt';
-import { roadService } from './Service/RoadService';
-import { edgeService } from './Service/EdgeService';
-import { roadPointService } from './Service/RoadPointService';
-import { curveRoadService } from './Service/CurveRoadService';
-import VectorCategory from './enum/VectorCategory';
-import Settings from './Settings';
-import Constant from './Constant';
-import { uiService } from './Service/UIService';
-import { imageService } from './Service/ImageService';
-import VectorEvents from './enum/VectorEvents';
+import { moveText } from "./Controls/MoveText";
+import { moveSVG } from "./Controls/MoveSVG";
+import { moveMagnifier } from "./Controls/MoveMagnifier";
+import { addRoad } from "./Controls/AddRoad";
+import { addCrossRoad } from "./Controls/AddCrossRoad";
+import { addLine } from "./Controls/AddLine";
+import { addPoint } from "./Controls/AddPoint";
+import { addCircle } from "./Controls/AddCircle";
+import { addElliptic } from "./Controls/AddElliptic";
+import { addText } from "./Controls/AddText";
+import { addMagnifier } from "./Controls/AddMagnifier";
+import { addSVG } from "./Controls/AddSVG";
+import { moveRoad } from "./Controls/MoveRoad";
+import { moveLine } from "./Controls/MoveLine";
+import { movePoint } from "./Controls/MovePoint";
+import { moveCircle } from "./Controls/MoveCircle";
+import { moveElliptic } from "./Controls/MoveElliptic";
+import { coordinate } from "./Coordinate";
+import Render from "./Renderer/Render";
+import { draw } from "./Renderer/Draw";
+import { listenLayer } from "./ListenLayer";
+import LayerEvents from "./enum/LayerEvents.js";
+import UIEvents from "./enum/UIEvents.js";
+import SelectState from "./enum/SelectState.js";
+import VectorType from "./enum/VectorType";
+import { mathUtil } from "./Util/MathUtil";
+import History from "./History/History";
+import mitt from "mitt";
+import { roadService } from "./Service/RoadService";
+import { edgeService } from "./Service/EdgeService";
+import { roadPointService } from "./Service/RoadPointService";
+import { curveRoadService } from "./Service/CurveRoadService";
+import VectorCategory from "./enum/VectorCategory";
+import Settings from "./Settings";
+import Constant from "./Constant";
+import { uiService } from "./Service/UIService";
+import { imageService } from "./Service/ImageService";
+import VectorEvents from "./enum/VectorEvents";
 
 const minDragDis = 10;
 const minZoom = 20;
@@ -78,25 +78,25 @@ export default class Layer {
   }
 
   bindEvents() {
-    this.canvas.addEventListener('contextmenu', function (e) {
+    this.canvas.addEventListener("contextmenu", function (e) {
       e.preventDefault();
     });
-    this.canvas.addEventListener('mousedown', this.onMouseDown.bind(this));
-    this.canvas.addEventListener('mousemove', this.onMouseMove.bind(this));
-    this.canvas.addEventListener('mouseup', this.onMouseUp.bind(this));
+    this.canvas.addEventListener("mousedown", this.onMouseDown.bind(this));
+    this.canvas.addEventListener("mousemove", this.onMouseMove.bind(this));
+    this.canvas.addEventListener("mouseup", this.onMouseUp.bind(this));
 
-    this.canvas.addEventListener('touchstart', this.onMouseDown.bind(this));
-    this.canvas.addEventListener('touchmove', this.onMouseMove.bind(this));
-    this.canvas.addEventListener('touchend', this.onMouseUp.bind(this));
+    this.canvas.addEventListener("touchstart", this.onMouseDown.bind(this));
+    this.canvas.addEventListener("touchmove", this.onMouseMove.bind(this));
+    this.canvas.addEventListener("touchend", this.onMouseUp.bind(this));
 
-    this.canvas.addEventListener('mousewheel', this.onWheel.bind(this));
-    this.canvas.addEventListener('DOMMouseScroll', this.onWheel.bind(this));
-    this.canvas.addEventListener('resize', this.reSize.bind(this));
-    document.addEventListener('keydown', this.onKeydown.bind(this));
+    this.canvas.addEventListener("mousewheel", this.onWheel.bind(this));
+    this.canvas.addEventListener("DOMMouseScroll", this.onWheel.bind(this));
+    this.canvas.addEventListener("resize", this.reSize.bind(this));
+    document.addEventListener("keydown", this.onKeydown.bind(this));
   }
 
   reSize = function () {
-    console.log('resize');
+    console.log("resize");
     coordinate.updateForCanvas();
     this.renderer.autoRedraw();
   };
@@ -131,16 +131,16 @@ export default class Layer {
     listenLayer.start(position);
     let selectItem = stateService.getSelectItem();
     let focusItem = stateService.getFocusItem();
-    this.setEventName('mouseDown');
+    this.setEventName("mouseDown");
     const eventName = stateService.getEventName();
     switch (eventName) {
       case LayerEvents.AddRoad:
         stateService.setEventName(LayerEvents.AddingRoad);
-        addRoad.setNewRoadPoint('start', position);
+        addRoad.setNewRoadPoint("start", position);
         break;
       case LayerEvents.AddCurveRoad:
         stateService.setEventName(LayerEvents.AddingCurveRoad);
-        addRoad.setNewRoadPoint('start', position);
+        addRoad.setNewRoadPoint("start", position);
         break;
       case LayerEvents.AddLine:
         stateService.setEventName(LayerEvents.AddingLine);
@@ -154,11 +154,15 @@ export default class Layer {
         stateService.setEventName(LayerEvents.MovePoint);
         const newPoint = addPoint.buildPoint(position);
         if (newPoint) {
-          stateService.setSelectItem(newPoint.vectorId, VectorType.Point, SelectState.Select);
+          stateService.setSelectItem(
+            newPoint.vectorId,
+            VectorType.Point,
+            SelectState.Select
+          );
           this.history.save();
           this.renderer.autoRedraw();
         } else {
-          this.uiControl.prompt({ msg: '请先添加基准点', time: 1000 });
+          this.uiControl.prompt({ msg: "请先添加基准点", time: 1000 });
         }
         break;
       case LayerEvents.AddCircle:
@@ -172,7 +176,11 @@ export default class Layer {
       case LayerEvents.AddText:
         stateService.setEventName(LayerEvents.MoveText);
         addText.buildText(position);
-        stateService.setSelectItem(addText.newText.vectorId, VectorType.Text, SelectState.Select);
+        stateService.setSelectItem(
+          addText.newText.vectorId,
+          VectorType.Text,
+          SelectState.Select
+        );
         addText.clear();
         break;
       case LayerEvents.AddSVG:
@@ -186,7 +194,11 @@ export default class Layer {
       case LayerEvents.AddMagnifier:
         stateService.setEventName(LayerEvents.MoveMagnifier);
         addMagnifier.buildMagnifier(position);
-        stateService.setSelectItem(addMagnifier.newMagnifier.vectorId, VectorType.Magnifier, SelectState.Select);
+        stateService.setSelectItem(
+          addMagnifier.newMagnifier.vectorId,
+          VectorType.Magnifier,
+          SelectState.Select
+        );
         addMagnifier.clear();
         break;
       case VectorEvents.AddLane:
@@ -194,18 +206,34 @@ export default class Layer {
           let road = dataService.getRoad(selectItem.vectorId);
           if (road) {
             let roadLanCount = road.getLanesCount(selectItem.dir);
-            if (selectItem.dir == 'left') {
-              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
+            if (selectItem.dir == "left") {
+              roadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                roadLanCount + 1,
+                selectItem.dir
+              );
             } else {
-              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
+              roadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                roadLanCount + 1,
+                selectItem.dir
+              );
             }
           } else {
             road = dataService.getCurveRoad(selectItem.vectorId);
             let curveRoadLanCount = road.getLanesCount(selectItem.dir);
-            if (selectItem.dir == 'left') {
-              curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
+            if (selectItem.dir == "left") {
+              curveRoadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                curveRoadLanCount + 1,
+                selectItem.dir
+              );
             } else {
-              curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
+              curveRoadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                curveRoadLanCount + 1,
+                selectItem.dir
+              );
             }
           }
           stateService.clearEventName();
@@ -218,18 +246,34 @@ export default class Layer {
           let road = dataService.getRoad(selectItem.vectorId);
           if (road) {
             let roadLanCount = road.getLanesCount(selectItem.dir);
-            if (selectItem.dir == 'left') {
-              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
+            if (selectItem.dir == "left") {
+              roadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                roadLanCount - 1,
+                selectItem.dir
+              );
             } else {
-              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
+              roadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                roadLanCount - 1,
+                selectItem.dir
+              );
             }
           } else {
             road = dataService.getCurveRoad(selectItem.vectorId);
             let curveRoadLanCount = road.getLanesCount(selectItem.dir);
-            if (selectItem.dir == 'left') {
-              curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
+            if (selectItem.dir == "left") {
+              curveRoadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                curveRoadLanCount - 1,
+                selectItem.dir
+              );
             } else {
-              curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
+              curveRoadService.updateForAddSubtractLanesCount(
+                road.vectorId,
+                curveRoadLanCount - 1,
+                selectItem.dir
+              );
             }
           }
           stateService.clearEventName();
@@ -240,12 +284,18 @@ export default class Layer {
       case VectorEvents.AddCrossPoint:
         if (focusItem && focusItem.vectorId) {
           const curveRoad = dataService.getCurveRoad(focusItem.vectorId);
-          let index = mathUtil.getIndexForCurvesPoints(position, curveRoad.points);
+          let index = mathUtil.getIndexForCurvesPoints(
+            position,
+            curveRoad.points
+          );
           if (index != -1) {
             curveRoadService.addCPoint(curveRoad, position, index);
           } else {
             const dis1 = mathUtil.getDistance(curveRoad.points[0], position);
-            const dis2 = mathUtil.getDistance(curveRoad.points[curveRoad.points.length - 1], position);
+            const dis2 = mathUtil.getDistance(
+              curveRoad.points[curveRoad.points.length - 1],
+              position
+            );
             if (dis1 > dis2) {
               index = curveRoad.points.length - 2;
               // curveRoadService.addCPoint(
@@ -260,7 +310,10 @@ export default class Layer {
             curveRoadService.addCPoint(curveRoad, position, index);
           }
           //curveRoadService.setLanes(curveRoad.vectorId);
-          curveRoadService.updateForMovePoint(curveRoad.points[index + 1].vectorId, position);
+          curveRoadService.updateForMovePoint(
+            curveRoad.points[index + 1].vectorId,
+            position
+          );
           stateService.clearEventName();
           this.history.save();
           this.renderer.autoRedraw();
@@ -341,15 +394,28 @@ export default class Layer {
       y: position.y,
     };
     const eventName = stateService.getEventName();
-    if (!this.dragging && Math.abs(X - this.startX) < minDragDis && Math.abs(Y - this.startY) < minDragDis) {
+    if (
+      !this.dragging &&
+      Math.abs(X - this.startX) < minDragDis &&
+      Math.abs(Y - this.startY) < minDragDis
+    ) {
       return;
     }
     this.dragging = true;
-    if (Math.abs(X - this.startX) > minDragDis || Math.abs(Y - this.startY) > minDragDis) {
+    if (
+      Math.abs(X - this.startX) > minDragDis ||
+      Math.abs(Y - this.startY) > minDragDis
+    ) {
       // 是否拖拽了
       if (eventName != null) {
-        stateService.clearFocusItem();
-        this.uiControl.focusVector = null;
+        if (
+          eventName == LayerEvents.MoveMagnifier &&
+          stateService.getSelectItem().state != 0
+        ) {
+        } else {
+          stateService.clearFocusItem();
+          this.uiControl.focusVector = null;
+        }
       }
     }
 
@@ -366,15 +432,17 @@ export default class Layer {
         needAutoRedraw = listenLayer.start(position);
         let seleteItem = stateService.getSelectItem();
         if (seleteItem != null) {
-          console.log('选中:' + seleteItem.vectorId);
+          console.log("选中:" + seleteItem.vectorId);
         } else {
         }
         break;
       case LayerEvents.PanBackGround:
         stateService.clearItems();
         let center = {};
-        center.x = coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
-        center.y = coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
+        center.x =
+          coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
+        center.y =
+          coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
         let tempCenter = {};
         mathUtil.clonePoint(tempCenter, coordinate.center);
         mathUtil.clonePoint(coordinate.center, center);
@@ -483,12 +551,12 @@ export default class Layer {
         elementService.setNewRoad(addRoad.startInfo.position, position);
         elementService.showNewRoad();
 
-        addRoad.setNewRoadPoint('end', position);
+        addRoad.setNewRoadPoint("end", position);
         addRoad.canAdd = addRoad.canAddRoadForEnd(position);
         if (!addRoad.canAdd) {
-          elementService.setNewRoadState('error');
+          elementService.setNewRoadState("error");
         } else {
-          elementService.setNewRoadState('normal');
+          elementService.setNewRoadState("normal");
         }
         elementService.showPoint();
         this.showElementLine(position, eventName);
@@ -605,9 +673,16 @@ export default class Layer {
         let road = dataService.getRoad(draggingItem.vectorId);
         let start = dataService.getRoadPoint(road.startId);
         let end = dataService.getRoadPoint(road.endId);
-        if (Object.keys(start.getParent()).length == 1 && Object.keys(end.getParent()).length == 1) {
+        if (
+          Object.keys(start.getParent()).length == 1 &&
+          Object.keys(end.getParent()).length == 1
+        ) {
           //拖拽的路只有一条
-          moveRoad.moveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
+          moveRoad.moveRoad(
+            draggingItem.vectorId,
+            (dx * coordinate.defaultZoom) / coordinate.zoom,
+            (dy * coordinate.defaultZoom) / coordinate.zoom
+          );
         }
         break;
       case LayerEvents.MoveRoadPoint:
@@ -618,7 +693,10 @@ export default class Layer {
         });
         if (
           listenLayer.modifyPoint &&
-          (listenLayer.modifyPoint.linkedRoadPointId || listenLayer.modifyPoint.linkedRoadId || listenLayer.modifyPoint.linkedRoadPointIdX || listenLayer.modifyPoint.linkedRoadPointIdY)
+          (listenLayer.modifyPoint.linkedRoadPointId ||
+            listenLayer.modifyPoint.linkedRoadId ||
+            listenLayer.modifyPoint.linkedRoadPointIdX ||
+            listenLayer.modifyPoint.linkedRoadPointIdY)
         ) {
           position = {
             x: listenLayer.modifyPoint.x,
@@ -628,7 +706,11 @@ export default class Layer {
           listenLayer.modifyPoint = null;
         }
 
-        let flag = moveRoad.moveingRoadPoint(draggingItem.vectorId, position, listenLayer.modifyPoint);
+        let flag = moveRoad.moveingRoadPoint(
+          draggingItem.vectorId,
+          position,
+          listenLayer.modifyPoint
+        );
         if (!flag) {
           elementService.hideAll();
         } else {
@@ -665,19 +747,23 @@ export default class Layer {
         elementService.setNewRoad(addRoad.startInfo.position, position);
         elementService.showNewRoad();
 
-        addRoad.setNewRoadPoint('end', position);
+        addRoad.setNewRoadPoint("end", position);
         addRoad.canAdd = addRoad.canAddRoadForEnd(position);
         if (!addRoad.canAdd) {
-          elementService.setNewRoadState('error');
+          elementService.setNewRoadState("error");
         } else {
-          elementService.setNewRoadState('normal');
+          elementService.setNewRoadState("normal");
         }
         elementService.showPoint();
         this.showElementLine(position, eventName);
         break;
       case LayerEvents.MoveCurveRoad:
         needAutoRedraw = true;
-        moveRoad.moveCurveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
+        moveRoad.moveCurveRoad(
+          draggingItem.vectorId,
+          (dx * coordinate.defaultZoom) / coordinate.zoom,
+          (dy * coordinate.defaultZoom) / coordinate.zoom
+        );
         break;
       case LayerEvents.MoveCurveRoadPoint:
         if (!draggingItem || !draggingItem.vectorId) {
@@ -720,13 +806,25 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveEdge:
         if (listenLayer.modifyPoint) {
-          moveRoad.moveCurveEdge(draggingItem.vectorId, listenLayer.modifyPoint.selectIndex, position);
+          moveRoad.moveCurveEdge(
+            draggingItem.vectorId,
+            listenLayer.modifyPoint.selectIndex,
+            position
+          );
         }
         needAutoRedraw = true;
         break;
       case LayerEvents.MoveLine:
         if (draggingItem != null) {
-          moveLine.moveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
+          let flag = moveLine.moveLine(
+            draggingItem.vectorId,
+            (dx * coordinate.defaultZoom) / coordinate.zoom,
+            (dy * coordinate.defaultZoom) / coordinate.zoom
+          );
+          if (!flag) {
+            this.lastX = this.lastX - dx / coordinate.ratio;
+            this.lastY = this.lastY - dy / coordinate.ratio;
+          }
           needAutoRedraw = true;
         }
         break;
@@ -768,16 +866,33 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveLine:
         if (draggingItem != null) {
-          moveLine.moveCurveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
+          moveLine.moveCurveLine(
+            draggingItem.vectorId,
+            (dx * coordinate.defaultZoom) / coordinate.zoom,
+            (dy * coordinate.defaultZoom) / coordinate.zoom
+          );
           needAutoRedraw = true;
         }
         break;
       case LayerEvents.MoveCircle:
         if (draggingItem != null) {
           if (draggingItem.state == -1) {
-            moveCircle.moveFull(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
-          } else if (draggingItem.state == 0 || draggingItem.state == 1 || draggingItem.state == 2 || draggingItem.state == 3) {
-            moveCircle.movePoint(position, draggingItem.vectorId, draggingItem.state);
+            moveCircle.moveFull(
+              draggingItem.vectorId,
+              (dx * coordinate.defaultZoom) / coordinate.zoom,
+              (dy * coordinate.defaultZoom) / coordinate.zoom
+            );
+          } else if (
+            draggingItem.state == 0 ||
+            draggingItem.state == 1 ||
+            draggingItem.state == 2 ||
+            draggingItem.state == 3
+          ) {
+            moveCircle.movePoint(
+              position,
+              draggingItem.vectorId,
+              draggingItem.state
+            );
           } else {
             debugger;
           }
@@ -787,9 +902,22 @@ export default class Layer {
       case LayerEvents.MoveElliptic:
         if (draggingItem != null) {
           if (draggingItem.state == -1) {
-            moveElliptic.moveFull(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
-          } else if (draggingItem.state == 0 || draggingItem.state == 1 || draggingItem.state == 2 || draggingItem.state == 3) {
-            moveElliptic.movePoint(position, draggingItem.vectorId, draggingItem.state);
+            moveElliptic.moveFull(
+              draggingItem.vectorId,
+              (dx * coordinate.defaultZoom) / coordinate.zoom,
+              (dy * coordinate.defaultZoom) / coordinate.zoom
+            );
+          } else if (
+            draggingItem.state == 0 ||
+            draggingItem.state == 1 ||
+            draggingItem.state == 2 ||
+            draggingItem.state == 3
+          ) {
+            moveElliptic.movePoint(
+              position,
+              draggingItem.vectorId,
+              draggingItem.state
+            );
           } else {
             debugger;
           }
@@ -808,14 +936,22 @@ export default class Layer {
           if (draggingItem.state == -1) {
             moveSVG.moveFullSVG(position, draggingItem.vectorId);
           } else {
-            moveSVG.movePoint(position, draggingItem.vectorId, draggingItem.state);
+            moveSVG.movePoint(
+              position,
+              draggingItem.vectorId,
+              draggingItem.state
+            );
           }
         }
         break;
       case LayerEvents.MoveMagnifier:
         needAutoRedraw = true;
         if (draggingItem != null) {
-          moveMagnifier.moveFullMagnifier(position, draggingItem.vectorId, draggingItem.state);
+          moveMagnifier.moveFullMagnifier(
+            position,
+            draggingItem.vectorId,
+            draggingItem.state
+          );
         }
         break;
     }
@@ -891,19 +1027,40 @@ export default class Layer {
             exceptPointId: draggingItem.vectorId,
             exceptRoadIds: point.parent,
           });
-          if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty('linkedRoadPointId')) {
-            moveRoad.moveTo(draggingItem.vectorId, listenLayer.modifyPoint.linkedRoadPointId);
-          } else if (listenLayer.modifyPoint && (listenLayer.modifyPoint.linkedRoadPointIdX || listenLayer.modifyPoint.linkedRoadPointIdY)) {
+          if (
+            listenLayer.modifyPoint &&
+            listenLayer.modifyPoint.hasOwnProperty("linkedRoadPointId")
+          ) {
+            moveRoad.moveTo(
+              draggingItem.vectorId,
+              listenLayer.modifyPoint.linkedRoadPointId
+            );
+          } else if (
+            listenLayer.modifyPoint &&
+            (listenLayer.modifyPoint.linkedRoadPointIdX ||
+              listenLayer.modifyPoint.linkedRoadPointIdY)
+          ) {
             mathUtil.clonePoint(point, listenLayer.modifyPoint);
-          } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty('linkedRoadId')) {
+          } else if (
+            listenLayer.modifyPoint &&
+            listenLayer.modifyPoint.hasOwnProperty("linkedRoadId")
+          ) {
             point = roadPointService.create({
               x: listenLayer.modifyPoint.x,
               y: listenLayer.modifyPoint.y,
             });
-            roadService.splitRoad(listenLayer.modifyPoint.linkedRoadId, point.vectorId, 'start');
+            roadService.splitRoad(
+              listenLayer.modifyPoint.linkedRoadId,
+              point.vectorId,
+              "start"
+            );
             moveRoad.moveTo(draggingItem.vectorId, point.vectorId);
           } else if (moveRoad.splitRoadId != null) {
-            roadService.splitRoad(moveRoad.splitRoadId, draggingItem.vectorId, 'start');
+            roadService.splitRoad(
+              moveRoad.splitRoadId,
+              draggingItem.vectorId,
+              "start"
+            );
           }
           //draggingItem.vectorId所在的墙面与其他墙角相交
           moveRoad.updateForAbsorbRoadPoints();
@@ -977,6 +1134,7 @@ export default class Layer {
         };
         this.uiControl.focusVector = focusItem;
         stateService.setFocusItem(focusItem);
+
         break;
       case LayerEvents.MoveSVG:
         needAutoRedraw = true;
@@ -1045,7 +1203,11 @@ export default class Layer {
         this.history.save();
         break;
       case LayerEvents.AddPoint:
-        if (Settings.selectBasePointId != null && (Settings.selectLocationMode == Constant.angleLocationMode || Settings.selectLocationMode == Constant.allLocationMode)) {
+        if (
+          Settings.selectBasePointId != null &&
+          (Settings.selectLocationMode == Constant.angleLocationMode ||
+            Settings.selectLocationMode == Constant.allLocationMode)
+        ) {
           this.uiControl.showConfirm();
           needAutoRedraw = true;
           elementService.hideAll();
@@ -1058,7 +1220,7 @@ export default class Layer {
         break;
     }
 
-    this.setEventName('mouseUp');
+    this.setEventName("mouseUp");
     stateService.clearDraggingItem();
     if (needAutoRedraw) {
       this.renderer.autoRedraw();
@@ -1068,9 +1230,11 @@ export default class Layer {
   onWheel(e) {
     e.preventDefault();
     const type = e.type;
-    if (type == 'DOMMouseScroll' || type == 'mousewheel') {
+    if (type == "DOMMouseScroll" || type == "mousewheel") {
       // 当在canvas用滚轮滚动时
-      const delta = e.wheelDelta ? (e.wheelDelta / 120) * 20 : (-(e.detail || 0) / 3) * 20;
+      const delta = e.wheelDelta
+        ? (e.wheelDelta / 120) * 20
+        : (-(e.detail || 0) / 3) * 20;
       const zoom = coordinate.zoom + delta;
       let X = e.offsetX || e.layerX;
       let Y = e.offsetY || e.layerY;
@@ -1107,10 +1271,10 @@ export default class Layer {
   //测试用
   onKeydown(e) {
     let focusItem = stateService.getFocusItem();
-    let dir = 'left';
+    let dir = "left";
     if (focusItem) {
-      console.log('键盘(foucus有效):' + e.code);
-      if (e.code == 'Delete') {
+      console.log("键盘(foucus有效):" + e.code);
+      if (e.code == "Delete") {
         //删除
         const road = dataService.getRoad(focusItem.vectorId);
         roadService.subtraRoadFromIntersect(road.startId, focusItem.vectorId);
@@ -1121,105 +1285,142 @@ export default class Layer {
         this.history.save();
       }
       //加宽
-      else if (e.code == 'KeyA') {
+      else if (e.code == "KeyA") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
           roadService.updateForWidth(road.vectorId, road.leftWidth + 50, dir);
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
-          curveRoadService.updateForWidth(road.vectorId, road.leftWidth + 50, dir);
+          curveRoadService.updateForWidth(
+            road.vectorId,
+            road.leftWidth + 50,
+            dir
+          );
         }
 
         this.renderer.autoRedraw();
         this.history.save();
       }
       //变窄
-      else if (e.code == 'KeyB') {
+      else if (e.code == "KeyB") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
           roadService.updateForWidth(road.vectorId, road.leftWidth - 25, dir);
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
-          curveRoadService.updateForWidth(road.vectorId, road.leftWidth - 25, dir);
+          curveRoadService.updateForWidth(
+            road.vectorId,
+            road.leftWidth - 25,
+            dir
+          );
         }
         this.renderer.autoRedraw();
         this.history.save();
       }
       //添加左车道
-      else if (e.code == 'KeyQ') {
+      else if (e.code == "KeyQ") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
-          roadService.updateForAddSubtractLanesCount(focusItem.vectorId, road.leftDrivewayCount + 1, 'left');
+          roadService.updateForAddSubtractLanesCount(
+            focusItem.vectorId,
+            road.leftDrivewayCount + 1,
+            "left"
+          );
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
           curveRoadService.updateForAddSubtractLanesCount(
             road,
             road.leftDrivewayCount + 1, //rightDrivewayCount
-            'left'
+            "left"
           );
         }
         this.renderer.autoRedraw();
         this.history.save();
       }
       //减少左车道
-      else if (e.code == 'KeyW') {
+      else if (e.code == "KeyW") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
-          roadService.updateForAddSubtractLanesCount(focusItem.vectorId, road.leftDrivewayCount - 1, 'left');
+          roadService.updateForAddSubtractLanesCount(
+            focusItem.vectorId,
+            road.leftDrivewayCount - 1,
+            "left"
+          );
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
           curveRoadService.updateForAddSubtractLanesCount(
             road,
             road.leftDrivewayCount - 1, //rightDrivewayCount
-            'left'
+            "left"
           );
         }
         this.renderer.autoRedraw();
         this.history.save();
       }
       //添加右车道
-      else if (e.code == 'KeyE') {
+      else if (e.code == "KeyE") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
-          roadService.updateForAddSubtractLanesCount(focusItem.vectorId, road.rightDrivewayCount + 1, 'right');
+          roadService.updateForAddSubtractLanesCount(
+            focusItem.vectorId,
+            road.rightDrivewayCount + 1,
+            "right"
+          );
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
           curveRoadService.updateForAddSubtractLanesCount(
             road,
             road.rightDrivewayCount + 1, //rightDrivewayCount
-            'right'
+            "right"
           );
         }
         this.renderer.autoRedraw();
         this.history.save();
       }
       //减少右车道
-      else if (e.code == 'KeyR') {
+      else if (e.code == "KeyR") {
         let road = dataService.getRoad(focusItem.vectorId);
         if (road) {
-          roadService.updateForAddSubtractLanesCount(focusItem.vectorId, road.rightDrivewayCount - 1, 'right');
+          roadService.updateForAddSubtractLanesCount(
+            focusItem.vectorId,
+            road.rightDrivewayCount - 1,
+            "right"
+          );
         } else {
           road = dataService.getCurveRoad(focusItem.vectorId);
           curveRoadService.updateForAddSubtractLanesCount(
             road,
             road.rightDrivewayCount - 1, //rightDrivewayCount
-            'right'
+            "right"
           );
         }
         this.renderer.autoRedraw();
         this.history.save();
       }
       //弯路添加控制点
-      else if (e.code == 'KeyT') {
+      else if (e.code == "KeyT") {
         const curveRoad = dataService.getCurveRoad(focusItem.vectorId);
-        let index = mathUtil.getIndexForCurvesPoints(this.mousePosition, curveRoad.points);
+        let index = mathUtil.getIndexForCurvesPoints(
+          this.mousePosition,
+          curveRoad.points
+        );
         if (index != -1) {
           curveRoadService.addCPoint(curveRoad, this.mousePosition, index);
         } else {
-          const dis1 = mathUtil.getDistance(curveRoad.points[0], this.mousePosition);
-          const dis2 = mathUtil.getDistance(curveRoad.points[curveRoad.points.length - 1], this.mousePosition);
+          const dis1 = mathUtil.getDistance(
+            curveRoad.points[0],
+            this.mousePosition
+          );
+          const dis2 = mathUtil.getDistance(
+            curveRoad.points[curveRoad.points.length - 1],
+            this.mousePosition
+          );
           if (dis1 > dis2) {
-            curveRoadService.addCPoint(curveRoad, this.mousePosition, curveRoad.points.length - 2);
+            curveRoadService.addCPoint(
+              curveRoad,
+              this.mousePosition,
+              curveRoad.points.length - 2
+            );
           } else {
             curveRoadService.addCPoint(curveRoad, this.mousePosition, 1);
           }
@@ -1228,7 +1429,7 @@ export default class Layer {
         this.history.save();
       }
       //弯路删除控制点
-      else if (e.code == 'KeyY') {
+      else if (e.code == "KeyY") {
         const curvePoint = dataService.getCurveRoadPoint(focusItem.vectorId);
         const curveRoad = dataService.getCurveRoad(curvePoint.parent);
         curveRoadService.subCPoint(curveRoad, curvePoint.getIndex());
@@ -1236,14 +1437,14 @@ export default class Layer {
         this.history.save();
       }
     } else {
-      console.log('键盘(foucus无效):' + e.code);
+      console.log("键盘(foucus无效):" + e.code);
     }
   }
 
   setEventName(eventType) {
     let eventName = stateService.getEventName();
 
-    if (eventType == 'mouseDown') {
+    if (eventType == "mouseDown") {
       if (eventName == null) {
         const selectItem = stateService.getSelectItem();
         if (selectItem == null) {
@@ -1282,7 +1483,7 @@ export default class Layer {
           stateService.setEventName(LayerEvents.MoveSVG);
         }
       }
-    } else if (eventType == 'mouseUp') {
+    } else if (eventType == "mouseUp") {
       if (eventName == LayerEvents.AddingRoad) {
         if (Settings.isMobile) {
           stateService.clearEventName();
@@ -1310,7 +1511,8 @@ export default class Layer {
       } else if (
         eventName == LayerEvents.AddPoint &&
         Settings.selectBasePointId != null &&
-        (Settings.selectLocationMode == Constant.angleLocationMode || Settings.selectLocationMode == Constant.allLocationMode)
+        (Settings.selectLocationMode == Constant.angleLocationMode ||
+          Settings.selectLocationMode == Constant.allLocationMode)
       ) {
       } else {
         stateService.clearEventName();
@@ -1327,7 +1529,10 @@ export default class Layer {
 
   stopAddVector() {
     let eventName = stateService.getEventName();
-    if (eventName != LayerEvents.AddingRoad && eventName != LayerEvents.AddingLine) {
+    if (
+      eventName != LayerEvents.AddingRoad &&
+      eventName != LayerEvents.AddingLine
+    ) {
       stateService.clearEventName();
     } else if (eventName == LayerEvents.AddingRoad) {
       stateService.setEventName(LayerEvents.AddRoad);
@@ -1462,23 +1667,57 @@ export default class Layer {
     let otherPoint1 = null;
     let otherPoint2 = null;
     if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdX) {
-      otherPoint1 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdX);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurveRoadPointIdX) {
-      otherPoint1 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdX);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdX) {
-      otherPoint1 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdX);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdX) {
-      otherPoint1 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdX);
+      otherPoint1 = dataService.getRoadPoint(
+        listenLayer.modifyPoint.linkedRoadPointIdX
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedCurveRoadPointIdX
+    ) {
+      otherPoint1 = dataService.getCurveRoadPoint(
+        listenLayer.modifyPoint.linkedCurvePointIdX
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedPointIdX
+    ) {
+      otherPoint1 = dataService.getPoint(
+        listenLayer.modifyPoint.linkedPointIdX
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedCurvePointIdX
+    ) {
+      otherPoint1 = dataService.getCurvePoint(
+        listenLayer.modifyPoint.linkedCurvePointIdX
+      );
     }
 
     if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdY) {
-      otherPoint2 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdY);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
-      otherPoint2 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdY);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdY) {
-      otherPoint2 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdY);
-    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
-      otherPoint2 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdY);
+      otherPoint2 = dataService.getRoadPoint(
+        listenLayer.modifyPoint.linkedRoadPointIdY
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedCurvePointIdY
+    ) {
+      otherPoint2 = dataService.getCurveRoadPoint(
+        listenLayer.modifyPoint.linkedCurvePointIdY
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedPointIdY
+    ) {
+      otherPoint2 = dataService.getPoint(
+        listenLayer.modifyPoint.linkedPointIdY
+      );
+    } else if (
+      listenLayer.modifyPoint &&
+      listenLayer.modifyPoint.linkedCurvePointIdY
+    ) {
+      otherPoint2 = dataService.getCurvePoint(
+        listenLayer.modifyPoint.linkedCurvePointIdY
+      );
     }
 
     let otherPoint = {};
@@ -1488,7 +1727,7 @@ export default class Layer {
     }
     if (otherPoint2) {
       otherPoint.y = otherPoint2.y;
-      if (!otherPoint.hasOwnProperty('x')) {
+      if (!otherPoint.hasOwnProperty("x")) {
         otherPoint.x = otherPoint2.x;
       }
     }

+ 16 - 10
src/graphic/ListenLayer.js

@@ -12,9 +12,9 @@ import { draw } from "./Renderer/Draw.js";
 import { edgeService } from "./Service/EdgeService";
 import VectorCategory from "./enum/VectorCategory";
 import LayerEvents from "./enum/LayerEvents";
-
+import Style from "./CanvasStyle";
 export default class ListenLayer {
-  constructor() {
+  constructor(canvas, newsletter, graphicState) {
     this.modifyPoint = null;
   }
 
@@ -302,8 +302,9 @@ export default class ListenLayer {
 
       const line = dataService.getLine(lineId);
       if (
-        line.getCategory() == VectorCategory.Line.PositionLine ||
-        line.getCategory() == VectorCategory.Line.GuidePositionLine
+        line.getCategory() == VectorCategory.Line.GuidePositionLine ||
+        (line.getCategory() == VectorCategory.Line.PositionLine &&
+          line.getLocationMode() != Constant.angleLocationMode)
       ) {
         continue;
       }
@@ -978,7 +979,7 @@ export default class ListenLayer {
           y: magnifier.popPosition.y / coordinate.ratio,
         });
         distance = this.getDistance(position, popPosition);
-        if (distance < 100) {
+        if (distance < Style.Magnifier.target.radius) {
           //圆圈的半径
           magnifierInfo = {
             magnifierId: magnifierId,
@@ -1286,11 +1287,16 @@ export default class ListenLayer {
         this.modifyPoint.index
       );
     } else if (this.modifyPoint.magnifierId) {
-      stateService.setSelectItem(
-        this.modifyPoint.magnifierId,
-        VectorType.Magnifier,
-        this.modifyPoint.index
-      );
+      if (this.modifyPoint.index == 0) {
+        //点击隐藏的放大镜不显示
+        stateService.setSelectItem(
+          this.modifyPoint.magnifierId,
+          VectorType.Magnifier,
+          this.modifyPoint.index
+        );
+      } else {
+        stateService.setSelectState(this.modifyPoint.index);
+      }
     } else if (this.modifyPoint.linkedEdgeId) {
       stateService.setSelectItem(
         this.modifyPoint.linkedEdgeId,

+ 3 - 0
src/graphic/Load.js

@@ -88,6 +88,9 @@ export default class Load {
           if (dataLocal.lines[key].value) {
             line.setValue(dataLocal.lines[key].value);
           }
+          if (dataLocal.lines[key].locationMode) {
+            line.setLocationMode(dataLocal.lines[key].locationMode);
+          }
           line.setDisplay(dataLocal.lines[key].display);
           if (line.getCategory() == VectorCategory.Line.BaseLine) {
             Settings.baseLineId = key;

+ 2 - 2
src/graphic/Renderer/Draw.js

@@ -141,7 +141,7 @@ const help = {
   },
   getRealDistance(p1, p2) {
     return (
-      Math.round(mathUtil.getDistance(p1, p2) * coordinate.res * 100) / 100
+      Math.round((mathUtil.getDistance(p1, p2) * coordinate.res * 100) / coordinate.ratio) / 100
     );
   },
   getPerpendicularPoint(p1, p2, p3, d) {
@@ -546,7 +546,7 @@ export default class Draw {
       radius,
     });
     const pt = coordinate.getScreenXY(vector.position);
-    vector.setPopPosition();
+    // vector.setPopPosition();
     const target = {
       x: vector.popPosition.x,
       y: vector.popPosition.y,

+ 2 - 2
src/graphic/Service/CurveEdgeService.js

@@ -5,8 +5,8 @@ import { mathUtil } from "../Util/MathUtil.js";
 export default class CurveEdgeService {
   constructor() {}
 
-  create(start, end, vectorId, parentId) {
-    let curveEdge = new CurveRoadEdge(start, end, vectorId, parentId);
+  create(start, end, vectorId, parentId, points) {
+    let curveEdge = new CurveRoadEdge(start, end, vectorId, parentId, points);
     this.setCurves(curveEdge);
     dataService.addCurveRoadEdge(curveEdge);
     return curveEdge;

+ 9 - 0
src/graphic/Service/DataService.js

@@ -183,6 +183,15 @@ export class DataService {
     }
   }
 
+  deletePointParent(pointId, lineId) {
+    if (pointId && lineId) {
+      let point = this.getPoint(pointId);
+      if (point) {
+        delete point.parent[lineId];
+      }
+    }
+  }
+
   //圆圈
   getCircles() {
     return this.vectorData.circles;

+ 11 - 5
src/graphic/Service/StateService.js

@@ -1,7 +1,7 @@
-import VectorType from "../enum/VectorType.js";
-import SelectState from "../enum/SelectState.js";
-import VectorCategory from "../enum/VectorCategory.js";
-import { dataService } from "./DataService.js";
+import VectorType from '../enum/VectorType.js';
+import SelectState from '../enum/SelectState.js';
+import VectorCategory from '../enum/VectorCategory.js';
+import { dataService } from './DataService.js';
 
 export default class StateService {
   constructor() {
@@ -38,9 +38,15 @@ export default class StateService {
       const point = dataService.getPoint(vectorId);
       this.selectItem.category = point.getCategory();
     }
-    console.log("选中的元素:" + JSON.stringify(this.selectItem));
+    console.log('选中的元素:' + JSON.stringify(this.selectItem));
   }
+  setSelectState(state) {
+    if (!state || !this.selectItem) {
+      return;
+    }
 
+    this.selectItem.state = state;
+  }
   getSelectItem() {
     return this.selectItem;
   }

+ 3 - 2
src/graphic/Service/UIService.js

@@ -7,6 +7,7 @@ import UIEvents from "../enum/UIEvents.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import Constant from "../Constant.js";
 import VectorStyle from "../enum/VectorStyle.js";
+import VectorWeight from "../enum/VectorWeight.js";
 import RoadTemplate from "../enum/RoadTemplate.js";
 import RoadStructure from "../enum/RoadStructure.js";
 
@@ -122,9 +123,9 @@ export default class UIService {
       return true;
     } else if (ui == VectorStyle.Greenbelt) {
       return true;
-    } else if (ui == VectorStyle.Bold) {
+    } else if (ui == VectorWeight.Bold) {
       return true;
-    } else if (ui == VectorStyle.Thinning) {
+    } else if (ui == VectorWeight.Thinning) {
       return true;
     } else {
       return false;

+ 1 - 0
src/graphic/enum/VectorCategory.js

@@ -8,6 +8,7 @@ const VectorCategory = {
     GuideLine: "GuideLine",
     PositionLine: "PositionLine", //定位线。基准点与待测点相连的线,或者与待测基准点相连的线
     GuidePositionLine: "GuidePositionLine", //定位辅助线
+    ExtendedPositionLine: "ExtendedPositionLine", //定位延长线
   },
   Point: {
     BasePoint: "BasePoint", //基准点

+ 3 - 3
src/graphic/enum/VectorStyle.js

@@ -15,8 +15,8 @@ const VectorStyle = {
   // 绿化带
   Greenbelt: "Greenbelt",
   // 加粗
-  Bold: "Bold",
-  // 变细
-  Thinning: "Thinning",
+  // Bold: "Bold",
+  // // 变细
+  // Thinning: "Thinning",
 };
 export default VectorStyle;

+ 8 - 0
src/graphic/enum/VectorWeight.js

@@ -0,0 +1,8 @@
+import UIEvents from './UIEvents';
+const VectorWight = {
+  // 加粗
+  Bold: 'Bold',
+  // 变细
+  Thinning: 'Thinning',
+};
+export default VectorWight;

+ 0 - 1
src/hook/custom/setup.ts

@@ -72,7 +72,6 @@ const magnifierSetting = (sdk: SDK) => {
     (magnifierMode, oldVal) => {
       if (magnifierMode) {
         fullViewStack.push(ref("scene"));
-        console.error("111")
         sdk.scene.openMagnifier();
       } else if (oldVal) {
         sdk.scene.closeMagnifier();

+ 0 - 1
src/hook/useEdit.ts

@@ -129,7 +129,6 @@ export function useDesaveAssist<T extends object>(
     try {
       await setting.save(args)
     } catch (e) {
-      console.error('111', e)
       // recovery && recovery()
       throw e
     }

+ 0 - 1
src/hook/useGraphic.ts

@@ -21,7 +21,6 @@ const newsletter = ref<{
 
 const changeIndex = ref(0)
 export const changeStore = () => {
-  console.error("111")
   changeIndex.value++
 }
 export const useChange = (fn: () => void) => {

+ 3 - 1
src/views/graphic/geos/arrow.vue

@@ -24,7 +24,8 @@ import VectorCategory from "@/graphic/enum/VectorCategory";
 const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getLine(props.geo.vectorId))
 const color = ref("#000000")
-const type = ref("SingleArrowLine")
+const type = ref(props.geo.category || "SingleArrowLine")
+console.log(type.value)
 useChange(() => {
   color.value = vector.value.color
   color.value = vector.value.category
@@ -40,6 +41,7 @@ const syncVector = ([color, type]) => {
 
 watch(() => [color.value, type.value], debounce(syncVector, 500))
 
+
 const typeMenus = ref<UnwrapRef<typeof menus>>()
 const menus = ref([
   {

+ 10 - 9
src/views/graphic/geos/normalLine.vue

@@ -12,6 +12,7 @@ import GeoActions from "@/graphic/enum/GeoActions"
 import {UITypeExtend} from "@/views/graphic/menus";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorStyle from "@/graphic/enum/VectorStyle";
+import VectorWeight from "@/graphic/enum/VectorWeight";
 import VectorCategory from "@/graphic/enum/VectorCategory";
 
 
@@ -26,40 +27,40 @@ const clickHandlerFactory = (key) => {
 const lineTypeMenu = [
   {
     key: VectorStyle.SingleSolidLine,
-    icon: "line",
+    icon: "line_sf",
     text: "单实线",
     onClick: clickHandlerFactory(VectorStyle.SingleSolidLine)
   },
   {
     key: VectorStyle.SingleDashedLine,
-    icon: "line",
+    icon: "line_sd",
     text: "单虚线",
     onClick: clickHandlerFactory(VectorStyle.SingleDashedLine)
   },
   {
     key: VectorStyle.DoubleSolidLine,
-    icon: "line",
+    icon: "line_df",
     text: "双实线",
     onClick: clickHandlerFactory(VectorStyle.DoubleSolidLine)
   },
   {
     key: VectorStyle.DoubleDashedLine,
-    icon: "line",
+    icon: "line_dd",
     text: "双虚线",
     onClick: clickHandlerFactory(VectorStyle.DoubleDashedLine)
   },
-  {key: VectorStyle.BrokenLine, icon: "line", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
+  {key: VectorStyle.BrokenLine, icon: "line_broken", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
   {
     key: VectorStyle.PointDrawLine,
-    icon: "line",
+    icon: "line_dot",
     text: "点画线",
     onClick: clickHandlerFactory(VectorStyle.PointDrawLine)
   },
-  {key: VectorStyle.Greenbelt, icon: "line", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
+  {key: VectorStyle.Greenbelt, icon: "treelawn", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
 ]
 const lineWidthMenu = [
-  {key: VectorStyle.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(VectorStyle.Bold)},
-  {key: VectorStyle.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(VectorStyle.Thinning)},
+  {key: VectorWeight.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(VectorWeight.Bold)},
+  {key: VectorWeight.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(VectorWeight.Thinning)},
 ]
 
 const appendMenus = props.geo.category === VectorCategory.Line.NormalLine

+ 27 - 17
src/views/graphic/geos/roadEdge.vue

@@ -12,6 +12,7 @@ import GeoActions from "@/graphic/enum/GeoActions"
 import {UITypeExtend} from "@/views/graphic/menus";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorStyle from "@/graphic/enum/VectorStyle";
+import VectorWeight from "@/graphic/enum/VectorWeight";
 
 
 const props = defineProps<{ geo: FocusVector }>()
@@ -25,40 +26,56 @@ const clickHandlerFactory = (key) => {
 const lineTypeMenu = [
   {
     key: VectorStyle.SingleSolidLine,
-    icon: "line",
+    icon: "line_sf",
     text: "单实线",
     onClick: clickHandlerFactory(VectorStyle.SingleSolidLine)
   },
   {
     key: VectorStyle.SingleDashedLine,
-    icon: "line",
+    icon: "line_sd",
     text: "单虚线",
     onClick: clickHandlerFactory(VectorStyle.SingleDashedLine)
   },
   {
     key: VectorStyle.DoubleSolidLine,
-    icon: "line",
+    icon: "line_df",
     text: "双实线",
     onClick: clickHandlerFactory(VectorStyle.DoubleSolidLine)
   },
   {
     key: VectorStyle.DoubleDashedLine,
-    icon: "line",
+    icon: "line_dd",
     text: "双虚线",
     onClick: clickHandlerFactory(VectorStyle.DoubleDashedLine)
   },
-  {key: VectorStyle.BrokenLine, icon: "line", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
+  {key: VectorStyle.BrokenLine, icon: "line_broken", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
   {
     key: VectorStyle.PointDrawLine,
-    icon: "line",
+    icon: "line_dot",
     text: "点画线",
     onClick: clickHandlerFactory(VectorStyle.PointDrawLine)
   },
-  {key: VectorStyle.Greenbelt, icon: "line", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
+  {key: VectorStyle.Greenbelt, icon: "treelawn", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
 ]
 const lineWidthMenu = [
-  {key: VectorStyle.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(VectorStyle.Bold)},
-  {key: VectorStyle.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(VectorStyle.Thinning)},
+  {
+    key: VectorWeight.Bold,
+    icon: 'l_thick',
+    text: "宽度",
+    onClick: () => {
+      clickHandlerFactory(VectorWeight.Bold)()
+      menus.value[1] = lineWidthMenu[1]
+    }
+  },
+  {
+    key: VectorWeight.Thinning,
+    icon: 'l_thin',
+    text: "宽度",
+    onClick: () => {
+      clickHandlerFactory(VectorWeight.Thinning)()
+      menus.value[1] = lineWidthMenu[0]
+    }
+  },
 ]
 
 const appendMenus = props.geo.type === VectorType.CurveRoadEdge
@@ -87,14 +104,7 @@ const menus = ref([
       childMenus.value = toRaw(childMenus.value) === lineTypeMenu ? null : lineTypeMenu
     }
   },
-  {
-    key: UITypeExtend.width,
-    text: "宽度",
-    icon: 'l_thick',
-    onClick() {
-      childMenus.value = toRaw(childMenus.value) === lineWidthMenu ? null : lineWidthMenu
-    }
-  },
+  lineWidthMenu[0],
   ...appendMenus
 ])
 

+ 148 - 156
src/views/graphic/menus.ts

@@ -1,126 +1,133 @@
-import {uiType, UIType, graphicState} from "@/hook/useGraphic";
-import {
-  findMenuByAttr,
-  generateByMenus as generateByMenusRaw,
-  generateMixMenus as generateMixMenusRaw
-} from '@/utils/menus'
-import Message from "@/components/base/components/message/message.vue";
-import RoadStructure from '@/graphic/enum/RoadStructure'
-import RoadTemplate from '@/graphic/enum/RoadTemplate'
-import {computed} from "vue";
-import { mount } from '@/components/base/utils/componentHelper'
-import Setting from "@/views/graphic/setting.vue";
+import { uiType, UIType, graphicState } from '@/hook/useGraphic';
+import { findMenuByAttr, generateByMenus as generateByMenusRaw, generateMixMenus as generateMixMenusRaw } from '@/utils/menus';
+import Message from '@/components/base/components/message/message.vue';
+import RoadStructure from '@/graphic/enum/RoadStructure';
+import RoadTemplate from '@/graphic/enum/RoadTemplate';
+import { computed } from 'vue';
+import { mount } from '@/components/base/utils/componentHelper';
+import Setting from '@/views/graphic/setting.vue';
 
 export enum Mode {
   Road,
-  Photo
+  Photo,
 }
 
 export const UITypeExtend = {
-  structure: "structure",
-  template: "template",
-  measure: "measure",
-  road: "__road",
-  image: "__image",
-  line: "__line",
-  photo: "photo",
-  setup: "setup",
-  lineType: "lineType",
-  width: "width",
-  lock: "lock",
-  basemap: "Basemap"
-}
+  structure: 'structure',
+  template: 'template',
+  measure: 'measure',
+  road: '__road',
+  image: '__image',
+  line: '__line',
+  photo: 'photo',
+  setup: 'setup',
+  lineType: 'lineType',
+  width: 'width',
+  lock: 'lock',
+  basemap: 'Basemap',
+};
 
 export type MenuRaw = {
-  key: string,
-  text: string,
-  onClick?: (data: MenuRaw) => void,
-  icon?: string,
-  children?: MenusRaw
-  extend?: MenusRaw
-}
-export type MenusRaw = Array<MenuRaw>
-
+  key: string;
+  text: string;
+  onClick?: (data: MenuRaw) => void;
+  icon?: string;
+  children?: MenusRaw;
+  extend?: MenusRaw;
+};
+export type MenusRaw = Array<MenuRaw>;
 
 export const structureMenusRaw = [
-  { key: RoadStructure.BranchRoad, icon: "jg_zl-1", text: "支路" },
-  { key: RoadStructure.NarrowRoad, icon: "jg_zl", text: "窄路" },
-  { key: RoadStructure.ShoulderRoad, icon: "jg_lj", text: "路肩" },
-  { key: RoadStructure.ZebraCrossing, icon: "jg_bmx", text: "斑马线" },
-  { key: RoadStructure.Bridge, icon: "jg_q", text: "桥" },
-  { key: RoadStructure.Tunnel, icon: "jg_sd", text: "隧道" },
-  { key: RoadStructure.Sidewalk, icon: "jg_rxd", text: "人行道" },
-  { key: RoadStructure.ConstructionSection, icon: "jg_sgld", text: "施工路段" },
-  { key: RoadStructure.Downhill, icon: "jg_road_u", text: "下坡" },
-  { key: RoadStructure.Uphill, icon: "jg_sp", text: "上坡" },
-  { key: RoadStructure.RoadsideGutter, icon: "jg_lpsg", text: "路边水沟" },
-  { key: RoadStructure.RoadsAndRails, icon: "jg_dltlpjk", text: "道路与铁..." },
-  { key: RoadStructure.FireHydrantWell, icon: "jg_xfsj", text: "消火栓井" },
-  { key: RoadStructure.Gullies, icon: "jg_ysk", text: "雨水口" },
-  { key: RoadStructure.RoadPotholes, icon: "jg_lmak", text: "路面凹坑" },
-  { key: RoadStructure.ProtrudingRoad, icon: "jg_lmtcbf", text: "路面凸出..." },
-  { key: RoadStructure.WaterOnTheRoad, icon: "jg_lmjs", text: "路面积水" },
-]
+  { key: RoadStructure.BranchRoad, icon: 'jg_zl-1', text: '支路' },
+  { key: RoadStructure.NarrowRoad, icon: 'jg_zl', text: '窄路' },
+  { key: RoadStructure.ShoulderRoad, icon: 'jg_lj', text: '路肩' },
+  { key: RoadStructure.ZebraCrossing, icon: 'jg_bmx', text: '斑马线' },
+  { key: RoadStructure.Bridge, icon: 'jg_q', text: '桥' },
+  { key: RoadStructure.Tunnel, icon: 'jg_sd', text: '隧道' },
+  { key: RoadStructure.Sidewalk, icon: 'jg_rxd', text: '人行道' },
+  { key: RoadStructure.ConstructionSection, icon: 'jg_sgld', text: '施工路段' },
+  { key: RoadStructure.Downhill, icon: 'jg_road_u', text: '下坡' },
+  { key: RoadStructure.Uphill, icon: 'jg_sp', text: '上坡' },
+  { key: RoadStructure.RoadsideGutter, icon: 'jg_lpsg', text: '路边水沟' },
+  { key: RoadStructure.RoadsAndRails, icon: 'jg_dltlpjk', text: '道路与铁...' },
+  { key: RoadStructure.FireHydrantWell, icon: 'jg_xfsj', text: '消火栓井' },
+  { key: RoadStructure.Gullies, icon: 'jg_ysk', text: '雨水口' },
+  { key: RoadStructure.RoadPotholes, icon: 'jg_lmak', text: '路面凹坑' },
+  { key: RoadStructure.ProtrudingRoad, icon: 'jg_lmtcbf', text: '路面凸出...' },
+  { key: RoadStructure.WaterOnTheRoad, icon: 'jg_lmjs', text: '路面积水' },
+];
 
 export const templateMenusRaw = [
-  { key: RoadTemplate.SBend, text: "s型弯路" },
-  { key: RoadTemplate.TJunction, text: "丁字路口" },
-  { key: RoadTemplate.FiveForks, text: "五岔路口" },
-  { key: RoadTemplate.ExitRamp, text: "出口匝道" },
-  { key: RoadTemplate.Crossroads, text: "十字路口" },
-  { key: RoadTemplate.NationalHighwayShoulder, text: "国道(路肩)" },
-  { key: RoadTemplate.IndoorSection, text: "室内路段" },
-  { key: RoadTemplate.Bend, text: "弯道" },
-  { key: RoadTemplate.SharpCurve, text: "急转弯道" },
-  { key: RoadTemplate.SixForkIntersection, text: "六岔路口" },
-  { key: RoadTemplate.WideNarrowRoad, text: "宽变窄路段" },
-  { key: RoadTemplate.Corner, text: "直角弯道" },
-  { key: RoadTemplate.ImportSmashedRoad, text: "进口砸到" },
-  { key: RoadTemplate.HighSpeedTollBooth, text: "高速收费站" },
-  { key: RoadTemplate.HighSpeedHarbor, text: "高速港湾" },
-  { key: RoadTemplate.HighwaySection, text: "高速路段" }
-]
+  { key: RoadTemplate.SBend, icon: 'mb_sxwl', text: 's型弯路' },
+  { key: RoadTemplate.TJunction, icon: 'mb_dzlk', text: '丁字路口' },
+  { key: RoadTemplate.FiveForks, icon: 'mb_wclk', text: '五岔路口' },
+  { key: RoadTemplate.ExitRamp, icon: 'mb_ckzd', text: '出口匝道' },
+  { key: RoadTemplate.Crossroads, icon: 'mb_szlk', text: '十字路口' },
+  { key: RoadTemplate.NationalHighwayShoulder, icon: 'mb_gdlj', text: '国道(路肩)' },
+  { key: RoadTemplate.IndoorSection, icon: 'mb_snld', text: '室内路段' },
+  { key: RoadTemplate.Bend, icon: 'mb_wd', text: '弯道' },
+  { key: RoadTemplate.SharpCurve, icon: 'mb_jzwd', text: '急转弯道' },
+  { key: RoadTemplate.SixForkIntersection, icon: 'mb_lclk', text: '六岔路口' },
+  { key: RoadTemplate.WideNarrowRoad, icon: 'mb_kbzld', text: '宽变窄路段' },
+  { key: RoadTemplate.Corner, icon: 'mb_zjwd', text: '直角弯道' },
+  { key: RoadTemplate.ImportSmashedRoad, icon: 'mb_jkzd', text: '进口匝道' },
+  { key: RoadTemplate.HighSpeedTollBooth, icon: 'mb_gssfz', text: '高速收费站' },
+  { key: RoadTemplate.HighSpeedHarbor, icon: 'mb_gsgw', text: '高速港湾' },
+  { key: RoadTemplate.HighwaySection, icon: 'mb_gsld', text: '高速路段' },
+];
 
 export const measureMenusRaw = [
   {
     key: UIType.BaseLine,
-    icon: "line",
-    text: "基准线",
-    disabled: computed(() => graphicState.value.existsBaseLine)
+    icon: 'line',
+    text: '基准线',
+    disabled: computed(() => graphicState.value.existsBaseLine),
+  },
+  { key: UIType.BasePoint, text: '基准点', icon: 'point' },
+  {
+    key: UIType.NormalLocationMode,
+    text: '自由测量',
+    icon: 'measure_f',
+    onClick(data) {
+      if (graphicState.value.canAllLocationMode) {
+        uiType.change(data.key);
+      } else {
+        Message.success({ msg: '请添加基准线及基准点后再执行此操作', time: 3000 });
+      }
+    },
   },
-  { key: UIType.BasePoint, text: "基准点", icon: "point", },
-  { key: UIType.NormalLocationMode, text: "自由测量", icon: "measure_f" },
   {
     key: UIType.AngleLocationMode,
-    text: "直角定位法",
-    icon: "measure_r",
+    text: '直角定位法',
+    icon: 'measure_r',
     onClick(data) {
+      console.error(graphicState.value.canAllLocationMode);
       if (graphicState.value.canAllLocationMode) {
-        uiType.change(data.key)
+        uiType.change(data.key);
       } else {
-        Message.success({ msg: "请添加基准线及基准点后再执行此操作", time: 3000 })
+        Message.success({ msg: '请添加基准线及基准点后再执行此操作', time: 3000 });
       }
-    }
+    },
   },
   {
     key: UIType.AllLocationMode,
-    text: "综合定位法",
-    icon: "measure_c",
+    text: '综合定位法',
+    icon: 'measure_c',
     onClick(data) {
       if (graphicState.value.canAllLocationMode) {
-        uiType.change(data.key)
+        uiType.change(data.key);
       } else {
-        Message.success({ msg: "请添加基准线及基准点后再执行此操作", time: 3000 })
+        Message.success({ msg: '请添加基准线及基准点后再执行此操作', time: 3000 });
       }
-    }
+    },
   },
-]
+];
 
 export const mainMenusRaw: MenusRaw = [
   {
     key: UIType.Line,
-    text: "画线",
-    icon: "line_d",
+    text: '画线',
+    icon: 'line_d',
     // children: [
     //   {
     //     key: UIType.Line,
@@ -136,100 +143,85 @@ export const mainMenusRaw: MenusRaw = [
   },
   {
     key: UITypeExtend.road,
-    text: "道路",
-    icon: "road",
+    text: '道路',
+    icon: 'road',
     children: [
-      { key: UIType.OneEdgeOneLanRoad, icon: "road_ss", text: "" },
-      { key: UIType.OneEdgeTwoLanRoad, icon: "road_sd", text: "" },
-      { key: UIType.OneEdgeThreeLanRoad, icon: "road_st", text: "" },
-      { key: UIType.TwoEdgeOneLanRoad, icon: "road_ds", text: "" },
-      { key: UIType.TwoEdgeTwoLanRoad, icon: "road_dd", text: "" },
-      { key: UIType.TwoEdgeThreeLanRoad, icon: "road_dt", text: "" },
-      { key: UIType.CurveRoad, icon: "road_wl", text: "" },
-      { key: UITypeExtend.structure, icon: "r_template", text: "道路结构", extend: structureMenusRaw },
-      { key: UITypeExtend.template, icon: "r_structure", text: "道路模板", extend: templateMenusRaw },
-    ]
-  }, {
+      { key: UIType.OneEdgeOneLanRoad, icon: 'road_ss', text: '' },
+      { key: UIType.OneEdgeTwoLanRoad, icon: 'road_sd', text: '' },
+      { key: UIType.OneEdgeThreeLanRoad, icon: 'road_st', text: '' },
+      { key: UIType.TwoEdgeOneLanRoad, icon: 'road_ds', text: '' },
+      { key: UIType.TwoEdgeTwoLanRoad, icon: 'road_dd', text: '' },
+      { key: UIType.TwoEdgeThreeLanRoad, icon: 'road_dt', text: '' },
+      { key: UIType.CurveRoad, icon: 'road_wl', text: '' },
+      { key: UITypeExtend.structure, icon: 'r_template', text: '道路结构', extend: structureMenusRaw },
+      { key: UITypeExtend.template, icon: 'r_structure', text: '道路模板', extend: templateMenusRaw },
+    ],
+  },
+  {
     key: UITypeExtend.image,
-    text: "图例",
-    icon: "road",
+    text: '图例',
+    icon: 'road',
     // children: [
     //   { key: UIType.BusPlane, text: "客车平面图" }
     // ]
   },
   {
     key: UITypeExtend.measure,
-    text: "测量",
+    text: '测量',
     children: measureMenusRaw,
-    icon: "measure"
+    icon: 'measure',
   },
-  { key: UIType.Text, text: "文字", icon: "text" },
-  { key: UIType.Magnifier, text: "放大镜", icon: "magnify_g" },
+  { key: UIType.Text, text: '文字', icon: 'text' },
+  { key: UIType.Magnifier, text: '放大镜', icon: 'magnify_g' },
 
   // { key: UITypeExtend.photo, text: "照片库" },
   {
     key: UITypeExtend.setup,
-    icon: "setting",
-    text: "设置",
+    icon: 'setting',
+    text: '设置',
     onClick() {
-      const { destroy } = mount(
-        Setting,
-        {
-          props: {
-            close() {
-              destroy();
-            }
-          }
-        } as any
-      )
-    }
+      const { destroy } = mount(Setting, {
+        props: {
+          close() {
+            destroy();
+          },
+        },
+      } as any);
+    },
   },
 ];
 
 export const photoMenusRaw: MenusRaw = [
-  { key: UIType.Text, text: "文字", icon: "text" },
-  { key: UIType.Circle, text: "圈出", icon: "circle" },
-  { key: UIType.SingleArrow, text: "箭头", icon: "arrows" },
-  { key: UIType.Magnifier, text: "放大镜", icon: "magnify_g" },
-]
-
+  { key: UIType.Text, text: '文字', icon: 'text' },
+  { key: UIType.Circle, text: '圈出', icon: 'circle' },
+  { key: UIType.SingleArrow, text: '箭头', icon: 'arrows' },
+  { key: UIType.Magnifier, text: '放大镜', icon: 'magnify_g' },
+];
 
 export const headActionMenuRaw = [
-  { key: UIType.GoBack, text: "回退", icon: "backout" },
-  { key: UIType.GoAhead, text: "前进", icon: "redo" },
-  { key: UIType.Clear, text: "清除", icon: "reset" },
-  { key: UIType.BackImageChange, text: "底图开关", icon: "map" },
-]
-
-export const focusMenuRaw : { [key in string]: MenusRaw } = {
-}
+  { key: UIType.GoBack, text: '回退', icon: 'backout' },
+  { key: UIType.GoAhead, text: '前进', icon: 'redo' },
+  { key: UIType.Clear, text: '清除', icon: 'reset' },
+  { key: UIType.BackImageChange, text: '底图开关', icon: 'map' },
+];
 
+export const focusMenuRaw: { [key in string]: MenusRaw } = {};
 
-export const generateByMenus = <T extends MenuRaw>(
-  generateFn: (men: MenuRaw) => T,
-  mainMenus: MenusRaw = mainMenusRaw
-) => generateByMenusRaw(generateFn, mainMenus);
+export const generateByMenus = <T extends MenuRaw>(generateFn: (men: MenuRaw) => T, mainMenus: MenusRaw = mainMenusRaw) => generateByMenusRaw(generateFn, mainMenus);
 
-export const findMainMenuByAttr = (
-  value: MenusRaw,
-  attr = "extend" as const,
-  mainMenus = mainMenusRaw,
-) => findMenuByAttr(value, attr, mainMenus)
+export const findMainMenuByAttr = (value: MenusRaw, attr = 'extend' as const, mainMenus = mainMenusRaw) => findMenuByAttr(value, attr, mainMenus);
 
-export const generateMixMenus = <T extends {}, K extends keyof MenuRaw>(
-  childKey: K,
-  generateFn: (men: MenuRaw) => T,
-  mainMenus: MenusRaw = mainMenusRaw
-) => generateMixMenusRaw(
-  childKey,
-  generateFn,
-  mainMenus,
-    menu => {
+export const generateMixMenus = <T extends {}, K extends keyof MenuRaw>(childKey: K, generateFn: (men: MenuRaw) => T, mainMenus: MenusRaw = mainMenusRaw) =>
+  generateMixMenusRaw(
+    childKey,
+    generateFn,
+    mainMenus,
+    (menu) => {
       if (menu.onClick) {
-        menu.onClick(menu)
+        menu.onClick(menu);
       } else {
-        uiType.change(menu.key as any)
+        uiType.change(menu.key as any);
       }
     },
-  () => uiType.current
-);
+    () => uiType.current
+  );

+ 3 - 2
src/views/graphic/setting.vue

@@ -9,18 +9,19 @@
           </p>
           <ui-input v-model="data.singleRoadWidth" width="100%">
             <template v-slot:icon>
-              <ui-icon type="clear" ctrl @click="setSceneSingleRoadWidth" />
+              <ui-icon type="measure" ctrl @click="setSceneSingleRoadWidth" />
             </template>
           </ui-input>
         </div>
         <div>
+
           <p>
             <span>默认隔离带宽度</span>
             <span>单位: m</span>
           </p>
           <ui-input v-model="data.roadQuarantineWidth" width="100%">
             <template v-slot:icon>
-              <ui-icon type="clear" ctrl @click="setSceneRoadQuarantineWidth" />
+              <ui-icon type="measure" ctrl @click="setSceneRoadQuarantineWidth" />
             </template>
           </ui-input>
         </div>

+ 1 - 1
src/views/photos/index.vue

@@ -98,7 +98,7 @@ const selectMenus = [
 const photoType = ref<string>()
 const photoOptions = [
   {value: "photograph", label: "相机拍照"},
-  {value: "selectPhotoAlbum", label: "相机拍照"},
+  {value: "selectPhotoAlbum", label: "相册选择"},
   {value: "scene", label: "场景截图"},
 ]
 

+ 1 - 0
src/views/sys/menu/item/item.vue

@@ -56,6 +56,7 @@ const emit = defineEmits<{
   transform: translateX(-100%);
   transform-origin: left center;
   transition: all 0.3s ease;
+  overflow-y: auto;
   height: calc(100% - var(--editor-head-height));
   top: var(--editor-head-height) !important;
   z-index: -3 !important;