@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.
- package/.browserslistrc +3 -0
- package/.env.production +5 -0
- package/.eslintignore +5 -0
- package/.eslintrc.js +18 -0
- package/README.md +24 -0
- package/babel.config.js +5 -0
- package/dist-libs/demo.html +10 -0
- package/dist-libs/fonts/ionicons.99ac3308.woff +0 -0
- package/dist-libs/fonts/ionicons.d535a25a.ttf +0 -0
- package/dist-libs/img/iconfont.573255ce.svg +36 -0
- package/dist-libs/img/image-icon.dd06d30b.dd06d30b.png +0 -0
- package/dist-libs/img/ionicons.17bf2ac0.svg +870 -0
- package/dist-libs/img/jsoneditor-icons.2b9b4872.2b9b4872.svg +749 -0
- package/dist-libs/img/plus.bdc6b5b1.bdc6b5b1.svg +1 -0
- package/dist-libs/img/text-icon.dd1b3d87.dd1b3d87.png +0 -0
- package/dist-libs/img/video-icon.499ddeb4.499ddeb4.png +0 -0
- package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.common.js +33467 -0
- package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.css +6 -0
- package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.js +33477 -0
- package/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.min.js +1183 -0
- package/docs/.vuepress/config.js +81 -0
- package/docs/.vuepress/public/favicon.ico +0 -0
- package/docs/.vuepress/public/logo.svg +7 -0
- package/docs/.vuepress/styles/palette.styl +1 -0
- package/docs/README.md +35 -0
- package/docs/api/common/MultiImgWithForm.md +87 -0
- package/docs/api/common/MultiTypeForm.md +113 -0
- package/docs/api/images/basemapConfigUI.png +0 -0
- package/docs/api/images/comprehensiveQueryConfigUI.png +0 -0
- package/docs/guide/README.md +42 -0
- package/docs/guide/publish.md +84 -0
- package/docs/guide/yarn/mapgis.png +0 -0
- package/docs/guide/yarn/use_mapgis.png +0 -0
- package/package.json +58 -0
- package/postcss.config.js +5 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/api/app/config.js +10 -0
- package/src/assets/iviewIcon/fonts/ionicons.svg +870 -0
- package/src/assets/iviewIcon/fonts/ionicons.ttf +0 -0
- package/src/assets/iviewIcon/fonts/ionicons.woff +0 -0
- package/src/assets/iviewIcon/iview.css +3461 -0
- package/src/assets/logo.png +0 -0
- package/src/components/BasemapManagerSetting/BasemapManagerSetting.vue +461 -0
- package/src/components/CityGrowSetting/CityGrowSetting.vue +145 -0
- package/src/components/CityGrowSetting/EditableCell.vue +103 -0
- package/src/components/CommonComponents/MultiImgWithForm/MultiImgWithForm.scss +106 -0
- package/src/components/CommonComponents/MultiImgWithForm/MultiImgWithForm.vue +128 -0
- package/src/components/CommonComponents/MultiTypeForm/MultiTypeForm.vue +78 -0
- package/src/components/CommonComponents/ServiceSelect/index.vue +325 -0
- package/src/components/ComprehensiveQuerySetting/ComprehensiveQuerySetting.vue +745 -0
- package/src/components/ComprehensiveQuerySetting/EditAttrs.vue +254 -0
- package/src/components/DataCatalogSetting/DataCatalogSetting.vue +71 -0
- package/src/components/DataCatalogSetting/components/DataSetting.vue +126 -0
- package/src/components/DataCatalogSetting/components/IconSetting.vue +160 -0
- package/src/components/DataCatalogSetting/components/NoSpatialSetting.vue +37 -0
- package/src/components/DataCatalogSetting/components/OtherSetting.vue +54 -0
- package/src/components/DataCatalogSetting/components/ParamSetting.vue +95 -0
- package/src/components/DataCatalogSetting/components/component/DataSourceSetting.vue +929 -0
- package/src/components/DataCatalogSetting/components/component/NodeDataSetting.vue +644 -0
- package/src/components/DataCatalogSetting/components/component/ServiceSelectWithData.vue +413 -0
- package/src/components/DataCatalogSetting/index.js +29 -0
- package/src/components/FeatureQuerySetting/FeatureQuerySetting.vue +121 -0
- package/src/components/KibanaVSetting/KibanaVSetting.vue +152 -0
- package/src/components/LegendSetting/LegendSetting.vue +85 -0
- package/src/components/MapDataVSetting/MapDataVSetting.vue +41 -0
- package/src/components/OverlayManagerSetting/OverlayManagerSetting.vue +248 -0
- package/src/components/ParticleEffectsSetting/ParticleEffectsSetting.vue +166 -0
- package/src/components/PlotManagerSetting/EditableCell.vue +103 -0
- package/src/components/PlotManagerSetting/PlotManagerSetting.vue +229 -0
- package/src/components/ThematicMapSetting/BaseConfigSetting.vue +76 -0
- package/src/components/ThematicMapSetting/SubjectConfigSetting.vue +346 -0
- package/src/components/ThematicMapSetting/ThematicMapSetting.vue +44 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/AnimationItems.vue +141 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/ColorPickerSetting.vue +260 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/common/EditableFieldTable.vue +187 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/BaseItems/index.vue +161 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/AttributeTable.vue +122 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/Common.vue +376 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/Popup.vue +138 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/StatisticGragh.vue +189 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/BaseMapWithGraph.vue +73 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/HeatMap.vue +124 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/HexBin.vue +100 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/Label.vue +139 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/StatisticLabel.vue +43 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/SubSectionMap.vue +42 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/components/SubjectStyles/index.vue +56 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.less +101 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.vue +236 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/index.less +22 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/index.vue +226 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/mixins/subject-styles-mixin.js +138 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/store/dep.js +21 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/store/fields.ts +111 -0
- package/src/components/ThematicMapSetting/ThematicMapSubjectList/index.vue +76 -0
- package/src/components/ThematicMapSetting/store/index.js +19 -0
- package/src/components/ThematicMapSetting/store/module/getters.js +28 -0
- package/src/components/ThematicMapSetting/store/module/index.js +53 -0
- package/src/components/ThematicMapSetting/store/module/mutations.js +272 -0
- package/src/components/ThematicMapSetting/store/module/state.js +36 -0
- package/src/components/ThematicMapSetting/store/types.js +0 -0
- package/src/components/WidgetSetting/WidgetJsonConfig.vue +28 -0
- package/src/components/WidgetSetting/components/JsonEditor/index.vue +77 -0
- package/src/components/WidgetSetting/widget-setting-mixin.js +22 -0
- package/src/components/index.js +17 -0
- package/src/index.js +63 -0
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vue.d.ts +4 -0
- package/src/store/index.ts +15 -0
- package/src/utils/auth.js +18 -0
- package/src/utils/normal-request.js +63 -0
- package/src/utils/request.js +92 -0
- package/src/utils/settings.js +50 -0
- package/src/utils/uuid.js +17 -0
- package/src/utils/validate.js +175 -0
- package/tsconfig.json +40 -0
- package/vue.config.js +13 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 聚合标注专题图 -->
|
|
3
|
+
<div class="cluster-label">
|
|
4
|
+
<mapgis-ui-row>
|
|
5
|
+
<mapgis-ui-col :span="12">
|
|
6
|
+
<mapgis-ui-row-flex label="最小半径" :label-width="72">
|
|
7
|
+
<mapgis-ui-input-number v-model="themeStyle.minSize" :min="1" />
|
|
8
|
+
</mapgis-ui-row-flex>
|
|
9
|
+
</mapgis-ui-col>
|
|
10
|
+
<mapgis-ui-col :span="12">
|
|
11
|
+
<mapgis-ui-row-flex label="最大半径" :label-width="72">
|
|
12
|
+
<mapgis-ui-input-number v-model="themeStyle.maxSize" :min="1" />
|
|
13
|
+
</mapgis-ui-row-flex>
|
|
14
|
+
</mapgis-ui-col>
|
|
15
|
+
</mapgis-ui-row>
|
|
16
|
+
<mapgis-ui-row>
|
|
17
|
+
<mapgis-ui-col :span="12">
|
|
18
|
+
<mapgis-ui-row-flex
|
|
19
|
+
:label-width="72"
|
|
20
|
+
label="聚合点数"
|
|
21
|
+
title="点数多于此值才会被聚合"
|
|
22
|
+
>
|
|
23
|
+
<mapgis-ui-input-number v-model="themeStyle.minPoints" :min="1" />
|
|
24
|
+
</mapgis-ui-row-flex>
|
|
25
|
+
</mapgis-ui-col>
|
|
26
|
+
<mapgis-ui-col :span="12">
|
|
27
|
+
<mapgis-ui-row-flex label="聚合级别" :label-width="72">
|
|
28
|
+
<mapgis-ui-input-number v-model="themeStyle.maxClusterZoom" :min="1" />
|
|
29
|
+
</mapgis-ui-row-flex>
|
|
30
|
+
</mapgis-ui-col>
|
|
31
|
+
</mapgis-ui-row>
|
|
32
|
+
<mapgis-ui-row>
|
|
33
|
+
<mapgis-ui-col :span="12">
|
|
34
|
+
<mapgis-ui-row-flex label="像素半径" :label-width="72">
|
|
35
|
+
<mapgis-ui-input-number v-model="themeStyle.clusterRadius" :min="1" />
|
|
36
|
+
</mapgis-ui-row-flex>
|
|
37
|
+
</mapgis-ui-col>
|
|
38
|
+
<mapgis-ui-col :span="12">
|
|
39
|
+
<mapgis-ui-row-flex
|
|
40
|
+
:label-width="72"
|
|
41
|
+
label="细腻程度"
|
|
42
|
+
title="细腻程度越高聚合后点越密集"
|
|
43
|
+
>
|
|
44
|
+
<mapgis-ui-input-number v-model="themeStyle.extent" :min="1" />
|
|
45
|
+
</mapgis-ui-row-flex>
|
|
46
|
+
</mapgis-ui-col>
|
|
47
|
+
</mapgis-ui-row>
|
|
48
|
+
<mapgis-ui-row>
|
|
49
|
+
<mapgis-ui-col :span="12">
|
|
50
|
+
<mapgis-ui-row-flex :label-width="72" label="透明度">
|
|
51
|
+
<mapgis-ui-input-number
|
|
52
|
+
v-model="themeStyle.globalAlpha"
|
|
53
|
+
:step="0.1"
|
|
54
|
+
:min="0.1"
|
|
55
|
+
:max="1"
|
|
56
|
+
/>
|
|
57
|
+
</mapgis-ui-row-flex>
|
|
58
|
+
</mapgis-ui-col>
|
|
59
|
+
<mapgis-ui-col :span="12">
|
|
60
|
+
<mapgis-ui-row-flex :label-width="72" label="渐变颜色">
|
|
61
|
+
<color-picker-setting v-model="themeStyle.gradient" />
|
|
62
|
+
</mapgis-ui-row-flex>
|
|
63
|
+
</mapgis-ui-col>
|
|
64
|
+
</mapgis-ui-row>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
<script lang="ts">
|
|
68
|
+
import ColorPickerSetting from '../../../../common/ColorPickerSetting.vue'
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
name: 'Label',
|
|
72
|
+
components: {
|
|
73
|
+
ColorPickerSetting
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
defaultThemeStyle: {
|
|
78
|
+
fillStyle: 'rgba(255, 50, 0, 1.0)',
|
|
79
|
+
size: 50 / 3 / 2, // 非聚合点的半径
|
|
80
|
+
minSize: 8, // 聚合点最小半径
|
|
81
|
+
maxSize: 31, // 聚合点最大半径
|
|
82
|
+
globalAlpha: 0.8, // 透明度
|
|
83
|
+
clusterRadius: 150, // 聚合像素半径
|
|
84
|
+
maxClusterZoom: 18, // 最大聚合的级别
|
|
85
|
+
maxZoom: 19, // 最大显示级别
|
|
86
|
+
minPoints: 5, // 最少聚合点数,点数多于此值才会被聚合
|
|
87
|
+
extent: 400, // 聚合的细腻程度,越高聚合后点越密集
|
|
88
|
+
label: {
|
|
89
|
+
// 聚合文本样式
|
|
90
|
+
show: true, // 是否显示
|
|
91
|
+
fillStyle: 'white'
|
|
92
|
+
},
|
|
93
|
+
gradient: {
|
|
94
|
+
// 聚合图标渐变色
|
|
95
|
+
0: '#1876d0',
|
|
96
|
+
0.5: '#bdbd0d',
|
|
97
|
+
1.0: 'rgb(255,0,0)'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
props: {
|
|
103
|
+
value: {
|
|
104
|
+
type: Object,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
watch: {
|
|
108
|
+
},
|
|
109
|
+
created() {
|
|
110
|
+
if (!this.value || !this.value.themeStyle) {
|
|
111
|
+
this.emitChange(this.defaultThemeStyle)
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
themeStyle: {
|
|
116
|
+
get: function () {
|
|
117
|
+
return (this.value && this.value.themeStyle) || this.defaultThemeStyle
|
|
118
|
+
},
|
|
119
|
+
set: function (nV) {
|
|
120
|
+
// this.emitChange(nV)
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
emitChange(themeStyle) {
|
|
126
|
+
this.$emit('change', { themeStyle })
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
</script>
|
|
132
|
+
<style lang="less" scoped>
|
|
133
|
+
.cluster-label {
|
|
134
|
+
padding: 8px;
|
|
135
|
+
.mapgis-ui-row-flex {
|
|
136
|
+
margin-bottom: 8px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 等级符号专题图 -->
|
|
3
|
+
<mapgis-ui-custom-panel ref="staticLabelForm" :options="options" @formChanged="formChanged"/>
|
|
4
|
+
</template>
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import SubjectStylesMixin from '../../../../mixins/subject-styles-mixin'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'StatisticLabel',
|
|
10
|
+
mixins: [SubjectStylesMixin],
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
mounted() {
|
|
16
|
+
this.customFormRef = this.$refs.staticLabelForm
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
options() {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
id: this.id,
|
|
23
|
+
type: 'MapgisUiThemeListSymbol',
|
|
24
|
+
props: {
|
|
25
|
+
size: 'small',
|
|
26
|
+
field: this.field,
|
|
27
|
+
dataSource: this.dataSource,
|
|
28
|
+
gradient: this.gradient,
|
|
29
|
+
radius: this.radius
|
|
30
|
+
},
|
|
31
|
+
customProps: {
|
|
32
|
+
showBorder: false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 分段专题图配置 -->
|
|
3
|
+
<mapgis-ui-custom-panel ref="rangeForm" :options="options" @formChanged="formChanged"/>
|
|
4
|
+
</template>
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import SubjectStylesMixin from '../../../../mixins/subject-styles-mixin'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'SubSectionMap',
|
|
10
|
+
mixins: [SubjectStylesMixin],
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
mounted() {
|
|
16
|
+
this.customFormRef = this.$refs.rangeForm
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
options() {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
id: this.id,
|
|
23
|
+
type: 'MapgisUiThemeList',
|
|
24
|
+
props: {
|
|
25
|
+
size: 'small',
|
|
26
|
+
field: this.field,
|
|
27
|
+
dataSource: this.dataSource,
|
|
28
|
+
gradient: this.gradient
|
|
29
|
+
},
|
|
30
|
+
customProps: {
|
|
31
|
+
showBorder: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="subjectType" v-model="subject" @change="onChange"/>
|
|
3
|
+
</template>
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import SubSectionMap from './SubSectionMap.vue' // 分段专题图
|
|
6
|
+
import BaseMapWithGraph from './BaseMapWithGraph.vue' // 统计专题图
|
|
7
|
+
import StatisticLabel from './StatisticLabel.vue' // 等级符号专题图
|
|
8
|
+
import Label from './Label.vue' // 聚合标注专题图
|
|
9
|
+
import HeatMap from './HeatMap.vue' // 热力图
|
|
10
|
+
import HexBin from './HexBin.vue' // 蜂窝图
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'SubjectStyles',
|
|
14
|
+
components: {
|
|
15
|
+
BaseMapWithGraph,
|
|
16
|
+
HeatMap,
|
|
17
|
+
HexBin,
|
|
18
|
+
Label,
|
|
19
|
+
StatisticLabel,
|
|
20
|
+
SubSectionMap
|
|
21
|
+
},
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
subjectType: {
|
|
28
|
+
type: String,
|
|
29
|
+
},
|
|
30
|
+
subjectConfig: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => {}
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
watch: {
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
subject: {
|
|
39
|
+
get: function () {
|
|
40
|
+
return this.subjectConfig
|
|
41
|
+
},
|
|
42
|
+
set: function (nV) {
|
|
43
|
+
this.$emit('change', nV)
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
onChange(data) {
|
|
49
|
+
console.warn('尝试发送', data)
|
|
50
|
+
this.$emit('change', data)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
</script>
|
|
56
|
+
<style lang="less" scoped></style>
|
package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.less
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@white: var(--white);
|
|
2
|
+
.subject-items {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-flow: column nowrap;
|
|
5
|
+
border: 1px solid var(--border-color-base);
|
|
6
|
+
|
|
7
|
+
&-time {
|
|
8
|
+
border: none;
|
|
9
|
+
&:hover,
|
|
10
|
+
&:focus {
|
|
11
|
+
box-shadow: none;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-head {
|
|
16
|
+
border-bottom: 1px solid var(--border-color-base);
|
|
17
|
+
padding: 0 2px 0 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-content {
|
|
21
|
+
flex: 1;
|
|
22
|
+
min-height: 260px;
|
|
23
|
+
max-height: 520px;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
// .scrollbar(2px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-empty {
|
|
29
|
+
padding: 32px 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-collapse.mapgis-ui-collapse {
|
|
33
|
+
border: none;
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
.mapgis-ui-collapse-header,
|
|
36
|
+
.mapgis-ui-collapse-item {
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
.mapgis-ui-collapse-arrow {
|
|
40
|
+
left: 8px !important;
|
|
41
|
+
}
|
|
42
|
+
.mapgis-ui-collapse-item {
|
|
43
|
+
.mapgis-ui-collapse-header {
|
|
44
|
+
border-left: 0px !important;
|
|
45
|
+
color: var(--text-color-secondary);
|
|
46
|
+
height: 25px;
|
|
47
|
+
line-height: 25px;
|
|
48
|
+
padding: 0 4px;
|
|
49
|
+
padding-left: 22px;
|
|
50
|
+
}
|
|
51
|
+
.mapgis-ui-collapse-content {
|
|
52
|
+
border-radius: 0;
|
|
53
|
+
}
|
|
54
|
+
.mapgis-ui-collapse-content-box {
|
|
55
|
+
max-height: 460px;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
padding: 8px;
|
|
58
|
+
// background: #f0f2f5;
|
|
59
|
+
// .scrollbar(2px);
|
|
60
|
+
}
|
|
61
|
+
&.mapgis-ui-collapse-item-active:last-of-type {
|
|
62
|
+
border-bottom: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
&-card.mapgis-ui-tabs.mapgis-ui-tabs-card {
|
|
67
|
+
.mapgis-ui-tabs-bar {
|
|
68
|
+
margin-bottom: 0;
|
|
69
|
+
// border-color: @white;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mapgis-ui-tabs-content {
|
|
73
|
+
min-height: 48px;
|
|
74
|
+
max-height: 208px;
|
|
75
|
+
overflow: auto;
|
|
76
|
+
// background: @white;
|
|
77
|
+
// .scrollbar(2px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mapgis-ui-tabs-tab {
|
|
81
|
+
border-color: transparent;
|
|
82
|
+
background: transparent;
|
|
83
|
+
&-active {
|
|
84
|
+
border-color: @white;
|
|
85
|
+
background: @white;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mapgis-ui-tabs-nav-container,
|
|
90
|
+
.mapgis-ui-tabs-tab,
|
|
91
|
+
.mapgis-ui-tabs-tab-active {
|
|
92
|
+
height: 30px !important;
|
|
93
|
+
line-height: 30px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.mapgis-ui-tabs-tab,
|
|
97
|
+
.mapgis-ui-tabs-tab-active {
|
|
98
|
+
padding: 0 4px !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
package/src/components/ThematicMapSetting/ThematicMapSubjectAdd/components/SubjectItems/index.vue
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="subject-items">
|
|
3
|
+
<!-- 设置面板头部 -->
|
|
4
|
+
<mapgis-ui-toolbar :bordered="false" class="subject-items-head">
|
|
5
|
+
<mapgis-ui-toolbar-title :has-padding="false">
|
|
6
|
+
专题图设置
|
|
7
|
+
</mapgis-ui-toolbar-title>
|
|
8
|
+
<mapgis-ui-toolbar-command-group>
|
|
9
|
+
<mapgis-ui-toolbar-command @click="add" title="新增" icon="mapgis-plus" />
|
|
10
|
+
<template v-if="configList.length">
|
|
11
|
+
<template v-if="!showCheckbox">
|
|
12
|
+
<mapgis-ui-toolbar-command @click="edit" title="编辑" icon="mapgis-edit-square" />
|
|
13
|
+
</template>
|
|
14
|
+
<template v-else>
|
|
15
|
+
<mapgis-ui-toolbar-command @click="remove" title="删除" icon="mapgis-delete" />
|
|
16
|
+
<mapgis-ui-toolbar-command @click="cancel" title="取消" icon="mapgis-close" />
|
|
17
|
+
</template>
|
|
18
|
+
</template>
|
|
19
|
+
</mapgis-ui-toolbar-command-group>
|
|
20
|
+
</mapgis-ui-toolbar>
|
|
21
|
+
<!-- 设置面板内容 -->
|
|
22
|
+
<div class="subject-items-content">
|
|
23
|
+
<mapgis-ui-empty class="subject-items-empty" v-if="!configList.length" />
|
|
24
|
+
<mapgis-ui-collapse
|
|
25
|
+
v-else
|
|
26
|
+
:defaultActiveKey="activePanel"
|
|
27
|
+
:accordion="true"
|
|
28
|
+
class="subject-items-collapse"
|
|
29
|
+
>
|
|
30
|
+
<mapgis-ui-collapse-panel v-for="(config, i) in configList" :key="i">
|
|
31
|
+
<!-- 年度/时间 -->
|
|
32
|
+
<mapgis-ui-row-flex
|
|
33
|
+
slot="header"
|
|
34
|
+
:span="panelHeaderSpan"
|
|
35
|
+
justify="space-between"
|
|
36
|
+
>
|
|
37
|
+
<mapgis-ui-input
|
|
38
|
+
slot="label"
|
|
39
|
+
@click.stop
|
|
40
|
+
@blur="timeBlur(config.time)"
|
|
41
|
+
v-model="config.time"
|
|
42
|
+
size="small"
|
|
43
|
+
placeholder="请输入年度/时间"
|
|
44
|
+
class="subject-items-time"
|
|
45
|
+
/>
|
|
46
|
+
<mapgis-ui-checkbox
|
|
47
|
+
@click.stop
|
|
48
|
+
@change="checked($event, config, i)"
|
|
49
|
+
v-show="showCheckbox"
|
|
50
|
+
:checked="config._checked"
|
|
51
|
+
/>
|
|
52
|
+
</mapgis-ui-row-flex>
|
|
53
|
+
<!-- 服务设置等公共设置项 -->
|
|
54
|
+
<common
|
|
55
|
+
@change="configChange($event, config)"
|
|
56
|
+
:subject-config="config"
|
|
57
|
+
/>
|
|
58
|
+
<!-- 样式、属性表、统计表、弹框配置 -->
|
|
59
|
+
<mapgis-ui-tabs type="card" size="small" class="subject-items-card">
|
|
60
|
+
<mapgis-ui-tab-pane
|
|
61
|
+
v-for="{ key, tab } in configTabList"
|
|
62
|
+
:key="key"
|
|
63
|
+
:tab="tab"
|
|
64
|
+
>
|
|
65
|
+
<component
|
|
66
|
+
@change="configChange($event, config)"
|
|
67
|
+
:subject-config="config"
|
|
68
|
+
:subject-type="subjectType"
|
|
69
|
+
:is="key"
|
|
70
|
+
/>
|
|
71
|
+
</mapgis-ui-tab-pane>
|
|
72
|
+
</mapgis-ui-tabs>
|
|
73
|
+
</mapgis-ui-collapse-panel>
|
|
74
|
+
</mapgis-ui-collapse>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
<script lang="ts">
|
|
79
|
+
import Common from './components/Common.vue'
|
|
80
|
+
import SubjectStyles from './components/SubjectStyles'
|
|
81
|
+
import AttributeTable from './components/AttributeTable.vue'
|
|
82
|
+
import StatisticGragh from './components/StatisticGragh.vue'
|
|
83
|
+
import Popup from './components/Popup.vue'
|
|
84
|
+
|
|
85
|
+
export default {
|
|
86
|
+
name: 'SubjectItems',
|
|
87
|
+
components: {
|
|
88
|
+
Common,
|
|
89
|
+
SubjectStyles,
|
|
90
|
+
AttributeTable,
|
|
91
|
+
StatisticGragh,
|
|
92
|
+
Popup
|
|
93
|
+
},
|
|
94
|
+
props: {
|
|
95
|
+
subjectType: {
|
|
96
|
+
type: String
|
|
97
|
+
},
|
|
98
|
+
value:{
|
|
99
|
+
type: Array,
|
|
100
|
+
default: () => []
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
data() {
|
|
104
|
+
return {
|
|
105
|
+
activePanel: '0',
|
|
106
|
+
showCheckbox: false,
|
|
107
|
+
checkedPanels: [],
|
|
108
|
+
configTabList: [
|
|
109
|
+
{
|
|
110
|
+
key: 'SubjectStyles',
|
|
111
|
+
tab: '样式配置'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: 'AttributeTable',
|
|
115
|
+
tab: '表格配置'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
key: 'StatisticGragh',
|
|
119
|
+
tab: '统计图配置'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: 'Popup',
|
|
123
|
+
tab: '弹框配置'
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
watch: {
|
|
129
|
+
},
|
|
130
|
+
computed: {
|
|
131
|
+
panelHeaderSpan() {
|
|
132
|
+
return this.showCheckbox ? [23, 1] : [24, 0]
|
|
133
|
+
},
|
|
134
|
+
configList: {
|
|
135
|
+
get: function () {
|
|
136
|
+
return this.value
|
|
137
|
+
},
|
|
138
|
+
set: function (config) {
|
|
139
|
+
this.$emit('input', config)
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
methods: {
|
|
144
|
+
/**
|
|
145
|
+
* 更新属性
|
|
146
|
+
*/
|
|
147
|
+
setProperties(source, target) {
|
|
148
|
+
for (const key in source) {
|
|
149
|
+
this.$set(target, key, source[key])
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 面板change
|
|
155
|
+
*/
|
|
156
|
+
panelChange(key) {
|
|
157
|
+
this.activePanel = key
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 专题配置change
|
|
162
|
+
*/
|
|
163
|
+
configChange(newConfig, config) {
|
|
164
|
+
this.setProperties(newConfig, config)
|
|
165
|
+
console.log('配置数据', { ...config })
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* 专题图年度输入失焦
|
|
170
|
+
*/
|
|
171
|
+
timeBlur(time) {
|
|
172
|
+
if (this.configList.filter(c => time && c.time === time).length > 1) {
|
|
173
|
+
this.$message.warning(
|
|
174
|
+
`存在相同的年度"${time}", 若继续保存,将会保存最新配置的年度`
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* 新增年度
|
|
181
|
+
*/
|
|
182
|
+
add() {
|
|
183
|
+
const node = {
|
|
184
|
+
time: '',
|
|
185
|
+
_checked: false
|
|
186
|
+
}
|
|
187
|
+
this.configList = this.configList.concat(node)
|
|
188
|
+
this.showCheckbox = false
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* 编辑
|
|
193
|
+
*/
|
|
194
|
+
edit() {
|
|
195
|
+
this.showCheckbox = !this.showCheckbox
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 移除年度
|
|
200
|
+
*/
|
|
201
|
+
remove() {
|
|
202
|
+
if (!this.checkedPanels.length) {
|
|
203
|
+
this.$message.warning('请选择需要删除的年度')
|
|
204
|
+
return
|
|
205
|
+
}
|
|
206
|
+
this.checkedPanels.forEach(index => this.configList.splice(index, 1))
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* 选中年度
|
|
211
|
+
*/
|
|
212
|
+
checked(e, config, index) {
|
|
213
|
+
e.stopPropagation()
|
|
214
|
+
const { checked } = e.target
|
|
215
|
+
this.$set(config, '_checked', checked)
|
|
216
|
+
if (checked) {
|
|
217
|
+
this.checkedPanels.push(index)
|
|
218
|
+
} else {
|
|
219
|
+
this.checkedPanels.splice(index, 1)
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* 取消选中年度
|
|
225
|
+
*/
|
|
226
|
+
cancel() {
|
|
227
|
+
this.showCheckbox = false
|
|
228
|
+
this.checkedPanels = []
|
|
229
|
+
this.configList.forEach(v => this.$set(v, '_checked', false))
|
|
230
|
+
},
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
</script>
|
|
234
|
+
<style lang="less">
|
|
235
|
+
@import './index.less';
|
|
236
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.thematic-map-subject-add {
|
|
2
|
+
// width: 500px;
|
|
3
|
+
height: calc(75vh - 186px);
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-flow: column nowrap;
|
|
7
|
+
.subject-add-content {
|
|
8
|
+
flex: 1;
|
|
9
|
+
padding: 12px;
|
|
10
|
+
}
|
|
11
|
+
.subject-add-save-btn {
|
|
12
|
+
border-top: 1px solid var(--border-color-split);
|
|
13
|
+
padding: 12px 0;
|
|
14
|
+
text-align: center;
|
|
15
|
+
button {
|
|
16
|
+
margin: 0 6px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.ant-select {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|