gis-view-webgl2 0.1.2 → 0.1.4
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/README.md +21 -14
- package/dist/gis-view.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +421 -76
- package/dist/index.js +1 -1
- package/docs/AI/345/257/271/350/257/235/346/261/207/346/200/273.md +151 -0
- package/docs/GisView.md +4 -4
- package/docs/ai/06-/344/274/232/350/257/235/347/264/242/345/274/225/344/270/216/345/244/215/346/237/245/346/226/271/346/263/225.md +137 -0
- package/docs/api/index.html +23 -9
- package/docs/demos/ApiCoverageDemo.vue +644 -0
- package/docs/demos/ChannelDemo.vue +14 -12
- package/docs/demos/ClusterDemo.vue +251 -0
- package/docs/demos/CopyMergeDemo.vue +3 -4
- package/docs/demos/EventDemo.vue +3 -3
- package/docs/demos/ExtensionDemo.vue +69 -12
- package/docs/demos/GisViewDemo.vue +64 -8809
- package/docs/demos/SearchFilterDemo.vue +13 -11
- package/docs/demos/api-index.js +58 -47
- package/docs/demos/demos.js +34 -17
- package/docs/demos/gis-view-demo/GisViewDemoCardHeader.vue +29 -0
- package/docs/demos/gis-view-demo/GisViewDemoDialogs.vue +82 -0
- package/docs/demos/gis-view-demo/GisViewDemoFooter.vue +16 -0
- package/docs/demos/gis-view-demo/GisViewDemoHeading.vue +16 -0
- package/docs/demos/gis-view-demo/GisViewDemoPanelStack.vue +71 -0
- package/docs/demos/gis-view-demo/GisViewDemoStage.vue +219 -0
- package/docs/demos/gis-view-demo/demo.css +1230 -0
- package/docs/demos/gis-view-demo/demoContext.js +12 -0
- package/docs/demos/gis-view-demo/panels/DataPanels.vue +303 -0
- package/docs/demos/gis-view-demo/panels/OpsPanels.vue +174 -0
- package/docs/demos/gis-view-demo/panels/StylePanels.vue +561 -0
- package/docs/demos/gis-view-demo/panels/ViewPanels.vue +396 -0
- package/docs/demos/gis-view-demo/useGisViewDemo.js +6188 -0
- package/docs/format/07-/344/272/213/344/273/266/350/275/275/350/215/267/344/270/216/347/244/272/344/276/213/346/225/260/346/215/256.md +3 -2
- package/docs/index.html +41 -4
- package/docs/internals/16-03-/344/274/230/345/214/226/344/270/216/345/217/226/350/210/215-/344/270/213.md +1 -1
- package/docs/manual/02-/345/235/220/346/240/207/344/270/216/346/225/260/346/215/256.md +3 -2
- package/docs/manual/03-/351/205/215/347/275/256/351/241/271.md +104 -16
- package/docs/manual/04-/344/272/213/344/273/266/344/270/216/345/233/236/350/260/203.md +15 -14
- package/docs/manual/07-/346/214/207/351/222/210/344/270/216/350/246/201/347/264/240/347/274/226/350/276/221.md +40 -3
- package/docs/manual/08-/351/200/211/344/270/255/344/270/216/346/213/220/347/202/271.md +50 -3
- package/docs/manual/09-/351/200/232/351/201/223/344/270/216/345/244/232/345/233/236/347/272/277.md +6 -2
- package/docs/manual/10-/351/200/232/351/201/223/347/274/226/350/276/221/344/270/216/346/226/260/345/242/236.md +39 -7
- package/docs/manual/12-/346/240/207/347/255/276/344/270/216/350/243/205/351/245/260.md +13 -4
- package/docs/manual/13-/345/212/250/346/225/210/344/270/216/345/233/276/345/205/203.md +3 -0
- package/docs/manual/14-/350/247/206/345/233/276/344/270/216/347/255/233/351/200/211.md +121 -49
- package/docs/manual/15-/345/257/274/345/207/272/344/270/216/351/233/206/346/210/220.md +37 -3
- package/docs/manual/16-/345/256/236/344/276/213/346/226/271/346/263/225/346/200/273/350/241/250.md +17 -8
- package/docs/manual/17-/345/217/202/346/225/260/351/200/237/346/237/245.md +45 -25
- package/docs/manual/18-/351/200/220/346/226/271/346/263/225/347/244/272/344/276/213.md +91 -20
- package/docs/manual/19-/350/257/273/346/225/260/344/270/216/346/213/226/346/213/275/351/242/204/350/247/210.md +3 -3
- package/docs/manual/20-/346/200/247/350/203/275/344/270/216/345/244/247/346/225/260/346/215/256.md +25 -1
- package/docs/manual/21-/350/257/264/346/230/216/344/270/216/345/270/270/350/247/201/351/227/256/351/242/230.md +11 -8
- package/docs/steps/README.md +17 -11
- package/docs/steps/selftest-actions.html +3 -5
- package/docs/steps/selftest-demo.html +27 -18
- package/docs/steps/selftest-demos.html +409 -32
- package/docs/steps/selftest-docs.html +33 -4
- package/docs/steps/selftest-effects.html +200 -0
- package/docs/steps/selftest-features.html +603 -21
- package/docs/steps/selftest-labels.html +74 -0
- package/docs/steps/selftest-perf.html +293 -20
- package/docs/steps/selftest-scale.html +150 -29
- package/docs/steps/selftest-select.html +90 -0
- package/docs/steps/step-10-full.js +1 -1
- package/docs/steps/step-12-events.js +1 -1
- package/package.json +1 -1
|
@@ -48,10 +48,11 @@ let view = null
|
|
|
48
48
|
let requestSeq = 0
|
|
49
49
|
|
|
50
50
|
const SCOPES = [
|
|
51
|
-
{ id: 'all', label: '
|
|
51
|
+
{ id: 'all', label: '全部四类' },
|
|
52
52
|
{ id: 'points', label: '只看节点' },
|
|
53
53
|
{ id: 'lines', label: '只看线路' },
|
|
54
|
-
{ id: 'channels', label: '只看通道' }
|
|
54
|
+
{ id: 'channels', label: '只看通道' },
|
|
55
|
+
{ id: 'groups', label: '只看分组' }
|
|
55
56
|
]
|
|
56
57
|
const FIELD_MODES = [
|
|
57
58
|
{ id: 'all', label: '全部字段', fields: null },
|
|
@@ -64,6 +65,7 @@ const PRESETS = [
|
|
|
64
65
|
{ id: 'name', demo: 'search-filter-preset-name', label: '变电站(limit 3)', keyword: '变电站', scope: 'points', field: 'all', limit: 3 },
|
|
65
66
|
{ id: 'owner', demo: 'search-filter-preset-owner', label: '北城运检(props.owner)', keyword: '北城运检', scope: 'points', field: 'owner', limit: 10 },
|
|
66
67
|
{ id: 'channel', demo: 'search-filter-preset-channel', label: '甲通道(scope=channels)', keyword: '甲通道', scope: 'channels', field: 'all', limit: 10 },
|
|
68
|
+
{ id: 'group', demo: 'search-filter-preset-group', label: 'channel-a(scope=groups)', keyword: 'channel-a', scope: 'groups', field: 'all', limit: 10 },
|
|
67
69
|
{ id: 'symbol', demo: 'search-filter-preset-symbol', label: 'square(显式 symbol)', keyword: 'square', scope: 'points', field: 'symbol', limit: 10 }
|
|
68
70
|
]
|
|
69
71
|
const FILTERS = [
|
|
@@ -72,15 +74,15 @@ const FILTERS = [
|
|
|
72
74
|
{ id: 'zone', demo: 'search-filter-filter-zone', label: '分区 2 / 4', condition: { points: { zone_name: { in: ['分区 2', '分区 4'] } }, cascade: 'binding' } },
|
|
73
75
|
{ id: 'loading', demo: 'search-filter-filter-loading', label: '线路负载 ≥ 1', condition: { lines: { max_loading_rate: { gte: 1 } } } }
|
|
74
76
|
]
|
|
75
|
-
const KIND_LABELS = { point: '节点', line: '线路', channel: '通道' }
|
|
77
|
+
const KIND_LABELS = { point: '节点', line: '线路', channel: '通道', group: '分组' }
|
|
76
78
|
|
|
77
|
-
const scopeLabel = computed(() => SCOPES.find(item => item.id === scope.value)?.label ?? '
|
|
79
|
+
const scopeLabel = computed(() => SCOPES.find(item => item.id === scope.value)?.label ?? '全部四类')
|
|
78
80
|
const searchSummary = computed(() => {
|
|
79
81
|
const result = searchResult.value
|
|
80
82
|
if (!result) {
|
|
81
83
|
return '还没有搜索'
|
|
82
84
|
}
|
|
83
|
-
return `命中 ${result.total} 条:节点 ${result.points.length} / 线路 ${result.lines.length} / 通道 ${result.channels.length}`
|
|
85
|
+
return `命中 ${result.total} 条:节点 ${result.points.length} / 线路 ${result.lines.length} / 通道 ${result.channels.length} / 分组 ${result.groups?.length ?? 0}`
|
|
84
86
|
})
|
|
85
87
|
const searchMeta = computed(() => {
|
|
86
88
|
const result = searchResult.value
|
|
@@ -172,8 +174,8 @@ const applyWorker = () => {
|
|
|
172
174
|
: 'searchWorker=false:searchAsync 退回主线程同步计算'
|
|
173
175
|
}
|
|
174
176
|
const focusHit = (hit) => {
|
|
175
|
-
view?.focusOn(hit, { select: true })
|
|
176
|
-
actionText.value = `focusOn(${KIND_LABELS[hit.kind] ?? hit.kind} #${hit.index}, { select: true })`
|
|
177
|
+
view?.focusOn(hit, { select: true, zoom: true })
|
|
178
|
+
actionText.value = `focusOn(${KIND_LABELS[hit.kind] ?? hit.kind} #${hit.index}, { select: true, zoom: true })`
|
|
177
179
|
}
|
|
178
180
|
const focusAllHits = () => {
|
|
179
181
|
const hits = searchResult.value?.hits ?? []
|
|
@@ -181,8 +183,8 @@ const focusAllHits = () => {
|
|
|
181
183
|
actionText.value = '当前没有可定位的命中'
|
|
182
184
|
return
|
|
183
185
|
}
|
|
184
|
-
view?.focusOn(hits, { select: true })
|
|
185
|
-
actionText.value = `focusOn(hits, { select: true }):${hits.length} 条命中一起进包围盒并选中`
|
|
186
|
+
view?.focusOn(hits, { select: true, zoom: true })
|
|
187
|
+
actionText.value = `focusOn(hits, { select: true, zoom: true }):${hits.length} 条命中一起进包围盒并选中`
|
|
186
188
|
}
|
|
187
189
|
const readVisibleData = () => {
|
|
188
190
|
if (!view) {
|
|
@@ -296,7 +298,7 @@ onBeforeUnmount(() => {
|
|
|
296
298
|
<div class='dv-chips'>
|
|
297
299
|
<button v-for='preset in PRESETS' :key='preset.id' type='button' class='dv-chip' :data-demo='preset.demo' @click='choosePreset(preset)'>{{ preset.label }}</button>
|
|
298
300
|
</div>
|
|
299
|
-
<p class='dv-hint'
|
|
301
|
+
<p class='dv-hint'>scope 可写 points / lines / channels / groups,也认 point / line / channel / group;显式 fields 能搜默认会跳过的 symbol。搜索基于全量数据,不隐藏、也不自动移动视角。</p>
|
|
300
302
|
<div class='dv-row'>
|
|
301
303
|
<button type='button' class='dv-button' data-demo='search-filter-focus-all' @click='focusAllHits'>聚焦并选中全部命中</button>
|
|
302
304
|
</div>
|
|
@@ -335,7 +337,7 @@ onBeforeUnmount(() => {
|
|
|
335
337
|
</div>
|
|
336
338
|
<div class='dv-group'>
|
|
337
339
|
<h3>两件事别混用</h3>
|
|
338
|
-
<p class='dv-hint'>search 只把要素找出来,结果带 bounds;要居中就再调 focusOn。setFilter
|
|
340
|
+
<p class='dv-hint'>search 只把要素找出来,结果带 bounds;要居中就再调 focusOn。setFilter 只隐藏显示、不删数据,也不清空选中集:条件放宽后,原本选中的要素仍保持选中。</p>
|
|
339
341
|
</div>
|
|
340
342
|
</aside>
|
|
341
343
|
</section>
|