ManualDrawingTool.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div class="box">
  3. <el-card class="box-card">
  4. <div slot="header" class="clearfix">
  5. <span>集成方式</span>
  6. </div>
  7. <div>
  8. 手动落图工具通过iframe引入。
  9. </div>
  10. </el-card>
  11. <el-card class="box-card">
  12. <div slot="header" class="clearfix">
  13. <span>集成操作步骤</span>
  14. </div>
  15. <div>
  16. <el-tabs v-model="activeName">
  17. <el-tab-pane label="手动落图工具" name="collectdata">
  18. 1、首先在页面创建一个iframe标签,src对应的是collectdata工具包的index.html页面。 例:
  19. <p class="code">{{ code1 }}</p>
  20. 2、其次在页面中创建两个按钮【绘点、绘线】并创建点击事件,点击事件分别修改src参数type,type分别对应【1、2】。 例:
  21. <p class="code">{{ code2 }}</p>
  22. </el-tab-pane>
  23. </el-tabs>
  24. </div>
  25. </el-card>
  26. </div>
  27. </template>
  28. <script>
  29. // 手动落图集成说明
  30. export default {
  31. name: "",
  32. components: {},
  33. data() {
  34. return {
  35. activeName: "collectdata",
  36. code1: `<iframe
  37. src="./static/package/collectdata/dist/index.html"
  38. frameborder="0"
  39. ></iframe>`,
  40. code2: `<iframe
  41. src="./static/package/collectdata/dist/index.html?type=1"
  42. frameborder="0"
  43. ></iframe>
  44. <iframe src="./static/package/collectdata/dist/index.html?type=2" frameborder="0"></iframe>`,
  45. code3: `<iframe
  46. src="./static/package/draw/dist/index.html"
  47. frameborder="0"
  48. ></iframe>`,
  49. code4: `let map = new Map({
  50. target: "map",
  51. logo: false,
  52. controls: defaults({ attribution: false, zoom: false, rotate: false, }),
  53. view: view,
  54. });
  55. globalVariable.map = map; `,
  56. code5: `import measureTool from"@/utils/ol_plugins/measure";
  57. this.measure = new measureTool(globalVariable.map);`,
  58. code6: `this.measure.start("line");
  59. this.measure.start("area");`
  60. };
  61. },
  62. created() {},
  63. methods: {},
  64. computed: {},
  65. watch: {}
  66. };
  67. </script>
  68. <style lang="less" scoped>
  69. .box {
  70. display: flex;
  71. justify-content: space-around;
  72. align-items: center;
  73. align-content: center;
  74. flex-wrap: wrap;
  75. .box-card {
  76. width: calc(50% - 15px);
  77. height: calc(100vh - 400px);
  78. font-size: 18px;
  79. font-family: Microsoft YaHei;
  80. font-weight: 400;
  81. color: #4c4c4c;
  82. line-height: 24px;
  83. div:nth-child(1) {
  84. font-weight: bold;
  85. }
  86. .clearfix span {
  87. font-size: 20px;
  88. font-family: Microsoft YaHei;
  89. font-weight: bold;
  90. color: #258df5;
  91. line-height: 40px;
  92. }
  93. .code {
  94. text-indent: 36px;
  95. font-size: 18px;
  96. font-family: Microsoft YaHei;
  97. font-weight: 400;
  98. color: #808080;
  99. line-height: 32px;
  100. }
  101. }
  102. }
  103. </style>