@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,81 @@
|
|
|
1
|
+
// const demoCode = require("vuepress-plugin-demo-code");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
title: "ConfigUI",
|
|
5
|
+
dest: "dist-docs",
|
|
6
|
+
locales: {
|
|
7
|
+
"/": {
|
|
8
|
+
lang: "zh-CN",
|
|
9
|
+
title: "中地数码",
|
|
10
|
+
description: "@mapgis/mapgis-pan-spatial-map-widgets-config-ui"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
themeConfig: {
|
|
14
|
+
locales: {
|
|
15
|
+
"/": {
|
|
16
|
+
// 多语言下拉菜单的标题
|
|
17
|
+
selectText: "选择语言",
|
|
18
|
+
// 该语言在下拉菜单中的标签
|
|
19
|
+
label: "简体中文",
|
|
20
|
+
// 编辑链接文字
|
|
21
|
+
editLinkText: "在 GitHub 上编辑此页",
|
|
22
|
+
// Service Worker 的配置
|
|
23
|
+
serviceWorker: {
|
|
24
|
+
updatePopup: {
|
|
25
|
+
message: "发现新内容可用.",
|
|
26
|
+
buttonText: "刷新"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
// 当前 locale 的 algolia docsearch 选项
|
|
30
|
+
algolia: {},
|
|
31
|
+
nav: [
|
|
32
|
+
{
|
|
33
|
+
text: "向导",
|
|
34
|
+
link: "/guide/"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
text: "API",
|
|
38
|
+
link: "/api/common/MultiImgWithForm.md"
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
sidebar: [
|
|
42
|
+
{
|
|
43
|
+
title: "指南",
|
|
44
|
+
collapsable: false,
|
|
45
|
+
children: [
|
|
46
|
+
["/guide/", "快速上手"],
|
|
47
|
+
["/guide/publish.md", "发布流程"],
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: "API",
|
|
52
|
+
collapsable: false,
|
|
53
|
+
children: [
|
|
54
|
+
{
|
|
55
|
+
title: "公共组件",
|
|
56
|
+
collapsable: false
|
|
57
|
+
},
|
|
58
|
+
["/api/common/MultiImgWithForm.md", "多类别组件(带缩略图)"],
|
|
59
|
+
["/api/common/MultiTypeForm.md", "多类型表单组件"],
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
head: [
|
|
67
|
+
[
|
|
68
|
+
"script",
|
|
69
|
+
{ src: "https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js" }
|
|
70
|
+
],
|
|
71
|
+
["script", { src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" }]
|
|
72
|
+
],
|
|
73
|
+
plugins: [
|
|
74
|
+
[
|
|
75
|
+
"demo-code",
|
|
76
|
+
{
|
|
77
|
+
jsLibs: ["https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
]
|
|
81
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="163" height="200" viewBox="0 0 163 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M163 73.2769C162.805 146.266 81.7143 200 81.7143 200C81.7143 200 -0.195142 146.892 0.000292271 73.6636C0.108582 33.0876 36.7436 0.227932 81.6961 0.00125302C126.649 -0.225426 163.108 32.7009 163 73.2769ZM81.7143 166.861C81.7143 166.861 139.154 129.126 139.154 77.6847C139.154 49.0873 113.396 25.8202 81.7143 25.9048C50.0327 25.9894 24.2744 49.0873 24.2744 77.6848C24.2744 129.296 81.7143 166.861 81.7143 166.861Z" fill="#41B883"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M81.7143 200C81.7143 200 162.805 146.266 163 73.2769C163.108 32.7009 126.649 -0.225426 81.6961 0.00125302C36.7436 0.227932 0.108582 33.0876 0.000292271 73.6636C-0.195142 146.892 81.7143 200 81.7143 200ZM81.7143 166.861C81.7143 166.861 139.154 129.126 139.154 77.6847C139.154 49.0873 113.396 25.8202 81.7143 25.9048C50.0327 25.9894 24.2744 49.0873 24.2744 77.6848C24.2744 129.296 81.7143 166.861 81.7143 166.861Z" fill="#41B883"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M140 77.3929C139.861 129.58 82.1526 168 82.1526 168C82.1526 168 23.8612 130.028 24.0003 77.6694C24.0773 48.6576 50.1489 25.1629 82.1396 25.0008C114.13 24.8388 140.077 48.3811 140 77.3929ZM82.1526 144.306C82.1526 144.306 123.03 117.325 123.03 80.5445C123.03 60.0974 104.699 43.4614 82.1526 43.5219C59.6061 43.5823 41.2751 60.0974 41.2751 80.5445C41.2751 117.446 82.1526 144.306 82.1526 144.306Z" fill="#35495E"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M82.1526 168C82.1526 168 139.861 129.58 140 77.3929C140.077 48.3811 114.13 24.8388 82.1396 25.0008C50.1489 25.1629 24.0773 48.6576 24.0003 77.6694C23.8612 130.028 82.1526 168 82.1526 168ZM82.1526 144.306C82.1526 144.306 123.03 117.325 123.03 80.5445C123.03 60.0974 104.699 43.4614 82.1526 43.5219C59.6061 43.5823 41.2751 60.0974 41.2751 80.5445C41.2751 117.446 82.1526 144.306 82.1526 144.306Z" fill="#35495E"/>
|
|
6
|
+
<path d="M81.2756 114.551L90.5236 95.5236L109.551 86.2756L90.5236 77.0276L81.2756 58L72.0276 77.0276L53 86.2756L72.0276 95.5236L81.2756 114.551Z" fill="#41B883"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$contentWidth = 70vw;
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
home: true
|
|
3
|
+
heroImage: /logo.svg
|
|
4
|
+
actionText: 快速上手 →
|
|
5
|
+
actionLink: /guide/
|
|
6
|
+
# features:
|
|
7
|
+
# - title: 稳定
|
|
8
|
+
# details: 提炼自企业级中后台产品的交互语言和视觉风格。
|
|
9
|
+
|
|
10
|
+
# - title: 简单
|
|
11
|
+
# details: 开箱即用的高质量 Vue 组件。
|
|
12
|
+
|
|
13
|
+
# - title: Ant Design
|
|
14
|
+
# details: 共享Ant Design of React设计工具体系。
|
|
15
|
+
|
|
16
|
+
footer: MIT Licensed
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
::: warning
|
|
20
|
+
~ 快速提示,刚接触一定要看完指南部分和自定义插件部分。 熟悉后可以直接查看 API。
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
// main.js
|
|
25
|
+
import '@mapgis/mapgis-pan-spatial-map-widgets-config-ui/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.css'
|
|
26
|
+
|
|
27
|
+
import widgetsConfigUi from '@mapgis/mapgis-pan-spatial-map-widgets-config-ui'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
::: tip 目的
|
|
32
|
+
|
|
33
|
+
用于一张图前后台的微件配置UI组件
|
|
34
|
+
|
|
35
|
+
:::
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# 带缩略图的多类别展示——如底图管理
|
|
2
|
+
> multi-img-with-form
|
|
3
|
+
|
|
4
|
+
<img alt="多类别展示示例" src="../images/basemapConfigUI.png" width="100%">
|
|
5
|
+
|
|
6
|
+
## 何时使用
|
|
7
|
+
|
|
8
|
+
此组件适用于配置数组,且数组项中包含待展示的缩略图的情况;
|
|
9
|
+
|
|
10
|
+
组件提供对缩略图的展示,以及数组数据的增删改查。
|
|
11
|
+
|
|
12
|
+
## 1、组件引用示例
|
|
13
|
+
|
|
14
|
+
``` javascript
|
|
15
|
+
<template>
|
|
16
|
+
<multi-img-with-form
|
|
17
|
+
ref="multiImgWithForm"
|
|
18
|
+
:config="widgetConfig.baseMapList"
|
|
19
|
+
:baseApi="baseApi"
|
|
20
|
+
TitleLabel="name"
|
|
21
|
+
:imgWidth="200"
|
|
22
|
+
:imgHeight="133"
|
|
23
|
+
@editItem="editItem"
|
|
24
|
+
@deleteItem="deleteItem"
|
|
25
|
+
@addItem="addItem"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 2、参数说明
|
|
31
|
+
|
|
32
|
+
|参数|说明|是否必填|类型|默认值|
|
|
33
|
+
|:---|:---|:---|:---|:---|
|
|
34
|
+
|config|配置项|**必填项**|数组||
|
|
35
|
+
|baseApi|缩略图的基地址|可选项|字符串||
|
|
36
|
+
|TitleLabel|带展示标题对应的字段名|可选项|字符串|`'title'`|
|
|
37
|
+
|imgWidth|缩略图的宽度|可选项|数字|300|
|
|
38
|
+
|imgHeight|缩略图的高度|可选项|数字|180|
|
|
39
|
+
|@addItem|点击添加按钮的回调|可选项|函数型||
|
|
40
|
+
|@editItem|点击编辑按钮的回调|可选项|函数型||
|
|
41
|
+
|@deleteItem|点击删除按钮的回调|可选项|函数型||
|
|
42
|
+
|
|
43
|
+
## 3、示例代码
|
|
44
|
+
|
|
45
|
+
``` vue
|
|
46
|
+
<template>
|
|
47
|
+
<div>
|
|
48
|
+
<multi-img-with-form
|
|
49
|
+
ref="multiImgWithForm"
|
|
50
|
+
:config="widgetConfig.baseMapList"
|
|
51
|
+
:baseApi="baseApi"
|
|
52
|
+
TitleLabel="name"
|
|
53
|
+
:imgWidth="200"
|
|
54
|
+
:imgHeight="133"
|
|
55
|
+
@editItem="editItem"
|
|
56
|
+
@deleteItem="deleteItem"
|
|
57
|
+
@addItem="addItem"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script>
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: 'BasemapManagerSetting',
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
baseApi: '',
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
props: {
|
|
72
|
+
widgetConfig: Object
|
|
73
|
+
}
|
|
74
|
+
methods: {
|
|
75
|
+
editItem(index) {
|
|
76
|
+
console.log('编辑节点', index)
|
|
77
|
+
},
|
|
78
|
+
deleteItem(index) {
|
|
79
|
+
console.log('删除节点', index)
|
|
80
|
+
},
|
|
81
|
+
addItem() {
|
|
82
|
+
console.log('添加节点')
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
</script>
|
|
87
|
+
```
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# 多类型表单
|
|
2
|
+
> multi-type-form
|
|
3
|
+
|
|
4
|
+
<img alt="多类型表单示例" src="../images/comprehensiveQueryConfigUI.png" width="70%">
|
|
5
|
+
|
|
6
|
+
## 何时使用
|
|
7
|
+
|
|
8
|
+
此组件适用于多种类型的表单项展示。
|
|
9
|
+
|
|
10
|
+
## 1、组件引用示例
|
|
11
|
+
|
|
12
|
+
``` javascript
|
|
13
|
+
<template>
|
|
14
|
+
<multi-type-form
|
|
15
|
+
:layout="layout"
|
|
16
|
+
:labelCol="labelCol"
|
|
17
|
+
:wrapperCol="wrapperCol"
|
|
18
|
+
:DataModel="DataModel"
|
|
19
|
+
:DataSource="widgetConfig"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 2、参数说明
|
|
25
|
+
|
|
26
|
+
|参数|说明|是否必填|类型|默认值|
|
|
27
|
+
|:---|:---|:---|:---|:---|
|
|
28
|
+
|layout|表单布局|可选项|'horizontal'|'vertical'|'inline'|'horizontal' |
|
|
29
|
+
|labelCol|label 标签布局,设置`span` `offset`值,如`{span: 3, offset: 12}`或`sm: {span: 3, offset: 12}`|可选项|对象||
|
|
30
|
+
|wrapperCol|需要为输入控件设置布局样式时,使用该属性,用法同 labelCol|可选项|对象||
|
|
31
|
+
|DataModel|数据模板,涉及表单标签的展现形式;详见下方说明|可选项|数组||
|
|
32
|
+
|DataSource|表单数据|可选项|数组||
|
|
33
|
+
|
|
34
|
+
## 3、数据模板说明
|
|
35
|
+
|
|
36
|
+
|字段名|说明|适用类别|
|
|
37
|
+
|:---|:---|:---|
|
|
38
|
+
|name|对应表单数据的字段|所有类别|
|
|
39
|
+
|label|对应界面展示的表单项|所有类别|
|
|
40
|
+
|paramType|表单项类别,支持枚举型(ENUM)、数字型(NUMBER)、字符型(STRING)、布尔型(BOOLEAN)|-|
|
|
41
|
+
|enums|枚举项,用逗号隔开,例:'normal, result, cluster'|枚举型(ENUM)|
|
|
42
|
+
|selectLabel|枚举项的界面展示,用逗号隔开,例:'面板展示, 结果集展示, 聚合展示'|枚举型(ENUM)|
|
|
43
|
+
|disabled|枚举项中禁用项展示,数组类型,例:['result']|枚举型(ENUM)|
|
|
44
|
+
|
|
45
|
+
## 4、示例代码
|
|
46
|
+
|
|
47
|
+
``` vue
|
|
48
|
+
<template>
|
|
49
|
+
<div>
|
|
50
|
+
<multi-type-form
|
|
51
|
+
:layout="layout"
|
|
52
|
+
:labelCol="labelCol"
|
|
53
|
+
:wrapperCol="wrapperCol"
|
|
54
|
+
:DataModel="DataModel"
|
|
55
|
+
:DataSource="widgetConfig"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script>
|
|
61
|
+
const DataModel = [
|
|
62
|
+
{
|
|
63
|
+
name: 'ip',
|
|
64
|
+
label: '服务IP',
|
|
65
|
+
paramType: 'STRING', // 目前支持ENUM、NUMBER、STRING、BOOLEAN
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'port',
|
|
69
|
+
label: '端口',
|
|
70
|
+
paramType: 'STRING',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'combine',
|
|
74
|
+
label: '采用向前指针',
|
|
75
|
+
paramType: 'BOOLEAN',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'queryWay',
|
|
79
|
+
label: '查询方式',
|
|
80
|
+
paramType: 'ENUM',
|
|
81
|
+
enums: 'gdbp, doc',
|
|
82
|
+
disabled: ['doc']
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'showType',
|
|
86
|
+
label: '查询结果方式',
|
|
87
|
+
paramType: 'ENUM',
|
|
88
|
+
enums: 'normal, result, cluster',
|
|
89
|
+
selectLabel:'面板展示, 结果集展示, 聚合展示'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'clusterMaxCount',
|
|
93
|
+
label: '最大聚合数',
|
|
94
|
+
paramType: 'NUMBER',
|
|
95
|
+
},
|
|
96
|
+
]
|
|
97
|
+
export default {
|
|
98
|
+
name: 'ComprehensiveQuerySetting',
|
|
99
|
+
data() {
|
|
100
|
+
return {
|
|
101
|
+
layout: 'horizontal',
|
|
102
|
+
labelCol: { span: 3 },
|
|
103
|
+
wrapperCol: { span: 21 },
|
|
104
|
+
DataModel,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
props: {
|
|
108
|
+
widgetConfig: Object
|
|
109
|
+
}
|
|
110
|
+
methods: {},
|
|
111
|
+
};
|
|
112
|
+
</script>
|
|
113
|
+
```
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Config UI
|
|
2
|
+
|
|
3
|
+
这里是 Config UI 的 Vue 实现,开发和服务于企业级后台产品。
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## ES6 方式(外网)
|
|
7
|
+
|
|
8
|
+
使用 npm 或 yarn 安装
|
|
9
|
+
|
|
10
|
+
我们推荐使用 npm 或 yarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install @mapgis/mapgis-pan-spatial-map-widgets-config-ui --save
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
yarn add @mapgis/mapgis-pan-spatial-map-widgets-config-ui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)。
|
|
21
|
+
|
|
22
|
+
## 全局引入
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// main.js
|
|
26
|
+
import '@mapgis/mapgis-pan-spatial-map-widgets-config-ui/dist-libs/mapgis-pan-spatial-map-widgets-config-ui.css'
|
|
27
|
+
|
|
28
|
+
import widgetsConfigUi from '@mapgis/mapgis-pan-spatial-map-widgets-config-ui'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 基于内网仓库开发(内网)
|
|
32
|
+
|
|
33
|
+
内网仓库建议使用 yarn 安装
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm set registry http://192.168.11.130:4873/ (这里设置yarn的内部仓库源时需要先设置npm的内部,否则容易出问题)
|
|
37
|
+
yarn config set registry http://192.168.11.130:4873/
|
|
38
|
+
yarn add @mapgis/mapgis-pan-spatial-map-widgets-config-ui
|
|
39
|
+
# https://github.com/yarnpkg/yarn/issues/4862#issuecomment-368688262
|
|
40
|
+
# npm config set registry https://registry.npm.taobao.org // 还原回公网仓库
|
|
41
|
+
# yarn config set registry https://registry.npm.taobao.org // 还原回公网仓库
|
|
42
|
+
```
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# 发布流程——开发者
|
|
2
|
+
|
|
3
|
+
## 发布前的准备工作
|
|
4
|
+
|
|
5
|
+
1. 更新版本号,修改 package.json 中的版本号为最新版本
|
|
6
|
+
2. 将 package.json 中的部署包指向 dist-libs,可以删除"module"一行或将其改为"module1"
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
5 "main": "dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.min.js",
|
|
10
|
+
6 "module1": "src/index.js",
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
3. 发布前测试
|
|
14
|
+
> 发布前必须本地 yarn build 后生成临时的 dist-libs 替换应用层/测试层的 node_modules 下的 dist-libs 依赖后,保证能够测试程序运行成功才能进行 publish 操作
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 发布内网仓库
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
# 设置为mapgis内部源
|
|
21
|
+
npm set registry http://192.168.11.130:4873/
|
|
22
|
+
|
|
23
|
+
# 注册用户
|
|
24
|
+
npm adduser --registry http://192.168.11.130:4873/
|
|
25
|
+
|
|
26
|
+
# 查看用户
|
|
27
|
+
npm who am i
|
|
28
|
+
|
|
29
|
+
# 发布仓库 一定要在对应的发布库的根目录下发布
|
|
30
|
+
npm publish --registry http://192.168.11.130:4873/
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
::: tip 仓库过大无法发布
|
|
34
|
+
npm config set max_body_size 100mb --registry http://192.168.11.130:4873/
|
|
35
|
+
:::
|
|
36
|
+
|
|
37
|
+
## 发布外网仓库
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
# 一定要设置npm官方源,不能使用淘宝镜像源
|
|
41
|
+
npm set registry http://www.npmjs.org
|
|
42
|
+
|
|
43
|
+
# 查看当前所在源
|
|
44
|
+
npm config get registry
|
|
45
|
+
|
|
46
|
+
# 注册用户
|
|
47
|
+
npm adduser
|
|
48
|
+
|
|
49
|
+
# 登录
|
|
50
|
+
npm login
|
|
51
|
+
|
|
52
|
+
# 发布仓库
|
|
53
|
+
进入要发布的package.json所在的目录下,发布包(前提:npm账号属于mapgis组织)
|
|
54
|
+
npm publish --access public
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 使用 nrm 快速切换不同 npm 源
|
|
58
|
+
|
|
59
|
+
::: tip
|
|
60
|
+
在不同的 npm 源地址(如官方源、淘宝源或 mapgis 内部源)之间频繁切换较为繁琐,可以使用 nrm 进行切换与查看
|
|
61
|
+
:::
|
|
62
|
+
|
|
63
|
+
使用方式:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
下载nrm: npm install -g nrm
|
|
67
|
+
切换镜像源: nrm use 镜像名
|
|
68
|
+
查看可切换的镜像源: nrm ls(*表示正在使用的镜像源)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
使用示例
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
# npm set registry http://192.168.11.130:4873/
|
|
75
|
+
npm install -g nrm
|
|
76
|
+
nrm add mapgis http://192.168.11.130:4873/
|
|
77
|
+
nrm ls
|
|
78
|
+
nrm use mapgis
|
|
79
|
+
nrm ls
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| 查看可切换列表 | 使用 |
|
|
83
|
+
| :--------------------------- | :------------------------------- |
|
|
84
|
+
|  |  |
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mapgis/mapgis-pan-spatial-map-widgets-config-ui",
|
|
3
|
+
"version": "16.0.0",
|
|
4
|
+
"description": "中地数码一张图微件配置UI",
|
|
5
|
+
"main": "dist-libs/mapgis-pan-spatial-map-widgets-config-ui.umd.min.js",
|
|
6
|
+
"module1": "src/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "node --max_old_space_size=9960 ./node_modules/@vue/cli-service/bin/vue-cli-service build --target lib --name mapgis-pan-spatial-map-widgets-config-ui src/index.js",
|
|
9
|
+
"lint": "vue-cli-service lint",
|
|
10
|
+
"docs:dev": "vuepress dev docs",
|
|
11
|
+
"docs:build": "vuepress build docs"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@mapgis/webclient-vue-ui": "16.1.3",
|
|
15
|
+
"axios": "0.18.1",
|
|
16
|
+
"codemirror": "5.49.2",
|
|
17
|
+
"core-js": "^3.6.5",
|
|
18
|
+
"js-cookie": "2.2.0",
|
|
19
|
+
"jsonlint": "1.6.3",
|
|
20
|
+
"reqwest": "^2.0.5",
|
|
21
|
+
"v-contextmenu": "^2.9.0",
|
|
22
|
+
"vue": "^2.6.11",
|
|
23
|
+
"vue-class-component": "^7.2.3",
|
|
24
|
+
"vue-property-decorator": "^9.1.2",
|
|
25
|
+
"vue-runtime-helpers": "^1.1.2",
|
|
26
|
+
"vuex": "^3.4.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^2.17.0",
|
|
30
|
+
"@typescript-eslint/parser": "^2.17.0",
|
|
31
|
+
"@vue/cli-plugin-babel": "^4.4.0",
|
|
32
|
+
"@vue/cli-plugin-typescript": "^4.4.0",
|
|
33
|
+
"@vue/cli-plugin-vuex": "^4.4.0",
|
|
34
|
+
"@vue/cli-service": "^4.4.0",
|
|
35
|
+
"@vue/eslint-config-typescript": "^7.0.0",
|
|
36
|
+
"babel-eslint": "^10.1.0",
|
|
37
|
+
"eslint": "^6.7.2",
|
|
38
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
39
|
+
"less": "^3.12.2",
|
|
40
|
+
"less-loader": "^7.0.2",
|
|
41
|
+
"lint-staged": "^9.5.0",
|
|
42
|
+
"node-sass": "^4.11.0",
|
|
43
|
+
"sass-loader": "^10.1.1",
|
|
44
|
+
"script-loader": "0.7.2",
|
|
45
|
+
"typescript": "~3.7.0",
|
|
46
|
+
"vue-template-compiler": "^2.6.11",
|
|
47
|
+
"vuepress": "^1.9.7"
|
|
48
|
+
},
|
|
49
|
+
"gitHooks": {
|
|
50
|
+
"pre-commit": "lint-staged"
|
|
51
|
+
},
|
|
52
|
+
"lint-staged": {
|
|
53
|
+
"*.{js,jsx,vue,ts,tsx}": [
|
|
54
|
+
"vue-cli-service lint",
|
|
55
|
+
"git add"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
+
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>
|
|
12
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
+
</noscript>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<!-- built files will be auto injected -->
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|