@opengis/bi 1.0.17 → 1.0.19
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 +110 -50
- package/config.js +12 -12
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +68 -76
- package/dist/{import-file-CJYiO_4_.js → import-file-BJjgK8Hl.js} +11072 -11065
- package/dist/{map-component-mixin-zHwqWXJY.js → map-component-mixin-BDeshFZi.js} +3803 -5455
- package/dist/style.css +1 -1
- package/dist/{vs-calendar-BAPnMYRd.js → vs-calendar-D98bcwCO.js} +36 -30
- package/dist/{vs-funnel-bar-DCK7gSj4.js → vs-funnel-bar-Ps4AevXk.js} +1 -1
- package/dist/{vs-heatmap-kd6FKOrT.js → vs-heatmap-DQ4l7XOD.js} +1 -1
- package/dist/{vs-map-BNm381mR.js → vs-map-C36n66Hj.js} +25 -24
- package/dist/vs-map-cluster-Bcjcul0f.js +76 -0
- package/dist/{vs-number-DH5bYG7m.js → vs-number-XzxJiWRu.js} +1 -1
- package/dist/{vs-text-DXkA7s1D.js → vs-text-DWhTWJlt.js} +2 -2
- package/package.json +94 -87
- package/plugin.js +14 -14
- package/server/migrations/bi.dataset.sql +32 -26
- package/server/migrations/bi.sql +93 -93
- package/server/plugins/docs.js +48 -48
- package/server/plugins/hook.js +89 -89
- package/server/plugins/vite.js +69 -69
- package/server/routes/dashboard/controllers/dashboard.delete.js +38 -38
- package/server/routes/dashboard/controllers/dashboard.js +118 -118
- package/server/routes/dashboard/controllers/dashboard.list.js +30 -30
- package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
- package/server/routes/dashboard/index.mjs +25 -25
- package/server/routes/data/controllers/data.js +167 -167
- package/server/routes/data/controllers/util/chartSQL.js +42 -42
- package/server/routes/data/controllers/util/normalizeData.js +59 -59
- package/server/routes/data/index.mjs +29 -29
- package/server/routes/dataset/controllers/bi.dataset.add.js +86 -0
- package/server/routes/dataset/controllers/bi.dataset.data.add.js +49 -0
- package/server/routes/dataset/controllers/bi.dataset.data.del.js +54 -0
- package/server/routes/dataset/controllers/bi.dataset.data.edit.js +55 -0
- package/server/routes/dataset/controllers/bi.dataset.data.list.js +71 -0
- package/server/routes/dataset/controllers/bi.dataset.del.js +48 -0
- package/server/routes/dataset/controllers/bi.dataset.demo.add.js +2 -2
- package/server/routes/dataset/controllers/bi.dataset.edit.js +83 -0
- package/server/routes/dataset/controllers/bi.dataset.list.js +29 -0
- package/server/routes/dataset/controllers/bi.db.list.js +19 -0
- package/server/routes/dataset/controllers/util/create.table.js +2 -3
- package/server/routes/dataset/controllers/util/prepare.data.js +5 -5
- package/server/routes/dataset/index.mjs +75 -19
- package/server/routes/db/controllers/dbTablePreview.js +63 -63
- package/server/routes/db/controllers/dbTables.js +36 -36
- package/server/routes/db/index.mjs +17 -17
- package/server/routes/edit/controllers/dashboard.add.js +26 -26
- package/server/routes/edit/controllers/dashboard.edit.js +46 -46
- package/server/routes/edit/controllers/widget.add.js +75 -75
- package/server/routes/edit/controllers/widget.del.js +69 -69
- package/server/routes/edit/controllers/widget.edit.js +54 -54
- package/server/routes/edit/index.mjs +31 -31
- package/server/routes/map/controllers/cluster.js +109 -109
- package/server/routes/map/controllers/clusterVtile.js +166 -166
- package/server/routes/map/controllers/geojson.js +127 -127
- package/server/routes/map/controllers/map.js +60 -60
- package/server/routes/map/controllers/utils/downloadClusterData.js +42 -42
- package/server/routes/map/controllers/vtile.js +183 -183
- package/server/routes/map/index.mjs +25 -25
- package/server/utils/getWidget.js +85 -85
- package/utils.js +12 -12
- package/dist/vs-map-cluster-D3jk7J8D.js +0 -106
- package/server/routes/dataset/controllers/bi.dataset.import.js +0 -67
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.custom-x-scrollbar{overflow-x:auto;overflow-y:clip}.custom-x-scrollbar::-webkit-scrollbar{height:6px}.custom-x-scrollbar::-webkit-scrollbar-thumb{background-color:#e0e0e0}.custom-x-scrollbar::-webkit-scrollbar-track{background-color:#f1f1f1}.ui-dialog__wrapper[data-v-
|
|
1
|
+
.custom-x-scrollbar{overflow-x:auto;overflow-y:clip}.custom-x-scrollbar::-webkit-scrollbar{height:6px}.custom-x-scrollbar::-webkit-scrollbar-thumb{background-color:#e0e0e0}.custom-x-scrollbar::-webkit-scrollbar-track{background-color:#f1f1f1}.ui-dialog__wrapper[data-v-e51369e3]{position:relative}.ui-dialog__modal[data-v-e51369e3]{margin:10px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-height:0;height:fit-content;max-height:80vh;overflow:hidden}.ui-dialog__content[data-v-e51369e3]{min-height:0;height:100%;overflow:auto}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar-track{background-color:#f5f5f5}@media (max-width: 650px){.ui-dialog__modal[data-v-e51369e3]{top:50%}}.fade-enter-active[data-v-e51369e3],.fade-leave-active[data-v-e51369e3]{transition:opacity .2s}.fade-enter-from[data-v-e51369e3],.fade-leave-to[data-v-e51369e3]{opacity:0}.content-enter-active[data-v-e51369e3],.content-leave-active[data-v-e51369e3]{transition:transform .4s}.content-enter-from[data-v-e51369e3],.content-leave-to[data-v-e51369e3]{transform:translate(-50%,-50%) scale(.95)}.custom-scrollbar{overflow-y:auto;overflow-x:clip}.custom-scrollbar::-webkit-scrollbar{width:6px;margin-right:0}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:#e0e0e0;border-radius:10px}.custom-scrollbar::-webkit-scrollbar-track{background-color:#f1f1f1}.vs-chart{width:100%;height:100%}.vs-chart-tooltip{border-radius:7px;max-height:100px;max-width:340px;min-width:140px;background-color:#fff;box-shadow:0 0 8px #0000002e}.vs-chart-tooltip__head{padding:5px;border-bottom:1px solid #eee;margin-bottom:5px}.vs-chart-tooltip__head-title{font-size:14px;font-weight:700;display:flex;align-items:center}.vs-chart-tooltip__head-value{margin-right:5px}.vs-chart-tooltip__head-series{font-size:14px;display:flex;align-items:center}.vs-chart-tooltip__color{width:12px;height:12px;display:block;border-radius:50%;margin-right:5px}.vs-chart-tooltip__body{padding:5px;font-size:14px;display:flex;align-items:start;flex-direction:column}.vs-chart-tooltip__body .vs-chart-tooltip__color{border-radius:3px}.vs-chart-tooltip__item{width:100%;display:flex;align-items:center;justify-content:space-between}.vs-chart-tooltip__text{margin-right:auto}.vs-chart-tooltip__body svg{margin-right:8px}body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.vs-map-portal__legend[data-v-16c83b8b]{position:absolute;bottom:10px;right:45px}.vs-map-portal__legend-body[data-v-16c83b8b]{background-color:#fff;border-radius:12px;border:1px solid #dcdfe5;width:250px;padding:16px;max-height:250px}.map__settings{display:flex;padding:3px 1px;background:#fff;position:absolute;right:0;bottom:15px;height:30px;align-items:center;font-weight:100;text-align:center}.map__settings-item{display:flex;white-space:nowrap;padding:0 2px;font-size:10px;font-weight:400}.map__settings-attribution{padding:0}.map__settings-menu{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:15px!important;position:absolute;background-color:#fff;bottom:60px;right:90px;width:260px}.map__settings-menu-item{display:flex;align-items:center;color:#2c2c2c;margin-bottom:5px;font-size:12px;justify-content:space-between;height:28px}.map__settings-menu-item-text{height:28px;line-height:28px;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #dcdfe6;-webkit-box-sizing:border-box;box-sizing:border-box;color:#606266;display:inline-block;font-size:12px;height:40px;line-height:40px;outline:0;padding:0 10px}.map__settings-menu-item--checktext{color:#000!important;font-size:12px;display:inline-block;padding-left:10px;line-height:19px;cursor:pointer}.checked{color:#409eff!important}.vs-map-slot-layers[data-v-aebbde6b]{position:absolute;display:flex;bottom:10px;left:15px}.vs-map-slot-layers__layer[data-v-aebbde6b]{width:50px;height:50px;background-color:#fff;box-shadow:0 0 7px #434c5626;padding:5px;border-radius:5px;margin-top:10px;margin-right:10px;cursor:pointer;transition:all .3s}.vs-map-slot-layers__layer[data-v-aebbde6b]:hover{background-color:#eee}.vs-map-slot-layers__image[data-v-aebbde6b]{width:100%;border-radius:5px;object-fit:contain}.focused[data-v-aebbde6b]{background-color:#1989fa!important}.vs-map-portal__list{position:absolute}.vs-map-portal__legend-title{padding-bottom:5px;border-bottom:1px solid #ebebeb}.vs-map-portal__legend-button{cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column;height:35px;background-color:#fff;border-radius:5px;border:1px solid #dcdfe5;padding:5px}.vs-map-portal__legend-body{background-color:#fff;border-radius:5px;border:1px solid #dcdfe5;padding:5px;width:250px;max-height:250px}.vs-map-portal__legend-body__content{padding-top:10px}.vs-map-portal__legend-category{font-weight:700;margin-bottom:5px}.vs-map-portal__legend-item{margin-right:10px;display:flex;flex-shrink:0}.vs-map-portal__legend-item__color{width:16px;height:16px;border-radius:3px;margin-right:10px;display:flex;flex-shrink:0}.maplibregl-popup-content{padding:0}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
const
|
|
1
|
+
import { _ as l, c, i as h, t as p, h as d } from "./import-file-BJjgK8Hl.js";
|
|
2
|
+
import { openBlock as u, createElementBlock as m } from "vue";
|
|
3
|
+
const D = {
|
|
4
4
|
name: "VsCalendar",
|
|
5
|
-
mixins: [
|
|
5
|
+
mixins: [c],
|
|
6
6
|
data() {
|
|
7
7
|
return {
|
|
8
8
|
chartInstance: null,
|
|
@@ -22,8 +22,8 @@ const m = {
|
|
|
22
22
|
onChangedData() {
|
|
23
23
|
try {
|
|
24
24
|
if (this.sourceData) {
|
|
25
|
-
const { series: t, xs:
|
|
26
|
-
t && (this == null || this.initChart(t,
|
|
25
|
+
const { series: t, xs: a, ys: e } = this.prepareData();
|
|
26
|
+
t && (this == null || this.initChart(t, a, e));
|
|
27
27
|
}
|
|
28
28
|
} catch (t) {
|
|
29
29
|
console.error(t);
|
|
@@ -31,38 +31,44 @@ const m = {
|
|
|
31
31
|
},
|
|
32
32
|
prepareData() {
|
|
33
33
|
try {
|
|
34
|
-
return this.sourceData.map((
|
|
35
|
-
e
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
return this.sourceData.map((a) => {
|
|
35
|
+
var e, r, n;
|
|
36
|
+
return [
|
|
37
|
+
(n = (r = a == null ? void 0 : a[(e = this.dimensions) == null ? void 0 : e[0]]) == null ? void 0 : r.split("T")) == null ? void 0 : n[0],
|
|
38
|
+
Number(a[this.dimensions[1]])
|
|
39
|
+
];
|
|
40
|
+
});
|
|
38
41
|
} catch (t) {
|
|
39
42
|
console.error(t);
|
|
40
43
|
}
|
|
41
44
|
},
|
|
42
45
|
getCalendarRange() {
|
|
43
46
|
const t = this.sourceData.map(
|
|
44
|
-
(r) =>
|
|
45
|
-
|
|
47
|
+
(r) => {
|
|
48
|
+
var n, s;
|
|
49
|
+
return new Date((s = r == null ? void 0 : r[(n = this.dimensions) == null ? void 0 : n[0]]) == null ? void 0 : s.split("T")[0]);
|
|
50
|
+
}
|
|
51
|
+
), a = new Date(Math.min(...t)), e = new Date(Math.max(...t));
|
|
46
52
|
return [
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
a.getFullYear().toString(),
|
|
54
|
+
e.getFullYear().toString()
|
|
49
55
|
];
|
|
50
56
|
},
|
|
51
57
|
async initChart() {
|
|
52
|
-
var t, e;
|
|
58
|
+
var t, a, e, r;
|
|
53
59
|
try {
|
|
54
|
-
const
|
|
60
|
+
const n = this.$refs.chart, s = h(n), o = {
|
|
55
61
|
tooltip: {
|
|
56
|
-
...
|
|
62
|
+
...p(
|
|
57
63
|
(t = this.styleData) == null ? void 0 : t.tooltip,
|
|
58
|
-
(
|
|
64
|
+
(a = this.styleData) == null ? void 0 : a.show_tooltip
|
|
59
65
|
),
|
|
60
66
|
trigger: "item",
|
|
61
|
-
formatter: (i) =>
|
|
67
|
+
formatter: (i) => d(i)
|
|
62
68
|
},
|
|
63
69
|
visualMap: {
|
|
64
|
-
min: Math.min(...this.prepareData().map((i) => i[1])),
|
|
65
|
-
max: Math.max(...this.prepareData().map((i) => i[1])),
|
|
70
|
+
min: Math.min(...(e = this.prepareData()) == null ? void 0 : e.map((i) => i[1])),
|
|
71
|
+
max: Math.max(...(r = this.prepareData()) == null ? void 0 : r.map((i) => i[1])),
|
|
66
72
|
type: "piecewise",
|
|
67
73
|
orient: "horizontal",
|
|
68
74
|
left: "center",
|
|
@@ -89,22 +95,22 @@ const m = {
|
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
};
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
s.setOption(o), s.resize(), window.addEventListener("resize", () => {
|
|
99
|
+
s.resize();
|
|
94
100
|
});
|
|
95
|
-
} catch (
|
|
96
|
-
console.error(
|
|
101
|
+
} catch (n) {
|
|
102
|
+
console.error(n);
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
|
-
},
|
|
106
|
+
}, f = {
|
|
101
107
|
ref: "chart",
|
|
102
108
|
class: "h-full w-full min-h-[200px] pb-2"
|
|
103
109
|
};
|
|
104
|
-
function
|
|
105
|
-
return
|
|
110
|
+
function g(t, a, e, r, n, s) {
|
|
111
|
+
return u(), m("div", f, null, 512);
|
|
106
112
|
}
|
|
107
|
-
const
|
|
113
|
+
const x = /* @__PURE__ */ l(D, [["render", g]]);
|
|
108
114
|
export {
|
|
109
|
-
|
|
115
|
+
x as default
|
|
110
116
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-
|
|
1
|
+
import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-BJjgK8Hl.js";
|
|
2
2
|
import { openBlock as p, createElementBlock as u } from "vue";
|
|
3
3
|
const m = {
|
|
4
4
|
name: "VsFunnelBar",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as u, c as m, a as d, i as f, t as x, e as y, g as c, d as D } from "./import-file-
|
|
1
|
+
import { _ as u, c as m, a as d, i as f, t as x, e as y, g as c, d as D } from "./import-file-BJjgK8Hl.js";
|
|
2
2
|
import { openBlock as _, createElementBlock as g } from "vue";
|
|
3
3
|
const w = {
|
|
4
4
|
name: "VsHeatmap",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as g, m as M } from "./map-component-mixin-
|
|
2
|
-
import { _ as w, c as y } from "./import-file-
|
|
1
|
+
import { l as g, m as M } from "./map-component-mixin-BDeshFZi.js";
|
|
2
|
+
import { _ as w, c as y } from "./import-file-BJjgK8Hl.js";
|
|
3
3
|
import { resolveComponent as i, openBlock as u, createElementBlock as _, createElementVNode as r, createBlock as V, createCommentVNode as v, createVNode as d } from "vue";
|
|
4
4
|
const x = {
|
|
5
5
|
mixins: [y, g, M],
|
|
@@ -15,20 +15,20 @@ const x = {
|
|
|
15
15
|
this.data = s;
|
|
16
16
|
},
|
|
17
17
|
async loadHandler() {
|
|
18
|
-
const
|
|
18
|
+
const e = ["#69D2E7", "yellow", "#FE4365"], s = this.data.colors ? ["match", ["get", "x"]].concat(
|
|
19
19
|
this.data.colors.reduce(
|
|
20
|
-
(o,
|
|
20
|
+
(o, a, c) => o.concat(a.val, e[c]),
|
|
21
21
|
[]
|
|
22
22
|
)
|
|
23
|
-
).concat(["gray"]) : "blue", l = [5, 7, 9, 11, 13],
|
|
24
|
-
this.data.sizes && (this.data.sizes.reverse().forEach((o,
|
|
25
|
-
|
|
26
|
-
}),
|
|
23
|
+
).concat(["gray"]) : "blue", l = [5, 7, 9, 11, 13], t = this.data.sizes ? ["case"] : 5;
|
|
24
|
+
this.data.sizes && (this.data.sizes.reverse().forEach((o, a) => {
|
|
25
|
+
t.push([">", ["get", "metric"], o]), t.push(l[a]);
|
|
26
|
+
}), t.push(5));
|
|
27
27
|
const n = {
|
|
28
28
|
type: "circle",
|
|
29
29
|
color: s,
|
|
30
30
|
width: 2,
|
|
31
|
-
radius:
|
|
31
|
+
radius: t,
|
|
32
32
|
stroke: "#eee"
|
|
33
33
|
};
|
|
34
34
|
Object.assign(n, this.data.style || {}), this.addVtileLayer({
|
|
@@ -38,32 +38,33 @@ const x = {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
},
|
|
42
|
-
function L(
|
|
41
|
+
}, z = { class: "relative w-full h-full" }, $ = ["id"], k = { ref: "popup" }, E = { class: "absolute h-[50px] flex w-[80px] justify-end rounded-[7px] bottom-[40px] right-[10px]" };
|
|
42
|
+
function L(e, s, l, t, n, o) {
|
|
43
43
|
var p, m, h;
|
|
44
|
-
const
|
|
45
|
-
return u(), _("div",
|
|
44
|
+
const a = i("VsMapSetting"), c = i("VsMapSlotLayers"), f = i("VsMapGoHome"), b = i("VsMapLegend");
|
|
45
|
+
return u(), _("div", z, [
|
|
46
46
|
r("div", {
|
|
47
|
-
id:
|
|
47
|
+
id: e.mapId,
|
|
48
48
|
class: "h-[96%] w-full flex items-end relative min-h-[250px]"
|
|
49
49
|
}, [
|
|
50
50
|
r("div", k, null, 512)
|
|
51
|
-
], 8,
|
|
52
|
-
|
|
51
|
+
], 8, $),
|
|
52
|
+
e.showSetting ? (u(), V(a, {
|
|
53
53
|
key: 0,
|
|
54
|
-
map:
|
|
55
|
-
coordinates:
|
|
54
|
+
map: e.map,
|
|
55
|
+
coordinates: e.coordinatesByMouse
|
|
56
56
|
}, null, 8, ["map", "coordinates"])) : v("", !0),
|
|
57
|
-
d(c, { map:
|
|
57
|
+
d(c, { map: e.map }, null, 8, ["map"]),
|
|
58
58
|
r("div", E, [
|
|
59
59
|
d(f, {
|
|
60
|
-
map:
|
|
61
|
-
bbox: (p =
|
|
60
|
+
map: e.map,
|
|
61
|
+
bbox: (p = e.data) == null ? void 0 : p.bbox
|
|
62
62
|
}, null, 8, ["map", "bbox"]),
|
|
63
63
|
d(b, {
|
|
64
|
-
colors: (m =
|
|
65
|
-
sizes: (h =
|
|
66
|
-
color:
|
|
64
|
+
colors: (m = e.data) == null ? void 0 : m.colors,
|
|
65
|
+
sizes: (h = e.data) == null ? void 0 : h.sizes,
|
|
66
|
+
color: e.color,
|
|
67
|
+
resizeItem: "true"
|
|
67
68
|
}, null, 8, ["colors", "sizes", "color"])
|
|
68
69
|
])
|
|
69
70
|
]);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { l as w, m as V, p as _ } from "./map-component-mixin-BDeshFZi.js";
|
|
2
|
+
import { _ as v, c as C } from "./import-file-BJjgK8Hl.js";
|
|
3
|
+
import { resolveComponent as a, openBlock as h, createElementBlock as $, createVNode as s, createElementVNode as u, createBlock as x, createCommentVNode as L } from "vue";
|
|
4
|
+
const k = {
|
|
5
|
+
mixins: [C, w, V],
|
|
6
|
+
async mounted() {
|
|
7
|
+
await this.getMapData(), await this.createMap();
|
|
8
|
+
},
|
|
9
|
+
data() {
|
|
10
|
+
return { baseColor: "pink" };
|
|
11
|
+
},
|
|
12
|
+
methods: {
|
|
13
|
+
async getMapData() {
|
|
14
|
+
const o = await (await fetch(
|
|
15
|
+
`/api/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`
|
|
16
|
+
)).json();
|
|
17
|
+
this.data = o;
|
|
18
|
+
},
|
|
19
|
+
async loadHandler() {
|
|
20
|
+
var n;
|
|
21
|
+
this.baseColor = ((n = this.data.style) == null ? void 0 : n.color) || "blue";
|
|
22
|
+
const t = ["case"];
|
|
23
|
+
this.data.sizes.reverse().forEach((i, e) => {
|
|
24
|
+
t.push([">", ["get", "metric"], i]), t.push(_[this.baseColor][e]), e++;
|
|
25
|
+
}), t.push("gray");
|
|
26
|
+
const o = {
|
|
27
|
+
type: "polygon",
|
|
28
|
+
color: t,
|
|
29
|
+
opacity: 0.4
|
|
30
|
+
};
|
|
31
|
+
Object.assign(o, this.data.style || {}), this.addVtileLayer({
|
|
32
|
+
id: "bi",
|
|
33
|
+
url: `${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,
|
|
34
|
+
style: o
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, z = { class: "relative w-full h-full" }, S = ["id"], B = { class: "absolute h-[50px] flex w-[80px] justify-end rounded-[7px] bottom-[40px] right-[10px]" };
|
|
39
|
+
function j(t, o, n, i, e, E) {
|
|
40
|
+
var r, l, c, p, d, m;
|
|
41
|
+
const b = a("VsList"), y = a("VsMapSetting"), g = a("VsMapSlotLayers"), f = a("VsMapGoHome"), M = a("VsMapLegend");
|
|
42
|
+
return h(), $("div", z, [
|
|
43
|
+
s(b, {
|
|
44
|
+
source: (r = t.data) == null ? void 0 : r.rows,
|
|
45
|
+
total: ((l = t.data) == null ? void 0 : l.total) || 0,
|
|
46
|
+
count: ((c = t.data) == null ? void 0 : c.count) || 0
|
|
47
|
+
}, null, 8, ["source", "total", "count"]),
|
|
48
|
+
u("div", {
|
|
49
|
+
id: t.mapId,
|
|
50
|
+
class: "h-[96%] w-full flex items-end min-h-[250px]"
|
|
51
|
+
}, null, 8, S),
|
|
52
|
+
t.showSetting ? (h(), x(y, {
|
|
53
|
+
key: 0,
|
|
54
|
+
map: t.map,
|
|
55
|
+
coordinates: t.coordinatesByMouse
|
|
56
|
+
}, null, 8, ["map", "coordinates"])) : L("", !0),
|
|
57
|
+
s(g, { map: t.map }, null, 8, ["map"]),
|
|
58
|
+
u("div", B, [
|
|
59
|
+
s(f, {
|
|
60
|
+
map: t.map,
|
|
61
|
+
bbox: (p = t.data) == null ? void 0 : p.bbox
|
|
62
|
+
}, null, 8, ["map", "bbox"]),
|
|
63
|
+
s(M, {
|
|
64
|
+
colors: (d = t.data) == null ? void 0 : d.colors,
|
|
65
|
+
sizes: (m = t.data) == null ? void 0 : m.sizes,
|
|
66
|
+
color: e.baseColor,
|
|
67
|
+
changeOpacityItem: "true",
|
|
68
|
+
cluster: "true"
|
|
69
|
+
}, null, 8, ["colors", "sizes", "color"])
|
|
70
|
+
])
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
const G = /* @__PURE__ */ v(k, [["render", j]]);
|
|
74
|
+
export {
|
|
75
|
+
G as default
|
|
76
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ge = Object.defineProperty;
|
|
2
2
|
var ke = (c, e, t) => e in c ? ge(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
|
3
|
-
var k = (c, e, t) =>
|
|
4
|
-
import { _ as de, c as xe } from "./import-file-
|
|
3
|
+
var k = (c, e, t) => ke(c, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { _ as de, c as xe } from "./import-file-BJjgK8Hl.js";
|
|
5
5
|
import { openBlock as V, createElementBlock as J, createCommentVNode as be } from "vue";
|
|
6
6
|
function Q() {
|
|
7
7
|
return {
|
package/package.json
CHANGED
|
@@ -1,88 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opengis/bi",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "BI data visualization module",
|
|
5
|
-
"main": "dist/bi.js",
|
|
6
|
-
"browser": "dist/bi.umd.cjs",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist/*",
|
|
10
|
-
"server/*",
|
|
11
|
-
"plugin.js",
|
|
12
|
-
"utils.js",
|
|
13
|
-
"config.js"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"debug": "node --watch-path=server server",
|
|
17
|
-
"dev": "vite",
|
|
18
|
-
"type-check": "vue-tsc --noEmit",
|
|
19
|
-
"build": "vite build",
|
|
20
|
-
"build-app": "cross-env APP=true vite build",
|
|
21
|
-
"lint": "eslint .",
|
|
22
|
-
"format": "prettier --write .",
|
|
23
|
-
"test": "node --test",
|
|
24
|
-
"test21": "node --test ./test/plugins/*",
|
|
25
|
-
"start": "node server.js",
|
|
26
|
-
"prod": "cross-env NODE_ENV=production npm run start",
|
|
27
|
-
"docs:local": "cross-env docs=local vitepress build docs",
|
|
28
|
-
"docs:dev": "vitepress dev docs",
|
|
29
|
-
"docs:build": "vitepress build docs",
|
|
30
|
-
"docs:preview": "vitepress preview docs",
|
|
31
|
-
"docs-dev:local": "cross-env docs=local vitepress build docs-dev",
|
|
32
|
-
"docs-dev:dev": "vitepress dev docs-dev",
|
|
33
|
-
"docs-dev:build": "vitepress build docs-dev",
|
|
34
|
-
"docs-dev:preview": "vitepress preview docs-dev",
|
|
35
|
-
"adduser": "node script/adduser.js"
|
|
36
|
-
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"eslint
|
|
75
|
-
"eslint
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengis/bi",
|
|
3
|
+
"version": "1.0.19",
|
|
4
|
+
"description": "BI data visualization module",
|
|
5
|
+
"main": "dist/bi.js",
|
|
6
|
+
"browser": "dist/bi.umd.cjs",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/*",
|
|
10
|
+
"server/*",
|
|
11
|
+
"plugin.js",
|
|
12
|
+
"utils.js",
|
|
13
|
+
"config.js"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"debug": "node --watch-path=server server",
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"type-check": "vue-tsc --noEmit",
|
|
19
|
+
"build": "vite build",
|
|
20
|
+
"build-app": "cross-env APP=true vite build",
|
|
21
|
+
"lint": "eslint .",
|
|
22
|
+
"format": "prettier --write .",
|
|
23
|
+
"test": "node --test",
|
|
24
|
+
"test21": "node --test ./test/plugins/*",
|
|
25
|
+
"start": "node server.js",
|
|
26
|
+
"prod": "cross-env NODE_ENV=production npm run start",
|
|
27
|
+
"docs:local": "cross-env docs=local vitepress build docs",
|
|
28
|
+
"docs:dev": "vitepress dev docs",
|
|
29
|
+
"docs:build": "vitepress build docs",
|
|
30
|
+
"docs:preview": "vitepress preview docs",
|
|
31
|
+
"docs-dev:local": "cross-env docs=local vitepress build docs-dev",
|
|
32
|
+
"docs-dev:dev": "vitepress dev docs-dev",
|
|
33
|
+
"docs-dev:build": "vitepress build docs-dev",
|
|
34
|
+
"docs-dev:preview": "vitepress preview docs-dev",
|
|
35
|
+
"adduser": "node script/adduser.js"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"bi",
|
|
39
|
+
"data visualization",
|
|
40
|
+
"chart",
|
|
41
|
+
"opengis",
|
|
42
|
+
"vue",
|
|
43
|
+
"fastify"
|
|
44
|
+
],
|
|
45
|
+
"author": "Softpro",
|
|
46
|
+
"license": "ISC",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@highlightjs/vue-plugin": "github:highlightjs/vue-plugin",
|
|
49
|
+
"@mapbox/sphericalmercator": "^1.2.0",
|
|
50
|
+
"@opengis/fastify-auth": "^1.0.50",
|
|
51
|
+
"@opengis/fastify-file": "^1.0.32",
|
|
52
|
+
"@opengis/fastify-table": "^1.1.93",
|
|
53
|
+
"@opengis/v3-core": "^0.2.65",
|
|
54
|
+
"@opengis/v3-filter": "^0.0.39",
|
|
55
|
+
"@turf/turf": "^7.1.0",
|
|
56
|
+
"@vueuse/core": "^11.1.0",
|
|
57
|
+
"axios": "^1.3.1",
|
|
58
|
+
"cross-env": "^7.0.3",
|
|
59
|
+
"d3-format": "^3.1.0",
|
|
60
|
+
"echarts": "^5.5.1",
|
|
61
|
+
"fastify": "^4.26.1",
|
|
62
|
+
"fastify-plugin": "^4.0.0",
|
|
63
|
+
"highlight.js": "^11.10.0",
|
|
64
|
+
"js-yaml": "^4.1.0",
|
|
65
|
+
"maplibre-gl": "^4.7.1",
|
|
66
|
+
"marked": "^14.1.2",
|
|
67
|
+
"pinia": "^2.2.4",
|
|
68
|
+
"vite": "^5.1.5",
|
|
69
|
+
"vue": "^3.4.27",
|
|
70
|
+
"vue-router": "^4.4.3",
|
|
71
|
+
"vue3-ace-editor": "^2.2.4"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
75
|
+
"@eslint/js": "^9.12.0",
|
|
76
|
+
"@types/echarts": "^4.9.22",
|
|
77
|
+
"@types/node": "^22.7.5",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
79
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
80
|
+
"eslint": "^8.57.1",
|
|
81
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
82
|
+
"eslint-config-prettier": "^9.1.0",
|
|
83
|
+
"eslint-plugin-vue": "^9.29.0",
|
|
84
|
+
"globals": "^15.10.0",
|
|
85
|
+
"prettier": "^3.3.3",
|
|
86
|
+
"sass": "^1.77.0",
|
|
87
|
+
"typescript": "^5.4.5",
|
|
88
|
+
"typescript-eslint": "~8.8.1",
|
|
89
|
+
"vitepress": "^1.1.4",
|
|
90
|
+
"vitepress-plugin-mermaid": "^2.0.16",
|
|
91
|
+
"vitepress-plugin-tabs": "^0.5.0",
|
|
92
|
+
"vitepress-sidebar": "^1.22.0",
|
|
93
|
+
"vue-tsc": "^2.1.6"
|
|
94
|
+
}
|
|
88
95
|
}
|
package/plugin.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import fp from 'fastify-plugin';
|
|
2
|
-
import config from './config.js';
|
|
3
|
-
|
|
4
|
-
config.prefix = config.prefix || '/api';
|
|
5
|
-
async function plugin(fastify, opts = config) {
|
|
6
|
-
// API
|
|
7
|
-
fastify.register(import('./server/routes/dashboard/index.mjs'), config);
|
|
8
|
-
fastify.register(import('./server/routes/dataset/index.mjs'), config);
|
|
9
|
-
fastify.register(import('./server/routes/db/index.mjs'), config);
|
|
10
|
-
fastify.register(import('./server/routes/data/index.mjs'), config);
|
|
11
|
-
fastify.register(import('./server/routes/edit/index.mjs'), config);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default fp(plugin);
|
|
1
|
+
import fp from 'fastify-plugin';
|
|
2
|
+
import config from './config.js';
|
|
3
|
+
|
|
4
|
+
config.prefix = config.prefix || '/api';
|
|
5
|
+
async function plugin(fastify, opts = config) {
|
|
6
|
+
// API
|
|
7
|
+
fastify.register(import('./server/routes/dashboard/index.mjs'), config);
|
|
8
|
+
fastify.register(import('./server/routes/dataset/index.mjs'), config);
|
|
9
|
+
fastify.register(import('./server/routes/db/index.mjs'), config);
|
|
10
|
+
fastify.register(import('./server/routes/data/index.mjs'), config);
|
|
11
|
+
fastify.register(import('./server/routes/edit/index.mjs'), config);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default fp(plugin);
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
create schema if not exists bi;
|
|
2
|
-
|
|
3
|
-
CREATE TABLE if not exists bi.dataset ();
|
|
4
|
-
alter table bi.dataset drop constraint if exists bi_dataset_id_pkey cascade;
|
|
5
|
-
|
|
6
|
-
alter table bi.dataset add column if not exists dataset_id text;
|
|
7
|
-
alter table bi.dataset alter column dataset_id set not null;
|
|
8
|
-
alter table bi.dataset alter column dataset_id set default next_id();
|
|
9
|
-
|
|
10
|
-
alter table bi.dataset add column if not exists name text;
|
|
11
|
-
alter table bi.dataset add column if not exists
|
|
12
|
-
alter table bi.dataset add column if not exists
|
|
13
|
-
alter table bi.dataset add column if not exists
|
|
14
|
-
alter table bi.dataset add column if not exists
|
|
15
|
-
|
|
16
|
-
alter table bi.dataset add column if not exists
|
|
17
|
-
alter table bi.dataset
|
|
18
|
-
|
|
19
|
-
alter table bi.dataset add
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
create schema if not exists bi;
|
|
2
|
+
|
|
3
|
+
CREATE TABLE if not exists bi.dataset ();
|
|
4
|
+
alter table bi.dataset drop constraint if exists bi_dataset_id_pkey cascade;
|
|
5
|
+
|
|
6
|
+
alter table bi.dataset add column if not exists dataset_id text;
|
|
7
|
+
alter table bi.dataset alter column dataset_id set not null;
|
|
8
|
+
alter table bi.dataset alter column dataset_id set default next_id();
|
|
9
|
+
|
|
10
|
+
alter table bi.dataset add column if not exists name text;
|
|
11
|
+
alter table bi.dataset add column if not exists db text;
|
|
12
|
+
alter table bi.dataset add column if not exists source_type text;
|
|
13
|
+
alter table bi.dataset add column if not exists file_path text;
|
|
14
|
+
alter table bi.dataset add column if not exists table_name text;
|
|
15
|
+
|
|
16
|
+
alter table bi.dataset add column if not exists sql_list json;
|
|
17
|
+
alter table bi.dataset add column if not exists column_list json;
|
|
18
|
+
|
|
19
|
+
alter table bi.dataset add column if not exists uid text;
|
|
20
|
+
alter table bi.dataset add column if not exists editor_id text;
|
|
21
|
+
alter table bi.dataset add column if not exists editor_date timestamp without time zone;
|
|
22
|
+
alter table bi.dataset add column if not exists cdate timestamp without time zone;
|
|
23
|
+
alter table bi.dataset alter column cdate set DEFAULT (now())::timestamp without time zone;
|
|
24
|
+
|
|
25
|
+
alter table bi.dataset add CONSTRAINT bi_dataset_id_pkey PRIMARY KEY (dataset_id);
|
|
26
|
+
|
|
27
|
+
COMMENT ON TABLE bi.dataset IS 'Набори даних';
|
|
28
|
+
|
|
29
|
+
COMMENT ON COLUMN bi.dataset.dataset_id IS 'PK';
|
|
30
|
+
COMMENT ON COLUMN bi.dataset.name IS 'Назва';
|
|
31
|
+
COMMENT ON COLUMN bi.dataset.file_path IS 'Шлях до імпортованого файлу';
|
|
32
|
+
COMMENT ON COLUMN bi.dataset.table_name IS 'Таблиця';
|