@someray-ui/components 0.0.1 → 0.0.2

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/dist/sr-ui.js CHANGED
@@ -1,129 +1,124 @@
1
- import { defineComponent as R, ref as M, watch as X, onMounted as Z, onUnmounted as ee, resolveComponent as d, openBlock as o, createElementBlock as l, createElementVNode as e, renderSlot as P, createVNode as n, withCtx as u, createCommentVNode as p, toDisplayString as v, Fragment as B, renderList as E, createBlock as I, resolveDynamicComponent as U, normalizeClass as L, withModifiers as W, withDirectives as j, vShow as q, createTextVNode as C, computed as O, normalizeStyle as te } from "vue";
2
- import { useRoute as se } from "vue-router";
3
- const oe = [
1
+ import { defineComponent as T, ref as M, watch as ne, onMounted as J, onUnmounted as ae, resolveComponent as m, openBlock as o, createElementBlock as n, createElementVNode as e, renderSlot as d, createVNode as r, withCtx as a, createCommentVNode as k, toDisplayString as g, Fragment as D, renderList as R, createBlock as N, resolveDynamicComponent as F, normalizeClass as W, withModifiers as q, withDirectives as G, vShow as Y, createTextVNode as L, computed as A, normalizeStyle as X, createSlots as I, onBeforeUnmount as ie } from "vue";
2
+ import { useRoute as re } from "vue-router";
3
+ const ce = [
4
4
  { key: "/home", label: "首页", to: "/home", icon: '<svg viewBox="0 0 24 24"><path d="M4 11l8-7 8 7"/><path d="M6 10v9h12v-9"/></svg>' },
5
5
  { key: "/live", label: "实时预览", to: "/live", icon: '<svg viewBox="0 0 24 24"><path class="pl" d="M8 5l11 7-11 7z"/></svg>' },
6
6
  { key: "/playback", label: "视频回放", to: "/playback", icon: '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8"/><path d="M12 8v4l3 2"/></svg>' },
7
7
  { key: "/ops", label: "运维管理", to: "/ops", icon: '<svg viewBox="0 0 24 24"><path d="M3 12h4l3 7 4-14 3 7h4"/></svg>' },
8
8
  { key: "/map", label: "地图模式", to: "/map", icon: '<svg viewBox="0 0 24 24"><path d="M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2z"/><path d="M9 4v14M15 6v14"/></svg>' }
9
- ], le = [
9
+ ], de = [
10
10
  { key: "profile", label: "个人中心", icon: '<svg viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20c1.5-4 4.5-6 8-6s6.5 2 8 6"/></svg>' },
11
11
  { key: "theme", label: "切换主题", icon: '<svg viewBox="0 0 24 24"><path d="M4 9h13"/><path d="M14 6l3 3-3 3"/><path d="M20 15H7"/><path d="M10 12l-3 3 3 3"/></svg>' },
12
12
  { key: "system", label: "系统管理", icon: '<svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 20h8M12 17v3"/></svg>' },
13
13
  { divider: !0 },
14
14
  { key: "logout", label: "退出登录", danger: !0, icon: '<svg viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>' }
15
- ], ne = { class: "cv6h" }, ce = { class: "cv6h__left" }, ae = ["src"], ie = { class: "cv6h__brand" }, de = { class: "cv6h__title" }, re = {
15
+ ], ue = { class: "sr-h" }, he = { class: "sr-h__left" }, _e = ["src"], ve = { class: "sr-h__brand" }, fe = { class: "sr-h__title" }, me = {
16
16
  key: 0,
17
- class: "cv6h__sub"
18
- }, ue = {
19
- class: "cv6h__nav",
17
+ class: "sr-h__sub"
18
+ }, pe = {
19
+ class: "sr-h__nav",
20
20
  "aria-label": "主导航"
21
- }, ve = { class: "cv6h__navframe" }, _e = ["innerHTML"], he = {
21
+ }, ye = { class: "sr-h__navframe" }, ge = ["innerHTML"], ke = {
22
22
  key: 1,
23
- class: "cv6h__ico"
24
- }, pe = { class: "cv6h__right" }, me = { class: "cv6h__weather" }, ke = { class: "cv6h__wtext" }, ge = { class: "cv6h__temp" }, ye = { class: "cv6h__cond" }, fe = {
23
+ class: "sr-h__ico"
24
+ }, be = { class: "sr-h__right" }, $e = { class: "sr-h__weather" }, we = { class: "sr-h__wtext" }, Me = { class: "sr-h__temp" }, Se = { class: "sr-h__cond" }, ze = {
25
25
  key: 0,
26
- class: "cv6h__div"
27
- }, we = { class: "cv6h__wind" }, be = { class: "cv6h__wdir" }, xe = { class: "cv6h__wlvl" }, Me = {
26
+ class: "sr-h__div"
27
+ }, Ce = { class: "sr-h__wind" }, Be = { class: "sr-h__wdir" }, Le = { class: "sr-h__wlvl" }, We = {
28
28
  key: 1,
29
- class: "cv6h__div"
30
- }, $e = {
31
- key: 1,
32
- class: "cv6h__clock"
33
- }, Ce = { class: "cv6h__time" }, Be = { class: "cv6h__date" }, Se = { class: "cv6h__bellpop" }, ze = { class: "cv6h__menu" }, Ve = { class: "cv6h__mhead" }, De = {
29
+ class: "sr-h__div"
30
+ }, Te = { class: "sr-h__clock" }, Ee = { class: "sr-h__time" }, Ve = { class: "sr-h__date" }, De = { class: "sr-h__bellpop" }, xe = { class: "sr-h__menu" }, Ie = { class: "sr-h__mhead" }, Ae = {
34
31
  key: 0,
35
- class: "cv6h__msep"
36
- }, Ee = ["onClick"], Le = ["innerHTML"], Ne = {
32
+ class: "sr-h__msep"
33
+ }, Ne = ["onClick"], Re = ["innerHTML"], He = {
37
34
  key: 1,
38
- class: "cv6h__mico"
39
- }, Te = /* @__PURE__ */ R({
35
+ class: "sr-h__mico"
36
+ }, Ue = /* @__PURE__ */ T({
40
37
  __name: "SrAppHeader",
41
38
  props: {
42
39
  logo: { default: "/assets/interface.svg" },
43
40
  title: { default: "视频汇聚平台 V3" },
44
41
  subtitle: { default: "VIDEO CONVERGENCE PLATFORM" },
45
- menus: { default: () => oe },
42
+ menus: { default: () => ce },
46
43
  activeKey: { default: void 0 },
47
44
  showWeather: { type: Boolean, default: !0 },
48
45
  weather: { default: () => ({ temp: "26°C", condition: "多云", windDir: "东南风", windLevel: "3级" }) },
49
46
  showDivider: { type: Boolean, default: !0 },
50
- showClock: { type: Boolean, default: !0 },
51
- showBell: { type: Boolean, default: !0 },
52
47
  bellCount: { default: 0 },
53
48
  userName: { default: "超级管理员(someray)" },
54
- userMenus: { default: () => le }
49
+ userMenus: { default: () => de }
55
50
  },
56
51
  emits: ["nav-select", "bell-click", "menu-select"],
57
- setup(s, { emit: m }) {
58
- const _ = m, w = (a) => !!a && /^\s*</.test(a), h = M(!1), k = M(!1), b = () => {
59
- k.value = !1, h.value = !h.value, _("bell-click");
60
- }, x = () => {
61
- h.value = !1, k.value = !k.value;
62
- }, i = (a) => {
63
- k.value = !1, a.key && _("menu-select", a.key);
64
- }, z = () => {
65
- h.value = !1, k.value = !1;
66
- }, D = M("--:--:--"), S = M("----");
67
- let t;
68
- const f = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], y = (a) => String(a).padStart(2, "0"), $ = () => {
69
- const a = /* @__PURE__ */ new Date();
70
- D.value = y(a.getHours()) + ":" + y(a.getMinutes()) + ":" + y(a.getSeconds()), S.value = a.getFullYear() + "-" + y(a.getMonth() + 1) + "-" + y(a.getDate()) + " " + f[a.getDay()];
71
- }, N = se();
72
- return X(() => N.fullPath, z), Z(() => {
73
- $(), t = window.setInterval($, 1e3), document.addEventListener("click", z);
74
- }), ee(() => {
75
- t && clearInterval(t), document.removeEventListener("click", z);
76
- }), (a, r) => {
77
- const T = d("router-link"), A = d("a-badge");
78
- return o(), l("header", ne, [
79
- e("div", ce, [
80
- P(a.$slots, "brand", {}, () => [
81
- n(T, {
82
- class: "cv6h__logo",
52
+ setup(t, { emit: s }) {
53
+ const i = s, y = (_) => !!_ && /^\s*</.test(_), v = M(!1), f = M(!1), $ = () => {
54
+ f.value = !1, v.value = !v.value, i("bell-click");
55
+ }, S = () => {
56
+ v.value = !1, f.value = !f.value;
57
+ }, u = (_) => {
58
+ f.value = !1, _.key && i("menu-select", _.key);
59
+ }, C = () => {
60
+ v.value = !1, f.value = !1;
61
+ }, V = M("--:--:--"), z = M("----");
62
+ let l;
63
+ const h = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], b = (_) => String(_).padStart(2, "0"), B = () => {
64
+ const _ = /* @__PURE__ */ new Date();
65
+ V.value = b(_.getHours()) + ":" + b(_.getMinutes()) + ":" + b(_.getSeconds()), z.value = _.getFullYear() + "-" + b(_.getMonth() + 1) + "-" + b(_.getDate()) + " " + h[_.getDay()];
66
+ }, H = re();
67
+ return ne(() => H.fullPath, C), J(() => {
68
+ B(), l = window.setInterval(B, 1e3), document.addEventListener("click", C);
69
+ }), ae(() => {
70
+ l && clearInterval(l), document.removeEventListener("click", C);
71
+ }), (_, p) => {
72
+ const U = m("router-link"), O = m("a-badge");
73
+ return o(), n("header", ue, [
74
+ e("div", he, [
75
+ d(_.$slots, "brand", {}, () => [
76
+ r(U, {
77
+ class: "sr-h__logo",
83
78
  to: "/home",
84
79
  "aria-label": "首页"
85
80
  }, {
86
- default: u(() => [
87
- s.logo ? (o(), l("img", {
81
+ default: a(() => [
82
+ t.logo ? (o(), n("img", {
88
83
  key: 0,
89
- src: s.logo,
84
+ src: t.logo,
90
85
  alt: ""
91
- }, null, 8, ae)) : p("", !0)
86
+ }, null, 8, _e)) : k("", !0)
92
87
  ]),
93
88
  _: 1
94
89
  }),
95
- e("div", ie, [
96
- e("h1", de, v(s.title), 1),
97
- s.subtitle ? (o(), l("p", re, v(s.subtitle), 1)) : p("", !0)
90
+ e("div", ve, [
91
+ e("h1", fe, g(t.title), 1),
92
+ t.subtitle ? (o(), n("p", me, g(t.subtitle), 1)) : k("", !0)
98
93
  ])
99
94
  ], !0)
100
95
  ]),
101
- e("nav", ue, [
102
- e("div", ve, [
103
- (o(!0), l(B, null, E(s.menus, (c, V) => (o(), I(U(c.to ? "router-link" : "a"), {
104
- key: c.key ?? V,
105
- class: L(["cv6h__item", { "is-active": s.activeKey != null && c.key === s.activeKey }]),
96
+ e("nav", pe, [
97
+ e("div", ye, [
98
+ (o(!0), n(D, null, R(t.menus, (c, x) => (o(), N(F(c.to ? "router-link" : "a"), {
99
+ key: c.key ?? x,
100
+ class: W(["sr-h__item", { "is-active": t.activeKey != null && c.key === t.activeKey }]),
106
101
  to: c.to,
107
- onClick: (H) => _("nav-select", c)
102
+ onClick: (P) => i("nav-select", c)
108
103
  }, {
109
- default: u(() => [
110
- w(c.icon) ? (o(), l("span", {
104
+ default: a(() => [
105
+ y(c.icon) ? (o(), n("span", {
111
106
  key: 0,
112
- class: "cv6h__ico",
107
+ class: "sr-h__ico",
113
108
  innerHTML: c.icon
114
- }, null, 8, _e)) : c.icon ? (o(), l("span", he, [
115
- (o(), I(U(c.icon)))
116
- ])) : p("", !0),
117
- e("span", null, v(c.label), 1)
109
+ }, null, 8, ge)) : c.icon ? (o(), n("span", ke, [
110
+ (o(), N(F(c.icon)))
111
+ ])) : k("", !0),
112
+ e("span", null, g(c.label), 1)
118
113
  ]),
119
114
  _: 2
120
115
  }, 1032, ["class", "to", "onClick"]))), 128))
121
116
  ])
122
117
  ]),
123
- e("div", pe, [
124
- s.showWeather ? (o(), l(B, { key: 0 }, [
125
- e("div", me, [
126
- r[2] || (r[2] = e("span", { class: "cv6h__wico" }, [
118
+ e("div", be, [
119
+ t.showWeather ? (o(), n(D, { key: 0 }, [
120
+ e("div", $e, [
121
+ p[2] || (p[2] = e("span", { class: "sr-h__wico" }, [
127
122
  e("svg", { viewBox: "0 0 24 24" }, [
128
123
  e("path", { d: "M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z" }),
129
124
  e("circle", {
@@ -135,38 +130,37 @@ const oe = [
135
130
  })
136
131
  ])
137
132
  ], -1)),
138
- e("div", ke, [
139
- e("span", ge, v(s.weather.temp), 1),
140
- e("span", ye, v(s.weather.condition), 1)
133
+ e("div", we, [
134
+ e("span", Me, g(t.weather.temp), 1),
135
+ e("span", Se, g(t.weather.condition), 1)
141
136
  ])
142
137
  ]),
143
- s.showDivider ? (o(), l("span", fe)) : p("", !0),
144
- e("div", we, [
145
- e("span", be, v(s.weather.windDir), 1),
146
- e("span", xe, v(s.weather.windLevel), 1)
138
+ t.showDivider ? (o(), n("span", ze)) : k("", !0),
139
+ e("div", Ce, [
140
+ e("span", Be, g(t.weather.windDir), 1),
141
+ e("span", Le, g(t.weather.windLevel), 1)
147
142
  ]),
148
- s.showDivider ? (o(), l("span", Me)) : p("", !0)
149
- ], 64)) : p("", !0),
150
- s.showClock ? (o(), l("div", $e, [
151
- e("span", Ce, v(D.value), 1),
152
- e("span", Be, v(S.value), 1)
153
- ])) : p("", !0),
154
- s.showBell ? (o(), l("div", {
155
- key: 2,
156
- class: "cv6h__bellwrap",
157
- onClick: r[0] || (r[0] = W(() => {
143
+ t.showDivider ? (o(), n("span", We)) : k("", !0)
144
+ ], 64)) : k("", !0),
145
+ e("div", Te, [
146
+ e("span", Ee, g(V.value), 1),
147
+ e("span", Ve, g(z.value), 1)
148
+ ]),
149
+ e("div", {
150
+ class: "sr-h__bellwrap",
151
+ onClick: p[0] || (p[0] = q(() => {
158
152
  }, ["stop"]))
159
153
  }, [
160
- n(A, {
161
- count: s.bellCount,
154
+ r(O, {
155
+ count: t.bellCount,
162
156
  "max-count": 99
163
157
  }, {
164
- default: u(() => [
158
+ default: a(() => [
165
159
  e("span", {
166
- class: "cv6h__bell",
160
+ class: "sr-h__bell",
167
161
  title: "告警",
168
- onClick: b
169
- }, [...r[3] || (r[3] = [
162
+ onClick: $
163
+ }, [...p[3] || (p[3] = [
170
164
  e("svg", { viewBox: "0 0 24 24" }, [
171
165
  e("path", { d: "M6 9a6 6 0 0 1 12 0c0 5 2 6 2 6H4s2-1 2-6" }),
172
166
  e("path", { d: "M10 19a2 2 0 0 0 4 0" })
@@ -175,26 +169,26 @@ const oe = [
175
169
  ]),
176
170
  _: 1
177
171
  }, 8, ["count"]),
178
- j(e("div", Se, [
179
- P(a.$slots, "bell", {}, () => [
180
- r[4] || (r[4] = e("div", { class: "cv6h__bell-empty" }, "暂无告警", -1))
172
+ G(e("div", De, [
173
+ d(_.$slots, "bell", {}, () => [
174
+ p[4] || (p[4] = e("div", { class: "sr-h__bell-empty" }, "暂无告警", -1))
181
175
  ], !0)
182
176
  ], 512), [
183
- [q, h.value]
177
+ [Y, v.value]
184
178
  ])
185
- ])) : p("", !0),
179
+ ]),
186
180
  e("div", {
187
- class: "cv6h__tools",
188
- onClick: r[1] || (r[1] = W(() => {
181
+ class: "sr-h__tools",
182
+ onClick: p[1] || (p[1] = q(() => {
189
183
  }, ["stop"]))
190
184
  }, [
191
185
  e("button", {
192
- class: "cv6h__menubtn",
186
+ class: "sr-h__menubtn",
193
187
  "aria-label": "更多",
194
- onClick: x
195
- }, [...r[5] || (r[5] = [
188
+ onClick: S
189
+ }, [...p[5] || (p[5] = [
196
190
  e("svg", {
197
- class: "cv6h__moreico",
191
+ class: "sr-h__moreico",
198
192
  viewBox: "0 0 24 24"
199
193
  }, [
200
194
  e("rect", {
@@ -220,138 +214,138 @@ const oe = [
220
214
  })
221
215
  ], -1)
222
216
  ])]),
223
- j(e("div", ze, [
224
- s.userName ? (o(), l(B, { key: 0 }, [
225
- e("div", Ve, v(s.userName), 1),
226
- r[6] || (r[6] = e("div", { class: "cv6h__msep" }, null, -1))
227
- ], 64)) : p("", !0),
228
- (o(!0), l(B, null, E(s.userMenus, (c, V) => (o(), l(B, {
229
- key: c.key ?? V
217
+ G(e("div", xe, [
218
+ t.userName ? (o(), n(D, { key: 0 }, [
219
+ e("div", Ie, g(t.userName), 1),
220
+ p[6] || (p[6] = e("div", { class: "sr-h__msep" }, null, -1))
221
+ ], 64)) : k("", !0),
222
+ (o(!0), n(D, null, R(t.userMenus, (c, x) => (o(), n(D, {
223
+ key: c.key ?? x
230
224
  }, [
231
- c.divider ? (o(), l("div", De)) : (o(), l("a", {
225
+ c.divider ? (o(), n("div", Ae)) : (o(), n("a", {
232
226
  key: 1,
233
- class: L(["cv6h__mitem", { danger: c.danger }]),
234
- onClick: (H) => i(c)
227
+ class: W(["sr-h__mitem", { danger: c.danger }]),
228
+ onClick: (P) => u(c)
235
229
  }, [
236
- w(c.icon) ? (o(), l("span", {
230
+ y(c.icon) ? (o(), n("span", {
237
231
  key: 0,
238
- class: "cv6h__mico",
232
+ class: "sr-h__mico",
239
233
  innerHTML: c.icon
240
- }, null, 8, Le)) : c.icon ? (o(), l("span", Ne, [
241
- (o(), I(U(c.icon)))
242
- ])) : p("", !0),
243
- e("span", null, v(c.label), 1)
244
- ], 10, Ee))
234
+ }, null, 8, Re)) : c.icon ? (o(), n("span", He, [
235
+ (o(), N(F(c.icon)))
236
+ ])) : k("", !0),
237
+ e("span", null, g(c.label), 1)
238
+ ], 10, Ne))
245
239
  ], 64))), 128))
246
240
  ], 512), [
247
- [q, k.value]
241
+ [Y, f.value]
248
242
  ])
249
243
  ])
250
244
  ])
251
245
  ]);
252
246
  };
253
247
  }
254
- }), F = (s, m) => {
255
- const _ = s.__vccOpts || s;
256
- for (const [w, h] of m)
257
- _[w] = h;
258
- return _;
259
- }, Ae = /* @__PURE__ */ F(Te, [["__scopeId", "data-v-9d23d618"]]), He = { class: "res" }, Ie = { class: "res-tabs" }, Ue = ["onClick"], Oe = { class: "res-pad" }, Re = { class: "res-listhead" }, Fe = { class: "res-acts" }, Ke = { class: "res-tree" }, Pe = {
248
+ }), E = (t, s) => {
249
+ const i = t.__vccOpts || t;
250
+ for (const [y, v] of s)
251
+ i[y] = v;
252
+ return i;
253
+ }, Oe = /* @__PURE__ */ E(Ue, [["__scopeId", "data-v-39ec7a9e"]]), Pe = { class: "res" }, Fe = { class: "res-tabs" }, Ke = ["onClick"], Xe = { class: "res-pad" }, je = { class: "res-listhead" }, qe = { class: "res-acts" }, Ge = { class: "res-tree" }, Ye = {
260
254
  key: 0,
261
255
  class: "res-cnt"
262
- }, We = {
256
+ }, Je = {
263
257
  key: 0,
264
258
  class: "ptz"
265
- }, je = { class: "ptz-head" }, qe = { class: "joy" }, Ge = { class: "ar up" }, Ye = { class: "ar dn" }, Je = { class: "ar lf" }, Qe = { class: "ar rt" }, Xe = { class: "speed" }, Ze = { class: "zoom" }, et = /* @__PURE__ */ R({
259
+ }, Qe = { class: "ptz-head" }, Ze = { class: "joy" }, et = { class: "ar up" }, tt = { class: "ar dn" }, st = { class: "ar lf" }, ot = { class: "ar rt" }, lt = { class: "speed" }, nt = { class: "zoom" }, at = /* @__PURE__ */ T({
266
260
  __name: "SrResourceTree",
267
261
  props: {
268
262
  showPtz: { type: Boolean, default: !1 }
269
263
  },
270
264
  emits: ["select"],
271
- setup(s, { emit: m }) {
272
- const _ = m, w = [
265
+ setup(t, { emit: s }) {
266
+ const i = s, y = [
273
267
  { k: "dev", label: "设备" },
274
268
  { k: "group", label: "分组" },
275
269
  { k: "view", label: "视图" }
276
- ], h = M("group"), k = M([]), b = M(9), x = M(["c1"]), i = (S, t) => ({ key: S, title: t, isLeaf: !0, cam: !0 }), z = [
270
+ ], v = M("group"), f = M([]), $ = M(9), S = M(["c1"]), u = (z, l) => ({ key: z, title: l, isLeaf: !0, cam: !0 }), C = [
277
271
  {
278
272
  key: "g1",
279
273
  title: "齐鲁软件园",
280
274
  count: "(6/6)",
281
275
  children: [
282
- i("c1", "齐鲁软件园北(可控)"),
283
- i("c2", "齐鲁软件园东(可控)"),
284
- i("c3", "CD中间全景摄像机2"),
285
- i("c4", "软件园站西侧工地"),
286
- i("c5", "软件园站东侧工地"),
287
- i("c6", "B座A区室外全景南照联动球机")
276
+ u("c1", "齐鲁软件园北(可控)"),
277
+ u("c2", "齐鲁软件园东(可控)"),
278
+ u("c3", "CD中间全景摄像机2"),
279
+ u("c4", "软件园站西侧工地"),
280
+ u("c5", "软件园站东侧工地"),
281
+ u("c6", "B座A区室外全景南照联动球机")
288
282
  ]
289
283
  },
290
- { key: "g2", title: "混凝土", count: "(43/48)", children: [i("g2a", "混凝土车间东"), i("g2b", "混凝土搅拌站")] },
291
- { key: "g3", title: "建材", count: "(40/52)", children: [i("g3a", "建材仓库南门"), i("g3b", "建材装卸区")] },
292
- { key: "g4", title: "玻璃制品", count: "(1/2)", children: [i("g4a", "玻璃制品质检区")] },
293
- { key: "g5", title: "生物质发电", count: "(0/8)", children: [i("g5a", "发电主控室")] },
294
- { key: "g6", title: "鹊华机场", count: "(2/2)", children: [i("g6a", "鹊华机场北跑道")] },
295
- { key: "g7", title: "河流断面", count: "(4/4)", children: [i("g7a", "小清河断面")] },
296
- { key: "g8", title: "视频融合", count: "(39/42)", children: [i("g8a", "融合大屏-01")] },
297
- { key: "g9", title: "AI识别", count: "(43/45)", children: [i("g9a", "AI识别-机房")] }
298
- ], D = (S, t) => {
299
- var y;
300
- const f = (y = t == null ? void 0 : t.selectedNodes) == null ? void 0 : y[0];
301
- f != null && f.cam && (x.value = [f.key], _("select", f.title));
284
+ { key: "g2", title: "混凝土", count: "(43/48)", children: [u("g2a", "混凝土车间东"), u("g2b", "混凝土搅拌站")] },
285
+ { key: "g3", title: "建材", count: "(40/52)", children: [u("g3a", "建材仓库南门"), u("g3b", "建材装卸区")] },
286
+ { key: "g4", title: "玻璃制品", count: "(1/2)", children: [u("g4a", "玻璃制品质检区")] },
287
+ { key: "g5", title: "生物质发电", count: "(0/8)", children: [u("g5a", "发电主控室")] },
288
+ { key: "g6", title: "鹊华机场", count: "(2/2)", children: [u("g6a", "鹊华机场北跑道")] },
289
+ { key: "g7", title: "河流断面", count: "(4/4)", children: [u("g7a", "小清河断面")] },
290
+ { key: "g8", title: "视频融合", count: "(39/42)", children: [u("g8a", "融合大屏-01")] },
291
+ { key: "g9", title: "AI识别", count: "(43/45)", children: [u("g9a", "AI识别-机房")] }
292
+ ], V = (z, l) => {
293
+ var b;
294
+ const h = (b = l == null ? void 0 : l.selectedNodes) == null ? void 0 : b[0];
295
+ h != null && h.cam && (S.value = [h.key], i("select", h.title));
302
296
  };
303
- return (S, t) => {
304
- const f = d("icon-search"), y = d("a-input"), $ = d("a-option"), N = d("a-select"), a = d("icon-refresh"), r = d("a-tooltip"), T = d("icon-folder-add"), A = d("a-tree"), c = d("icon-up"), V = d("icon-down"), H = d("icon-left"), G = d("icon-right"), Y = d("a-slider"), J = d("icon-zoom-in"), K = d("a-button"), Q = d("icon-zoom-out");
305
- return o(), l("aside", He, [
306
- e("div", Ie, [
307
- (o(), l(B, null, E(w, (g) => e("a", {
308
- key: g.k,
309
- class: L({ active: h.value === g.k }),
310
- onClick: (ct) => h.value = g.k
311
- }, v(g.label), 11, Ue)), 64))
297
+ return (z, l) => {
298
+ const h = m("icon-search"), b = m("a-input"), B = m("a-option"), H = m("a-select"), _ = m("icon-refresh"), p = m("a-tooltip"), U = m("icon-folder-add"), O = m("a-tree"), c = m("icon-up"), x = m("icon-down"), P = m("icon-left"), te = m("icon-right"), se = m("a-slider"), oe = m("icon-zoom-in"), j = m("a-button"), le = m("icon-zoom-out");
299
+ return o(), n("aside", Pe, [
300
+ e("div", Fe, [
301
+ (o(), n(D, null, R(y, (w) => e("a", {
302
+ key: w.k,
303
+ class: W({ active: v.value === w.k }),
304
+ onClick: (Bt) => v.value = w.k
305
+ }, g(w.label), 11, Ke)), 64))
312
306
  ]),
313
- e("div", Oe, [
314
- n(y, {
307
+ e("div", Xe, [
308
+ r(b, {
315
309
  placeholder: "按名称搜索",
316
310
  "allow-clear": "",
317
311
  class: "res-search"
318
312
  }, {
319
- prefix: u(() => [
320
- n(f)
313
+ prefix: a(() => [
314
+ r(h)
321
315
  ]),
322
316
  _: 1
323
317
  }),
324
- n(N, {
325
- modelValue: k.value,
326
- "onUpdate:modelValue": t[0] || (t[0] = (g) => k.value = g),
318
+ r(H, {
319
+ modelValue: f.value,
320
+ "onUpdate:modelValue": l[0] || (l[0] = (w) => f.value = w),
327
321
  placeholder: "请选择标签",
328
322
  multiple: "",
329
323
  "allow-clear": "",
330
324
  "max-tag-count": 1,
331
325
  class: "res-tagsel"
332
326
  }, {
333
- default: u(() => [
334
- n($, { value: "key" }, {
335
- default: u(() => [...t[2] || (t[2] = [
336
- C("重点监控", -1)
327
+ default: a(() => [
328
+ r(B, { value: "key" }, {
329
+ default: a(() => [...l[2] || (l[2] = [
330
+ L("重点监控", -1)
337
331
  ])]),
338
332
  _: 1
339
333
  }),
340
- n($, { value: "ptz" }, {
341
- default: u(() => [...t[3] || (t[3] = [
342
- C("可控云台", -1)
334
+ r(B, { value: "ptz" }, {
335
+ default: a(() => [...l[3] || (l[3] = [
336
+ L("可控云台", -1)
343
337
  ])]),
344
338
  _: 1
345
339
  }),
346
- n($, { value: "alarm" }, {
347
- default: u(() => [...t[4] || (t[4] = [
348
- C("联网报警", -1)
340
+ r(B, { value: "alarm" }, {
341
+ default: a(() => [...l[4] || (l[4] = [
342
+ L("联网报警", -1)
349
343
  ])]),
350
344
  _: 1
351
345
  }),
352
- n($, { value: "ai" }, {
353
- default: u(() => [...t[5] || (t[5] = [
354
- C("AI 识别", -1)
346
+ r(B, { value: "ai" }, {
347
+ default: a(() => [...l[5] || (l[5] = [
348
+ L("AI 识别", -1)
355
349
  ])]),
356
350
  _: 1
357
351
  })
@@ -359,134 +353,382 @@ const oe = [
359
353
  _: 1
360
354
  }, 8, ["modelValue"])
361
355
  ]),
362
- e("div", Re, [
363
- t[6] || (t[6] = e("b", null, "资源列表", -1)),
364
- e("span", Fe, [
365
- n(r, { content: "刷新" }, {
366
- default: u(() => [
367
- n(a)
356
+ e("div", je, [
357
+ l[6] || (l[6] = e("b", null, "资源列表", -1)),
358
+ e("span", qe, [
359
+ r(p, { content: "刷新" }, {
360
+ default: a(() => [
361
+ r(_)
368
362
  ]),
369
363
  _: 1
370
364
  }),
371
- n(r, { content: "新建文件夹" }, {
372
- default: u(() => [
373
- n(T)
365
+ r(p, { content: "新建文件夹" }, {
366
+ default: a(() => [
367
+ r(U)
374
368
  ]),
375
369
  _: 1
376
370
  })
377
371
  ])
378
372
  ]),
379
- e("div", Ke, [
380
- n(A, {
381
- data: z,
373
+ e("div", Ge, [
374
+ r(O, {
375
+ data: C,
382
376
  "default-expanded-keys": ["g1"],
383
- "selected-keys": x.value,
377
+ "selected-keys": S.value,
384
378
  "block-node": "",
385
- onSelect: D
379
+ onSelect: V
386
380
  }, {
387
- extra: u((g) => [
388
- g.count ? (o(), l("span", Pe, v(g.count), 1)) : p("", !0)
381
+ extra: a((w) => [
382
+ w.count ? (o(), n("span", Ye, g(w.count), 1)) : k("", !0)
389
383
  ]),
390
384
  _: 1
391
385
  }, 8, ["selected-keys"])
392
386
  ]),
393
- s.showPtz ? (o(), l("div", We, [
394
- e("div", je, [
395
- t[7] || (t[7] = C("云台控制 ", -1)),
396
- n(c, { class: "ptz-chev" })
387
+ t.showPtz ? (o(), n("div", Je, [
388
+ e("div", Qe, [
389
+ l[7] || (l[7] = L("云台控制 ", -1)),
390
+ r(c, { class: "ptz-chev" })
397
391
  ]),
398
- e("div", qe, [
399
- e("span", Ge, [
400
- n(c)
392
+ e("div", Ze, [
393
+ e("span", et, [
394
+ r(c)
401
395
  ]),
402
- e("span", Ye, [
403
- n(V)
396
+ e("span", tt, [
397
+ r(x)
404
398
  ]),
405
- e("span", Je, [
406
- n(H)
399
+ e("span", st, [
400
+ r(P)
407
401
  ]),
408
- e("span", Qe, [
409
- n(G)
402
+ e("span", ot, [
403
+ r(te)
410
404
  ]),
411
- t[8] || (t[8] = e("span", { class: "knob" }, null, -1))
405
+ l[8] || (l[8] = e("span", { class: "knob" }, null, -1))
412
406
  ]),
413
- e("div", Xe, [
414
- t[9] || (t[9] = e("span", null, "云台速度", -1)),
415
- n(Y, {
416
- modelValue: b.value,
417
- "onUpdate:modelValue": t[1] || (t[1] = (g) => b.value = g),
407
+ e("div", lt, [
408
+ l[9] || (l[9] = e("span", null, "云台速度", -1)),
409
+ r(se, {
410
+ modelValue: $.value,
411
+ "onUpdate:modelValue": l[1] || (l[1] = (w) => $.value = w),
418
412
  min: 1,
419
413
  max: 10,
420
414
  style: { flex: 1 }
421
415
  }, null, 8, ["modelValue"]),
422
- e("b", null, v(b.value), 1)
416
+ e("b", null, g($.value), 1)
423
417
  ]),
424
- e("div", Ze, [
425
- n(K, {
418
+ e("div", nt, [
419
+ r(j, {
426
420
  long: "",
427
421
  size: "small"
428
422
  }, {
429
- icon: u(() => [
430
- n(J)
423
+ icon: a(() => [
424
+ r(oe)
431
425
  ]),
432
- default: u(() => [
433
- t[10] || (t[10] = C("放大", -1))
426
+ default: a(() => [
427
+ l[10] || (l[10] = L("放大", -1))
434
428
  ]),
435
429
  _: 1
436
430
  }),
437
- n(K, {
431
+ r(j, {
438
432
  long: "",
439
433
  size: "small"
440
434
  }, {
441
- icon: u(() => [
442
- n(Q)
435
+ icon: a(() => [
436
+ r(le)
443
437
  ]),
444
- default: u(() => [
445
- t[11] || (t[11] = C("缩小", -1))
438
+ default: a(() => [
439
+ l[11] || (l[11] = L("缩小", -1))
446
440
  ]),
447
441
  _: 1
448
442
  })
449
443
  ])
450
- ])) : p("", !0)
444
+ ])) : k("", !0)
451
445
  ]);
452
446
  };
453
447
  }
454
- }), tt = /* @__PURE__ */ F(et, [["__scopeId", "data-v-05bca26c"]]), st = ["onClick"], ot = /* @__PURE__ */ R({
448
+ }), it = /* @__PURE__ */ E(at, [["__scopeId", "data-v-05bca26c"]]), rt = ["onClick"], ct = /* @__PURE__ */ T({
455
449
  __name: "SrVideoWall",
456
450
  props: {
457
451
  count: {},
458
452
  active: {}
459
453
  },
460
454
  emits: ["update:active"],
461
- setup(s) {
462
- const m = s, _ = O(() => m.count === 6 ? 3 : Math.ceil(Math.sqrt(m.count))), w = O(() => Math.ceil(m.count / _.value)), h = O(() => ({
463
- gridTemplateColumns: `repeat(${_.value}, 1fr)`,
464
- gridTemplateRows: `repeat(${w.value}, 1fr)`
455
+ setup(t) {
456
+ const s = t, i = A(() => s.count === 6 ? 3 : Math.ceil(Math.sqrt(s.count))), y = A(() => Math.ceil(s.count / i.value)), v = A(() => ({
457
+ gridTemplateColumns: `repeat(${i.value}, 1fr)`,
458
+ gridTemplateRows: `repeat(${y.value}, 1fr)`
465
459
  }));
466
- return (k, b) => (o(), l("div", {
460
+ return (f, $) => (o(), n("div", {
467
461
  class: "wall",
468
- style: te(h.value)
462
+ style: X(v.value)
469
463
  }, [
470
- (o(!0), l(B, null, E(s.count, (x) => (o(), l("div", {
471
- key: x,
472
- class: L(["cell", { active: x - 1 === s.active }]),
473
- onClick: (i) => k.$emit("update:active", x - 1)
474
- }, [...b[0] || (b[0] = [
464
+ (o(!0), n(D, null, R(t.count, (S) => (o(), n("div", {
465
+ key: S,
466
+ class: W(["cell", { active: S - 1 === t.active }]),
467
+ onClick: (u) => f.$emit("update:active", S - 1)
468
+ }, [...$[0] || ($[0] = [
475
469
  e("span", { class: "nosrc" }, null, -1),
476
470
  e("span", { class: "cap" }, "未接入视频源", -1)
477
- ])], 10, st))), 128))
471
+ ])], 10, rt))), 128))
478
472
  ], 4));
479
473
  }
480
- }), lt = /* @__PURE__ */ F(ot, [["__scopeId", "data-v-6ebd5cbf"]]), nt = { SrAppHeader: Ae, SrResourceTree: tt, SrVideoWall: lt }, dt = {
481
- install(s) {
482
- for (const [m, _] of Object.entries(nt)) s.component(m, _);
474
+ }), dt = /* @__PURE__ */ E(ct, [["__scopeId", "data-v-6ebd5cbf"]]), ut = {}, ht = { class: "sr-content" };
475
+ function _t(t, s) {
476
+ return o(), n("div", ht, [
477
+ d(t.$slots, "default", {}, void 0, !0)
478
+ ]);
479
+ }
480
+ const vt = /* @__PURE__ */ E(ut, [["render", _t], ["__scopeId", "data-v-a8cca886"]]), ft = { class: "sr-content-area__body" }, mt = /* @__PURE__ */ T({
481
+ __name: "SrContentArea",
482
+ props: {
483
+ flush: { type: Boolean, default: !1 }
484
+ },
485
+ setup(t) {
486
+ return (s, i) => (o(), n("main", {
487
+ class: W(["sr-content-area", { flush: t.flush }])
488
+ }, [
489
+ e("div", ft, [
490
+ d(s.$slots, "default", {}, void 0, !0)
491
+ ]),
492
+ d(s.$slots, "toolbar", {}, void 0, !0)
493
+ ], 2));
494
+ }
495
+ }), Q = /* @__PURE__ */ E(mt, [["__scopeId", "data-v-e7160bcf"]]), pt = /* @__PURE__ */ T({
496
+ __name: "SrMonitorLayout",
497
+ props: {
498
+ flush: { type: Boolean, default: !1 }
499
+ },
500
+ setup(t) {
501
+ return (s, i) => (o(), n("div", {
502
+ class: W(["sr-monitor", { flush: t.flush }])
503
+ }, [
504
+ d(s.$slots, "left", {}, void 0, !0),
505
+ r(Q, { flush: t.flush }, I({
506
+ default: a(() => [
507
+ d(s.$slots, "default", {}, void 0, !0)
508
+ ]),
509
+ _: 2
510
+ }, [
511
+ s.$slots.toolbar ? {
512
+ name: "toolbar",
513
+ fn: a(() => [
514
+ d(s.$slots, "toolbar", {}, void 0, !0)
515
+ ]),
516
+ key: "0"
517
+ } : void 0
518
+ ]), 1032, ["flush"]),
519
+ d(s.$slots, "right", {}, void 0, !0)
520
+ ], 2));
521
+ }
522
+ }), Z = /* @__PURE__ */ E(pt, [["__scopeId", "data-v-1419f1f1"]]), yt = {
523
+ key: 0,
524
+ class: "sr-side__head"
525
+ }, gt = { class: "sr-side__body" }, kt = {
526
+ key: 1,
527
+ class: "sr-side__foot"
528
+ }, bt = /* @__PURE__ */ T({
529
+ __name: "SrSidePanel",
530
+ props: {
531
+ side: { default: "left" },
532
+ width: { default: "" },
533
+ title: { default: "" },
534
+ resizable: { type: Boolean, default: !0 },
535
+ minWidth: { default: 200 },
536
+ maxWidth: { default: 480 },
537
+ flush: { type: Boolean, default: !1 }
538
+ },
539
+ emits: ["resize"],
540
+ setup(t, { emit: s }) {
541
+ const i = t, y = s, v = M(), f = M(0), $ = M(!1), S = A(() => f.value > 0 ? f.value + "px" : i.width !== "" && i.width != null ? typeof i.width == "number" ? i.width + "px" : String(i.width) : i.side === "left" ? "var(--sider-w)" : "var(--rpanel-w)");
542
+ J(() => {
543
+ v.value && f.value === 0 && (f.value = v.value.offsetWidth);
544
+ });
545
+ let u = 0, C = 0;
546
+ const V = (h) => {
547
+ const b = h.clientX - u, B = i.side === "left" ? C + b : C - b;
548
+ f.value = Math.min(i.maxWidth, Math.max(i.minWidth, Math.round(B))), y("resize", f.value);
549
+ }, z = () => {
550
+ $.value && ($.value = !1, document.removeEventListener("mousemove", V), document.removeEventListener("mouseup", z), document.body.style.userSelect = "", document.body.style.cursor = "");
551
+ }, l = (h) => {
552
+ h.preventDefault(), u = h.clientX, C = v.value ? v.value.offsetWidth : f.value, $.value = !0, document.addEventListener("mousemove", V), document.addEventListener("mouseup", z), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize";
553
+ };
554
+ return ie(z), (h, b) => (o(), n("aside", {
555
+ ref_key: "root",
556
+ ref: v,
557
+ class: W(["sr-side", [t.side, { flush: t.flush }]]),
558
+ style: X({ width: S.value })
559
+ }, [
560
+ t.title || h.$slots.header ? (o(), n("div", yt, [
561
+ d(h.$slots, "header", {}, () => [
562
+ L(g(t.title), 1)
563
+ ], !0)
564
+ ])) : k("", !0),
565
+ e("div", gt, [
566
+ d(h.$slots, "default", {}, void 0, !0)
567
+ ]),
568
+ h.$slots.footer ? (o(), n("div", kt, [
569
+ d(h.$slots, "footer", {}, void 0, !0)
570
+ ])) : k("", !0),
571
+ t.resizable ? (o(), n("div", {
572
+ key: 2,
573
+ class: W(["sr-side__resizer", t.side]),
574
+ title: "拖动调整宽度",
575
+ onMousedown: l
576
+ }, null, 34)) : k("", !0)
577
+ ], 6));
578
+ }
579
+ }), K = /* @__PURE__ */ E(bt, [["__scopeId", "data-v-b64f19e9"]]), $t = {
580
+ key: 0,
581
+ class: "sr-toolbar__seg sr-toolbar__left"
582
+ }, wt = { class: "sr-toolbar__seg sr-toolbar__center" }, Mt = {
583
+ key: 1,
584
+ class: "sr-toolbar__seg sr-toolbar__right"
585
+ }, St = /* @__PURE__ */ T({
586
+ __name: "SrToolbar",
587
+ props: {
588
+ height: { default: 46 }
589
+ },
590
+ setup(t) {
591
+ const s = t, i = A(() => typeof s.height == "number" ? s.height + "px" : s.height);
592
+ return (y, v) => (o(), n("div", {
593
+ class: "sr-toolbar",
594
+ style: X({ height: i.value })
595
+ }, [
596
+ y.$slots.left ? (o(), n("div", $t, [
597
+ d(y.$slots, "left", {}, void 0, !0)
598
+ ])) : k("", !0),
599
+ e("div", wt, [
600
+ d(y.$slots, "default", {}, void 0, !0)
601
+ ]),
602
+ y.$slots.right ? (o(), n("div", Mt, [
603
+ d(y.$slots, "right", {}, void 0, !0)
604
+ ])) : k("", !0)
605
+ ], 4));
606
+ }
607
+ }), ee = /* @__PURE__ */ E(St, [["__scopeId", "data-v-21d717eb"]]), zt = /* @__PURE__ */ T({
608
+ __name: "SrWorkspace",
609
+ props: {
610
+ leftTitle: { default: "" },
611
+ rightTitle: { default: "" },
612
+ leftWidth: { default: "" },
613
+ rightWidth: { default: "" },
614
+ leftResizable: { type: Boolean, default: !0 },
615
+ rightResizable: { type: Boolean, default: !0 },
616
+ flush: { type: Boolean, default: !1 }
617
+ },
618
+ setup(t) {
619
+ return (s, i) => (o(), N(Z, { flush: t.flush }, I({
620
+ default: a(() => [
621
+ d(s.$slots, "default")
622
+ ]),
623
+ _: 2
624
+ }, [
625
+ s.$slots.left ? {
626
+ name: "left",
627
+ fn: a(() => [
628
+ r(K, {
629
+ side: "left",
630
+ title: t.leftTitle,
631
+ width: t.leftWidth,
632
+ resizable: t.leftResizable,
633
+ flush: t.flush
634
+ }, I({
635
+ default: a(() => [
636
+ d(s.$slots, "left")
637
+ ]),
638
+ _: 2
639
+ }, [
640
+ s.$slots["left-footer"] ? {
641
+ name: "footer",
642
+ fn: a(() => [
643
+ d(s.$slots, "left-footer")
644
+ ]),
645
+ key: "0"
646
+ } : void 0
647
+ ]), 1032, ["title", "width", "resizable", "flush"])
648
+ ]),
649
+ key: "0"
650
+ } : void 0,
651
+ s.$slots.toolbar || s.$slots["toolbar-left"] || s.$slots["toolbar-right"] ? {
652
+ name: "toolbar",
653
+ fn: a(() => [
654
+ r(ee, null, I({
655
+ default: a(() => [
656
+ d(s.$slots, "toolbar")
657
+ ]),
658
+ _: 2
659
+ }, [
660
+ s.$slots["toolbar-left"] ? {
661
+ name: "left",
662
+ fn: a(() => [
663
+ d(s.$slots, "toolbar-left")
664
+ ]),
665
+ key: "0"
666
+ } : void 0,
667
+ s.$slots["toolbar-right"] ? {
668
+ name: "right",
669
+ fn: a(() => [
670
+ d(s.$slots, "toolbar-right")
671
+ ]),
672
+ key: "1"
673
+ } : void 0
674
+ ]), 1024)
675
+ ]),
676
+ key: "1"
677
+ } : void 0,
678
+ s.$slots.right ? {
679
+ name: "right",
680
+ fn: a(() => [
681
+ r(K, {
682
+ side: "right",
683
+ title: t.rightTitle,
684
+ width: t.rightWidth,
685
+ resizable: t.rightResizable,
686
+ flush: t.flush
687
+ }, I({
688
+ default: a(() => [
689
+ d(s.$slots, "right")
690
+ ]),
691
+ _: 2
692
+ }, [
693
+ s.$slots["right-footer"] ? {
694
+ name: "footer",
695
+ fn: a(() => [
696
+ d(s.$slots, "right-footer")
697
+ ]),
698
+ key: "0"
699
+ } : void 0
700
+ ]), 1032, ["title", "width", "resizable", "flush"])
701
+ ]),
702
+ key: "2"
703
+ } : void 0
704
+ ]), 1032, ["flush"]));
705
+ }
706
+ }), Ct = {
707
+ SrAppHeader: Oe,
708
+ SrResourceTree: it,
709
+ SrVideoWall: dt,
710
+ SrContent: vt,
711
+ SrMonitorLayout: Z,
712
+ SrContentArea: Q,
713
+ SrSidePanel: K,
714
+ SrToolbar: ee,
715
+ SrWorkspace: zt
716
+ }, Tt = {
717
+ install(t) {
718
+ for (const [s, i] of Object.entries(Ct)) t.component(s, i);
483
719
  }
484
720
  };
485
721
  export {
486
- oe as DEFAULT_MENUS,
487
- le as DEFAULT_USER_MENUS,
488
- Ae as SrAppHeader,
489
- tt as SrResourceTree,
490
- lt as SrVideoWall,
491
- dt as default
722
+ ce as DEFAULT_MENUS,
723
+ de as DEFAULT_USER_MENUS,
724
+ Oe as SrAppHeader,
725
+ vt as SrContent,
726
+ Q as SrContentArea,
727
+ Z as SrMonitorLayout,
728
+ it as SrResourceTree,
729
+ K as SrSidePanel,
730
+ ee as SrToolbar,
731
+ dt as SrVideoWall,
732
+ zt as SrWorkspace,
733
+ Tt as default
492
734
  };