@das-fed/ui 6.4.0-dev.26 → 6.4.0-dev.27
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 +1131 -1114
- 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/process-search-form/index.js +1 -1
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/hooks/useProcessTable.d.ts +14 -13
- package/packages/business-components/process-table/index.d.ts +67 -18
- package/packages/business-components/process-table/index.js +527 -522
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/process-table/src/App.vue.d.ts +16 -4
- package/packages/business-components/process-table/style.css +1 -1
- package/packages/business-components/urgent-panel/index.js +1341 -1324
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/src/components/urgentPanelModal/hooks/index.d.ts +4 -1
- package/packages/business-components/urgent-panel/style.css +1 -1
- package/packages/business-components/urgent-panel/style.css.gz +0 -0
- package/packages/business-components/video-dialog/index.js +234 -225
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/src/api.d.ts +3 -0
- package/packages/business-components/video-dialog/src/hooks/use-video/PlayerProvider.d.ts +6 -0
- package/packages/business-components/video-dialog/src/type.d.ts +2 -0
- package/packages/components/edit-table/index.js +959 -957
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/index.vue.d.ts +4 -1
- package/packages/components/search/index.js +54 -106
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/src/Index.vue.d.ts +1 -1
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/table/index.d.ts +11 -2
- package/packages/components/table/index.js +2886 -2881
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +1 -0
- package/packages/components/table/src/type.d.ts +3 -4
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/video-dialog/style.css';
|
|
2
|
-
import { getCurrentScope as re, onScopeDispose as ae, unref as a, getCurrentInstance as ce, onMounted as Y, nextTick as L, ref as
|
|
2
|
+
import { getCurrentScope as re, onScopeDispose as ae, unref as a, getCurrentInstance as ce, onMounted as Y, nextTick as L, ref as _, watch as O, defineComponent as $, useCssVars as ue, computed as x, openBlock as y, createElementBlock as R, normalizeClass as de, renderSlot as Z, createCommentVNode as I, Fragment as K, renderList as ve, createBlock as h, withCtx as m, withModifiers as k, createVNode as v, createElementVNode as p, toDisplayString as pe, toRefs as fe } from "vue";
|
|
3
3
|
import { withInstall as me } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { DasDialog as ge } from "@das-fed/ui/packages/components/dialog/index";
|
|
5
|
-
import { DasTooltip as
|
|
5
|
+
import { DasTooltip as w } from "@das-fed/ui/packages/components/tooltip/index";
|
|
6
6
|
import { DasIconFullscreen2 as ye } from "@das-fed/ui/packages/icons/fullscreen-2/index";
|
|
7
7
|
import { DasAutoRegisterIcon as ke, DasIcon as P } from "@das-fed/ui/packages/components/icon/index";
|
|
8
8
|
import { DasLivePlayer as _e } from "@das-fed/ui/packages/components/live-player/index";
|
|
9
|
-
import { DasSpin as
|
|
10
|
-
import
|
|
9
|
+
import { DasSpin as be } from "@das-fed/ui/packages/components/spin/index";
|
|
10
|
+
import we from "dayjs";
|
|
11
11
|
import { createService as X } from "@das-fed/utils/api-services/src/create-service";
|
|
12
|
-
import { getProjectInfo as V, getToken as
|
|
12
|
+
import { getProjectInfo as V, getToken as Ce } from "@das-fed/utils/common-info";
|
|
13
13
|
var B;
|
|
14
|
-
const z = typeof window < "u",
|
|
14
|
+
const z = typeof window < "u", Ie = (t) => typeof t == "string", he = () => {
|
|
15
15
|
};
|
|
16
16
|
z && ((B = window == null ? void 0 : window.navigator) != null && B.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
17
17
|
function J(t) {
|
|
@@ -23,32 +23,32 @@ function Ee(t) {
|
|
|
23
23
|
function ee(t) {
|
|
24
24
|
return re() ? (ae(t), !0) : !1;
|
|
25
25
|
}
|
|
26
|
-
function Oe(t,
|
|
27
|
-
ce() ? Y(t) :
|
|
26
|
+
function Oe(t, n = !0) {
|
|
27
|
+
ce() ? Y(t) : n ? t() : L(t);
|
|
28
28
|
}
|
|
29
29
|
function te(t) {
|
|
30
|
-
var
|
|
30
|
+
var n;
|
|
31
31
|
const e = J(t);
|
|
32
|
-
return (
|
|
32
|
+
return (n = e == null ? void 0 : e.$el) != null ? n : e;
|
|
33
33
|
}
|
|
34
|
-
const Fe = z ? window : void 0,
|
|
35
|
-
function
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
34
|
+
const Fe = z ? window : void 0, Se = z ? window.document : void 0;
|
|
35
|
+
function De(...t) {
|
|
36
|
+
let n, e, l, r;
|
|
37
|
+
if (Ie(t[0]) || Array.isArray(t[0]) ? ([e, l, r] = t, n = Fe) : [n, e, l, r] = t, !n)
|
|
38
38
|
return he;
|
|
39
39
|
Array.isArray(e) || (e = [e]), Array.isArray(l) || (l = [l]);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
}, f = (c,
|
|
43
|
-
|
|
44
|
-
}, { immediate: !0, flush: "post" }),
|
|
45
|
-
|
|
40
|
+
const o = [], i = () => {
|
|
41
|
+
o.forEach((c) => c()), o.length = 0;
|
|
42
|
+
}, f = (c, g, b, E) => (c.addEventListener(g, b, E), () => c.removeEventListener(g, b, E)), s = O(() => [te(n), J(r)], ([c, g]) => {
|
|
43
|
+
i(), c && o.push(...e.flatMap((b) => l.map((E) => f(c, b, E, g))));
|
|
44
|
+
}, { immediate: !0, flush: "post" }), u = () => {
|
|
45
|
+
s(), i();
|
|
46
46
|
};
|
|
47
|
-
return ee(
|
|
47
|
+
return ee(u), u;
|
|
48
48
|
}
|
|
49
|
-
function Re(t,
|
|
50
|
-
const e =
|
|
51
|
-
return l(), Oe(l,
|
|
49
|
+
function Re(t, n = !1) {
|
|
50
|
+
const e = _(), l = () => e.value = !!t();
|
|
51
|
+
return l(), Oe(l, n), e;
|
|
52
52
|
}
|
|
53
53
|
const M = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Q = "__vueuse_ssr_handlers__";
|
|
54
54
|
M[Q] = M[Q] || {};
|
|
@@ -94,38 +94,38 @@ const A = [
|
|
|
94
94
|
"MSFullscreenError"
|
|
95
95
|
]
|
|
96
96
|
];
|
|
97
|
-
function
|
|
98
|
-
const { document: e =
|
|
99
|
-
let
|
|
97
|
+
function oe(t, n = {}) {
|
|
98
|
+
const { document: e = Se, autoExit: l = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = _(!1);
|
|
99
|
+
let i = A[0];
|
|
100
100
|
const f = Re(() => {
|
|
101
101
|
if (e) {
|
|
102
102
|
for (const F of A)
|
|
103
103
|
if (F[1] in e)
|
|
104
|
-
return
|
|
104
|
+
return i = F, !0;
|
|
105
105
|
} else
|
|
106
106
|
return !1;
|
|
107
107
|
return !1;
|
|
108
|
-
}), [
|
|
109
|
-
async function
|
|
110
|
-
f.value && (e != null && e[c] && await e[
|
|
108
|
+
}), [s, u, c, , g] = i;
|
|
109
|
+
async function b() {
|
|
110
|
+
f.value && (e != null && e[c] && await e[u](), o.value = !1);
|
|
111
111
|
}
|
|
112
112
|
async function E() {
|
|
113
113
|
if (!f.value)
|
|
114
114
|
return;
|
|
115
|
-
await
|
|
115
|
+
await b();
|
|
116
116
|
const F = te(r);
|
|
117
|
-
F && (await F[
|
|
117
|
+
F && (await F[s](), o.value = !0);
|
|
118
118
|
}
|
|
119
119
|
async function T() {
|
|
120
|
-
|
|
120
|
+
o.value ? await b() : await E();
|
|
121
121
|
}
|
|
122
|
-
return e &&
|
|
123
|
-
|
|
124
|
-
}, !1), l && ee(
|
|
122
|
+
return e && De(e, g, () => {
|
|
123
|
+
o.value = !!(e != null && e[c]);
|
|
124
|
+
}, !1), l && ee(b), {
|
|
125
125
|
isSupported: f,
|
|
126
|
-
isFullscreen:
|
|
126
|
+
isFullscreen: o,
|
|
127
127
|
enter: E,
|
|
128
|
-
exit:
|
|
128
|
+
exit: b,
|
|
129
129
|
toggle: T
|
|
130
130
|
};
|
|
131
131
|
}
|
|
@@ -133,12 +133,12 @@ var q;
|
|
|
133
133
|
(function(t) {
|
|
134
134
|
t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
|
|
135
135
|
})(q || (q = {}));
|
|
136
|
-
var $e = Object.defineProperty, G = Object.getOwnPropertySymbols, Pe = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, W = (t,
|
|
137
|
-
for (var e in
|
|
138
|
-
Pe.call(
|
|
136
|
+
var $e = Object.defineProperty, G = Object.getOwnPropertySymbols, Pe = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, W = (t, n, e) => n in t ? $e(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, xe = (t, n) => {
|
|
137
|
+
for (var e in n || (n = {}))
|
|
138
|
+
Pe.call(n, e) && W(t, e, n[e]);
|
|
139
139
|
if (G)
|
|
140
|
-
for (var e of G(
|
|
141
|
-
Le.call(
|
|
140
|
+
for (var e of G(n))
|
|
141
|
+
Le.call(n, e) && W(t, e, n[e]);
|
|
142
142
|
return t;
|
|
143
143
|
};
|
|
144
144
|
const Ne = {
|
|
@@ -177,25 +177,25 @@ const Te = /* @__PURE__ */ $({
|
|
|
177
177
|
gridNum: {}
|
|
178
178
|
},
|
|
179
179
|
emits: ["itemClick"],
|
|
180
|
-
setup(t, { emit:
|
|
180
|
+
setup(t, { emit: n }) {
|
|
181
181
|
ue((c) => ({
|
|
182
|
-
"9b3a2c32":
|
|
182
|
+
"9b3a2c32": u.value
|
|
183
183
|
}));
|
|
184
|
-
const e = t, l =
|
|
185
|
-
r.value != document.fullscreenElement && (
|
|
186
|
-
|
|
187
|
-
})) :
|
|
188
|
-
},
|
|
184
|
+
const e = t, l = n, r = _(), { toggle: o, isFullscreen: i } = oe(r), f = () => {
|
|
185
|
+
r.value != document.fullscreenElement && (i.value ? (i.value = !1, L(() => {
|
|
186
|
+
o();
|
|
187
|
+
})) : o());
|
|
188
|
+
}, s = () => {
|
|
189
189
|
l("itemClick");
|
|
190
|
-
},
|
|
191
|
-
return (c,
|
|
190
|
+
}, u = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
|
|
191
|
+
return (c, g) => (y(), R(
|
|
192
192
|
"div",
|
|
193
193
|
{
|
|
194
194
|
ref_key: "containerRef",
|
|
195
195
|
ref: r,
|
|
196
196
|
class: de(["wrapper", { "is-active": e.active }]),
|
|
197
|
-
onDblclick:
|
|
198
|
-
onClick:
|
|
197
|
+
onDblclick: g[0] || (g[0] = (b) => f()),
|
|
198
|
+
onClick: g[1] || (g[1] = (b) => s())
|
|
199
199
|
},
|
|
200
200
|
[
|
|
201
201
|
Z(c.$slots, "default", {}, void 0, !0)
|
|
@@ -204,9 +204,9 @@ const Te = /* @__PURE__ */ $({
|
|
|
204
204
|
/* CLASS, NEED_HYDRATION */
|
|
205
205
|
));
|
|
206
206
|
}
|
|
207
|
-
}), N = (t,
|
|
207
|
+
}), N = (t, n) => {
|
|
208
208
|
const e = t.__vccOpts || t;
|
|
209
|
-
for (const [l, r] of
|
|
209
|
+
for (const [l, r] of n)
|
|
210
210
|
e[l] = r;
|
|
211
211
|
return e;
|
|
212
212
|
}, Ue = /* @__PURE__ */ N(Te, [["__scopeId", "data-v-100b67ca"]]), ze = { class: "layout-wrapper" }, je = /* @__PURE__ */ $({
|
|
@@ -217,25 +217,25 @@ const Te = /* @__PURE__ */ $({
|
|
|
217
217
|
showFn: {}
|
|
218
218
|
},
|
|
219
219
|
emits: ["update:activeIndex"],
|
|
220
|
-
setup(t, { emit:
|
|
221
|
-
const e = t, l =
|
|
222
|
-
l("update:activeIndex",
|
|
220
|
+
setup(t, { emit: n }) {
|
|
221
|
+
const e = t, l = n, r = (o) => {
|
|
222
|
+
l("update:activeIndex", o);
|
|
223
223
|
};
|
|
224
|
-
return (
|
|
225
|
-
|
|
226
|
-
(
|
|
224
|
+
return (o, i) => (y(), R("div", ze, [
|
|
225
|
+
I(' :active="index === activeIndex" '),
|
|
226
|
+
(y(!0), R(
|
|
227
227
|
K,
|
|
228
228
|
null,
|
|
229
|
-
ve(e.gridNum, (f,
|
|
229
|
+
ve(e.gridNum, (f, s) => (y(), h(Ue, {
|
|
230
230
|
active: !1,
|
|
231
231
|
"grid-num": e.gridNum,
|
|
232
|
-
onItemClick: (
|
|
232
|
+
onItemClick: (u) => r(s)
|
|
233
233
|
}, {
|
|
234
234
|
default: m(() => [
|
|
235
|
-
|
|
235
|
+
o.showFn(s) ? Z(o.$slots, "default", {
|
|
236
236
|
key: 0,
|
|
237
|
-
index:
|
|
238
|
-
}, void 0, !0) :
|
|
237
|
+
index: s
|
|
238
|
+
}, void 0, !0) : I("v-if", !0)
|
|
239
239
|
]),
|
|
240
240
|
_: 2
|
|
241
241
|
/* DYNAMIC */
|
|
@@ -248,102 +248,102 @@ const Te = /* @__PURE__ */ $({
|
|
|
248
248
|
}), Ve = /* @__PURE__ */ N(je, [["__scopeId", "data-v-661e2289"]]), Be = /* @__PURE__ */ $({
|
|
249
249
|
__name: "DirectionControl",
|
|
250
250
|
emits: ["change"],
|
|
251
|
-
setup(t, { emit:
|
|
252
|
-
const e =
|
|
251
|
+
setup(t, { emit: n }) {
|
|
252
|
+
const e = n, l = (r) => {
|
|
253
253
|
e("change", r);
|
|
254
254
|
};
|
|
255
|
-
return (r,
|
|
255
|
+
return (r, o) => (y(), R(
|
|
256
256
|
"div",
|
|
257
257
|
{
|
|
258
258
|
class: "direction-control",
|
|
259
|
-
onDblclick:
|
|
259
|
+
onDblclick: o[9] || (o[9] = k((i) => i.stopPropagation(), ["stop"]))
|
|
260
260
|
},
|
|
261
261
|
[
|
|
262
|
-
v(a(
|
|
262
|
+
v(a(w), { content: "左上" }, {
|
|
263
263
|
default: m(() => [
|
|
264
264
|
p("div", {
|
|
265
265
|
class: "icon icon-top-left",
|
|
266
|
-
onClick:
|
|
266
|
+
onClick: o[0] || (o[0] = k((i) => l("leftUp"), ["stop"]))
|
|
267
267
|
})
|
|
268
268
|
]),
|
|
269
269
|
_: 1
|
|
270
270
|
/* STABLE */
|
|
271
271
|
}),
|
|
272
|
-
v(a(
|
|
272
|
+
v(a(w), { content: "上" }, {
|
|
273
273
|
default: m(() => [
|
|
274
274
|
p("div", {
|
|
275
275
|
class: "icon icon-top",
|
|
276
|
-
onClick:
|
|
276
|
+
onClick: o[1] || (o[1] = k((i) => l("up"), ["stop"]))
|
|
277
277
|
})
|
|
278
278
|
]),
|
|
279
279
|
_: 1
|
|
280
280
|
/* STABLE */
|
|
281
281
|
}),
|
|
282
|
-
v(a(
|
|
282
|
+
v(a(w), { content: "右上" }, {
|
|
283
283
|
default: m(() => [
|
|
284
284
|
p("div", {
|
|
285
285
|
class: "icon icon-top-right",
|
|
286
|
-
onClick:
|
|
286
|
+
onClick: o[2] || (o[2] = k((i) => l("rightUp"), ["stop"]))
|
|
287
287
|
})
|
|
288
288
|
]),
|
|
289
289
|
_: 1
|
|
290
290
|
/* STABLE */
|
|
291
291
|
}),
|
|
292
|
-
v(a(
|
|
292
|
+
v(a(w), { content: "左" }, {
|
|
293
293
|
default: m(() => [
|
|
294
294
|
p("div", {
|
|
295
295
|
class: "icon icon-left",
|
|
296
|
-
onClick:
|
|
296
|
+
onClick: o[3] || (o[3] = k((i) => l("left"), ["stop"]))
|
|
297
297
|
})
|
|
298
298
|
]),
|
|
299
299
|
_: 1
|
|
300
300
|
/* STABLE */
|
|
301
301
|
}),
|
|
302
|
-
v(a(
|
|
302
|
+
v(a(w), { content: "自动" }, {
|
|
303
303
|
default: m(() => [
|
|
304
304
|
p("div", {
|
|
305
305
|
class: "icon icon-auto",
|
|
306
|
-
onClick:
|
|
306
|
+
onClick: o[4] || (o[4] = k((i) => l("auto"), ["stop"]))
|
|
307
307
|
})
|
|
308
308
|
]),
|
|
309
309
|
_: 1
|
|
310
310
|
/* STABLE */
|
|
311
311
|
}),
|
|
312
|
-
v(a(
|
|
312
|
+
v(a(w), { content: "右" }, {
|
|
313
313
|
default: m(() => [
|
|
314
314
|
p("div", {
|
|
315
315
|
class: "icon icon-right",
|
|
316
|
-
onClick:
|
|
316
|
+
onClick: o[5] || (o[5] = k((i) => l("right"), ["stop"]))
|
|
317
317
|
})
|
|
318
318
|
]),
|
|
319
319
|
_: 1
|
|
320
320
|
/* STABLE */
|
|
321
321
|
}),
|
|
322
|
-
v(a(
|
|
322
|
+
v(a(w), { content: "左下" }, {
|
|
323
323
|
default: m(() => [
|
|
324
324
|
p("div", {
|
|
325
325
|
class: "icon icon-bottom-left",
|
|
326
|
-
onClick:
|
|
326
|
+
onClick: o[6] || (o[6] = k((i) => l("leftDown"), ["stop"]))
|
|
327
327
|
})
|
|
328
328
|
]),
|
|
329
329
|
_: 1
|
|
330
330
|
/* STABLE */
|
|
331
331
|
}),
|
|
332
|
-
v(a(
|
|
332
|
+
v(a(w), { content: "下" }, {
|
|
333
333
|
default: m(() => [
|
|
334
334
|
p("div", {
|
|
335
335
|
class: "icon icon-bottom",
|
|
336
|
-
onClick:
|
|
336
|
+
onClick: o[7] || (o[7] = k((i) => l("down"), ["stop"]))
|
|
337
337
|
})
|
|
338
338
|
]),
|
|
339
339
|
_: 1
|
|
340
340
|
/* STABLE */
|
|
341
341
|
}),
|
|
342
|
-
v(a(
|
|
342
|
+
v(a(w), { content: "右下" }, {
|
|
343
343
|
default: m(() => [
|
|
344
344
|
p("div", {
|
|
345
345
|
class: "icon icon-bottom-right",
|
|
346
|
-
onClick:
|
|
346
|
+
onClick: o[8] || (o[8] = k((i) => l("rightDown"), ["stop"]))
|
|
347
347
|
})
|
|
348
348
|
]),
|
|
349
349
|
_: 1
|
|
@@ -370,8 +370,8 @@ const Te = /* @__PURE__ */ $({
|
|
|
370
370
|
onReplay: {}
|
|
371
371
|
},
|
|
372
372
|
emits: ["close", "directionControl", "zoomControl"],
|
|
373
|
-
setup(t, { emit:
|
|
374
|
-
const e = t, l =
|
|
373
|
+
setup(t, { emit: n }) {
|
|
374
|
+
const e = t, l = n;
|
|
375
375
|
ke({
|
|
376
376
|
muted: import("@das-fed/ui/packages/icons/muted"),
|
|
377
377
|
volume: import("@das-fed/ui/packages/icons/volume"),
|
|
@@ -379,58 +379,58 @@ const Te = /* @__PURE__ */ $({
|
|
|
379
379
|
enlarge: import("@das-fed/ui/packages/icons/enlarge"),
|
|
380
380
|
"direction-control": import("@das-fed/ui/packages/icons/direction-control")
|
|
381
381
|
});
|
|
382
|
-
const r =
|
|
383
|
-
var
|
|
384
|
-
return (
|
|
385
|
-
}),
|
|
386
|
-
|
|
382
|
+
const r = _(!0), o = _(), i = _(!1), f = _(), s = x(() => {
|
|
383
|
+
var d;
|
|
384
|
+
return (d = f.value) == null ? void 0 : d.video;
|
|
385
|
+
}), u = _(!1), c = _(!0), g = (d) => {
|
|
386
|
+
o.value = d, o.value.on(window.mpegts.Events.ERROR, (C) => {
|
|
387
387
|
});
|
|
388
|
-
},
|
|
389
|
-
r.value = !r.value,
|
|
388
|
+
}, b = () => {
|
|
389
|
+
r.value = !r.value, o.value && (o.value.muted = r.value);
|
|
390
390
|
}, E = () => {
|
|
391
|
-
|
|
392
|
-
}, T =
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
const
|
|
399
|
-
if (T.value =
|
|
400
|
-
const
|
|
401
|
-
|
|
391
|
+
i.value = !i.value;
|
|
392
|
+
}, T = _(""), F = () => {
|
|
393
|
+
const d = document.createElement("canvas");
|
|
394
|
+
if (s.value) {
|
|
395
|
+
d.width = s.value.clientWidth, d.height = s.value.clientHeight;
|
|
396
|
+
const C = d.getContext("2d");
|
|
397
|
+
C == null || C.drawImage(s.value, 0, 0, d.width, d.height);
|
|
398
|
+
const D = d.toDataURL("image/jpg"), se = `【${e.title}】${we().format("YYYYMMDDHHmmss").toString()}.jpg`;
|
|
399
|
+
if (T.value = D, "download" in document.createElement("a")) {
|
|
400
|
+
const S = document.createElement("a");
|
|
401
|
+
S.download = se, S.style.display = "none", S.href = D, document.body.appendChild(S), document.body.appendChild(d), S.click(), URL.revokeObjectURL(S.href), document.body.removeChild(S), document.body.removeChild(d);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
}, ie = (
|
|
405
|
-
l("directionControl",
|
|
406
|
-
}, j = (
|
|
407
|
-
l("zoomControl",
|
|
408
|
-
}, U = (
|
|
404
|
+
}, ie = (d) => {
|
|
405
|
+
l("directionControl", d);
|
|
406
|
+
}, j = (d) => {
|
|
407
|
+
l("zoomControl", d);
|
|
408
|
+
}, U = (d) => e.authType.includes(d);
|
|
409
409
|
return O(
|
|
410
|
-
() =>
|
|
410
|
+
() => s.value,
|
|
411
411
|
() => {
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
s.value && s.value.addEventListener("ended", () => {
|
|
413
|
+
u.value = !0, e.type === "playback" && (c.value = !1);
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
), O(
|
|
417
|
-
() =>
|
|
417
|
+
() => s.value,
|
|
418
418
|
() => {
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
s.value && L(() => {
|
|
420
|
+
s.value.playbackRate = e.playbackRate || 1;
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
), O(
|
|
424
|
-
() =>
|
|
424
|
+
() => o.value,
|
|
425
425
|
() => {
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
o.value && L(() => {
|
|
427
|
+
o.value.muted = r.value;
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
), O(
|
|
431
431
|
() => e.playbackRate,
|
|
432
432
|
() => {
|
|
433
|
-
|
|
433
|
+
s.value && (s.value.playbackRate = e.playbackRate || 1);
|
|
434
434
|
},
|
|
435
435
|
{
|
|
436
436
|
immediate: !0
|
|
@@ -438,7 +438,7 @@ const Te = /* @__PURE__ */ $({
|
|
|
438
438
|
), O(
|
|
439
439
|
() => e.paused,
|
|
440
440
|
() => {
|
|
441
|
-
|
|
441
|
+
o.value && (e.paused ? o.value.pause() : o.value.play());
|
|
442
442
|
}
|
|
443
443
|
), O(
|
|
444
444
|
() => e.videoUrl,
|
|
@@ -447,8 +447,8 @@ const Te = /* @__PURE__ */ $({
|
|
|
447
447
|
c.value = !0;
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
), (
|
|
451
|
-
v(a(
|
|
450
|
+
), (d, C) => (y(), R("div", Qe, [
|
|
451
|
+
v(a(be), {
|
|
452
452
|
spinning: e.loading,
|
|
453
453
|
type: "component",
|
|
454
454
|
tip: "加载中..."
|
|
@@ -467,21 +467,21 @@ const Te = /* @__PURE__ */ $({
|
|
|
467
467
|
])
|
|
468
468
|
]),
|
|
469
469
|
p("div", He, [
|
|
470
|
-
["live"].includes(
|
|
471
|
-
|
|
470
|
+
["live"].includes(d.type) ? (y(), R("span", Ye, "正在实时预览")) : I("v-if", !0),
|
|
471
|
+
I(' <das-icon class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
|
|
472
472
|
])
|
|
473
473
|
]),
|
|
474
|
-
e.videoUrl && c.value ? (
|
|
474
|
+
e.videoUrl && c.value ? (y(), h(a(_e), {
|
|
475
475
|
key: 0,
|
|
476
476
|
type: "flv",
|
|
477
477
|
ref_key: "dasLivePlayerRef",
|
|
478
478
|
ref: f,
|
|
479
479
|
muted: r.value,
|
|
480
|
-
onLoaded:
|
|
480
|
+
onLoaded: g,
|
|
481
481
|
src: e.videoUrl
|
|
482
|
-
}, null, 8, ["muted", "src"])) :
|
|
482
|
+
}, null, 8, ["muted", "src"])) : I("v-if", !0),
|
|
483
483
|
p("div", Ze, [
|
|
484
|
-
|
|
484
|
+
C[3] || (C[3] = p(
|
|
485
485
|
"div",
|
|
486
486
|
{ class: "video-bottom_l" },
|
|
487
487
|
null,
|
|
@@ -493,197 +493,205 @@ const Te = /* @__PURE__ */ $({
|
|
|
493
493
|
"div",
|
|
494
494
|
{
|
|
495
495
|
class: "controls",
|
|
496
|
-
onDblclick:
|
|
496
|
+
onDblclick: C[2] || (C[2] = k((D) => D.stopPropagation(), ["stop"]))
|
|
497
497
|
},
|
|
498
498
|
[
|
|
499
|
-
v(a(
|
|
499
|
+
v(a(w), { content: "声音" }, {
|
|
500
500
|
default: m(() => [
|
|
501
501
|
v(a(P), {
|
|
502
502
|
class: "icon icon-volume",
|
|
503
503
|
icon: r.value ? "muted" : "volume",
|
|
504
|
-
onClick:
|
|
504
|
+
onClick: k(b, ["stop"])
|
|
505
505
|
}, null, 8, ["icon"])
|
|
506
506
|
]),
|
|
507
507
|
_: 1
|
|
508
508
|
/* STABLE */
|
|
509
509
|
}),
|
|
510
|
-
v(a(
|
|
510
|
+
v(a(w), { content: "截图" }, {
|
|
511
511
|
default: m(() => [
|
|
512
512
|
v(a(P), {
|
|
513
513
|
class: "icon icon-screenshot",
|
|
514
514
|
icon: "screenshot",
|
|
515
|
-
onClick:
|
|
515
|
+
onClick: k(F, ["stop"])
|
|
516
516
|
})
|
|
517
517
|
]),
|
|
518
518
|
_: 1
|
|
519
519
|
/* STABLE */
|
|
520
520
|
}),
|
|
521
|
-
U("control") ? (
|
|
521
|
+
U("control") ? (y(), h(a(w), {
|
|
522
522
|
key: 0,
|
|
523
523
|
content: "聚焦-"
|
|
524
524
|
}, {
|
|
525
525
|
default: m(() => [
|
|
526
|
-
["live", "polling"].includes(e.type) ? (
|
|
526
|
+
["live", "polling"].includes(e.type) ? (y(), h(a(P), {
|
|
527
527
|
key: 0,
|
|
528
528
|
class: "icon icon-shrink",
|
|
529
529
|
icon: "shrink",
|
|
530
|
-
onClick:
|
|
531
|
-
})) :
|
|
530
|
+
onClick: C[0] || (C[0] = k((D) => j("zoomOut"), ["stop"]))
|
|
531
|
+
})) : I("v-if", !0)
|
|
532
532
|
]),
|
|
533
533
|
_: 1
|
|
534
534
|
/* STABLE */
|
|
535
|
-
})) :
|
|
536
|
-
U("control") ? (
|
|
535
|
+
})) : I("v-if", !0),
|
|
536
|
+
U("control") ? (y(), h(a(w), {
|
|
537
537
|
key: 1,
|
|
538
538
|
content: "聚焦+"
|
|
539
539
|
}, {
|
|
540
540
|
default: m(() => [
|
|
541
|
-
["live", "polling"].includes(e.type) ? (
|
|
541
|
+
["live", "polling"].includes(e.type) ? (y(), h(a(P), {
|
|
542
542
|
key: 0,
|
|
543
543
|
class: "icon icon-enlarge",
|
|
544
544
|
icon: "enlarge",
|
|
545
|
-
onClick:
|
|
546
|
-
})) :
|
|
545
|
+
onClick: C[1] || (C[1] = k((D) => j("zoomIn"), ["stop"]))
|
|
546
|
+
})) : I("v-if", !0)
|
|
547
547
|
]),
|
|
548
548
|
_: 1
|
|
549
549
|
/* STABLE */
|
|
550
|
-
})) :
|
|
551
|
-
U("control") ? (
|
|
550
|
+
})) : I("v-if", !0),
|
|
551
|
+
U("control") ? (y(), h(a(w), {
|
|
552
552
|
key: 2,
|
|
553
553
|
content: "方向控制"
|
|
554
554
|
}, {
|
|
555
555
|
default: m(() => [
|
|
556
|
-
["live", "polling"].includes(e.type) ? (
|
|
556
|
+
["live", "polling"].includes(e.type) ? (y(), h(a(P), {
|
|
557
557
|
key: 0,
|
|
558
558
|
class: "icon icon-direction-control",
|
|
559
559
|
icon: "direction-control",
|
|
560
|
-
onClick:
|
|
561
|
-
})) :
|
|
560
|
+
onClick: k(E, ["stop"])
|
|
561
|
+
})) : I("v-if", !0)
|
|
562
562
|
]),
|
|
563
563
|
_: 1
|
|
564
564
|
/* STABLE */
|
|
565
|
-
})) :
|
|
565
|
+
})) : I("v-if", !0)
|
|
566
566
|
],
|
|
567
567
|
32
|
|
568
568
|
/* NEED_HYDRATION */
|
|
569
569
|
)
|
|
570
570
|
])
|
|
571
571
|
]),
|
|
572
|
-
|
|
572
|
+
i.value ? (y(), h(Me, {
|
|
573
573
|
key: 1,
|
|
574
574
|
onChange: ie
|
|
575
|
-
})) :
|
|
575
|
+
})) : I("v-if", !0)
|
|
576
576
|
]),
|
|
577
577
|
_: 1
|
|
578
578
|
/* STABLE */
|
|
579
579
|
}, 8, ["spinning"])
|
|
580
580
|
]));
|
|
581
581
|
}
|
|
582
|
-
}), Je = /* @__PURE__ */ N(Xe, [["__scopeId", "data-v-6f430425"]]), et = "/api/device-relation/deviceproject/v1/project/device/video", tt = "v1",
|
|
583
|
-
function
|
|
584
|
-
const
|
|
585
|
-
return t.params || (t.params = {}), t.params.project =
|
|
582
|
+
}), Je = /* @__PURE__ */ N(Xe, [["__scopeId", "data-v-6f430425"]]), et = "/api/device-relation/deviceproject/v1/project/device/video", tt = "v1", ot = X(`/api/enterpriseright/permission/${tt}`), ne = X(`${et}`, nt);
|
|
583
|
+
function nt(t) {
|
|
584
|
+
const n = V() ? V().id : 1;
|
|
585
|
+
return t.params || (t.params = {}), t.params.project = n, t.params.projectId = n, t;
|
|
586
586
|
}
|
|
587
587
|
function le(t) {
|
|
588
|
-
const
|
|
588
|
+
const n = new URLSearchParams("");
|
|
589
589
|
for (let [e, l] of Object.entries(t))
|
|
590
|
-
|
|
591
|
-
return
|
|
590
|
+
n.append(e, l);
|
|
591
|
+
return n.toString();
|
|
592
592
|
}
|
|
593
593
|
function H(t) {
|
|
594
|
-
return
|
|
594
|
+
return ne.post(`/ptz?${le(t)}`)().run();
|
|
595
595
|
}
|
|
596
596
|
function lt(t) {
|
|
597
|
-
return
|
|
597
|
+
return ne.post(`/url/preview?${le(t)}`)().run();
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
ot.post("data/device-auth");
|
|
600
600
|
const it = (t) => {
|
|
601
|
-
const
|
|
602
|
-
return `${t}?token=${
|
|
601
|
+
const n = Ce();
|
|
602
|
+
return `${t}?token=${n}`;
|
|
603
603
|
};
|
|
604
|
-
|
|
604
|
+
_([]);
|
|
605
605
|
const st = /* @__PURE__ */ $({
|
|
606
606
|
props: {
|
|
607
607
|
deviceInfo: {
|
|
608
608
|
type: Object,
|
|
609
609
|
required: !0
|
|
610
|
+
},
|
|
611
|
+
source: {
|
|
612
|
+
type: String
|
|
610
613
|
}
|
|
611
614
|
},
|
|
612
615
|
setup(t, {
|
|
613
|
-
slots:
|
|
616
|
+
slots: n
|
|
614
617
|
}) {
|
|
615
618
|
const {
|
|
616
|
-
deviceInfo: e
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
619
|
+
deviceInfo: e,
|
|
620
|
+
source: l
|
|
621
|
+
} = fe(t), r = _(!1), o = _(""), i = async () => {
|
|
622
|
+
var g;
|
|
623
|
+
if (!((g = e.value) != null && g.deviceId)) return;
|
|
624
|
+
r.value = !0;
|
|
625
|
+
const [u, c] = await lt({
|
|
622
626
|
productId: e.value.productId,
|
|
623
|
-
deviceId: e.value.deviceId
|
|
627
|
+
deviceId: e.value.deviceId,
|
|
628
|
+
source: l.value
|
|
624
629
|
});
|
|
625
|
-
|
|
626
|
-
},
|
|
630
|
+
u || (o.value = it(c == null ? void 0 : c.wsFlvStreamURL)), r.value = !1;
|
|
631
|
+
}, f = (u) => {
|
|
627
632
|
H({
|
|
628
633
|
productId: e.value.productId,
|
|
629
634
|
deviceId: e.value.deviceId,
|
|
630
|
-
direction:
|
|
631
|
-
zoom: ""
|
|
635
|
+
direction: u,
|
|
636
|
+
zoom: "",
|
|
637
|
+
source: l.value || "web"
|
|
632
638
|
});
|
|
633
|
-
},
|
|
639
|
+
}, s = (u) => {
|
|
634
640
|
H({
|
|
635
641
|
productId: e.value.productId,
|
|
636
642
|
deviceId: e.value.deviceId,
|
|
637
643
|
direction: "",
|
|
638
|
-
zoom:
|
|
644
|
+
zoom: u,
|
|
645
|
+
source: l.value || "web"
|
|
639
646
|
});
|
|
640
647
|
};
|
|
641
648
|
return Y(() => {
|
|
642
|
-
|
|
649
|
+
i();
|
|
643
650
|
}), O(() => e.value, () => {
|
|
644
|
-
|
|
651
|
+
i();
|
|
645
652
|
}, {
|
|
646
653
|
deep: !0
|
|
647
|
-
}), () => v(K, null, [
|
|
648
|
-
videoUrl:
|
|
649
|
-
loading:
|
|
650
|
-
onDirectionControl:
|
|
651
|
-
onZoomControl:
|
|
654
|
+
}), () => v(K, null, [n.default({
|
|
655
|
+
videoUrl: o.value,
|
|
656
|
+
loading: r.value,
|
|
657
|
+
onDirectionControl: f,
|
|
658
|
+
onZoomControl: s
|
|
652
659
|
})]);
|
|
653
660
|
}
|
|
654
661
|
});
|
|
655
662
|
function rt(t) {
|
|
656
|
-
const
|
|
663
|
+
const n = _(0), e = _(), {
|
|
657
664
|
toggle: l,
|
|
658
665
|
isFullscreen: r
|
|
659
|
-
} =
|
|
666
|
+
} = oe(e);
|
|
660
667
|
return {
|
|
661
668
|
render: () => v(Ve, {
|
|
662
669
|
ref: e,
|
|
663
670
|
gridNum: t.gridNum,
|
|
664
|
-
activeIndex:
|
|
665
|
-
"onUpdate:activeIndex": (
|
|
666
|
-
showFn: (
|
|
671
|
+
activeIndex: n.value,
|
|
672
|
+
"onUpdate:activeIndex": (i) => n.value = i,
|
|
673
|
+
showFn: (i) => !!t.deviceList[i]
|
|
667
674
|
}, {
|
|
668
675
|
default: ({
|
|
669
|
-
index:
|
|
676
|
+
index: i
|
|
670
677
|
}) => {
|
|
671
|
-
const f = t.deviceList[s
|
|
678
|
+
const f = t.deviceList[i], s = t.source;
|
|
672
679
|
return v(st, {
|
|
673
|
-
deviceInfo: f
|
|
680
|
+
deviceInfo: f,
|
|
681
|
+
source: s
|
|
674
682
|
}, {
|
|
675
683
|
default: ({
|
|
676
|
-
videoUrl:
|
|
677
|
-
onDirectionControl:
|
|
678
|
-
onZoomControl:
|
|
679
|
-
loading:
|
|
684
|
+
videoUrl: u,
|
|
685
|
+
onDirectionControl: c,
|
|
686
|
+
onZoomControl: g,
|
|
687
|
+
loading: b
|
|
680
688
|
}) => v(Je, {
|
|
681
689
|
type: "live",
|
|
682
|
-
loading:
|
|
683
|
-
videoUrl:
|
|
690
|
+
loading: b,
|
|
691
|
+
videoUrl: u,
|
|
684
692
|
title: f.deviceName,
|
|
685
|
-
onDirectionControl:
|
|
686
|
-
onZoomControl:
|
|
693
|
+
onDirectionControl: c,
|
|
694
|
+
onZoomControl: g,
|
|
687
695
|
authType: f.authType === 2 ? ["control"] : []
|
|
688
696
|
}, null)
|
|
689
697
|
});
|
|
@@ -697,34 +705,35 @@ const at = /* @__PURE__ */ $({
|
|
|
697
705
|
props: {
|
|
698
706
|
visible: { type: Boolean, default: !1 },
|
|
699
707
|
deviceList: { default: () => [] },
|
|
700
|
-
gridNum: { default: 4 }
|
|
708
|
+
gridNum: { default: 4 },
|
|
709
|
+
source: {}
|
|
701
710
|
},
|
|
702
711
|
emits: ["update:visible"],
|
|
703
|
-
setup(t, { emit:
|
|
704
|
-
const e = t, l =
|
|
712
|
+
setup(t, { emit: n }) {
|
|
713
|
+
const e = t, l = n, r = x({
|
|
705
714
|
get: () => e.visible,
|
|
706
|
-
set: (
|
|
707
|
-
}), { render:
|
|
708
|
-
let
|
|
715
|
+
set: (s) => l("update:visible", s)
|
|
716
|
+
}), { render: o, toggleFullscreen: i } = rt(e), f = x(() => {
|
|
717
|
+
let s = {};
|
|
709
718
|
switch (e.gridNum) {
|
|
710
719
|
case 1:
|
|
711
|
-
|
|
720
|
+
s = "one-video";
|
|
712
721
|
break;
|
|
713
722
|
case 4:
|
|
714
|
-
|
|
723
|
+
s = "four-video";
|
|
715
724
|
break;
|
|
716
725
|
case 9:
|
|
717
|
-
|
|
726
|
+
s = "nine-video";
|
|
718
727
|
break;
|
|
719
728
|
}
|
|
720
|
-
return
|
|
729
|
+
return s;
|
|
721
730
|
});
|
|
722
|
-
return (
|
|
731
|
+
return (s, u) => (y(), h(a(ge), {
|
|
723
732
|
size: "mini",
|
|
724
733
|
title: "视频监控",
|
|
725
734
|
"custom-class": `das-linakge-video-dialog ${f.value}`,
|
|
726
735
|
modelValue: r.value,
|
|
727
|
-
"onUpdate:modelValue":
|
|
736
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
|
|
728
737
|
bodyStyle: { padding: 0 },
|
|
729
738
|
"close-on-click-modal": !1,
|
|
730
739
|
"close-on-press-escape": !1,
|
|
@@ -732,7 +741,7 @@ const at = /* @__PURE__ */ $({
|
|
|
732
741
|
"header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
|
|
733
742
|
}, {
|
|
734
743
|
header: m(() => [
|
|
735
|
-
|
|
744
|
+
u[1] || (u[1] = p(
|
|
736
745
|
"div",
|
|
737
746
|
null,
|
|
738
747
|
[
|
|
@@ -741,12 +750,12 @@ const at = /* @__PURE__ */ $({
|
|
|
741
750
|
-1
|
|
742
751
|
/* HOISTED */
|
|
743
752
|
)),
|
|
744
|
-
v(a(
|
|
753
|
+
v(a(w), { content: "页面全屏" }, {
|
|
745
754
|
default: m(() => [
|
|
746
755
|
v(a(ye), {
|
|
747
756
|
class: "icon",
|
|
748
757
|
color: "#999",
|
|
749
|
-
onClick: a(
|
|
758
|
+
onClick: a(i)
|
|
750
759
|
}, null, 8, ["onClick"])
|
|
751
760
|
]),
|
|
752
761
|
_: 1
|
|
@@ -754,15 +763,15 @@ const at = /* @__PURE__ */ $({
|
|
|
754
763
|
})
|
|
755
764
|
]),
|
|
756
765
|
default: m(() => [
|
|
757
|
-
r.value ? (
|
|
766
|
+
r.value ? (y(), h(a(o), { key: 0 })) : I("v-if", !0)
|
|
758
767
|
]),
|
|
759
768
|
_: 1
|
|
760
769
|
/* STABLE */
|
|
761
770
|
}, 8, ["custom-class", "modelValue"]));
|
|
762
771
|
}
|
|
763
|
-
}),
|
|
772
|
+
}), bt = me(at), wt = () => _(null);
|
|
764
773
|
export {
|
|
765
|
-
|
|
766
|
-
|
|
774
|
+
bt as DasVideoDialog,
|
|
775
|
+
wt as DasVideoDialogRef,
|
|
767
776
|
rt as useVideo
|
|
768
777
|
};
|