@das-fed/ui 6.4.0-test.52 → 6.4.0-test.54
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/package.json +5 -5
- package/packages/business-components/device-panel/index.js +589 -591
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +296 -298
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/style.css +1 -1
- package/packages/business-components/user-org-dialog/style.css.gz +0 -0
- package/packages/business-components/video-dialog/index.js +217 -211
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/src/hooks/use-video/PlayerProvider.d.ts +11 -1
- package/packages/business-components/video-dialog/src/type.d.ts +2 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/video-dialog/style.css';
|
|
2
|
-
import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as K, nextTick as P, unref as l, ref as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { t as
|
|
5
|
-
import { DasDialog as
|
|
2
|
+
import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as K, nextTick as P, unref as l, ref as w, watch as N, defineComponent as D, useCssVars as pe, computed as x, createElementBlock as O, openBlock as k, normalizeClass as ve, renderSlot as X, createCommentVNode as I, Fragment as J, renderList as fe, createBlock as F, withCtx as m, withModifiers as _, createVNode as d, createElementVNode as p, toDisplayString as V, toRefs as me } from "vue";
|
|
3
|
+
import { withInstall as ge } from "@das-fed/utils/with-install/index";
|
|
4
|
+
import { t as g, setI18nRule as Ce } from "@das-fed/web/packages/i18n/index";
|
|
5
|
+
import { DasDialog as ye } from "@das-fed/ui/packages/components/dialog/index";
|
|
6
6
|
import { DasTooltip as h } from "@das-fed/ui/packages/components/tooltip/index";
|
|
7
|
-
import { DasIconFullscreen2 as
|
|
7
|
+
import { DasIconFullscreen2 as ke } from "@das-fed/ui/packages/icons/fullscreen-2/index";
|
|
8
8
|
import { DasAutoRegisterIcon as _e, DasIcon as L } from "@das-fed/ui/packages/components/icon/index";
|
|
9
9
|
import { DasLivePlayer as we } from "@das-fed/ui/packages/components/live-player/index";
|
|
10
10
|
import { DasSpin as he } from "@das-fed/ui/packages/components/spin/index";
|
|
@@ -12,13 +12,13 @@ import be from "dayjs";
|
|
|
12
12
|
import { createService as ee } from "@das-fed/utils/api-services/src/create-service";
|
|
13
13
|
import { getProjectInfo as M, getToken as Ie } from "@das-fed/utils/common-info";
|
|
14
14
|
var A;
|
|
15
|
-
const B = typeof window < "u", Ee = (t) => typeof t == "string",
|
|
15
|
+
const B = typeof window < "u", Ee = (t) => typeof t == "string", Fe = () => {
|
|
16
16
|
};
|
|
17
17
|
B && ((A = window == null ? void 0 : window.navigator) != null && A.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
18
18
|
function te(t) {
|
|
19
19
|
return typeof t == "function" ? t() : l(t);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ne(t) {
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
24
24
|
function oe(t) {
|
|
@@ -36,19 +36,19 @@ const Re = B ? window : void 0, ze = B ? window.document : void 0;
|
|
|
36
36
|
function Oe(...t) {
|
|
37
37
|
let n, e, i, s;
|
|
38
38
|
if (Ee(t[0]) || Array.isArray(t[0]) ? ([e, i, s] = t, n = Re) : [n, e, i, s] = t, !n)
|
|
39
|
-
return
|
|
39
|
+
return Fe;
|
|
40
40
|
Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
|
|
41
41
|
const o = [], a = () => {
|
|
42
42
|
o.forEach((c) => c()), o.length = 0;
|
|
43
|
-
},
|
|
44
|
-
a(), c && o.push(...e.flatMap((
|
|
45
|
-
}, { immediate: !0, flush: "post" }),
|
|
43
|
+
}, y = (c, f, C, E) => (c.addEventListener(f, C, E), () => c.removeEventListener(f, C, E)), r = N(() => [ne(n), te(s)], ([c, f]) => {
|
|
44
|
+
a(), c && o.push(...e.flatMap((C) => i.map((E) => y(c, C, E, f))));
|
|
45
|
+
}, { immediate: !0, flush: "post" }), v = () => {
|
|
46
46
|
r(), a();
|
|
47
47
|
};
|
|
48
|
-
return oe(
|
|
48
|
+
return oe(v), v;
|
|
49
49
|
}
|
|
50
50
|
function De(t, n = !1) {
|
|
51
|
-
const e =
|
|
51
|
+
const e = w(), i = () => e.value = !!t();
|
|
52
52
|
return i(), Se(i, n), e;
|
|
53
53
|
}
|
|
54
54
|
const Q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, q = "__vueuse_ssr_handlers__";
|
|
@@ -96,9 +96,9 @@ const G = [
|
|
|
96
96
|
]
|
|
97
97
|
];
|
|
98
98
|
function le(t, n = {}) {
|
|
99
|
-
const { document: e = ze, autoExit: i = !1 } = n, s = t || (e == null ? void 0 : e.querySelector("html")), o =
|
|
99
|
+
const { document: e = ze, autoExit: i = !1 } = n, s = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
|
|
100
100
|
let a = G[0];
|
|
101
|
-
const
|
|
101
|
+
const y = De(() => {
|
|
102
102
|
if (e) {
|
|
103
103
|
for (const S of G)
|
|
104
104
|
if (S[1] in e)
|
|
@@ -106,27 +106,27 @@ function le(t, n = {}) {
|
|
|
106
106
|
} else
|
|
107
107
|
return !1;
|
|
108
108
|
return !1;
|
|
109
|
-
}), [r,
|
|
110
|
-
async function
|
|
111
|
-
|
|
109
|
+
}), [r, v, c, , f] = a;
|
|
110
|
+
async function C() {
|
|
111
|
+
y.value && (e != null && e[c] && await e[v](), o.value = !1);
|
|
112
112
|
}
|
|
113
113
|
async function E() {
|
|
114
|
-
if (!
|
|
114
|
+
if (!y.value)
|
|
115
115
|
return;
|
|
116
|
-
await
|
|
116
|
+
await C();
|
|
117
117
|
const S = ne(s);
|
|
118
118
|
S && (await S[r](), o.value = !0);
|
|
119
119
|
}
|
|
120
120
|
async function $() {
|
|
121
|
-
o.value ? await
|
|
121
|
+
o.value ? await C() : await E();
|
|
122
122
|
}
|
|
123
|
-
return e && Oe(e,
|
|
123
|
+
return e && Oe(e, f, () => {
|
|
124
124
|
o.value = !!(e != null && e[c]);
|
|
125
|
-
}, !1), i && oe(
|
|
126
|
-
isSupported:
|
|
125
|
+
}, !1), i && oe(C), {
|
|
126
|
+
isSupported: y,
|
|
127
127
|
isFullscreen: o,
|
|
128
128
|
enter: E,
|
|
129
|
-
exit:
|
|
129
|
+
exit: C,
|
|
130
130
|
toggle: $
|
|
131
131
|
};
|
|
132
132
|
}
|
|
@@ -142,7 +142,7 @@ var $e = Object.defineProperty, H = Object.getOwnPropertySymbols, Le = Object.pr
|
|
|
142
142
|
Pe.call(n, e) && Y(t, e, n[e]);
|
|
143
143
|
return t;
|
|
144
144
|
};
|
|
145
|
-
const
|
|
145
|
+
const Ue = {
|
|
146
146
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
147
147
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
148
148
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -169,9 +169,9 @@ const Te = {
|
|
|
169
169
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
170
170
|
};
|
|
171
171
|
xe({
|
|
172
|
-
linear:
|
|
173
|
-
},
|
|
174
|
-
const
|
|
172
|
+
linear: Ne
|
|
173
|
+
}, Ue);
|
|
174
|
+
const Te = /* @__PURE__ */ D({
|
|
175
175
|
__name: "GridItem",
|
|
176
176
|
props: {
|
|
177
177
|
active: { type: Boolean },
|
|
@@ -180,23 +180,23 @@ const Ue = /* @__PURE__ */ D({
|
|
|
180
180
|
emits: ["itemClick"],
|
|
181
181
|
setup(t, { emit: n }) {
|
|
182
182
|
pe((c) => ({
|
|
183
|
-
"9b3a2c32":
|
|
183
|
+
"9b3a2c32": v.value
|
|
184
184
|
}));
|
|
185
|
-
const e = t, i = n, s =
|
|
185
|
+
const e = t, i = n, s = w(), { toggle: o, isFullscreen: a } = le(s), y = () => {
|
|
186
186
|
s.value != document.fullscreenElement && (a.value ? (a.value = !1, P(() => {
|
|
187
187
|
o();
|
|
188
188
|
})) : o());
|
|
189
189
|
}, r = () => {
|
|
190
190
|
i("itemClick");
|
|
191
|
-
},
|
|
192
|
-
return (c,
|
|
191
|
+
}, v = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
|
|
192
|
+
return (c, f) => (k(), O(
|
|
193
193
|
"div",
|
|
194
194
|
{
|
|
195
195
|
ref_key: "containerRef",
|
|
196
196
|
ref: s,
|
|
197
197
|
class: ve(["wrapper", { "is-active": e.active }]),
|
|
198
|
-
onDblclick:
|
|
199
|
-
onClick:
|
|
198
|
+
onDblclick: f[0] || (f[0] = (C) => y()),
|
|
199
|
+
onClick: f[1] || (f[1] = (C) => r())
|
|
200
200
|
},
|
|
201
201
|
[
|
|
202
202
|
X(c.$slots, "default", {}, void 0, !0)
|
|
@@ -205,12 +205,12 @@ const Ue = /* @__PURE__ */ D({
|
|
|
205
205
|
/* CLASS, NEED_HYDRATION */
|
|
206
206
|
));
|
|
207
207
|
}
|
|
208
|
-
}),
|
|
208
|
+
}), U = (t, n) => {
|
|
209
209
|
const e = t.__vccOpts || t;
|
|
210
210
|
for (const [i, s] of n)
|
|
211
211
|
e[i] = s;
|
|
212
212
|
return e;
|
|
213
|
-
}, Ve = /* @__PURE__ */
|
|
213
|
+
}, Ve = /* @__PURE__ */ U(Te, [["__scopeId", "data-v-100b67ca"]]), Be = { class: "layout-wrapper" }, je = /* @__PURE__ */ D({
|
|
214
214
|
__name: "GridLayout",
|
|
215
215
|
props: {
|
|
216
216
|
gridNum: {},
|
|
@@ -222,17 +222,17 @@ const Ue = /* @__PURE__ */ D({
|
|
|
222
222
|
const e = t, i = n, s = (o) => {
|
|
223
223
|
i("update:activeIndex", o);
|
|
224
224
|
};
|
|
225
|
-
return (o, a) => (
|
|
225
|
+
return (o, a) => (k(), O("div", Be, [
|
|
226
226
|
I(' :active="index === activeIndex" '),
|
|
227
|
-
(
|
|
227
|
+
(k(!0), O(
|
|
228
228
|
J,
|
|
229
229
|
null,
|
|
230
|
-
fe(e.gridNum, (
|
|
230
|
+
fe(e.gridNum, (y, r) => (k(), F(Ve, {
|
|
231
231
|
active: !1,
|
|
232
232
|
"grid-num": e.gridNum,
|
|
233
|
-
onItemClick: (
|
|
233
|
+
onItemClick: (v) => s(r)
|
|
234
234
|
}, {
|
|
235
|
-
default:
|
|
235
|
+
default: m(() => [
|
|
236
236
|
o.showFn(r) ? X(o.$slots, "default", {
|
|
237
237
|
key: 0,
|
|
238
238
|
index: r
|
|
@@ -246,123 +246,123 @@ const Ue = /* @__PURE__ */ D({
|
|
|
246
246
|
))
|
|
247
247
|
]));
|
|
248
248
|
}
|
|
249
|
-
}), Me = /* @__PURE__ */
|
|
249
|
+
}), Me = /* @__PURE__ */ U(je, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ D({
|
|
250
250
|
__name: "DirectionControl",
|
|
251
251
|
emits: ["change"],
|
|
252
252
|
setup(t, { emit: n }) {
|
|
253
253
|
const e = n, i = (s) => {
|
|
254
254
|
e("change", s);
|
|
255
255
|
};
|
|
256
|
-
return (s, o) => (
|
|
256
|
+
return (s, o) => (k(), O(
|
|
257
257
|
"div",
|
|
258
258
|
{
|
|
259
259
|
class: "direction-control",
|
|
260
|
-
onDblclick: o[9] || (o[9] =
|
|
260
|
+
onDblclick: o[9] || (o[9] = _((a) => a.stopPropagation(), ["stop"]))
|
|
261
261
|
},
|
|
262
262
|
[
|
|
263
|
-
|
|
264
|
-
content: l(
|
|
263
|
+
d(l(h), {
|
|
264
|
+
content: l(g)("左上")
|
|
265
265
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
|
|
266
|
+
default: m(() => [
|
|
267
|
+
p("div", {
|
|
268
268
|
class: "icon icon-top-left",
|
|
269
|
-
onClick: o[0] || (o[0] =
|
|
269
|
+
onClick: o[0] || (o[0] = _((a) => i("leftUp"), ["stop"]))
|
|
270
270
|
})
|
|
271
271
|
]),
|
|
272
272
|
_: 1
|
|
273
273
|
/* STABLE */
|
|
274
274
|
}, 8, ["content"]),
|
|
275
|
-
|
|
276
|
-
content: l(
|
|
275
|
+
d(l(h), {
|
|
276
|
+
content: l(g)("上")
|
|
277
277
|
}, {
|
|
278
|
-
default:
|
|
279
|
-
|
|
278
|
+
default: m(() => [
|
|
279
|
+
p("div", {
|
|
280
280
|
class: "icon icon-top",
|
|
281
|
-
onClick: o[1] || (o[1] =
|
|
281
|
+
onClick: o[1] || (o[1] = _((a) => i("up"), ["stop"]))
|
|
282
282
|
})
|
|
283
283
|
]),
|
|
284
284
|
_: 1
|
|
285
285
|
/* STABLE */
|
|
286
286
|
}, 8, ["content"]),
|
|
287
|
-
|
|
288
|
-
content: l(
|
|
287
|
+
d(l(h), {
|
|
288
|
+
content: l(g)("右上")
|
|
289
289
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
|
|
290
|
+
default: m(() => [
|
|
291
|
+
p("div", {
|
|
292
292
|
class: "icon icon-top-right",
|
|
293
|
-
onClick: o[2] || (o[2] =
|
|
293
|
+
onClick: o[2] || (o[2] = _((a) => i("rightUp"), ["stop"]))
|
|
294
294
|
})
|
|
295
295
|
]),
|
|
296
296
|
_: 1
|
|
297
297
|
/* STABLE */
|
|
298
298
|
}, 8, ["content"]),
|
|
299
|
-
|
|
300
|
-
content: l(
|
|
299
|
+
d(l(h), {
|
|
300
|
+
content: l(g)("左")
|
|
301
301
|
}, {
|
|
302
|
-
default:
|
|
303
|
-
|
|
302
|
+
default: m(() => [
|
|
303
|
+
p("div", {
|
|
304
304
|
class: "icon icon-left",
|
|
305
|
-
onClick: o[3] || (o[3] =
|
|
305
|
+
onClick: o[3] || (o[3] = _((a) => i("left"), ["stop"]))
|
|
306
306
|
})
|
|
307
307
|
]),
|
|
308
308
|
_: 1
|
|
309
309
|
/* STABLE */
|
|
310
310
|
}, 8, ["content"]),
|
|
311
|
-
|
|
312
|
-
content: l(
|
|
311
|
+
d(l(h), {
|
|
312
|
+
content: l(g)("自动")
|
|
313
313
|
}, {
|
|
314
|
-
default:
|
|
315
|
-
|
|
314
|
+
default: m(() => [
|
|
315
|
+
p("div", {
|
|
316
316
|
class: "icon icon-auto",
|
|
317
|
-
onClick: o[4] || (o[4] =
|
|
317
|
+
onClick: o[4] || (o[4] = _((a) => i("auto"), ["stop"]))
|
|
318
318
|
})
|
|
319
319
|
]),
|
|
320
320
|
_: 1
|
|
321
321
|
/* STABLE */
|
|
322
322
|
}, 8, ["content"]),
|
|
323
|
-
|
|
324
|
-
content: l(
|
|
323
|
+
d(l(h), {
|
|
324
|
+
content: l(g)("右")
|
|
325
325
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
|
|
326
|
+
default: m(() => [
|
|
327
|
+
p("div", {
|
|
328
328
|
class: "icon icon-right",
|
|
329
|
-
onClick: o[5] || (o[5] =
|
|
329
|
+
onClick: o[5] || (o[5] = _((a) => i("right"), ["stop"]))
|
|
330
330
|
})
|
|
331
331
|
]),
|
|
332
332
|
_: 1
|
|
333
333
|
/* STABLE */
|
|
334
334
|
}, 8, ["content"]),
|
|
335
|
-
|
|
336
|
-
content: l(
|
|
335
|
+
d(l(h), {
|
|
336
|
+
content: l(g)("左下")
|
|
337
337
|
}, {
|
|
338
|
-
default:
|
|
339
|
-
|
|
338
|
+
default: m(() => [
|
|
339
|
+
p("div", {
|
|
340
340
|
class: "icon icon-bottom-left",
|
|
341
|
-
onClick: o[6] || (o[6] =
|
|
341
|
+
onClick: o[6] || (o[6] = _((a) => i("leftDown"), ["stop"]))
|
|
342
342
|
})
|
|
343
343
|
]),
|
|
344
344
|
_: 1
|
|
345
345
|
/* STABLE */
|
|
346
346
|
}, 8, ["content"]),
|
|
347
|
-
|
|
348
|
-
content: l(
|
|
347
|
+
d(l(h), {
|
|
348
|
+
content: l(g)("下")
|
|
349
349
|
}, {
|
|
350
|
-
default:
|
|
351
|
-
|
|
350
|
+
default: m(() => [
|
|
351
|
+
p("div", {
|
|
352
352
|
class: "icon icon-bottom",
|
|
353
|
-
onClick: o[7] || (o[7] =
|
|
353
|
+
onClick: o[7] || (o[7] = _((a) => i("down"), ["stop"]))
|
|
354
354
|
})
|
|
355
355
|
]),
|
|
356
356
|
_: 1
|
|
357
357
|
/* STABLE */
|
|
358
358
|
}, 8, ["content"]),
|
|
359
|
-
|
|
360
|
-
content: l(
|
|
359
|
+
d(l(h), {
|
|
360
|
+
content: l(g)("右下")
|
|
361
361
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
|
|
362
|
+
default: m(() => [
|
|
363
|
+
p("div", {
|
|
364
364
|
class: "icon icon-bottom-right",
|
|
365
|
-
onClick: o[8] || (o[8] =
|
|
365
|
+
onClick: o[8] || (o[8] = _((a) => i("rightDown"), ["stop"]))
|
|
366
366
|
})
|
|
367
367
|
]),
|
|
368
368
|
_: 1
|
|
@@ -373,7 +373,7 @@ const Ue = /* @__PURE__ */ D({
|
|
|
373
373
|
/* NEED_HYDRATION */
|
|
374
374
|
));
|
|
375
375
|
}
|
|
376
|
-
}), Qe = /* @__PURE__ */
|
|
376
|
+
}), Qe = /* @__PURE__ */ U(Ae, [["__scopeId", "data-v-db2e8ec2"]]), qe = { class: "video-wrapper" }, Ge = { class: "video-top" }, We = { class: "video-top_l" }, He = { class: "video-title-wrapper" }, Ye = { class: "video-title" }, Ze = { class: "video-top_r" }, Ke = {
|
|
377
377
|
key: 0,
|
|
378
378
|
class: "play-status"
|
|
379
379
|
}, Xe = { class: "video-bottom" }, Je = { class: "video-bottom_r" }, et = /* @__PURE__ */ D({
|
|
@@ -399,55 +399,55 @@ const Ue = /* @__PURE__ */ D({
|
|
|
399
399
|
enlarge: import("@das-fed/ui/packages/icons/enlarge"),
|
|
400
400
|
"direction-control": import("@das-fed/ui/packages/icons/direction-control")
|
|
401
401
|
});
|
|
402
|
-
const s =
|
|
403
|
-
var
|
|
404
|
-
return (
|
|
405
|
-
}),
|
|
406
|
-
o.value =
|
|
402
|
+
const s = w(!0), o = w(), a = w(!1), y = w(), r = x(() => {
|
|
403
|
+
var u;
|
|
404
|
+
return (u = y.value) == null ? void 0 : u.video;
|
|
405
|
+
}), v = w(!1), c = w(!0), f = (u) => {
|
|
406
|
+
o.value = u, o.value.on(window.mpegts.Events.ERROR, (b) => {
|
|
407
407
|
});
|
|
408
|
-
},
|
|
408
|
+
}, C = () => {
|
|
409
409
|
s.value = !s.value, o.value && (o.value.muted = s.value);
|
|
410
410
|
}, E = () => {
|
|
411
411
|
a.value = !a.value;
|
|
412
|
-
}, $ =
|
|
413
|
-
const
|
|
412
|
+
}, $ = w(""), S = () => {
|
|
413
|
+
const u = document.createElement("canvas");
|
|
414
414
|
if (r.value) {
|
|
415
|
-
|
|
416
|
-
const b =
|
|
417
|
-
b == null || b.drawImage(r.value, 0, 0,
|
|
418
|
-
const z =
|
|
415
|
+
u.width = r.value.clientWidth, u.height = r.value.clientHeight;
|
|
416
|
+
const b = u.getContext("2d");
|
|
417
|
+
b == null || b.drawImage(r.value, 0, 0, u.width, u.height);
|
|
418
|
+
const z = u.toDataURL("image/jpg"), ae = `【${e.title}】${be().format("YYYYMMDDHHmmss").toString()}.jpg`;
|
|
419
419
|
if ($.value = z, "download" in document.createElement("a")) {
|
|
420
420
|
const R = document.createElement("a");
|
|
421
|
-
R.download = ae, R.style.display = "none", R.href = z, document.body.appendChild(R), document.body.appendChild(
|
|
421
|
+
R.download = ae, R.style.display = "none", R.href = z, document.body.appendChild(R), document.body.appendChild(u), R.click(), URL.revokeObjectURL(R.href), document.body.removeChild(R), document.body.removeChild(u);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
}, se = (
|
|
425
|
-
i("directionControl",
|
|
426
|
-
}, j = (
|
|
427
|
-
i("zoomControl",
|
|
428
|
-
},
|
|
429
|
-
return
|
|
424
|
+
}, se = (u) => {
|
|
425
|
+
i("directionControl", u);
|
|
426
|
+
}, j = (u) => {
|
|
427
|
+
i("zoomControl", u);
|
|
428
|
+
}, T = (u) => e.authType.includes(u);
|
|
429
|
+
return N(
|
|
430
430
|
() => r.value,
|
|
431
431
|
() => {
|
|
432
432
|
r.value && r.value.addEventListener("ended", () => {
|
|
433
|
-
|
|
433
|
+
v.value = !0, e.type === "playback" && (c.value = !1);
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
),
|
|
436
|
+
), N(
|
|
437
437
|
() => r.value,
|
|
438
438
|
() => {
|
|
439
439
|
r.value && P(() => {
|
|
440
440
|
r.value.playbackRate = e.playbackRate || 1;
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
-
),
|
|
443
|
+
), N(
|
|
444
444
|
() => o.value,
|
|
445
445
|
() => {
|
|
446
446
|
o.value && P(() => {
|
|
447
447
|
o.value.muted = s.value;
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
),
|
|
450
|
+
), N(
|
|
451
451
|
() => e.playbackRate,
|
|
452
452
|
() => {
|
|
453
453
|
r.value && (r.value.playbackRate = e.playbackRate || 1);
|
|
@@ -455,29 +455,29 @@ const Ue = /* @__PURE__ */ D({
|
|
|
455
455
|
{
|
|
456
456
|
immediate: !0
|
|
457
457
|
}
|
|
458
|
-
),
|
|
458
|
+
), N(
|
|
459
459
|
() => e.paused,
|
|
460
460
|
() => {
|
|
461
461
|
o.value && (e.paused ? o.value.pause() : o.value.play());
|
|
462
462
|
}
|
|
463
|
-
),
|
|
463
|
+
), N(
|
|
464
464
|
() => e.videoUrl,
|
|
465
465
|
() => {
|
|
466
466
|
c.value = !1, P(() => {
|
|
467
467
|
c.value = !0;
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
), (
|
|
471
|
-
|
|
470
|
+
), (u, b) => (k(), O("div", qe, [
|
|
471
|
+
d(l(he), {
|
|
472
472
|
spinning: e.loading,
|
|
473
473
|
type: "component",
|
|
474
|
-
tip: l(
|
|
474
|
+
tip: l(g)("加载中...")
|
|
475
475
|
}, {
|
|
476
|
-
default:
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
476
|
+
default: m(() => [
|
|
477
|
+
p("div", Ge, [
|
|
478
|
+
p("div", We, [
|
|
479
|
+
p("div", He, [
|
|
480
|
+
p(
|
|
481
481
|
"div",
|
|
482
482
|
Ye,
|
|
483
483
|
V(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title),
|
|
@@ -486,108 +486,108 @@ const Ue = /* @__PURE__ */ D({
|
|
|
486
486
|
)
|
|
487
487
|
])
|
|
488
488
|
]),
|
|
489
|
-
|
|
490
|
-
["live"].includes(
|
|
489
|
+
p("div", Ze, [
|
|
490
|
+
["live"].includes(u.type) ? (k(), O(
|
|
491
491
|
"span",
|
|
492
492
|
Ke,
|
|
493
|
-
V(l(
|
|
493
|
+
V(l(g)("正在实时预览")),
|
|
494
494
|
1
|
|
495
495
|
/* TEXT */
|
|
496
496
|
)) : I("v-if", !0),
|
|
497
497
|
I(' <das-icon v-if="isFullscreen" class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
|
|
498
498
|
])
|
|
499
499
|
]),
|
|
500
|
-
e.videoUrl && c.value ? (
|
|
500
|
+
e.videoUrl && c.value ? (k(), F(l(we), {
|
|
501
501
|
key: 0,
|
|
502
502
|
type: "flv",
|
|
503
503
|
ref_key: "dasLivePlayerRef",
|
|
504
|
-
ref:
|
|
504
|
+
ref: y,
|
|
505
505
|
muted: s.value,
|
|
506
|
-
onLoaded:
|
|
506
|
+
onLoaded: f,
|
|
507
507
|
src: e.videoUrl
|
|
508
508
|
}, null, 8, ["muted", "src"])) : I("v-if", !0),
|
|
509
|
-
|
|
510
|
-
b[3] || (b[3] =
|
|
509
|
+
p("div", Xe, [
|
|
510
|
+
b[3] || (b[3] = p(
|
|
511
511
|
"div",
|
|
512
512
|
{ class: "video-bottom_l" },
|
|
513
513
|
null,
|
|
514
514
|
-1
|
|
515
515
|
/* HOISTED */
|
|
516
516
|
)),
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
p("div", Je, [
|
|
518
|
+
p(
|
|
519
519
|
"div",
|
|
520
520
|
{
|
|
521
521
|
class: "controls",
|
|
522
|
-
onDblclick: b[2] || (b[2] =
|
|
522
|
+
onDblclick: b[2] || (b[2] = _((z) => z.stopPropagation(), ["stop"]))
|
|
523
523
|
},
|
|
524
524
|
[
|
|
525
|
-
|
|
526
|
-
content: l(
|
|
525
|
+
d(l(h), {
|
|
526
|
+
content: l(g)("声音")
|
|
527
527
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
528
|
+
default: m(() => [
|
|
529
|
+
d(l(L), {
|
|
530
530
|
class: "icon icon-volume",
|
|
531
531
|
icon: s.value ? "muted" : "volume",
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: _(C, ["stop"])
|
|
533
533
|
}, null, 8, ["icon"])
|
|
534
534
|
]),
|
|
535
535
|
_: 1
|
|
536
536
|
/* STABLE */
|
|
537
537
|
}, 8, ["content"]),
|
|
538
|
-
|
|
539
|
-
content: l(
|
|
538
|
+
d(l(h), {
|
|
539
|
+
content: l(g)("截图")
|
|
540
540
|
}, {
|
|
541
|
-
default:
|
|
542
|
-
|
|
541
|
+
default: m(() => [
|
|
542
|
+
d(l(L), {
|
|
543
543
|
class: "icon icon-screenshot",
|
|
544
544
|
icon: "screenshot",
|
|
545
|
-
onClick:
|
|
545
|
+
onClick: _(S, ["stop"])
|
|
546
546
|
})
|
|
547
547
|
]),
|
|
548
548
|
_: 1
|
|
549
549
|
/* STABLE */
|
|
550
550
|
}, 8, ["content"]),
|
|
551
|
-
|
|
551
|
+
T("control") ? (k(), F(l(h), {
|
|
552
552
|
key: 0,
|
|
553
|
-
content: l(
|
|
553
|
+
content: l(g)("聚焦-")
|
|
554
554
|
}, {
|
|
555
|
-
default:
|
|
556
|
-
["live", "polling"].includes(e.type) ? (
|
|
555
|
+
default: m(() => [
|
|
556
|
+
["live", "polling"].includes(e.type) ? (k(), F(l(L), {
|
|
557
557
|
key: 0,
|
|
558
558
|
class: "icon icon-shrink",
|
|
559
559
|
icon: "shrink",
|
|
560
|
-
onClick: b[0] || (b[0] =
|
|
560
|
+
onClick: b[0] || (b[0] = _((z) => j("zoomOut"), ["stop"]))
|
|
561
561
|
})) : I("v-if", !0)
|
|
562
562
|
]),
|
|
563
563
|
_: 1
|
|
564
564
|
/* STABLE */
|
|
565
565
|
}, 8, ["content"])) : I("v-if", !0),
|
|
566
|
-
|
|
566
|
+
T("control") ? (k(), F(l(h), {
|
|
567
567
|
key: 1,
|
|
568
|
-
content: l(
|
|
568
|
+
content: l(g)("聚焦+")
|
|
569
569
|
}, {
|
|
570
|
-
default:
|
|
571
|
-
["live", "polling"].includes(e.type) ? (
|
|
570
|
+
default: m(() => [
|
|
571
|
+
["live", "polling"].includes(e.type) ? (k(), F(l(L), {
|
|
572
572
|
key: 0,
|
|
573
573
|
class: "icon icon-enlarge",
|
|
574
574
|
icon: "enlarge",
|
|
575
|
-
onClick: b[1] || (b[1] =
|
|
575
|
+
onClick: b[1] || (b[1] = _((z) => j("zoomIn"), ["stop"]))
|
|
576
576
|
})) : I("v-if", !0)
|
|
577
577
|
]),
|
|
578
578
|
_: 1
|
|
579
579
|
/* STABLE */
|
|
580
580
|
}, 8, ["content"])) : I("v-if", !0),
|
|
581
|
-
|
|
581
|
+
T("control") ? (k(), F(l(h), {
|
|
582
582
|
key: 2,
|
|
583
|
-
content: l(
|
|
583
|
+
content: l(g)("方向控制")
|
|
584
584
|
}, {
|
|
585
|
-
default:
|
|
586
|
-
["live", "polling"].includes(e.type) ? (
|
|
585
|
+
default: m(() => [
|
|
586
|
+
["live", "polling"].includes(e.type) ? (k(), F(l(L), {
|
|
587
587
|
key: 0,
|
|
588
588
|
class: "icon icon-direction-control",
|
|
589
589
|
icon: "direction-control",
|
|
590
|
-
onClick:
|
|
590
|
+
onClick: _(E, ["stop"])
|
|
591
591
|
})) : I("v-if", !0)
|
|
592
592
|
]),
|
|
593
593
|
_: 1
|
|
@@ -599,7 +599,7 @@ const Ue = /* @__PURE__ */ D({
|
|
|
599
599
|
)
|
|
600
600
|
])
|
|
601
601
|
]),
|
|
602
|
-
a.value ? (
|
|
602
|
+
a.value ? (k(), F(Qe, {
|
|
603
603
|
key: 1,
|
|
604
604
|
onChange: se
|
|
605
605
|
})) : I("v-if", !0)
|
|
@@ -609,7 +609,7 @@ const Ue = /* @__PURE__ */ D({
|
|
|
609
609
|
}, 8, ["spinning", "tip"])
|
|
610
610
|
]));
|
|
611
611
|
}
|
|
612
|
-
}), tt = /* @__PURE__ */
|
|
612
|
+
}), tt = /* @__PURE__ */ U(et, [["__scopeId", "data-v-9cfa053b"]]), ot = "/api/device-relation/deviceproject/v1/project/device/video", nt = "v1", lt = ee(`/api/enterpriseright/permission/${nt}`), ie = ee(`${ot}`, it);
|
|
613
613
|
function it(t) {
|
|
614
614
|
const n = M() ? M().id : 1;
|
|
615
615
|
return t.params || (t.params = {}), t.params.project = n, t.params.projectId = n, t;
|
|
@@ -631,7 +631,7 @@ const st = (t) => {
|
|
|
631
631
|
const n = Ie();
|
|
632
632
|
return `${t}?token=${n}`;
|
|
633
633
|
};
|
|
634
|
-
|
|
634
|
+
w([]);
|
|
635
635
|
const at = /* @__PURE__ */ D({
|
|
636
636
|
props: {
|
|
637
637
|
deviceInfo: {
|
|
@@ -640,6 +640,10 @@ const at = /* @__PURE__ */ D({
|
|
|
640
640
|
},
|
|
641
641
|
source: {
|
|
642
642
|
type: String
|
|
643
|
+
},
|
|
644
|
+
streamUrlField: {
|
|
645
|
+
type: String,
|
|
646
|
+
default: "wsFlvStreamURL"
|
|
643
647
|
}
|
|
644
648
|
},
|
|
645
649
|
setup(t, {
|
|
@@ -647,58 +651,59 @@ const at = /* @__PURE__ */ D({
|
|
|
647
651
|
}) {
|
|
648
652
|
const {
|
|
649
653
|
deviceInfo: e,
|
|
650
|
-
source: i
|
|
651
|
-
|
|
654
|
+
source: i,
|
|
655
|
+
streamUrlField: s
|
|
656
|
+
} = me(t), o = w(!1), a = w(""), y = async () => {
|
|
652
657
|
var C;
|
|
653
658
|
if (!((C = e.value) != null && C.deviceId)) return;
|
|
654
|
-
|
|
655
|
-
const [
|
|
659
|
+
o.value = !0;
|
|
660
|
+
const [c, f] = await rt({
|
|
656
661
|
productId: e.value.productId,
|
|
657
662
|
deviceId: e.value.deviceId,
|
|
658
663
|
source: i.value
|
|
659
664
|
});
|
|
660
|
-
|
|
661
|
-
},
|
|
665
|
+
c || (a.value = st(f == null ? void 0 : f[s.value])), o.value = !1;
|
|
666
|
+
}, r = (c) => {
|
|
662
667
|
Z({
|
|
663
668
|
productId: e.value.productId,
|
|
664
669
|
deviceId: e.value.deviceId,
|
|
665
|
-
direction:
|
|
670
|
+
direction: c,
|
|
666
671
|
zoom: "",
|
|
667
672
|
source: i.value || "web"
|
|
668
673
|
});
|
|
669
|
-
},
|
|
674
|
+
}, v = (c) => {
|
|
670
675
|
Z({
|
|
671
676
|
productId: e.value.productId,
|
|
672
677
|
deviceId: e.value.deviceId,
|
|
673
678
|
direction: "",
|
|
674
|
-
zoom:
|
|
679
|
+
zoom: c,
|
|
675
680
|
source: i.value || "web"
|
|
676
681
|
});
|
|
677
682
|
};
|
|
678
683
|
return K(() => {
|
|
679
|
-
|
|
680
|
-
}),
|
|
681
|
-
|
|
684
|
+
y();
|
|
685
|
+
}), N(() => e.value, () => {
|
|
686
|
+
y();
|
|
682
687
|
}, {
|
|
683
688
|
deep: !0
|
|
684
|
-
}), () =>
|
|
685
|
-
videoUrl:
|
|
686
|
-
loading:
|
|
687
|
-
onDirectionControl:
|
|
688
|
-
onZoomControl:
|
|
689
|
+
}), () => d(J, null, [n.default({
|
|
690
|
+
videoUrl: a.value,
|
|
691
|
+
loading: o.value,
|
|
692
|
+
onDirectionControl: r,
|
|
693
|
+
onZoomControl: v
|
|
689
694
|
})]);
|
|
690
695
|
}
|
|
691
696
|
});
|
|
692
697
|
function ct(t) {
|
|
693
|
-
const n =
|
|
698
|
+
const n = w(0), e = w(), {
|
|
694
699
|
toggle: i,
|
|
695
700
|
isFullscreen: s,
|
|
696
701
|
exit: o
|
|
697
|
-
} = le(e), a = (r,
|
|
702
|
+
} = le(e), a = (r, v) => {
|
|
698
703
|
s.value && o();
|
|
699
704
|
};
|
|
700
705
|
return {
|
|
701
|
-
render: () =>
|
|
706
|
+
render: () => d(Me, {
|
|
702
707
|
ref: e,
|
|
703
708
|
gridNum: t.gridNum,
|
|
704
709
|
activeIndex: n.value,
|
|
@@ -708,26 +713,26 @@ function ct(t) {
|
|
|
708
713
|
default: ({
|
|
709
714
|
index: r
|
|
710
715
|
}) => {
|
|
711
|
-
const
|
|
712
|
-
return
|
|
713
|
-
deviceInfo:
|
|
716
|
+
const v = t.deviceList[r], c = t.source;
|
|
717
|
+
return d(at, {
|
|
718
|
+
deviceInfo: v,
|
|
714
719
|
source: c
|
|
715
720
|
}, {
|
|
716
721
|
default: ({
|
|
717
|
-
videoUrl:
|
|
718
|
-
onDirectionControl:
|
|
722
|
+
videoUrl: f,
|
|
723
|
+
onDirectionControl: C,
|
|
719
724
|
onZoomControl: E,
|
|
720
725
|
loading: $
|
|
721
|
-
}) =>
|
|
726
|
+
}) => d(tt, {
|
|
722
727
|
type: "live",
|
|
723
728
|
loading: $,
|
|
724
729
|
isFullscreen: s.value,
|
|
725
|
-
videoUrl:
|
|
726
|
-
title:
|
|
730
|
+
videoUrl: f,
|
|
731
|
+
title: v.deviceName,
|
|
727
732
|
onClose: () => a(),
|
|
728
|
-
onDirectionControl:
|
|
733
|
+
onDirectionControl: C,
|
|
729
734
|
onZoomControl: E,
|
|
730
|
-
authType:
|
|
735
|
+
authType: v.authType === 2 ? ["control"] : []
|
|
731
736
|
}, null)
|
|
732
737
|
});
|
|
733
738
|
}
|
|
@@ -741,14 +746,15 @@ const ut = /* @__PURE__ */ D({
|
|
|
741
746
|
visible: { type: Boolean, default: !1 },
|
|
742
747
|
deviceList: { default: () => [] },
|
|
743
748
|
gridNum: { default: 4 },
|
|
744
|
-
source: {}
|
|
749
|
+
source: {},
|
|
750
|
+
streamUrlField: {}
|
|
745
751
|
},
|
|
746
752
|
emits: ["update:visible"],
|
|
747
753
|
setup(t, { emit: n }) {
|
|
748
754
|
const e = t, i = n, s = x({
|
|
749
755
|
get: () => e.visible,
|
|
750
756
|
set: (r) => i("update:visible", r)
|
|
751
|
-
}), { render: o, toggleFullscreen: a } = ct(e),
|
|
757
|
+
}), { render: o, toggleFullscreen: a } = ct(e), y = x(() => {
|
|
752
758
|
let r = {};
|
|
753
759
|
switch (e.gridNum) {
|
|
754
760
|
case 1:
|
|
@@ -763,33 +769,33 @@ const ut = /* @__PURE__ */ D({
|
|
|
763
769
|
}
|
|
764
770
|
return r;
|
|
765
771
|
});
|
|
766
|
-
return (r,
|
|
772
|
+
return (r, v) => (k(), F(l(ye), {
|
|
767
773
|
size: "mini",
|
|
768
|
-
title: l(
|
|
769
|
-
"custom-class": `das-linakge-video-dialog ${
|
|
774
|
+
title: l(g)("视频监控"),
|
|
775
|
+
"custom-class": `das-linakge-video-dialog ${y.value}`,
|
|
770
776
|
modelValue: s.value,
|
|
771
|
-
"onUpdate:modelValue":
|
|
777
|
+
"onUpdate:modelValue": v[0] || (v[0] = (c) => s.value = c),
|
|
772
778
|
bodyStyle: { padding: 0 },
|
|
773
779
|
"close-on-click-modal": !1,
|
|
774
780
|
"close-on-press-escape": !1,
|
|
775
781
|
modal: !1,
|
|
776
782
|
"header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
|
|
777
783
|
}, {
|
|
778
|
-
header:
|
|
779
|
-
|
|
780
|
-
|
|
784
|
+
header: m(() => [
|
|
785
|
+
p("div", null, [
|
|
786
|
+
p(
|
|
781
787
|
"span",
|
|
782
788
|
null,
|
|
783
|
-
V(l(
|
|
789
|
+
V(l(g)("视频监控")),
|
|
784
790
|
1
|
|
785
791
|
/* TEXT */
|
|
786
792
|
)
|
|
787
793
|
]),
|
|
788
|
-
|
|
789
|
-
content: l(
|
|
794
|
+
d(l(h), {
|
|
795
|
+
content: l(g)("页面全屏")
|
|
790
796
|
}, {
|
|
791
|
-
default:
|
|
792
|
-
|
|
797
|
+
default: m(() => [
|
|
798
|
+
d(l(ke), {
|
|
793
799
|
class: "icon",
|
|
794
800
|
color: "#999",
|
|
795
801
|
onClick: l(a)
|
|
@@ -799,8 +805,8 @@ const ut = /* @__PURE__ */ D({
|
|
|
799
805
|
/* STABLE */
|
|
800
806
|
}, 8, ["content"])
|
|
801
807
|
]),
|
|
802
|
-
default:
|
|
803
|
-
s.value ? (
|
|
808
|
+
default: m(() => [
|
|
809
|
+
s.value ? (k(), F(l(o), { key: 0 })) : I("v-if", !0)
|
|
804
810
|
]),
|
|
805
811
|
_: 1
|
|
806
812
|
/* STABLE */
|
|
@@ -828,8 +834,8 @@ const ut = /* @__PURE__ */ D({
|
|
|
828
834
|
"聚焦-": { "zh-CN": "聚焦-", en: "Focus-", _appCode: "framework" },
|
|
829
835
|
"聚焦+": { "zh-CN": "聚焦+", en: "Focus+", _appCode: "framework" }
|
|
830
836
|
};
|
|
831
|
-
|
|
832
|
-
const It =
|
|
837
|
+
Ce(dt);
|
|
838
|
+
const It = ge(ut), Et = () => w(null);
|
|
833
839
|
export {
|
|
834
840
|
It as DasVideoDialog,
|
|
835
841
|
Et as DasVideoDialogRef,
|