LR 2 år sedan
förälder
incheckning
2519cadc07
94 ändrade filer med 712 tillägg och 12813 borttagningar
  1. 8 276
      .eslintrc.js
  2. 433 2108
      package-lock.json
  3. 5 2
      package.json
  4. 72 0
      src/components/Base/Page/index.vue
  5. 173 0
      src/components/Base/Table/index.vue
  6. 7 0
      src/components/Base/index.ts
  7. 2 0
      src/main.ts
  8. 1 301
      src/router/_import.ts
  9. 1 22
      src/styles/variables.scss
  10. 0 209
      src/utils/SuperMapService.ts
  11. 0 352
      src/views/zhpt/common/mapUtil/common.ts
  12. 0 135
      src/views/zhpt/common/mapUtil/disAnalysis.ts
  13. 0 149
      src/views/zhpt/common/mapUtil/draw.ts
  14. 0 263
      src/views/zhpt/common/mapUtil/layer.ts
  15. 0 54
      src/views/zhpt/common/mapUtil/netAnalysis.ts
  16. 0 74
      src/views/zhpt/common/mapUtil/proj.ts
  17. 0 154
      src/views/zhpt/common/mapUtil/query.ts
  18. 1 1
      src/views/zhpt/index.vue
  19. 0 17
      src/views/zhpt/tongyonggongju/Test/widget.vue
  20. 0 157
      src/views/zhpt/tongyonggongju/analysisBox/widget.vue
  21. 0 77
      src/views/zhpt/tongyonggongju/analysisResult/widget.vue
  22. 0 323
      src/views/zhpt/tongyonggongju/anthorPanel/widget.vue
  23. 0 261
      src/views/zhpt/tongyonggongju/attAndConAnalysis/widget.vue
  24. 0 229
      src/views/zhpt/tongyonggongju/attrSearch/widget.vue
  25. 0 151
      src/views/zhpt/tongyonggongju/clearDistanceAnalysis/css.scss
  26. 0 77
      src/views/zhpt/tongyonggongju/clearDistanceAnalysis/judgePipeLine.js
  27. 0 340
      src/views/zhpt/tongyonggongju/clearDistanceAnalysis/widget.vue
  28. 0 51
      src/views/zhpt/tongyonggongju/detailInfo/widget.vue
  29. 0 115
      src/views/zhpt/tongyonggongju/extentAnalysis/widget.vue
  30. 0 210
      src/views/zhpt/tongyonggongju/layerManagement/widget.vue
  31. 0 140
      src/views/zhpt/tongyonggongju/layerTree/widget.vue
  32. 0 50
      src/views/zhpt/tongyonggongju/leftBottomTool/propScale/widget.vue
  33. 0 56
      src/views/zhpt/tongyonggongju/leftBottomTool/showLoaction/widget.vue
  34. 0 41
      src/views/zhpt/tongyonggongju/leftBottomTool/widget.vue
  35. BIN
      src/views/zhpt/tongyonggongju/leftTopTool/searchTool/img/locate.png
  36. 0 290
      src/views/zhpt/tongyonggongju/leftTopTool/searchTool/widget.vue
  37. 0 124
      src/views/zhpt/tongyonggongju/leftTopTool/upOrDownView/widget.vue
  38. 0 41
      src/views/zhpt/tongyonggongju/leftTopTool/widget.vue
  39. 0 172
      src/views/zhpt/tongyonggongju/mapMark/widget.vue
  40. 0 41
      src/views/zhpt/tongyonggongju/mapPrint/css.scss
  41. 0 330
      src/views/zhpt/tongyonggongju/mapPrint/widget.vue
  42. 0 36
      src/views/zhpt/tongyonggongju/mouseLocation/widget.vue
  43. 0 92
      src/views/zhpt/tongyonggongju/overlay/widget.vue
  44. BIN
      src/views/zhpt/tongyonggongju/overviewMap/images/overviewMap.png
  45. 0 112
      src/views/zhpt/tongyonggongju/overviewMap/widget.vue
  46. 0 379
      src/views/zhpt/tongyonggongju/printForTileID/widget.vue
  47. 0 310
      src/views/zhpt/tongyonggongju/printForUserSetting/widget.vue
  48. 0 210
      src/views/zhpt/tongyonggongju/printOfNormal/widget.vue
  49. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/A.png
  50. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/C.png
  51. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/D.png
  52. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/L.png
  53. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/R.png
  54. BIN
      src/views/zhpt/tongyonggongju/qAndA/images/T.png
  55. 0 677
      src/views/zhpt/tongyonggongju/qAndA/widget.vue
  56. 0 50
      src/views/zhpt/tongyonggongju/qAndaTextbox/widget.vue
  57. 0 410
      src/views/zhpt/tongyonggongju/queryResult/widget.vue
  58. 0 183
      src/views/zhpt/tongyonggongju/queryResult/widget1.vue
  59. 0 161
      src/views/zhpt/tongyonggongju/queryResult2/widget.vue
  60. 0 36
      src/views/zhpt/tongyonggongju/queryResult3/attributeConfig.ts
  61. 0 274
      src/views/zhpt/tongyonggongju/queryResult3/widget.vue
  62. 0 65
      src/views/zhpt/tongyonggongju/queryResultMore/widget.vue
  63. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/C.png
  64. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/M.png
  65. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/P.png
  66. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/R.png
  67. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/legendtool.png
  68. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/mapLabel.png
  69. BIN
      src/views/zhpt/tongyonggongju/queryTool/images/shuxingbiaozhu.png
  70. 0 24
      src/views/zhpt/tongyonggongju/queryTool/widget.vue
  71. 0 62
      src/views/zhpt/tongyonggongju/rightBottomTool/initExtent/widget.vue
  72. 0 100
      src/views/zhpt/tongyonggongju/rightBottomTool/mapCompass/widget.vue
  73. 0 94
      src/views/zhpt/tongyonggongju/rightBottomTool/overView/widget.vue
  74. 0 101
      src/views/zhpt/tongyonggongju/rightBottomTool/regionZoomIn/widget.vue
  75. 0 101
      src/views/zhpt/tongyonggongju/rightBottomTool/regionZoomOut/widget.vue
  76. 0 123
      src/views/zhpt/tongyonggongju/rightBottomTool/viewSwitch/widget.vue
  77. 0 42
      src/views/zhpt/tongyonggongju/rightBottomTool/widget.vue
  78. 0 31
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/angleTool.vue
  79. 0 31
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/areaTool.vue
  80. 0 30
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/clearMeasureTool.vue
  81. 0 31
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/coordinateTool.vue
  82. 0 33
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/distanceTool.vue
  83. 0 392
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/drawAndLayer.ts
  84. 0 28
      src/views/zhpt/tongyonggongju/rightTopTool/measureTool/widget.vue
  85. 0 99
      src/views/zhpt/tongyonggongju/rightTopTool/otherTools/mapLegend.vue
  86. 0 16
      src/views/zhpt/tongyonggongju/rightTopTool/otherTools/widget.vue
  87. 0 48
      src/views/zhpt/tongyonggongju/rightTopTool/toolBox/fullScreen.vue
  88. 0 42
      src/views/zhpt/tongyonggongju/rightTopTool/toolBox/mapScreenshot.vue
  89. 0 28
      src/views/zhpt/tongyonggongju/rightTopTool/toolBox/widget.vue
  90. 0 272
      src/views/zhpt/tongyonggongju/rightTopTool/widget.vue
  91. 0 61
      src/views/zhpt/tongyonggongju/scaleBar/widget.vue
  92. 0 610
      src/views/zhpt/tongyonggongju/themMap/widget.vue
  93. 6 24
      tsconfig.json
  94. 3 2
      vue.config.js

+ 8 - 276
.eslintrc.js

@@ -1,282 +1,14 @@
 module.exports = {
   root: true,
-
-  parserOptions: {
-    parser: '@typescript-eslint/parser',
-    sourceType: 'module',
-    ecmaFeatures: {
-      jsx: false
-    }
-  },
-
   env: {
-    browser: true,
-    node: true,
-    es6: true
+    node: true
   },
-
-  extends: ['plugin:vue/recommended', 'eslint:recommended'],
-
-  // 在此处添加自定义规则
-  //它是基于 https://github.com/vuejs/eslint-config-vue
-  rules: {
-    'vue/max-attributes-per-line': [
-      2,
-      {
-        singleline: 10,
-        multiline: {
-          max: 1,
-          allowFirstLine: false
-        }
-      }
-    ],
-    'vue/singleline-html-element-content-newline': 'off',
-    'vue/multiline-html-element-content-newline': 'off',
-    'vue/name-property-casing': ['error', 'PascalCase'],
-    'vue/no-v-html': 'off',
-    'accessor-pairs': 2,
-    'arrow-spacing': [
-      2,
-      {
-        before: true,
-        after: true
-      }
-    ],
-    'block-spacing': [2, 'always'],
-    'brace-style': [
-      2,
-      '1tbs',
-      {
-        allowSingleLine: true
-      }
-    ],
-    camelcase: [
-      0,
-      {
-        properties: 'always'
-      }
-    ],
-    'comma-dangle': [2, 'never'],
-    'comma-spacing': [
-      2,
-      {
-        before: false,
-        after: true
-      }
-    ],
-    'comma-style': [2, 'last'],
-    'constructor-super': 2,
-    curly: [2, 'multi-line'],
-    'dot-location': [2, 'property'],
-    'eol-last': 2,
-    eqeqeq: ['error', 'always', { null: 'ignore' }],
-    'generator-star-spacing': [
-      2,
-      {
-        before: true,
-        after: true
-      }
-    ],
-    'handle-callback-err': [2, '^(err|error)$'],
-    indent: [
-      2,
-      2,
-      {
-        SwitchCase: 1
-      }
-    ],
-    'jsx-quotes': [2, 'prefer-single'],
-    'key-spacing': [
-      2,
-      {
-        beforeColon: false,
-        afterColon: true
-      }
-    ],
-    'keyword-spacing': [
-      2,
-      {
-        before: true,
-        after: true
-      }
-    ],
-    'new-cap': [
-      2,
-      {
-        newIsCap: true,
-        capIsNew: false
-      }
-    ],
-    'new-parens': 2,
-    'no-array-constructor': 2,
-    'no-caller': 2,
-    'no-console': 'off',
-    'no-class-assign': 2,
-    'no-cond-assign': 2,
-    'no-const-assign': 2,
-    'no-control-regex': 0,
-    'no-delete-var': 2,
-    'no-dupe-args': 2,
-    'no-dupe-class-members': 2,
-    'no-dupe-keys': 2,
-    'no-duplicate-case': 2,
-    'no-empty-character-class': 2,
-    'no-empty-pattern': 2,
-    'no-eval': 2,
-    'no-ex-assign': 2,
-    'no-extend-native': 2,
-    'no-extra-bind': 2,
-    'no-extra-boolean-cast': 2,
-    'no-extra-parens': [2, 'functions'],
-    'no-fallthrough': 2,
-    'no-floating-decimal': 2,
-    'no-func-assign': 2,
-    'no-implied-eval': 2,
-    'no-inner-declarations': [2, 'functions'],
-    'no-invalid-regexp': 2,
-    'no-irregular-whitespace': 2,
-    'no-iterator': 2,
-    'no-label-var': 2,
-    'no-labels': [
-      2,
-      {
-        allowLoop: false,
-        allowSwitch: false
-      }
-    ],
-    'no-lone-blocks': 2,
-    'no-mixed-spaces-and-tabs': 2,
-    'no-multi-spaces': 2,
-    'no-multi-str': 2,
-    'no-multiple-empty-lines': [
-      2,
-      {
-        max: 1
-      }
-    ],
-    'no-native-reassign': 2,
-    'no-negated-in-lhs': 2,
-    'no-new-object': 2,
-    'no-new-require': 2,
-    'no-new-symbol': 2,
-    'no-new-wrappers': 2,
-    'no-obj-calls': 2,
-    'no-octal': 2,
-    'no-octal-escape': 2,
-    'no-path-concat': 2,
-    'no-proto': 2,
-    'no-redeclare': 2,
-    'no-regex-spaces': 2,
-    'no-return-assign': [2, 'except-parens'],
-    'no-self-assign': 2,
-    'no-self-compare': 2,
-    'no-sequences': 2,
-    'no-shadow-restricted-names': 2,
-    'no-spaced-func': 2,
-    'no-sparse-arrays': 2,
-    'no-this-before-super': 2,
-    'no-throw-literal': 2,
-    'no-trailing-spaces': 2,
-    'no-undef': 2,
-    'no-undef-init': 2,
-    'no-unexpected-multiline': 2,
-    'no-unmodified-loop-condition': 2,
-    'no-unneeded-ternary': [
-      2,
-      {
-        defaultAssignment: false
-      }
-    ],
-    'no-unreachable': 2,
-    'no-unsafe-finally': 2,
-    'no-unused-vars': [
-      2,
-      {
-        vars: 'all',
-        args: 'none'
-      }
-    ],
-    'no-useless-call': 2,
-    'no-useless-computed-key': 2,
-    'no-useless-constructor': 2,
-    'no-useless-escape': 0,
-    'no-whitespace-before-property': 2,
-    'no-with': 2,
-    'one-var': [
-      2,
-      {
-        initialized: 'never'
-      }
-    ],
-    'operator-linebreak': [
-      2,
-      'after',
-      {
-        overrides: {
-          '?': 'before',
-          ':': 'before'
-        }
-      }
-    ],
-    'padded-blocks': [2, 'never'],
-    quotes: [
-      2,
-      'single',
-      {
-        avoidEscape: true,
-        allowTemplateLiterals: true
-      }
-    ],
-    semi: [2, 'never'],
-    'semi-spacing': [
-      2,
-      {
-        before: false,
-        after: true
-      }
-    ],
-    'space-before-blocks': [2, 'always'],
-    'space-before-function-paren': [2, 'never'],
-    'space-in-parens': [2, 'never'],
-    'space-infix-ops': 2,
-    'space-unary-ops': [
-      2,
-      {
-        words: true,
-        nonwords: false
-      }
-    ],
-    'spaced-comment': [
-      2,
-      'always',
-      {
-        markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
-      }
-    ],
-    'template-curly-spacing': [2, 'never'],
-    'use-isnan': 2,
-    'valid-typeof': 2,
-    'wrap-iife': [2, 'any'],
-    'yield-star-spacing': [2, 'both'],
-    yoda: [2, 'never'],
-    'prefer-const': 2,
-    'object-curly-spacing': [
-      2,
-      'always',
-      {
-        objectsInObjects: false
-      }
-    ],
-    'array-bracket-spacing': [2, 'never'],
-    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
-    'prettier/prettier': 'off'
+  extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'],
+  parserOptions: {
+    ecmaVersion: 2020
   },
-
-  extends: [
-    'plugin:vue/recommended',
-    'eslint:recommended',
-    '@vue/typescript/recommended',
-    '@vue/prettier',
-    '@vue/prettier/@typescript-eslint'
-  ]
+  rules: {
+    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
+  }
 }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 433 - 2108
package-lock.json


+ 5 - 2
package.json

@@ -11,7 +11,7 @@
     "preview": "node build/index.js --preview"
   },
   "dependencies": {
-    "@supermap/iclient-ol": "^10.2.1",
+    "@vue/eslint-config-prettier": "^7.0.0",
     "animate.css": "^4.1.1",
     "axios": "^0.27.2",
     "babel-loader": "^8.2.4",
@@ -78,7 +78,10 @@
     "element-resize-detector": "^1.2.3",
     "element-theme-chalk": "^2.13.6",
     "eslint": "5.15.3",
-    "eslint-plugin-vue": "5.2.2",
+    "eslint-plugin-vue": "^8.0.3",
+    "eslint-config-prettier": "^8.3.0",
+    "eslint-plugin-prettier": "^4.0.0",
+    "prettier": "^2.4.1",
     "html-webpack-plugin": "3.2.0",
     "image-webpack-loader": "^6.0.0",
     "increase-memory-limit": "^1.0.7",

+ 72 - 0
src/components/Base/Page/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div class="container">
+    <div :class="{ actions: true, hidden: !$slots.action }">
+      <slot name="action" />
+    </div>
+    <div class="content-wrapper">
+      <div class="content">
+        <slot />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
+@Component({ name: 'TfPage', inheritAttrs: false })
+export default class Page extends Vue {
+  @Prop({ type: Boolean, default: false }) isActive!: boolean
+  $parent!: Vue & { preparing?: Function }
+  @Watch('isActive')
+  refetchData(active: boolean) {
+    if (active) {
+      const { preparing } = this.$parent
+      preparing && preparing()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden auto;
+  display: flex;
+  flex-direction: column;
+  background-color: $--background-color-base !important;
+  @include base-scroll-bar();
+  .actions {
+    flex: 0 0 auto;
+    position: relative;
+    position: sticky;
+    top: 0;
+    z-index: 100;
+    padding: $gutter $gutter 0;
+    margin-bottom: $gutter;
+    background: $--color-white;
+    >>> .el-form-item {
+      margin-bottom: $gutter;
+    }
+    &.hidden {
+      display: none;
+    }
+  }
+  .content {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    overflow: hidden auto;
+    @include base-scroll-bar();
+
+    &-wrapper {
+      width: 100%;
+      flex: 1 1 100%;
+      display: flex;
+      position: relative;
+      z-index: 99;
+    }
+  }
+}
+</style>

+ 173 - 0
src/components/Base/Table/index.vue

@@ -0,0 +1,173 @@
+<template>
+  <div class="tf-table" :style="{ paddingBottom: pagination ? 0 : '15px' }">
+    <el-table ref="table" v-on="$listeners" v-bind="attrs">
+      <template slot="empty">
+        <img src="@/assets/icon/null.png" alt="暂无数据" />
+      </template>
+      <template v-for="{ prop, type, _slot, ...col } of columns">
+        <template v-if="_slot">
+          <el-table-column :key="prop || type" v-bind="{ headerAlign: 'center', align: 'center', prop, type, ...col }">
+            <template v-slot="slotScope" v-if="_slot">
+              <slot :name="prop" v-bind="{ ...slotScope, col: { prop, type, _slot, ...col } }" />
+            </template>
+          </el-table-column>
+        </template>
+        <el-table-column
+          v-else
+          :key="prop || type"
+          v-bind="{ headerAlign: 'center', align: 'center', prop, type, ...col }"
+        />
+      </template>
+      <slot />
+    </el-table>
+    <el-pagination
+      v-if="pagination && pagination.total > 0"
+      class="pagination"
+      v-bind="{
+        pageSizes: pageSizes,
+        total: pagination.total,
+        ...pagination,
+        currentPage: pagination.currentPage || pagination.current,
+        pageSize: pagination.pageSize || pagination.size,
+        layout: pagination.layout || 'total, sizes, prev, pager, next, jumper'
+      }"
+      @size-change="($event) => onPageChange($event, 'size')"
+      @current-change="($event) => onPageChange($event, 'current')"
+    />
+  </div>
+</template>
+
+<script lang="ts">
+import { Vue, Component, Prop } from 'vue-property-decorator'
+import { pageSizes } from '@/utils/constant'
+import { ElTableColumn } from 'element-ui/types/table-column'
+import { ElPagination } from 'element-ui/types/pagination'
+import { camelCase } from 'lodash'
+
+interface IPagination {
+  current?: string | number
+  size?: string | number
+  total?: string | number
+}
+
+type ICol = Partial<ElTableColumn> & {
+  _slot: boolean
+}
+@Component({ name: 'TfTable', inheritAttrs: false })
+export default class Table extends Vue {
+  @Prop({ type: Array, default: () => [] }) columns!: ICol[]
+  @Prop({ type: Object, default: () => ({}) }) pagination!: ElPagination & IPagination
+
+  pageSizes = pageSizes
+  get attrs() {
+    const defaultAttrs = {
+      toolTipEffect: 'light',
+      showOverflowTooltip: true,
+      size: 'medium',
+      rowKey: 'id',
+      stripe: true,
+      height: '100%'
+      // highlightCurrentRow: true
+    }
+    return {
+      ...defaultAttrs,
+      ...Object.keys(this.$attrs).reduce((acc, key) => {
+        acc[camelCase(key)] = this.$attrs[key]
+        return acc
+      }, {})
+    }
+  }
+
+  onPageChange(e: any, type: 'size' | 'current') {
+    this.$emit(`${type}-change`, e)
+    this.$emit(`${type}Change`, e)
+    this.$emit('page-change', { [type]: e })
+    this.$emit('pageChange', { [type]: e })
+  }
+}
+</script>
+
+
+<style lang="scss" scoped>
+.tf-table {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+  width: 100%;
+  padding: 15px 15px 0;
+  background-color: #fff;
+  z-index: 99;
+
+  >>> .el-table {
+    .el-table__header {
+      th.el-table__cell {
+        height: 40px;
+        color: $--color-text-primary;
+        background-color: rgba($--color-primary, 0.15);
+        padding: 3px 0;
+      }
+    }
+    .el-table__body {
+      tr.el-table__row {
+        td.el-table__cell {
+          height: 34px;
+          color: #555;
+          background-color: $--color-white;
+          padding: 3px 0;
+        }
+        &.el-table__row--striped {
+          td.el-table__cell {
+            background-color: rgba($--color-primary, 0.06);
+          }
+        }
+        &.current-row {
+          td.el-table__cell {
+            background-color: rgba($--color-primary, 0.7);
+            color: $--color-white;
+          }
+          &:hover {
+            td.el-table__cell {
+              color: $--color-warning;
+            }
+          }
+        }
+        &:not(.current-row):hover {
+          td.el-table__cell {
+            background-color: rgba($--color-primary, 0.1);
+            color: $--color-warning;
+          }
+        }
+      }
+    }
+    &:not(.el-table--border) {
+      .el-table__body tr.el-table__row {
+        td.el-table__cell {
+          border: 0;
+        }
+        &:last-child {
+          td.el-table__cell {
+            border-bottom: 1px solid rgba($--color-primary, 0.06);
+          }
+        }
+      }
+    }
+    .el-table__empty-text {
+      img {
+        max-width: 154px;
+      }
+    }
+    &__fixed-right {
+      box-shadow: none;
+    }
+  }
+  .pagination {
+    position: relative;
+    position: sticky;
+    bottom: 0;
+    padding: 15px 0;
+    background-color: #fff;
+    z-index: 100;
+  }
+}
+</style>

+ 7 - 0
src/components/Base/index.ts

@@ -0,0 +1,7 @@
+import Vue from 'vue'
+import Page from './Page/index.vue'
+import Table from './Table/index.vue'
+const namePrefix = 'Tf'
+
+Vue.component(`${namePrefix}${Page.name}`, Page)
+Vue.component(`${namePrefix}${Table.name}`, Table)

+ 2 - 0
src/main.ts

@@ -14,6 +14,8 @@ import './directives'
 import App from './App.vue'
 import store from './store'
 import router from './router'
+import '@/components/Base'
+
 import { comMethod } from '@/utils/comMethod'
 import '@/icons'
 import '@/permission' // 权限控制

+ 1 - 301
src/router/_import.ts

@@ -22,305 +22,5 @@ const map = {
   paramSetting: () => import('@/views/currentSystem/authorityManagement/paramSetting/index.vue'), // 参数配置
   dictManagement: () => import('@/views/currentSystem/authorityManagement/dictManagement/index.vue'), // 字典管理
   coveringSpecification: () => import('@/views/currentSystem/authorityManagement/coveringSpecification/index.vue'), // 覆土规范
-  mobileDevice: () => import('@/views/currentSystem/authorityManagement/mobileDevice/index.vue'), // 移动设备管理
-
-  //综合展示-工具栏
-  //左侧顶部工具栏
-  leftTopTool: () => import('@/views/zhpt/tongyonggongju/leftTopTool/widget.vue'), // 左侧顶部工具栏
-  searchTool: () => import('@/views/zhpt/tongyonggongju/leftTopTool/searchTool/widget.vue'), // 搜索工具
-  upOrDownView: () => import('@/views/zhpt/tongyonggongju/leftTopTool/upOrDownView/widget.vue'), // 上下视图
-  //左侧底部工具栏
-  leftBottomTool: () => import('@/views/zhpt/tongyonggongju/leftBottomTool/widget.vue'), // 左侧底部工具栏
-  propScale: () => import('@/views/zhpt/tongyonggongju/leftBottomTool/propScale/widget.vue'), // 比例尺
-  showLoaction: () => import('@/views/zhpt/tongyonggongju/leftBottomTool/showLoaction/widget.vue'), // 坐标展示
-  //右侧顶部工具栏
-  rightTopTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/widget.vue'), // 右侧顶部工具栏
-
-  measureTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/widget.vue'), //测量工具
-  distanceTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/distanceTool.vue'), //距离测量
-  areaTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/areaTool.vue'), //面积测量
-  angleTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/angleTool.vue'), //角度测量
-  coordinateTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/coordinateTool.vue'), //坐标
-  clearMeasureTool: () => import('@/views/zhpt/tongyonggongju/rightTopTool/measureTool/clearMeasureTool.vue'), //清除测量
-
-  toolBox: () => import('@/views/zhpt/tongyonggongju/rightTopTool/toolBox/widget.vue'), //工具箱
-  fullScreen: () => import('@/views/zhpt/tongyonggongju/rightTopTool/toolBox/fullScreen.vue'), //全屏
-  mapScreenshot: () => import('@/views/zhpt/tongyonggongju/rightTopTool/toolBox/mapScreenshot.vue'), //截图
-
-  mapLegend: () => import('@/views/zhpt/tongyonggongju/rightTopTool/otherTools/mapLegend.vue'), // 图例
-
-  //右侧底部工具栏
-  rightBottomTool: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/widget.vue'), // 右侧底部工具栏
-  overView: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/overView/widget.vue'), // 鹰眼
-  regionZoomIn: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/regionZoomIn/widget.vue'), // 缩小
-  regionZoomOut: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/regionZoomOut/widget.vue'), // 放大
-  initExtent: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/initExtent/widget.vue'), // 初始范围
-  viewSwitch: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/viewSwitch/widget.vue'), // 视图切换
-  mapCompass: () => import('@/views/zhpt/tongyonggongju/rightBottomTool/mapCompass/widget.vue') // 指北针
-
-  // 监测中心
-  //    检测配置
-  //设备类型配置
-  // '/monitoring/settings/device/types': () => import('@/views/monitoring/settings/device/types/index.vue'),
-  // //设备档案管理
-  // '/monitoring/settings/device/archives': () => import('@/views/monitoring/settings/device/archives/index.vue'),
-  // //监测点管理
-  // '/monitoring/settings/points': () => import('@/views/monitoring/settings/points/index.vue'),
-  // //监测站管理
-  // '/monitoring/settings/sites': () => import('@/views/monitoring/settings/sites/index.vue'),
-  // //图标管理
-  // '/monitoring/settings/icons': () => import('@/views/monitoring/settings/icons/index.vue'),
-  // //指标标准配置
-  // '/monitoring/settings/standards': () => import('@/views/monitoring/settings/standards/index.vue'),
-
-  // // 监控中心
-  // '/monitoring/monitor': () => import('@/views/monitoring/monitor/widget.vue'),
-  // // 指标实时监测
-  // '/monitoring/monitor/points': () => import('@/views/monitoring/monitor/points/index.vue'),
-  // // 站点实时监测
-  // '/monitoring/monitor/sites': () => import('@/views/monitoring/monitor/sites/index.vue'),
-  // '/monitoring/report/detail': () => import('@/views/monitoring/report/detail/index.vue'),
-  // '/monitoring/report/points': () => import('@/views/monitoring/report/points/index.vue'),
-  // '/monitoring/report/sites': () => import('@/views/monitoring/report/sites/index.vue'),
-  // '/monitoring/report/warnings': () => import('@/views/monitoring/report/warnings/index.vue')
-
-  // 设施评估
-  // 管道检测数据管理
-  // EngineeringManage: () => import('@/views/facilityEvaluation/pipelineManage/engineeringManage/index.vue'), // 工程管理
-  // TestResultDiagram: () => import('@/views/facilityEvaluation/pipelineManage/testResultDiagram/index.vue'), // 检测成果专题图
-
-  // // 营销业务管理系统
-  // register: () => import('@/views/currentSystem/work/order/register/index'), // 工单登记
-  // WorkList: () => import('@/views/currentSystem/work/WorkList/work/index'), // 工单汇总
-  // handle: () => import('@/views/currentSystem/work/order/handle/index'), // 认证处置
-  // check: () => import('@/views/currentSystem/work/order/check/index'), // 工单审核
-  // quality: () => import('@/views/currentSystem/work/order/quality/index'), // 工单质检
-  // writeOff: () => import('@/views/currentSystem/work/order/writeOff/index'), // 结果处置
-  // finalDecision1: () => import('@/views/currentSystem/work/order/finalDecision1/index'), // 1
-  // returnVisit: () => import('@/views/currentSystem/work/order/returnVisit/index'), // 工单回访
-  // reportSearch: () => import('@/views/currentSystem/work/monitoring/reportSearch/index'), // 工单查询
-  // allWork: () => import('@/views/currentSystem/work/monitoring/allWork/index'), // 工单总览
-  // businessWorkOrder: () => import('@/views/currentSystem/work/monitoring/businessWorkOrder/index'), // 业务监控
-  // staffWorkOrder: () => import('@/views/currentSystem/work/monitoring/staff/index'), // 人员监控
-  // flowPath: () => import('@/views/currentSystem/work/configuration/flowPath/index'), // 流程配置
-  // workOrderType: () => import('@/views/currentSystem/work/configuration/workOrderType/index'), // 工单类型
-  // workOrderArchive: () => import('@/views/currentSystem/work/configuration/workOrderArchive/index'), // 维修类型
-  // percentageComplete: () => import('@/views/currentSystem/work/statistics/percentageComplete/index'), // 完成率
-  // abnormal: () => import('@/views/currentSystem/work/statistics/abnormal/index'), // 异常
-
-  // // 供水服务热线系统
-  // workbench: () => import('@/views/currentSystem/waterHotline/workbench/index'), // 坐席工作台
-  // business: () => import('@/views/currentSystem/work/monitoring/businessWorkOrder/index'), // 业务监控
-  // staff: () => import('@/views/currentSystem/work/monitoring/staff/index'), // 人员监控
-  // squad: () => import('@/views/currentSystem/waterHotline/monitor/squad/index'), // 班长监控
-  // faultType: () => import('@/views/currentSystem/waterHotline/monitor/faultType/index'), // 故障分类
-  // rate: () => import('@/views/currentSystem/waterHotline/monitor/rate/index'), // 评分模板
-  // addressBook: () => import('@/views/currentSystem/waterHotline/monitor/addressBook/index'), // 内部通讯
-  // Event: () => import('@/views/currentSystem/waterHotline/monitor/Event/index'), // 事件类型
-  // warning: () => import('@/views/currentSystem/waterHotline/monitor/warning/index'), // 流量预警
-  // emergency: () => import('@/views/currentSystem/waterHotline/monitor/emergency/index'), // 应急记录
-  // emergencyAudit: () => import('@/views/currentSystem/waterHotline/monitor/emergencyAudit/index'), // 应急审核
-  // scheduling: () => import('@/views/currentSystem/waterHotline/manualSeat/scheduling/index'), // 排班管理
-  // ShiftChange: () => import('@/views/currentSystem/waterHotline/manualSeat/shiftChange/index'), // 交接班管理
-  // record: () => import('@/views/currentSystem/waterHotline/qualityTesting/record/index'), // 录音质检
-  // // workOrderQuality: () => import('@/views/currentSystem/waterHotline/qualityTesting/workOrderQuality/index'), // 工单质检
-  // workOrderQuality: () => import('@/views/currentSystem/waterHotline/qualityTesting/workOrderQuality/index'), // 工单质检
-  // repository: () => import('@/views/currentSystem/waterHotline/knowledge/repository/index'), // 知识库管理
-  // seeRepository: () => import('@/views/currentSystem/waterHotline/knowledge/seeRepository/index'), // 知识库管理
-  // problem: () => import('@/views/currentSystem/waterHotline/monitor/problem/index'), // 问题模板
-  // SMSinform: () => import('@/views/currentSystem/waterHotline/SMS/SMSinform'), // 短信通知
-  // SMStemplate: () => import('@/views/currentSystem/waterHotline/SMS/SMStemplate'), // 短信模板
-  // SMSsent: () => import('@/views/currentSystem/waterHotline/SMS/SMSsent'), // 发送管理
-  // comprehensiveData: () => import('@/views/currentSystem/waterHotline/comprehensiveData/index'), // 客户综合查询
-  // callLog: () => import('@/views/currentSystem/waterHotline/statisticalReport/callLog'), // 录音评分统计
-  // Monthly: () => import('@/views/currentSystem/waterHotline/statisticalReport/Monthly'),
-  // allWorkS: () => import('@/views/currentSystem/waterHotline/statisticalReport/allWork'), // 业务工单统计(新加)
-  // Returnvisit: () => import('@/views/currentSystem/waterHotline/statisticalReport/Returnvisit'), // 回访记录统计(新加)
-  // Qualityinspection: () => import('@/views/currentSystem/waterHotline/statisticalReport/Qualityinspection'), // 工单质检统计(新加)
-  // Recordingquality: () => import('@/views/currentSystem/waterHotline/statisticalReport/Recordingquality'), // 录音质检统计(新加)
-  // seatStatus: () => import('@/views/currentSystem/waterHotline/statisticalReport/seatStatus'), // 坐席状态统计
-  // customerSatisfaction: () => import('@/views/currentSystem/waterHotline/statisticalReport/customerSatisfaction'), // 客户满意度报表
-  // disposeType: () => import('@/views/currentSystem/waterHotline/statisticalReport/disposeType'), // 处理工单分类统计
-  // complete: () => import('@/views/currentSystem/waterHotline/statisticalReport/complete'), // 工单统计
-  // timeout: () => import('@/views/currentSystem/waterHotline/statisticalReport/timeout'), // 超时统计
-  // SchedulSee: () => import('@/views/currentSystem/waterHotline/manualSeat/SchedulSee/index'), // 应急管理
-  // WorkConfigure: () => import('@/views/currentSystem/waterHotline/qualityTesting/WorkConfigure/index'), // 质检配置
-
-  // // 表务管理
-  // Warehousing: () => import('@/views/currentSystem/meter/circulation/Warehousing/index'), // 入库
-  // Delivery: () => import('@/views/currentSystem/meter/circulation/Delivery/index'), // 出库
-  // first: () => import('@/views/currentSystem/meter/verification/first/index'), // 首检
-  // install: () => import('@/views/currentSystem/meter/circulation/install/index'), // 新装
-  // swop: () => import('@/views/currentSystem/meter/circulation/swop/index'), // 换表
-  // scrap: () => import('@/views/currentSystem/meter/circulation/scrap/index'), // 移交
-  // dispute: () => import('@/views/currentSystem/meter/verification/dispute/index'), // 争议检定
-  // alternate: () => import('@/views/currentSystem/meter/verification/Sampling/alternate/index'), // 周检表抽检
-  // inspection: () => import('@/views/currentSystem/meter/verification/Sampling/inspection/index'), // 故障表拆检
-  // meterSite: () => import('@/views/currentSystem/meter/epitopeData/meterSite/index'), // 表位资料
-  // produce: () => import('@/views/currentSystem/meter/period/produce/index'), // 周检计划
-  // Scrap: () => import('@/views/currentSystem/meter/reports/Scrap/index'), // 报废表统计
-  // Mount: () => import('@/views/currentSystem/meter/reports/Mount/index'), // 新装表统计
-  // Summary: () => import('@/views/currentSystem/meter/reports/Summary/index'), // 出库表统计
-  // Change: () => import('@/views/currentSystem/meter/reports/Change/index'), // 换表统计
-  // Inventory: () => import('@/views/currentSystem/meter/reports/Inventory/index'), // 库存统计
-  // controversy: () => import('@/views/currentSystem/meter/reports/Controversy/index'), // 争议检定查询
-  // UsageWater: () => import('@/views/currentSystem/meter/reports/UsageWater/index'), // 水表使用情况
-  // Water: () => import('@/views/currentSystem/meter/reports/Water/index'), // 水表查询
-  // inspections: () => import('@/views/currentSystem/meter/inspection/inspection/index'), // 首检比例
-  // manufactor: () => import('@/views/currentSystem/meter/inspection/manufactor/index'), // 厂家维护
-  // Periodic: () => import('@/views/currentSystem/meter/inspection/Periodic/index'), // 周期规则
-  // SpotCheck: () => import('@/views/currentSystem/meter/inspection/SpotCheck/index'), // 抽检比例
-
-  // //   // 抄表系统
-  // device: () => import('@/views/currentSystem/meterReading/deploy/device/index'), //
-  // district: () => import('@/views/currentSystem/meterReading/deploy/district/index'), //
-  // sector: () => import('@/views/currentSystem/meterReading/deploy/section/index'), //
-  // clientApportion: () => import('@/views/currentSystem/meterReading/deploy/clientApportion/index'), //
-  // sequence: () => import('@/views/currentSystem/meterReading/deploy/sequence/index'), // 抄表顺序
-  // recordSwitch: () => import('@/views/currentSystem/meterReading/deploy/recordSwitch/index'), // 开关记录
-  // abnormalConfiguration: () => import('@/views/currentSystem/meterReading/deploy/abnormalConfiguration/index'), // 异常配置
-  // plan: () => import('@/views/currentSystem/meterReading/planProgramme/plan/index'), // 抄表计划管理
-  // pnad: () => import('@/views/currentSystem/meterReading/planProgramme/pnad/index'), // 抄表计划管理 普查
-  // offLine: () => import('@/views/currentSystem/meterReading/planProgramme/offLine/index'), // 离线抄表
-  // meterReadingReview: () => import('@/views/currentSystem/meterReading/planProgramme/meterReadingReview/index'), // 抄表审核
-  // meterReaderPersonnel: () => import('@/views/currentSystem/meterReading/meterReaderPersonnel/index'), // 抄表人员管理
-
-  // MRDquery: () => import('@/views/currentSystem/meterReading/statistics/MRDquery/index'), // 抄表数据查询
-  // CMRDquery: () => import('@/views/currentSystem/meterReading/statistics/CMRDquery/index'), // 客户抄表查询
-  // GIDquery: () => import('@/views/currentSystem/meterReading/statistics/GIDquery/index'), // 普查数据查询
-  // CMRHistory: () => import('@/views/currentSystem/meterReading/statistics/CMRHistory/index'), // 分配统计
-  // MRRstatistics: () => import('@/views/currentSystem/meterReading/statistics/MRRstatistics/index'), // 月抄表率统计
-  // MRRstatisticsDaily: () => import('@/views/currentSystem/meterReading/statistics/MRRstatisticsDaily/index'), // 日抄表率统计
-  // MRTstatistics: () => import('@/views/currentSystem/meterReading/statistics/MRTstatistics/index'), // 抄表时间统计
-  // MRTstatisticsOvertime: () => import('@/views/currentSystem/meterReading/statistics/MRTstatisticsOvertime/index'), // 抄表超时统计
-  // MRAccuracyQuery: () => import('@/views/currentSystem/meterReading/statistics/MRAccuracyQuery/index'), // 抄表准确率统计
-  // changeHistory: () => import('@/views/currentSystem/meterReading/statistics/changeHistory/index'), // 抄表历史
-  // // 区域计量
-  // zoningManage: () => import('@/views/currentSystem/regionalMetering/DMAManage'), // DMA分区
-  // zoningManageUser: () => import('@/views/currentSystem/regionalMetering/DMAManageUser'), // DMA用户邦定
-  // icf: () => import('@/views/currentSystem/regionalMetering/DMAManage/icf'), // ICF状况因子
-  // tubing: () => import('@/views/currentSystem/regionalMetering/DMAManage/tubing'), // 管材类别
-  // sheetsForObserve: () => import('@/views/currentSystem/regionalMetering/zone/sheetsForObserve'), // 区域视察表
-  // zoneSplitManage: () => import('@/views/currentSystem/regionalMetering/zone/zoneSplitManage'), // 区域分表
-  // cumulativeWaterDiff: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/cumulativeWaterDiff'), // 产销差分析
-  // minStroomAnalyse: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/minStroomAnalyse'), // 夜间最小流量
-  // utizonderingInfo: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/utizonderingInfo'), // 异常信息
-  // observeSheets: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/observeSheets'), // 观察表统计分析
-  // observeMeterSupplyMonthly: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/observeMeterSupplyMonthly'), // 观察表月供水量分析
-  // historyFlowCollection: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/historyFlowCollection'), // 流量历史采集分析
-  // historyPressureCollection: () => import('@/views/currentSystem/regionalMetering/statisticAnalyse/historyPressureCollection'), // 流量历史采集分析
-  // workorderDeal: () => import('@/views/currentSystem/regionalMetering/workorder/workorderDeal'), // 工单跟踪
-  // effectRate: () => import('@/views/currentSystem/regionalMetering/workorder/effectRate'), // 绩效评价
-
-  // // 质量管理
-  // summarize: () => import('@/views/currentSystem/qualityTesting/workOrder/summarize'), // 质检汇总
-  // workOrderSumbit: () => import('@/views/currentSystem/qualityTesting/workOrder/workOrderSumbit'), // 工单上报
-  // authentication: () => import('@/views/currentSystem/qualityTesting/workOrder/authentication'), // 检验记录
-  // rectificationOrder: () => import('@/views/currentSystem/qualityTesting/workOrder/rectificationOrder'), // 整改下达
-  // rectificationResult: () => import('@/views/currentSystem/qualityTesting/workOrder/rectificationResult'), // 整改处置
-  // rectificationAudit: () => import('@/views/currentSystem/qualityTesting/workOrder/rectificationAudit'), // 整改审核
-  // rectificationVerification: () => import('@/views/currentSystem/qualityTesting/workOrder/rectificationVerification'), // 整改验证
-  // validationAudits: () => import('@/views/currentSystem/qualityTesting/workOrder/validationAudits'), // 验证审核
-
-  // auditTypeSet: () => import('@/views/currentSystem/qualityTesting/configuration/auditTypeSet'), // 通过原因管理
-  // modelParameter: () => import('@/views/currentSystem/qualityTesting/configuration/ModelParameter'), // 模型参数
-  // modelParameterOld: () => import('@/views/currentSystem/qualityTesting/configuration/ModelParameterOld'), // 模型参数检验
-  // timeConfiguration: () => import('@/views/currentSystem/qualityTesting/configuration/timeConfiguration'), // 配置时限
-  // reject: () => import('@/views/currentSystem/qualityTesting/configuration/reject'), // 驳回次数配置
-  // frequency: () => import('@/views/currentSystem/qualityTesting/configuration/frequency'), // 扫描配置
-  // proportion: () => import('@/views/currentSystem/qualityTesting/configuration/proportion'), // 抽查比例
-
-  // project: () => import('@/views/currentSystem/qualityTesting/configuration/project'), // 检查项目(1级) 2
-  // problemLevel: () => import('@/views/currentSystem/qualityTesting/configuration/problemLevel'), // 问题级别(1级) 3
-  // effect: () => import('@/views/currentSystem/qualityTesting/configuration/effect'), // 整改成效(1级)4
-  // flaw: () => import('@/views/currentSystem/qualityTesting/configuration/flaw'), // 质量缺陷类型(2级)5
-
-  // monitoring: () => import('@/views/currentSystem/qualityTesting/workOrder/monitoring'), // 业务监控
-  // client: () => import('@/views/currentSystem/qualityTesting/pooling/client/index'), // 客户归集
-  // // ClientCollection: () => import('@/views/currentSystem/qualityTesting/pooling/client/index'), // 客户归集
-  // pooledAnalysis: () => import('@/views/currentSystem/qualityTesting/pooling/clientTotal/index'), // 汇总分析
-  // planReview: () => import('@/views/currentSystem/qualityTesting/QualityPlan/planReview/index'), // 计划审核
-  // planManagement: () => import('@/views/currentSystem/qualityTesting/QualityPlan/planManagement/index'), // 计划管理
-  // eventQuery: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/eventQuery/index'), //  抽查
-  // random: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/random/index'), // 事件查询
-  // SYSscreening: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/SYSscreening/index'), // 系统筛查
-  // artificialScreening: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/artificialScreening/index'), // 人工筛查
-  // administration: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/statement/index'), // 管理效益
-  // social: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/social/index'), // 经济效益
-
-  // OrderCompleteRate: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/OrderCompleteRate/index'), // 工单完成率
-  // QulDefectStatistic: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QulDefectStatistic/index'), // 质量缺陷统计
-  // QulDefectTrend: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QulDefectTrend/index'), // 质量缺陷趋势
-  // DeptOrdAdjustRate: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/DeptOrdAdjustRate/index'), // 部门工单整改率
-  // FreqClaimTable: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/FreqClaimTable/index'), // 认证频次明细表
-
-  // Qcstatistics: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/Qcstatistics/index'), // 工单完成率
-  // usersQuery: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/usersQuery/index'), // 户数查询
-  // usersStatistics: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/usersStatistics/index'), // 户数统计
-
-  // waterTrend: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/waterTrend/index'), // 水量趋势
-  // waterVolatility: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/waterVolatility/index'), // 水量波动
-  // waterQuery: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/waterQuery/index'), // 水量查询
-
-  // authenticationSum: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/authenticationSum/index'), // 认证总量统计
-  // authenticationState: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/authenticationState/index'), // 认证状态统计
-  // rectificationState: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/rectificationState/index'), // 整改状态统计
-  // authenticationFrequency: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/authenticationFrequency/index'), // 认证频次统计
-  // QCSummary: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QCcollection/index'), //	质检汇总统计??
-
-  // WOpercentageComplete: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QCcollection/index'), //	完成率统计111
-  // WOTimeoutSummary: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QCcollection/index'), //	超时统计111
-  // WOSummary: () => import('@/views/currentSystem/qualityTesting/statisticAnalysis/QCcollection/index'), //	工单汇总统计111
-
-  // // 制水成本
-  // waterYieldBudget: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/waterYieldBudget/widget'), // 水量计划
-  // totalProduceWaterPerCostBudget: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/totalProduceWaterPerCostBudget/widget'), // 制水单耗
-  // totalProduceWaterIndexBudget: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/totalProduceWaterIndexBudget/widget'), // 制水指标
-  // totalProduceWaterUnitPriceBudget: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/totalProduceWaterUnitPriceBudget/widget'), // 指标单价
-  // totalProduceWaterPerChangeBudget: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/totalProduceWaterPerChangeBudget/widget'), // 制水单变
-  // basicElectricityBill: () => import('@/views/zhpt/waterProductionCost/budgetCostManagement/basicElectricityBill/widget'), // 基本电费
-  // produceWaterRealUsage: () => import('@/views/zhpt/waterProductionCost/realCostManagement/produceWaterRealUsage/widget'), // 制水指标
-  // produceWaterRealUnitPrice: () => import('@/views/zhpt/waterProductionCost/realCostManagement/produceWaterRealUnitPrice/widget'), // 指标单价
-  // produceWaterRealPerCost: () => import('@/views/zhpt/waterProductionCost/realCostManagement/produceWaterRealPerCost/widget'), // 制水单耗
-  // produceWaterRealPerChange: () => import('@/views/zhpt/waterProductionCost/realCostManagement/produceWaterRealPerChange/widget'), // 制水单变
-  // pressurizationStationIndicators: () => import('@/views/zhpt/waterProductionCost/realCostManagement/pressurizationStationIndicators/widget'), // 加压站指标
-  // simulation: () => import('@/views/zhpt/waterProductionCost/realCostManagement/simulation/widget'), // 模拟纠偏
-  // waterBudget: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/waterBudget/widget'), // 水量计划值
-  // waterRealValue: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/waterRealValue/widget'), // 水量实际值
-  // produceWaterMaterialBudget: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/produceWaterMaterialBudget/widget'), // 制水材料计划值
-  // produceWaterMaterialRealValue: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/produceWaterMaterialRealValue/widget'), // 制水材料实际值
-  // produceWaterCostBudget: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/produceWaterCostBudget/widget'), // 制水成本计划值
-  // produceWaterCostRealValue: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/produceWaterCostRealValue/widget'), // 制水成本实际值
-  // indexUnitPriceBudget: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/indexUnitPriceBudget/widget'), // 指标单价计划值
-  // indexUnitPriceRealValue: () => import('@/views/zhpt/waterProductionCost/historyDataQuery/indexUnitPriceRealValue/widget'), // 指标单价实际值
-  // produceCostUnitPriceQuery: () => import('@/views/zhpt/waterProductionCost/historyDataCompare/produceCostUnitPriceQuery/widget'), // 生产成本单价
-  // produceDataQuery: () => import('@/views/zhpt/waterProductionCost/historyDataCompare/produceDataQuery/widget'), // 生产数据查询
-  // costDataQuery: () => import('@/views/zhpt/waterProductionCost/historyDataCompare/costDataQuery/widget'), // 成本数据查询
-  // waterDataQuery: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/waterDataQuery/widget'), // 水量数据查询
-  // electricityUsageQuery: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/electricityUsageQuery/widget'), // 用电量查询
-  // materialPerCostQuery: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/materialPerCostQuery/widget'), // 材料单耗查询
-  // produceWaterIndexQuery: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/produceWaterIndexQuery/widget'), // 制水指标查询
-  // produceWaterIndexSupply: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/produceWaterIndexSupply/widget'), // 供售水量查询
-  // produceWaterIndexNrw: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/produceWaterIndexNrw/widget'), // 产销差查询
-  // produceWaterIndexLeakage: () => import('@/views/zhpt/waterProductionCost/dataTrendAnalysis/produceWaterIndexLeakage/widget'), // 漏损率查询
-  // materialCost: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/materialCost/widget'), // 制水材料趋势图
-  // electricityCost: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/electricityCost/widget'), // 电费成本趋势图
-  // rawWaterCostUnit: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/rawWaterCostUnit/widget'), // 原水费趋势图
-  // waterResouceTax: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/waterResouceTax/widget'), // 水资源税费趋势图
-  // unitCostPie: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/unitCostPie/widget'), // 单位成本饼图
-  // materialCostPie: () => import('@/views/zhpt/waterProductionCost/produceWaterUnitCost/materialCostPie/widget'), // 材料成本饼图
-  // annualSupply: () => import('@/views/zhpt/waterProductionCost/waterCompanySupply/annual/widget'), // 年度供水量
-  // quarterlySupply: () => import('@/views/zhpt/waterProductionCost/waterCompanySupply/quarterly/widget'), // 季度供水量
-  // monthlySupply: () => import('@/views/zhpt/waterProductionCost/waterCompanySupply/monthly/widget'), // 月度供水量
-  // produceMaterial: () => import('@/views/zhpt/waterProductionCost/monthlyTimelyBudget/produceMaterial/widget'), // 制水材料
-  // costCalculate: () => import('@/views/zhpt/waterProductionCost/monthlyTimelyBudget/costCalculate/widget'), // 成本核算
-
-  // // 在线水力模型
-  // forecast: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 在线预测
-  // smartScheduling: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 智能调度
-  // schedulingPlan: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 调度预案
-  // planEvaluation: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 规划评估
-  // pipeFlushing: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 管道冲洗
-  // riskAssessment: () => import('@/views/currentSystem/onlineHydrualicsModel'),	// 风险评估
-  // hydrualicsSysSetting: () => import('@/views/currentSystem/onlineHydrualicsModel')	// 系统设置
+  mobileDevice: () => import('@/views/currentSystem/authorityManagement/mobileDevice/index.vue') // 移动设备管理
 }

+ 1 - 22
src/styles/variables.scss

@@ -2,26 +2,5 @@
 @import './mixin.scss';
 @import './size.scss';
 
-// sidebar
-$menuText: #ebf0fe;
-$menuActiveText: #478dff;
-$subMenuActiveText: #f4f4f5;
-
-$menuBg: rgba(213, 28%, 26%, 0);
-$menuHover: rgba(220, 38, 38, 0);
-
-$subMenuBg: #07142e;
-$subMenuHover: rgba(220, 38, 38, 0);
-
+$gutter: 15px;
 $sideBarWidth: 173px;
-
-:export {
-  menuText: $menuText;
-  menuActiveText: $menuActiveText;
-  subMenuActiveText: $subMenuActiveText;
-  menuBg: $menuBg;
-  menuHover: $menuHover;
-  subMenuBg: $subMenuBg;
-  subMenuHover: $subMenuHover;
-  sideBarWidth: $sideBarWidth;
-}

+ 0 - 209
src/utils/SuperMapService.ts

@@ -1,209 +0,0 @@
-import { SuperMap } from '@supermap/iclient-common'
-/**
- * @description 该公共类包含针对超图iserver的数据查询以及地图服务查询等功能
- * @author 李顺<876330731@qq.com>
- */
-class SuperMapService {
-    /**
-     * 生成超图iserver点
-     * @param point [经度,纬度]
-     * @returns 
-     */
-    static convertPoint(point):SuperMap.Geometry.Point {
-        if (!point) {
-            return undefined;
-        }
-        var lng = point[0];
-        var lat = point[1]
-        if (lng && lng) {
-            return new SuperMap.Geometry.Point(lng, lat);
-        }
-        return undefined;
-    }
-    /**
-     * 生成超图iserver线
-     */
-    static convertPolyline(polyline:number[][]):SuperMap.Geometry.LineString {
-        if (!polyline) {
-            throw undefined;
-        }
-        var points = polyline;
-        if (points && points instanceof Array && points.length >= 2) {
-            var arr = [];
-            for (var i = 0, j = points.length; i < j; i++) {
-                var point = this.convertPoint(points[i]);
-                if (point) {
-                    arr.push(point);
-                }
-            }
-            return new SuperMap.Geometry.LineString(arr);
-        }
-        return undefined;
-    }
-    /**
-     * 生成超图iserver面
-     * @param polygon 
-     * @returns 
-     */
-    static convertPolygon(polygon:number[][][]):SuperMap.Geometry.Polygon {
-        if (!polygon) {
-            throw undefined;
-        }
-        var points = polygon[0];
-        if (points && points instanceof Array && points.length >= 3) {
-            var arr = [];
-            for (var i = 0, j = points.length; i < j; i++) {
-                var point = this.convertPoint(points[i]);
-                if (point) {
-                    arr.push(point);
-                }
-            }
-            var linearRing = new SuperMap.Geometry.LinearRing(arr);
-            return new SuperMap.Geometry.Polygon(linearRing);
-        }
-        return undefined;
-    }
-    /**
-     * 该方法用于使用地图服务获取图层字段集
-     * @param options 
-     * @param options.url 服务地址
-     * @param options.layer 图层名字,"数据集名称@数据源名称"
-     */
-    static getLayerFields(options: {
-        url: string,
-        layer: string,
-    }): Promise<any> {
-        return new Promise((resolve, reject) => {
-            const filter = new SuperMap.FilterParameter({
-                name: options.layer,
-                attributeFilter: "1=2"
-            })
-            const parames = new SuperMap.QueryBySQLParameters({
-                queryParams: [filter]
-            })
-            const sqlService = new SuperMap.QueryBySQLService(options.url, {
-                eventListeners: {
-                    processCompleted: (result) => {
-                        resolve(result)
-                    },
-                    processFailed: (err) => {
-                        reject(err);
-                    }
-                }
-            });
-            sqlService.processAsync(parames);
-        })
-    }
-    /**
-     * 该方法用于获取图层字段唯一值(地图服务)
-     * @param options 
-     * @param options.url 服务地址
-     * @param options.layer 图层名,"数据集名称@数据源名称"
-     * @param options.uniqueField 唯一值字段
-     */
-    static getFieldUniqueValue(options: {
-        url: string,
-        layer: string,
-        uniqueField: string
-    }): Promise<any> {
-        return new Promise((resolve, reject) => {
-            const filterParams = new SuperMap.FilterParameter({
-                name: options.layer,
-                attributeFilter: "1=1",
-                fields: [options.uniqueField],
-                groupBy: options.uniqueField
-            });
-            const sqlParams = new SuperMap.QueryBySQLParameters({
-                queryParams: [filterParams],
-                queryOption: SuperMap.QueryOption.ATTRIBUTE,
-                returnContent: true
-            });
-            const sqlService = new SuperMap.QueryBySQLService(options.url, {
-                eventListeners: {
-                    processCompleted: (result) => {
-                        resolve(result);
-                    },
-                    processFailed: (err) => {
-                        reject(err);
-                    }
-                }
-            });
-            sqlService.processAsync(sqlParams);
-        })
-    }
-    /**
-     * 空间查询、属性查询(地图服务)
-     * @param options 
-     * @param options.url 服务地址
-     * @param options.datasetNames 图层名称
-     * @param options.geometry 查询范围
-     * @param options.whereclause 查询条件
-     * @param options.groupBy 分组
-     * @param options.orderBy 排序
-     * @param options.queryOption 空间结果,包含图形或者不包含
-     * @param options.spatialMode 空间查询算法
-     * @param options.fields 字段
-     */
-    static queryByMapService(options: {
-        url: string,
-        datasetNames: string[],
-        geometry?: SuperMap.Geometry.Polygon,
-        whereclause?: string,
-        groupBy?: string,
-        orderBy?: string,
-        queryOption?: SuperMap.QueryOption,
-        spatialMode?: SuperMap.SpatialQueryMode
-        fields?: string[]
-    }) {
-        return new Promise((resolve, reject) => {
-            let filterParams = [];
-            filterParams = options.datasetNames.map(item => {
-                return new SuperMap.FilterParameter({
-                    name: item,
-                    attributeFilter: options.whereclause,
-                    groupBy: options.groupBy,
-                    orderBy: options.orderBy,
-                    fields: options.fields
-                });
-            });
-            let geoParams = null;
-            let queryService = null;
-            if (options.geometry) {
-                geoParams = new SuperMap.QueryByGeometryParameters({
-                    geometry: options.geometry,
-                    queryParams: filterParams,
-                    returnContent: true,
-                    spatialQueryMode: !options.spatialMode ? SuperMap.SpatialQueryMode.INTERSECT : options.spatialMode,
-                    queryOption: !options.queryOption ? SuperMap.QueryOption.ATTRIBUTEANDGEOMETRY : options.queryOption
-                });
-                queryService = new SuperMap.QueryByGeometryService(options.url, {
-                    eventListeners: {
-                        processCompleted: (result) => {
-                            resolve(result);
-                        },
-                        processFailed: (err) => {
-                            reject(err);
-                        }
-                    }
-                });
-            } else {
-                geoParams = new SuperMap.QueryBySQLParameters({
-                    queryParams: filterParams,
-                    queryOption: !options.queryOption ? SuperMap.QueryOption.ATTRIBUTEANDGEOMETRY : options.queryOption
-                });
-                queryService = new SuperMap.QueryBySQLService(options.url, {
-                    eventListeners: {
-                        processCompleted: (result) => {
-                            resolve(result);
-                        },
-                        processFailed: (err) => {
-                            reject(err);
-                        }
-                    }
-                });
-            }
-            queryService.processAsync(geoParams);
-        })
-    }
-}
-export default SuperMapService;

+ 0 - 352
src/views/zhpt/common/mapUtil/common.ts

@@ -1,352 +0,0 @@
-import Feature from 'ol/Feature';
-import { Polygon, LineString, Point, Circle } from 'ol/geom';
-import iQuery from './query';
-import { appconfig } from 'staticPub/config'
-import { GeoJSON } from 'ol/format';
-import { comSymbol } from '@/utils/comSymbol';
-import { getFieldByLayerName, getUniqueValueByFiled } from '@/api/sysmap/drain'
-import { Style, Fill, Stroke } from 'ol/style';
-import CircleStyle from 'ol/style/Circle';
-import { TileSuperMapRest, SuperMap, LayerInfoService } from '@supermap/iclient-ol'
-import { TF_Layer } from './layer';
-
-export class mapUtil {
-
-    static commonStyle = {
-        point: {
-            size: 4,
-            fill: '#fff',
-            outerColor: '#409EFF',
-            outerWidth: 2
-        },
-        stroke: {
-            width: 5,
-            color: '#409EFF',
-            dash: [0, 0]
-        },
-        fill: {
-            color: 'rgba(0, 0, 0, 0.3)',
-        }
-    }
-
-    static commonLightStyle = {
-        point: {
-            size: 5,
-            fill: '#fff',
-            outerColor: '#0ff',
-            outerWidth: 2
-        },
-        stroke: {
-            width: 6,
-            color: 'rgba(0, 255, 255, 0.5)',
-            dash: [0, 0]
-        },
-        fill: {
-            color: 'rgba(0, 0, 0, 0.3)',
-        }
-    }
-
-    map = null
-
-    constructor(map) {
-        this.map = map
-    }
-    addLayers(layers) {
-        if (!(layers instanceof Array)) this.map.addLayer(layers)
-        layers.forEach(layer => {
-            this.map.addLayer(layer)
-        })
-    }
-    removeLayers(layers) {
-        if (!(layers instanceof Array)) this.map.removeLayer(layers)
-        layers.forEach(layer => {
-            this.map.removeLayer(layer)
-        })
-    }
-    // 获取要素范围中心
-    getCenter(feature) {
-        let center = []
-        if (feature instanceof Feature) {
-            let [xmin, ymin, xmax, ymax] = feature.getGeometry().getExtent()
-            center = [(xmin + xmax) / 2, (ymin + ymax) / 2]
-        }
-        return center
-    }
-    static getCenter(feature) {
-        let center = []
-        if (feature instanceof Feature) {
-            let [xmin, ymin, xmax, ymax] = feature.getGeometry().getExtent()
-            center = [(xmin + xmax) / 2, (ymin + ymax) / 2]
-        }
-        return center
-    }
-
-    // 设置图层在最上层
-    setTop(layer) {
-        let layers = this.map.getLayers(), zindexs = []
-        layers.forEach(layer => {
-            let index = layer.getZIndex()
-            if (isNaN(index)) zindexs.push(0)
-            else zindexs.push(index)
-        })
-        layer.setZIndex(Math.max.apply(null, zindexs) + 1)
-    }
-
-    // 获取当前地图 extent
-    getCurrentViewExtent() {
-        let mapDom = this.map.getTargetElement()
-        let top = 0, left = 0, right = mapDom.clientWidth + left, bottom = mapDom.clientHeight + top
-        let topLeftPoint = this.map.getCoordinateFromPixel([left, top])
-        let bottomRightPoint = this.map.getCoordinateFromPixel([right, bottom])
-        let [xmin, ymax] = topLeftPoint
-        let [xmax, ymin] = bottomRightPoint
-        // let coors = [[ [xmin, ymax], [xmax, ymax], [xmax, ymin], [xmin, ymin], [xmin, ymax], ]]
-        // let feature = new Feature({ geometry: new Polygon(coors) })
-        return [xmin, ymin, xmax, ymax]
-
-        function getOffsetTop(el) {
-            return el.offsetParent ? el.offsetTop + getOffsetTop(el.offsetParent) : el.offsetTop
-        }
-        function getOffsetLeft(el) {
-            return el.offsetParent ? el.offsetLeft + getOffsetLeft(el.offsetParent) : el.offsetLeft
-        }
-    }
-
-    // 多个要素点获取中心点
-    getCenterFromFeatures(features) {
-        if (!Array.isArray(features)) {
-            features = [features]
-        }
-        let pointsArr = features.map(fea => this.getCenter(fea))
-        let xmin, xmax, ymin, ymax
-        pointsArr.forEach(point => {
-            let [x, y] = point
-            xmin = xmin ? Math.min.call(null, x, xmin) : x
-            xmax = xmax ? Math.max.call(null, x, xmax) : x
-            ymin = ymin ? Math.min.call(null, y, ymin) : y
-            ymax = ymax ? Math.max.call(null, y, ymax) : y
-        })
-        return [(xmin + xmax) / 2, (ymin + ymax) / 2]
-
-        // 把多维坐标转化为一维
-        function format(arr) {
-        }
-    }
-
-    static getCenterFromFeatures (features) {
-        let pointsArr = features.map(fea => this.getCenter(fea))
-        let xmin, xmax, ymin, ymax
-        pointsArr.forEach(point => {
-            let [x, y] = point
-            xmin = xmin ? Math.min.call(null, x, xmin) : x
-            xmax = xmax ? Math.max.call(null, x, xmax) : x
-            ymin = ymin ? Math.min.call(null, y, ymin) : y
-            ymax = ymax ? Math.max.call(null, y, ymax) : y
-        })
-        return [(xmin + xmax) / 2, (ymin + ymax) / 2]
-    }
-
-    // 当前范围内空间查询
-    queryForExtent(extent, layer) {
-        let [xmin, ymin, xmax, ymax] = extent
-        let coors = [[[xmin, ymax], [xmax, ymax], [xmax, ymin], [xmin, ymin], [xmin, ymax],]]
-        let feature = new Feature({ geometry: new Polygon(coors) })
-        let dataSetInfo = [{ name: "TF_PSPS_PIPE_B", label: "排水管" }]
-        new iQuery({ dataSetInfo }).spaceQuery(feature).then(resArr => {
-            let resFeaturesObj = resArr.filter((res: any) => res && res.result.featureCount !== 0)
-            let features = []
-            if (resFeaturesObj.length !== 0) {
-                resFeaturesObj.forEach((obj: any) => {
-                    let feas = new GeoJSON().readFeatures(obj.result.features)
-                    features = [...features, ...feas]
-                })
-                let colorBox = ["#f00", "#ff0", "#008000", "#00f", "#000"]
-                features = features.map((fea, index) => {
-                    // 随机给一个颜色
-                    let color = colorBox[index % 5], style
-                    if (fea.getGeometry() instanceof LineString) {
-                        style = comSymbol.getLineStyle(5, color)
-                    } else if (fea.getGeometry() instanceof Point) {
-                        style = comSymbol.getPointStyle(3, color)
-                    }
-                    fea.setStyle(style)
-                    return fea
-                })
-                layer.getSource().clear()
-                layer.getSource().addFeatures(features)
-                let data = features.map(fea => fea.values_)
-            }
-        })
-    }
-
-    // 获取字段
-    static getFields(layerName) {
-        return new Promise(resolve => {
-            getFieldByLayerName({ dataSetName: layerName }).then(res => {
-                if (res.code === 1) {
-                    let data = res.result
-                    resolve(format(data))
-                } else resolve(null)
-            })
-        })
-        function format(data) {
-            return data.filter(item => (item.smfieldcaption && item.smfieldcaption !== item.smfieldname)).map(item => {
-                let name = item.smfieldcaption.trim()
-                return { field: item.smfieldname, name }
-            })
-        }
-    }
-
-    // 获取字段唯一值
-    static getUniqueValue(layerName, field) {
-        return new Promise(resolve => {
-            getUniqueValueByFiled({ dataSetName: layerName, fieldName: field }).then(res => {
-                if (res && res.code === 1) {
-                    resolve(res.result)
-                } else resolve(null)
-            })
-        })
-    }
-
-    // 
-    static getAllSubLayerNames(parentLayerName, type) {
-        let layers = appconfig.gisResource['iserver_resource'].layerService.layers
-        let showlayers = layers.filter(layer => layer.type === type)
-        let filterLayer = showlayers.find(layer => layer.name = parentLayerName)
-        return filterLayer
-    }
-
-    /**
-      * 获取公共样式
-      * @param light 是否高亮
-      */
-    static getCommonStyle(light = false) {
-        let { point, stroke, fill } = light ? mapUtil.commonLightStyle : mapUtil.commonStyle
-        return new Style({
-            fill: new Fill({
-                color: fill.color
-            }),
-            stroke: new Stroke({
-                lineDash: stroke.dash,
-                color: stroke.color,
-                width: stroke.width
-            }),
-            image: new CircleStyle({
-                radius: point.size,
-                stroke: new Stroke({
-                    color: point.outerColor,
-                    width: point.outerWidth
-                }),
-                fill: new Fill({
-                    color: point.fill
-                })
-            })
-        })
-    }
-
-    // 设置中心点, 地图级别
-    setZoomAndCenter(zoom, center) {
-        let view = this.map.getView()
-        view.setZoom(zoom)
-        view.setCenter(center)
-    }
-
-    
-    /**
-      * 超图图层组子图层显隐, 只适合图层组, 会修改 config 公共配置
-      * @param layersConfig 图层配置
-      */
-    setGroupLayerVisible(layersConfig?) {
-        let layers =  layersConfig || appconfig.gisResource['iserver_resource'].layerService.layers
-        let parentLayer = layers.find(layer => layer.type === 'smlayergroup')
-        let ids = [], idsStr = ''
-        let url = parentLayer.url
-        parentLayer.sublayers.forEach(group => {
-            group.sublayers.forEach(sub => {
-                // if (parentName && group.name === parentName && layersVisble.some(layer => layer.name === sub.name)) {
-                //     sub.visible = layersVisble.find(layer => layer.name === sub.name).visible
-                // }
-                if (sub.visible) { ids.push(sub.id) }
-            })
-        })
-        let findLayer = this.map.getLayers().getArray().find(layer => layer.get('type') === 'smlayergroup')
-        if (ids.length === 0) {
-            idsStr = '[]'
-            findLayer.setVisible(false)
-        } else { 
-            idsStr = `[0:${ids.join(",")}]`
-            let source = new TileSuperMapRest({ url, layersID: idsStr, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-            findLayer.setSource(source)
-            findLayer.setVisible(true)
-        }
-    }
-    /**
-      * 大屏超图图层组子图层显隐, 只适合图层组, 会修改 config 公共配置
-      * @param layersConfig 图层配置
-      */
-     setBigScreenGroupLayerVisible(layersConfig?) {
-        let layers =  layersConfig || appconfig.bigScreenMapService['layerService'].layers
-        let parentLayer = layers.find(layer => layer.type === 'bigScreenPipeMap')
-        let ids = [], idsStr = ''
-        let url = parentLayer.url
-        parentLayer.sublayers.forEach(group => {
-            group.sublayers.forEach(sub => {
-                if (sub.visible) { ids.push(sub.id) }
-            })
-        })
-        let findLayer = this.map.getLayers().getArray().find(layer => layer.get('type') === 'bigScreenPipeMap')
-        if (ids.length === 0) {
-            idsStr = '[]'
-            findLayer.setVisible(false)
-        } else { 
-            idsStr = `[0:${ids.join(",")}]`
-            let source = new TileSuperMapRest({ url, layersID: idsStr, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-            findLayer.setSource(source)
-            findLayer.setVisible(true)
-        }
-    }
-    // 设置获取图层组显隐 source
-    getChangeResource (layers,layerName, visible) {
-        layers.forEach(group => {
-            // if(group.type!=='smlayergroup') return
-            group.sublayers.forEach(sub => {
-                sub.sublayers.forEach(child=>{
-                    if (child.name === layerName) { child.visible = visible }
-                })
-            })
-        })
-        return layers
-    }
-    deepClone(obj) {
-        let clone
-        if (obj instanceof Array) {
-          clone = [...obj]
-          clone.forEach((item, i) => {
-            if (item instanceof Array || item instanceof Object) {
-              clone[i] = this.deepClone(item)
-            } else {
-              clone[i] = item
-            }
-          })
-        } else if (obj instanceof Object) {
-          clone = { ...obj }
-          for (let i in obj) {
-            if (obj[i] instanceof Object || obj[i] instanceof Array) {
-              clone[i] = this.deepClone(obj[i])
-            } else {
-              clone[i] = obj[i]
-            }
-          }
-        }
-        return clone
-    }
-    setSingleLayerVisible() {
-        let layers =  appconfig.gisResource['iserver_resource'].layerService.layers
-        let parentLayer = layers.find(layer => layer.type === 'smlayer')
-        new TF_Layer().createLayers([parentLayer]).then(layers => {
-            let layerInMap = this.map.getLayers().getArray().find(layer => layer.get('name') === parentLayer.name)
-            this.map.removeLayer(layerInMap)
-            this.map.addLayer(layers[0])
-        })
-    }
-}

+ 0 - 135
src/views/zhpt/common/mapUtil/disAnalysis.ts

@@ -1,135 +0,0 @@
-import * as turf from '@turf/turf'
-import * as olSphere from 'ol/sphere';
-import { LineString } from 'ol/geom';
-import GeoJSON from 'ol/format/GeoJSON'
-
-export default class DisAnalysisTool {
-    private Field = {
-        diaMeterField: "PSIZE", // 管径
-        edeepField: "E_DEEP", // 终点埋深
-        sdeppField: "S_DEEP", // 起点埋深
-        diaMeterField2: "DIAMETER", // 管径
-        edeepField2: "END_DEPTH", // 终点埋深
-        sdeppField2: "START_DEPTH" // 起点埋深
-    }
-    /**
-     * 是否相交
-     * @param firstGeometry 要素1 linegeometry
-     * @param secendGeometry 要素2 linegeometry
-     */
-    isIntersect (firstGeometry, secendGeometry) {
-        let firstLine = turf.lineString(firstGeometry.getCoordinates())
-        let secondtLine = turf.lineString(secendGeometry.getCoordinates())
-        let obj = turf.lineIntersect(firstLine, secondtLine)
-        return {
-            isIntersect: obj.features.length !== 0,
-            features: obj.features
-        }
-    }
-
-    /**
-     * 水平净距
-     * @param firstGeometry 管段要素1 linegeometry
-     * @param secendGeometry 管段要素2 linegeometry
-     * @param sdiameter 管径
-     * @param cdiameter 比较管径
-     */
-    closetHzDis (firstGeometry, secendGeometry, sdiameter, cdiameter) {
-        let res = {
-            dis: '',
-            hasDis: false
-        }
-        let sumDiameter = (this.formatSize(sdiameter, 0) + this.formatSize(cdiameter, 0)) / 2000
-        if (!this.isIntersect(firstGeometry, secendGeometry).isIntersect) {
-            let firstCoors = firstGeometry.getCoordinates()
-            let secendCoors = secendGeometry.getCoordinates()
-            
-            let lengths = []
-            // 管段1 距离 管段2 的最短距离
-            firstCoors.forEach(point => {
-                let length = this.minDisWithPointOnLine(point, secendCoors)
-                lengths.push(length)
-            })
-            // 管段2 距离 管段1 的最短距离
-            secendCoors.forEach(point => {
-                let length = this.minDisWithPointOnLine(point, firstCoors)
-                lengths.push(length)
-            })
-            res.dis = (Math.min.apply(null, lengths) - sumDiameter).toFixed(4)
-            res.hasDis = true
-        }
-        return res
-    }
-    
-    /**
-     * 垂直净距
-     * @param firstFeature 管段 linefeature
-     * @param secendFeature 比较管段 linefeature
-     */
-    closetVcDis (firstFeature, secendFeature) {
-        let res = { dis: "", hasDis: false }
-        let firstGeometry = firstFeature.getGeometry(), 
-            secendGeometry = secendFeature.getGeometry()
-        let sdiameter = firstFeature.get(this.Field["diaMeterField"]) || firstFeature.get(this.Field["diaMeterField2"]),
-            cdiameter = secendFeature.get(this.Field["diaMeterField"]) || secendFeature.get(this.Field["diaMeterField2"])
-
-        let sumDiameter = (this.formatSize(sdiameter, 0) + this.formatSize(cdiameter, 0)) / 2000
-        let instersectPoints = this.isIntersect(firstGeometry, secendGeometry).features
-
-        let fStartDeep = firstFeature.get(this.Field["sdeppField"]) || firstFeature.get(this.Field["sdeppField2"]),
-            fEndDeep = firstFeature.get(this.Field["edeepField"]) || firstFeature.get(this.Field["edeepField2"]),
-            sStartDeep = secendFeature.get(this.Field["sdeppField"]) || secendFeature.get(this.Field["sdeppField2"]),
-            sEndDeep = secendFeature.get(this.Field["edeepField"]) || secendFeature.get(this.Field["edeepField2"])
-
-        if (!(sdiameter && cdiameter && fStartDeep && fEndDeep && sStartDeep && sEndDeep)) return { errorText: '数据不完整' }
-        
-        if (instersectPoints.length !== 0) {
-            let instersectPoint = new GeoJSON().readFeature(instersectPoints[0]).getGeometry()
-            let crossPointOnFirDeep = this.getCrossPointDepth(firstGeometry, instersectPoint, fStartDeep, fEndDeep)
-            let crossPointOnSecDeep = this.getCrossPointDepth(secendGeometry, instersectPoint, sStartDeep, sEndDeep)
-            
-            res.dis = (Math.abs(crossPointOnFirDeep - crossPointOnSecDeep) - sumDiameter).toFixed(3)
-            res.hasDis = true
-        }
-        return res
-    }
-    /**
-     * 标准化管径
-     * @param diaMeterStr 
-     * @param type { 1: 垂直, 0: 水平 }
-     */
-    formatSize (diaMeterStr, type) {
-        let diaMeter = diaMeterStr.split(/X|\*/)[type]
-        return Number(diaMeter)
-    }
-
-    /**
-     * 点到直线最短距离
-     * @param pointCoors 点坐标
-     * @param lineCoors 先做表
-     */
-    minDisWithPointOnLine (pointCoors, lineCoors) {
-        let closestPoint = turf.nearestPointOnLine(turf.lineString(lineCoors), turf.point(pointCoors), { units: 'kilometers' });
-        return olSphere.getLength(new LineString([pointCoors, closestPoint.geometry.coordinates]), { projection: "EPSG:4326" })
-    }
-    /**
-     * 获交点深
-     * @param lineWithPoint 管段
-     * @param point 交点
-     * @param startDeep 起点埋深
-     * @param endDeep 终点埋深
-     */
-    getCrossPointDepth (lineWithPoint, point, startDeep, endDeep) {
-        let LineCoordinates = lineWithPoint.getCoordinates(), 
-            pointCoordinates = point.getCoordinates()
-        let lineLength = olSphere.getLength(lineWithPoint, { projection: "EPSG:4326" })
-        // 起点比终点低 使用管段起点否则用终点
-        let pointLength = olSphere.getLength(new LineString([LineCoordinates[startDeep > endDeep ? 0 : 1], pointCoordinates]), { projection: "EPSG:4326" })
-        
-        let crossPointEva = 0
-        if (lineLength) {
-            crossPointEva = (pointLength / lineLength) * Math.abs((startDeep - endDeep));
-        }
-        return Math.max.apply(null, [startDeep, endDeep]) - crossPointEva
-    }
-}

+ 0 - 149
src/views/zhpt/common/mapUtil/draw.ts

@@ -1,149 +0,0 @@
-import { Draw } from "ol/interaction";
-import { createBox } from "ol/interaction/Draw";
-import { Vector as VectorSource } from "ol/source";
-import { Vector as VectorLayer } from "ol/layer";
-import { comSymbol } from "@/utils/comSymbol";
-import Overlay from 'ol/Overlay';
-
-
-export default class iDraw {
-    map = null // 地图
-
-    drawer = null // 绘制器 
-
-    type = "" // 绘制类型
-    
-    vectorSource = null // 绘制图层源
-
-    vectorLayer = null // 绘制图层
-
-    startDrawCallBack = null // 开始绘制时回调
-
-    conditionCallBack = null // 
-
-    endDrawCallback = null // 结束绘制时回调
-
-    showCloser = true // 是否显示关闭
-
-    overlay = null // 绘制图形关闭
-
-    maxLength = 1e3 // 最多绘制点数
-
-    drawStyle=null //绘制样式
-
-    drawType = {
-        line: "LineString", // 线
-        polygon: "Polygon", // 面
-        point: "Point", // 点
-        rect: "Circle", // 框
-        circle: "Circle" // 圆
-    } // 绘制类型
-
-    constructor (map, type, { startDrawCallBack = null, conditionCallBack = null, endDrawCallBack = null, showCloser = true, maxLength = 1e3 ,drawStyle=null}) {
-        if (!map) throw new Error("绘制器没有地图对象")
-        if (!type) throw new Error(`无绘制类型`)
-        this.map = map
-        this.type = type
-        this.startDrawCallBack = startDrawCallBack
-        this.endDrawCallback = endDrawCallBack
-        this.conditionCallBack = conditionCallBack
-        this.showCloser = showCloser
-        this.maxLength = maxLength
-        this.drawStyle = drawStyle
-        this.init()
-    }
-
-    private init () {
-        this.vectorSource = new VectorSource({ wrapX: false })
-        this.vectorLayer = new VectorLayer({
-            source: this.vectorSource,
-            style:  ! this.drawStyle 
-                    ? comSymbol.getAllStyle(7, "#f40", 2, "#409EFF")
-                    : comSymbol.getAllStyle(this.drawStyle.pointSize, this.drawStyle.pointColor, this.drawStyle.lineWidth, this.drawStyle.lineColor)
-        })
-        this.map.addLayer(this.vectorLayer);
-        this.vectorLayer.setZIndex(99)
-    }
-
-    start () {
-        // 初始化绘制
-        let geometryFunction = this.type === "rect" ? { geometryFunction: createBox() } : {}
-
-        this.drawer = new Draw({
-            source: this.vectorSource,
-            type: this.drawType[this.type],
-            maxPoints: this.maxLength,
-            style: !this.drawStyle ? comSymbol.getDrawStyle(5, "#f40", 2, "#409EFF") :
-                    comSymbol.getDrawStyle(this.drawStyle.pointSize, this.drawStyle.pointColor, this.drawStyle.lineWidth, this.drawStyle.lineColor,this.drawStyle.fillColor,this.drawStyle.lineDash),
-            condition: evt => {
-                this.conditionCallBack && this.conditionCallBack(evt)
-                return true
-            },
-            ...geometryFunction
-        } as any);
-        
-        // 监听绘制
-        this.drawer.on("drawstart", evt => {
-            this.startDrawCallBack && this.startDrawCallBack()
-        })
-
-        this.drawer.on("drawend", evt => {
-            let lastPoint = evt.feature.getGeometry().getLastCoordinate()
-            this.showCloser && this.addCloser(lastPoint, evt.feature)
-            this.endDrawCallback && this.endDrawCallback(evt.feature)
-        })
-
-        // 添加绘制
-        this.map.addInteraction(this.drawer);
-    }
-    // 结束绘制
-    end () {
-        this.clear()
-        this.remove()
-        this.map = null        
-    }
-    // 移除事件
-    remove () {
-        this.map && this.map.removeInteraction(this.drawer)
-        this.drawer = null
-    }
-    // 绘制图形
-    clear () {
-        this.vectorSource && this.vectorSource.clear()
-        this.map && this.map.removeLayer(this.vectorLayer)
-        this.overlay && this.overlay.setPosition(null)
-        this.vectorSource = this.vectorLayer = this.overlay = null
-    }
-    //
-    clearFea () {
-        this.vectorSource && this.vectorSource.clear()
-    }
-    // crosshair, auto
-    setCursor (cursorStyle = "auto") {
-        this.map.getTargetElement().style.cursor = cursorStyle
-    }
-
-    // 创建一个关闭按钮
-    addCloser(position, feature) {
-        let element = document.createElement('div') as any;
-        element.style = 'cursor: pointer; width: 20px;height: 17px;background: #fff;text-align: center;border: 1px solid;line-height: 12px;font-size: 15px;'
-        element.innerHTML = `<div title='关闭'>x</div>`
-        let overlay = new Overlay({
-            element: element,
-            autoPan: false,
-            positioning: "bottom-center",
-            id: "drawFeatureCloser" + Math.floor(Math.random() * 1e6),
-            stopEvent: false
-        });
-        this.overlay = overlay
-        this.map.addOverlay(overlay)
-        overlay.setPosition(position)
-
-        element.addEventListener("click", evt => {
-            this.vectorSource.removeFeature(feature)
-            overlay.setPosition(null)
-            evt.stopPropagation()
-        })
-    }
-
-}

+ 0 - 263
src/views/zhpt/common/mapUtil/layer.ts

@@ -1,263 +0,0 @@
-import TileLayer from 'ol/layer/Tile'
-import VectorLayer from 'ol/layer/Vector';
-import { Vector as VectorSource, XYZ } from 'ol/source';
-import { WMTS } from 'ol/source'
-import * as olExtent from 'ol/extent'
-import WMTSTileGrid from 'ol/tilegrid/WMTS'
-import * as olProj from 'ol/proj'
-import { TileSuperMapRest, SuperMap, LayerInfoService, DatasetService } from '@supermap/iclient-ol'
-
-import { appconfig } from 'staticPub/config';
-
-export class TF_Layer {
-
-    projection = 'EPSG:4326'
-
-    hasKey = false
-
-    constructor(hasKey = false) {
-        this.hasKey = hasKey
-    }
-
-    createLayer({ properties = {}, type, visible = true, url }) {
-        let layer = null
-        // 加入 key
-        switch (type) {
-            case "smlayer": layer = this.SM_Layer_old(url)
-                break
-            case "tdtlayer": layer = this.TDT_Layer(url)
-                break
-            case "vector": layer = this.VT_Layer()
-                break
-            case "wmtslayer": layer = this.WMTS_Layer(url)
-                break
-            default:
-                break
-        }
-        // 加入属性
-        if (layer) {
-            for (let i in properties) {
-                layer.set(i, properties[i])
-            }
-            layer.setVisible(visible)
-        }
-        return layer
-    }
-    // 创建多个图层
-    // 超图图层异步加载
-    createLayers(layerSources) {
-        let promises = layerSources.map(layersource => {
-            let { name, type, visible, sublayers, url, title } = layersource
-            let properties = { type, name, title }
-            let layer = null
-            switch (type) {
-                case "smlayer": layer = this.SM_Layer(url, sublayers, visible, properties)
-                    break
-                case 'smlayergroup': layer = this.SM_layerGroup(url, visible, properties)
-                    break
-                case "tdtlayer": layer = this.TDT_Layer(url)
-                    break
-                case "vector": layer = this.VT_Layer()
-                    break
-                case "wmtslayer": layer = this.WMTS_Layer(url)
-                    break
-                case 'bigScreenPipeMap':layer = this.SM_BigScreenLayerGroup(url, visible, properties)
-                    break
-                default:
-                    break
-            }
-            // 加入属性
-            if (["tdtlayer", "vector", "wmtslayer"].includes(type)) {
-                for (let i in properties) {
-                    layer.set(i, properties[i])
-                }
-                layer.setVisible(visible)
-            }
-            return layer
-        })
-        return Promise.all(promises)
-    }
-
-    // 超图 图层组
-    SM_layerGroup (url = '', visible = true, properties = {}) {
-        let layerInfo = new LayerInfoService(url)
-        return new Promise(resolve => {
-            layerInfo.getLayersInfo(res => {
-                let layer = null
-                if (res) {
-                    this.setLayerConfig(res.result)
-                    this.setDataConfig(res.result.subLayers.layers)
-                    let source = new TileSuperMapRest({ url, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-                    let layer = new TileLayer({ source, properties: { projection: this.projection } })
-                    //
-                    for (let i in properties) {
-                        layer.set(i, properties[i])
-                    }
-                    layer.setVisible(visible)
-                    resolve(layer)
-                } else resolve(layer)
-                
-            })
-        })
-    }
-    // 配置子图层服务
-    setLayerConfig (layerData) {
-        let layerConfig = appconfig.gisResource['iserver_resource'].layerService.layers
-        let layerGroups = layerData.subLayers.layers,
-            parentName = layerData.name
-            
-        layerConfig.forEach(parentlayer => {
-            if (parentlayer.name === parentName) {
-                parentlayer.sublayers = layerGroups.map((groups, pi) => {
-                    let layers = groups.subLayers.layers
-                    let sublayers = layers.map((layer, si) => {
-                        return { title: layer.caption, visible: true, id: `${pi}.${si}`, name: layer.name }
-                    })
-                    return { name: groups.name, visible: true, sublayers, title: groups.caption }
-                })
-            }
-        })
-    }
-    // 配置数据服务
-    setDataConfig (layers) {
-        let serviceConfig = appconfig.gisResource['iserver_resource'].dataService
-        serviceConfig.dataSetInfo = layers.map(layer => layer.subLayers.layers.map(sub => {
-            return { name: sub.name.split('@')[0], title: sub.caption, label: sub.caption }
-        })).flat()
-        console.log('配置数据服务', serviceConfig.dataSetInfo)
-        // let { url, dataSource } = serviceConfig
-        // new DatasetService(url).getDatasets(dataSource, res => {
-        //     let dataSets = res.result.datasetNames.filter(item => !item.includes('_3D') && item.includes('TF_'))
-        //     console.log('获取数据服务', dataSets)
-        //     serviceConfig.dataSetInfo = dataSets.map(item => {
-        //         return { name: item, title: '', label: '' }
-        //     })
-        // })
-    }
-    // 超图切片图层
-    // 设置临时图层
-    SM_Layer(url = "", sublayers, visible = true, properties = {}) {
-        if (!url) return null
-        let layerinfo = new LayerInfoService(url)
-        return new Promise(resolve => {
-            layerinfo.getLayersInfo(res => {
-                if (res.type !== "processFailed") {
-                    let resSublayers = res.result.subLayers.layers
-                    const newLayers = resSublayers.map(item => {
-                        let findlayerObj = sublayers.find(sublayer => `${sublayer.name}@tofly` === item.name)
-                        return new SuperMap.LayerStatus({ "layerName": item.name, "isVisible": !!findlayerObj && findlayerObj.visible });
-                    })
-                    // 更新后的图层信息
-                    const statusparam = new SuperMap.SetLayerStatusParameters({ layerStatusList: newLayers });
-                    layerinfo.setLayerStatus(statusparam, newRes => {
-                        let layersID = newRes.result.newResourceID
-                        let source = new TileSuperMapRest({ url, layersID, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-                        let layer = new TileLayer({ source, properties: { projection: this.projection } })
-                        for (let i in properties) {
-                            layer.set(i, properties[i])
-                        }
-                        layer.setVisible(visible)
-                        resolve(layer)
-                    })
-                } else resolve(null)
-            })
-        })
-        // appconfig.gisResource['iserver_resource'].layerService.layers
-    }
-    SM_Layer_old(url = '') {
-        if (!url) return null
-        let source = new TileSuperMapRest({ url, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-        return new TileLayer({ source, properties: { projection: this.projection } })
-    }
-
-
-    // 天地图 瓦片
-    TDT_Layer(url = "") {
-        if (!url) return null
-        if (!this.hasKey) { url += appconfig.tianMapKey };
-        return new TileLayer({
-            source: new XYZ({
-                crossOrigin: 'anonymous',
-                url: url,
-                wrapX: true
-            }),
-        })
-    }
-    // 矢量图层
-    VT_Layer() {
-        return new VectorLayer({ source: new VectorSource() })
-    }
-    // 天地图 WMTS 
-    WMTS_Layer(url) {
-        let projection = olProj.get(this.projection)
-        let extent = projection.getExtent()
-        let width = olExtent.getWidth(extent)
-
-        let resolutions = [], matrixIds = []
-        for (let z = 1; z < 19; z++) {
-            resolutions[z] = width / (256 * Math.pow(2, z))
-            matrixIds[z] = z
-        }
-        let tileGrid = new WMTSTileGrid({
-            origin: olExtent.getTopLeft(extent),
-            resolutions,
-            matrixIds
-        })
-
-        // 匹配坐标系、图层类型
-        let type = url.match(new RegExp(/\/(.{3})_(c|w)\//))
-        if (!this.hasKey) { url += appconfig.tianMapKey };
-        return new TileLayer({
-            source: new WMTS({
-                crossOrigin: "anonymous",
-                url: url,
-                layer: type[1],
-                matrixSet: type[2],
-                format: 'tiles',
-                style: 'default',
-                wrapX: true,
-                projection: projection,
-                tileGrid
-            })
-        })
-    }
-
-    //大屏地图图层组
-    SM_BigScreenLayerGroup (url = '', visible = true, properties = {}) {
-        let layerInfo = new LayerInfoService(url)
-        return new Promise(resolve => {
-            layerInfo.getLayersInfo(res => {
-                let layer = null
-                if (res) {
-                    this.setBigScreenLayerConfig(res.result)
-                    let source = new TileSuperMapRest({ url, cacheEnabled: false, crossOrigin: 'anonymous', wrapX: true })
-                    let layer = new TileLayer({ source, properties: { projection: this.projection } })
-                    for (let i in properties) {
-                        layer.set(i, properties[i])
-                    }
-                    layer.setVisible(visible)
-                    resolve(layer)
-                } else resolve(layer)
-                
-            })
-        })
-    }
-    //配置大屏子图层服务
-    setBigScreenLayerConfig(layerData){
-        let layerConfig = appconfig.bigScreenMapService['layerService'].layers
-        let layerGroups = layerData.subLayers.layers,
-            parentName = layerData.name
-            
-        layerConfig.forEach(parentlayer => {
-            if (parentlayer.name === parentName) {
-                parentlayer.sublayers = layerGroups.map((groups, pi) => {
-                    let layers = groups.subLayers.layers
-                    let sublayers = layers.map((layer, si) => {
-                        return { title: layer.caption, visible: true, id: `${pi}.${si}`, name: layer.name }
-                    })
-                    return { name: groups.name, visible: true, sublayers, title: groups.caption }
-                })
-            }
-        })
-    }
-} 

+ 0 - 54
src/views/zhpt/common/mapUtil/netAnalysis.ts

@@ -1,54 +0,0 @@
-import { SuperMap, NetworkAnalystService } from '@supermap/iclient-ol';
-import { appconfig } from 'staticPub/config'
-
-// 网络分析
-export default class iNetAnalysis {
-    analysisUrl = null
-
-    analysisService = null
-
-    weightField = "SmLength" // 管网权重字段
-
-    analysisParams = null
-
-    // weightField: 权重字段
-    constructor (weightField) {
-        this.analysisUrl = appconfig.gisResource['iserver_resource'].netAnalysisService.url
-        this.weightField = weightField || this.weightField
-        this.init()
-    }
-
-    private init () {
-        let resSetting = new SuperMap.TransportationAnalystResultSetting({
-            returnEdgeFeatures: true,
-            returnEdgeGeometry: true,
-            returnEdgeIDs: true,
-            returnNodeFeatures: true,
-            returnNodeGeometry: true,
-            returnNodeIDs: true,
-            returnPathGuides: true,
-            returnRoutes: true
-        });
-        this.analysisParams = new SuperMap.TransportationAnalystParameter({
-            resultSetting: resSetting,
-            weightFieldName: this.weightField
-        });
-        this.analysisService = new NetworkAnalystService(this.analysisUrl)
-    }
-    
-    // 最佳路径 纵剖面分析
-    findPath (firstPoint, endPoint) {
-        let params = new SuperMap.FindPathParameters({
-            isAnalyzeById: false,
-            nodes: [firstPoint, endPoint], // 加入起点和终点坐标或者 [ids]
-            hasLeastEdgeCount: false,
-            parameter: this.analysisParams
-        });
-        return new Promise(resolve => {
-            this.analysisService.findPath(params, res => {
-                if (res.type === "processFailed") resolve(null)
-                else resolve(res)
-            })
-        })
-    }
-}

+ 0 - 74
src/views/zhpt/common/mapUtil/proj.ts

@@ -1,74 +0,0 @@
-import { Projection, addProjection, get as getProjection, transform } from 'ol/proj';
-import proj4 from 'proj4'
-import { register as olRegisterProj } from 'ol/proj/proj4';
-
-export class projUtil {
-    // 坐标系定义
-    // TODO 自定义坐标系
-    defs = {
-        'EPSG:4544': 'PROJCS["CGCS2000_3_Degree_GK_CM_105E",GEOGCS["GCS_China_Geodetic_Coordinate_System_2000",DATUM["D_China_2000",SPHEROID["CGCS2000",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",105.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",4544]]',
-        'EPSG:4543': 'PROJCS["CGCS2000_3_Degree_GK_CM_102E",GEOGCS["GCS_China_Geodetic_Coordinate_System_2000",DATUM["D_China_2000",SPHEROID["CGCS2000",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",102.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",4543]]',
-        'EPSG:4495': 'PROJCS["CGCS2000_3_Degree_GK_CM_102E",GEOGCS["GCS_China_Geodetic_Coordinate_System_2000",DATUM["D_China_2000",SPHEROID["CGCS2000",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",99.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",4495]]'
-    }
-
-    // 坐标系 doc
-    projName = {
-        proj84: "EPSG:4326", // ol
-        proj57: "EPSG:3857", // ol
-        proj43: "EPSG:4543", // pzh
-        proj95: "EPSG:4495",
-        proj44: "EPSG:4544"
-    }
-
-    constructor () {
-        this.init()
-    }
-
-    // 初始化
-    init () {
-    }
-
-    // 判断 ol 是否有该坐标
-    hasProj (projName) {
-        return !!this.projName[projName]
-    }
-
-    // 坐标系注册
-    resgis (projNames) {
-        if (!Array.isArray(projNames)) {
-            projNames = [projNames]
-        }
-        projNames.forEach(projname => {
-            let projLike = this.projName[projname]
-            proj4.defs(projLike, this.defs[projLike])
-            olRegisterProj(proj4);
-        })
-    }
-
-    // 获取 projectionLike
-    get (projName) {
-        if (this.hasProj(projName)) {
-            return this.projName[projName]
-        }
-        return ''
-    }
-
-    getAllProj () {
-        return Object.keys(this.projName).map(name => this.projName[name])
-    }
-
-    // 添加坐标系
-    add ({ projectName, projectLIke, def }) {
-        // TODO 验证 projectLIke ,def
-        this.projName[projectName] = projectLIke
-        this.defs[projectLIke] = def
-    }
-
-    // 坐标转换
-    transform (point, formProjName, toProjName) {
-        let formProjLike = this.projName[formProjName]
-        let toProjLike = this.projName[toProjName]
-        // let point2 = proj4(formProjLike, toProjLike, point) // 转换结果一致
-        return transform(point, formProjLike, toProjLike)
-    }
-}

+ 0 - 154
src/views/zhpt/common/mapUtil/query.ts

@@ -1,154 +0,0 @@
-import { SuperMap, FeatureService, FieldService } from '@supermap/iclient-ol';
-import GeoJSON from 'ol/format/GeoJSON';
-import Feature from 'ol/Feature';
-import { Circle, LineString } from 'ol/geom';
-import * as olSphere from 'ol/sphere';
-import * as turf from '@turf/turf'
-import { appconfig } from 'staticPub/config'
-
-export default class iQuery {
-
-    dataServiceUrl = '' // 服务地址
-    dataSource = null // 数据源
-    dataSetInfo = null // 数据集
-    featureService = null // 查询服务
-    maxFeatures = 1e5 // 最大返回要素数量
-
-    projection = "EPSG:4326"
-
-    // 空间查询模式
-    spatialQueryMode = {
-        CROSS: "CROSS",
-        INTERSECT: "INTERSECT",
-        NONE: "NONE",
-        CONTAIN: "CONTAIN"
-    }
-
-    constructor(obj = { dataSetInfo: null }) {
-        this.init(obj.dataSetInfo)
-    }
-
-    private init(info) {
-        let { url, dataSource, dataSetInfo } = appconfig.gisResource['iserver_resource'].dataService
-        this.dataServiceUrl = url
-        this.dataSource = dataSource
-        this.dataSetInfo = info || dataSetInfo // 默认加载全部
-        this.featureService = new FeatureService(this.dataServiceUrl)
-    }
-
-    // 空间查询
-    spaceQuery(queryFeature) {
-        if (!(queryFeature instanceof Feature)) {
-            queryFeature = new GeoJSON().readFeature(queryFeature)
-        } else if (queryFeature.getGeometry() instanceof Circle) {
-            // 空间查询 不支持圆, 把圆转换为 buffer / polygon
-            let center = queryFeature.getGeometry().getCenter()
-            let radius = queryFeature.getGeometry().getRadius()
-            let dis = olSphere.getLength(new LineString([center, [center[0] + radius, center[1]]]), { projection: this.projection })
-            queryFeature = new GeoJSON().readFeature(turf.buffer(turf.point(center), dis / 1000, { units: 'kilometers' }))
-        }
-        let queryPromises = this.dataSetInfo.map(info => {
-            let layerName = info.label
-            let attachName = info.attachName
-            let tableName = info.name
-            return new Promise(resolve => {
-                let params = new SuperMap.GetFeaturesByGeometryParameters({
-                    toIndex: -1,
-                    maxFeatures: this.maxFeatures,
-                    datasetNames: [this.dataSource + ':' + info.name],
-                    geometry: queryFeature.getGeometry(),
-                    spatialQueryMode: this.spatialQueryMode["INTERSECT"] // 相交空间查询模式
-                })
-                this.featureService.getFeaturesByGeometry(params, result => {
-                    if (result.type == "processFailed") resolve(null);
-                    else {
-                        result.layerName = layerName
-                        result.attachName = attachName
-                        result.tableName = tableName
-                        resolve(result)
-                    };
-                })
-            })
-        })
-        return Promise.all(queryPromises)
-    }
-
-    // 属性查询
-    sqlQuery(sqlStr, maxFeatures?) {
-        maxFeatures = maxFeatures || this.maxFeatures
-        // console.log("sql过滤条件", sqlStr)
-        let queryPromises = this.dataSetInfo.map(info => {
-            let layerName = info.label
-            let tableName = info.name
-            return new Promise(resolve => {
-                let params = new SuperMap.GetFeaturesBySQLParameters({
-                    maxFeatures: this.maxFeatures,
-                    toIndex: -1,
-                    datasetNames: [this.dataSource + ':' + info.name],
-                    queryParameter: { attributeFilter: sqlStr }
-                })
-                this.featureService.getFeaturesBySQL(params, result => {
-                    if (result.type == "processFailed") resolve(null);
-                    else {
-                        result.layerName = layerName
-                        result.tableName = tableName
-                        resolve(result)
-                    };
-                })
-            })
-        })
-        return Promise.all(queryPromises)
-    }
-
-    boundsQuery(bounds) {
-
-    }
-
-    // 缓冲区查询
-    bufferQuery(bufferFeature, bufferDis) {
-        if (!(bufferFeature instanceof Feature)) {
-            bufferFeature = new GeoJSON().readFeature(bufferFeature)
-        } else if (bufferFeature.getGeometry() instanceof Circle) {
-            // 超图查询 不支持圆, 把圆转换为点 buffer
-            let center = bufferFeature.getGeometry().getCenter()
-            let radius = bufferFeature.getGeometry().getRadius()
-            let dis = olSphere.getLength(new LineString([center, [center[0] + radius, center[1]]]), { projection: this.projection })
-            bufferFeature = new GeoJSON().readFeature(turf.buffer(turf.point(center), dis / 1000, { units: 'kilometers' }))
-        }
-        let queryPromises = this.dataSetInfo.map(info => {
-            let layerName = info.name
-            return new Promise(resolve => {
-                let params = new SuperMap.GetFeaturesByBufferParameters({
-                    bufferDistance: bufferDis,
-                    geometry: bufferFeature.getGeometry(),
-                    datasetNames: [this.dataSource + ':' + info.name],
-                    maxFeatures: 1e3
-                })
-                this.featureService.getFeaturesByBuffer(params, result => {
-                    if (result.type == "processFailed") resolve(null);
-                    else {
-                        result.layerName = layerName
-                        resolve(result)
-                    };
-                })
-            })
-        })
-        return Promise.all(queryPromises)
-    }
-
-    // 字段查询
-    getServerFields(dataSet) {
-        return new Promise(resolve => {
-            // 设置数据集,数据源
-            var param = new SuperMap.FieldParameters({
-                datasource: this.dataSource,
-                dataset: dataSet
-            });
-            // 创建字段查询实例
-            new FieldService(this.dataServiceUrl).getFields(param, serviceResult => {
-                if (serviceResult.type === "processFailed") resolve(null)
-                else resolve(serviceResult.result.fieldNames)
-            });
-        })
-    }
-}

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

@@ -33,7 +33,7 @@
             "
           /> -->
           <div id="mapView" class="mapView">
-            <cesium-map></cesium-map>
+            <!-- <cesium-map></cesium-map> -->
             <!-- <div
               id="any"
               ref="any"

+ 0 - 17
src/views/zhpt/tongyonggongju/Test/widget.vue

@@ -1,17 +0,0 @@
-<template>
-    <div>test</div>
-</template>
-
-<script>
-export default {
-  props: { param: Object },
-  
-  mounted () {
-    console.log("测试组件")
-  }
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 157
src/views/zhpt/tongyonggongju/analysisBox/widget.vue

@@ -1,157 +0,0 @@
-<template>
-  <div ref="analysisBox" style="width: 800px; height: 400px; position: absolute;">
-    <div ref="boxTitle" style="width:100%;height:30px;background:#2D74E7;padding:5px;color:#fff;cursor: move;">
-      <span style="line-height: 20px;">{{param.hasOwnProperty('title') ? param.title : '分析结果'}}</span>
-      <i class="el-icon-close" style="float:right;font-size:20px;cursor: pointer; font-weight: bold;" @click="close"></i>
-      <i  :class="isFull?'el-icon-full-screen':'el-icon-copy-document'" style="float:right;font-size:20px;cursor: pointer; font-weight: bold;" @click="fullOperation"></i>
-    </div>
-    <div style="width:100%;height:calc(100% - 29px);background:#fff;border: 1px solid #2D74E7;overflow: auto;">      
-      <el-tabs v-model="activeName" style="width:100%;">
-        <el-tab-pane v-for="item of tabs" :key="item.index" :label="item.label" :name="item.index"></el-tab-pane>
-      </el-tabs> 
-      <div style="width:100%;height:calc(100% - 55px);display:flex;">
-        <div ref="echart" style="flex:1;height:100%"></div>
-        <div ref="map" class="map-view" style="display:none;flex:0.4;height:100%"></div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import Echarts from 'echarts'
-import Map from 'ol/Map'
-import View from 'ol/View'
-
-import TileLayer from 'ol/layer/Tile';
-import { Vector as VectorSource, XYZ } from "ol/source";
-import { Vector as VectorLayer } from "ol/layer";
-import { TileSuperMapRest } from '@supermap/iclient-ol'
-import { TF_Layer } from '../../common/mapUtil/layer';
-import { Feature } from 'ol';
-
-export default {
-  name: 'AnalysisBox',
-  components: { Echarts },
-  props: { param: Object },
-  data() {
-    return {
-      activeName: '',
-      tabs: [],
-      isFull:true,
-      // paramL:null,
-      // isStatistics:false,
-      fullEchart: true
-    }
-  },
-  computed: {},
-  watch: { 
-    activeName(e) {
-        if(e != '') this.getData() 
-      },
-  },
-
-  mounted: function() {
-    var tabs = []    
-    for(let i=0,il=this.param.tabs,ii=il.length;i<ii;i++) {
-      tabs.push({ label:il[i].name, index: i.toString(), option: il[i].option, hasMap: il[i].mapOptions })
-    }
-    this.tabs = tabs
-    
-    this.myChart = Echarts.init(this.$refs.echart)
-    if (this.param.mapCenter) {
-      this.fullEchart = false
-      this.$nextTick(() => {
-        this.initMap(this.param.mapCenter)
-      })
-    }
-    this.activeName = '0'
-  },
-  methods: {
-    initMap (mapCenter) {
-      console.log("初始化地图")
-      let mapDom = this.$refs.map, 
-          echartDom = this.$refs.echart,
-          rootMap = this.param.that.mapView
-      echartDom.style.flex = "0.6"
-      this.myChart.resize()
-      mapDom.style.display = ''
-      let map = new Map({
-        target: mapDom,
-        view: new View({
-          center: mapCenter,
-          zoom: rootMap.getView().getZoom(),
-          projection: 'EPSG:4326'
-        }),
-      })
-      console.log("图层树", rootMap.getLayers())
-      rootMap.getLayers().forEach(layer => {
-        let cloneLayer = clone(layer)
-        cloneLayer && map.addLayer(cloneLayer)
-      })
-
-      function clone (layer) {
-        if (layer instanceof TileLayer) {
-          if (layer.get("name").includes("影像")) return null
-          return layer.get("name").includes("矢量")
-          ? new TF_Layer(true).createLayer({ type: 'wmtslayer', url: layer.getSource()['urls'][0] })
-          : new TF_Layer(true).createLayer({ type: 'smlayer', url: layer.getSource()['_url'] })   
-        } else if (layer instanceof VectorLayer) {
-          let clonelayer = new VectorLayer({
-            source: new VectorSource(),
-            style: layer.getStyle()
-          })
-          let features = layer.getSource().getFeatures()
-          features.forEach(fea => clonelayer.getSource().addFeature(new Feature({ geometry: fea.getGeometry().clone() })))
-          return clonelayer
-        }
-      }
-    },
-    getData() {
-      var tab = this.tabs[this.activeName]
-      this.myChart.clear()
-      this.myChart.setOption(tab.option)
-    },
-    clear() {
-      this.myChart.clear()
-      this.activeName = ''
-      this.tabs = []
-    },
-    close() {
-      for(let i=0,il=this.$store.state.map.floatPanels,ii=il.length;i<ii;i++){
-        if(il[i].com == "analysisBox") {
-          this.param.show = false
-          il.splice(i, 1)
-          return
-        }
-      }
-    },
-    fullOperation(){
-      // debugger
-      if(this.isFull){
-        this.isFull=false;
-        this.$refs.analysisBox.style.width='100%';
-        this.$refs.analysisBox.style.height='100%';
-        this.myChart.resize()
-      }else{
-        this.isFull=true;
-        this.$refs.analysisBox.style.width='800px';
-        this.$refs.analysisBox.style.height='400px';
-        this.myChart.resize()
-      }
-    }
-  },
-  destroyed() {
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-  .map-view {
-    /deep/ .ol-zoom {
-      display: none !important;
-    }
-    /deep/ .ol-attribution {
-      display: none !important;
-    }
-  }
-</style>

+ 0 - 77
src/views/zhpt/tongyonggongju/analysisResult/widget.vue

@@ -1,77 +0,0 @@
-<template>
-  <div v-way="wayFun('mainDiv')" style="width: 100%; height: 100%">    
-    <el-tabs v-model="activeName">
-      <el-tab-pane v-for="item of tabs" :key="item.index" :label="item.label" :name="item.index"></el-tab-pane>
-    </el-tabs>    
-    <el-table class="mapTable" style="width:100%;" height="calc(100% - 47px)" tooltip-effect="dark" stripe :data="data" ref="table" row-class-name="selectRowC">
-      <el-table-column v-for="item of column" :key="item.value" :prop="item.value" :label="item.name">
-      </el-table-column>
-    </el-table>
-  </div>
-</template>
-
-<script>
-import TableItem from '@/components/Table'
-export default {
-  name: 'AnalysisResult',
-  components: { TableItem },
-  directives: {
-    way(el, bind) {
-      if (typeof bind.value === 'function') bind.value(el)
-    }
-  },
-  props: { param: Object },
-  data() {
-    return {
-      activeName: '',
-      tabs: [],
-      column: [],
-      data: [],
-      elements: {}
-    }
-  },
-  watch: { activeName(e) { if(e != '') this.getData() } },
-  mounted: function() {
-    var map = this.$store.state.map
-    if(map.analysisResult) {
-      map.analysisResult.table = this
-    } else {
-      map.analysisResult = { table: this }
-    }
-    this.elements['mainDiv'].parentElement.style.height = '100%'
-    this.elements['mainDiv'].parentElement.parentElement.style.height = 'calc(100% - 56px)'
-    this.elements['mainDiv'].parentElement.parentElement.parentElement.style.height = '100%'
-    // this.elements['table'].style.height = '100%'
-    // this.elements['table'].children[0].style.height = 'calc(100% - 36px)'
-    
-    var tables = []    
-    for(let i=0,il=this.param.tables,ii=il.length;i<ii;i++) {
-      tables.push({ label:il[i].name, index: i.toString(), columns: il[i].columns, rows: il[i].rows, })
-    }
-    this.tabs = tables
-    this.$nextTick(() => this.activeName = '0')
-  },
-  methods: {
-    getData() {
-      var dataTable = this.tabs[this.activeName]
-      this.column = dataTable.columns
-      this.data = dataTable.rows
-    },
-    clear() {
-      this.activeName = ''
-      this.tabs = []
-    },
-    wayFun: function(flag) {
-      return (el) => {
-        this.elements[flag] = el
-      }
-    }
-  },
-  destroyed() {    
-    delete this.$store.state.map.analysisResult.table
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 323
src/views/zhpt/tongyonggongju/anthorPanel/widget.vue

@@ -1,323 +0,0 @@
-<template>
-  <div style="padding: 0 8px;overflow:auto;">
-    <tf-legend class="legend_dept" label="模式选择" isopen="true" title="选择双屏协动模式。">
-      <el-checkbox v-model="followExtentC">中心同步</el-checkbox>
-      <el-checkbox v-model="followExtentZ">缩放同步</el-checkbox>
-    </tf-legend>
-    <tf-legend
-      class="legend_dept"
-      label="副视图基础图层"
-      isopen="true"
-      title="控制副视图中的基础图层显示,如需控制主视图请直接使用主视图的图层控制。"
-    >
-      <el-tree
-        ref="tree"
-        :data="layerTable"
-        node-key="id"
-        :default-expand-all="false"
-        show-checkbox
-        @check="subLayerChange"
-        :default-checked-keys="defaultCheckedKeys"
-      >
-        <!-- <el-row slot-scope="{ node, data }" class="custom-tree-node" style="width: 100%">
-          <el-tooltip placement="right" effect="light">
-            <div slot="content" style="width: 130px">
-              <div>
-                <span class="el-tree-node__label">透明度:{{ data.visibleNum }}</span>
-              </div>
-              <el-slider
-                v-if="data.id !==0 && data.id !== 1"
-                v-model="data.visibleNum"
-                input-size="mini"
-                @input="opacityChange(data)"
-                :disabled="!data.layer.values_.visible"
-              />
-            </div>
-            <span class="el-tree-node__label">{{ node.label }}</span>
-          </el-tooltip>
-        </el-row>-->
-      </el-tree>
-    </tf-legend>
-    <tf-legend
-      class="legend_dept"
-      label="副视图底图图层"
-      isopen="true"
-      title="控制副视图中的底图图层显示,如需控制主视图请直接使用主视图的图层控制。"
-    >
-      <el-row style="margin-top: 5px">
-        <el-col :span="10" style="padding-top:9px;">
-          <el-switch
-            v-model="showVectorBase"
-            style="display: block"
-            active-color="#2d74e7"
-            inactive-color="#ecf2ff"
-            active-text
-            inactive-text="矢量底图"
-            @change="baseMapChange(true)"
-          />
-        </el-col>
-        <el-col :span="6" style="transform: translateX(-5px);padding-top:9px;">
-          <span class="el-tree-node__label" style="white-space: nowrap;">透明度:{{ baseMapsNum[0] }}</span>
-        </el-col>
-        <el-col :span="8">
-          <el-slider
-            v-model="baseMapsNum[0]"
-            @input="inputBaseLayer(0)"
-            :disabled="!showVectorBase"
-          />
-        </el-col>
-      </el-row>
-      <el-row style="margin-top: 5px">
-        <el-col :span="10" style="padding-top:9px;">
-          <el-switch
-            v-model="showImageBase"
-            style="display: block"
-            active-color="#2d74e7"
-            inactive-color="#ecf2ff"
-            active-text
-            inactive-text="影像底图"
-            @change="baseMapChange(false)"
-          />
-        </el-col>
-        <el-col :span="6" style="transform: translateX(-5px);padding-top:9px;">
-          <span class="el-tree-node__label" style="white-space: nowrap;">透明度:{{ baseMapsNum[1] }}</span>
-        </el-col>
-        <el-col :span="8">
-          <el-slider
-            v-model="baseMapsNum[1]"
-            @input="inputBaseLayer(1)"
-            :disabled="!showImageBase"
-          />
-        </el-col>
-      </el-row>
-    </tf-legend>
-  </div>
-</template>
-
-<script>
-import tfLegend from '@/views/zhpt/common/Legend'
-import { appconfig } from 'staticPub/config'
-
-import 'ol/ol.css'
-import { default as Olmap } from 'ol/Map'
-import View from 'ol/View'
-import TileLayer from 'ol/layer/Tile'
-import * as control from 'ol/control'
-import { Logo, TileSuperMapRest } from '@supermap/iclient-ol'
-import { TF_Layer } from '@/views/zhpt/common/mapUtil/layer'
-import { defaults as controls } from 'ol/control'
-import { mapUtil } from '../../common/mapUtil/common'
-
-export default {
-  name: 'AnthorPanel',
-  components: { tfLegend },
-  props: { data: Object },
-  data() {
-    return {
-      mapDiv: undefined,
-      antP: undefined,
-      mapView: undefined,
-      showImageBase: false,
-      showVectorBase: true,
-      showLabel: true,
-      baseMaps: undefined,
-      baseMapsNum: [0, 0],
-      followExtentC: true,
-      followExtentZ: true,
-      layerTable: [],
-      pipeLayer: undefined,
-
-      currMap: null,
-      defaultCheckedKeys: [],
-      defaultProps: {
-        children: 'children',
-        label: 'label'
-      },
-      //
-      layerTree: '',
-      layersSource: []
-    }
-  },
-  created() {
-    let [treeName, type] = appconfig.initLayers.split('&&')
-    this.layerTree = treeName
-  },
-  mounted: function() {
-    this.antP = this.data.that.$refs.antP
-    this.antP.nextElementSibling.style.display = 'block'
-    this.antP.style.display = 'block'
-
-    var mapView = (this.mapView = this.data.mapView)
-    this.mapDiv = mapView.getTargetElement()
-    this.mapDiv.style.width = 'calc(50% - 2px)'
-    this.mapDiv.style.float = 'left'
-
-    this.mapView.updateSize() // 更新地图尺寸
-    this.loadOlMap(this.antP)
-  },
-  destroyed: function() {
-    this.antP.setAttribute('class', '')
-    this.antP.innerHTML = ''
-    this.antP.nextElementSibling.style.display = 'none'
-    this.antP.style.display = 'none'
-    this.mapDiv.style.width = this.mapDiv.style.float = ''
-    this.mapView.updateSize()
-  },
-  methods: {
-    loadOlMap(mapContainer) {
-      let layerResource = appconfig.gisResource['iserver_resource'].layerService.layers
-      let center = this.mapView.getView().getCenter()
-      let zoom = this.mapView.getView().getZoom()
-      let map = new Olmap({
-        target: mapContainer,
-        view: new View({ center, zoom, projection: 'EPSG:4326' }),
-        controls: controls({
-          zoom: false,
-          attribution: false
-        })
-      })
-      this.currMap = map
-
-      this.layersSource = this.deepClone(layerResource)
-      this.addLayers(this.layersSource)
-      this.setTreeData(this.layersSource)
-
-      this.mapView.getView().on('change', (evt) => {
-        let currView = map.getView()
-        let center = evt.target.getCenter(),
-          zoom = evt.target.getZoom()
-        this.setCenterAndZoom(currView, { center: this.followExtentC && center, zoom: this.followExtentZ && zoom })
-      })
-    },
-    deepClone(obj) {
-      let clone
-      if (obj instanceof Array) {
-        clone = [...obj]
-        clone.forEach((item, i) => {
-          if (item instanceof Array || item instanceof Object) {
-            clone[i] = this.deepClone(item)
-          } else {
-            clone[i] = item
-          }
-        })
-      } else if (obj instanceof Object) {
-        clone = { ...obj }
-        for (let i in obj) {
-          if (obj[i] instanceof Object || obj[i] instanceof Array) {
-            clone[i] = this.deepClone(obj[i])
-          } else {
-            clone[i] = obj[i]
-          }
-        }
-      }
-      return clone
-    },
-    setCenterAndZoom(view, { center = null, zoom = 0 }) {
-      center && view.setCenter(center)
-      zoom && view.setZoom(zoom)
-      // if (duration) {
-      //   view.animate({ duration }, center ? { center }: null, zoom ? { zoom }: null)
-      // } else {
-      //   center && view.setCenter(center)
-      //   zoom && view.setZoom(zoom)
-      // }
-    },
-
-    addLayers(layersSource) {
-      new TF_Layer().createLayers(layersSource).then((layers) => {
-        layers.forEach((layer) => {
-          layer && this.currMap.addLayer(layer)
-        })
-      })
-    },
-
-    setTreeData(layers) {
-      let showlayer = layers.find((layer) => layer.name === this.layerTree)
-      let ids = [],
-        id = 0
-      this.layerTable = showlayer.sublayers.map((parentlayer) => {
-        let parentName = parentlayer.name
-        let sublayers = parentlayer.sublayers.map((sublayer) => {
-          id++
-          if (sublayer.visible) {
-            ids.push(id)
-          }
-          return { id, label: sublayer.title, name: sublayer.name, parentName }
-        })
-        id++
-        return { id, label: parentlayer.title, name: parentName, children: sublayers }
-      })
-      this.defaultCheckedKeys = ids
-    },
-
-    subLayerChange(row, check) {
-      let visible = check.checkedKeys.includes(row.id)
-      let isParent = !row.parentName, parentName, layerName, layersVisible
-      if (isParent) {
-        parentName = row.name
-      } else {
-        parentName = row.parentName
-        layerName = row.name
-      }
-
-      // 修改配置项
-      let layers = this.layersSource.find((layer) => layer.name === this.layerTree )
-      layers.sublayers.forEach((layerGroup) => {
-        let groupName = layerGroup.name
-        let sublayers = layerGroup.sublayers
-        sublayers.forEach((layer) => {
-          if (isParent) {
-            if (groupName === parentName) { layer.visible = visible }
-          } else {
-            if (groupName === parentName && layerName === layer.name) { layer.visible = visible }
-          }
-        })
-      })
-      new mapUtil(this.currMap).setGroupLayerVisible(this.layersSource)
-    },
-    opacityChange(data) {
-      data.layer.values_.opacity = 1 - data.visibleNum / 100
-      this.currMap.render()
-    },
-    // 底图变化
-    baseMapChange: function(showVector) {
-      console.log('底图切换')
-      if (showVector) {
-        this.showImageBase = !this.showImageBase
-      } else {
-        this.showVectorBase = !this.showVectorBase
-      }
-
-      let layers = this.currMap.getLayers().getArray()
-      layers.forEach((layer) => {
-        let { parentname, name } = layer.values_
-        if (name.includes('矢量') || name.includes('影像')) {
-          if (name.includes('矢量')) layer.setVisible(this.showVectorBase)
-          else if (name.includes('影像')) layer.setVisible(!this.showVectorBase)
-        }
-      })
-    },
-    labelChange: function(e) {
-      this.anthorBaseMaps[this.showImageBase ? 3 : 1].visible = e
-    },
-    inputBaseLayer: function(w) {
-      let layerBox = ['矢量', '影像']
-      let opacity = this.baseMapsNum[w]
-      let layers = this.currMap.getLayers().getArray()
-      layers
-        .filter((layer) => layer.get('name').includes(layerBox[w]))
-        .forEach((layer) => {
-          layer.setOpacity(1 - opacity / 100)
-        })
-    }
-  },
-  watch: {
-    // layerTable: {
-    //   handler (newValue, oldValue) {
-    //     // this.currMap && this.currMap.render()
-    //   },
-    //   deep: true
-    // }
-  }
-}
-</script>

+ 0 - 261
src/views/zhpt/tongyonggongju/attAndConAnalysis/widget.vue

@@ -1,261 +0,0 @@
-<template>
-  <div style="padding: 0 8px">
-    <el-row style="margin-bottom: 8px">
-      <el-cascader-panel
-        :options="layersAtt"
-        :props="{ multiple: true }"
-      />
-    </el-row>
-    <el-row style="margin-bottom: 8px">
-      <el-button
-        size="mini"
-        icon="el-icon-plus"
-        @click="show3 = !show3"
-      >筛选条件(可选</el-button>
-    </el-row>
-    <el-row style="margin-bottom: 8px">
-      <el-collapse-transition>
-        <div v-show="show3">
-          <div
-            style="
-              height: calc(100vh - 475px);
-              width: 100%;
-              background: #fff;
-              overflow: hidden auto;
-              padding: 8px;
-            "
-          >
-            <div class="spanTitle"><span>图层名称</span></div>
-            <el-select v-model="layerName" placeholder="请选择">
-              <el-option
-                v-for="item in layersAtt"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-            <div class="spanTitle"><span>图层字段</span></div>
-            <ul class="attAndConAnalysisUl" style="height: 100px">
-              <li
-                v-for="(item, id) in analysisAtt"
-                :key="id"
-                @click="addText(item.value + ' ', item.value.length + 1)"
-              >
-                {{ item.label }}
-              </li>
-            </ul>
-            <div class="spanTitle"><span>添加条件</span></div>
-            <div style="width: 100%">
-              <div style="width: 115px; float: left">
-                <el-button-group style="margin-bottom: 3px">
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('= ', 2)"
-                  >等于</el-button>
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('like \'%%\'', 7)"
-                  >模糊</el-button>
-                </el-button-group>
-                <el-button-group style="margin-bottom: 3px">
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('> ', 2)"
-                  >大于</el-button>
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('< ', 2)"
-                  >小于</el-button>
-                </el-button-group>
-                <el-button-group style="margin-bottom: 3px">
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('<> ', 3)"
-                  >不等</el-button>
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('and ', 4)"
-                  >而且</el-button>
-                </el-button-group>
-                <el-button-group>
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('or ', 3)"
-                  >或者</el-button>
-                  <el-button
-                    size="mini"
-                    type="primary"
-                    @click="addText('% ', 2)"
-                  >占位</el-button>
-                </el-button-group>
-              </div>
-              <div style="width: calc(100% - 115px); float: right">
-                <el-button
-                  size="mini"
-                  type="primary"
-                  style="margin-bottom: 3px"
-                >获取唯一值</el-button>
-                <ul class="attAndConAnalysisUl" style="height: 90px">
-                  <li
-                    v-for="(item, id) in layerFix"
-                    :key="id"
-                    @click="addText('\'' + item + '\' ', item.length + 3)"
-                  >
-                    {{ item }}
-                  </li>
-                </ul>
-              </div>
-            </div>
-            <div class="spanTitle"><span>查询语句</span></div>
-            <el-input
-              v-model="queText"
-              v-way="wayFun('textBox')"
-              type="textarea"
-              autosize
-              placeholder="请输入内容 如:OBJECTID > 0"
-            />
-          </div>
-        </div>
-      </el-collapse-transition>
-    </el-row>
-    <el-row style="margin-bottom: 8px">
-      <el-col
-        :span="4"
-        :offset="18"
-      ><el-button
-        size="mini"
-        type="primary"
-        icon="el-icon-pie-chart"
-        @click="analysis"
-      >分析</el-button></el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'AttAndConAnalysis',
-  components: {},
-  directives: {
-    way(el, bind) {
-      if (typeof bind.value === 'function') bind.value(el.children[0])
-    }
-  },
-  props: { param: Object },
-  data() {
-    return {
-      show3: false,
-      titleName: '',
-      layerName: '',
-      queText: '',
-      elements: {},
-      lastRange: [0, 0],
-      layersAtt: [
-        {
-          value: 'pipe',
-          label: '管线管网',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'guanjin', label: '管径' }
-          ]
-        },
-        {
-          value: 'pot',
-          label: '管线节点',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'IOcount', label: '节口数' }
-          ]
-        },
-        {
-          value: 'equipment',
-          label: '设备',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'type', label: '类型' }
-          ]
-        }
-      ],
-      analysisAtt: [
-        { value: 'objectId', label: 'OBJECTID' },
-        { value: 'dataSource', label: '数据来源' },
-        { value: 'wirteDate', label: '操作时间' },
-        { value: 'safeLavel', label: '安全评级' },
-        { value: 'radio', label: '管径' },
-        { value: 'type', label: '材质' },
-        { value: 'state', label: '状态' }
-      ],
-      layerFix: ['pe', '钢', '球磨铸铁', 'PVE', '铸铁', '钢筋混凝土', '砖'],
-      panel: {
-        pathId: 'analysisResult',
-        widgetid: 'HalfPanel',
-        label: '统计分析'
-      }
-    }
-  },
-  computed: {
-    type() {
-      return this.param.type
-    }
-  },
-  watch: {
-    type: function() {
-      this.titleName = this.param.type
-    }
-  },
-  mounted: function() {
-    this.titleName = this.param.type
-  },
-  methods: {
-    addText: function(text, length) {
-      var myField = this.elements['textBox']
-      var startL = myField.selectionStart
-      this.queText =
-        this.queText.substring(0, startL) +
-        text +
-        this.queText.substring(myField.selectionEnd, myField.value.length)
-      myField.blur()
-      setTimeout(() => {
-        myField.selectionStart = myField.selectionEnd = startL + length
-        myField.focus()
-      })
-    },
-    wayFun: function(flag) {
-      return (el) => {
-        this.elements[flag] = el
-      }
-    },
-    analysis: function() {
-      this.$store.dispatch('map/changeMethod', this.panel)
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.attAndConAnalysisUl {
-  list-style-type: none;
-  padding: 2px;
-  margin: 0px;
-  font-size: 14px;
-  border: 1px solid #ccc;
-  overflow: hidden auto;
-}
-.attAndConAnalysisUl li {
-  margin: 2px 0;
-  cursor: pointer;
-}
-.attAndConAnalysisUl li:hover {
-  background: rgb(30, 144, 255);
-  color: #fff;
-}
-</style>

+ 0 - 229
src/views/zhpt/tongyonggongju/attrSearch/widget.vue

@@ -1,229 +0,0 @@
-<template>
-  <div style="padding: 0 8px; height:100%; overflow: auto">
-    <el-tabs v-model="activeName" style="height:100%">
-      <el-tab-pane label="属性标注" name="attQuerry" style="height:100%">        
-        <div ref="legend" id="Legend" class="Legend">
-          <div class="label" @click="openstate = !openstate">要素选择
-            <el-tooltip class="item" effect="dark" content="在地图上点击选取要素。下方将会列出所选要素的相关信息。" placement="right">
-              <i class="el-icon-info" ref="info"></i>
-            </el-tooltip><el-checkbox style="margin-left: 4px;" v-model="ractSelect" @change="isDrawRect">框选</el-checkbox>
-            <div ref="isQuery" style="display: none;"><i class="el-icon-loading" />查询中</div>
-          </div>
-          <div v-show="openstate" class="content">
-            <el-table highlight-current-row :data="featureData" stripe height="200px" style="width: 100%;margin-bottom: 8px" row-class-name="selectRowC" @row-click="showFea">
-              <template slot="empty">
-                <img src="@/assets/icon/null.png" alt="">
-                <p class="empty-p">暂无数据</p>
-              </template>
-              <el-table-column type="index" width="55" label="序号" align="center"/>
-              <el-table-column prop="layer" width="105" label="图层" align="center"/>
-              <el-table-column prop="name" label="编码" align="center"/>
-            </el-table>
-          </div>
-        </div>
-        <tf-legend class="legend_dept" label="要素详细" isopen="true" title="显示标注要素字段及属性。" style="height:600px">
-          <el-table :data="attData" stripe height="calc(100vh - 200px)" style="width: 100%;margin-bottom: 8px">
-              <template slot="empty">
-                <img src="@/assets/icon/null.png" alt="">
-                <p class="empty-p">暂无数据</p>
-              </template>
-              <!-- <el-table-column type="index" label="序号" align="center"/> -->
-            <el-table-column prop="fix" width="150" label="字段" align="center"/>
-            <el-table-column prop="att" label="属性" align="center"/>
-          </el-table>
-        </tf-legend>
-      </el-tab-pane>
-      <el-tab-pane label="设置" name="setting" style="height:100%">
-        <tf-legend class="legend_dept" label="图层名称" isopen="true" title="指定查询的图层。">
-          <el-select v-model="layerName" size="small" placeholder="请选择">
-          <el-option-group v-for='group in layerGroups' :key="group.label" :label="group.label">
-             <el-option v-for="item in group.layers" :key="item.label" :label="item.label" :value="item.value"></el-option>
-          </el-option-group>
-          </el-select>
-        </tf-legend>
-        <tf-legend class="legend_dept" label="可见属性" isopen="true" title="指定所要查询的属性字段。">
-          <el-table ref="attTable" :data="attDatas" stripe height="800px" style="width: 100%" @select="selectChange" @select-all="selectChange">
-              <template slot="empty">
-                <img src="@/assets/icon/null.png" alt="">
-                <p class="empty-p">暂无数据</p>
-              </template>
-            <el-table-column type="selection" width="55"/>
-            <el-table-column prop="name" label="属性" align="center"/></el-table>
-        </tf-legend>
-        <el-button size="mini" type="primary" style="width:100%" @click="saveLayer">保存</el-button>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-import { appconfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import iDraw from '@/views/zhpt/common/mapUtil/draw'
-import iQuery from '@/views/zhpt/common/mapUtil/query'
-import VectorLayer from 'ol/layer/Vector'
-import VectorSource from 'ol/source/Vector'
-import { comSymbol } from '@/utils/comSymbol'
-import GeoJSON from 'ol/format/GeoJSON';
-import { mapUtil } from '@/views/zhpt/common/mapUtil/common'
-
-
-export default {
-  name: 'QueryResult',
-  components: { tfLegend },
-  directives: {
-    way(el, bind) {
-      if (typeof bind.value === 'function') bind.value(el)
-    }
-  },
-  props: { data: Object },
-  data() {
-    return {
-      ami: 8,
-      inr: {},
-      attData: [],
-      attDatas: [],
-      elements: {},
-      openstate: true,
-
-      layerGroups: [],
-      activeName: 'attQuerry',
-      ractSelect: false,
-
-      // 
-      drawer: null,
-      vectorLayer: null,
-      layerName: '',
-      featureData: [],
-    }
-  },
-  computed: { sidePanelOn() { return this.$store.state.map.P_editableTabsValue } },
-  mounted: function() {
-    this.init()
-  },
-  destroyed () {
-    this.clearAll()
-  },
-  watch:{
-    layerName(n, o) {
-      console.log('管网图层', n)
-      mapUtil.getFields(n).then(res => {
-        if (res) {
-          this.attDatas = res
-          this.attDatas.forEach(row => this.$refs.attTable.toggleRowSelection(row, true))
-        } else this.$message.error('获取字段数据失败')
-      })
-    },
-    sidePanelOn(newTab, oldTab) {
-      if(newTab == oldTab) return
-      console.log('侧边栏', newTab)
-      if(newTab !== 'attrSearch') {
-        this.clearAll()
-      } else this.init()
-    }
-  },
-  methods: {
-    init () {
-      console.log('初始化')
-      this.vectorLayer = new VectorLayer({ source: new VectorSource(), style: comSymbol.getAllStyle(5, '#0ff', 7, 'rgba(0, 255, 255, 0.7)') })
-      this.data.mapView.addLayer(this.vectorLayer)
-      //
-      let [name, type] = appconfig.initLayers.split("&&")
-      let layer = mapUtil.getAllSubLayerNames(name, type)
-      // 设置图层
-      this.layerGroups = layer.sublayers.map(layer => {
-        let layers = layer.sublayers.map(sub => {
-          return { label: sub.title, value: sub.name.split('@')[0] }
-        })
-        return { label: layer.title, value: layer.name, layers }
-      })
-      this.data.that.setPopupSwitch(false)
-    },
-    clearAll () {
-      this.vectorLayer && this.data.mapView.removeLayer(this.vectorLayer)
-      this.drawer && this.drawer.end()
-      this.data.that.setPopupSwitch(true)
-    },
-    isDrawRect: function(checked) {
-      if (!checked) {
-        this.drawer && this.drawer.end()
-        return
-      }
-      this.drawer = new iDraw(this.data.mapView, 'rect', {
-        startDrawCallBack: () => {
-          this.vectorLayer.getSource().clear()
-          this.drawer && this.drawer.clearFea()
-        },
-        endDrawCallBack: fea => {
-          this.getFacilities(fea).then(res => {
-            let data = res.map(obj => {
-              let { layerName, result, tableName } = obj
-              return result.features.features.map(fea => {
-                return { 
-                  properties: fea.properties, 
-                  tableName, 
-                  feature: fea, 
-                  name: fea.properties['LNO'] || fea.properties['EXP_NO'] || fea.properties['SID'], 
-                  layer: layerName 
-                }
-              })
-            })
-            this.featureData = data.flat()
-          })
-        },
-        showCloser: false
-      })
-      this.drawer.start()
-    },
-    // 空间查询 获取设施
-    getFacilities (fea) {
-      // let sources = appconfig.gisResource['iserver_resource'].layerService.layers.filter(item => item.type === 'smlayer')
-      // let info = sources.map(source => source.sublayers.map(sublayer => {
-      //   return { name: sublayer.name, label: sublayer.title }
-      // }))
-      // let dataSetInfo = info.flat()
-      return new Promise(resolve => {
-        new iQuery().spaceQuery(fea).then(res => {
-          console.log('返回的数据', res)
-          let data = res.filter(item => item.type === "processCompleted")
-          resolve(data)
-        })
-      })
-
-    },
-    showFea(row) {
-      let { feature, properties, layer, tableName } = row
-      let fea = new GeoJSON().readFeature(feature)
-      this.vectorLayer.getSource().clear()
-      this.vectorLayer.getSource().addFeature(fea)
-      let center = new mapUtil().getCenterFromFeatures(fea)
-      let view = this.data.mapView.getView()
-      view.setCenter(center)
-      view.setZoom(20)
-      // 要素详细信息
-      mapUtil.getFields(tableName).then(res => {
-        let data = []
-        if (res) {
-          for(let key in properties) {
-            let obj = res.find(item => item.field == key)
-            if (obj) {
-              data.push({ fix: obj.name,  att: properties[key] })
-            }
-          }
-        }
-        this.attData = data
-      })
-    },
-    // 保存设置
-    saveLayer() {
-      if(this.layerName) {
-        this.$message.success('设置属性信息成功')
-      }
-    },
-    // 勾选属性
-    selectChange(select, row) {
-      
-    }
-  }
-}
-</script>

+ 0 - 151
src/views/zhpt/tongyonggongju/clearDistanceAnalysis/css.scss

@@ -1,151 +0,0 @@
-.panel-container {
-    .item-head {
-        font-size: 14px;
-        font-family: Source Han Sans CN;
-        font-weight: 600;
-        color: #333333;
-        line-height: 18px;
-        margin: 10px 0;
-        &::before {
-            content: '';
-            display: inline-block;
-            width: 3px;
-            height: 12px;
-            background: #2a77f7;
-            vertical-align: middle;
-            margin-right: 5px;
-        }
-    }
-    .op-box {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 10px;
-        >>>.el-form {
-            .el-form-item__label,
-            .el-form-item__content {
-                line-height: 30px;
-            }
-        }
-        .op-button {
-            text-align: center;
-            margin-top: 20px;
-            font-size: 0;
-        }
-    }
-    .result-box {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 10px;
-        .result-description {
-            width: 100%;
-            min-height: 90px;
-            background: #f6f6f6;
-            border-radius: 4px;
-            .contant {
-                >div {
-                    float: left;
-                    height: 50px;
-                    &:first-child,
-                    &:last-child {
-                        width: calc(50% - 15px);
-                        p {
-                            &:first-child {
-                                font-weight: 600;
-                            }
-                            font-size: 14px;
-                            height: 30px;
-                            text-align: center;
-                            line-height: 30px;
-                        }
-                    }
-                    &:nth-child(2) {
-                        font-size: 16px;
-                        font-weight: 600;
-                        width: 30px;
-                        // background-color: #f40;
-                        text-align: center;
-                        line-height: 50px;
-                    }
-                }
-            }
-        }
-    }
-    .result-total {
-        width: 100%;
-        box-sizing: border-box;
-        // padding: 10px;
-        font-size: 0;
-        >.panel-item {
-            width: calc(50% - 14.5px);
-            height: 70px;
-            display: inline-block;
-            vertical-align: top;
-            border-radius: 5px;
-            font-size: 0;
-            &:first-child {
-                background-color: #f4516c;
-            }
-            &:last-child {
-                background-color: #307bf7;
-                margin-left: 29px;
-            }
-            >div {
-                width: 100%;
-                text-align: center;
-                color: #fff;
-                font-size: 14px;
-                &:last-child {
-                    height: 35px;
-                    line-height: 35px;
-                    font-weight: 600;
-                }
-                &:first-child {
-                    height: 35px;
-                    line-height: 35px;
-                    font-size: 16px;
-                    span {
-                        font-weight: 600;
-                        font-size: 20px;
-                        margin-right: 5px;
-                    }
-                }
-            }
-        }
-    }
-    .table-chart {
-        width: 100%;
-        box-sizing: border-box;
-        padding: 10px;
-        .item-head {
-            font-weight: 600;
-        }
-        .table-container {
-            // width: 100%;
-            // height: 200px;
-            >>>.el-table td,
-            >>>.el-table th {
-                padding: 6px 0 !important;
-            }
-            >>>.el-table {
-                .el-button {
-                    padding: 0 !important;
-                }
-            }
-        }
-    }
-}
-
-.pipe-type-list {
-    width: 100%;
-    list-style: none;
-    >li {
-        width: 100%;
-        height: 30px;
-        line-height: 30px;
-        color: #303030;
-        cursor: pointer;
-        &:hover {
-            background-color: #dfeffe;
-        }
-    }
-}

+ 0 - 77
src/views/zhpt/tongyonggongju/clearDistanceAnalysis/judgePipeLine.js

@@ -1,77 +0,0 @@
-export function getLevelIntervalParam(line) {
-    let param = null
-        // 燃气管道
-    if (line.properties.TYPENAME == '燃气管道') {
-        param = {
-            type: '燃气管道',
-            attr: line.properties.PRESSURE.trim() ? line.properties.PRESSURE.trim() : '低压',
-        }
-    }
-    // 排水类
-    else if (line.properties.TYPENAME.search('排水') >= 0) {
-        param = {
-            type: '排水管道',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '直埋', // 排水管道均按照直埋标准
-        }
-    }
-    //给水管道
-    else if (line.properties.TYPENAME == '给水管道') {
-        param = {
-            type: '给水管道',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '直埋', // 给水管道均按照直埋标准
-        }
-    }
-    // 电信线缆类
-    else if (line.properties.TYPENAME == '移动线缆' ||
-        line.properties.TYPENAME == '电信线缆' ||
-        line.properties.TYPENAME == '广电线缆') {
-        param = {
-            type: '电信线缆',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '', // 直埋和非直埋
-        }
-    }
-    // 热力管道和电力线缆
-    else {
-        param = {
-            type: line.properties.TYPENAME,
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '', // 直埋和非直埋
-        }
-    }
-    return param
-}
-
-// 判断管线获取垂直净距
-export function getVerticalInterval(line) {
-    let param = null
-        // 电信线缆类
-    if (line.properties.TYPENAME == '移动线缆' ||
-        line.properties.TYPENAME == '电信线缆' ||
-        line.properties.TYPENAME == '广电线缆') {
-        param = {
-            type: '电信线缆',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '', // 直埋和非直埋
-        }
-    }
-    // 电力线缆
-    else if (line.properties.TYPENAME == '电力线缆') {
-        param = {
-            type: '电力线缆',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '', // 直埋和非直埋
-        }
-    }
-    // 排水类
-    else if (line.properties.TYPENAME.search('排水') >= 0) {
-        param = {
-            type: '排水管道',
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '直埋', // 排水管道均按照直埋标准
-        }
-    }
-    // 给水管道,热力管道,燃气管道
-    else {
-        param = {
-            type: line.properties.TYPENAME,
-            attr: line.properties.BURYTYPE == '直埋' ? '直埋' : '直埋', // 均以直埋标准
-        }
-    }
-    return param
-}

+ 0 - 340
src/views/zhpt/tongyonggongju/clearDistanceAnalysis/widget.vue

@@ -1,340 +0,0 @@
-<template>
-  <!-- <div>净距分析</div> -->
-  <div class="panel-container">
-    <div class="op-box">
-      <el-button type="primary" size="small" style="width:100%" :loading="loading" @click="select">选择分析管线</el-button>
-    </div>
-
-    <!-- 分析结果 -->
-    <div class="result-box">
-      <div class="item-head">分析管线
-        <el-tooltip class="item" effect="dark" content="选择两段管线,分析两段管线的水平净距或垂直净距是否符合规定" placement="top">
-          <span class="el-icon-info" style="float: unset; font-weight: normal;"></span>
-        </el-tooltip>
-        <!-- <el-button type="text" style="padding:0;margin-left:10px">查看</el-button> -->
-      </div>
-      <div class="result-description">
-        <div class="contant" v-if="selectPipeLines.length>0">
-          <div>
-            <p>{{selectPipeLines[0].feature.properties.TYPENAME}}</p>
-            <p>{{selectPipeLines[0].feature.properties.SID}}</p>
-            <p>{{selectPipeLines[0].feature.properties.BURYTYPE}}</p>
-            <!-- <p>{{selectPipeLines[0].feature.properties.PRESSURE}}</p> -->
-          </div>
-          <div>VS</div>
-          <div v-if="selectPipeLines.length==2">
-            <p>{{selectPipeLines[1].feature.properties.TYPENAME}}</p>
-            <p>{{selectPipeLines[1].feature.properties.SID}}</p>
-            <p>{{selectPipeLines[1].feature.properties.BURYTYPE}}</p>
-            <!-- <p>{{selectPipeLines[1].feature.properties.PRESSURE}}</p> -->
-          </div>
-        </div>
-      </div>
-    </div>
-    <div class="op-box">
-      <el-button type="primary" size="small" style="width:100%" :loading="false" @click="start">开始分析</el-button>
-    </div>
-    <div class="op-box">
-      <div class="item-head">分析结果</div>
-      <div class="result-total">
-        <div class="panel-item" :style="'background-color:'+bgc">
-          <div>{{resultDes}}</div>
-          <div v-cloak>{{result}}</div>
-        </div>
-        <div class="panel-item">
-          <div>净距标准</div>
-          <div v-cloak>{{standard}}</div>
-        </div>
-      </div>
-    </div>
-
-    <div class="op-box">
-      <el-button type="danger" size="small" style="width:100%" @click="clearResult()">清除结果</el-button>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapConfig } from '@/views/zhpt/map.config'
-import { SuperMap, FeatureService } from '@supermap/iclient-ol';
-import { MultiPolygon, Point } from 'ol/geom';
-import { GeoJSON } from 'ol/format';
-import Feature from 'ol/Feature';
-import { Vector as VectorSource } from 'ol/source';
-import { Vector as VectorLayer } from 'ol/layer';
-import { Style, Circle, Icon, Fill, RegularShape, Stroke, Text } from 'ol/style';
-import * as turf from '@turf/turf'
-import { getCenter } from 'ol/extent';
-
-import { getPipelineDistance } from '@/api/mainMap/analysis'
-
-import { getLevelIntervalParam, getVerticalInterval } from './judgePipeLine'
-export default {
-  props: ["data"],
-  data() {
-    return {
-      bgc: "#02baaf",
-      selectFlag: false,
-      selectPipeLines: [], // 选择的管线,只有两个
-      vectorLayer: null,
-      resultDes: '合规',
-      result: '',
-      standard: ''
-    }
-  },
-  computed: {
-    // 获取点击查询状态
-    loading() {
-      if (this.selectFlag)
-        if (this.data.that.queryByClick.querying)
-          return this.data.that.queryByClick.querying
-        else return false
-      else return false
-    },
-    // 获取点击查询结果
-    resultInfo() {
-      return this.data.that.queryByClick.resultInfo
-    }
-  },
-  watch: {
-    // 监听面板是否被改变
-    '$store.state.map.P_editableTabsValue': function (val, oldVal) {
-      if (val == 'clearDistanceAnalysis') {
-        this.vectorLayer.setVisible(true)
-      }
-      else {
-        this.vectorLayer.setVisible(false)
-        this.selectFlag = false
-      }
-    },
-    loading(val, oldVal) {
-      if (this.selectFlag && !val && this.selectPipeLines.length < 2) {
-        // 点击查询结束
-        if (!this.resultInfo || !this.resultInfo.feature.dataType.type == "line") {
-          this.$message.error('未选中管线!')
-        }
-        else {
-          this.selectPipeLines.push(this.resultInfo)
-          if (this.selectPipeLines.length == 1) {
-            this.vectorLayer.getSource().addFeature(new GeoJSON().readFeature(this.resultInfo.feature))
-            this.data.that.popupWindowClose() // 清除地图视图点击选择的要素,关闭弹窗
-          }
-          if (this.selectPipeLines.length == 2) {
-            this.vectorLayer.getSource().addFeature(new GeoJSON().readFeature(this.resultInfo.feature))
-            this.data.that.popupWindowClose() // 清除地图视图点击选择的要素,关闭弹窗
-            console.log(this.selectPipeLines)
-            this.selectFlag = false
-          }
-        }
-      }
-    }
-  },
-  mounted() {
-    this.vectorLayer = new VectorLayer({
-      source: new VectorSource(),
-      style: new Style({
-        stroke: new Stroke({
-          width: 5,
-          color: '#00ffff'
-        })
-      })
-    })
-    this.data.that.map.addLayer(this.vectorLayer)
-  },
-  destroyed() {
-    this.data.that.map.removeLayer(this.vectorLayer)
-  },
-  methods: {
-    select() {
-      this.clear()
-      this.data.that.map.getView().animate({ zoom: 20 });
-      this.selectFlag = true
-    },
-    /**
-     * 开始分析
-     */
-    start() {
-      let lineFeature1 = this.selectPipeLines[0].feature
-      let lineFeature2 = this.selectPipeLines[1].feature
-      // 先判断两条管线是否有投影交点;有交点:计算垂直净距,无交点:计算水平净距
-      const intersects = turf.lineIntersect(lineFeature1, lineFeature2);
-      // 有交点
-      if (intersects.features.length > 0) {
-        let iPointCoord = new GeoJSON().readFeature(intersects.features[0]).getGeometry().getCoordinates()
-        const verticalInterval = this.clacLineVerticalInterval(lineFeature1, lineFeature2, iPointCoord) // 垂直净距
-        this.result = "垂直净距:" + verticalInterval + ' m'
-        this.compareVerticalInterval(lineFeature1, lineFeature2, verticalInterval)
-      }
-      // 无交点
-      else {
-        const levelInterval = this.clacLevelInterval(lineFeature1, lineFeature2) // 水平净距
-        this.result = "水平净距:" + levelInterval + ' m'
-        this.compareLevelInterval(lineFeature1, lineFeature2, levelInterval)
-      }
-    },
-    /**
-     * 计算交点的高程
-     */
-    calcIpointHeight(startPoint, endPoint, iPoint) {
-      // 利用空间直线两点式方程得到交点高程,即交点z坐标
-      return (endPoint.z - startPoint.z) * (iPoint.x - startPoint.x) / (endPoint.x - startPoint.x) + startPoint.z
-    },
-    /**
-     * 计算两条线段之间的最小距离,即水平净距
-     */
-    clacLevelInterval(line1, line2) {
-      let distance = []
-      const point1 = turf.point(new GeoJSON().readFeature(line1).getGeometry().getFirstCoordinate())
-      const point2 = turf.point(new GeoJSON().readFeature(line1).getGeometry().getLastCoordinate())
-      const point3 = turf.point(new GeoJSON().readFeature(line2).getGeometry().getFirstCoordinate())
-      const point4 = turf.point(new GeoJSON().readFeature(line2).getGeometry().getLastCoordinate())
-      distance.push(turf.pointToLineDistance(point1, line2, { units: 'kilometers' }))
-      distance.push(turf.pointToLineDistance(point2, line2, { units: 'kilometers' }))
-      distance.push(turf.pointToLineDistance(point3, line1, { units: 'kilometers' }))
-      distance.push(turf.pointToLineDistance(point4, line1, { units: 'kilometers' }))
-      distance.sort((a, b) => { return a - b }) //升序排序
-      // 水平净距
-      return (distance[0] * 1000).toFixed(2)
-    },
-    /**
-     * 计算垂直距离,即垂直净距
-     */
-    clacLineVerticalInterval(line1, line2, iPointCoord) {
-      const startPoint1 = {
-        x: line1.geometry.coordinates[0][0],
-        z: parseFloat(line1.properties.START_HEIGHT) - parseFloat(line1.properties.START_DEPTH)
-      }
-      const endPoint1 = {
-        x: line1.geometry.coordinates[1][0],
-        z: parseFloat(line1.properties.END_HEIGHT) - parseFloat(line1.properties.END_DEPTH)
-      }
-      const startPoint2 = {
-        x: line2.geometry.coordinates[0][0],
-        z: parseFloat(line2.properties.START_HEIGHT) - parseFloat(line2.properties.START_DEPTH)
-      }
-      const endPoint2 = {
-        x: line2.geometry.coordinates[1][0],
-        z: parseFloat(line2.properties.END_HEIGHT) - parseFloat(line2.properties.END_DEPTH)
-      }
-      const iPoint = { x: parseFloat(iPointCoord[0]) }
-      const iPointZ1 = this.calcIpointHeight(startPoint1, endPoint1, iPoint)
-      const iPointZ2 = this.calcIpointHeight(startPoint2, endPoint2, iPoint)
-      // 垂直净距
-      return Math.abs(iPointZ1 - iPointZ2).toFixed(2)
-    },
-    /**
-     * 水平净距比较
-     */
-    compareLevelInterval(line1, line2, value) {
-      const lineAttr1 = getLevelIntervalParam(line1)
-      const lineAttr2 = getLevelIntervalParam(line2)
-      let data = {
-        pipeType: lineAttr1.type,
-        pipeTypeAttr: lineAttr1.attr,
-        comparePipeType: lineAttr2.type,
-        comparePipeTypeAttr: lineAttr2.attr,
-        compareType: 1
-      }
-      getPipelineDistance(data).then(res => {
-        if (res.result.length == 0) {
-          this.$message.warning("未找到相应的水平净距标准,无法进行分析!")
-          return
-        }
-        let resVal = res.result[0].distanceValue.toString().split('-')
-        // 标准是范围区间
-        if (resVal.length == 2) {
-          this.standard = '≥ ' + resVal[0] + ' m , ≤' + resVal[1] + ' m'
-          const min = parseFloat(resVal[0]).toFixed(2)
-          const max = parseFloat(resVal[1]).toFixed(2)
-          if (value >= min && value <= max) {
-            this.bgc = '#02baaf'
-            this.resultDes = '合规'
-          } else {
-            this.bgc = '#f40'
-            this.resultDes = '不合规'
-          }
-        }
-        // 标准是单个值
-        else {
-          this.standard = '≥ ' + resVal.toString() + " m"
-          if (value < parseFloat(resVal.toString()).toFixed(2)) {
-            this.bgc = '#f40'
-            this.resultDes = '不合规'
-          }
-          else {
-            this.bgc = '#02baaf'
-            this.resultDes = '合规'
-          }
-        }
-      })
-    },
-    /**
-     * 垂直净距比较
-     */
-    compareVerticalInterval(line1, line2, value) {
-      const lineAttr1 = getVerticalInterval(line1)
-      const lineAttr2 = getVerticalInterval(line2)
-      let data = {
-        pipeType: lineAttr1.type,
-        pipeTypeAttr: lineAttr1.attr,
-        comparePipeType: lineAttr2.type,
-        comparePipeTypeAttr: lineAttr2.attr,
-        compareType: 2
-      }
-      getPipelineDistance(data).then(res => {
-        if (res.result.length == 0) {
-          this.$message.warning("未找到相应的垂直净距标准,无法进行分析!")
-          return
-        }
-        let resVal = res.result[0].distanceValue.toString().split('-')
-        // 标准是范围区间
-        if (resVal.length == 2) {
-          this.standard = '≥ ' + resVal[0] + ' m , ≤' + resVal[1] + ' m'
-          const min = parseFloat(resVal[0]).toFixed(2)
-          const max = parseFloat(resVal[1]).toFixed(2)
-          if (value >= min && value <= max) {
-            this.bgc = '#02baaf'
-            this.resultDes = '合规'
-          } else {
-            this.bgc = '#f40'
-            this.resultDes = '不合规'
-          }
-        }
-        // 标准是单个值
-        else {
-          this.standard = '≥ ' + resVal.toString() + " m"
-          if (value < parseFloat(resVal.toString()).toFixed(2)) {
-            this.bgc = '#f40'
-            this.resultDes = '不合规'
-          }
-          else {
-            this.bgc = '#02baaf'
-            this.resultDes = '合规'
-          }
-        }
-      })
-    },
-    /**
-     * 清除结果
-     */
-    clearResult() {
-      this.selectFlag = false
-      this.clear()
-    },
-    /**
-     * 清除
-     */
-    clear() {
-      this.selectPipeLines = []
-      this.vectorLayer.getSource().clear()
-      this.bgc = '#02baaf'
-      this.result = ''
-      this.standard = ''
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-@import './css.scss';
-</style>

+ 0 - 51
src/views/zhpt/tongyonggongju/detailInfo/widget.vue

@@ -1,51 +0,0 @@
-<template>
-  <div class="container i-scrollbar">
-    <el-form v-if="formData.length !== 0" :inline="true" class="">
-        <el-form-item style="width:23%" label-width='150px' v-for="(item, index) in formData" :key="index" :label="item.label">
-            <el-input v-model="item.value" disabled></el-input>
-        </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-import { fieldDoc, pointFieldDoc } from '@/views/zhpt/common/doc'
-
-export default {
-    props: ['param'],
-    data () {
-        return {
-            doc: null,
-            formData: []
-        }
-    },
-    mounted () {
-        let { geometry, properties } = this.param.info
-        if (geometry.type === 'LineString') {
-            this.doc = fieldDoc
-        } else {
-            this.doc = pointFieldDoc
-        }
-        let data = []
-        for (let key in properties) {
-            if (this.doc[key]) {
-                data.push({ label: this.doc[key], value: properties[key] })
-            }
-        }
-        this.formData = data
-    }
-}
-</script>
-
-<style lang='scss' scoped>
-    @import "~@/styles/mixin.scss";
-    .i-scrollbar {
-        overflow: scroll;
-        @include scrollBar;
-    }
-    .container {
-        padding: 50px 10px;
-        width: 100%;
-        height: 800px;
-    }
-</style>

+ 0 - 115
src/views/zhpt/tongyonggongju/extentAnalysis/widget.vue

@@ -1,115 +0,0 @@
-<template>
-  <div style="padding: 0 8px">
-    <el-row style="margin-bottom: 8px">
-      <el-cascader-panel
-        :options="layersAtt"
-        :props="{ multiple: true }"
-      />
-    </el-row>
-    <el-row style="margin-bottom: 8px">
-      <el-select v-model="layerName" placeholder="请选择">
-        <el-option
-          v-for="item in selectFunc"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        />
-      </el-select>
-    </el-row>
-    <el-row style="margin-bottom: 8px">
-      <el-col
-        :span="4"
-        :offset="18"
-      ><el-button
-        size="mini"
-        type="primary"
-        icon="el-icon-pie-chart"
-        @click="analysis"
-      >分析</el-button></el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'ExtentAnalysis',
-  components: {},
-  directives: {
-    way(el, bind) {
-      if (typeof bind.value === 'function') bind.value(el)
-    }
-  },
-  props: {
-    param: Object
-  },
-  data() {
-    return {
-      elements: {},
-      layerName: '',
-      layersAtt: [
-        {
-          value: 'pipe',
-          label: '管线管网',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'guanjin', label: '管径' }
-          ]
-        },
-        {
-          value: 'pot',
-          label: '管线节点',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'IOcount', label: '节口数' }
-          ]
-        },
-        {
-          value: 'equipment',
-          label: '设备',
-          children: [
-            { value: 'xingzhengqu', label: '行政区' },
-            { value: 'caizhi', label: '材质' },
-            { value: 'type', label: '类型' }
-          ]
-        }
-      ],
-      selectFunc: [
-        {
-          value: 'all',
-          label: '全网'
-        },
-        {
-          value: 'lo',
-          label: '行政区划'
-        },
-        {
-          value: 'little',
-          label: '管辖区域'
-        }
-      ],
-      panel: {
-        pathId: 'analysisResult',
-        widgetid: 'HalfPanel',
-        label: '统计分析'
-      }
-    }
-  },
-  computed: {},
-  watch: {},
-  mounted: function() {},
-  methods: {
-    wayFun: function(flag) {
-      return (el) => {
-        this.elements[flag] = el
-      }
-    },
-    analysis: function() {
-      this.$store.dispatch('map/changeMethod', this.panel)
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-</style>

+ 0 - 210
src/views/zhpt/tongyonggongju/layerManagement/widget.vue

@@ -1,210 +0,0 @@
-<template>
-  <div style="padding: 0 8px;overflow:auto;">
-    <tf-legend class="legend_dept" label="基础图层" isopen="true">
-      <el-tree ref="tree" :data="layerTable" node-key="label" :default-expand-all="true"
-        :props="{ children: 'children', label: 'label' }" show-checkbox @check="subLayerChange" >
-        <el-row slot-scope="{ node, data }" class="custom-tree-node" style="width: 100%" >
-          <el-tooltip placement="right" effect="light">
-            <div slot="content" style="width: 130px">
-              <div><span class="el-tree-node__label">透明度:{{ data.opacity }}</span></div>
-              <el-slider v-model="data.opacity" input-size="mini" 
-                @input="data.layer.opacity = 1.0 - data.opacity / 100" :disabled="!data.visible" />
-            </div>
-            <span class="el-tree-node__label">{{ node.label }}</span>
-          </el-tooltip>
-        </el-row>
-      </el-tree>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="底图图层" isopen="true">
-      <el-row>
-        <el-col :span="8">
-          <el-switch v-model="showLabel" style="display: block" active-color="#2d74e7" inactive-color="#ecf2ff"
-                active-text="" inactive-text="标注图" @change="labelChange" :disabled="!showVectorBase && !showImageBase" />
-        </el-col>
-        <el-col :span="6" style="transform: translateX(-5px);" >
-          <span class="el-tree-node__label" style="white-space: nowrap;">透明度:{{ baseMapsNum[0] }}</span>
-        </el-col>
-        <el-col :span="10" >
-          <el-slider v-model="baseMapsNum[0]" @input="inputBaseLayer(0)" :disabled="!showLabel" />
-        </el-col>
-      </el-row>
-      <el-row style="margin-top: 5px" >
-        <el-col :span="8" >
-          <el-switch v-model="showVectorBase" style="display: block" active-color="#2d74e7" inactive-color="#ecf2ff" 
-          active-text="" inactive-text="矢量图" @change="labelMapChange" />
-        </el-col>
-        <el-col :span="6" style="transform: translateX(-5px);" >
-          <span class="el-tree-node__label" style="white-space: nowrap;">透明度:{{ baseMapsNum[1] }}</span>
-        </el-col>
-        <el-col :span="10"><el-slider v-model="baseMapsNum[1]" @input="inputBaseLayer(1)" :disabled="!showVectorBase"/></el-col>
-      </el-row>
-      <el-row style="margin-top: 5px">
-        <el-col :span="8">
-          <el-switch v-model="showImageBase" style="display: block" active-color="#2d74e7" inactive-color="#ecf2ff" active-text=""
-          inactive-text="影像图" @change="resMapChange" />
-        </el-col>
-        <el-col :span="6" style="transform: translateX(-5px);">
-          <span class="el-tree-node__label" style="white-space: nowrap;">透明度:{{ baseMapsNum[2] }}</span>
-        </el-col>
-        <el-col :span="10"><el-slider v-model="baseMapsNum[2]" @input="inputBaseLayer(2)" :disabled="!showImageBase"/></el-col>
-      </el-row>
-    </tf-legend>
-  </div>
-</template>
-<script>
-import tfLegend from '@/views/zhpt/common/Legend'
-export default {
-  name: 'LayerManagement',
-  components: { tfLegend },
-  props: {},
-  data() {
-    return {
-      showLabel: false,
-      showVectorBase: true,
-      showImageBase: true,
-      baseMapsNum: [0, 0, 0],
-      layerTable: [],
-    }
-  },
-  watch: {
-    sidePanelOn(newTab, oldTab) {
-      // if(e == 'layerManagement' && !this.mapView.isLayersInfoNeedReload) this.$nextTick(this.loadTree)      
-      if(newTab == oldTab) return
-      if(newTab == 'layerManagement') {
-        this.$nextTick(this.loadTree)  
-      }
-    },
-    showLabel(e) {
-      var basemaps = this.baseMaps
-      basemaps[1].visible = e && this.showVectorBase
-      basemaps[3].visible = e && this.showImageBase
-    },
-    showVectorBase(e) {
-      this.baseMaps[0].visible = e
-    },
-    showImageBase(e) {
-      this.baseMaps[2].visible = e
-    },
-  },
-  computed: {
-    sidePanelOn() {
-      return this.$store.state.map.P_editableTabsValue;
-    },
-  },
-  mounted: function() {
-    var mapView = this.mapView = this.$attrs.data.mapView
-    this.baseMaps = mapView.map.basemap.baseLayers.items
-    this.pipeLayer = this.baseMaps[4]
-    this.$nextTick(this.loadTree)
-  },
-  methods: {
-    loadTree() {
-      var tree = []
-      for(let i=0,il=this.pipeLayer.sublayers.items,ii=il.length;i<ii;i++){    
-        var layer = il[i]
-        tree.push({
-          id:layer.id, label: layer.title, visible: layer.visible ? 1 : 0,
-          opacity: 100 - layer.opacity * 100, layer: layer
-        })
-        if(!layer.sublayers) continue
-        var lastNode = tree[tree.length - 1]        
-        var nodeChildren = lastNode.children = []
-        var visible = 0
-        for(var j=0,jl=layer.sublayers.items,jj=jl.length;j<jj;j++){
-          layer = jl[j]
-          if(layer.visible) visible += 1
-          nodeChildren.push({
-            id:layer.id, label: layer.title, visible: layer.visible ? 1 : 0,
-            opacity: 100 - layer.opacity * 100, layer: layer, parent: lastNode
-          })
-        }
-        if(visible == jj) visible = 1
-        if(visible != 0 && visible != jj) visible = 0.5
-        tree[tree.length - 1].visible = visible
-      }
-      tree = tree.reverse()
-      for(let i=0,ii=tree.length;i<ii;i++){
-        if(tree[i].children) {
-          tree[i].children = tree[i].children.reverse()
-        }
-      }
-      this.layerTable = tree
-      var treeDiv = this.$refs.tree
-      this.$nextTick(() => {
-        for (let i = 0, il = tree, ii = il.length; i < ii; i++) {
-          var di = il[i]
-          treeDiv.setChecked(di.label, di.visible)
-          if(!di.children) continue
-          for (let j = 0, jl = di.children, jj = jl.length; j < jj; j++) 
-            treeDiv.setChecked(jl[j].label, jl[j].visible)        
-        }
-      })
-      var basemaps = this.baseMaps
-      this.showLabel = basemaps[1].visible || basemaps[3].visible
-      this.showImageBase = !(this.showVectorBase = basemaps[0].visible)
-      this.mapView.isLayersInfoNeedReload = true
-    },
-    subLayerChange: function(node) {
-      var dv
-      switch(node.visible) {
-        case 0:
-          node.layer.visible = true
-          dv = node.visible = 1
-          break
-        case 0.5: 
-          node.layer.visible = true
-          dv = node.visible = 1
-          break
-        case 1: 
-          node.layer.visible = false
-          dv = node.visible = 0
-          break
-      }
-      if(node.children) {
-        var ldv = dv != 0
-        for(var i=0,il=node.children,ii=il.length;i<ii;i++) {
-          var di = il[i]
-          di.layer.visible = ldv
-          di.visible = dv
-        }
-      } else if(node.parent) {
-        var p = node.parent
-        for(var i=0,il=p.children,ii=il.length,count = 0;i<ii;i++) {
-          if(il[i].visible == 1) count += 1
-        }
-        if(node.parent.visible == 0 && dv == 1) {
-          p.layer.visible = true
-          p.visible = count == il.length ? 1 : 0.5
-        } else if(node.parent.visible == 1 && dv == 0) {
-          p.visible = p.children.length == 1 ? 0 : 0.5
-          p.layer.visible = p.children.length != 1
-        } else if(node.parent.visible == 0.5 && dv == 0) {
-          p.visible = count == 0 ? 0 : 0.5
-          p.layer.visible = count != 0
-        } else if(node.parent.visible == 0.5 && dv == 1) {
-          p.visible = count == il.length ? 1 : 0.5
-        }
-      }
-    },
-    labelMapChange(n) {
-      var basemaps = this.baseMaps
-      if(n) {
-        this.showImageBase = false
-        if (this.showLabel) basemaps[3].visible = !(basemaps[1].visible = n)
-      } else this.showLabel = false
-    },
-    resMapChange(n) {
-      var basemaps = this.baseMaps
-      if(n) {
-        this.showVectorBase = false
-        if (this.showLabel) basemaps[1].visible = !(basemaps[3].visible = n)
-      } else this.showLabel = false
-    },
-    inputBaseLayer: function(w) {
-      if (w === 0) this.baseMaps[1].opacity = this.baseMaps[3].opacity = 1.0 - this.baseMapsNum[w] / 100
-      else this.baseMaps[w > 1 ? w : w - 1].opacity = 1.0 - this.baseMapsNum[w] / 100
-    },
-    labelChange: function(e) { this.baseMaps[this.showImageBase ? 3 : 1].visible = e }
-  }
-}
-</script>

+ 0 - 140
src/views/zhpt/tongyonggongju/layerTree/widget.vue

@@ -1,140 +0,0 @@
-<template>
-    <div class="tree_box" style="max-height: 800px">
-      <el-tree
-        ref="tree"
-        :data="layersData"
-        show-checkbox
-        :default-checked-keys="defaultCheckedKeys"
-        :default-expand-all="true"
-        node-key="id"
-        @check="setLayerVisible"
-      />
-    </div>
-</template>
-
-<script>
-
-import { Vector } from "ol/layer"
-import { appconfig } from 'staticPub/config'
-import { TF_Layer } from '@/views/zhpt/common/mapUtil/layer'
-import { mapUtil } from '../../common/mapUtil/common'
-
-export default {
-    props: {
-        data: null,
-    },
-    data () {
-        return {
-            layersData: [],
-            defaultCheckedKeys: [],
-            treeTitle: '', // 显示的图例, 
-            type: '' // 加载图例类型
-        }
-    },
-    created () {
-        console.log('图层树设置')
-        let [layerName, type] = appconfig.initLayers.split('&&')
-        this.treeTitle = layerName
-        this.type = type
-    },
-    methods: {
-        initTree () {
-            let layers = appconfig.gisResource['iserver_resource'].layerService.layers
-            let showlayer = layers.find(layer => layer.name === this.treeTitle)
-            let ids = [], id = 0
-            this.layersData = showlayer.sublayers.map(parentlayer => {
-                let parentName = parentlayer.name
-                let sublayers = parentlayer.sublayers.map(sublayer => {
-                    id++
-                    if (sublayer.visible) { ids.push(id) }
-                    return { id, label: sublayer.title, name: sublayer.name, parentName }
-                })
-                id++
-                return { id, label: parentlayer.title, name: parentName, children: sublayers }
-            })
-            this.defaultCheckedKeys = ids
-        },
-        setLayerVisible (row, check) {
-            if (this.type === 'smlayergroup') {
-                this.setLayerGroupVisible(row, check)
-            } else {
-                this.setSingleVisible(row, check)
-            }
-        },
-        // 图层组
-        initTree2 () {
-            let layers = appconfig.gisResource['iserver_resource'].layerService.layers
-            let layer = layers.find(layer => layer.name === this.treeTitle)
-            let ids = [], id = 0
-            this.layersData = layer.sublayers.map(layer => {
-                let sublayers = layer.sublayers.map(sub => {
-                    id++
-                    if (sub.visible) { ids.push(id) }
-                    return { id, label: sub.title, name: sub.name, parentName: layer.name }
-                })
-                id++
-                return { id, label: layer.title, name: layer.name, children: sublayers }
-            })
-            this.defaultCheckedKeys = ids
-        },
-        setSingleVisible (row, check) {
-            let visible = check.checkedKeys.includes(row.id)
-            let isParent = !row.parentName, parentName, layerName
-            if (isParent) { 
-                parentName = row.name 
-            } else { 
-                parentName = row.parentName
-                layerName = row.name
-            }
-            let parentLayer = appconfig.gisResource['iserver_resource'].layerService.layers.find(layer => layer.name === this.treeTitle)
-            parentLayer.sublayers.forEach(sublayer => {
-                if (isParent) {
-                    sublayer.visible = visible
-                } else {
-                    if(layerName === sublayer.name) { sublayer.visible = visible }
-                }
-            })
-            new mapUtil(this.data.mapView).setSingleLayerVisible()
-        },
-        // 图层显隐设置
-        setLayerGroupVisible (row, check) {
-            let visible = check.checkedKeys.includes(row.id)
-            let isParent = !row.parentName, parentName, layerName, layersVisible
-            if (isParent) { 
-                parentName = row.name 
-            } else { 
-                parentName = row.parentName
-                layerName = row.name
-            }
-            
-            // 修改配置项
-            let layers = appconfig.gisResource['iserver_resource'].layerService.layers.find(layer => layer.name === this.treeTitle)
-            layers.sublayers.forEach(layerGroup => {
-                let groupName = layerGroup.name
-                let sublayers = layerGroup.sublayers
-                sublayers.forEach(layer => {
-                    if (isParent) {
-                        if (groupName === parentName) { layer.visible = visible }
-                    } else {
-                        if (groupName === parentName && layerName === layer.name) { layer.visible = visible }
-                    }
-                })
-            })
-            new mapUtil(this.data.mapView).setGroupLayerVisible()
-        }
-    },
-    mounted () {
-        // TODO 图层服务发布尽量一致
-        if (this.type !== 'group') {
-            this.initTree()
-        } else {
-            this.initTree2()
-        }
-    }
-    
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 50
src/views/zhpt/tongyonggongju/leftBottomTool/propScale/widget.vue

@@ -1,50 +0,0 @@
-<template>
-  <div class='propScale'>
-    <span style="width:100%" ref="propScaleShow"></span>
-  </div>
-</template>
-
-<script>
-// 本模块用于管理左下角比例尺工具
-import {ScaleLine} from 'ol/control';
-export default {
-  name: 'propScale',
-
-  props: { 
-   map:{
-      type:Object,
-      default:null,
-    }
-  },
-  computed:{
-  },
-  data() {
-    return {
-      
-    }
-  },
-  mounted() {
-    this.showPropScale();
-  },
-  methods: {
-    /**
-     * 展示比例尺
-    */
-    showPropScale(){
-      let prop= new ScaleLine({
-          units: 'metric',
-          target: this.$refs['propScaleShow']
-        })
-      this.map.controls.push(prop);
-    }
-  }
-}
-</script>
-<style lang='scss' scoped>
-.propScale{
-    width: 120px;
-    position: relative;
-    float: left;
-    height: 30px;
-}
-</style>

+ 0 - 56
src/views/zhpt/tongyonggongju/leftBottomTool/showLoaction/widget.vue

@@ -1,56 +0,0 @@
-<template>
-  <div class='showLoaction'>
-    <span ref="loactionShow"></span>
-  </div>
-</template>
-
-<script>
-// 本模块用于管理左下角坐标工具
-import {MousePosition} from 'ol/control';
-import { format } from 'ol/coordinate';
-export default {
-  name: 'showLoaction',
-
-  props: { 
-      map:{
-      type:Object,
-      default:null,
-    }
-  },
-  computed:{
-  },
-  data() {
-    return {
-      
-    }
-  },
-  mounted() {
-    this.showPropScale();
-  },
-  methods: {
-    /**
-     * 展示坐标
-    */
-    showPropScale(){
-      let position= new MousePosition({
-          coordinateFormat: coordinate => {
-            return format(coordinate, '经度:{x}  纬度:{y}', 6);
-          }, // 保留6位小数位
-          target: this.$refs['loactionShow']
-        })
-      this.map.controls.push(position);
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.showLoaction{
-  position: relative;
-  float: left;
-  width: 340px;
-  height: 100%;
-  top: -6px;
-  color: rgba(0,0,0,0.50);
-}
-</style>

+ 0 - 41
src/views/zhpt/tongyonggongju/leftBottomTool/widget.vue

@@ -1,41 +0,0 @@
-<template>
-  <div class='leftBottomTool'>
-    <template v-for='(item,index) in toolList'>
-      <component :map='map' v-bind:is="item.name" :key="'leftBottomTool_'+index"> </component>
-    </template>
-  </div>
-</template>
-
-<script>
-// 本模块用于管理左下角的工具栏,所有的左上角工具都是从这里进行加载
-export default {
-  name: 'leftBottomTool',
-
-  components: {},
-  props: { 
-    toolList:{
-      type:Array,
-      default:[]
-    },
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-
-  }
-}
-</script>
-<style lang='scss' scoped>
-.leftBottomTool{
-  position: absolute;
-    bottom: 0px;
-    width: 460px;
-    z-index: 2;
-}
-</style>

BIN
src/views/zhpt/tongyonggongju/leftTopTool/searchTool/img/locate.png


+ 0 - 290
src/views/zhpt/tongyonggongju/leftTopTool/searchTool/widget.vue

@@ -1,290 +0,0 @@
-<template>
-  <div class='searchTool'>
-    <el-input :placeholder="'请输入'+ title" v-model="searchInput" class="searchInput input-with-select" clearable>
-      <el-select v-model="select" class='selectInput' @change="selectChange" slot="prepend" placeholder="请选择">
-        <template v-for="(item,index) in selectList">
-          <el-option :label="item.label" :value="item.value" :key="'searchTool_'+index"></el-option>
-        </template>
-      </el-select>
-      <el-button class='buttonDiv' style="color:#fff;" slot="append" @click="searchInfo" :icon="isloading ? 'el-icon-loading' : 'el-icon-search'"></el-button>
-    </el-input>
-    <div id="searchBox" v-if="resData.length !== 0" :v-loading='true' class="res-box i-scrollbar" v-scrollMore='getMore'>
-      <div v-for="(item, index) in resData" :key="index" class="more res-box-item" @click="setlocation(item.geometry, item.name)">
-        <div class="box-address" :title="item.title" v-html='item.mark'></div>
-        <div>
-          <span class="res-box-item-span" style="float:left;" :title="item.name">编号:{{ item.name }}</span>
-          <span class="res-box-item-span" style="float:right;">设备类型:{{ item.type }}</span>
-        </div>
-      </div>
-      <div v-show="showBottom" style="text-align:center;color:#ddd;margin-top:5px;height:20px;font-size:14px;">到底啦</div>
-    </div>
-  </div>
-</template>
-
-<script>
-// 搜索工具
-import iQuery from '@/views/zhpt/common/mapUtil/query';
-import VectorLayer from 'ol/layer/Vector';
-import VectorSource from 'ol/source/Vector';
-import { Feature } from 'ol';
-import { Point } from 'ol/geom';
-import { Style, Icon, Fill, Stroke, Text } from 'ol/style';
-import { mapUtil } from '@/views/zhpt/common/mapUtil/common';
-import { comSymbol } from '@/utils/comSymbol';
-import GeoJSON from 'ol/format/GeoJSON';
-import markImg from './img/locate.png'
-import { appconfig } from 'staticPub/config';
-
-export default {
-  name: 'searchTool',
-  // components: { tfLegend },
-  props: { 
-    map:{
-      type:Object,
-      default:null,
-    }
-  },
-  data() {
-    return {
-      selectList:[
-        {
-          label:"地名",
-          value:"1",
-        },{
-          label:"坐标",
-          value:"2",
-        }
-      ],
-      // 查询结果
-      resData: [],
-      select:'1',
-      searchInput:'',
-      title:"地名",
-      isloading: false,
-      // 储存的位置信息
-      showBottom: true,
-      maxLength: 1000,
-      searchData: [],
-      currDataIndex: 10,
-      vectorLayer: null,
-    }
-  },
-  watch: {
-    searchInput (n, o) {
-      if (n === '') {
-        this.resData = []
-        this.searchData = []
-        this.currDataIndex = 10
-        this.showBottom = false
-        this.clear()
-      }
-    }
-  },
-  computed: {
-  },
-  mounted() {
-
-  },
-  destroyed () {
-    this.vectorLayer && this.map.removeLayer(this.vectorLayer)
-    this.vectorLayer = null
-  },
-  methods: {
-    getMore () {
-      if (this.currDataIndex < this.maxLength - 1) {
-        this.resData.push(this.searchData[this.currDataIndex])
-        this.currDataIndex++
-      } else {
-        this.showBottom = true
-      }
-    },
-    /**
-     * 下拉框改变的时候
-    */
-    selectChange(){
-      let selectData=this.selectList.find(item=>{return item.value==this.select});
-      this.title= selectData.label === '坐标' ? '坐标如:101,26': selectData.label
-    },
-
-    /**
-     * 查询信息
-    */
-    searchInfo(){
-      if (!this.searchInput) return this.$message.warning(`请先输入${this.select === "1" ? '地名' : '坐标'}`)
-      if (!this.vectorLayer) {
-        this.vectorLayer =  new VectorLayer({ source: new VectorSource(), style: comSymbol.getLineStyle(6, 'rgb(64, 158, 255)') })
-        this.map.addLayer(this.vectorLayer)
-      }
-      console.log('查询的类型', this.select)
-      if (this.select === '1') {
-        this.searchAdress()
-      } else {
-        this.searchCoor()
-      }
-    },
-    /**
-     * 查询地址
-    */
-    searchAdress () {
-      console.log('搜索')
-      this.isloading = true
-      let queryText = `ADDRESS like '%${this.searchInput}%'`
-      let dataSetInfo = []
-      let [name, type] = appconfig.initLayers.split("&&")
-      let layer = mapUtil.getAllSubLayerNames(name, type)
-      layer.sublayers.forEach(group => {
-        group.sublayers.forEach(sub => {
-          dataSetInfo.push({ name: sub.name.split('@')[0], label: sub.title })
-        })
-      })
-      new iQuery({ dataSetInfo }).sqlQuery(queryText, this.maxLength).then(res => {
-        this.isloading = false
-        let resData = res.filter(item => item.type === "processCompleted" && item.result.featureCount !== 0)
-        if (resData.length !== 0) {
-          let data = []
-          resData.forEach(result => {
-            let feas = result.result.features.features
-            data = [...data, ...feas]
-          })
-          this.resData = data.map(item => {
-            this.lightInfo = this.searchInput
-            let add = item.properties['ADDRESS']
-            let geometry = item.geometry
-            let mark = add.replace(this.searchInput, '<span class="light-text">地址:  ' + this.searchInput +'</span>')
-            return { 
-              name: item.properties['LNO'] || item.properties['SID'],
-              type: item.properties['TYPE'], 
-              mark, geometry, title: add }
-          })
-          this.searchData = [...this.resData]
-          this.resData.length = this.currDataIndex
-        } else this.$message.success('查询无数据')
-      })
-    },
-    /**
-     * 查询坐标
-    */
-    searchCoor () {
-      let coors = this.searchInput.split(',')
-      if (isNaN(coors[0] || isNaN(coors[1]))) {
-        this.$message.warning('请输入正确的坐标格式,如:101.72,26.57')
-      } else if (coors[0] > 180 || coors[1] > 90){
-        this.$message.warning('请输入正确的坐标格式, 经度不超过180, 纬度不超过90')
-      } else {
-        let feature = new Feature({ geometry: new Point([Number(coors[0]), Number(coors[1])]) })
-        feature.setStyle(new Style({ image: new Icon({ src: markImg, size:[200, 200], scale: 0.2 }) }))
-        let textFea = new Feature({ geometry: new Point(coors) })
-        textFea.setStyle(new Style({ text: new Text({ text: this.searchInput, offsetY: 40 })}))
-        this.location(coors, [feature, textFea])
-      }
-    },
-    setlocation (geometry, text) {
-      let feature = new Feature({ geometry: new GeoJSON().readGeometry(geometry) })
-      let center = new mapUtil().getCenterFromFeatures(feature)
-      let textFea = new Feature({ geometry: new GeoJSON().readGeometry(geometry) })
-      textFea.setStyle(new Style({ text: new Text({ text: text, offsetY: 40 })}))
-      this.location(center, [feature, textFea])
-    },
-    /**
-     * 定位
-    */
-    location (center, features) {
-      this.vectorLayer.getSource().clear()
-      this.vectorLayer.getSource().addFeatures(features)
-      this.map.getView().setCenter(center)
-      this.map.getView().setZoom(19)
-    },
-    /**
-     * 清除定位坐标
-    */
-    clear () {
-      this.vectorLayer && this.vectorLayer.getSource().clear()
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-  @import "~@/styles/mixin.scss";
-  .box-address {
-    height: 40px;
-    font-size: 18px;
-    font-weight: bold;
-    line-height: 40px;
-    letter-spacing: 3px;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    overflow: hidden;
-  }
-  /deep/ .light-text {
-    color: rgb(45, 116, 231);
-  }
-  .searchTool{
-  height: 40px;
-  position: relative;
-  float: left;
-  width: 350px;
-  /deep/ .selectInput{
-    width: 90px;
-  }
-  /deep/ .el-input-group__prepend{
-    background:white !important; 
-  }
-  /deep/ .el-input-group__append{
-    background: rgba(64, 158, 255, 1) !important;
-  }
-  /deep/ .el-icon-search{
-    color: white !important;
-  }
-  .res-box {
-    box-sizing: border-box;
-    width: 100%;
-    max-height: 300px;
-    background-color: rgb(246, 246, 246);
-    padding: 10px;
-    flex-direction: column;
-    align-content: center;
-    color:#000;
-  }
-  .i-scrollbar {
-    overflow-y: scroll;
-    overflow-x: hidden;
-    // @include scrollBar;
-  }
-  .res-box-item {
-    cursor: pointer;
-    font-size: 15px;
-    border-radius: 3px;
-    background-color: #fff;
-    height: 80px;
-    line-height: 20px;
-    box-sizing: border-box;
-    padding: 10px 5px;
-    margin: 5px 0;
-    // &:hover {
-    //   background-color: rgb(64, 158, 255);
-    //   color: #fff;
-    // }
-  }
-  .res-box-item-span {
-    font-size: 13px;
-    color:#bbb;
-    max-width: 50%;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-  }
-  #searchBox .res-box-item:hover div {
-    color: #fff;
-  }
-  #searchBox .res-box-item:hover{
-    background: rgb(45, 116, 231);
-    color: #fff;
-  }
-  #searchBox .res-box-item:hover div .res-box-item-span{
-    color: #fff;
-  }
-  /deep/ #searchBox .res-box-item:hover div .light-text{
-    color: #fff;
-  }
-}
-</style>

+ 0 - 124
src/views/zhpt/tongyonggongju/leftTopTool/upOrDownView/widget.vue

@@ -1,124 +0,0 @@
-<template>
-  <div class='upOrDownView'>
-    <span class='remark' title='上一视图' @click="upView"><i class="el-icon-back" /></span>
-    <span class='lineSplit'></span>
-    <span class='remark' title='下一视图' @click="downView"><i class="el-icon-right" /></span>
-  </div>
-</template>
-
-<script>
-// 上一视图和下一视图
-
-export default {
-  name: 'upOrDownView',
-  // components: { tfLegend },
-  props: { 
-    map:{
-      type:Object,
-      default:null,
-    }
-  },
-  data() {
-    return {
-      /**存储视图范围*/ 
-      viewExtents:[],
-      /**当前视图对应的视图索引*/ 
-      pointer: -1,
-      /**用于区分是按钮操作还是鼠标操作,点击上一视图和下一视图为1,鼠标操作为0*/ 
-      clickFlag:0,
-    }
-  },
-  mounted() {
-    this.mapMoveListener();
-  },
-  methods: {
-    /**
-     * 监听视图的移动变化
-    */
-    mapMoveListener(){
-      this.map.on('moveend', res => {
-        // 视图的变化不是触发前一视图、后一视图事件时
-        if (this.clickFlag == 0&&this.map.getView().getCenter()[0]) {
-          this.viewExtents.splice(this.pointer, this.viewExtents.length - this.pointer-1);
-          this.viewExtents.push({
-            zoom: this.map.getView().getZoom(),
-            center: this.map.getView().getCenter()
-          })
-          this.pointer += 1;
-        } else {
-          this.clickFlag = 0;
-        }
-      });
-    },
-
-    /**
-     * 上一视图
-    */
-    upView(){
-      this.clickFlag=1;
-      if (this.pointer == 0) {
-        return;
-      }
-      this.pointer -= 1;
-      this.setView();
-    },
-
-    /**
-     * 下一视图
-    */
-    downView(){
-      this.clickFlag=1;
-      if (this.pointer >= this.viewExtents.length - 1) {
-        return;
-      }
-      this.pointer += 1;
-      this.setView();
-    },
-
-    /**
-     * 设置wiew范围
-     */
-    setView() {
-      let view = this.map.getView();
-      view.setZoom(this.viewExtents[this.pointer].zoom);
-      view.animate({
-        center: this.viewExtents[this.pointer].center,
-        duration: 600
-      });
-    },
-  }
-}
-</script>
-<style lang="scss" scoped>
-.upOrDownView{
-  position: relative;
-  float: left;
-  width: 74px;
-  height: 40px;
-  font-size: 30px;
-  color: rgb(179,178,178);
-  background: white;
-  left: 5px;
-  box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
-  border-radius: 2px;
-  .lineSplit{
-    border-left: 1px solid rgba(128,128,128,0.2);
-    height: 30px;
-    display: inline-block;
-    position: relative;
-    float: left;
-    top: 5px;
-  }
-  .remark{
-    position: relative;
-    float: left;
-    padding: 0px 3px;
-    top: 2px;
-    &:hover {
-      cursor: pointer;
-      color: rgb(64, 158, 255);
-      transform: scale(1.2);
-    }
-  }
-}
-</style>

+ 0 - 41
src/views/zhpt/tongyonggongju/leftTopTool/widget.vue

@@ -1,41 +0,0 @@
-<template>
-  <div class='leftTopTool'>
-    <template v-for='(item,index) in toolList'>
-      <component :map='map' v-bind:is="item.name" :key="'leftTopTool_'+index"> </component>
-    </template>
-  </div>
-</template>
-
-<script>
-// 本模块用于管理左上角的工具栏,所有的左上角工具都是从这里进行加载
-
-export default {
-  name: 'leftTopTool',
-  components: {},
-  props: { 
-    toolList:{
-      type:Array,
-      default:[]
-    },
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-
-  }
-}
-</script>
-<style lang="scss" scoped>
-.leftTopTool{
-  position:absolute;
-  z-index: 2;
-  top: 10px;
-  left: 10px;
-}
-</style>

+ 0 - 172
src/views/zhpt/tongyonggongju/mapMark/widget.vue

@@ -1,172 +0,0 @@
-<template>
-  <div style="padding: 0 8px">
-    <tf-legend class="legend_dept" label="添加书签" isopen="true" title="将当前地图显示区域保存为一个地图书签。">
-      <el-input v-model="queName" placeholder="请输入书签名称" class="input-with-select">
-        <template slot="prepend"><span style="color: red;">*</span>名称</template>
-      </el-input>
-      <el-input v-model="queMark" placeholder="请输入书签描述" class="input-with-select" style="margin-top: 8px">
-        <template slot="prepend"><span style="color: red;">*</span>描述</template>
-      </el-input>
-      <el-button style="width: 100%; margin-top: 6px" size="mini" type="primary" @click="addMark()">添加书签</el-button>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="我的书签" isopen="true" title="查看所有已保存的地图书签。">      
-      <el-row>
-        <el-col :span="24">
-          <el-table height='550px' @row-click='jump' ref="markTable" :default-sort="{ prop: 'date', order: 'descending' }" :data="list" stripe style="width: 100%;" row-class-name="selectRowC">
-            <!-- <el-table-column type="selection" width="55" /> -->
-            <template slot="empty">
-              <img src="@/assets/icon/null.png" alt="">
-              <p class="empty-p">暂无数据</p>
-            </template>
-            <el-table-column type="selection" width="30"> </el-table-column>
-            <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
-
-            <el-table-column prop="markName" label="名称" width="100" align="center" sortable='true'>
-              <template slot-scope="scope">
-                <el-tooltip class="item" effect="dark" :content="scope.row.markName" placement="top-start">
-                  <span>{{ scope.row.markName }}</span>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-            <el-table-column prop="remark" label="书签描述" align="center">
-              <template slot-scope="scope">
-                <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="top-start">
-                  <span>{{ scope.row.remark }}</span>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-            <el-table-column prop="time" label="时间" width="100" align="center" sortable='true'></el-table-column>
-            <!-- <el-table-column prop="center" label="操作" width="100" align="center">
-              <template slot-scope="scope">
-                <el-link type="primary" @click="jump(scope.row)">跳转</el-link>
-                <el-link type="primary" @click="deleteMark(scope.row)">删除</el-link>
-              </template>
-            </el-table-column> -->
-          </el-table>
-        </el-col>
-      </el-row>
-      <el-row style="margin-top: 8px">
-        <el-col :span="20">
-          <el-pagination ref="pagination" small background layout="total, sizes, prev, next" 
-          :page-size.sync='pageSize' :current-page.sync='currentPage' :page-sizes="[10, 20, 30, 50, 100, 1000]" :total="total"
-          @current-change="listRefersh" @size-change="listRefersh" />
-        </el-col>
-      </el-row>
-      <el-row style="margin-top: 8px" >
-        <el-button size="mini" style="width: 100%;" type="primary" @click="deleteMarks">删除选定书签</el-button>
-      </el-row>
-    </tf-legend>
-  </div>
-</template>
-
-<script>
-import { esriConfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import { getMapMark, addMapMark, deleteMapMark } from '@/api/mainMap/mapMark'
-
-export default {
-  name: 'MapMark',
-  components: { tfLegend },
-  props: { param: Object },
-  data() {
-    return {
-      queName: '',
-      queMark: '',
-      list: [],
-      total: 0,
-      
-      currentPage: 1,
-      pageSize: 30
-    }
-  },
-  mounted() {
-    this.mapView = this.$attrs.data.mapView
-    this.listRefersh()
-  },
-  methods: {
-    jump (row) {
-      console.log("跳转")
-      let view = this.mapView.getView()
-      view.setCenter(row.center.split(","))
-      view.setZoom(row.zoom)
-    },
-    addMark() {
-      let view = this.mapView.getView()
-      let markName = this.queName
-      let remark = this.queMark
-      if(!markName) return this.$message.error('请输入书签名称');
-      if(!remark) return this.$message.error('请输入书签描述');
-
-      let param = {
-        markName,
-        imgLink: '',
-        remark,
-        zoom: view.getZoom(),
-        center: view.getCenter().toString(),
-        userId: this.$store.state.user.userId
-      }
-      addMapMark(param).then(res => {
-        if (res.code === 1) {
-          let mark = this.queMark
-          this.$message.success('添加书签:' + markName + ' 成功');
-          this.queName = this.queMark = ''
-          this.listRefersh()
-        }
-      })
-    },
-    deleteMark (row) {
-      this.$confirm(
-        `是否删除 ${row.markName} 书签?`, '提示',
-        { distinguishCancelAndClose: true, confirmButtonText: '确定', cancelButtonText: '取消' }
-      ).then(() => {
-        deleteMapMark(row.id).then(res => {
-          if(res.code == 1) {
-            this.$message(`${row.markName}已删除`);
-            this.$refs.pagination.internalCurrentPage = 1
-            this.listRefersh()
-          } else this.$message(res.message)
-        })
-      })
-    },
-    deleteMarks() {
-      var selects = this.$refs.markTable.selection
-      if(!selects.length) return this.$message.error('未选中任何书签');
-      let markNames = selects.map(item => item.id );
-      console.log('书签', markNames)
-      this.$confirm(
-        '确定删除选中的 ' + selects.length + '条书签?', '提示',
-        { distinguishCancelAndClose: true, confirmButtonText: '确定', cancelButtonText: '取消' }
-      ).then(() => {
-        deleteMapMark({ ids: markNames.join(",") }).then(res => {
-          if(res.code == 1) {
-            this.$message("已删除");
-            this.$refs.pagination.internalCurrentPage = 1
-            this.listRefersh()
-          } else this.$message(res.message)
-        })
-      })
-    },
-    listRefersh() {
-      var pages = this.$refs.pagination
-      let param = { size: this.pageSize, current: this.currentPage }
-      getMapMark(param).then(res => {
-        if(res.code == 1 && res.result) {
-          res = res.result
-          this.total = res.total
-          let list = res.records.map(item => {
-            return { id: item.id, markName: item.markName, center: item.center, zoom: item.zoom, remark: item.remark }
-          })
-          this.list = list
-        } else {
-          res.message && this.$message(res.message)
-        }
-      })
-    },
-    rowClick(row) {
-      this.mapView.center = {x: row.center[0], y: row.center[1], spatialReference: this.mapView.spatialReference}
-      this.mapView.zoom = row.zoom
-      this.$message("当前书签:" + row.name);
-    }
-  }
-}
-</script>

+ 0 - 41
src/views/zhpt/tongyonggongju/mapPrint/css.scss

@@ -1,41 +0,0 @@
-.panel-container {
-    margin-bottom: 20px;
-  
-    .item-head {
-      font-size: 14px;
-      font-family: Source Han Sans CN;
-      color: #333333;
-      line-height: 18px;
-      margin: 10px 0;
-      font-weight: 600;
-  
-      &::before {
-        content: '';
-        display: inline-block;
-        width: 3px;
-        height: 12px;
-        background: #2a77f7;
-        vertical-align: middle;
-        margin-right: 5px;
-      }
-    }
-  
-    .el-input-number>>>.el-input__inner {
-      text-align: left;
-    }
-  
-    .op-box {
-      width: 100%;
-      box-sizing: border-box;
-      padding: 10px;
-  
-      .item-close {
-        cursor: pointer;
-  
-        &:hover {
-          color: #f40;
-        }
-      }
-    }
-  }
-  

+ 0 - 330
src/views/zhpt/tongyonggongju/mapPrint/widget.vue

@@ -1,330 +0,0 @@
-<template>
-  <!-- 地图打印 -->
-  <div class="panel-container i-scrollbar">
-    <div class="op-box">
-      <el-form label-width="auto">
-        <div class="item-head" style="margin-top:0">基本信息</div>
-        <el-form-item label="打印图层" style="margin:0">
-          <el-select v-model="selectLayers" multiple value-key="layerUrl" size="small" placeholder="选择打印图层" @change="selectLayer"
-                     style="width:100%">
-            <el-option-group v-for="group in layersOptions" :key="group.label" :label="group.label">
-              <el-option v-for="item in group.options" :key="item.layerUrl" :label="item.label" :value="item"></el-option>
-            </el-option-group>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="布局模板">
-          <el-select v-model="mapPrintPraram.template" size="small" placeholder="选择打印模板" style="width:100%">
-            <el-option v-for="(item,index) in printTemplates" :key="index" :label="item" :value="item"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="标题">
-          <el-input v-model="mapPrintPraram.title" size="small" placeholder="输入地图标题"></el-input>
-        </el-form-item>
-        <el-form-item label="副标题">
-          <el-input v-model="mapPrintPraram.subTitle" size="small" placeholder="输入地图副标题"></el-input>
-        </el-form-item>
-        <el-form-item label="版权信息">
-          <el-input v-model="mapPrintPraram.copyrightInfo" size="small" placeholder="输入版权信息"></el-input>
-        </el-form-item>
-        <el-form-item label="作者">
-          <el-input v-model="mapPrintPraram.author" size="small" placeholder="输入作者名称"></el-input>
-        </el-form-item>
-        <div class="item-head">比例尺</div>
-        <el-form-item label="文本">
-          <el-input v-model="mapPrintPraram.scaleText" size="small" placeholder="输入比例尺文本"></el-input>
-        </el-form-item>
-        <el-form-item label="样式">
-          <el-select v-model="mapPrintPraram.scaleStyle" size="small" placeholder="选择比例尺样式" style="width:100%">
-            <el-option label="线状(line)" value="LINE"></el-option>
-            <el-option label="条状(bar)" value="BAR"></el-option>
-            <!-- <el-option label="bar_sub" value="BAR_SUB"></el-option> -->
-          </el-select>
-        </el-form-item>
-        <el-form-item label="段数">
-          <!-- <el-input v-model="mapPrintPraram.intervals" size="small" placeholder="输入比例尺段数"></el-input> -->
-          <el-input-number size="small" v-model="mapPrintPraram.intervals" placeholder="输入比例尺段数" controls-position="right" :step="1"
-                           :min="3" :max="10" style="width:100%" @blur="intervalsChange">
-          </el-input-number>
-        </el-form-item>
-        <el-form-item label="单位">
-          <el-select v-model="mapPrintPraram.scaleUnit" size="small" placeholder="选择比例尺单位" style="width:100%">
-            <el-option label="米" value="METER"></el-option>
-            <!-- <el-option label="英里" value="FOOT"></el-option>
-                    <el-option label="度" value="DEGREES"></el-option> -->
-          </el-select>
-        </el-form-item>
-        <div class="item-head">导出选项</div>
-        <el-form-item label="格式">
-          <el-select v-model="mapPrintPraram.exportFormat" size="small" placeholder="选择导出格式" style="width:100%">
-            <el-option label="PDF" value="PDF"></el-option>
-            <el-option label="PNG" value="PNG"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="分辨率">
-          <!-- <el-input v-model="mapPrintPraram.exportDpi" size="small" placeholder="输入分辩率"></el-input> -->
-          <el-input-number size="small" v-model="mapPrintPraram.exportDpi" placeholder="输入分辩率" controls-position="right" :step="10"
-                           :min="96" :max="496" style="width:100%" @blur="dpiChange"></el-input-number>
-        </el-form-item>
-      </el-form>
-    </div>
-    <div class="op-box">
-      <el-button type="primary" style="width:100%" size="small" @click="printMap" :loading="printStatus">
-        <span v-if="printStatus==false">打印</span>
-        <span v-else>正在打印中…</span>
-      </el-button>
-    </div>
-  </div>
-</template>
-
-<script>
-
-import { unByKey } from 'ol/Observable';
-import { SuperMap, WebPrintingJobService } from '@supermap/iclient-ol'
-import { appconfig } from 'staticPub/config'
-
-export default {
-  props: {
-      data: Object
-  },
-  data() {
-    return {
-      txt: '',
-      activeNames: ['1'],
-      printStatus: false,
-      printTemplates: [], // 模板
-      layersOptions: [], // 图层
-      webPrintingJobService: null,
-      selectLayers: [], // 选择的图层
-      mapPrintPraram: {
-        template: 'default', // 模板
-        title: '', //标题
-        subTitle: '', // 副标题
-        copyrightInfo: '', //版权
-        author: '', // 作者
-        scale: 0, // 小地图比例尺
-        zoom: 0, // 地图缩放级别
-        mapCenterPoint: '',//地图中心点
-        scaleText: '比例尺', // 比例尺文本
-        scaleStyle: 'BAR',// 比例尺样式
-        intervals: 3, // 比例尺段数
-        scaleUnit: 'METER',//单位
-        exportFormat: 'PDF',//导出格式
-        exportDpi: 96, //分辨率
-        exportScale: 0, //导出比例尺
-        legendItems: [], //图例
-        layers: [],//图层
-      },
-      mapViewChangeEvent: null // 地图视图变化监听事件
-    }
-  },
-  mounted() {
-    // 初始化参数选项
-    this.initMapPrintParam()
-    // 地图监听中心点和比例尺
-    this.initMapCenterAndScale()
-    
-  },
-  // 组件销毁时
-  destroyed() {
-    unByKey(this.mapViewChangeEvent) // 销毁视图变化监听
-  },
-  methods: {
-    // 初始化地图中心点比例尺
-    initMapCenterAndScale () {
-      let that = this
-      let map = that.data.mapView;
-      reset()
-      this.mapViewChangeEvent = map.on('moveend', res => reset);
-
-      function reset () {
-        let center = map.getView().getCenter()
-        that.mapPrintPraram.mapCenterPoint = center[0].toFixed(6) + ',' + center[1].toFixed(6)
-        that.mapPrintPraram.zoom = map.getView().getZoom()
-        // 分辨率
-        const resolution = map.getView().getResolution()
-        // 计算比例尺
-        that.mapPrintPraram.exportScale = (3779.5 * resolution).toFixed(6)
-        that.mapPrintPraram.scale = (3779.5 * resolution * 2).toFixed(6)
-      }
-    },
-    handleChange(val) {
-      console.log(val);
-    },
-    /**
-     * 图层选项分组
-     */
-    layerGroup(groupName, layers) {
-      if (layers.length > 0) {
-        let layerGroupItem = { label: groupName, options: [] }
-        layers.forEach(layer => {
-          if (layer.hasOwnProperty('legendUrl')) {
-            layerGroupItem.options.push({ label: layer.name, layerUrl: layer.url, legendUrl: layer.legendUrl })
-          } else {
-            layerGroupItem.options.push({ label: layer.name, layerUrl: layer.url })
-          }
-        });
-        this.layersOptions.push(layerGroupItem)
-      }
-    },
-    /**
-     * 初始化地图打印参数
-     */
-    initMapPrintParam() {
-      const iServerBaseUrl = appconfig.gisResource.printer.url
-      this.webPrintingJobService = new WebPrintingJobService(iServerBaseUrl, { withCredentials: false })
-      // 获取打印模板信息
-      this.webPrintingJobService.getLayoutTemplates(e => {
-        e.result.forEach(item => {
-          if (item.templateName != 'A4_landscape_v2' && item.templateName != 'A3_mapcornermarks')
-            this.printTemplates.push(item.templateName)
-        })
-      })
-      // 初始化图层选项
-      let layers = appconfig.gisResource['iserver_resource'].layerService.layers
-      let baseLayers = layers.filter(layer => layer.parentname === "底图")
-      let pipelineLayers = layers.filter(layer => layer.parentname === "管线")
-      this.layerGroup('基础底图', baseLayers)
-      this.layerGroup('管线图层', pipelineLayers)
-    },
-    /**
-     * 选择打印图层
-     */
-    selectLayer(valueArray) {
-      this.mapPrintPraram.layers = []
-      this.mapPrintPraram.legendItems = []
-      valueArray.forEach(item => {
-        this.mapPrintPraram.layers.push({ "layerType": "TILE", "name": item.label, "url": item.layerUrl })
-        if (item.hasOwnProperty('legendUrl')) {
-          this.mapPrintPraram.legendItems.push({ "name": item.label, "picAsUrl": item.legendUrl })
-        }
-
-      });
-    },
-    /**
-     * 打印地图
-     */
-    printMap() {
-      this.printStatus = true // 执行状态
-      console.log("参数:", this.mapPrintPraram.mapCenterPoint)
-      let params = new SuperMap.WebPrintingJobParameters({
-        "layoutOptions": {
-          "templateName": this.mapPrintPraram.template,
-          "title": this.mapPrintPraram.title,
-          "subTitle": this.mapPrintPraram.subTitle,
-          "author": this.mapPrintPraram.author,
-          "copyright": this.mapPrintPraram.copyrightInfo,
-          "northArrowOptions": {
-            "picAsUrl": "file://NorthArrow.svg"
-          },
-          "scaleBarOptions": {
-            "scaleText": this.mapPrintPraram.scaleText,
-            type: this.mapPrintPraram.scaleStyle,
-            intervals: this.mapPrintPraram.intervals,
-            unit: this.mapPrintPraram.scaleUnit,
-          },
-          "legendOptions": {
-            "title": "图例",
-            "customItems": this.mapPrintPraram.legendItems
-          },
-          "littleMapOptions": {
-            "center": {
-              "x": this.mapPrintPraram.mapCenterPoint.split(',')[0],
-              "y": this.mapPrintPraram.mapCenterPoint.split(',')[1]
-            },
-            // "scale": this.mapPrintPraram.scale,
-            "layers": this.mapPrintPraram.layers
-          }
-        },
-        "exportOptions": {
-          "format": this.mapPrintPraram.exportFormat,
-          "dpi": this.mapPrintPraram.exportDpi,
-        },
-        "content": {
-          "type": "WEBMAP",
-          "value": {
-            "maxScale": "1:144447.927",
-            "level": this.mapPrintPraram.zoom,
-            "center": {
-              "x": this.mapPrintPraram.mapCenterPoint.split(',')[0],
-              "y": this.mapPrintPraram.mapCenterPoint.split(',')[1]
-            },
-            "layers": this.mapPrintPraram.layers,
-            "description": "",
-            "projection": "EPSG:4490",
-            "minScale": "1:591658710.909",
-            "title": "china_point",
-            "version": "2.0.0"
-          }
-        }
-
-      })
-      console.log("校验参数", params)
-      //校验参数
-      this.filterEmptyData(params)
-
-      this.webPrintingJobService.createWebPrintingJob(params, e => {
-        if (e.result && e.result[0] && e.result[0].path) {
-          this.webPrintingJobService.getPrintingJob(e.result[0].resourceConfigID, res => {
-            if (res.result && res.result.status === 'FINISHED') {
-              let link = document.createElement('a');
-              link.href = res.result.result.downloadUrl;
-              link.download = 'supermap-webprinting-report.pdf';
-              link.click();
-              // 释放内存
-              window.URL.revokeObjectURL(link.href);
-              this.printStatus = false // 执行状态
-            } else {
-              this.$message.error('打印失败!');
-              this.printStatus = false // 执行状态
-            }
-          });
-        } else {
-          this.$message.error('打印失败!!');
-          this.printStatus = false // 执行状态
-        }
-
-      });
-    },
-    /**
-     * 校验打印参数
-     */
-    filterEmptyData(params) {
-      for (let key in params) {
-        if (params[key] === undefined) {
-          delete params[key];
-        } else if (typeof params[key] === 'object') {
-          this.filterEmptyData(params[key]);
-          if (JSON.stringify(params[key]) === '{}') {
-            delete params[key];
-          }
-        }
-      }
-    },
-    /**
-     * 比例尺段数
-     */
-    intervalsChange() {
-      if (!this.mapPrintPraram.intervals) {
-        this.mapPrintPraram.intervals = 3
-      }
-    },
-    /**
-     * dpi分辨率
-     */
-    dpiChange(val, oldVal) {
-      if (!this.mapPrintPraram.exportDpi) {
-        this.mapPrintPraram.exportDpi = 96
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-@import './css.scss';
-@import "~@/styles/mixin.scss";
-.i-scrollbar {
-    overflow: auto;
-  @include scrollBar;
-}
-</style>

+ 0 - 36
src/views/zhpt/tongyonggongju/mouseLocation/widget.vue

@@ -1,36 +0,0 @@
-<template>
-  <div ref="mouse" style="position: absolute; bottom: 5px; left: 5px;" class="littleWidget">
-    <span style="padding-left:5px" ref="scale">比例尺:1:125000</span>
-    <span style="padding-left:5px" ref="location">坐标:</span>
-  </div>
-</template>
-<script>
-export default {
-  name: 'MouseLocation',
-  components: {},
-  props: {
-    mapView: {
-      type: Object,
-      default: () => []
-    }
-  },
-  data() {
-    return {}
-  },
-  watch: {
-    mapView: function(e) {
-      var scale = this.$refs.scale
-      var location = this.$refs.location
-      var view = this.mapView
-      view.TF_mouseLocation = this
-      this.mapView.on('pointer-move', function(evt) {
-        var xy = view.toMap({ x: evt.x, y: evt.y })
-        location.innerHTML = xy ? '坐标:' + xy.x.toFixed(5) + ',' + xy.y.toFixed(5) : '' // that.mapView.zoom+","+that.mapView.resolution+","+that.mapView.scale;//+"\n"+
-      })
-      this.mapView.watch('resolution', function(e) {
-        scale.innerHTML = '比例尺:1:' + view.scale.toFixed(0)
-      })
-    }
-  }
-}
-</script>

+ 0 - 92
src/views/zhpt/tongyonggongju/overlay/widget.vue

@@ -1,92 +0,0 @@
-<template>
-    <div ref="overlay" style="display: none; width: 600px; height: 400px; position: absolute;transition: 0.3s;transition-property: width,height;">
-        <div style="width:100%;height:30px;background:#2D74E7;padding:5px;color:#fff;">
-            <span style="line-height: 20px;">{{ title }}</span>
-            <i ref="close" class="el-icon-close" style="float:right;font-size:20px;cursor: pointer; font-weight: bold;"></i>
-            <i ref="moreInfoShow" class="el-icon-copy-document" style="float:right;font-size:20px;cursor: pointer; font-weight: bold;margin-left:5px;"></i>
-        </div>
-        <div id="overlayContant" ref="thing" style="width:100%;height:calc(100% - 29px);background:#fff;border: 1px solid #2D74E7;overflow: auto;padding:10px;">
-        </div>
-    </div>
-</template>
-
-<script>
-export default {
-    name: 'overlay',
-    props: { param: Object },
-    data() {
-        return {
-            title: ''
-        }
-    },
-    mounted: function() {
-        var overlay = this.$refs.overlay
-        var mapView = this.mapView = this.param
-        var isOpen = false
-        var cache
-        mapView.TF_overlay = {
-            show:(position, title) => {
-                if(title) this.title = title
-                overlay.style.display = ''
-                var divLocation = mapView.toScreen(cache = position)
-                overlay.style.left = divLocation.x + 'px'
-                overlay.style.top = divLocation.y + 'px'
-                if(this.isOnMove) this.extentMove.remove()
-                this.isOnMove = true
-                this.extentMove = mapView.watch('extent', () => {
-                    if(isOpen) return
-                    var ne = mapView.toScreen(cache)
-                    overlay.style.left = ne.x + 'px';
-                    overlay.style.top = ne.y + 'px';
-                })
-                return this.$refs.thing
-            },
-            off:() => {
-                this.$refs.thing.innerHTML = ''
-                isOpen = false                
-                moreInfoShow.className = 'el-icon-copy-document'
-                overlay.style.cssText = 'display:none;width: 600px; height: 400px; position: absolute; transition: 0.3s;transition-property: width,height;'
-                if(this.isOnMove) {
-                    this.extentMove.remove()
-                    this.isOnMove = false
-                }                
-            }
-        }
-        this.$refs.close.onclick = mapView.TF_overlay.off
-        var moreInfoShow = this.$refs.moreInfoShow
-        moreInfoShow.onclick = () => {
-            if(isOpen = !isOpen) {
-                moreInfoShow.className = 'el-icon-minus'
-                overlay.style.cssText = "width: 80%; height: 80%; position: absolute; transition: 0.3s;left: 10%;top: 10%;transition-property: width,height;"
-            }
-            else {
-                moreInfoShow.className = 'el-icon-copy-document'
-                var ne = mapView.toScreen(cache)
-                overlay.style.cssText = "width: 600px; height: 400px; position: absolute; transition: 0.3s;left: " + ne.x + 'px;top: '+ ne.y + 'px;transition-property: width,height;'
-            }
-        }
-    },
-    destroyed: function() {
-        if(this.isOnMove) this.extentMove.remove()
-        delete this.mapView.TF_overlay
-    }
-}
-</script>
-<style type="scss" scoped>
-#overlayContant >>> .flexDiv {
-    width: 33%;
-    min-height: 30px;
-    line-height: 30px;
-    margin-top: 10px;
-    color: #606266;
-}
-#overlayContant >>> .flexDiv .flexTitle{
-    min-width: 90px;
-    display: inline-block;
-    text-align: right;
-}
-#overlayContant >>> .flexDiv .flexInfo{
-    display: inline-block;
-    width: calc(100% - 90px);
-}
-</style>

BIN
src/views/zhpt/tongyonggongju/overviewMap/images/overviewMap.png


+ 0 - 112
src/views/zhpt/tongyonggongju/overviewMap/widget.vue

@@ -1,112 +0,0 @@
-<template>
-  <div style="position: absolute; bottom: 5px; right: 10px;">
-    <div class="widgetGroupButtoms" title="鹰眼" @click="showMap" style="right: 0; bottom: 0; position: absolute;" >
-      <img src="./images/overviewMap.png">
-    </div>
-    <transition name="el-fade-in">
-      <div v-show="isShow" ref="overviewMap_div"
-      style="position: absolute; background: #fff; width: 291px; height: 164px; right: 40px; bottom: 0px; padding: 1px; 
-      border: 1px solid #2D74E7; transition: 0.2s;" />
-    </transition>
-  </div>
-</template>
-<script>
-export default {
-  name: 'OverviewMap',
-  props: {
-    mapView: {
-      type: Object,
-      default: () => []
-    }
-  },
-  data() {
-    return {
-      isShow: false,
-    }
-  },
-  mounted() {
-    this.firstOpen = false
-  },
-  methods: {
-    showMap() {
-      this.isShow = !this.isShow
-      if(!this.firstOpen) {
-        this.firstOpen = true
-        this.initMap()
-        return
-      }
-      if(this.isShow) {
-        this.addWatch()
-      } else if(this.isWatch) {
-        this.isWatch.remove()
-        this.isWatch = undefined
-      }
-    },
-    initMap() {
-      var isDown = false
-      var mainView = this.mapView
-      var overView = new mainView.TF_mapView({
-        container: this.$refs.overviewMap_div,
-        map: { basemap: mainView.map.basemap }
-      })
-      window.requestAnimationFrame(_ => {
-        overView.extent = mainView.extent
-        this.addWatch()
-      })
-
-      var extentGeometry = new mainView.TF_graphic({
-        geometry: mainView.extent,
-        symbol: { type: 'simple-fill', color: [45, 116, 231, 0.7], outline: undefined }
-      })
-
-      overView.ui.components = []
-      overView.graphics.add(extentGeometry)
-      this.addWatch = () => {
-        var timeout        
-        this.isWatch = mainView.watch('extent', function(extent) {
-          if (isDown) return
-          if (timeout) clearTimeout(timeout)
-          timeout = setTimeout(setExtent, 200)
-          extentGeometry.geometry = extent
-        })
-      }
-      var setExtent = _ => {
-        if(isDown) return
-        overView.goTo({
-          center: mainView.center,
-          scale: mainView.scale * 2 * Math.max(mainView.width / overView.width, mainView.height / overView.height)
-        })
-      }
-
-      var offerXY = [0, 0]
-      var div = overView.container.style
-      overView.on('pointer-down', function(evt) {
-        var {x, y} = overView.toMap({ x: evt.x, y: evt.y })
-        var {xmin, ymin, xmax, ymax} = extentGeometry.geometry
-        if (x > xmin && y > ymin && x < xmax && y < ymax) {
-          isDown = true
-          offerXY = [x - xmin, y - ymin, xmax - x, ymax - y]
-        }
-      })
-      overView.on('pointer-up', _ => isDown = false)
-      overView.on('pointer-move', function(evt) {
-        var {x, y} = overView.toMap({ x: evt.x, y: evt.y })
-        var {xmin, ymin, xmax, ymax} = extentGeometry.geometry
-        div.cursor = x >= xmin && y >= ymin && x <= xmax && y <= ymax ? 'move' : ''
-      })
-      overView.on('drag', function(evt) {
-        if(isDown) {
-          var {x, y} = overView.toMap({ x: evt.x, y: evt.y })
-          mainView.extent = {
-            xmin: x - offerXY[0], ymin: y - offerXY[1],
-            xmax: x + offerXY[2], ymax: y + offerXY[3],
-            spatialReference: mainView.spatialReference
-          }          
-          extentGeometry.geometry = mainView.extent
-        } 
-        evt.stopPropagation()
-      })
-    }
-  }
-}
-</script>

+ 0 - 379
src/views/zhpt/tongyonggongju/printForTileID/widget.vue

@@ -1,379 +0,0 @@
-<template>
-  <div style="padding: 0 8px;overflow-y:auto;">
-    <div ref="legend" id="Legend" class="Legend">
-      <div class="label" @click="openstate = !openstate"><span style="color:red;">* </span>图幅选择
-        <el-tooltip class="item" effect="dark" content="显示选中图幅。" placement="right">
-          <i class="el-icon-info" ref="info"></i>
-        </el-tooltip><el-checkbox style="margin-left: 4px;" v-model="ractSelect" @change="isDrawRect">框选</el-checkbox>
-      </div>
-      <div v-show="openstate" class="content">
-        <el-table v-loading="loading" ref="multipleTable" :data="mapId" tooltip-effect="dark" style="width: 100%;" max-height="200px" @cell-mouse-enter="hoverIn" @cell-mouse-leave="hoverOut">
-          <el-table-column prop="id" label="图幅号" style="cursor: pointer;" >
-            <template slot-scope="scope">
-              <el-link v-if="scope.row.id" type="primary" @click="rowClick(scope.row)">{{ scope.row.id }}</el-link>
-              <!-- <span v-if="!scope.row.id"><i class="el-icon-loading"></i>查询中</span> -->
-            </template>
-          </el-table-column>        
-          <el-table-column label="操作">
-            <template slot-scope="scope">
-              <el-link v-if="scope.row.id" type="primary" @click="mapIdForDelete(scope.$index, scope.row)">删除</el-link>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <tf-legend class="legend_dept" label="格式" isopen="true" isRequired='true' title="设定打印结果的格式。">
-      <el-select v-model="typeName" placeholder="请选择">
-        <el-option v-for="item in typesAtt" :key="item.value" :label="item.label" :value="item.value"/>
-      </el-select>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="打印模板" isopen="true" isRequired='true' title="设定图纸尺寸。">
-      <el-select v-model="type2Name" placeholder="请选择">
-        <el-option v-for="item in types2Att" :key="item.value" :label="item.label" :value="item.value"/>
-      </el-select>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="高级设置" isopen="true" title="设定打印的详细参数。">
-      <el-input v-model="person" size="small" placeholder="请输入内容" clearable style="margin-bottom: 5px" maxlength="20" show-word-limit>
-        <template slot="prepend">出图人员</template>
-      </el-input>
-      <el-input v-model="source" size="small" placeholder="请输入内容" clearable maxlength="20" show-word-limit>
-        <template slot="prepend">出图单位</template>
-      </el-input>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="打印结果" isopen="true"  title="打印结果显示。">
-      <el-table ref="printTable" :data="printData" tooltip-effect="dark" style="width: 100%" max-height="200px">
-        <el-table-column prop="name" label="打印图纸" width="80px" />
-        <el-table-column prop="type" label="文件模板" width="80px" />
-        <el-table-column prop="size" label="操作" >
-          <template slot-scope="scope">
-            <span v-if="scope.row.state && isNaN(+ scope.row.state)">
-              <el-link type="primary" :href="scope.row.state" target="_blank">预览</el-link>
-              <el-link type="primary" @click="downMap(scope.row)" target="_blank">下载</el-link>
-              <el-link type="primary" @click="deleteThis(scope.row.state)" target="_blank">删除</el-link>
-            </span>
-            <span v-if="!scope.row.state"><i class="el-icon-loading"></i>生成中</span>
-            <span v-if="+ scope.row.state > 0" style="color: #f56c6c;">打印错误:{{ scope.row.state }}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-row>
-        <el-button style="float:right;margin:8px;" ref="delete" size="mini" type="primary" @click="clearAll">清空所有</el-button>
-      </el-row>
-    </tf-legend>    
-    <el-row>
-      <el-button size="mini" type="primary" style="width: 100%" @click="print">输出结果</el-button>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { esriConfig, appconfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import request from '@/utils/request'
-export default {
-  name: 'PrintForMapIds',
-  components: { tfLegend },
-  props: { param: Object },
-  data() {
-    return {
-      loading: false,
-      typeName: '',
-      type2Name: '',
-      openstate: true,
-      ractSelect: false,
-      title: '',
-      person: '',
-      source: '',
-      title1: '',
-      typesAtt: [
-        { value: 'PNG', label: 'PNG' },
-        { value: 'PDF', label: 'PDF' },
-        { value: 'JPG', label: 'JPG' }
-      ],
-      types2Att: [
-        { value: 'DefaultA4L', label: 'A4横向(29.7x21)(cm)' },
-        { value: 'DefaultA4P', label: 'A4纵向(21x29.7)(cm)' },
-        { value: 'DefaultA3L', label: 'A3横向(42x29.7)(cm)' },
-        { value: 'DefaultA3P', label: 'A3纵向(29.7x42)(cm)' },
-        { value: 'DefaultA2L', label: 'A2横向(59.4x42)(cm)' },
-        { value: 'DefaultA2P', label: 'A2纵向(42x59.4)(cm)' }
-      ],
-      printData: [],
-      mapId: []
-    }
-  },
-  computed: { sidePanelOn() { return this.$store.state.map.P_editableTabsValue } },
-  mounted: function() {
-    var mapview = this.mapView = this.$attrs.data.mapView
-    for(let i=0,il=mapview.map.basemap.baseLayers.items,ii=il.length;i<ii;i++) {
-      if(!il[i].url) continue     
-      for(let j=0,jl=il[i].sublayers.items,jj=jl.length;j<jj;j++){
-        if(jl[j].title != '图幅框') continue
-        jl[j].visible = true
-        this.tileIdLayer = jl[j]
-        break
-      }
-      if(this.tileIdLayer) break
-    }
-    if(!this.tileIdLayer) this.$message.error('图幅框图层缺失')
-    this.loadClick()
-    this.rectIdIndex = {}
-    this.rectIds = []
-    this.highLightStyle = { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: "4px" } }
-    this.normalStyle = { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: "2px" } }
-    var Graphic = mapview.TF_graphic
-    this.gra = new Graphic({
-      geometry: { type: 'polygon', rings: [[[0, 0]]], spatialReference: mapview.spatialReference },
-      symbol: { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: '1px' }}
-    })
-    mapview.graphics.add(this.gra)
-    request({ url: '/base/user/getInfo', method: 'get' }).then(res => {
-      if(res.code == 1) {
-        res = res.result
-        this.person = res.realName
-        this.source = res.departmentName
-      }
-    })
-    var index = {}    
-    for(var i=0,il=this.types2Att,ii=il.length;i<ii;i++) {
-      index[il[i].value] = il[i].label
-    }
-    this.type2Index = index
-  },
-  watch: {
-    sidePanelOn(newTab, oldTab) {
-      if(newTab == oldTab) return
-      var isShow
-      if(newTab == 'printForTileID') {
-        this.$nextTick(() => {
-          this.ractSelect = false
-          this.loadClick()
-          this.tileIdLayer.visible = true
-        })
-        isShow = true
-      } 
-      if(oldTab == 'printForTileID') {
-        [this.move, this.click].map((e) => e.remove())
-        this.tileIdLayer.visible = false
-        this.mapView.container.style.cursor = ''
-        isShow = false
-        var draw = this.mapView.TF_draw
-        if (draw.activeAction) draw.reset()
-      }
-      if(isShow != undefined){
-        for(let i=0,il=this.rectIds,ii=il.length;i<ii;i++) {
-          il[i].visible = isShow
-        }
-      }
-    }
-  },
-  methods: {
-    isDrawRect() {
-      if(this.click) {        
-        [this.move, this.click].map((e) => e.remove())
-        this.move = this.click = undefined
-      }
-      var draw = this.mapView.TF_draw
-      if (draw.activeAction) draw.reset()
-      this[this.ractSelect ? 'onDrawRect' : 'loadClick']()
-    },
-    loadClick() {
-      var mapView = this.mapView
-      mapView.container.style.cursor = 'pointer'
-      this.click = mapView.on('click', (evt) => {        
-        var xy = mapView.toMap({ x: evt.x, y: evt.y })
-        this.queryId(xy, mapView)
-      })      
-      this.lastHightId = undefined
-      var graphics = mapView.graphics
-      var divs = this.$refs.multipleTable.$refs.bodyWrapper.children[0].children[1]
-      this.move = mapView.on('pointer-move', (evt) => {
-        mapView.hitTest(evt, graphics).then((re) => {
-          re = re.results
-          if (re.length) {
-            var gra
-            for(var i=0,ii=re.length;i<ii;i++) {
-              if(re[i].graphic.isMapTileId){
-                gra = re[i].graphic
-                break
-              }
-            }
-            if(gra) {
-              if(this.lastHightId) {
-                if(this.lastHightId == gra.id) return
-                this.rectIdIndex[this.lastHightId].symbol = this.normalStyle
-                divs.children[this.rectIds.indexOf(this.rectIds.filter(e=>e.id ==this.lastHightId)[0])].style.background = ''
-              }
-              gra.symbol = this.highLightStyle
-              divs.children[this.rectIds.indexOf(this.rectIds.filter(e=>e.id == gra.id)[0])].style.background = '#ecf2ff'
-              this.lastHightId = gra.id
-            }
-          } else if(this.lastHightId) {
-            this.rectIdIndex[this.lastHightId].symbol = this.normalStyle
-            divs.children[this.rectIds.indexOf(this.rectIds.filter(e=>e.id ==this.lastHightId)[0])].style.background = ''
-            this.lastHightId = undefined
-          }
-        })
-      })
-    },
-    onDrawRect: function() {
-      var view = this.mapView
-      var sp = view.spatialReference
-      this.action = view.TF_drawRect(() => { view.container.style.cursor = 'crosshair' },
-        (evt) => {
-          if (evt.vertices.length < 2) {
-            this.gra.geometry = { type: 'polygon', spatialReference: sp }
-          }
-        }, (evt) => {
-          var v = evt.vertices
-          if (v.length > 1) {
-            this.gra.geometry = { type: 'polygon', rings: [[v[0], [v[1][0], v[0][1]], v[1], [v[0][0], v[1][1]]]], spatialReference: sp }
-          }
-        }, () => {
-          this.queryId(this.gra.geometry, view)
-          this.$nextTick(() => {
-            this.loadClick()
-            this.ractSelect = false
-            this.gra.geometry = { type: 'polygon', rings: [[[0, 0]]], spatialReference: sp }
-          })
-        })
-    },
-    queryId(geometry, mapView) {
-      this.loading = true
-      $.ajax({
-        url: this.tileIdLayer.url + '/query',
-        type: 'POST',
-        data: {
-          geometry: JSON.stringify(geometry.toJSON()),
-          geometryType: geometry.rings ? 'esriGeometryPolygon' : 'esriGeometryPoint',
-          f: 'pjson'
-        },        
-        success: (data) => {
-          this.loading = false
-          data = JSON.parse(data).features
-          if(data.length < 1) return this.$message('无查询结果')
-          for(var i=0,ii=data.length;i<ii;i++) {
-            var dd = data[i]
-            var id = dd.attributes['FRAMENO']
-            if(!this.rectIdIndex.hasOwnProperty(id)) {
-              var rect = new mapView.TF_graphic({
-                id: id,
-                geometry: { type: 'polygon', rings:dd.geometry.rings, spatialReference: mapView.spatialReference },
-                symbol: { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: "2px" } }
-              })
-              this.mapId.push({ id: id })
-              rect.isMapTileId = true
-              this.rectIds.push(this.rectIdIndex[id] = rect)
-              mapView.graphics.add(rect)
-            }
-          }
-          // data = data[0]
-          // var id = data.attributes['FRAMENO']
-          // if(!this.rectIdIndex.hasOwnProperty(id)) {
-          //   var rect = new mapView.TF_graphic({
-          //     geometry: { type: 'polygon', rings:data.geometry.rings, spatialReference: mapView.spatialReference },
-          //     symbol: { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: "2px" } }
-          //   })
-          //   rect.id = row.id = id
-          //   rect.isMapTileId = true
-          //   this.rectIds.push(this.rectIdIndex[id] = rect)
-          //   mapView.graphics.add(rect)
-          // } else list.splice(index, 1)
-        },
-        error: (error) => this.$message.error(error)
-      })
-    },
-    mapIdForDelete(e, r){
-      this.mapId.splice(e, 1)      
-      this.mapView.graphics.remove(this.rectIds.splice(e, 1)[0])
-      delete this.rectIdIndex[r.id]},
-    clearAll() {
-      this.printData = []      
-      this.rectIdIndex = {}
-      this.rectIds = []
-    },
-    hoverIn(row) {
-      if(this.rectIdIndex.hasOwnProperty(this.lastHightId)) {
-        if(this.lastHightId == row.id) return
-        this.rectIdIndex[this.lastHightId].symbol = this.normalStyle
-      }
-      this.lastHightId = row.id
-      this.rectIdIndex[this.lastHightId].symbol = this.highLightStyle
-    },
-    hoverOut() {
-      if(!this.rectIdIndex.hasOwnProperty(this.lastHightId)) return        
-      this.rectIdIndex[this.lastHightId].symbol = this.normalStyle   
-      this.lastHightId = undefined      
-    },
-    rowClick(row) { this.mapView.goTo(this.rectIdIndex[row.id].geometry.extent) },
-    print() {
-      if(!this.typeName) return this.$message.error('请选择打印格式')
-      if(!this.type2Name) return this.$message.error('请选择打印模板')
-      var mapView = this.mapView
-      var person = this.person || this.$store.state.user.name
-      var typeName = this.typeName
-      var type2Name = this.type2Name
-      var source = this.source
-      var fun = this.mapView.TF_printToJson
-      for(let i=0,il=this.rectIds,ii=il.length;i<ii;i++) {
-        let rect = il[i]
-        var str = fun(mapView, rect.geometry.extent, undefined, rect.id, person, source || '拓源')
-        let newPrint = { name: rect.id, poj: '.' + typeName.toLowerCase(), type: this.type2Index[type2Name].substring(0, 4), state: undefined }
-        this.printData.push(newPrint)
-        $.ajax({
-          url: appconfig.gisResource.print.config[0].url,
-          type: 'POST',
-          data:  {
-            Web_Map_as_JSON: JSON.stringify(str),
-            Format: typeName,
-            Layout_Template: type2Name,
-            Georef_info: "False",
-            Template_Folder: appconfig.templateFolder,
-            f: 'pjson'
-          },
-          success: (data) => {
-            data = JSON.parse(data)
-            if(data.error) return newPrint.state = data.error.code
-            newPrint.state = data.results[0].value.url
-          },
-          error: (error) => this.$message.error(error)
-        })
-      }
-    },
-    deleteThis(url) {
-      for(var i=0,il=this.printData,ii=il.length;i<ii;i++) {
-        if(il[i].state == url) {
-          return il.splice(i, 1)
-        }
-      }
-    },
-    downMap(row) {
-      var url = row.state
-      var xhr=new XMLHttpRequest();
-      xhr.open("GET", url, true);
-      xhr.responseType = 'blob';
-      xhr.onload = function(e){
-        if (xhr.status === 200) {
-          var export_blob = new Blob([xhr.response])
-          var a = document.createElement('a')
-          document.body.appendChild(a)
-          a.style.display='none'
-          a.href = window.URL.createObjectURL(export_blob)
-          a.download = row.name + row.poj
-          a.click()
-          document.body.removeChild(a)
-        }
-      }
-      xhr.send()
-    }
-  },
-  destroyed() {
-    [this.move, this.click].map((e) => e.remove())
-    this.tileIdLayer.visible = false
-    this.mapView.container.style.cursor = ''
-    this.mapView.graphics.removeMany(this.rectIds)
-    var draw = this.mapView.TF_draw
-    if (draw.activeAction) draw.reset()
-  }
-}
-</script>

+ 0 - 310
src/views/zhpt/tongyonggongju/printForUserSetting/widget.vue

@@ -1,310 +0,0 @@
-<template>
-  <div style="padding: 0 8px">
-    <tf-legend class="legend_dept" label="标题" isopen="true" isRequired='true' title="设置打印结果中的标题。">
-      <el-input v-model="title" placeholder="请输入标题" clearable maxlength="20" show-word-limit/>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="格式" isopen="true" isRequired='true' title="设定打印结果的格式。">
-      <el-select v-model="typeName" placeholder="请选择">
-        <el-option v-for="item in typesAtt" :key="item.value" :label="item.label" :value="item.value"/>
-      </el-select>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="打印模板" isopen="true" isRequired='true' title="设定图纸尺寸。">
-      <el-select v-model="type2Name" placeholder="请选择">
-        <el-option v-for="item in types2Att" :key="item.value" :label="item.label" :value="item.value"/>
-      </el-select>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="比例尺" isopen="true" isRequired='true' title="设定打印地图比例尺。">
-      <el-row style="margin-bottom: 8px">
-        <el-col :span="16">
-          <el-input v-model="scaleBar" size="mini" placeholder="请输入比例尺" clearable/>
-        </el-col>
-        <el-col :span="6" :offset="2">
-          <el-button size="mini" type="primary" @click="upload" style="width: 100%">更新</el-button>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-button style="width: 100%" size="mini" type="primary" @click="getscale">获取当前比例尺</el-button>
-      </el-row>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="选取范围" isopen="true" title="点击按钮,然后到地图上点击确定打印范围。">
-      <el-row style="margin-bottom: 8px">        
-        <el-col :span="11">
-          <el-button size="mini" style="width: 100%" type="primary" @click="reload">重置</el-button>
-        </el-col>
-        <el-col :span="11" :offset="2">
-          <el-button size="mini" style="width: 100%" type="primary" @click="goto">定位</el-button>
-        </el-col>
-      </el-row>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="高级设置" isopen="true" title="设定打印的详细参数。">
-      <el-input v-model="person" size="small" placeholder="请输入内容" clearable style="margin-bottom: 5px" maxlength="20" show-word-limit>
-        <template slot="prepend">出图人员</template>
-      </el-input>
-      <el-input v-model="source" size="small" placeholder="请输入内容" clearable maxlength="20" show-word-limit>
-        <template slot="prepend">出图单位</template>
-      </el-input>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="打印结果" isopen="true"  title="打印结果显示。">
-      <el-table ref="multipleTable" :data="printData" tooltip-effect="dark" style="width: 100%" max-height="200px">
-        <el-table-column prop="name" label="打印图纸" width="80px" />
-        <el-table-column prop="poj" label="文件类型" width="80px" />
-        <el-table-column prop="size" label="操作" >
-          <template slot-scope="scope">
-            <span v-if="scope.row.state && isNaN(+ scope.row.state)">
-              <el-link type="primary" :href="scope.row.state" target="_blank">预览</el-link>
-              <el-link type="primary" @click="downMap(scope.row)" target="_blank">下载</el-link>
-              <el-link type="primary" @click="deleteThis(scope.row.state)" target="_blank">删除</el-link>
-            </span>
-            <span v-if="!scope.row.state"><i class="el-icon-loading"></i>生成中</span>
-            <span v-if="+ scope.row.state > 0" style="color: #f56c6c;">打印错误:{{ scope.row.state }}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-row>
-        <el-button style="float:right;margin:8px;" ref="delete" size="mini" type="primary" @click="printData = []">清空所有</el-button>
-      </el-row>
-    </tf-legend>
-    <el-row>
-      <el-button size="mini" type="primary" style="width: 100%" @click="print">输出结果</el-button>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { esriConfig, appconfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import request from '@/utils/request'
-export default {
-  name: 'printForUserSetting',
-  components: { tfLegend },
-  props: { param: Object },
-  data() {
-    return {
-      activeName: 'themShow',
-      typeName: '',
-      type2Name: '',
-      show3: false,
-      title: '',
-      radio: 'show',
-      person: '',
-      source: '',
-      scaleBar: '',
-      elements: {},
-      typesAtt: [
-        { value: 'PNG', label: 'PNG' },
-        { value: 'PDF', label: 'PDF' },
-        { value: 'JPG', label: 'JPG' }
-      ],
-      types2Att: [
-        { value: 'DefaultA4L', label: 'A4横向(29.7x21)(cm)' },
-        { value: 'DefaultA4P', label: 'A4纵向(21x29.7)(cm)' },
-        { value: 'DefaultA3L', label: 'A3横向(42x29.7)(cm)' },
-        { value: 'DefaultA3P', label: 'A3纵向(29.7x42)(cm)' },
-        { value: 'DefaultA2L', label: 'A2横向(59.4x42)(cm)' },
-        { value: 'DefaultA2P', label: 'A2纵向(42x59.4)(cm)' },
-      ],
-      printData: []
-    }
-  },
-  computed: { sidePanelOn() { return this.$store.state.map.P_editableTabsValue } },
-  mounted: function() {
-    this.mapView = this.$attrs.data.mapView
-    this.scaleBar = this.mapView.scale
-    var graphic = this.mapView.TF_graphic
-    this.printRect = new graphic({
-      geometry: { type: 'polygon',  spatialReference: this.mapView.spatialReference },
-      symbol: { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "3px" } }
-    })
-    this.rectExtent = this.printRect.geometry.extent
-    this.mapView.graphics.add(this.printRect)
-    this.addRectMove()
-
-    var dir = {}
-    for(let i=0,il=this.types2Att,ii=il.length;i<ii;i++) {
-      var d = il[i]
-      dir[d.value] = d
-    }
-    this.dir = dir
-    request({ url: '/base/user/getInfo', method: 'get' }).then(res => {
-      if(res.code == 1) {
-        res = res.result
-        this.person = res.realName
-        this.source = res.departmentName
-      }
-    })
-  },
-  watch: {
-    sidePanelOn(newTab, oldTab) {
-      if(newTab == oldTab) return
-      if(newTab == 'printForUserSetting') {
-        this.$nextTick(() => {
-          this.printRect.visible = true
-          this.addRectMove()
-        })
-      } 
-      if(oldTab == 'printForUserSetting') {
-        [this.move, this.down, this.up, this.drag].map((e) => e.remove())
-        this.printRect.visible = false
-      }
-    },
-    type2Name(e) {
-      var wh = this.dir[e].label //A0横向(118.88x84.1)(cm)
-      wh = wh.substring(wh.indexOf('(') + 1) //118.88x84.1)(cm)
-      wh = wh.substring(0, wh.indexOf(')')) //118.88x84.1
-      wh = wh.split('x')
-      this.wh = wh
-      this.upload()
-    }
-  },
-  methods: {
-    addRectMove() {     
-      var sp = this.mapView.spatialReference 
-      var [dxdy, wh, moveState, downState] = [[0, 0]]
-      this.move = this.mapView.on('pointer-move', (evt) => {
-        var xy = this.mapView.toMap({ x: evt.x, y: evt.y })
-        if(!moveState && this.inRect(xy)) {
-          this.mapView.container.style.cursor = 'move'
-          moveState = true
-          this.printRect.symbol = { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "5px" } }
-        }
-        if(moveState && !this.inRect(xy)) {
-          this.mapView.container.style.cursor = ''
-          moveState = false
-          this.printRect.symbol = { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "3px" } }
-        }
-      })
-      this.down = this.mapView.on('pointer-down', (evt) => {
-        if(moveState) {
-          var xy = this.mapView.toMap({ x: evt.x, y: evt.y })
-          var extent = this.rectExtent
-          dxdy = [xy.x - (extent.xmin + extent.xmax) / 2, xy.y - (extent.ymin + extent.ymax) / 2]
-          downState = true
-          this.printRect.symbol = { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "5px" } }
-          wh = this.rectExtent
-          wh = [(wh.xmax - wh.xmin) / 2, (wh.ymax - wh.ymin) / 2]
-        }
-      })
-      this.up = this.mapView.on('pointer-up', (evt) => {
-        downState = false
-        this.printRect.symbol = { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "3px" } }
-      })
-      this.drag = this.mapView.on('drag', (evt) => {
-        if(downState) {
-          var xy = this.mapView.toMap({ x: evt.x, y: evt.y })
-          xy.x -= dxdy[0]
-          xy.y -= dxdy[1]
-          var v = [xy.x - wh[0], xy.x + wh[0], xy.y - wh[1], xy.y + wh[1]]
-          this.printRect.geometry = {
-            type: 'polygon',
-            rings: [[[v[0], v[2]], [v[1], v[2]], [v[1], v[3]], [v[0], v[3]]]],
-            spatialReference: sp
-          }
-          this.rectExtent = this.printRect.geometry.extent
-          evt.stopPropagation()
-        }
-      })
-    },
-    inRect({x, y}) {
-      var extent = this.rectExtent
-      return extent ? (x > extent.xmin && x < extent.xmax && y > extent.ymin && y < extent.ymax) : false
-    },
-    getRect(w, h, x, y) {
-      if(!this.scaleBar) this.scaleBar = this.mapView.scale
-      w = w * this.scaleBar / 100
-      h = h * this.scaleBar / 100
-      
-      var widthMap = Math.asin(w / 2 / (6378137)) * 2 / Math.PI * 180 / 2
-      var heightMap = Math.asin(h / 2 / (6378137)) * 2 / Math.PI * 180 / 2
-      var v = [x - widthMap / 2, x + widthMap / 2, y - heightMap / 2, y + heightMap / 2]
-      this.printRect.geometry = { type: 'polygon', rings: [[[v[0], v[2]], [v[1], v[2]], [v[1], v[3]], [v[0], v[3]]]], spatialReference: this.mapView.spatialReference }
-      this.rectExtent = this.printRect.geometry.extent
-    },
-    upload() {
-      var wh = this.wh || [0, 0]
-      var c = this.rectExtent
-      c =  c ? c.center : this.mapView.center
-      this.getRect(wh[0], wh[1], c.x, c.y)
-    },
-    getscale() {
-      this.scaleBar = this.mapView.scale
-      this.upload()   
-    },
-    reload() {
-      this.scaleBar = this.mapView.scale
-      var wh = this.wh || [0, 0]
-      var c = this.mapView.center
-      this.getRect(wh[0], wh[1], c.x, c.y)
-    },
-    goto() {
-      if(this.wh) this.mapView.goTo(this.rectExtent)
-    },
-    print: function() {
-      if(!this.title) {
-        this.$message.error("标题不能为空");
-        return
-      }
-      if(!this.typeName) {
-        this.$message.error("请选择打印格式");
-        return
-      }
-      if(!this.wh) {
-        this.$message.error("请选择打印模板");
-        return
-      }
-      var extent = this.rectExtent
-      var str = this.mapView.TF_printToJson(this.mapView, extent, undefined,
-        this.title, this.person || this.$store.state.user.name, this.source || '拓源')
-      var newPrint = { name: this.title, poj: '.' + this.typeName.toLowerCase(), state: undefined }
-      this.printData.push(newPrint)
-      $.ajax({
-        url: appconfig.gisResource.print.config[0].url,
-        type: 'POST',
-        data:  {
-          Web_Map_as_JSON: JSON.stringify(str),
-          Format: this.typeName,
-          Layout_Template: this.type2Name,
-          Georef_info: "False",
-          Template_Folder: appconfig.templateFolder,
-          f: 'pjson'
-        },
-        success: (data) => {
-          data = JSON.parse(data)
-          if(data.error) return newPrint.state = data.error.code
-          newPrint.state = data.results[0].value.url
-        },
-        error: (error) => this.$message.error(error)
-      })
-    },
-    deleteThis(url) {
-      for(var i=0,il=this.printData,ii=il.length;i<ii;i++) {
-        if(il[i].state == url) {
-          return il.splice(i, 1)
-        }
-      }
-    },
-    downMap(row) {
-      var url = row.state
-      var xhr=new XMLHttpRequest();
-      xhr.open("GET", url, true);
-      xhr.responseType = 'blob';
-      xhr.onload = function(e){
-        if (xhr.status === 200) {
-          var export_blob = new Blob([xhr.response])
-          var a = document.createElement('a')
-          document.body.appendChild(a)
-          a.style.display='none'
-          a.href = window.URL.createObjectURL(export_blob)
-          a.download = row.name + row.poj
-          a.click()
-          document.body.removeChild(a)
-        }
-      }
-      xhr.send()
-    }
-  },
-  destroyed() {
-    [this.move, this.down, this.up, this.drag].map((e) => e.remove())
-    this.mapView.graphics.remove(this.printRect)
-  }
-}
-</script>

+ 0 - 210
src/views/zhpt/tongyonggongju/printOfNormal/widget.vue

@@ -1,210 +0,0 @@
-<template>
-  <div style="padding: 0 8px">
-    <tf-legend class="legend_dept" label="标题" isopen="true" isRequired='true' title="设置打印结果中的标题。">
-      <el-input v-model="title" placeholder="请输入标题" clearable maxlength="20" show-word-limit/>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="格式" isopen="true" isRequired='true' title="设定打印结果的格式。">
-      <el-select v-model="typeName" placeholder="请选择">
-        <el-option v-for="item in typesAtt" :key="item.value" :label="item.label" :value="item.value"/>
-      </el-select>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="高级设置" isopen="true" isRequired='true' title="设定打印的详细参数。单击可打开选项。">      
-      <el-row style="margin-bottom: 8px">
-        <span style="font-size:14px;">出图范围:</span>
-        <el-radio v-model="radio" label="all">当前范围</el-radio>
-        <el-radio v-model="radio" label="draw">绘制范围</el-radio>
-      </el-row>
-      <el-input v-model="person" size="small" placeholder="请输入内容" clearable style="margin-bottom: 5px" maxlength="20" show-word-limit>
-        <template slot="prepend">出图人员</template>
-      </el-input>
-      <el-input v-model="source" size="small" placeholder="请输入内容" clearable maxlength="20" show-word-limit>
-        <template slot="prepend">出图单位</template>
-      </el-input>
-    </tf-legend>
-    <tf-legend class="legend_dept" label="打印结果" :isopen="true" title="打印结果显示。">
-      <el-table ref="multipleTable" :data="printData" tooltip-effect="dark" style="width: 100%" max-height="200px">
-        <el-table-column prop="name" label="打印图纸" width="80px" />
-        <el-table-column prop="poj" label="文件类型" width="80px" />
-        <el-table-column prop="size" label="操作" >
-          <template slot-scope="scope">
-            <span v-if="scope.row.state && isNaN(+ scope.row.state)">
-              <el-link type="primary" :href="scope.row.state" target="_blank">查看</el-link>
-              <el-link type="primary" @click="downMap(scope.row)" target="_blank">下载</el-link>
-              <el-link type="primary" @click="deleteThis(scope.row.state)" target="_blank">删除</el-link>
-            </span>
-            <span v-if="!scope.row.state"><i class="el-icon-loading"></i>生成中</span>
-            <span v-if="+ scope.row.state > 0" style="color: #f56c6c;">打印错误:{{ scope.row.state }}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-row>
-        <el-button style="float:right;margin:8px;" ref="delete" size="mini" type="primary" @click="printData = []">清空所有</el-button>
-      </el-row>
-    </tf-legend>
-    <el-row>
-      <el-button size="mini" type="primary" style="width: 100%" @click="print">打印</el-button>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { esriConfig, appconfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import request from '@/utils/request'
-export default {
-  name: 'printOfNormal',
-  components: { tfLegend },
-  props: { param: Object },
-  data() {
-    return {
-      typeName: '',
-      title: '',
-      radio: 'all',
-      person: '',
-      source: '',
-      typesAtt: [
-        { value: 'PNG', label: 'PNG' },
-        { value: 'PDF', label: 'PDF' },
-        { value: 'JPG', label: 'JPG' }
-      ],
-      printData: []
-    }
-  },
-  computed: { sidePanelOn() { return this.$store.state.map.P_editableTabsValue } },
-  mounted: function() {
-    this.mapView = this.$attrs.data.mapView
-    this.printRect = new this.mapView.TF_graphic({
-      geometry: { type: 'polygon', rings: [[[0,0]]], spatialReference: this.mapView.spatialReference },
-      symbol: { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: "3px" } }
-    })
-    this.printRect.isDraw = false
-    this.mapView.graphics.add(this.printRect)
-    request({ url: '/base/user/getInfo', method: 'get' }).then(res => {
-      if(res.code == 1) {
-        res = res.result
-        this.person = res.realName
-        this.source = res.departmentName
-      }
-    })
-  },
-  watch: {
-    sidePanelOn(newTab, oldTab) {
-      if(newTab == oldTab) return
-      if(newTab == 'printOfNormal') {
-        this.$nextTick(() => {
-          this.printRect.visible = true
-          if(this.isDrawing) this.drawRect()   
-        })     
-      } 
-      if(oldTab == 'printOfNormal') {
-        var view = this.mapView
-        var draw = view.TF_draw
-        if(draw.activeAction) {
-          this.isDrawing = true
-          draw.reset()
-        }
-        view.container.style.cursor = ''
-        this.printRect.visible = false
-      }
-    },
-    radio(value) {   
-      if(value == 'draw') this.drawRect()
-      else {
-        var draw = this.mapView.TF_draw
-        if(draw.activeAction) draw.reset()
-        this.printRect.isDraw = false
-        this.printRect.geometry = { type: 'polygon', rings: [[[0,0]]], spatialReference: this.mapView.spatialReference } 
-      }
-    }
-  },
-  methods: {
-    drawRect() {
-      var view = this.mapView
-      var sp = view.spatialReference
-      var draw = view.TF_draw
-      if(draw.activeAction) draw.reset()
-      view.TF_drawRect(() => {view.container.style.cursor = 'crosshair'}, () => {}, 
-      (evt) => {
-        var v = evt.vertices
-        if (v.length > 1)
-          this.printRect.geometry = {
-            type: 'polygon', rings: [[v[0], [v[1][0], v[0][1]], v[1], [v[0][0], v[1][1]]]], spatialReference: sp
-          } 
-      }, () => {
-        draw.reset()
-        this.printRect.isDraw = true
-        this.isDrawing = false
-        view.container.style.cursor = ''
-      })
-    },
-    print() {
-      if(!this.title) return this.$message.error('打印标题不能为空')
-      if(!this.typeName) return this.$message.error('请选择打印格式')
-      var extent, scale
-      if(this.printRect.isDraw) {
-        var rect = this.printRect.geometry.extent
-        extent = rect
-        scale = undefined
-      } else {
-        extent = this.mapView.extent
-        scale = this.mapView.scale
-      }
-      var str = this.mapView.TF_printToJson(this.mapView, extent, scale,
-        this.title, this.person || this.$store.state.user.name, this.source || '拓源')
-      var newPrint = { name: this.title, poj: '.' + this.typeName.toLowerCase(), state: undefined }
-      this.printData.push(newPrint)
-      $.ajax({
-        url: appconfig.gisResource.print.config[0].url,
-        type: 'POST',
-        data:  {
-          Web_Map_as_JSON: JSON.stringify(str),
-          Format: this.typeName,
-          Layout_Template: "Default",
-          Georef_info: "False",
-          Template_Folder: appconfig.templateFolder,
-          f: 'pjson'
-        },
-        success: function(data) {
-          data = JSON.parse(data)
-          if(data.error) return {}
-          newPrint.state = data.results[0].value.url
-        },
-        error: (error) => this.$message.error(error)
-      })
-    },
-    deleteThis(url) {
-      for(var i=0,il=this.printData,ii=il.length;i<ii;i++) {
-        if(il[i].state == url) {
-          return il.splice(i, 1)
-        }
-      }
-    },
-    downMap(row) {
-      var url = row.state
-      var xhr=new XMLHttpRequest();
-      xhr.open("GET", url, true);
-      xhr.responseType = 'blob';
-      xhr.onload = function(e){
-        if (xhr.status === 200) {
-          var export_blob = new Blob([xhr.response])
-          var a = document.createElement('a')
-          document.body.appendChild(a)
-          a.style.display='none'
-          a.href = window.URL.createObjectURL(export_blob)
-          a.download = row.name + row.poj
-          a.click()
-          document.body.removeChild(a)
-        }
-      }
-      xhr.send()
-    }
-  },
-  destroyed() {
-    var view = this.mapView
-    var draw = view.TF_draw
-    if(draw.activeAction) draw.reset()
-    view.container.style.cursor = ''    
-    this.mapView.graphics.remove(this.printRect)
-  }
-}
-</script>

BIN
src/views/zhpt/tongyonggongju/qAndA/images/A.png


BIN
src/views/zhpt/tongyonggongju/qAndA/images/C.png


BIN
src/views/zhpt/tongyonggongju/qAndA/images/D.png


BIN
src/views/zhpt/tongyonggongju/qAndA/images/L.png


BIN
src/views/zhpt/tongyonggongju/qAndA/images/R.png


BIN
src/views/zhpt/tongyonggongju/qAndA/images/T.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 677
src/views/zhpt/tongyonggongju/qAndA/widget.vue


+ 0 - 50
src/views/zhpt/tongyonggongju/qAndaTextbox/widget.vue

@@ -1,50 +0,0 @@
-<template>
-    <div ref="textBox" style="position:absolute;display:none;">
-      <div style="width:5px;height:5px;border-radio:3px;background:#f00;position:absolute; border-radius: 3px;"></div>
-      <div style="position: relative; top: 10px;">
-        <el-input class="helpInput" style="width: 120px; padding-left: 5px;" clearable size="small" v-model="inputT" placeholder="标识内容" /><!--
-        --><el-button style="display: inline-block;height: 32px; border-radius: 0px 4px 4px 0px;" type="primary" size="small" plain @click="setText">确认</el-button>
-      </div>
-    </div>
-</template>
-
-<script>
-export default {
-  name: 'qAndaTextbox',
-  components: { },
-  props: {
-    param: Object
-  },
-  data() {
-    return {
-      inputT: ""
-    }
-  },
-  mounted: function() {
-    this.that = this.param.that
-    var mapView = this.that.mapView
-    this.point = undefined
-    var textBoxDiv = this.$refs.textBox
-    this.click = mapView.on('click', (evt) => {      
-      this.point = mapView.toMap({ x: evt.x, y: evt.y })
-      textBoxDiv.style.display = ''
-      textBoxDiv.style.left = evt.x + 'px';
-      textBoxDiv.style.top = evt.y + 'px';
-    })
-    this.extentMove = mapView.watch('extent', () => {      
-      if(!this.point) return
-      var ne = mapView.toScreen(this.point)
-      textBoxDiv.style.left = ne.x + 'px';
-      textBoxDiv.style.top = ne.y + 'px';
-    })
-  },
-  methods: {
-    setText() {
-      this.that.setText(this.inputT, this.point)
-    }
-  },
-  destroyed: function() {
-    [this.click, this.extentMove].map((e) => e.remove())
-  }
-}
-</script>

+ 0 - 410
src/views/zhpt/tongyonggongju/queryResult/widget.vue

@@ -1,410 +0,0 @@
-<template>
-  <div style="padding: 0 8px; height:100%; overflow: auto">
-    <el-tabs v-model="activeName" v-way="wayFun('tabs')" style="height:100%">
-      <el-tab-pane label="属性标注" name="attQuerry" style="height:100%">        
-        <div ref="legend" id="Legend" class="Legend">
-          <div class="label" @click="openstate = !openstate">要素选择
-            <el-tooltip class="item" effect="dark" content="在地图上点击选取要素。下方将会列出所选要素的相关信息。" placement="right">
-              <i class="el-icon-info" ref="info"></i>
-            </el-tooltip><el-checkbox style="margin-left: 4px;" v-model="ractSelect" @change="isDrawRect">框选</el-checkbox>
-            <div ref="isQuery" style="display: none;"><i class="el-icon-loading" />查询中</div>
-          </div>
-          <div v-show="openstate" class="content">
-            <el-table highlight-current-row :data="featureData" stripe height="200px" style="width: 100%;margin-bottom: 8px" row-class-name="selectRowC" @row-click="showFea">
-              <el-table-column prop="layer" label="图层" />
-              <el-table-column prop="name" label="编码" />
-            </el-table>
-          </div>
-        </div>
-        <tf-legend class="legend_dept" label="要素详细" isopen="true" title="显示标注要素字段及属性。" style="height:calc(100% - 243px)">
-          <el-table :data="attData" stripe height="calc(100% - 8px)" style="width: 100%;margin-bottom: 8px">
-            <el-table-column prop="fix" label="字段" />
-            <el-table-column prop="att" label="属性" />
-          </el-table>
-        </tf-legend>
-      </el-tab-pane>
-      <el-tab-pane label="设置" name="setting" style="height:100%">
-        <tf-legend class="legend_dept" label="图层名称" isopen="true" title="指定查询的图层。">
-          <el-select v-model="layerName" size="small" placeholder="请选择">
-            <el-option v-for="(item, index) in layersAtt" :key="index" :value="item.label"/>
-          </el-select>
-        </tf-legend>
-        <tf-legend class="legend_dept" label="可见属性" isopen="true" title="指定所要查询的属性字段。">
-          <el-table ref="attTable" :data="attDatas" stripe height="400px" style="width: 100%" @select="selectChange" @select-all="selectChange">
-            <el-table-column type="selection" width="55" />
-            <el-table-column prop="name" label="属性" /></el-table>
-        </tf-legend>
-        <el-button size="mini" type="primary" style="width:100%" @click="saveLayer">保存</el-button>
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-import { esriConfig, appconfig } from 'staticPub/config'
-import tfLegend from '@/views/zhpt/common/Legend'
-import request from '@/utils/request'
-export default {
-  name: 'QueryResult',
-  components: { tfLegend },
-  directives: {
-    way(el, bind) {
-      if (typeof bind.value === 'function') bind.value(el)
-    }
-  },
-  props: { param: Object },
-  data() {
-    return {
-      ami: 8,
-      inr: {},
-      attData: [],
-      attDatas: [],
-      elements: {},
-      openstate: true,
-      layerName: '',
-      layersAtt: [],
-      activeName: 'attQuerry',
-      ractSelect: false,
-      featureData: []
-    }
-  },
-  computed: { sidePanelOn() { return this.$store.state.map.P_editableTabsValue } },
-  mounted: function() {
-    var legendDiv = this.$refs.legend
-    legendDiv.parentElement.parentElement.style.height = 'calc(100% - 55px)'
-    this.businessMap = appconfig.gisResource.business_map.config[0].url
-    this.featureData = []
-    var mapView = this.mapView = this.$attrs.data.mapView
-    var Graphic = mapView.TF_graphic
-    this.gra = new Graphic({
-      geometry: { type: 'polygon', rings: [[[0, 0]]], spatialReference: mapView.spatialReference },
-      symbol: { type: 'simple-fill', color: [0, 0, 0, 0.1], outline: { color: [45, 116, 231, 1], width: '2px' }}
-    })
-    this.showGeo = new Graphic({
-      geometry: { type: 'point', x: 0, y: 0, spatialReference: mapView.spatialReference },
-      symbol: { type: 'simple-marker', color: [255, 255, 255], size: 8, outline: { color: [51, 133, 255], width: 2 }}
-    })
-    mapView.graphics.addMany([this.gra, this.showGeo])
-    this.rectIdIndex = {}
-    this.rectIds = []
-    this.onClick()
-
-    // 获取图层名
-    var idsdata = []
-    for (let i=0,il=mapView.map.basemap.baseLayers.items,ii=il.length,sublayerids = [];i<ii; i++) {
-      if(il[i].url && il[i].url == this.businessMap) {
-        for(let j=0,jl=il[i].allSublayers.items,jj=jl.length;j<jj;j++){
-          var layer = jl[j]
-          if(!layer.sublayers && layer.title != '图幅框') sublayerids.push(layer.id)
-        }
-        idsdata = sublayerids.sort((a, b) => a - b)
-        break 
-      }
-    }
-    if (idsdata.length == 0) return this.$message.error('图层无数据!')      
-    var url = appconfig.gisResource.layer_name.config[0].url
-    $.ajax({
-      url: url,
-      type: "POST",
-      data: {
-        usertoken: appconfig.usertoken,
-        layerids: JSON.stringify(idsdata),
-        f: "pjson"
-      },
-      dataType: "json",
-      success: (data) => {
-        if (data.code == 10000) {
-          var layersIndex = {}
-          for (let i=0,il=data.result.rows,ii=il.length;i<ii; i++) {
-            var layer = il[i]
-            layersIndex[layer.layerid] = { name: layer.layername, value: layer.layerdbname }
-          }
-          this.layernameIndex = layersIndex
-        }
-      }
-    })
-    $.ajax({
-      url: this.businessMap + "/?f=pjson",
-      type: 'GET',
-      success: (data) => {
-        data = JSON.parse(data).layers
-        if(!data) return this.$message.error('图层字段获取失败')
-        var tId = [] 
-        var tIdIndex = {}
-        for(let i=0,ii=data.length;i<ii;i++){
-          var layer = data[i]
-          if([0, 16, 17].indexOf(layer.id) < 0){
-            tId.push({ id: layer.id, label: layer.name })
-            tIdIndex[layer.name] = layer.id
-          }
-        }
-        this.layersAtt = tId
-        this.layersAttIndex = tIdIndex
-      },
-      error: (error) => this.$message.error(error)
-    })
-    this.listRefersh()
-  },
-  watch:{
-    layerName() {
-      var id = this.layersAttIndex[this.layerName]
-      if(!id) return
-      this.attDatas = []
-      $.ajax({
-        url: this.businessMap + "/" + id + "/?f=pjson",
-        type: 'GET',
-        success: (data) => {
-          data = JSON.parse(data).fields
-          if(!data) return this.$message.error('图层信息获取失败')
-          var fields = []
-          var tableDiv = this.$refs.attTable
-          var Nfields = this.NField[this.layernameIndex[id].value]
-          if(!Nfields) Nfields = []
-          var selectIs = []
-          for(let i=0,ii=data.length;i<ii;i++){
-            var layer = data[i]
-            var select = true
-            if(Nfields.indexOf(layer.alias) > -1) {
-              select = false
-            } else {
-              selectIs.push(i)
-            }
-            fields.push({ name: layer.alias, att: layer.name, select: select})      
-          }   
-          this.attDatas = fields
-          this.$nextTick(() => {
-            selectIs.map((i) => tableDiv.toggleRowSelection(fields[i]))
-          })          
-        },
-        error: (error) => this.$message.error(error)
-      })
-    },
-    sidePanelOn(newTab, oldTab) {
-      if(newTab == oldTab) return
-      if(newTab == 'queryResult') {
-        this.$nextTick(() => {
-          if(this.ractSelect) this.isDrawRect()
-          else this.onClick()
-          this.gra.visible = true
-          this.showGeo.visible = true
-        })  
-      } 
-      if(oldTab == 'queryResult') {
-        var mapView = this.mapView
-        var draw = mapView.TF_draw
-        if (draw.activeAction) draw.reset()
-        if (this.click) {
-          this.click.remove()
-          this.click = undefined
-        }
-        this.gra.visible = false
-        this.showGeo.visible = false
-      }
-    }
-  },
-  methods: {
-    wayFun: function(flag) {
-      return (el) => {
-        this.elements[flag] = el
-      }
-    },
-    isDrawRect: function() {
-      if (this.click) {
-        this.click.remove()
-        this.click = undefined
-      }
-      var draw = this.mapView.TF_draw
-      if (draw.activeAction) draw.reset()
-      this[this.ractSelect ? 'onDrawRect' : 'onClick']()
-    },
-    onClick: function() {
-      var mapview = this.mapView
-      mapview.container.style.cursor = 'pointer'
-      if (this.click) {
-        this.click.remove()
-        this.click = undefined
-      }
-      this.click = mapview.on('click', (evt) => {
-        var xy = mapview.toMap({ x: evt.x, y: evt.y })
-        var [x, y] = [xy.x, xy.y]
-        var r = mapview.resolution * 7; var da = Math.PI / 20
-        var ret = []
-        var PI2 = Math.PI * 2; var sin = Math.sin; var cos = Math.cos
-        for (let i = 0; i < PI2; i += da) {
-          ret.push([x + r * cos(i), y + r * sin(i)])
-        }
-        this.gra.geometry = { type: 'polygon', rings: [ret], spatialReference: mapview.spatialReference }
-        this.$refs.isQuery.style.display = 'inline-block'
-        this.query()
-      })
-    },
-    onDrawRect: function() {
-      var view = this.mapView
-      var sp = view.spatialReference
-      this.action = view.TF_drawRect(() => { view.container.style.cursor = 'crosshair' },
-        (evt) => {
-          if (evt.vertices.length < 2) {
-            this.gra.geometry = { type: 'polygon', spatialReference: sp }
-          }
-        }, (evt) => {
-          var v = evt.vertices
-          if (v.length > 1) {
-            this.gra.geometry = { type: 'polygon', rings: [[v[0], [v[1][0], v[0][1]], v[1], [v[0][0], v[1][1]]]], spatialReference: sp }
-          }
-        }, () => {
-          this.query()
-          this.$nextTick(this.onDrawRect())
-        })
-    },
-    query() {
-      var geometry = this.gra.geometry
-      if(!geometry) return
-      var view = this.mapView
-      var mapExtent = view.extent.toJSON()
-      $.ajax({
-        url: this.businessMap + '/identify',
-        type: 'POST',
-        data: {
-          geometry: JSON.stringify(geometry.toJSON()),
-          geometryType: 'esriGeometryPolygon',
-          layers: 'all:' + this.getLayers().join(','),
-          tolerance: '6',
-          mapExtent: mapExtent.xmin + ',' + mapExtent.ymin + ',' + mapExtent.xmax + ',' + mapExtent.ymax,
-          imageDisplay: (view.width / 96).toFixed(2) + ',' + (view.height / 96).toFixed(2) + ',' + '96',
-          f: 'pjson'
-        },  
-        success: (data) => {
-          data = JSON.parse(data).results
-          this.$refs.isQuery.style.display = 'none'
-          if(data.length < 1) {
-            this.$message('无查询结果')
-            return
-          }
-          this.$message('查询结果:' + data.length + ' 项')
-          var featureData = []
-          for(let i=0,ii=data.length;i<ii;i++) {
-            var di = data[i]
-            var inFea = { layer: di.layerName, name: di.value, att: di.attributes }
-            featureData.push(inFea)
-            switch(di.geometryType) {
-              case 'esriGeometryPoint':
-                inFea.geo =  { type: 'point', x: di.geometry.x, y: di.geometry.y} 
-                break
-              case 'esriGeometryPolyline':
-                inFea.geo =  { type: 'polyline', paths: di.geometry.paths} 
-                break
-              case 'esriGeometryPolygon':
-                inFea.geo =  { type: 'polygon', rings: di.geometry.rings} 
-                break
-            }
-          }
-          this.featureData = featureData
-        },
-        error: (error) => this.$message.error(error)
-      })
-    },
-    getLayers() {
-      var business = this.businessMap
-      for (let i=0,il=this.mapView.map.basemap.baseLayers.items,ii=il.length,sublayerids = [];i<ii; i++) {
-        if(il[i].url && il[i].url == business) {
-          for(let j=0,jl=il[i].allSublayers.items,jj=jl.length;j<jj;j++){
-            var layer = jl[j]
-            if(!layer.sublayers && layer.title != '图幅框') sublayerids.push(layer.id)
-          }
-          return sublayerids.sort((a, b) => a - b)
-        }
-      }
-    },
-    showFea(row) {
-      var view = this.mapView
-      this.gra.geometry = { type: 'polygon', rings: [[[0,0]]], spatialReference: view.spatialReference }
-      var geometry = JSON.parse(JSON.stringify(row.geo))
-      geometry.spatialReference = view.spatialReference
-      this.showGeo.geometry = geometry
-      switch(row.geo.type) {
-        case 'point':
-          view.center = {x: geometry.x, y: geometry.y, spatialReference: view.spatialReference}  
-          view.zoom = 6
-          this.showGeo.symbol = { type: 'simple-marker', color: [255, 255, 255], size: 8, outline: { color: [51, 133, 255], width: 2 }}
-          break
-        case 'polyline':
-        case 'polygon':
-          view.goTo(this.showGeo.geometry.extent)
-          this.showGeo.symbol = { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [45, 116, 231, 1], width: '3px' }}
-          break
-      }
-      var atts = row.att
-      var datatable = []
-      var dontSeeField = this.NField[this.layernameIndex[this.layersAttIndex[row.layer]].value]
-      if(dontSeeField) {
-        for(var field in atts) {          
-          if(dontSeeField.indexOf(field) < 0) {
-            var att = atts[field]
-            if(att == 'Null') att = ''
-            datatable.push({ fix: field, att: att || '' })
-          }
-        }
-      } else {
-        for(var field in atts) {
-          var att = atts[field]
-          if(att == 'Null') att = ''
-          datatable.push({ fix: field, att: att || '' })
-        }
-      }
-      this.attData = datatable      
-    },
-    listRefersh() {
-      request({
-        url: 'gis/customDisplay/viewDynamicLog', method: 'GET'
-      }).then(res => {
-        if(res.code == 1) {
-          var ids = {}
-          res = res.result.records
-          for(let i=0,il=res,ii=il.length;i<ii;i++) {
-            ids[il[i].layerEn] = il[i].nonFields.split(',')
-          }
-          this.NField = ids
-        }
-      })
-    },
-    saveLayer() {
-      var ln = this.layerName
-      var layerName = this.layernameIndex[this.layersAttIndex[ln]].value
-      var dontSeeField = []
-      for(let i=0,il=this.attDatas,ii=il.length;i<ii;i++) {
-        if(!il[i].select) dontSeeField.push(il[i].name)
-      }
-      request({
-        url: 'gis/customDisplay/insertDynamicLogo', method: 'post',
-        data: {
-          layerEn: layerName,
-          nonFields: dontSeeField.join(','),
-        }
-      }).then(res => {
-        if(res.code == 1) {          
-          this.$message.success('保存:' + ln + ' 显示字段成功')
-          this.listRefersh()
-        }
-      })
-    },
-    selectChange(select, row) {
-      if(row) {
-        row.select = !row.select
-      } else {
-        select = select.length != 0
-        for(let j=0,jl=this.attDatas,jj=jl.length;j<jj;j++) {
-          jl[j].select = select
-        }
-      }
-    }
-  },
-  destroyed: function() {
-    var mapView = this.mapView
-    mapView.graphics.removeMany([this.gra, this.showGeo])
-    mapView.container.style.cursor = ''
-    var draw = mapView.TF_draw
-    if (draw.activeAction) draw.reset()
-    if (this.click) this.click.remove()
-  }
-}
-</script>

+ 0 - 183
src/views/zhpt/tongyonggongju/queryResult/widget1.vue

@@ -1,183 +0,0 @@
-<template>
-  <div class="result-table">
-    <!-- 数据表格 -->
-    <div class="table-box">
-      <el-table :data="tableData" stripe :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}"
-                style="width: 100%" height="100%" @row-click="rowClick">
-        <el-table-column v-for="(item,index) in fieldKeys" :key="index" :prop="item.pipelineKey" :label="item.pipelineVal" align="center"
-                         show-overflow-tooltip>
-        </el-table-column>
-      </el-table>
-    </div>
-    <!-- 表格分页 -->
-    <div class="table-pagination">
-      <el-pagination :current-page="pagination.current" :page-sizes="[20, 50, 100, 200]" :page-size="pagination.size"
-                     layout="total, sizes, prev, pager, next" :total="pagination.total" @size-change="sizeChange"
-                     @current-change="currentChange">
-      </el-pagination>
-    </div>
-
-  </div>
-</template>
-
-<script>
-import 'ol/ol.css';
-import { fromLonLat } from 'ol/proj';
-import { Vector as VectorSource } from 'ol/source';
-import { Vector as VectorLayer } from 'ol/layer';
-import * as olExtent from 'ol/extent';
-import { GeoJSON, WFS } from 'ol/format';
-import Feature from 'ol/Feature';
-import { Point, LineString, Polygon } from 'ol/geom';
-import { Style, Circle, Icon, Fill, RegularShape, Stroke, Text } from 'ol/style';
-import { getCenter } from 'ol/extent';
-export default {
-  props: ['data'],
-  data() {
-    return {
-      allFeatures: [], // 所有数据
-      tableData: [],
-      fieldKeys: [],
-      vecLayer: null,// 查询显示图层 
-      pageNum: 0,//总页数
-      totalPageData: [],
-      pagination: {
-        current: 1,
-        total: 0,
-        size: 20
-      }
-    }
-  },
-  watch: {
-    '$store.state.map.halfPanels': function () {
-      this.loadData()
-    }
-  },
-  mounted() {
-    this.loadData()
-  },
-  destroyed() {
-    this.data.that.map.removeLayer(this.vecLayer)
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      for (let index in this.$store.state.map.halfPanels) {
-        let item = this.$store.state.map.halfPanels[index]
-        // if (item.com === 'queryResult') {
-        //   // console.log('站点:', item)
-        //   this.fieldKeys = item.param.fieldKeys
-        //   let features = item.param.features
-        //   this.allFeatures = features.map(item => {
-        //     item.properties['geometry'] = item.geometry
-        //     return item.properties
-        //   })
-        //   this.pagination = { current: 1, size: 20, total: this.allFeatures.length }
-        //   // 表格加载
-        //   this.calcPageData()
-        //   break
-        // }
-        if (item.com === this.$store.state.map.halfP_editableTabsValue) {
-          // console.log('站点:', item)
-          this.fieldKeys = item.param.fieldKeys
-          let features = item.param.features
-          this.allFeatures = features.map(item => {
-            item.properties['geometry'] = item.geometry
-            return item.properties
-          })
-          this.pagination = { current: 1, size: 20, total: this.allFeatures.length }
-          // 表格加载
-          this.calcPageData()
-          break
-        }
-      }
-    },
-    /**
-     * 行点击事件
-     */
-    rowClick(row) {
-      let popupPosition = [] // 弹窗位置
-      let geometry = new GeoJSON().readGeometry(row.geometry)
-      // 弹窗的信息
-      let infoObject = {
-        properties: row,
-        dataType: { label: '' },
-        geometry: row.geometry
-      }
-
-      let feature = new Feature({ geometry: geometry })
-      if (geometry.getType() == 'LineString')
-        popupPosition = getCenter(geometry.getExtent())
-      else
-        popupPosition = geometry.getCoordinates()
-      infoObject.dataType.label = row.TYPENAME
-      // 弹窗显示
-      this.data.that.popupWindowShow(popupPosition, infoObject)
-      setTimeout(() => {
-        this.data.that.map.getView().fit(feature.getGeometry().getExtent(), { duration: 600 })
-      }, 200);
-    },
-    /**
-     * 计算页数
-     */
-    calcPageData() {
-      // 计算页数(根据后台数据的条数和每页显示数量算出一共几页,得0时设为1)
-      if (this.allFeatures.length >= 1) {
-        this.pageNum = Math.ceil(this.allFeatures.length / this.pagination.size) || 1;
-        console.log('总页数:', this.pageNum);
-      }
-      // 数据分组
-      for (let i = 0; i < this.pageNum; i++) {
-        // 每一页都是一个数组 形如 [['第一页的数据'],['第二页的数据'],['第三页数据']]
-        // 根据每页显示数量 将后台的数据分割到 每一页,假设pageSize为5, 则第一页是1-5条,即slice(0,5),第二页是6-10条,即slice(5,10)...
-        this.totalPageData[i] = this.allFeatures.slice(this.pagination.size * i, this.pagination.size * (i + 1));
-      }
-      // 获取到数据后显示第一页内容,数组下标是从0开始的,这里一定要减去1,不然会丢失一组数据
-      this.tableData = this.totalPageData[this.pagination.current - 1];
-      console.log(this.tableData);
-    },
-    /**
-     * 改变当前页
-     */
-    currentChange(current) {
-      this.pagination.current = current;
-      // 这里仍然不要忘记减去1
-      this.tableData = this.totalPageData[current - 1];
-    },
-    /**
-     * 改变每页数量
-     */
-    sizeChange(size) {
-      this.pagination.size = size;
-      // 重新计算页数并分组
-      this.calcPageData()
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.result-table {
-  width: 100%;
-  height: 100%;
-  position: relative;
-  .table-box {
-    width: 100%;
-    position: absolute;
-    top: 0;
-    bottom: 42px;
-    >>> .el-table td,
-    >>> .el-table th {
-      padding: 6px 0 !important;
-    }
-  }
-  .table-pagination {
-    height: 32px;
-    width: 100%;
-    position: absolute;
-    bottom: 5px;
-  }
-}
-</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 161
src/views/zhpt/tongyonggongju/queryResult2/widget.vue


+ 0 - 36
src/views/zhpt/tongyonggongju/queryResult3/attributeConfig.ts

@@ -1,36 +0,0 @@
-var formatDate = (key, att) => {
-    if(!att || att == ' ') return '-'
-    var date = new Date(att)
-    var year = date.getFullYear().toString()
-    var month = (date.getMonth() + 1).toString()
-    if(parseInt(month) < 10) month = '0' + month
-    var day = date.getDate().toString()
-    if(parseInt(day) < 10) day = '0' + day
-    var hour = date.getHours().toString()
-    if(parseInt(hour) < 10) hour = '0' + hour
-    var mins = date.getMinutes().toString()
-    if(parseInt(mins) < 10) mins = '0' + mins
-    var sen = date.getSeconds().toString()
-    if(parseInt(sen) < 10) sen = '0' + sen
-    
-    return [year, month, day].join('-') + ' ' + [hour, mins, sen].join(':')
-}
-
-var formatFloat = (key, att) => {
-    return att.toFixed(2)
-}
-
-export var attConfig = {
-    hide: ['OBJECTID', 'SHAPE', 'GLOBALID', 'GROUNDZ', 'SHAPE.LEN', 'SHAPE.AREA', 'ENABLED', 'OWNERUNIT'],
-    change: {
-        'SURVEYDATE': formatDate,
-        'CREATEDDATE': formatDate,
-        'STARTDEPTH': formatFloat,
-        'STARTZ': formatFloat,
-        'ENDDEPTH': formatFloat,
-        'ENDZ': formatFloat,
-        'PIPELENGTH': formatFloat,
-        'DEPTH': formatFloat,
-        'TOPZ': formatFloat,
-    }
-}

+ 0 - 274
src/views/zhpt/tongyonggongju/queryResult3/widget.vue

@@ -1,274 +0,0 @@
-<template>
-  <div ref="mainDiv" style="width: 100%; height: 100%;" v-loading="loading">
-    <div style="height:calc(100% - 45px)">
-      <el-table
-        id="features"
-        class="mapTable"
-        style="width:100%;"
-        :height="height"
-        tooltip-effect="dark"
-        stripe
-        :data="featureData"
-        ref="table"
-        row-class-name="selectRowC"
-        @row-click="getGeo"
-      >
-        <el-table-column
-          v-for="item of column"
-          width="120"
-          show-overflow-tooltip
-          :key="item.value"
-          :prop="item.value"
-          :label="item.name"
-        >
-        </el-table-column>
-      </el-table>
-    </div>
-    <div style="width:100%;margin-top:8px;">
-      <div style="float:left;width:80%">
-        <el-pagination
-          ref="pagination"
-          small
-          background
-          layout="total, sizes, prev, pager, next"
-          :page-sizes="[5, 10, 50, 100]"
-          :total="total"
-          @current-change="loadData"
-          @size-change="loadData"
-        />
-      </div>
-      <div style="float:right;">
-        <export-btn table-id="features"></export-btn>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { attConfig } from './attributeConfig'
-import { esriConfig, appconfig } from 'staticPub/config'
-import TableItem from '@/components/Table/index.vue'
-import ExportBtn from '@/views/zhpt/components/ExportBtn.vue'
-export default {
-  name: 'queryResult3',
-  components: { TableItem, ExportBtn },
-  props: { param: Object },
-  data() {
-    return {
-      featureData: [],
-      column: [],
-      total: 0,
-      loading: true,
-      height: '100%',
-      queryLayer: null
-    }
-  },
-  mounted() {
-    var mapView = (this.mapView = this.$attrs.data.mapView)
-    var mainDiv = this.$refs.mainDiv.parentElement
-    mainDiv.style.height = '100%'
-    mainDiv.parentElement.style.height = 'calc(100% - 56px)'
-    mainDiv.parentElement.parentElement.style.height = '100%'
-    this.oids = this.param.oids
-    this.layer = this.param.layer
-    var sp = mapView.spatialReference
-    this.queryFeature = new mapView.TF_graphic({ geometry: { type: 'point', x: 0, y: 0, spatialReference: sp } })
-    mapView.graphics.add(this.queryFeature)
-    this.total = this.oids.length
-    this.loadColumn().then(this.loadData)
-
-    var showId = this.param.showId
-    mapView.TF_resultFeatures = {
-      load: (oids, layerId, templeteId) => {
-        this.loading = true
-        showId = templeteId
-        this.$nextTick(() => {
-          this.oids = oids
-          this.total = oids.length
-          this.layer = layerId
-          this.loadColumn().then(this.loadData)
-        })
-      },
-      destroy: (templeteId) => {
-        if (showId != templeteId) return
-        delete mapView.TF_resultFeatures
-        for (var i = 0, il = this.$store.state.map.halfPanels, ii = il.length; i < ii; i++) {
-          if (il[i].com == 'queryResult3') return il.splice(i, 1)
-        }
-      }
-    }
-  },
-  methods: {
-    loadColumn() {
-      return new Promise((res) => {
-        var layer = this.layer
-        var dontSeeAtt = attConfig.hide
-        $.ajax({
-          url: appconfig.gisResource.business_map.config[0].url + '/' + layer + '?f=pjson',
-          type: 'GET',
-          async: false,
-          success: (data) => {
-            data = JSON.parse(data)
-            var cons = []
-            for (var i = 0, il = data.fields, ii = il.length; i < ii; i++) {
-              var di = il[i]
-              var key = di.name
-              if (dontSeeAtt.indexOf(key) > -1) continue
-              cons.push({ value: key, name: di.alias })
-            }
-            this.column = cons
-            this.type = data.geometryType.substring(12).toLowerCase()
-            res()
-          },
-          error: (error) => {
-            console.log(error)
-          }
-        })
-      })
-    },
-    loadData() {
-      this.loading = true
-      var pages = this.$refs.pagination
-      var oids = this.oids
-      var layer = this.layer
-      var size = pages.internalPageSize
-      var current = pages.internalCurrentPage
-      var first = (current - 1) * size
-      oids = oids.slice(first, first + size)
-      var config = attConfig
-      var dontSeeAtt = config.hide
-      var changeAttFun = config.change
-      $.ajax({
-        url: appconfig.gisResource.business_map.config[0].url + '/' + layer + '/query',
-        type: 'POST',
-        data: {
-          objectIds: oids.join(','),
-          outFields: '*',
-          f: 'pjson'
-        },
-        success: (data) => {
-          data = JSON.parse(data)
-          var feaD = []
-          for (var i = 0, il = data.features, ii = il.length; i < ii; i++) {
-            var di = il[i]
-            var geo = di.geometry
-            var att = di.attributes
-            for (var j = 0, jl = Object.keys(att), jj = jl.length; j < jj; j++) {
-              var key = jl[j]
-              if (dontSeeAtt.indexOf(key) > -1) {
-                delete att[key]
-                continue
-              }
-              if (changeAttFun.hasOwnProperty(key)) {
-                att[key] = changeAttFun[key](key, att[key])
-              } else if (att[key] === null) att[key] = '-'
-            }
-            att._Geometry = geo
-            feaD.push(att)
-          }
-          this.showAllHighlight(data)
-          this.featureData = feaD
-          data = undefined
-          this.height = '100px'
-          this.$nextTick(() => {
-            this.height = '100%'
-            this.loading = false
-          })
-        },
-        error: (error) => {
-          console.log(error)
-        }
-      })
-    },
-
-    /**
-     * 点击高亮显示
-     */
-    getGeo(row) {
-      var view = this.$attrs.data.mapView
-      var geometry = row._Geometry
-      geometry.type = this.type
-      geometry.spatialReference = view.spatialReference
-      var gra = this.queryFeature
-      gra.geometry = geometry
-      gra.symbol =
-        geometry.type == 'point'
-          ? { type: 'simple-marker', color: [200, 200, 200], size: 12, outline: { color: [0, 255, 255], width: 2 } }
-          : { type: 'simple-fill', color: [0, 0, 0, 0.3], outline: { color: [0, 255, 255, 1], width: '7px' } }
-      var extent = gra.geometry.extent
-      if (extent) view.goTo(extent)
-      else view.center = { x: gra.geometry.x, y: gra.geometry.y, spatialReference: view.spatialReference }
-    },
-    /**
-     * 查询到的所有图形高亮显示
-     */
-    showAllHighlight(data) {
-      let mapView = this.$attrs.data.mapView
-      let sp = mapView.spatialReference
-      this.queryLayer = new mapView.TF_graphicsLayer()
-      mapView.map.add(this.queryLayer)
-      if (data && data.hasOwnProperty('features')) {
-        let pipes = []
-        let geometryType = data.geometryType //esriGeometryPoint、esriGeometryLine、esriGeometryPolygon
-        let features = []
-        data.features.forEach((feature) => {
-          //默认为点
-          let graphic = new mapView.TF_graphic({
-            geometry: { type: 'point', x: feature.geometry.x, y: feature.geometry.y, spatialReference: sp },
-            symbol: {
-              type: 'simple-marker',
-              color: [0, 255, 255],
-              size: 12,
-              outline: { color: [0, 255, 255], width: 0 }
-            }
-          })
-          //如果为面
-          if (geometryType == 'esriGeometryPolygon') {
-            graphic = new mapView.TF_graphic({
-              geometry: { type: 'polyline', paths: feature.geometry.rings, spatialReference: sp },
-              symbol: {
-                type: 'simple-fill',
-                color: [0, 0, 0, 0.3],
-                outline: { color: [45, 116, 231, 1], width: '4px' }
-              }
-            })
-          }
-          //如果为线
-          if (geometryType == 'esriGeometryPolyline') {
-            graphic = new mapView.TF_graphic({
-              geometry: { type: 'polyline', paths: feature.geometry.paths, spatialReference: sp },
-              symbol: {
-                type: 'simple-fill',
-                color: [5, 116, 231, 1],
-                outline: { color: [45, 116, 231, 1], width: '4px' }
-              }
-            })
-          }
-          features.push(graphic)
-        })
-        this.queryLayer.addMany(features)
-      }
-    }
-  },
-
-  /**
-   * 销毁事件
-   */
-  destroyed() {
-    var view = this.mapView
-    //清除查询生成图形
-    view.map.remove(this.queryLayer)
-    view.graphics.remove(this.queryFeature)
-    delete view.TF_resultFeatures
-  }
-}
-</script>
-<style scoped>
-.el-table >>> .el-table__header-wrapper table th {
-  height: 30px;
-  text-align: center;
-}
-.el-table.mapTable >>> .el-table__body-wrapper table td {
-  text-align: center;
-}
-</style>

+ 0 - 65
src/views/zhpt/tongyonggongju/queryResultMore/widget.vue

@@ -1,65 +0,0 @@
-<template>
-  <div ref="mainDiv" style="width: 100%; height: 100%;">
-    <el-table class="mapTable" height="calc(100% - 40px)" @row-dblclick="viewFeature" tooltip-effect="dark" stripe :data="featureData" ref="table">
-      <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
-      <el-table-column sortable="true" min-width='180' v-for="item in colsData" :key="item.prop" :prop="item.prop" :label="item.label" align="center"/>
-    </el-table>
-    <div style="width:100%;margin-top:8px;">
-      <div style="float:left;width:80%">
-        <el-pagination ref="pagination" small background layout="total, sizes, prev, pager, next" :current-page.sync="currentPage" :page-size.sync="pageSize" :page-sizes="[10, 20, 30, 50, 100, 1000]" :total="total"
-          @current-change="updatePage" @size-change="updatePage"/>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import request from '@/utils/request'
-export default {
-  name: 'QueryResultMore',
-  components: {  },
-  props: { param: Object },
-  data() {
-    return {
-      activeName: '',
-      tabs: [],
-      column: [],
-
-      tableData: null,
-      featureData: [],
-      total: 0,
-      colsData: [],
-      pageSize: 30,
-      currentPage: 1
-    }
-  },
-  mounted() {
-    this.init()
-  },
-  methods: {
-    init () {
-      this.tableData = this.param.data || []
-      if (this.tableData.length !== 0) {
-        if (this.tableData < this.pageSize) {
-          this.featureData = [...this.tableData].splice(0, this.tableData.length)
-        } else {
-          this.featureData = [...this.tableData].splice(0, this.pageSize)
-        }
-      }
-      this.colsData = this.param.colsData || []
-      this.total = this.tableData.length
-    },
-    updatePage () {
-      let firstIndex = this.pageSize * (this.currentPage - 1)
-      let length = this.pageSize * this.currentPage > this.tableData.length ? (this.tableData.length % this.pageSize) : this.pageSize
-      this.featureData = [...this.tableData].splice(firstIndex, length)
-    },
-    viewFeature (row) {
-      if (row.geometry) {
-        // 调用该组件的界面需要定义 gotoGeometry 方法
-        this.param.rootPage && this.param.rootPage.gotoGeometry(row.geometry)
-      } else this.$message.error("无图形信息")
-    }
-  }
-}
-</script>

BIN
src/views/zhpt/tongyonggongju/queryTool/images/C.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/M.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/P.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/R.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/legendtool.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/mapLabel.png


BIN
src/views/zhpt/tongyonggongju/queryTool/images/shuxingbiaozhu.png


+ 0 - 24
src/views/zhpt/tongyonggongju/queryTool/widget.vue

@@ -1,24 +0,0 @@
-<template>
-  <div class="toolPar" style="position: absolute; right: 100px; top: 20px;">
-    <div class="widgetGroupButtoms" style="float: left" title="显示图例" @click="showMapLabel">
-      <img src="./images/legendtool.png">
-    </div>
-    <div class="widgetGroupButtoms" style="float: left" title="动态标注" @click="queryFeature">
-      <img src="./images/shuxingbiaozhu.png"> 
-    </div>
-  </div>
-</template>
-<script>
-export default {
-  name: 'QueryTool',
-  props: { that: { type: Object, default: () => [] } },
-  methods: {
-    queryFeature() {
-      this.$store.dispatch('map/changeMethod', { pathId: 'queryResult', widgetid: 'Panel', label: '动态标注' })
-    },
-    showMapLabel() {
-      this.that.labelShow = !this.that.labelShow
-    }
-  }
-}
-</script>

+ 0 - 62
src/views/zhpt/tongyonggongju/rightBottomTool/initExtent/widget.vue

@@ -1,62 +0,0 @@
-<template>
-  <div class='initExtent iconfont icon-fang' title="默认范围" @click="initExtent" ref='initExtent'>
-  </div>
-</template>
-
-<script>
-// 右下角工具栏的默认范围
-import { appconfig } from 'staticPub/config' // 查找静态文件下的config 地图配置
-export default {
-  name: 'initExtent',
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-
-    /**
-     * 初始至配置中的默认范围
-     */
-    initExtent(){
-      // 重置中心点位置为初始化位置
-      this.map.getView().setZoom(appconfig.initZoom)
-      this.map.getView().animate({
-        center: appconfig.initCenter,
-        duration: 600
-      });
-    },
-
-  }
-}
-</script>
-<style lang='scss' scoped>
-.initExtent.icon-fang:before {
-    font-size: 20px;
-    position: relative;
-    left: 5.5px;
-    top: 3.5px;
-}
-.initExtent {
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 32px;
-  width: 32px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  cursor: pointer;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-
-  &:hover {
-      color: #006eb8;
-    }
-}
-</style>

+ 0 - 100
src/views/zhpt/tongyonggongju/rightBottomTool/mapCompass/widget.vue

@@ -1,100 +0,0 @@
-<template>
-  <div class="compass">
-    <div class="turn-left" title="顺时针转动" @click="mapRotating(0)"></div>
-    <div class="compass-middle" :style="{transform:'rotate('+rRotating+'deg)',transition:'transform 0.6s linear'}"></div>
-    <div class="turn-right" title="逆时针转动" @click="mapRotating(1)"></div>
-  </div>
-</template>
-
-<script>
-export default {
-  props: ["map"],
-  data() {
-    return {
-      rRotating: 0
-    }
-  },
-  methods: {
-    mapRotating(type) {
-      if (type == 0) {
-        this.rRotating -= 90
-        this.map.getView().animate({
-          rotation: this.map.getView().getRotation() - 90*(Math.PI/180),
-          duration: 600
-        }); 
-      } else {
-        this.rRotating += 90
-        this.map.getView().animate({
-          rotation: this.map.getView().getRotation() + 90*(Math.PI/180),
-          duration: 600
-        });
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.compass {
-
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 54px;
-  width: 54px;
-  line-height: 54px;
-  background: url('../../../../../assets/images/bgcicle.png') no-repeat;
-  background-size: 54px 54px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  cursor: pointer;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  left: -13px;
-  border-radius: 32px;
-  .turn-left {
-    display: inline-block;
-    vertical-align: middle;
-    width: 7px;
-    margin-left: 3px;
-    margin-right: 2px;
-    height: 28px;
-    background: url('../../../../../assets/images/turn.png') no-repeat;
-    background-size: 7px 28px;
-    cursor: pointer;
-    // margin-top: 15px;
-    &:hover {
-      background: url('../../../../../assets/images/turnhover.png') no-repeat;
-      background-size: 8px 28px;
-    }
-  }
-  .compass-middle {
-    display: inline-block;
-    vertical-align: middle;
-    width: 12px;
-    margin: 0 5px;
-    height: 38px;
-    // margin-top: 13px;
-    background: url('../../../../../assets/images/compass.png') no-repeat;
-    background-size: 12px 38px;
-  }
-  .turn-right {
-    display: inline-block;
-    vertical-align: middle;
-    width: 7px;
-    // margin-right: 3px;
-    // margin-left: 2px;
-    height: 28px;
-    background: url('../../../../../assets/images/turn.png') no-repeat;
-    background-size: 7px 28px;
-    transform: scaleX(-1);
-    // margin-top: 15px;
-    cursor: pointer;
-    &:hover {
-      background: url('../../../../../assets/images/turnhover.png') no-repeat;
-      background-size: 8px 28px;
-    }
-  }
-}
-</style>

+ 0 - 94
src/views/zhpt/tongyonggongju/rightBottomTool/overView/widget.vue

@@ -1,94 +0,0 @@
-<template>
-  <div class='overView' ref='overView'>
-  </div>
-</template>
-
-<script>
-// 右下角工具栏的鹰眼管理
-import { OverviewMap } from 'ol/control';
-import { appconfig } from 'staticPub/config' // 查找静态文件下的config 地图配置
-import { TF_Layer } from '@/views/zhpt/common/mapUtil/layer'
-
-export default {
-  name: 'overView',
-  components: {  },
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-    this.initOverView();
-  },
-  methods: {
-    /**
-     * 创建鹰眼
-    */
-    initOverView(){
-      let vectorLayer = appconfig.gisResource['iserver_resource'].layerService.layers.find(item => item.name === '矢量底图')
-      let viewTileLayer = new TF_Layer().createLayer(vectorLayer)
-      let temp= new OverviewMap({
-        target: this.$refs['overView'],
-        layers: [viewTileLayer],
-        collapseLabel: '',
-        label: '',
-        collapsed: true,
-        tipLabel: '鹰眼'
-      })
-      this.map.controls.push(temp);
-      this.$nextTick(e=>{
-        // 更改鹰眼按钮图标
-        this.$refs.overView.getElementsByTagName("button")[0].classList.add("iconfont","iconyy")
-        // $('.ol-overviewmap button').addClass('iconfont iconyy');
-      })
-    }
-  }
-}
-</script>
-<style lang='scss' scoped>
-.overView {
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 32px;
-  width: 32px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  cursor: pointer;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  >>> .ol-overviewmap {
-    background-color: #fff !important;
-    left: unset !important;
-    right: 40px !important;
-    bottom: 0.1px !important;
-    border-radius: 2px;
-    button {
-      cursor: pointer;
-      &:hover {
-        color: #006eb8;
-      }
-    }
-  }
-  >>> .ol-overviewmap .ol-overviewmap-map {
-    height: 200px;
-    width: 300px;
-  }
-  >>> .ol-overviewmap button {
-    // display: none;
-    background-color: #fff;
-    color: #444444;
-    border-radius: 2px;
-    outline: none;
-  }
-  >>> .ol-overviewmap button {
-    left: unset !important;
-    bottom: 4px;
-    right: -36px;
-    position: absolute;
-  }
-}
-</style>

+ 0 - 101
src/views/zhpt/tongyonggongju/rightBottomTool/regionZoomIn/widget.vue

@@ -1,101 +0,0 @@
-<template>
-  <div class="regionZoomIn ol-unselectable ol-control">
-    <!-- <button class="iconfont iconfdsj" title="放大" @click="mapZoom(false)"></button> -->
-    <button class="iconfont iconsxsj" title="缩小" @click="mapZoom(true)"></button>
-  </div>
-</template>
-
-<script>
-/**框选缩小*/ 
-import DragZoom from 'ol/interaction/DragZoom'
-import { always as conditionAlways } from 'ol/events/condition'
-export default {
-  name:"regionZoomIn",
-  props: {
-    map:null
-  },
-  data() {
-    return {
-      dragzoom: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      document.addEventListener('keyup', (e) => {
-        if (e.keyCode == 27 && this.map.rightBottomToolDragzoom) {
-          this.mapMove()  //事件名
-        }
-      })
-    })
-  },
-  methods: {
-    /**
-     * 创建缩小控件
-     */
-    mapZoom(out) {
-      this.$notify({
-        title: '操作提示',
-        message: '开启地图缩放,按ESC建退出',
-        type: 'success',
-        position: 'bottom-right'
-      });
-      $("#mapView").css({ cursor: "crosshair" })
-      if (this.map.rightBottomToolDragzoom) {
-        this.map.removeInteraction(this.map.rightBottomToolDragzoom);
-        this.map.rightBottomToolDragzoom=null;
-      }
-      // 创建拉框控件
-      this.map.rightBottomToolDragzoom = new DragZoom({
-        condition: conditionAlways,
-        out: out
-      })
-      this.map.addInteraction(this.map.rightBottomToolDragzoom)
-      this.map.rightBottomToolDragzoom.setActive(true)
-    },
-    /**
-     * 默认控制
-     */
-    mapMove() {
-      $("#mapView").css({ cursor: "default" })
-      if (this.map.rightBottomToolDragzoom) {
-        this.map.removeInteraction(this.map.rightBottomToolDragzoom)
-        this.map.rightBottomToolDragzoom = null;
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.regionZoomIn {
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 32px;
-  width: 32px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  button {
-    background-color: #fff !important;
-    color: #444444;
-    font-weight: 600;
-    outline: none;
-    cursor: pointer;
-    width: 32px;
-    height: 32px;
-    margin: 0 !important;
-    &:first-child {
-      border-bottom: 1px solid #d4d4d4;
-    }
-    &:nth-child(2) {
-      border-top-left-radius: 0;
-      border-top-right-radius: 0;
-    }
-    &:hover {
-      color: #006eb8;
-    }
-  }
-}
-</style>

+ 0 - 101
src/views/zhpt/tongyonggongju/rightBottomTool/regionZoomOut/widget.vue

@@ -1,101 +0,0 @@
-<template>
-  <div class="regionZoomOut ol-unselectable ol-control">
-    <button class="iconfont iconfdsj" title="放大" @click="mapZoom(false)"></button>
-    <!-- <button class="iconfont iconsxsj" title="缩小" @click="mapZoom(true)"></button> -->
-  </div>
-</template>
-
-<script>
-/**框选缩小*/ 
-import DragZoom from 'ol/interaction/DragZoom'
-import { always as conditionAlways } from 'ol/events/condition'
-export default {
-  name:"regionZoomOut",
-  props: {
-    map:null
-  },
-  data() {
-    return {
-      dragzoom: null
-    }
-  },
-  mounted() {
-    this.$nextTick(() => {
-      document.addEventListener('keyup', (e) => {
-        if (e.keyCode == 27 && this.map.rightBottomToolDragzoom) {
-          this.mapMove()  //事件名
-        }
-      })
-    })
-  },
-  methods: {
-    /**
-     * 创建放大控件
-     */
-    mapZoom(out) {
-      this.$notify({
-        title: '操作提示',
-        message: '开启地图缩放,按ESC建退出',
-        type: 'success',
-        position: 'bottom-right'
-      });
-      $("#mapView").css({ cursor: "crosshair" })
-      if (this.map.rightBottomToolDragzoom) {
-        this.map.removeInteraction(this.map.rightBottomToolDragzoom);
-        this.map.rightBottomToolDragzoom=null;
-      }
-      // 创建拉框控件
-      this.map.rightBottomToolDragzoom = new DragZoom({
-        condition: conditionAlways,
-        out: out
-      })
-      this.map.addInteraction(this.map.rightBottomToolDragzoom)
-      this.map.rightBottomToolDragzoom.setActive(true)
-    },
-    /**
-     * 默认控制
-     */
-    mapMove() {
-      $("#mapView").css({ cursor: "default" })
-      if (this.map.rightBottomToolDragzoom) {
-        this.map.removeInteraction(this.map.rightBottomToolDragzoom)
-        this.map.rightBottomToolDragzoom = null;
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.regionZoomOut {
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 32px;
-  width: 32px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  button {
-    background-color: #fff !important;
-    color: #444444;
-    font-weight: 600;
-    outline: none;
-    cursor: pointer;
-    width: 32px;
-    height: 32px;
-    margin: 0 !important;
-    &:first-child {
-      border-bottom: 1px solid #d4d4d4;
-    }
-    &:nth-child(2) {
-      border-top-left-radius: 0;
-      border-top-right-radius: 0;
-    }
-    &:hover {
-      color: #006eb8;
-    }
-  }
-}
-</style>

+ 0 - 123
src/views/zhpt/tongyonggongju/rightBottomTool/viewSwitch/widget.vue

@@ -1,123 +0,0 @@
-<template>
-  <!-- 底图切换 -->
-  <div class="viewSwitch">
-    <el-popover v-model="visible" placement="left" width="auto" trigger="hover">
-      <el-radio-group v-model="currentValue" @change="mapChange(currentValue)">
-        <el-radio-button label="1">矢量地图</el-radio-button>
-        <el-radio-button label="2">影像图</el-radio-button>
-        <!-- <el-radio-button label="2、3D联动"></el-radio-button> -->
-      </el-radio-group>
-      <div class="btn iconfont icondiqiu" slot="reference"></div>
-    </el-popover>
-  </div>
-</template>
-
-<script>
-import { appconfig } from "staticPub/config";
-import VectorLayer from 'ol/layer/Vector';
-export default {
-  data() {
-    return {
-      currentValue:"1",
-      visible: false
-    }
-  },
-  props: {
-    map:null
-  },
-  methods: {
-    /**
-     * 根据选择切换图层
-     * 
-    */
-    mapChange(type) {
-      let showVectorLayer = type === "1"
-      let layers = this.map.getLayers().getArray()
-      layers.forEach(layer => {
-        if(!(layer instanceof VectorLayer)) {
-          let layername = layer.get('name')
-          if (layername.includes("矢量")) {
-            layer.setVisible(showVectorLayer)
-          } else if (layername.includes("影像")) {
-            layer.setVisible(!showVectorLayer)
-          }
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.viewSwitch {
-  margin-bottom:5px ;
-  position: relative;
-  float: left;
-  height: 32px;
-  width: 32px;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  background-color: rgb(255, 255, 255);
-  border-radius: 2px;
-  padding: 0 !important;
-  cursor: pointer;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  .btn {
-    width: 100%;
-    height: 100%;
-    line-height: 32px;
-    text-align: center;
-    background-color: #fff;
-    border-radius: 2px;
-    font-size: 20px;
-    color: #444444;
-    cursor: pointer;
-    &:hover {
-      color: #006eb8;
-    }
-  }
-}
-.el-radio-button {
-  width: 80px;
-  height: 80px;
-  cursor: pointer;
-  margin: 3px;
-  &:first-child {
-    background: url('../../../../../assets/images/tdt.png') no-repeat;
-    background-size: 100% 100%;
-  }
-  &:nth-child(2) {
-    background: url('../../../../../assets/images/yxt.png') no-repeat;
-    background-size: 100% 100%;
-  }
-  // &:last-child {
-  //   background: url('../../../../public/images/kxc/23D.png') no-repeat;
-  //   background-size: 100% 100%;
-  // }
-  >>> .el-radio-button__orig-radio {
-    width: 100%;
-    height: 100%;
-  }
-  >>> .el-radio-button__inner {
-    width: 100%;
-    height: 20px;
-    line-height: 20px;
-    border-radius: 0;
-    padding: 0;
-    border: none;
-    position: absolute;
-    bottom: 0;
-    background-color: rgba(92, 92, 92, 0.76);
-    -webkit-box-shadow: none;
-    box-shadow: none;
-    color: rgb(255, 255, 255);
-  }
-  &:hover {
-    border: 2px solid #3385ff;
-  }
-}
-
-/deep/.is-active .el-radio-button__inner {
-  background-color: rgb(51, 133, 255) !important;
-  color: rgb(255, 255, 255) !important;
-}
-</style>

+ 0 - 42
src/views/zhpt/tongyonggongju/rightBottomTool/widget.vue

@@ -1,42 +0,0 @@
-<template>
-  <div class='rightBottomTool' :style="'bottom:'+(toolList.length*37+5)+'px'">
-    <template v-for='(item,index) in toolList'>
-      <component :map='map' v-bind:is="item.name" :key="'rightBottomTool_'+index"> </component>
-    </template>
-  </div>
-</template>
-
-<script>
-// 本模块用于管理右下角的工具栏,所有的右下角工具都是从这里进行加载
-export default {
-  name: 'rightBottomTool',
-  components: {},
-  props: { 
-    toolList:{
-      type:Array,
-      default:[]
-    },
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-  },
-  methods: {
-
-  }
-}
-</script>
-<style lang='scss' scoped>
-.rightBottomTool{
-    position: absolute;
-    right: 20px;
-    bottom: 5px;
-    height: 30px;
-    width: 30px;
-    background: rgba(0,0,0,0);
-    z-index: 2;
-}
-</style>

+ 0 - 31
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/angleTool.vue

@@ -1,31 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import {drawAndLayer,optionAction} from"./drawAndLayer"
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.startDis();
-  },
-  methods: {
-    /**
-     * 开始测量
-    */
-    startDis(){
-      drawAndLayer.initValue(this.map);
-      drawAndLayer.measure(optionAction.angle);
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 31
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/areaTool.vue

@@ -1,31 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import {drawAndLayer,optionAction} from"./drawAndLayer"
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.startDis();
-  },
-  methods: {
-    /**
-     * 开始测量
-    */
-    startDis(){
-      drawAndLayer.initValue(this.map);
-      drawAndLayer.measure(optionAction.area);
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 30
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/clearMeasureTool.vue

@@ -1,30 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import {drawAndLayer,optionAction} from"./drawAndLayer"
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.startDis();
-  },
-  methods: {
-    /**
-     * 清除
-    */
-    startDis(){
-      drawAndLayer.destory();
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 31
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/coordinateTool.vue

@@ -1,31 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import {drawAndLayer,optionAction} from"./drawAndLayer"
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.startDis();
-  },
-  methods: {
-    /**
-     * 开始测量
-    */
-    startDis(){
-      drawAndLayer.initValue(this.map);
-      drawAndLayer.measure(optionAction.coordinate);
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 33
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/distanceTool.vue

@@ -1,33 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import {drawAndLayer,optionAction} from"./drawAndLayer"
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  created(){
-  },
-  mounted(){
-    this.startDis();
-  },
-  methods: {
-    /**
-     * 开始测量
-    */
-    startDis(){
-      drawAndLayer.initValue(this.map);
-      drawAndLayer.measure(optionAction.distance);
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 392
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/drawAndLayer.ts

@@ -1,392 +0,0 @@
-import { Draw } from "ol/interaction";
-import { Vector as VectorSource } from "ol/source";
-import { Vector as VectorLayer } from "ol/layer";
-import Overlay from 'ol/Overlay';
-import { Polygon, LineString,Point } from 'ol/geom';
-import Feature from 'ol/Feature';
-import { unByKey } from 'ol/Observable'
-import { getLength, getArea } from 'ol/sphere';
-import Style from "ol/style/Style";
-import Stroke from "ol/style/Stroke";
-import Fill from "ol/style/Fill";
-import Circle from "ol/style/Circle";
-import {comSymbol} from "@/utils/comSymbol"
-/**存在的操作*/
-export const optionAction={
-  /**距离测量*/
-  distance:"distance",
-  /**面积测量*/
-  area:"area",
-  /**角度测量*/
-  angle:"angle",
-  /**坐标展示*/
-  coordinate:"coordinate",
-  /**清除测量*/
-  clearMeasure:"clearMeasure"
-};
-const drawAction={
-  distance:"LineString",
-  angle:"LineString",
-  area:"Polygon",
-  coordinate:"Point",
-  clearMeasure:"clear"
-}
-
-/**
- * 存储测量工具的通用方法
-*/
-class DrawInMap{
-  /**操作的地图*/
-  map=null;
-  /**当前的操作*/
-  option="";
-  /**图层唯一标识*/
-  layerUniqueCode="measureToolLayer";
-  /**图层*/
-  layer=null;
-  /**绘制唯一标识*/
-  drawUniqueCode="measureToolDraw";
-  /**绘制工具*/
-  draw=null;
-  /**数据源*/
-  vectorSource=null;
-  /**测量结果*/
-  measureResult="0";
-  /**地图显示数据的标签*/
-  tipDiv=null;
-  /**鼠标移动事件*/
-  pointermoveEvent=null;
-  /**鼠标点击事件*/
-  pointClickEvent=null;
-  /**图形监听事件*/
-  geometryListener=null;
-  /**绘制的图形要素*/
-  sketchFeature=null;
-
-  /**
-   * 初始值
-   */
-  initValue(map){
-    // 当前业务不清除
-    // this.destory();
-    this.map=map;
-  }
-
-    /**
-   * 测量
-   */
-  measure(option) {
-    this.option=option;
-    !this.vectorSource && this.createSource()
-    !this.layer && this.createLayer();
-    this.pointClickEvent && unByKey(this.pointClickEvent)
-    this.pointermoveEvent && unByKey(this.pointermoveEvent)
-    this.checkLayerExist();
-  }
-
-  /**检测图层是否已存在于map中*/ 
-  checkLayerExist(){
-    this.tipDiv = document.createElement('div');
-    this.tipDiv.innerHTML = (this.option==optionAction.coordinate?"点击地图":'单击确定起点');
-    this.tipDiv.className = "tipDiv";
-    this.tipDiv.style = "width:auto;height:auto;padding:4px;border:1px solid #fc5531;font-size:12px;background-color:#fff;position:relative;top:60%;left:60%;font-weight:600;"
-    let overlay=this.createMapMark(this.tipDiv,'tipLay');
-    this.pointermoveEvent = this.map.on("pointermove", evt => {
-      overlay.setPosition(evt.coordinate);
-    })
-    
-    if(this.option==optionAction.coordinate){
-      this.pointClickEvent=this.map.on("click",evt=>{
-        this.creatMark(null, evt.coordinate[0].toFixed(3)+","+evt.coordinate[1].toFixed(3), 'coordinateInfo').setPosition(evt.coordinate);
-        let feature = new Feature({
-          geometry: new Point(evt.coordinate),
-        });
-        feature.setStyle(comSymbol.getPointStyle())
-        this.vectorSource.addFeature(feature);
-      })
-    }else{
-      this.creatDraw();
-    }
-  }
-
-  /**
-   * 创建数据源
-   * */ 
-  createSource(){
-    // 矢量图层源
-    this.vectorSource = new VectorSource({
-      wrapX: false
-    });
-  }
-
-  /**
-   * 创建图层
-   * */ 
-  createLayer(){
-    // 矢量图层
-    this.layer = new VectorLayer({
-      source: this.vectorSource,
-      style: comSymbol.getAllStyle(),
-      name: this.layerUniqueCode
-    } as any);
-    this.map.addLayer(this.layer);
-  }
-
-  /**
-   * 创建绘制工具
-   * */ 
-  creatDraw(){
-    let tipOverlay = []
-    this.draw && this.map.removeInteraction(this.draw)
-    this.draw = new Draw({
-      source: this.vectorSource,
-      name:this.drawUniqueCode,
-      type:drawAction[this.option],
-      maxPoints:(this.option==optionAction.angle?3:null),
-      style:comSymbol.getDrawStyle(),
-      // 绘制时点击处理事件
-      condition: (evt) => {
-        // 测距时添加点标注
-        if (this.measureResult != "0" && !this.map.getOverlayById(this.measureResult) && this.option == optionAction.distance) {
-          let overlay = this.creatMark(null, this.measureResult, this.measureResult)
-          overlay.setPosition(evt.coordinate)
-          tipOverlay.push(overlay)
-        }
-        return true
-      }
-    } as any);
-    this.map.addInteraction(this.draw);
-    
-      /**
-       * 绘制开始事件
-       */
-      this.draw.on("drawstart", e => {
-        this.sketchFeature = e.feature
-        let proj = this.map.getView().getProjection()
-        //******距离测量开始时*****//
-        if (this.option ==optionAction.distance) {
-          let overlay = this.creatMark(null, "起点", "start")
-          overlay.setPosition(this.map.getCoordinateFromPixel(e.target.downPx_))
-          tipOverlay.push(overlay)
-          this.tipDiv.innerHTML = "总长:0 m</br>单击确定地点,双击结束";
-          this.geometryListener = this.sketchFeature.getGeometry().on('change', (evt) => {
-            this.measureResult = this.distenceFormat(getLength(evt.target, { "projection": proj, "radius": 6378137 }))
-            this.tipDiv.innerHTML = "总长:" + this.measureResult + "</br>单击确定地点,双击结束";
-          })
-        }
-        //******面积测量开始时*****//
-        else if (this.option ==optionAction.area) {
-          this.tipDiv.innerHTML = "面积:0 m<sup>2</sup></br>继续单击确定地点";
-          this.geometryListener = this.sketchFeature.getGeometry().on('change', (evt) => {
-            if (evt.target.getCoordinates()[0].length < 4) this.tipDiv.innerHTML = "面积:0m<sup>2</sup></br>继续单击确定地点";
-            else {
-              this.measureResult = this.formatArea(getArea(evt.target, { "projection": proj, "radius": 6378137 }))
-              this.tipDiv.innerHTML = "面积:" + this.measureResult + "</br>单击确定地点,双击结束";
-            }
-          })
-        }
-        //******角度测量开始时*****//
-        else if (this.option ==optionAction.angle) {
-          this.tipDiv.innerHTML = "继续单击确定顶点";
-          this.geometryListener = this.sketchFeature.getGeometry().on('change', (evt) => {
-            if (evt.target.getCoordinates().length < 3) this.tipDiv.innerHTML = "继续单击确定顶点";
-            else {
-              this.measureResult = this.formatAngle(evt.target)
-              this.tipDiv.innerHTML = "角度:" + parseFloat(this.measureResult).toFixed(2) + "</br>继续单击结束";
-            }
-          })
-        }
-      });
-
-      /**
-       * 绘制开始事件
-       */
-      this.draw.on("drawend", e => {
-        let closeBtn = document.createElement('span') as any;
-        closeBtn.innerHTML = "×";
-        closeBtn.title = "清除测量"
-        closeBtn['style'] = "width: 18px;height:18px;line-height: 12px;text-align: center;border-radius: 5px;display: inline-block;padding: 0px;color: rgb(255, 68, 0);border: 2px solid rgb(255, 68, 0);background-color: rgb(255, 255, 255);font-weight: 600;position: absolute;top: -25px;right: -2px;cursor: pointer;";
-        //******距离测量结束时*****//
-        if (this.option ==optionAction.distance) {
-          let overlay1 = this.creatMark(closeBtn, null, "close1")
-          overlay1.setPosition(e.feature.getGeometry().getLastCoordinate());
-          let overlay2 = this.creatMark(null, "总长:" + this.measureResult + "", "length")
-          overlay2.setPosition(e.feature.getGeometry().getLastCoordinate())
-          this.map.removeOverlay(this.map.getOverlayById(this.measureResult))
-          tipOverlay.push(overlay1)
-          tipOverlay.push(overlay2)
-        }
-        //******面积测量结束时*****//
-        else if (this.option ==optionAction.area) {
-          let overlay1 = this.creatMark(closeBtn, null, "close2")
-          overlay1.setPosition(e.feature.getGeometry().getInteriorPoint().getCoordinates());
-          let overlay2 = this.creatMark(null, "总面积:" + this.measureResult + "", "area")
-          overlay2.setPosition(e.feature.getGeometry().getInteriorPoint().getCoordinates())
-          tipOverlay.push(overlay1)
-          tipOverlay.push(overlay2)
-        }
-        //******角度测量结束时*****//
-        else if (this.option ==optionAction.angle) {
-          let overlay1 = this.creatMark(closeBtn, null, "close3")
-          overlay1.setPosition(e.feature.getGeometry().getCoordinates()[1]);
-          let overlay2 = this.creatMark(null, "角度:" + parseFloat(this.measureResult).toFixed(2) + "", "angle")
-          overlay2.setPosition(e.feature.getGeometry().getCoordinates()[1])
-          tipOverlay.push(overlay1)
-          tipOverlay.push(overlay2)
-        }
-        // 停止测量
-        this.stopMeasure();
-        closeBtn.addEventListener('click', () => {
-          // this.destory()
-          this.layer && this.layer.getSource().removeFeature(e.feature)
-          tipOverlay.forEach(overlay => {
-            this.map.removeOverlay(overlay)
-          })
-        })
-      })
-  }
-
-  /**
-   * 创建标记
-   */
-  creatMark(markDom, txt, idstr) {
-    if (markDom == null) {
-      markDom = document.createElement('div');
-      markDom.innerHTML = txt
-      markDom.style = "width:auto;height:auto;padding:4px;border:1px solid #fc5531;font-size:12px;background-color:#fff;position:relative;top:60%;left:60%;font-weight:600;"
-    }
-    let overlay=this.createMapMark(markDom,idstr);
-    return overlay;
-  }
-
-    /**
-   * 创建地图标记
-   * */
-  createMapMark(element,id){
-    let overlay = new Overlay({
-      element: element,
-      autoPan: false,
-      positioning: "bottom-center",
-      id: id,
-      stopEvent: false //停止事件传播到地图
-    });
-    this.map.addOverlay(overlay)
-    return overlay;
-  }
-
-  /**
-   * 清除地图显示
-   */
-  clearLayer(){
-    //清除图层
-    if(this.layer){
-      this.layer.getSource().clear();
-    }
-    //清除标记
-    if(this.map){
-      this.map.getOverlays().clear();
-    }
-  }
-
-  /**
-   * 停止测量
-   */
-  stopMeasure() {
-    this.tipDiv = null
-    if(this.map){
-      this.map.removeInteraction(this.draw); // 移除绘制组件
-      this.map.removeOverlay(this.map.getOverlayById("tipLay")) // 移除动态提示框
-    }   
-    this.draw = null;
-  }
-
-  /**
-   * 清除测量
-   */
-  clearMeasure() {
-    this.clearLayer();
-    //移除监听事件
-    unByKey(this.pointermoveEvent) // 清除鼠标在地图的pointermove事件
-    unByKey(this.geometryListener) // 清除绘制图像change事件
-    unByKey(this.pointClickEvent)//清除点击事件
-    this.pointermoveEvent = null;
-    this.geometryListener = null;
-    this.pointClickEvent=null;
-    this.measureResult = "0"
-  }
-
-  /**
-   * 销毁图层和绘图工具
-   */
-  destory(){
-    this.clearMeasure();
-    this.measureResult='0';
-    if(this.map){
-      this.map.removeLayer(this.layer);
-      this.layer=null;
-    }
-  }
-
-  /**
-   * 格式化距离结果输出
-   */
-  distenceFormat(length) {
-    let output;
-    if (length > 100) {
-      output = (Math.round(length / 1000 * 100) / 100) + ' ' + 'km'; //换算成km单位
-    } else {
-      output = (Math.round(length * 100) / 100) + ' ' + 'm'; //m为单位
-    }
-    return output;//返回线的长度
-  }
-
-    /**
-     * 格式化面积输出
-     */
-    formatArea(area) {
-      let output;
-      if (area > 10000) {
-        output = (Math.round(area / 1000000 * 100) / 100) + ' ' + 'km<sup>2</sup>'; //换算成km单位
-      } else {
-        output = (Math.round(area * 100) / 100) + ' ' + 'm<sup>2</sup>';//m为单位
-      }
-      return output; //返回多边形的面积
-    }
-
-    /**
-     * 计算角度输出
-     */
-    formatAngle(line) {
-      var coordinates = line.getCoordinates();
-      // var angle = '0°';
-      let tempAngle=0;
-      if (coordinates.length == 3) {
-        const disa = getLength(new Feature({
-          geometry: new LineString([coordinates[0], coordinates[1]])
-        }).getGeometry(), {
-          radius: 6378137,
-          projection: this.map.getView().getProjection()
-        });
-
-        const disb = getLength(new Feature({
-          geometry: new LineString([coordinates[1], coordinates[2]])
-        }).getGeometry(), {
-          radius: 6378137,
-          projection: this.map.getView().getProjection()
-        });
-
-        const disc = getLength(new Feature({
-          geometry: new LineString([coordinates[0], coordinates[2]])
-        }).getGeometry(), {
-          radius: 6378137,
-          projection: this.map.getView().getProjection()
-        });
-        var cos = (disa * disa + disb * disb - disc * disc) / (2 * disa * disb); // 计算cos值
-        tempAngle = (Math.acos(cos) * 180) / Math.PI; // 角度值
-      }
-      if (isNaN(tempAngle)) return "0°"
-      else return tempAngle + "°"; // 返回角度
-    }
-}
-
-export const drawAndLayer=new DrawInMap();

+ 0 - 28
src/views/zhpt/tongyonggongju/rightTopTool/measureTool/widget.vue

@@ -1,28 +0,0 @@
-<template>
-
-</template>
-
-<script>
-// 本模块用于管理右上角的工具栏的测量工具,
-export default {
-  name: 'measureTool',
-  components: {  },
-  props: { 
-    toolList:[],
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-
-  }
-}
-</script>
-<style lang="scss" scoped>
-
-</style>

+ 0 - 99
src/views/zhpt/tongyonggongju/rightTopTool/otherTools/mapLegend.vue

@@ -1,99 +0,0 @@
-<template>
-</template>
-
-<script>
-import { esriConfig, appconfig } from "staticPub/config";
-import { mapUtil } from '../../../common/mapUtil/common';
-export default {
-    props: {
-        map: null,
-        rootPage: null,
-    },
-    data () {
-        return {
-            legends: []
-        }
-    },
-    methods: {
-        close () {
-            this.showlegend(false)
-        },
-        showlegend (visible) {
-            if (this.$store.state.gis.activeHeaderItem === 'psjc') {
-                this.rootPage.showLegend('testReport', visible)
-            } else {
-                this.rootPage.$data.labelShow = visible
-                if (this.rootPage.$data.labelShow) this.setLegend()
-            }
-        },
-        setLegend () {
-            // let promises = this.legends.map(legend => mapUtil.getLegend(legend.name))
-            // Promise.all(promises).then(resArr => {
-            //     console.log('图例信息')
-            //     let htmlStr = resArr.filter(res => res && res.data).map((res, index) => {
-            //         let blob = new Blob([res.data], { type: 'image/png' })
-            //         return `<div><img src='${URL.createObjectURL(blob)}'><span>${this.legends[index].title}</span></div>`
-            //     }).join("")
-            //     this.rootPage.$refs.legend.innerHTML = htmlStr
-            // })
-            console.log('图例', this.legends)
-            let url = this.legends.legendUrl
-            let dataSetName = this.legends.name
-            let legendSourceName = this.legends.legendSource
-            let htmlStr = this.legends.sublayers.map((group, index) => {
-                let groupName = group.name.replace('#', '.')
-                return group.sublayers.map(sub => {
-                    let subName = sub.name.replace('#', '.')
-                    let legendUrl = `${url + subName}@@${groupName}@@${dataSetName}/legend`
-                    return `<div><img src='${legendUrl}'><div style='display:inline-block;font-size:14px'>${sub.title}</div></div>`
-                })
-            }).flat().join('')
-            this.rootPage.$refs.legend.innerHTML = htmlStr
-
-        // $.ajax({
-        //     url: appconfig.gisResource.legend[0].url + '/legend?f=pjson', 
-        //     type: 'GET',
-        //     success: legendJson => {
-        //       let resData = JSON.parse(legendJson)
-        //       if (resData.error) {
-        //         return this.$message.error('图例加载失败:' + data.error.message)
-        //       }
-        //       let layerData = resData.layers
-        //       let htmlStr = layerData.map(layer => {
-        //           let label = layer.layerName
-        //           return layer.legend.map(legend => {
-        //              return `<div><img src='data:image/png;base64,${legend.imageData}'><span>${legend.label || label}</span></div>`
-        //           }).join("")
-        //       })
-              
-        //     },
-        //     error: error => console.error(error)
-        //   })
-        },
-        keyUpEvent (e) {
-            if (e.keyCode == 27) {
-                this.close()
-                document.removeEventListener('keyup', this.keyUpEvent)
-            }
-        }
-    },
-    mounted () {
-        this.$nextTick(() => {
-            document.addEventListener('keyup', this.keyUpEvent)
-        })
-        this.legends = mapUtil.getAllSubLayerNames('pipemap', 'smlayergroup')
-        this.showlegend(true)
-        this.$notify({
-            title: '操作提示',
-            message: '按ESC键关闭图例',
-            type: 'success',
-            position: 'bottom-right'
-        });
-    }
-
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 16
src/views/zhpt/tongyonggongju/rightTopTool/otherTools/widget.vue

@@ -1,16 +0,0 @@
-<template>
-  
-</template>
-
-<script>
-export default {
-  props: { 
-    toolList:[],
-    map:null
-  },
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 48
src/views/zhpt/tongyonggongju/rightTopTool/toolBox/fullScreen.vue

@@ -1,48 +0,0 @@
-
-<template>
-</template>
-
-<script>
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.setScreenFull();
-  },
-  methods: {
-    // 全屏
-    setScreenFull() {
-      const isFullScreen=document.fullscreenElement;
-      if(isFullScreen){
-        if(document.exitFullscreen){
-          document.exitFullscreen();
-        }else if(document.msExitFullscreen){
-          document.msExitFullscreen();
-        }else if(document.mozCancelFullscreen){
-          document.mozCancelFullscreen();
-        }else if(document.webkitCancelFullscreen){
-          document.webkitCancelFullscreen();
-        }
-      }else{
-        const fullScreen=document.documentElement;
-        if(fullScreen){
-          if(fullScreen.requestFullscreen){
-            fullScreen.requestFullscreen();
-          }else if(fullScreen.mozRequestFullscreen){
-            fullScreen.mozRequestFullscreen();
-          }else if(fullScreen.msRequestFullscreen){
-            fullScreen.msRequestFullscreen();
-          }else if(fullScreen.webkitRequestFullscreen){
-            fullScreen.webkitRequestFullscreen();
-          }
-        }
-      }
-    },
-  }
-}
-</script>

+ 0 - 42
src/views/zhpt/tongyonggongju/rightTopTool/toolBox/mapScreenshot.vue

@@ -1,42 +0,0 @@
-
-<template>
-</template>
-
-<script>
-import html2Canvas from 'html2canvas'
-export default {
-  props: {
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted(){
-    this.getImg();
-  },
-  methods: {
-    // 截图方法
-    getImg() {
-      console.log('打印')
-      const mapViewHtml = $('.ol-viewport');
-      // 存在多个 viewport , 分屏功能bug  
-      let viewImg = mapViewHtml[mapViewHtml.length - 2]
-      html2Canvas(viewImg, {
-        backgroundColor: null, // 画出来的图片有白色的边框,不要可设置背景为透明色(null)
-        useCORS: true, // 支持图片跨域
-        scale: 1 // 设置放大的倍数
-      }).then(canvas => {
-        // 如果你需要下载截图,可以使用a标签进行下载
-        const a = document.createElement('a');
-        a.href = canvas.toDataURL('image/png');
-        a.download = '地图快照';
-        a.click();
-      });
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 28
src/views/zhpt/tongyonggongju/rightTopTool/toolBox/widget.vue

@@ -1,28 +0,0 @@
-<template>
-
-</template>
-
-<script>
-// 本模块用于管理右上角的工具栏的工具箱,
-export default {
-  name: 'toolBox',
-  components: {  },
-  props: { 
-    toolList:[],
-    map:null
-  },
-  data() {
-    return {
-    }
-  },
-  mounted() {
-
-  },
-  methods: {
-
-  }
-}
-</script>
-<style lang="scss" scoped>
-
-</style>

+ 0 - 272
src/views/zhpt/tongyonggongju/rightTopTool/widget.vue

@@ -1,272 +0,0 @@
-<template>
-  <div class='rightTopTool' v-if='groupList&&groupList.length>0' @mouseleave="hideList">
-    <template v-for='(item,index) in groupList'>
-      <div class='groupDiv' :key="'rightTopTool_'+index">
-        <div class='grouptitle' @mouseover="showList(item)" :class="!item.childList.length ? 'pointer': ''" @click="openFunction2(item)">
-          <div class='imgDiv'>
-            <!-- 目前没有图片后续,可以读取图片地址,通过地址进行动态加载,地址写入下面的src中 -->
-            <i :class="item.icon"></i>
-            <!-- <img style='width:100%;width:100%' src=''> -->
-          </div>
-          <span  class='spanDiv'>{{item.label}}</span>
-          <i v-if="item.childList.length" class="el-icon-arrow-down"></i>
-        </div>
-        <div @mouseleave="hideList" v-show='item.showList' class='groupList'>
-          <div class='splitDiv'></div>
-          <ul class='groupListUl'>
-          <template v-for="(item2,index2) in item.childList">
-            <li class='groupListLi' @click="openFunction(item2)" :key="'rightTopTool_'+index+'groupItem_'+index2">{{item2.label}}</li>
-          </template>
-          </ul>
-        </div>
-      </div>
-    </template>
-    <!-- 管理没有框的组件(距离测量、长度测量等) -->
-    <component
-    v-for="item in componentList"
-    :key="item.name"
-    :is="item.component"
-    :map="map"
-    :rootPage="rootPage"
-  />
-  </div>
-</template>
-
-<script>
-// 本模块用于管理右上角的工具栏,所有的右上角工具都是从这里进行加载
-export default {
-  name: 'rightTopTool',
-  components: {  },
-  props: { 
-    toolList:null,
-    map:null,
-    rootPage: null
-  },
-  data() {
-    return {
-      /**工具栏的功能组*/
-      groupList:[],
-      /**当前展示的功能组*/
-      currentList:null,
-      /**没有在浮动框、全框、半框里面的组件*/
-      componentList:[],
-    }
-  },
-  mounted() {
-    this.getGroupList();
-  },
-  methods: {
-    getGroupList(){
-      let temp=[];
-      //确定父子关系
-      this.toolList.forEach(item=>{
-        if (item.parentPathid){
-          if (temp[item.parentPathid]){
-            temp[item.parentPathid].push(item)
-          } else {
-            temp[item.parentPathid]=[item];
-          }
-        } else {
-          if (temp[item.name]) {
-            item.childList=temp[item.name];
-          } else {
-            temp[item.name]=[];
-            item.childList=temp[item.name]
-          }
-          item.showList=false;
-          this.groupList.push(item);
-        }
-      });
-    },
-
-    /**
-     * 获取指定层级下面的组件
-     * @param typeString 指定层级的名称
-     * */ 
-    getComponents(typeString){
-        let temp=this.$store.state.routeSetting.addRoutes.find(val=>{ return val.name&&val.name==typeString});
-        return temp.children||[]
-    },
-
-    /**
-     * 展示功能列表
-     * @param list 当前展示的功能列表
-     * */
-    showList(list){
-      if(this.currentList){
-        this.currentList.showList=false;
-      };
-      this.currentList=list;
-      this.currentList.showList=true;
-      let temp=this.currentList.label;
-      this.currentList.label='123123';
-      this.currentList.label=temp;
-    },
-
-    /**
-     * 隐藏功能组
-     * @param list 当前展示的功能列表
-     * */
-    hideList(){
-      if(this.currentList){
-        this.currentList.showList=false;
-        let temp=this.currentList.label;
-        this.currentList.label='123123';
-        this.currentList.label=temp;
-      }
-    },
-    openFunction2 (val) {
-      if (val.childList.length > 0) return
-      console.log('点击工具栏', val)
-      if(!val.widgetid){
-        let componentList=this.getComponents("rightTopTool");
-        let tempComponent=componentList.find(e=>{return e.name==val.name});
-        let index =this.componentList.findIndex(e=>{return e.name==val.name});
-        if (index!=-1) {
-          this.componentList.splice(index,1);
-        }
-        this.$nextTick(e=>{
-          this.componentList.push(tempComponent);
-        })
-      }else{
-        this.$store.dispatch("map/changeMethod",{
-          pathId: val.id || val.pathId,
-          widgetid: val.widgetid,
-          label: val.label,
-          param: val.param || {}
-        });
-      }
-    },
-
-    /**
-     * 打开对应的功能
-     * @param val 对应功能的信息
-     * */
-    openFunction(val){
-      if(!val.widgetid){
-        let componentList=this.getComponents("rightTopTool");
-        let tempComponent=componentList.find(e=>{return e.name==val.name});
-        let index =this.componentList.findIndex(e=>{return e.name==val.name});
-        if (index!=-1) {
-          this.componentList.splice(index,1);
-        }
-        this.$nextTick(e=>{
-          this.componentList.push(tempComponent);
-        })
-      }else{
-        this.$store.dispatch("map/changeMethod",{
-          pathId: val.id || val.pathId,
-          widgetid: val.widgetid,
-          label: val.label,
-          param: val.param || {}
-        });
-      }
-    }
-  }
-
-    //  let temp=[];
-    //   this.toolList.forEach(item=>{
-    //     if(item.childList&&item.childList.length>0){
-    //       temp.push(item);
-    //     }
-    //   });
-    //   const allModel=this.$store.state.routeSetting.routes;//获取所有功能
-    //   temp.forEach(item=>{
-    //     let parent=allModel.find(e=>{return e.name=item.name});
-    //     item.childList.forEach(val=>{
-    //       let tempComponent=allModel.find(e=>{return e.name=val.name});
-    //       if(!parent.components){
-    //         parent.components=null;
-    //       }
-    //       parent.components[val.name]=tempComponent;
-    //     });
-    //     console.log(parent);
-    //   })
-    //   temp=temp  
-}
-</script>
-<style lang="scss" scoped>
-.pointer {
-  cursor: pointer;
-}
-.rightTopTool{
-  position: absolute;
-  right: 10px;
-  top: 10px;
-  background: rgba(255, 254, 254, 1);
-  z-index: 2;
-  box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
-  border-radius: 2px;
-  height: 40px;
-  padding:2px;
-  .groupDiv{
-    position: relative;
-    float: right;
-    font-size: 14px;
-    margin: 0 10px;
-    height: 100%;
-  }
-  .grouptitle{
-    height: 100%;
-    width: 100%;
-    position: relative;
-    float: left;
-    .imgDiv{
-      position: relative;
-      float: left;
-      width: 16px;
-      height: 16px;
-      top: 10px;
-    }
-    .spanDiv{
-      position: relative;
-      float: left;
-      top:10px;
-      padding-left: 5px;
-    }
-    .spanDiv:hover{
-      color: rgb(102, 177, 255);
-    }
-    .el-icon-arrow-down{
-      position: relative;
-      float: left;
-      top:10px;
-      padding-left: 7px;
-      padding-right: 3px;
-    }
-  }
-  .hideList{
-    position: relative;
-    float: left;
-    width: 100%;
-  }
-  .splitDiv{
-    position: relative;
-    float: left;
-    width: 100%;
-    height: 10px;
-    background: rgba(0,0,0,0);
-  }
-  .groupListUl{
-    position: relative;
-    float: left;
-    width: 100%;
-    padding: 0px;
-    list-style: none;
-    margin: 0px !important;
-    background: rgba(255, 254, 254, 1);
-    border-radius: 2px;
-    li.groupListLi{
-      cursor: pointer;
-      padding: 5px;
-      background: rgba(236, 245, 255, 0);
-      width: 100%;
-      text-align: center;
-    }
-    li.groupListLi:hover{
-      background-color: rgba(236, 245, 255, 1);
-      color: rgb(102, 177, 255);
-    }
-  }
-}
-</style>

+ 0 - 61
src/views/zhpt/tongyonggongju/scaleBar/widget.vue

@@ -1,61 +0,0 @@
-<template>
-  <div id="scale" class="littleWidget">
-    比例尺:1:{{ scale ? scale.toFixed(0) : 1 }}
-  </div>
-</template>
-<script>
-export default {
-  name: 'Scalebar',
-  components: {},
-  props: {
-    mapView: {
-      type: Object,
-      default: () => []
-    }
-  },
-  data() {
-    return {
-      scale: undefined
-    }
-  },
-  watch: {
-    mapView: function(e) {
-      var that = this
-      var bar = document.getElementById('scale')
-      this.mapView.watch('resolution', function(e) {
-        // var nextNumber = parseInt(50 * e).toString();
-        // nextNumber =
-        //   Math.pow(10, nextNumber.length) *
-        //   (Number(nextNumber[0]) > 5 ? 1 : 0.5);
-        // bar.style.width = nextNumber / e + "px";
-        that.scale = that.mapView.scale
-        // nextNumber >= 1000 ? nextNumber / 1000 + "km" : nextNumber + "m";
-      })
-    }
-  }
-}
-</script>
-<style type="scss" scoped>
-#scale {
-  position: absolute;
-  bottom: 45px;
-  left: 30px;
-  /* border-bottom: 2px solid #323232;
-  border-left: 2px solid #323232;
-  border-right: 2px solid #323232; */
-  /* padding: 0 7px; */
-}
-</style>
-<style type="scss">
-.littleWidget {
-    font-size: 12px;
-    /* font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif; */
-    font-weight: 600;
-    color: #333;
-    white-space: nowrap;
-    background-color: rgba(255, 255, 255, 0.33);
-    line-height: 1.5em;
-    padding-left: 5px;
-    padding-right: 5px;
-}
-</style>

+ 0 - 610
src/views/zhpt/tongyonggongju/themMap/widget.vue

@@ -1,610 +0,0 @@
-<template>
-  <el-tabs v-loading="widgetLoading" v-model="activeName" ref="tabs" style="height:100%;">
-    <el-tab-pane class="i-scrollbar" label="图层设置" name="themShow" style="height:100%;">
-      <div style="width: 100%; height: 100%; padding: 5px">
-        <tf-legend class="legend_dept" label="专题地图图层名称" isopen="true" title="请输入专题图图层名称">
-          <el-input
-            v-model="themLayerName"
-            placeholder="请输入专题图图层名称"
-            clearable
-            maxlength="20"
-            show-word-limit
-          />
-        </tf-legend>
-        <tf-legend class="legend_dept" label="图层选择" isopen="true" title="选择将要进行查询的图层">
-          <el-select v-model="layerId" placeholder="请选择图层">
-            <el-option-group v-for="group in layerGroups" :key="group.label" :label="group.label">
-              <el-option
-                v-for="item in group.layers"
-                :key="item.label"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-option-group>
-          </el-select>
-        </tf-legend>
-        <tf-legend class="legend_dept" label="图层字段" isopen="true" title="请选择图层查询字段。">
-          <ul class="sqlQueryUl" style="height: 150px" v-loading="attLoading">
-            <li
-              v-for="(item, id) in analysisAtt"
-              :key="id"
-              @click="addText(item.value + ' ', item.value.length + 3, true)"
-            >
-              {{ item.label }}
-            </li>
-            <span style="color: #C0C4CC;letter-spacing: 1px;margin-left: 5px;" v-if="!analysisAtt.length">{{
-              layerId ? '图层无字段' : '请选择图层查询字段'
-            }}</span>
-          </ul>
-        </tf-legend>
-        <tf-legend
-          class="legend_dept"
-          label="构造查询语句"
-          isopen="true"
-          title="查询条件的计算逻辑,及图层属性字段对应的唯一值。"
-        >
-          <div style="width: 100%">
-            <div style="width: 130px; float: left">
-              <div style="margin-bottom: 3px">
-                <el-button size="mini" type="primary" plain @click="addText('= ', 2)" style="width:56px">=</el-button>
-                <el-button size="mini" type="primary" plain @click="addText('like \'%%\'', 7)" style="width:56px"
-                  >模糊</el-button
-                >
-              </div>
-              <div style="margin-bottom: 3px">
-                <el-button size="mini" type="primary" plain @click="addText('> ', 2)" style="width:56px">></el-button>
-                <el-button size="mini" type="primary" plain @click="addText('< ', 2)" style="width:56px"><</el-button>
-              </div>
-              <div style="margin-bottom: 3px">
-                <el-button size="mini" type="primary" plain @click="addText('or ', 3)" style="width:56px">或</el-button>
-                <el-button size="mini" type="primary" plain @click="addText('% ', 2)" style="width:56px"
-                  >占位</el-button
-                >
-              </div>
-              <div>
-                <el-button size="mini" type="primary" plain @click="addText('<> ', 3)" style="width:56px">≠</el-button>
-                <el-button size="mini" type="primary" plain @click="addText('and ', 4)" style="width:56px"
-                  >与</el-button
-                >
-              </div>
-            </div>
-            <div style="width: calc(100% - 130px); float: right">
-              <ul class="sqlQueryUl" style="height: 120px" v-loading="fixLoading">
-                <li v-for="(item, id) in layerFix" :key="id" @click="addText('\'' + item + '\' ', item.length + 3)">
-                  {{ item }}
-                </li>
-                <span style="color: #C0C4CC;letter-spacing: 1px;margin-left: 5px;" v-if="!layerFix.length"
-                  >请选择字段</span
-                >
-              </ul>
-            </div>
-          </div>
-        </tf-legend>
-        <tf-legend
-          class="legend_dept"
-          label="组合查询条件"
-          isopen="true"
-          style="clear: both"
-          title="选择字段、属性及构造语句组合成查询过滤的条件,通过构建的条件过滤数据。"
-        >
-          <el-input
-            v-model="queText"
-            ref="textBox"
-            type="textarea"
-            :rows="4"
-            placeholder="请输入查询过滤条件,如:OBJECTID > 0"
-          />
-          <label style="color: #409eff;display: flex;margin: 6px 0;font-size:14px;">{{ queTextName }}</label>
-          <el-row style="margin-top: 8px">
-            <el-col :span="5" style="float:right;">
-              <el-button size="mini" type="primary" @click="clearText">清空</el-button>
-            </el-col>
-          </el-row>
-        </tf-legend>
-        <tf-legend
-          class="legend_dept"
-          label="空间过滤条件"
-          isopen="true"
-          style="clear: both"
-          title="通过选择下面的条件,设置空间过滤条件进行查询。"
-        >
-          <el-row style="margin-bottom: 8px">
-            <el-col :span="6"><el-radio v-model="space" label="all" style="margin-right: 0;">全图</el-radio></el-col>
-            <el-col :span="8"
-              ><el-radio v-model="space" label="draw" style="margin-right: 0;">绘制范围</el-radio></el-col
-            >
-            <!-- <el-col :span="5"><el-radio v-model="space" label="TF_JSJS_REGION_B" style="margin-right: 0;">片区</el-radio></el-col>
-            <el-col :span="5"><el-radio v-model="space" label="TF_JSQT_DISTRICT_B">行政区</el-radio></el-col> -->
-          </el-row>
-          <el-select
-            v-if="['TF_JSQT_DISTRICT_B', 'TF_JSJS_REGION_B'].indexOf(space) > -1"
-            v-model="spaceSetting"
-            multiple
-            @visible-change="visibleChangeHandler"
-            @remove-tag="removeTagHandler"
-            placeholder="请选择"
-          >
-            <el-option
-              v-for="(item, index) in spaceSettings[space]"
-              :key="index"
-              :value="index"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-        </tf-legend>
-        <el-row style="margin-top: 8px">
-          <el-button size="mini" type="primary" style="width:100%" @click="showThemLayer" :disabled="analysisDisable">
-            <i v-if="analysisDisable" class="el-icon-loading" />添加并显示</el-button
-          >
-        </el-row>
-      </div>
-    </el-tab-pane>
-    <el-tab-pane label="图层列表" name="listShow" style="height:calc(100% - 40px);">
-      <div style="width: 100%; height: 100%; padding: 5px">
-        <tf-legend class="legend_dept" label="专题地图图层" isopen="true" title="当前为你创建的专题图。">
-          <el-table
-            @select="addLayer"
-            @select-all="addLayers"
-            ref="multipleTable"
-            :data="themLayerData"
-            tooltip-effect="dark"
-            max-height="400px"
-            style="width: 100%"
-          >
-            <template slot="empty">
-              <img src="@/assets/icon/null.png" alt="" />
-              <p class="empty-p">暂无数据</p>
-            </template>
-            <el-table-column type="selection" width="30"> </el-table-column>
-            <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
-            <el-table-column prop="mapName" label="名称" width="150" align="center"> </el-table-column>
-            <el-table-column prop="size" label="操作" align="center">
-              <template slot-scope="scope">
-                <el-link type="primary" @click="jump(scope.row)">跳转</el-link>
-              </template>
-            </el-table-column>
-          </el-table>
-          <el-row style="margin-top: 8px">
-            <el-col :span="20">
-              <el-pagination
-                ref="pagination"
-                small
-                background
-                layout="total, sizes, prev, next"
-                :page-size.sync="pageSize"
-                :current-page.sync="currentPage"
-                :page-sizes="[10, 20, 30, 50, 100, 1000]"
-                :total="total"
-                @current-change="updateThemLayerTable"
-                @size-change="updateThemLayerTable"
-              />
-            </el-col>
-          </el-row>
-          <el-button size="mini" type="primary" style="margin-top:5px;width:100%" @click="deleteSelectFeas"
-            >删除选中专题图</el-button
-          >
-        </tf-legend>
-      </div>
-    </el-tab-pane>
-  </el-tabs>
-</template>
-
-<script>
-import tfLegend from '@/views/zhpt/common/Legend'
-import { esriConfig, appconfig } from 'staticPub/config'
-import request from '@/utils/request'
-import app from '../../../../store/modules/app'
-import { SuperMap, FieldService, FeatureService, FieldParameters } from '@supermap/iclient-ol'
-
-import iDraw from '@/views/zhpt/common/mapUtil/draw'
-import iQuery from '@/views/zhpt/common/mapUtil/query'
-import GeoJSON from 'ol/format/GeoJSON'
-import { Vector as VectorSource } from 'ol/source'
-import { Vector as VectorLayer } from 'ol/layer'
-import { comSymbol } from '@/utils/comSymbol'
-import { Polygon, LineString, Point } from 'ol/geom'
-import * as turf from '@turf/turf'
-import { fieldDoc } from '@/views/zhpt/common/doc'
-import { getThemLayer, addThemLayer, deleteThemLayer } from '@/api/mainMap/themMap'
-import { mapUtil } from '../../common/mapUtil/common'
-
-export default {
-  name: 'ThemMap',
-  components: { tfLegend },
-  props: { data: Object },
-  data() {
-    return {
-      widgetLoading: true,
-      attLoading: false,
-      fixLoading: false,
-      activeName: 'themShow',
-
-      layerFix: [],
-      queText: '',
-      queTextName: '',
-      space: 'all',
-      spaceSetting: [],
-      spaceSettings: {},
-
-      analysisDisable: false,
-
-      //
-      themLayerName: '',
-      themLayerData: [],
-      layerId: '', // 图层名
-      analysisAtt: [], // 字段名
-      drawer: null, // 绘制器
-      limitFeature: null, // 绘制图形
-
-      pageSize: 30,
-      currentPage: 1,
-      total: 0,
-      layerBox: new Map(),
-      layerGroups: []
-    }
-  },
-  computed: {
-    sidePanelOn() {
-      return this.$store.state.map.P_editableTabsValue
-    }
-  },
-  watch: {
-    sidePanelOn(newTab, oldTab) {
-      console.log('图层变化')
-      if (newTab !== 'themMap') {
-        this.drawer && this.drawer.end()
-        this.drawer = null
-        // 删除专题图
-        this.removeLayer()
-      } else {
-      }
-    },
-    layerId(e) {
-      if (!e) return
-      mapUtil.getFields(e).then((res) => {
-        if (res) {
-          this.analysisAtt = res.map((field) => {
-            return { label: field.name, value: field.field }
-          })
-        } else this.$message.error('获取字段失败')
-      })
-    },
-    activeName(e) {},
-    space(value) {
-      this.drawer && this.drawer.end()
-      this.drawer = null
-      if (value === 'draw') {
-        this.drawer = new iDraw(this.mapView, 'polygon', {
-          endDrawCallBack: (featrue) => {
-            this.limitFeature = featrue
-            this.drawer.remove()
-          },
-          showCloser: false
-        })
-        this.drawer.start()
-      } else {
-        this.limitFeature = null
-      }
-    }
-  },
-  mounted() {
-    this.$refs.tabs.$el.children[0].style.background = '#fff'
-    this.init().then(() => (this.widgetLoading = false))
-    this.updateThemLayerTable()
-  },
-  methods: {
-    clearText() {
-      this.queText = ''
-      this.queTextName = ''
-    },
-    // 移除图层
-    removeLayer(layername) {
-      if (!layername) {
-        this.layerBox.forEach((value, key) => {
-          this.mapView.removeLayer(value.themLayer)
-          this.layerBox.delete(key)
-        })
-      } else {
-        let layer = this.layerBox.get(layername)
-        this.mapView.removeLayer(layer)
-      }
-    },
-    init() {
-      let [name, type] = appconfig.initLayers.split('&&')
-      let layer = mapUtil.getAllSubLayerNames(name, type)
-      // 设置图层
-      this.layerGroups = layer.sublayers.map((layer) => {
-        let layers = layer.sublayers.map((sub) => {
-          return { label: sub.title, value: sub.name.split('@')[0] }
-        })
-        return { label: layer.title, value: layer.name, layers }
-      })
-
-      var mapView = (this.mapView = this.data.mapView)
-      // 先跳出,后面的方法用 ol 重写
-      return Promise.resolve()
-    },
-
-    // ------------------------------
-    /**
-     * select下拉框出现或者隐藏时触发
-     *    add for tengmingxue 2022-1-21
-     * @param {boolean} evt true表示出现,false表示隐藏
-     *
-     */
-    visibleChangeHandler(evt) {
-      if (evt) return
-      let rings = []
-      let sp = this.spaceSetting
-      sp.forEach((item) => {
-        let ring = this.spaceSettings[this.space][item].rings
-        rings.push(...ring)
-      })
-      if (rings.length > 0) {
-        this.printRect.geometry = { type: 'polygon', rings: rings, spatialReference: this.mapView.spatialReference }
-        this.mapView.extent = this.printRect.geometry.extent
-      } else {
-        this.printRect.geometry = {
-          type: 'polygon',
-          rings: [[[0, 0]]],
-          spatialReference: this.mapView.spatialReference
-        }
-      }
-    },
-    /**
-     * select下拉框移出时触发
-     *    add for tengmingxue 2022-1-21
-     * @param {object}} tag 移出的值
-     *
-     */
-    removeTagHandler(tag) {
-      let rings = []
-      let sp = this.spaceSetting
-      sp.forEach((item) => {
-        let ring = this.spaceSettings[this.space][item].rings
-        rings.push(...ring)
-      })
-      if (rings.length > 0) {
-        this.printRect.geometry = { type: 'polygon', rings: rings, spatialReference: this.mapView.spatialReference }
-        this.mapView.extent = this.printRect.geometry.extent
-      } else {
-        this.printRect.geometry = {
-          type: 'polygon',
-          rings: [[[0, 0]]],
-          spatialReference: this.mapView.spatialReference
-        }
-      }
-    },
-
-    addText(text, length, isField) {
-      var myField = this.$refs.textBox.$el.children[0]
-      var startL = myField.selectionStart
-      this.languageChange(text, length, isField)
-      this.queText =
-        this.queText.substring(0, startL) + text + this.queText.substring(myField.selectionEnd, myField.value.length)
-      myField.blur()
-      setTimeout(() => {
-        myField.selectionStart = myField.selectionEnd = startL + length
-        myField.focus()
-      })
-      isField && this.getUniqueValue(text)
-    },
-    getUniqueValue(filed) {
-      console.log('获取唯一值')
-      mapUtil.getUniqueValue(this.layerId, filed.trim()).then((res) => {
-        if (res) {
-          this.layerFix = res
-        } else this.$message.error('获取唯一值失败')
-      })
-    },
-    languageChange(text, length, isField) {
-      if (isField) {
-        const field = this.analysisAtt.find((item) => item.value === text.replace(' ', ''))
-        const fname = field ? field.label : text
-        this.queTextName = this.queTextName + fname
-      } else {
-        if (text.indexOf('=') != -1) text = '等于'
-        if (text.indexOf('like') != -1) text = '中存在'
-        if (text.indexOf('>') != -1) text = '大于'
-        if (text.indexOf('<') != -1) text = '小于'
-        if (text.indexOf('<>') != -1) text = '不等于'
-        if (text.indexOf('and') != -1) text = '并且'
-        if (text.indexOf('or') != -1) text = '或者'
-        if (text.indexOf('%') != -1) text = '占位'
-        this.queTextName = this.queTextName + text
-      }
-    },
-
-    showThemLayer() {
-      if (!this.themLayerName) return this.$message.error('请输入专题图名称')
-      if (!this.queText) return this.$message.error('请选择专题图过滤条件')
-      if (this.space === 'draw' && !this.limitFeature) return this.$message.error('请先绘制范围')
-
-      this.analysisDisable = true
-      this.getThemLayer(this.limitFeature, this.layerId, this.queText).then((res) => {
-        if (res) {
-          let { themLayer, center } = res
-          this.layerBox.set(this.themLayerName, res)
-          this.mapView.addLayer(themLayer)
-          this.mapView.getView().setCenter(center)
-          this.mapView.getView().setZoom(15)
-        }
-      })
-      this.uploadThemLayer(this.limitFeature, this.queText)
-    },
-
-    // 添加
-    addLayer(row) {
-      if (row.length !== 0) {
-        let promises = row.map((item) => {
-          let { layerName, filterSql } = item
-          let limitFeature = null
-          if (item.rangeScope) {
-            limitFeature = new GeoJSON().readFeature(turf.polygon(JSON.parse(row.rangeValue)))
-          }
-          if (this.layerBox.has(layerName)) {
-            return null
-          } else {
-            return this.getThemLayer(limitFeature, layerName, filterSql)
-          }
-        })
-        Promise.all(promises).then((results) => {
-          results.forEach((res) => {
-            if (res) {
-              let { themLayer, center, layerName } = res
-              this.layerBox.set(layerName, res)
-              this.mapView.addLayer(themLayer)
-            }
-          })
-        })
-      } else {
-        this.removeLayer()
-      }
-    },
-
-    addLayers(row) {},
-
-    getThemLayer(limitFeature, layerName, sqlFilterStr) {
-      let themLayer = createThemLayer()
-      this.data.that.loading = true
-      this.data.that.loadText = '专题图显示中...'
-
-      let dataSetInfo = [{ name: layerName }]
-      let queryTask = new iQuery({ dataSetInfo })
-      return new Promise((resolve) => {
-        queryTask.sqlQuery(sqlFilterStr).then((resArr) => {
-          this.data.that.loading = false
-          if (!resArr) return this.$message.error('服务器请求失败!')
-
-          let featruesData = resArr.filter((item) => {
-            return item.result.featureCount !== 0
-          })
-          if (featruesData.length !== 0) {
-            featruesData.forEach((featrueObj) => {
-              let features = featrueObj.result.features.features
-              let themFeatures = features.map((feature) => new GeoJSON().readFeature(feature))
-              // 范围限制
-              if (limitFeature) {
-                themFeatures = themFeatures.filter((feature) => {
-                  let limitGeometry = turf.polygon(limitFeature.getGeometry().getCoordinates())
-                  let geomtry = feature.getGeometry(),
-                    inGeometry
-                  if (geomtry instanceof Point) {
-                    inGeometry = turf.point(geomtry.getCoordinates())
-                  } else if (geomtry instanceof LineString) {
-                    inGeometry = turf.lineString(geomtry.getCoordinates())
-                  } else return false
-                  return turf.booleanContains(limitGeometry, inGeometry)
-                })
-              }
-              //
-              themLayer.getSource().addFeatures(themFeatures)
-              let center = new mapUtil().getCenterFromFeatures(themFeatures)
-              resolve({ themLayer, center, layerName })
-            })
-          } else {
-            this.$message.success('无符合条件数据, 请检查查询语句是否正确')
-            resolve(null)
-          }
-        })
-      })
-
-      function createThemLayer() {
-        return new VectorLayer({
-          source: new VectorSource(),
-          style: comSymbol.getAllStyle(3, '#f40', 3, 'red')
-        })
-      }
-    },
-
-    // 上传专题图
-    uploadThemLayer(limitFeature, sqlFilterStr) {
-      let range = limitFeature ? limitFeature.getGeometry().getCoordinates() : appconfig.initCenter
-      let params = {
-        rangeValue: limitFeature ? JSON.stringify(range) : '',
-        rangeScope: limitFeature ? 1 : 0,
-        filterSql: sqlFilterStr,
-        mapName: this.themLayerName,
-        layerName: this.layerId,
-        userId: this.$store.state.user.userId
-      }
-      addThemLayer(params).then((res) => {
-        this.analysisDisable = false
-        if (res.code === 1) {
-          this.updateThemLayerTable()
-          this.$message.success('添加专题图:' + this.themLayerName + ' 成功!')
-        } else {
-          this.$message.success('保存专题图:' + this.themLayerName + ' 失败!')
-        }
-      })
-    },
-
-    updateThemLayerTable() {
-      let params = { size: this.pageSize, current: this.currentPage }
-      getThemLayer(params).then((res) => {
-        if (res.code === 1) {
-          this.total = res.result.total
-          this.themLayerData = res.result.records
-        }
-      })
-    },
-
-    deleteThemLayer(row) {
-      this.$confirm('确定删除"' + row.mapName + '"图层信息', '提示', {
-        distinguishCancelAndClose: true,
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then((_) => {
-        this.drawer && this.drawer.end()
-        deleteThemLayer(row.id).then((res) => {
-          if (res.code == 1) {
-            this.$message.success(`已删除 ${row.mapName} 专题图`)
-            this.updateThemLayerTable()
-          }
-        })
-      })
-    },
-
-    deleteSelectFeas() {
-      var selects = this.$refs.multipleTable.selection
-      if (selects.length !== 1) return this.$message('请选择一个专题图')
-      var view = this.mapView
-      this.$confirm('确定删除选中的 ' + selects.length + '个图层信息', '提示', {
-        distinguishCancelAndClose: true,
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then((_) => {
-        deleteThemLayer(selects[0].id).then((res) => {
-          console.log('删除')
-          if (res.code == 1) {
-            this.$message.success(`已删除 ${selects[0].mapName} 专题图`)
-            this.updateThemLayerTable()
-          }
-        })
-      })
-    },
-    // 跳转
-    jump(row) {
-      let { layerName, filterSql } = row
-      //
-      if (this.layerBox.has(layerName)) {
-        let { themLayer, center } = this.layerBox.get(layerName)
-        this.mapView.getView().setCenter(center)
-        this.mapView.getView().setZoom(15)
-      } else this.$message.warning('请先添加该图层')
-    }
-  },
-  destroyed() {
-    this.drawer && this.drawer.end()
-    this.drawer = null
-    this.removeLayer()
-  }
-}
-</script>
-<style lang="scss" scoped>
-@import '~@/styles/mixin.scss';
-.i-scrollbar {
-  overflow: auto;
-  @include scrollBar;
-}
-</style>

+ 6 - 24
tsconfig.json

@@ -14,31 +14,13 @@
     "allowSyntheticDefaultImports": true,
     "sourceMap": true,
     "baseUrl": ".",
-    "typeRoots": [
-      "./typings",
-      "./node_modules/@types"
-    ],
+    "typeRoots": ["./typings", "./node_modules/@types"],
     "resolveJsonModule": true,
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     },
-    "lib": [
-      "esnext",
-      "dom",
-      "dom.iterable",
-      "scripthost"
-    ]
+    "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
   },
-  "include": [
-    "src/**/*.ts",
-    "src/**/*.tsx",
-    "src/**/*.vue",
-    "tests/**/*.ts",
-    "tests/**/*.tsx",
-  ],
-  "exclude": [
-    "node_modules"
-  ]
-}
+  "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
+  "exclude": ["node_modules"]
+}

+ 3 - 2
vue.config.js

@@ -69,7 +69,7 @@ module.exports = {
   },
   css: {
     // 是否使用css分离插件 ExtractTextPlugin
-    extract: true,
+    // extract: true,
     // 开启 CSS source maps?
     sourceMap: true,
     // css预设器配置项
@@ -84,8 +84,9 @@ module.exports = {
     modules: false
   },
   configureWebpack: {
-    name: name,
+    name,
     resolve: {
+      extensions: ['.ts', '.js', '.vue', '.json'],
       alias: {
         '@': resolve('src'),
         staticPub: resolve('public')