@mapgis/mapgis-pan-spatial-map-widgets-config-ui 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.browserslistrc +3 -0
  2. package/.env.production +5 -0
  3. package/.eslintignore +5 -0
  4. package/.eslintrc.js +18 -0
  5. package/README.md +24 -0
  6. package/babel.config.js +5 -0
  7. package/dist-libs/demo.html +10 -0
  8. package/dist-libs/fonts/ionicons.99ac3308.woff +0 -0
  9. package/dist-libs/fonts/ionicons.d535a25a.ttf +0 -0
  10. package/dist-libs/img/iconfont.573255ce.svg +36 -0
  11. package/dist-libs/img/image-icon.dd06d30b.dd06d30b.png +0 -0
  12. package/dist-libs/img/ionicons.17bf2ac0.svg +870 -0
  13. package/dist-libs/img/jsoneditor-icons.2b9b4872.2b9b4872.svg +749 -0
  14. package/dist-libs/img/plus.bdc6b5b1.bdc6b5b1.svg +1 -0
  15. package/dist-libs/img/text-icon.dd1b3d87.dd1b3d87.png +0 -0
  16. package/dist-libs/img/video-icon.499ddeb4.499ddeb4.png +0 -0
  17. package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.common.js +33467 -0
  18. package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.css +6 -0
  19. package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.js +33477 -0
  20. package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.min.js +1183 -0
  21. package/docs/.vuepress/config.js +81 -0
  22. package/docs/.vuepress/public/favicon.ico +0 -0
  23. package/docs/.vuepress/public/logo.svg +7 -0
  24. package/docs/.vuepress/styles/palette.styl +1 -0
  25. package/docs/README.md +35 -0
  26. package/docs/api/common/MultiImgWithForm.md +87 -0
  27. package/docs/api/common/MultiTypeForm.md +113 -0
  28. package/docs/api/images/basemapConfigUI.png +0 -0
  29. package/docs/api/images/comprehensiveQueryConfigUI.png +0 -0
  30. package/docs/guide/README.md +42 -0
  31. package/docs/guide/publish.md +84 -0
  32. package/docs/guide/yarn/mapgis.png +0 -0
  33. package/docs/guide/yarn/use_mapgis.png +0 -0
  34. package/package.json +58 -0
  35. package/postcss.config.js +5 -0
  36. package/public/favicon.ico +0 -0
  37. package/public/index.html +17 -0
  38. package/src/api/app/config.js +10 -0
  39. package/src/assets/iviewIcon/fonts/ionicons.svg +870 -0
  40. package/src/assets/iviewIcon/fonts/ionicons.ttf +0 -0
  41. package/src/assets/iviewIcon/fonts/ionicons.woff +0 -0
  42. package/src/assets/iviewIcon/iview.css +3461 -0
  43. package/src/assets/logo.png +0 -0
  44. package/src/components/BasemapManagerSetting/BasemapManagerSetting.vue +461 -0
  45. package/src/components/CityGrowSetting/CityGrowSetting.vue +145 -0
  46. package/src/components/CityGrowSetting/EditableCell.vue +103 -0
  47. package/src/components/CommonComponents/MultiImgWithForm/MultiImgWithForm.scss +106 -0
  48. package/src/components/CommonComponents/MultiImgWithForm/MultiImgWithForm.vue +128 -0
  49. package/src/components/CommonComponents/MultiTypeForm/MultiTypeForm.vue +78 -0
  50. package/src/components/CommonComponents/ServiceSelect/index.vue +325 -0
  51. package/src/components/ComprehensiveQuerySetting/ComprehensiveQuerySetting.vue +745 -0
  52. package/src/components/ComprehensiveQuerySetting/EditAttrs.vue +254 -0
  53. package/src/components/DataCatalogSetting/DataCatalogSetting.vue +71 -0
  54. package/src/components/DataCatalogSetting/components/DataSetting.vue +126 -0
  55. package/src/components/DataCatalogSetting/components/IconSetting.vue +160 -0
  56. package/src/components/DataCatalogSetting/components/NoSpatialSetting.vue +37 -0
  57. package/src/components/DataCatalogSetting/components/OtherSetting.vue +54 -0
  58. package/src/components/DataCatalogSetting/components/ParamSetting.vue +95 -0
  59. package/src/components/DataCatalogSetting/components/component/DataSourceSetting.vue +929 -0
  60. package/src/components/DataCatalogSetting/components/component/NodeDataSetting.vue +644 -0
  61. package/src/components/DataCatalogSetting/components/component/ServiceSelectWithData.vue +413 -0
  62. package/src/components/DataCatalogSetting/index.js +29 -0
  63. package/src/components/FeatureQuerySetting/FeatureQuerySetting.vue +121 -0
  64. package/src/components/KibanaVSetting/KibanaVSetting.vue +152 -0
  65. package/src/components/LegendSetting/LegendSetting.vue +85 -0
  66. package/src/components/MapDataVSetting/MapDataVSetting.vue +41 -0
  67. package/src/components/OverlayManagerSetting/OverlayManagerSetting.vue +248 -0
  68. package/src/components/ParticleEffectsSetting/ParticleEffectsSetting.vue +166 -0
  69. package/src/components/PlotManagerSetting/EditableCell.vue +103 -0
  70. package/src/components/PlotManagerSetting/PlotManagerSetting.vue +229 -0
  71. package/src/components/ThematicMapSetting/BaseConfigSetting.vue +76 -0
  72. package/src/components/ThematicMapSetting/SubjectConfigSetting.vue +346 -0
  73. package/src/components/ThematicMapSetting/ThematicMapSetting.vue +44 -0
  74. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/AnimationItems.vue +141 -0
  75. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/ColorPickerSetting.vue +260 -0
  76. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/EditableFieldTable.vue +187 -0
  77. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/BaseItems/index.vue +161 -0
  78. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/AttributeTable.vue +122 -0
  79. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/Common.vue +376 -0
  80. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/Popup.vue +138 -0
  81. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/StatisticGragh.vue +189 -0
  82. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/BaseMapWithGraph.vue +73 -0
  83. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/HeatMap.vue +124 -0
  84. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/HexBin.vue +100 -0
  85. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/Label.vue +139 -0
  86. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/StatisticLabel.vue +43 -0
  87. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/SubSectionMap.vue +42 -0
  88. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/index.vue +56 -0
  89. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.less +101 -0
  90. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.vue +236 -0
  91. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/index.less +22 -0
  92. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/index.vue +226 -0
  93. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/mixins/subject-styles-mixin.js +138 -0
  94. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/store/dep.js +21 -0
  95. package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/store/fields.ts +111 -0
  96. package/src/components/ThematicMapSetting/ThematicMapSubjectList/index.vue +76 -0
  97. package/src/components/ThematicMapSetting/store/index.js +19 -0
  98. package/src/components/ThematicMapSetting/store/module/getters.js +28 -0
  99. package/src/components/ThematicMapSetting/store/module/index.js +53 -0
  100. package/src/components/ThematicMapSetting/store/module/mutations.js +272 -0
  101. package/src/components/ThematicMapSetting/store/module/state.js +36 -0
  102. package/src/components/ThematicMapSetting/store/types.js +0 -0
  103. package/src/components/WidgetSetting/WidgetJsonConfig.vue +28 -0
  104. package/src/components/WidgetSetting/components/JsonEditor/index.vue +77 -0
  105. package/src/components/WidgetSetting/widget-setting-mixin.js +22 -0
  106. package/src/components/index.js +17 -0
  107. package/src/index.js +63 -0
  108. package/src/shims-tsx.d.ts +13 -0
  109. package/src/shims-vue.d.ts +4 -0
  110. package/src/store/index.ts +15 -0
  111. package/src/utils/auth.js +18 -0
  112. package/src/utils/normal-request.js +63 -0
  113. package/src/utils/request.js +92 -0
  114. package/src/utils/settings.js +50 -0
  115. package/src/utils/uuid.js +17 -0
  116. package/src/utils/validate.js +175 -0
  117. package/tsconfig.json +40 -0
  118. package/vue.config.js +13 -0
@@ -0,0 +1,226 @@
1
+ <template>
2
+ <div class="thematic-map-subject-add">
3
+ <div class="subject-add-content">
4
+ <!-- 基础配置 -->
5
+ <base-items
6
+ v-model="subjectNodeBase"
7
+ :subjectClassify="subjectClassify"
8
+ @handleChangeSubjectType="handleChangeSubjectType"
9
+ @input="changeBaseItems"/>
10
+ <!-- 主题配置 -->
11
+ <subject-items
12
+ v-show="subjectType"
13
+ v-model="subjectNodeConfig"
14
+ :subject-type="subjectType"
15
+ @input="changeSubjectItems"
16
+ />
17
+ </div>
18
+ <!-- 取消\保存按钮 -->
19
+ <!-- <div class="subject-add-save-btn">
20
+ <mapgis-ui-button @click="onCancel">取消</mapgis-ui-button>
21
+ <mapgis-ui-button type="primary" @click="onSave">保存</mapgis-ui-button>
22
+ </div> -->
23
+ </div>
24
+ </template>
25
+ <script lang="ts">
26
+ // import { UUID } from '@mapgis/web-app-framework'
27
+ // import _uniqBy from 'lodash/uniqBy'
28
+ // import {
29
+ // mapGetters,
30
+ // mapMutations,
31
+ // ModuleType,
32
+ // ISubjectType,
33
+ // INewSubjectConfig,
34
+ // ISubjectConfigNode
35
+ // } from '../store'
36
+ import BaseItems from './components/BaseItems'
37
+ import SubjectItems from './components/SubjectItems'
38
+ // import dep from './store/dep'
39
+
40
+ export default {
41
+ name: 'ThematicMapSubjectAdd',
42
+ components: {
43
+ BaseItems,
44
+ SubjectItems,
45
+ },
46
+ data() {
47
+ return {
48
+ subjectNodeBase: {},
49
+ subjectNodeConfig: [],
50
+ }
51
+ },
52
+ props: {
53
+ node: {
54
+ type: Object,
55
+ default: () => {}
56
+ },
57
+ subjectClassify: {
58
+ type: String,
59
+ default: ''
60
+ },
61
+ },
62
+ watch: {
63
+ node: {
64
+ handler({ config, ...others }) {
65
+ this.subjectNodeBase = others
66
+ this.subjectNodeConfig = config
67
+ },
68
+ deep: true,
69
+ immediate: true,
70
+ },
71
+ },
72
+ computed: {
73
+ // ...mapGetters(['isVisible', 'subjectConfig']),
74
+ // visible: {
75
+ // get: function () {
76
+ // return this.isVisible(ModuleType.CREATE)
77
+ // },
78
+ // set: function (nV) {
79
+ // if (!nV) {
80
+ // this.resetVisible(ModuleType.CREATE)
81
+ // }
82
+ // }
83
+ // },
84
+ // parentTitle () {
85
+ // return this.subjectNodeBase.parentTitle
86
+ // },
87
+ subjectType () {
88
+ return this.subjectNodeBase.type
89
+ }
90
+ },
91
+ methods: {
92
+ /**
93
+ * 基础配置实时更新
94
+ */
95
+ changeBaseItems(item) {
96
+ this.node.id = item.id
97
+ this.node.title = item.title
98
+ this.node.type = item.type
99
+ },
100
+ /**
101
+ * 专题项配置实时更新
102
+ */
103
+ changeSubjectItems(config) {
104
+ this.node.config = config
105
+ },
106
+
107
+ /**
108
+ * 切换专题图类型的回调
109
+ */
110
+ handleChangeSubjectType() {
111
+ this.node.config.forEach(item => {
112
+ this.$delete(item, 'themeStyle')
113
+ this.$delete(item, 'graphType')
114
+ })
115
+ },
116
+
117
+ // ...mapMutations(['resetVisible', 'updateSubjectConfig']),
118
+
119
+ // /**
120
+ // * 添加节点
121
+ // */
122
+ // addNodeToTreeNode(tree, node) {
123
+ // return tree.map(item => {
124
+ // if (item.id === node.parentId) {
125
+ // if (item.children && item.children.length) {
126
+ // const index = item.children.findIndex(({ id }) => id === node.id)
127
+ // if (index !== -1) {
128
+ // item.children.splice(index, 1, node)
129
+ // } else {
130
+ // item.children.push(node)
131
+ // }
132
+ // } else {
133
+ // item.children = [node]
134
+ // }
135
+ // } else if (item.children && item.children.length) {
136
+ // this.addNodeToTreeNode(item.children, node)
137
+ // }
138
+ // return item
139
+ // })
140
+ // },
141
+
142
+ // /**
143
+ // * 添加根级节点
144
+ // */
145
+ // addNodeToTreeRoot(tree, node) {
146
+ // const parentId = `root-${UUID.uuid()}`
147
+ // const rootNode = {
148
+ // id: parentId,
149
+ // title: node.parentTitle,
150
+ // nodeType: 'panel',
151
+ // visible: true,
152
+ // children: [{ ...node, parentId }]
153
+ // }
154
+ // return [...tree, rootNode]
155
+ // },
156
+
157
+ // /**
158
+ // * 创建专题节点
159
+ // * 如果没有指定的parentId,则自创建一个分类节点并挂载新建的专题图;
160
+ // * 如果指定parentId, 则直接挂载至指定的节点
161
+ // */
162
+ // createSubjectConfigNode(node) {
163
+ // let config = this.subjectConfig
164
+ // if (!node.parentId) {
165
+ // config = this.addNodeToTreeRoot(config, node)
166
+ // } else {
167
+ // config = this.addNodeToTreeNode(config, node)
168
+ // }
169
+ // this.updateSubjectConfig(config)
170
+ // .then(() => {
171
+ // this.$message.success('保存成功')
172
+ // this.onCancel()
173
+ // })
174
+ // .catch(err => {
175
+ // this.$message.error('保存失败')
176
+ // })
177
+ // },
178
+
179
+ /**
180
+ * 取消
181
+ */
182
+ onCancel() {
183
+ this.subjectNodeBase = {}
184
+ this.subjectNodeConfig = []
185
+ },
186
+
187
+ /**
188
+ * 保存
189
+ */
190
+ onSave() {
191
+ // if (!this.parentTitle) {
192
+ // this.$message.warning('请填写或选择专题分类')
193
+ // } else if (!this.subjectType) {
194
+ // this.$message.warning('请选择专题类型')
195
+ // } else if (!this.subjectNodeConfig.length) {
196
+ // this.$message.warning('请填写专题配置')
197
+ // } else {
198
+ // const subjectStyleComps = dep.getSub() // 获取专题图样式配置组件
199
+ // let configs = _uniqBy(this.subjectNodeConfig, ({ time }) => time)
200
+ // const { type } = this.subjectNodeBase
201
+ // if (type === 'SubSectionMap' || type === 'StatisticLabel') {
202
+ // // 分段专题图\等级符号专题图
203
+ // if (subjectStyleComps.length >= configs.length) {
204
+ // configs = configs.map((c, i) => ({
205
+ // ...c,
206
+ // themeStyle: {
207
+ // styleGroups: subjectStyleComps[i].getFormResult().themeStyle[
208
+ // subjectStyleComps[i].id
209
+ // ] // 获取样式配置结果
210
+ // }
211
+ // }))
212
+ // }
213
+ // }
214
+ // this.createSubjectConfigNode({
215
+ // ...this.subjectNodeBase,
216
+ // config: configs
217
+ // })
218
+ // }
219
+ },
220
+ },
221
+ }
222
+
223
+ </script>
224
+ <style lang="less">
225
+ @import './index.less';
226
+ </style>
@@ -0,0 +1,138 @@
1
+ import { uuid } from '../../../../utils/uuid'
2
+ import dep from '../store/dep'
3
+ // import fieldInstance from '../store/fields'
4
+ const mockData = {
5
+ type: 'FeatureCollection',
6
+ dataCount: 2,
7
+ features: [
8
+ {
9
+ type: 'Feature',
10
+ properties: {
11
+ fid: 1,
12
+ AREA: 0,
13
+ }
14
+ },
15
+ {
16
+ type: 'Feature',
17
+ properties: {
18
+ fid: 2,
19
+ AREA: 1,
20
+ }
21
+ },
22
+ ],
23
+ }
24
+ // 初始化gradient、radius
25
+ const gradient = '#D53E4F,#FB8D59,#FEE08B,#FFFFBF,#E6F598,#99D594,#3288BD'
26
+ const radius = 4
27
+
28
+ export default {
29
+ name: 'SubjectStylesMixin',
30
+ data() {
31
+ return {
32
+ id: uuid(),
33
+ customFormRef: null, // 主组件赋值
34
+ dataSource: null,
35
+ gradient,
36
+ radius
37
+ }
38
+ },
39
+ props: {
40
+ value:{
41
+ type: Object,
42
+ }
43
+ },
44
+ watch: {
45
+ field: {
46
+ handler(nV) {
47
+ if (!this.themeStyle || !this.themeStyle.styleGroups || this.themeStyle.styleGroups.length<=0) {
48
+ this.dataSource = mockData
49
+ this.$nextTick(()=>{
50
+ this.formChanged()
51
+ })
52
+ }
53
+ // this.dataSource = mockData // 目前field变化不做任何操作;后期改为发请求获取的话就不需要mockData了
54
+ // todo:待补充:field变化时,重新发请求获取数值列表
55
+ // fieldInstance
56
+ // .getFieldGeoJson({
57
+ // fields: nV,
58
+ // ...this.value
59
+ // })
60
+ // .then(geojson => (this.dataSource = geojson))
61
+ },
62
+ // immediate: true
63
+ },
64
+ themeStyle: {
65
+ handler(nV) {
66
+ if (nV && nV.styleGroups && nV.styleGroups.length > 0) {
67
+ this.setGradient(nV.styleGroups)
68
+ }
69
+ },
70
+ immediate: true
71
+ },
72
+ },
73
+ mounted() {
74
+ dep.addSub(this)
75
+ },
76
+
77
+ computed: {
78
+ field() {
79
+ return this.value.field
80
+ },
81
+ themeStyle() {
82
+ return this.value.themeStyle
83
+ },
84
+ // themeStyle: {
85
+ // get: function () {
86
+ // return this.value.themeStyle
87
+ // },
88
+ // set: function (nV) {
89
+ // this.$emit('change', {'themeStyle': nV})
90
+ // }
91
+ // },
92
+ },
93
+ methods: {
94
+ /**
95
+ * 保存时获取配置数据
96
+ * @param {string} [key='themeStyle'] key 保存的字段名
97
+ */
98
+ getFormResult(key = 'themeStyle') {
99
+ if (this.customFormRef) {
100
+ const result = {
101
+ [key]: {
102
+ 'styleGroups': this.customFormRef.$_getForm()[this.id]
103
+ }
104
+ }
105
+
106
+ return result
107
+ }
108
+ return {}
109
+ },
110
+
111
+ /**
112
+ * 将现有的颜色、区间传给组件
113
+ * @param {*} styleGroups
114
+ */
115
+ setGradient(styleGroups) {
116
+ this.gradient = ''
117
+ this.radius = []
118
+ this.dataSource = []
119
+ styleGroups.forEach(item => {
120
+ this.dataSource.push(item.end)
121
+ this.gradient = this.gradient + item.style.color + ','
122
+ this.radius.push(item.style.radius)
123
+ })
124
+ this.gradient = this.gradient.slice(0, -1)
125
+ },
126
+
127
+ /**
128
+ * 改变时的回调
129
+ */
130
+ formChanged() {
131
+ this.$emit('change', this.getFormResult())
132
+ }
133
+ },
134
+ beforeDestroy() {
135
+ dep.removeSub(this)
136
+ }
137
+ }
138
+
@@ -0,0 +1,21 @@
1
+ class Dep {
2
+ constructor(subs = []) {
3
+ this.subs = subs
4
+ }
5
+
6
+ getSub() {
7
+ return [...this.subs]
8
+ }
9
+
10
+ addSub(sub) {
11
+ this.subs.push(sub)
12
+ }
13
+
14
+ removeSub(sub) {
15
+ this.subs.splice(this.subs.indexOf(sub), 1)
16
+ }
17
+ }
18
+
19
+ const dep = new Dep()
20
+
21
+ export default dep
@@ -0,0 +1,111 @@
1
+ import { FeatureFormatType, featureQueryFn } from '../../../store'
2
+
3
+ interface QueryParams {
4
+ ip: string;
5
+ port: string;
6
+ gdbp: string;
7
+ docName: string;
8
+ layerName: string;
9
+ layerIndex: string;
10
+ fields?: string;
11
+ }
12
+
13
+ interface FieldInfosItem {
14
+ type: string;
15
+ alias: string;
16
+ value: string;
17
+ }
18
+
19
+ class Fields {
20
+ private isFetched = false
21
+
22
+ private fields: FieldInfosItem[] = []
23
+
24
+ /**
25
+ * 获取指定属性的GeoJSON数据
26
+ * @param {object} params 查询参数
27
+ * @returns GeoJSON | undefined
28
+ */
29
+ async getFieldGeoJson({
30
+ ip,
31
+ port,
32
+ gdbp,
33
+ docName,
34
+ layerName,
35
+ layerIndex,
36
+ fields
37
+ }: QueryParams) {
38
+ if (!fields) return
39
+ const geojson = await featureQueryFn({
40
+ ip,
41
+ port,
42
+ gdbp,
43
+ docName,
44
+ layerName,
45
+ layerIndex,
46
+ fields
47
+ })
48
+ return geojson
49
+ }
50
+
51
+ /**
52
+ * 获取属性列表数据
53
+ * @param {object} param0 查询参数
54
+ * @returns
55
+ */
56
+ async getFields(subjectConfig) {
57
+ if (!this.isFetched) {
58
+ this.fields = await this.fetchFields(subjectConfig)
59
+ this.isFetched = true
60
+ }
61
+ return this.fields
62
+ }
63
+
64
+ /**
65
+ * 请求属性列表数据
66
+ * @param {object} param0 查询参数
67
+ * @returns
68
+ */
69
+ async fetchFields({
70
+ ip,
71
+ port,
72
+ gdbp,
73
+ docName,
74
+ layerName,
75
+ layerIndex
76
+ }: QueryParams) {
77
+ const igsJson = await featureQueryFn(
78
+ {
79
+ ip,
80
+ port,
81
+ gdbp,
82
+ docName,
83
+ layerName,
84
+ layerIndex,
85
+ IncludeAttribute: false,
86
+ IncludeGeometry: false,
87
+ IncludeWebGraphic: false
88
+ },
89
+ FeatureFormatType.json
90
+ )
91
+ if (igsJson) {
92
+ const { FldName, FldType, FldAlias } = igsJson.AttStruct
93
+ return FldName.map((v: string, i: number) => ({
94
+ type: FldType[i],
95
+ alias: FldAlias[i] || v,
96
+ value: v
97
+ }))
98
+ }
99
+ return []
100
+ }
101
+
102
+ /**
103
+ * 清除缓存
104
+ */
105
+ clearFields() {
106
+ this.isFetched = false
107
+ this.fields = []
108
+ }
109
+ }
110
+
111
+ export default new Fields()
@@ -0,0 +1,76 @@
1
+ <template>
2
+ <div>
3
+ <mapgis-ui-form layout="horizontal" labelAlign="left" :labelCol="{span:6}" :wrapperCol="{span:18}">
4
+ <mapgis-ui-form-item label="所属类别">
5
+ <mapgis-ui-input
6
+ :value="subjectClassify || '<根节点>'"
7
+ disabled
8
+ />
9
+ </mapgis-ui-form-item>
10
+ <mapgis-ui-form-item :label="modifyType==='SubjectList'?'专题类别名称':'专题图名称'">
11
+ <mapgis-ui-input
12
+ v-model="title"
13
+ />
14
+ </mapgis-ui-form-item>
15
+ </mapgis-ui-form>
16
+ <!-- 取消\保存按钮 -->
17
+ <div class="subject-add-save-btn">
18
+ <mapgis-ui-button @click="onCancel">取消</mapgis-ui-button>
19
+ <mapgis-ui-button type="primary" @click="onSave">保存</mapgis-ui-button>
20
+ </div>
21
+ </div>
22
+ </template>
23
+ <script lang="ts">
24
+
25
+ export default {
26
+ name: 'ThematicMapSubjectList',
27
+ components: {
28
+ },
29
+ data() {
30
+ return {
31
+ title: this.nodeTitle
32
+ }
33
+ },
34
+ props: {
35
+ subjectClassify: {
36
+ type: String,
37
+ default: ''
38
+ },
39
+ nodeTitle: {
40
+ type: String,
41
+ default: ''
42
+ },
43
+ modifyType: {
44
+ type: String,
45
+ default: 'SubjectList'
46
+ },
47
+ },
48
+ watch: {
49
+ nodeTitle(next) {
50
+ this.title = next
51
+ }
52
+ },
53
+ computed: {
54
+ },
55
+ methods: {
56
+ onSave() {
57
+ this.$emit('changeSubjectListTitle', this.title)
58
+ },
59
+ onCancel() {
60
+ this.$emit('closeSubjectList')
61
+ }
62
+ },
63
+
64
+ }
65
+
66
+ </script>
67
+ <style scoped lang="less">
68
+ .subject-add-save-btn {
69
+ border-top: 1px solid var(--border-color-split);
70
+ padding: 12px 0;
71
+ text-align: center;
72
+ button {
73
+ margin: 0 6px;
74
+ }
75
+ }
76
+ </style>
@@ -0,0 +1,19 @@
1
+ // import thematicMapStore, { mapGetters, mapMutations } from './module'
2
+
3
+
4
+ // 专题图类型集合
5
+ const subjectTypeList = [
6
+ { value: 'SubSectionMap', label: '分段专题图' },
7
+ { value: 'BaseMapWithGraph', label: '统计专题图' },
8
+ { value: 'StatisticLabel', label: '等级符号专题图' },
9
+ { value: 'Label', label: '聚合标注专题图' },
10
+ { value: 'HeatMap', label: '热力图' },
11
+ { value: 'HexBin', label: '蜂窝图' }
12
+ ]
13
+
14
+ export {
15
+ subjectTypeList,
16
+ // thematicMapStore,
17
+ // mapGetters,
18
+ // mapMutations,
19
+ }
@@ -0,0 +1,28 @@
1
+ import Vue from 'vue'
2
+
3
+ const getters = {
4
+ // // 获取某个功能模块的开关状态
5
+ // isVisible: ({ modules }) => (t) => modules.includes(t),
6
+ // // 加载
7
+ // loading: (state) => state.loading,
8
+ // // 获取要素查询当前页数据
9
+ // pageGeojson: (state) => state.pageGeojson,
10
+ // // 获取选中专题对应年度的专题数据
11
+ // subjectData: (state) => state.subjectData,
12
+ // // 获取选中的专题
13
+ // selectedSubject: (state) => state.selectedSubject,
14
+ // // 获取选中的专题集合
15
+ // selectedSubjectList: (state) => state.selectedSubjectList,
16
+ // // 获取时间轴已选中的年度
17
+ // selectedSubjectTime: (state) => state.selectedSubjectTime,
18
+ // // 获取选中专题的年度列表
19
+ // selectedSubjectTimeList: (state) => state.selectedSubjectTimeList,
20
+ // 基础配置
21
+ baseConfig: (state) => state.baseConfig,
22
+ // 专题配置
23
+ subjectConfig: (state) => state.subjectConfig,
24
+ // // 图属联动项
25
+ // linkageFid: (state) => state.linkageFid
26
+ }
27
+
28
+ export default Vue.observable(getters)
@@ -0,0 +1,53 @@
1
+ import stateMap from './state'
2
+ import gettersMap from './getters'
3
+ import mutationsMap from './mutations'
4
+
5
+ class Store {
6
+ constructor({ state, getters, mutations }) {
7
+ this.state = state
8
+ this.getters = getters
9
+ this.mutations = mutations
10
+ }
11
+
12
+ commit = (funName, payload) => {
13
+ if (funName) {
14
+ this.mutations[funName](this, payload)
15
+ } else {
16
+ return false
17
+ }
18
+ }
19
+
20
+ // dispatch = (fun, params) => {}
21
+ }
22
+
23
+ const store = new Store({
24
+ state: stateMap,
25
+ getters: gettersMap,
26
+ mutations: mutationsMap
27
+ })
28
+
29
+ export const mapGetters = (arr) => {
30
+ return Object.entries(store.getters).reduce(
31
+ (obj, [fnName, fn]) => {
32
+ if (arr.includes(fnName)) {
33
+ obj[fnName] = () => fn(store.state)
34
+ }
35
+ return obj
36
+ },
37
+ {}
38
+ )
39
+ }
40
+
41
+ export const mapMutations = (arr) => {
42
+ return Object.entries(store.mutations).reduce(
43
+ (obj, [fnName, fn]) => {
44
+ if (arr.includes(fnName)) {
45
+ obj[fnName] = (payload) => fn(store, payload)
46
+ }
47
+ return obj
48
+ },
49
+ {}
50
+ )
51
+ }
52
+
53
+ export default store