@das-fed/ui 6.4.0-hot.9.1 → 6.4.0-test.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.
Files changed (23) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/device-panel/index.js +4580 -4484
  3. package/packages/business-components/device-panel/index.js.gz +0 -0
  4. package/packages/business-components/device-panel/style.css +1 -1
  5. package/packages/business-components/device-panel/style.css.gz +0 -0
  6. package/packages/business-components/process-form/App.vue.d.ts +1 -0
  7. package/packages/business-components/process-form/index.d.ts +1 -0
  8. package/packages/business-components/process-form/index.js +926 -912
  9. package/packages/business-components/process-form/index.js.gz +0 -0
  10. package/packages/business-components/process-form/src/widgets/store.d.ts +1 -0
  11. package/packages/business-components/process-form/style.css +1 -1
  12. package/packages/business-components/process-form/type.d.ts +2 -0
  13. package/packages/business-components/process-search-form/hooks/useSearchOptions.d.ts +1 -0
  14. package/packages/business-components/process-search-form/index.js +394 -379
  15. package/packages/business-components/process-search-form/index.js.gz +0 -0
  16. package/packages/business-components/process-table/index.d.ts +11 -2
  17. package/packages/business-components/process-table/index.js +132 -128
  18. package/packages/business-components/process-table/index.js.gz +0 -0
  19. package/packages/business-components/process-table/src/App.vue.d.ts +1 -0
  20. package/packages/business-components/process-table/src/type.d.ts +2 -0
  21. package/packages/business-components/process-table/style.css +1 -1
  22. package/packages/business-components/video-dialog/index.js +202 -202
  23. package/packages/business-components/video-dialog/index.js.gz +0 -0
@@ -1,57 +1,57 @@
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 _, 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
- import { withInstall as me } from "@das-fed/utils/with-install/index";
4
- import { DasDialog as ge } from "@das-fed/ui/packages/components/dialog/index";
2
+ import { getCurrentScope as se, onScopeDispose as re, unref as a, getCurrentInstance as ae, onMounted as ce, nextTick as P, ref as I, watch as F, defineComponent as L, useCssVars as ue, computed as x, openBlock as y, createElementBlock as D, normalizeClass as de, renderSlot as Y, createCommentVNode as b, Fragment as Z, renderList as ve, createBlock as h, withCtx as m, withModifiers as k, createVNode as v, createElementVNode as p, toDisplayString as pe } from "vue";
3
+ import { withInstall as fe } from "@das-fed/utils/with-install/index";
4
+ import { DasDialog as me } from "@das-fed/ui/packages/components/dialog/index";
5
5
  import { DasTooltip as w } from "@das-fed/ui/packages/components/tooltip/index";
6
- import { DasIconFullscreen2 as ye } from "@das-fed/ui/packages/icons/fullscreen-2/index";
7
- import { DasAutoRegisterIcon as ke, DasIcon as P } from "@das-fed/ui/packages/components/icon/index";
8
- import { DasLivePlayer as _e } from "@das-fed/ui/packages/components/live-player/index";
9
- import { DasSpin as be } from "@das-fed/ui/packages/components/spin/index";
6
+ import { DasIconFullscreen2 as ge } from "@das-fed/ui/packages/icons/fullscreen-2/index";
7
+ import { DasAutoRegisterIcon as ye, DasIcon as R } from "@das-fed/ui/packages/components/icon/index";
8
+ import { DasLivePlayer as ke } from "@das-fed/ui/packages/components/live-player/index";
9
+ import { DasSpin as _e } from "@das-fed/ui/packages/components/spin/index";
10
10
  import we from "dayjs";
11
- import { createService as X } from "@das-fed/utils/api-services/src/create-service";
11
+ import { createService as K } from "@das-fed/utils/api-services/src/create-service";
12
12
  import { getProjectInfo as V, getToken as Ce } from "@das-fed/utils/common-info";
13
- var B;
14
- const z = typeof window < "u", Ie = (t) => typeof t == "string", he = () => {
13
+ var M;
14
+ const z = typeof window < "u", be = (t) => typeof t == "string", Ie = () => {
15
15
  };
16
- z && ((B = window == null ? void 0 : window.navigator) != null && B.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
17
- function J(t) {
16
+ z && ((M = window == null ? void 0 : window.navigator) != null && M.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
17
+ function X(t) {
18
18
  return typeof t == "function" ? t() : a(t);
19
19
  }
20
- function Ee(t) {
20
+ function he(t) {
21
21
  return t;
22
22
  }
23
- function ee(t) {
24
- return re() ? (ae(t), !0) : !1;
23
+ function J(t) {
24
+ return se() ? (re(t), !0) : !1;
25
25
  }
26
- function Oe(t, n = !0) {
27
- ce() ? Y(t) : n ? t() : L(t);
26
+ function Ee(t, o = !0) {
27
+ ae() ? ce(t) : o ? t() : P(t);
28
28
  }
29
- function te(t) {
30
- var n;
31
- const e = J(t);
32
- return (n = e == null ? void 0 : e.$el) != null ? n : e;
29
+ function ee(t) {
30
+ var o;
31
+ const e = X(t);
32
+ return (o = e == null ? void 0 : e.$el) != null ? o : e;
33
33
  }
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
- return he;
34
+ const Oe = z ? window : void 0, $e = z ? window.document : void 0;
35
+ function Fe(...t) {
36
+ let o, e, l, r;
37
+ if (be(t[0]) || Array.isArray(t[0]) ? ([e, l, r] = t, o = Oe) : [o, e, l, r] = t, !o)
38
+ return Ie;
39
39
  Array.isArray(e) || (e = [e]), Array.isArray(l) || (l = [l]);
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))));
40
+ const n = [], i = () => {
41
+ n.forEach((c) => c()), n.length = 0;
42
+ }, f = (c, g, _, E) => (c.addEventListener(g, _, E), () => c.removeEventListener(g, _, E)), s = F(() => [ee(o), X(r)], ([c, g]) => {
43
+ i(), c && n.push(...e.flatMap((_) => l.map((E) => f(c, _, E, g))));
44
44
  }, { immediate: !0, flush: "post" }), u = () => {
45
45
  s(), i();
46
46
  };
47
- return ee(u), u;
47
+ return J(u), u;
48
48
  }
49
- function Re(t, n = !1) {
50
- const e = _(), l = () => e.value = !!t();
51
- return l(), Oe(l, n), e;
49
+ function Se(t, o = !1) {
50
+ const e = I(), l = () => e.value = !!t();
51
+ return l(), Ee(l, o), e;
52
52
  }
53
- const M = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Q = "__vueuse_ssr_handlers__";
54
- M[Q] = M[Q] || {};
53
+ const B = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Q = "__vueuse_ssr_handlers__";
54
+ B[Q] = B[Q] || {};
55
55
  const A = [
56
56
  [
57
57
  "requestFullscreen",
@@ -94,38 +94,38 @@ const A = [
94
94
  "MSFullscreenError"
95
95
  ]
96
96
  ];
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);
97
+ function te(t, o = {}) {
98
+ const { document: e = $e, autoExit: l = !1 } = o, r = t || (e == null ? void 0 : e.querySelector("html")), n = I(!1);
99
99
  let i = A[0];
100
- const f = Re(() => {
100
+ const f = Se(() => {
101
101
  if (e) {
102
- for (const F of A)
103
- if (F[1] in e)
104
- return i = F, !0;
102
+ for (const O of A)
103
+ if (O[1] in e)
104
+ return i = O, !0;
105
105
  } else
106
106
  return !1;
107
107
  return !1;
108
108
  }), [s, u, c, , g] = i;
109
- async function b() {
110
- f.value && (e != null && e[c] && await e[u](), o.value = !1);
109
+ async function _() {
110
+ f.value && (e != null && e[c] && await e[u](), n.value = !1);
111
111
  }
112
112
  async function E() {
113
113
  if (!f.value)
114
114
  return;
115
- await b();
116
- const F = te(r);
117
- F && (await F[s](), o.value = !0);
115
+ await _();
116
+ const O = ee(r);
117
+ O && (await O[s](), n.value = !0);
118
118
  }
119
119
  async function T() {
120
- o.value ? await b() : await E();
120
+ n.value ? await _() : await E();
121
121
  }
122
- return e && De(e, g, () => {
123
- o.value = !!(e != null && e[c]);
124
- }, !1), l && ee(b), {
122
+ return e && Fe(e, g, () => {
123
+ n.value = !!(e != null && e[c]);
124
+ }, !1), l && J(_), {
125
125
  isSupported: f,
126
- isFullscreen: o,
126
+ isFullscreen: n,
127
127
  enter: E,
128
- exit: b,
128
+ exit: _,
129
129
  toggle: T
130
130
  };
131
131
  }
@@ -133,15 +133,15 @@ 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, 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]);
136
+ var De = Object.defineProperty, G = Object.getOwnPropertySymbols, Re = Object.prototype.hasOwnProperty, Pe = Object.prototype.propertyIsEnumerable, W = (t, o, e) => o in t ? De(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e, Le = (t, o) => {
137
+ for (var e in o || (o = {}))
138
+ Re.call(o, e) && W(t, e, o[e]);
139
139
  if (G)
140
- for (var e of G(n))
141
- Le.call(n, e) && W(t, e, n[e]);
140
+ for (var e of G(o))
141
+ Pe.call(o, e) && W(t, e, o[e]);
142
142
  return t;
143
143
  };
144
- const Ne = {
144
+ const xe = {
145
145
  easeInSine: [0.12, 0, 0.39, 0],
146
146
  easeOutSine: [0.61, 1, 0.88, 1],
147
147
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -167,49 +167,49 @@ const Ne = {
167
167
  easeOutBack: [0.34, 1.56, 0.64, 1],
168
168
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
169
169
  };
170
- xe({
171
- linear: Ee
172
- }, Ne);
173
- const Te = /* @__PURE__ */ $({
170
+ Le({
171
+ linear: he
172
+ }, xe);
173
+ const Ne = /* @__PURE__ */ L({
174
174
  __name: "GridItem",
175
175
  props: {
176
176
  active: { type: Boolean },
177
177
  gridNum: {}
178
178
  },
179
179
  emits: ["itemClick"],
180
- setup(t, { emit: n }) {
180
+ setup(t, { emit: o }) {
181
181
  ue((c) => ({
182
182
  "9b3a2c32": u.value
183
183
  }));
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());
184
+ const e = t, l = o, r = I(), { toggle: n, isFullscreen: i } = te(r), f = () => {
185
+ r.value != document.fullscreenElement && (i.value ? (i.value = !1, P(() => {
186
+ n();
187
+ })) : n());
188
188
  }, s = () => {
189
189
  l("itemClick");
190
190
  }, u = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
191
- return (c, g) => (y(), R(
191
+ return (c, g) => (y(), D(
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: g[0] || (g[0] = (b) => f()),
198
- onClick: g[1] || (g[1] = (b) => s())
197
+ onDblclick: g[0] || (g[0] = (_) => f()),
198
+ onClick: g[1] || (g[1] = (_) => s())
199
199
  },
200
200
  [
201
- Z(c.$slots, "default", {}, void 0, !0)
201
+ Y(c.$slots, "default", {}, void 0, !0)
202
202
  ],
203
203
  34
204
204
  /* CLASS, NEED_HYDRATION */
205
205
  ));
206
206
  }
207
- }), N = (t, n) => {
207
+ }), N = (t, o) => {
208
208
  const e = t.__vccOpts || t;
209
- for (const [l, r] of n)
209
+ for (const [l, r] of o)
210
210
  e[l] = r;
211
211
  return e;
212
- }, Ue = /* @__PURE__ */ N(Te, [["__scopeId", "data-v-100b67ca"]]), ze = { class: "layout-wrapper" }, je = /* @__PURE__ */ $({
212
+ }, Te = /* @__PURE__ */ N(Ne, [["__scopeId", "data-v-100b67ca"]]), Ue = { class: "layout-wrapper" }, ze = /* @__PURE__ */ L({
213
213
  __name: "GridLayout",
214
214
  props: {
215
215
  gridNum: {},
@@ -217,25 +217,25 @@ const Te = /* @__PURE__ */ $({
217
217
  showFn: {}
218
218
  },
219
219
  emits: ["update:activeIndex"],
220
- setup(t, { emit: n }) {
221
- const e = t, l = n, r = (o) => {
222
- l("update:activeIndex", o);
220
+ setup(t, { emit: o }) {
221
+ const e = t, l = o, r = (n) => {
222
+ l("update:activeIndex", n);
223
223
  };
224
- return (o, i) => (y(), R("div", ze, [
225
- I(' :active="index === activeIndex" '),
226
- (y(!0), R(
227
- K,
224
+ return (n, i) => (y(), D("div", Ue, [
225
+ b(' :active="index === activeIndex" '),
226
+ (y(!0), D(
227
+ Z,
228
228
  null,
229
- ve(e.gridNum, (f, s) => (y(), h(Ue, {
229
+ ve(e.gridNum, (f, s) => (y(), h(Te, {
230
230
  active: !1,
231
231
  "grid-num": e.gridNum,
232
232
  onItemClick: (u) => r(s)
233
233
  }, {
234
234
  default: m(() => [
235
- o.showFn(s) ? Z(o.$slots, "default", {
235
+ n.showFn(s) ? Y(n.$slots, "default", {
236
236
  key: 0,
237
237
  index: s
238
- }, void 0, !0) : I("v-if", !0)
238
+ }, void 0, !0) : b("v-if", !0)
239
239
  ]),
240
240
  _: 2
241
241
  /* DYNAMIC */
@@ -245,25 +245,25 @@ const Te = /* @__PURE__ */ $({
245
245
  ))
246
246
  ]));
247
247
  }
248
- }), Ve = /* @__PURE__ */ N(je, [["__scopeId", "data-v-661e2289"]]), Be = /* @__PURE__ */ $({
248
+ }), je = /* @__PURE__ */ N(ze, [["__scopeId", "data-v-661e2289"]]), Ve = /* @__PURE__ */ L({
249
249
  __name: "DirectionControl",
250
250
  emits: ["change"],
251
- setup(t, { emit: n }) {
252
- const e = n, l = (r) => {
251
+ setup(t, { emit: o }) {
252
+ const e = o, l = (r) => {
253
253
  e("change", r);
254
254
  };
255
- return (r, o) => (y(), R(
255
+ return (r, n) => (y(), D(
256
256
  "div",
257
257
  {
258
258
  class: "direction-control",
259
- onDblclick: o[9] || (o[9] = k((i) => i.stopPropagation(), ["stop"]))
259
+ onDblclick: n[9] || (n[9] = k((i) => i.stopPropagation(), ["stop"]))
260
260
  },
261
261
  [
262
262
  v(a(w), { content: "左上" }, {
263
263
  default: m(() => [
264
264
  p("div", {
265
265
  class: "icon icon-top-left",
266
- onClick: o[0] || (o[0] = k((i) => l("leftUp"), ["stop"]))
266
+ onClick: n[0] || (n[0] = k((i) => l("leftUp"), ["stop"]))
267
267
  })
268
268
  ]),
269
269
  _: 1
@@ -273,7 +273,7 @@ const Te = /* @__PURE__ */ $({
273
273
  default: m(() => [
274
274
  p("div", {
275
275
  class: "icon icon-top",
276
- onClick: o[1] || (o[1] = k((i) => l("up"), ["stop"]))
276
+ onClick: n[1] || (n[1] = k((i) => l("up"), ["stop"]))
277
277
  })
278
278
  ]),
279
279
  _: 1
@@ -283,7 +283,7 @@ const Te = /* @__PURE__ */ $({
283
283
  default: m(() => [
284
284
  p("div", {
285
285
  class: "icon icon-top-right",
286
- onClick: o[2] || (o[2] = k((i) => l("rightUp"), ["stop"]))
286
+ onClick: n[2] || (n[2] = k((i) => l("rightUp"), ["stop"]))
287
287
  })
288
288
  ]),
289
289
  _: 1
@@ -293,7 +293,7 @@ const Te = /* @__PURE__ */ $({
293
293
  default: m(() => [
294
294
  p("div", {
295
295
  class: "icon icon-left",
296
- onClick: o[3] || (o[3] = k((i) => l("left"), ["stop"]))
296
+ onClick: n[3] || (n[3] = k((i) => l("left"), ["stop"]))
297
297
  })
298
298
  ]),
299
299
  _: 1
@@ -303,7 +303,7 @@ const Te = /* @__PURE__ */ $({
303
303
  default: m(() => [
304
304
  p("div", {
305
305
  class: "icon icon-auto",
306
- onClick: o[4] || (o[4] = k((i) => l("auto"), ["stop"]))
306
+ onClick: n[4] || (n[4] = k((i) => l("auto"), ["stop"]))
307
307
  })
308
308
  ]),
309
309
  _: 1
@@ -313,7 +313,7 @@ const Te = /* @__PURE__ */ $({
313
313
  default: m(() => [
314
314
  p("div", {
315
315
  class: "icon icon-right",
316
- onClick: o[5] || (o[5] = k((i) => l("right"), ["stop"]))
316
+ onClick: n[5] || (n[5] = k((i) => l("right"), ["stop"]))
317
317
  })
318
318
  ]),
319
319
  _: 1
@@ -323,7 +323,7 @@ const Te = /* @__PURE__ */ $({
323
323
  default: m(() => [
324
324
  p("div", {
325
325
  class: "icon icon-bottom-left",
326
- onClick: o[6] || (o[6] = k((i) => l("leftDown"), ["stop"]))
326
+ onClick: n[6] || (n[6] = k((i) => l("leftDown"), ["stop"]))
327
327
  })
328
328
  ]),
329
329
  _: 1
@@ -333,7 +333,7 @@ const Te = /* @__PURE__ */ $({
333
333
  default: m(() => [
334
334
  p("div", {
335
335
  class: "icon icon-bottom",
336
- onClick: o[7] || (o[7] = k((i) => l("down"), ["stop"]))
336
+ onClick: n[7] || (n[7] = k((i) => l("down"), ["stop"]))
337
337
  })
338
338
  ]),
339
339
  _: 1
@@ -343,7 +343,7 @@ const Te = /* @__PURE__ */ $({
343
343
  default: m(() => [
344
344
  p("div", {
345
345
  class: "icon icon-bottom-right",
346
- onClick: o[8] || (o[8] = k((i) => l("rightDown"), ["stop"]))
346
+ onClick: n[8] || (n[8] = k((i) => l("rightDown"), ["stop"]))
347
347
  })
348
348
  ]),
349
349
  _: 1
@@ -354,10 +354,10 @@ const Te = /* @__PURE__ */ $({
354
354
  /* NEED_HYDRATION */
355
355
  ));
356
356
  }
357
- }), Me = /* @__PURE__ */ N(Be, [["__scopeId", "data-v-ba723c84"]]), Qe = { class: "video-wrapper" }, Ae = { class: "video-top" }, qe = { class: "video-top_l" }, Ge = { class: "video-title-wrapper" }, We = { class: "video-title" }, He = { class: "video-top_r" }, Ye = {
357
+ }), Me = /* @__PURE__ */ N(Ve, [["__scopeId", "data-v-ba723c84"]]), Be = { class: "video-wrapper" }, Qe = { class: "video-top" }, Ae = { class: "video-top_l" }, qe = { class: "video-title-wrapper" }, Ge = { class: "video-title" }, We = { class: "video-top_r" }, He = {
358
358
  key: 0,
359
359
  class: "play-status"
360
- }, Ze = { class: "video-bottom" }, Ke = { class: "video-bottom_r" }, Xe = /* @__PURE__ */ $({
360
+ }, Ye = { class: "video-bottom" }, Ze = { class: "video-bottom_r" }, Ke = /* @__PURE__ */ L({
361
361
  __name: "index",
362
362
  props: {
363
363
  videoUrl: {},
@@ -370,64 +370,64 @@ const Te = /* @__PURE__ */ $({
370
370
  onReplay: {}
371
371
  },
372
372
  emits: ["close", "directionControl", "zoomControl"],
373
- setup(t, { emit: n }) {
374
- const e = t, l = n;
375
- ke({
373
+ setup(t, { emit: o }) {
374
+ const e = t, l = o;
375
+ ye({
376
376
  muted: import("@das-fed/ui/packages/icons/muted"),
377
377
  volume: import("@das-fed/ui/packages/icons/volume"),
378
378
  shrink: import("@das-fed/ui/packages/icons/shrink"),
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 = _(!0), o = _(), i = _(!1), f = _(), s = x(() => {
382
+ const r = I(!0), n = I(), i = I(!1), f = I(), s = x(() => {
383
383
  var d;
384
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) => {
385
+ }), u = I(!1), c = I(!0), g = (d) => {
386
+ n.value = d, n.value.on(window.mpegts.Events.ERROR, (C) => {
387
387
  });
388
- }, b = () => {
389
- r.value = !r.value, o.value && (o.value.muted = r.value);
388
+ }, _ = () => {
389
+ r.value = !r.value, n.value && (n.value.muted = r.value);
390
390
  }, E = () => {
391
391
  i.value = !i.value;
392
- }, T = _(""), F = () => {
392
+ }, T = I(""), O = () => {
393
393
  const d = document.createElement("canvas");
394
394
  if (s.value) {
395
395
  d.width = s.value.clientWidth, d.height = s.value.clientHeight;
396
396
  const C = d.getContext("2d");
397
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);
398
+ const S = d.toDataURL("image/jpg"), ie = `【${e.title}】${we().format("YYYYMMDDHHmmss").toString()}.jpg`;
399
+ if (T.value = S, "download" in document.createElement("a")) {
400
+ const $ = document.createElement("a");
401
+ $.download = ie, $.style.display = "none", $.href = S, document.body.appendChild($), document.body.appendChild(d), $.click(), URL.revokeObjectURL($.href), document.body.removeChild($), document.body.removeChild(d);
402
402
  }
403
403
  }
404
- }, ie = (d) => {
404
+ }, le = (d) => {
405
405
  l("directionControl", d);
406
406
  }, j = (d) => {
407
407
  l("zoomControl", d);
408
408
  }, U = (d) => e.authType.includes(d);
409
- return O(
409
+ return F(
410
410
  () => s.value,
411
411
  () => {
412
412
  s.value && s.value.addEventListener("ended", () => {
413
413
  u.value = !0, e.type === "playback" && (c.value = !1);
414
414
  });
415
415
  }
416
- ), O(
416
+ ), F(
417
417
  () => s.value,
418
418
  () => {
419
- s.value && L(() => {
419
+ s.value && P(() => {
420
420
  s.value.playbackRate = e.playbackRate || 1;
421
421
  });
422
422
  }
423
- ), O(
424
- () => o.value,
423
+ ), F(
424
+ () => n.value,
425
425
  () => {
426
- o.value && L(() => {
427
- o.value.muted = r.value;
426
+ n.value && P(() => {
427
+ n.value.muted = r.value;
428
428
  });
429
429
  }
430
- ), O(
430
+ ), F(
431
431
  () => e.playbackRate,
432
432
  () => {
433
433
  s.value && (s.value.playbackRate = e.playbackRate || 1);
@@ -435,43 +435,43 @@ const Te = /* @__PURE__ */ $({
435
435
  {
436
436
  immediate: !0
437
437
  }
438
- ), O(
438
+ ), F(
439
439
  () => e.paused,
440
440
  () => {
441
- o.value && (e.paused ? o.value.pause() : o.value.play());
441
+ n.value && (e.paused ? n.value.pause() : n.value.play());
442
442
  }
443
- ), O(
443
+ ), F(
444
444
  () => e.videoUrl,
445
445
  () => {
446
- c.value = !1, L(() => {
446
+ c.value = !1, P(() => {
447
447
  c.value = !0;
448
448
  });
449
449
  }
450
- ), (d, C) => (y(), R("div", Qe, [
451
- v(a(be), {
450
+ ), (d, C) => (y(), D("div", Be, [
451
+ v(a(_e), {
452
452
  spinning: e.loading,
453
453
  type: "component",
454
454
  tip: "加载中..."
455
455
  }, {
456
456
  default: m(() => [
457
- p("div", Ae, [
458
- p("div", qe, [
459
- p("div", Ge, [
457
+ p("div", Qe, [
458
+ p("div", Ae, [
459
+ p("div", qe, [
460
460
  p(
461
461
  "div",
462
- We,
462
+ Ge,
463
463
  pe(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title),
464
464
  1
465
465
  /* TEXT */
466
466
  )
467
467
  ])
468
468
  ]),
469
- p("div", He, [
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> ')
469
+ p("div", We, [
470
+ ["live"].includes(d.type) ? (y(), D("span", He, "正在实时预览")) : b("v-if", !0),
471
+ b(' <das-icon class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
472
472
  ])
473
473
  ]),
474
- e.videoUrl && c.value ? (y(), h(a(_e), {
474
+ e.videoUrl && c.value ? (y(), h(a(ke), {
475
475
  key: 0,
476
476
  type: "flv",
477
477
  ref_key: "dasLivePlayerRef",
@@ -479,8 +479,8 @@ const Te = /* @__PURE__ */ $({
479
479
  muted: r.value,
480
480
  onLoaded: g,
481
481
  src: e.videoUrl
482
- }, null, 8, ["muted", "src"])) : I("v-if", !0),
483
- p("div", Ze, [
482
+ }, null, 8, ["muted", "src"])) : b("v-if", !0),
483
+ p("div", Ye, [
484
484
  C[3] || (C[3] = p(
485
485
  "div",
486
486
  { class: "video-bottom_l" },
@@ -488,20 +488,20 @@ const Te = /* @__PURE__ */ $({
488
488
  -1
489
489
  /* HOISTED */
490
490
  )),
491
- p("div", Ke, [
491
+ p("div", Ze, [
492
492
  p(
493
493
  "div",
494
494
  {
495
495
  class: "controls",
496
- onDblclick: C[2] || (C[2] = k((D) => D.stopPropagation(), ["stop"]))
496
+ onDblclick: C[2] || (C[2] = k((S) => S.stopPropagation(), ["stop"]))
497
497
  },
498
498
  [
499
499
  v(a(w), { content: "声音" }, {
500
500
  default: m(() => [
501
- v(a(P), {
501
+ v(a(R), {
502
502
  class: "icon icon-volume",
503
503
  icon: r.value ? "muted" : "volume",
504
- onClick: k(b, ["stop"])
504
+ onClick: k(_, ["stop"])
505
505
  }, null, 8, ["icon"])
506
506
  ]),
507
507
  _: 1
@@ -509,10 +509,10 @@ const Te = /* @__PURE__ */ $({
509
509
  }),
510
510
  v(a(w), { content: "截图" }, {
511
511
  default: m(() => [
512
- v(a(P), {
512
+ v(a(R), {
513
513
  class: "icon icon-screenshot",
514
514
  icon: "screenshot",
515
- onClick: k(F, ["stop"])
515
+ onClick: k(O, ["stop"])
516
516
  })
517
517
  ]),
518
518
  _: 1
@@ -523,46 +523,46 @@ const Te = /* @__PURE__ */ $({
523
523
  content: "聚焦-"
524
524
  }, {
525
525
  default: m(() => [
526
- ["live", "polling"].includes(e.type) ? (y(), h(a(P), {
526
+ ["live", "polling"].includes(e.type) ? (y(), h(a(R), {
527
527
  key: 0,
528
528
  class: "icon icon-shrink",
529
529
  icon: "shrink",
530
- onClick: C[0] || (C[0] = k((D) => j("zoomOut"), ["stop"]))
531
- })) : I("v-if", !0)
530
+ onClick: C[0] || (C[0] = k((S) => j("zoomOut"), ["stop"]))
531
+ })) : b("v-if", !0)
532
532
  ]),
533
533
  _: 1
534
534
  /* STABLE */
535
- })) : I("v-if", !0),
535
+ })) : b("v-if", !0),
536
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) ? (y(), h(a(P), {
541
+ ["live", "polling"].includes(e.type) ? (y(), h(a(R), {
542
542
  key: 0,
543
543
  class: "icon icon-enlarge",
544
544
  icon: "enlarge",
545
- onClick: C[1] || (C[1] = k((D) => j("zoomIn"), ["stop"]))
546
- })) : I("v-if", !0)
545
+ onClick: C[1] || (C[1] = k((S) => j("zoomIn"), ["stop"]))
546
+ })) : b("v-if", !0)
547
547
  ]),
548
548
  _: 1
549
549
  /* STABLE */
550
- })) : I("v-if", !0),
550
+ })) : b("v-if", !0),
551
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) ? (y(), h(a(P), {
556
+ ["live", "polling"].includes(e.type) ? (y(), h(a(R), {
557
557
  key: 0,
558
558
  class: "icon icon-direction-control",
559
559
  icon: "direction-control",
560
560
  onClick: k(E, ["stop"])
561
- })) : I("v-if", !0)
561
+ })) : b("v-if", !0)
562
562
  ]),
563
563
  _: 1
564
564
  /* STABLE */
565
- })) : I("v-if", !0)
565
+ })) : b("v-if", !0)
566
566
  ],
567
567
  32
568
568
  /* NEED_HYDRATION */
@@ -571,38 +571,38 @@ const Te = /* @__PURE__ */ $({
571
571
  ]),
572
572
  i.value ? (y(), h(Me, {
573
573
  key: 1,
574
- onChange: ie
575
- })) : I("v-if", !0)
574
+ onChange: le
575
+ })) : b("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", ot = X(`/api/enterpriseright/permission/${tt}`), ne = X(`${et}`, nt);
582
+ }), Xe = /* @__PURE__ */ N(Ke, [["__scopeId", "data-v-6f430425"]]), Je = "/api/device-relation/deviceproject/v1/project/device/video", et = "v1", tt = K(`/api/enterpriseright/permission/${et}`), ne = K(`${Je}`, nt);
583
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;
584
+ const o = V() ? V().id : 1;
585
+ return t.params || (t.params = {}), t.params.project = o, t.params.projectId = o, t;
586
586
  }
587
- function le(t) {
588
- const n = new URLSearchParams("");
587
+ function oe(t) {
588
+ const o = new URLSearchParams("");
589
589
  for (let [e, l] of Object.entries(t))
590
- n.append(e, l);
591
- return n.toString();
590
+ o.append(e, l);
591
+ return o.toString();
592
592
  }
593
593
  function H(t) {
594
- return ne.post(`/ptz?${le(t)}`)().run();
594
+ return ne.post(`/ptz?${oe(t)}`)().run();
595
595
  }
596
- function lt(t) {
597
- return ne.post(`/url/preview?${le(t)}`)().run();
596
+ function ot(t) {
597
+ return ne.post(`/url/preview?${oe(t)}`)().run();
598
598
  }
599
- ot.post("data/device-auth");
600
- const it = (t) => {
601
- const n = Ce();
602
- return `${t}?token=${n}`;
599
+ tt.post("data/device-auth");
600
+ const lt = (t) => {
601
+ const o = Ce();
602
+ return `${t}?token=${o}`;
603
603
  };
604
- _([]);
605
- const st = /* @__PURE__ */ $({
604
+ I([]);
605
+ const it = /* @__PURE__ */ defineComponent({
606
606
  props: {
607
607
  deviceInfo: {
608
608
  type: Object,
@@ -613,21 +613,21 @@ const st = /* @__PURE__ */ $({
613
613
  }
614
614
  },
615
615
  setup(t, {
616
- slots: n
616
+ slots: o
617
617
  }) {
618
618
  const {
619
619
  deviceInfo: e,
620
620
  source: l
621
- } = fe(t), r = _(!1), o = _(""), i = async () => {
621
+ } = toRefs(t), r = ref(!1), n = ref(""), i = async () => {
622
622
  var g;
623
623
  if (!((g = e.value) != null && g.deviceId)) return;
624
624
  r.value = !0;
625
- const [u, c] = await lt({
625
+ const [u, c] = await ot({
626
626
  productId: e.value.productId,
627
627
  deviceId: e.value.deviceId,
628
628
  source: l.value
629
629
  });
630
- u || (o.value = it(c == null ? void 0 : c.wsFlvStreamURL)), r.value = !1;
630
+ u || (n.value = lt(c == null ? void 0 : c.wsFlvStreamURL)), r.value = !1;
631
631
  }, f = (u) => {
632
632
  H({
633
633
  productId: e.value.productId,
@@ -645,38 +645,38 @@ const st = /* @__PURE__ */ $({
645
645
  source: l.value || "web"
646
646
  });
647
647
  };
648
- return Y(() => {
648
+ return onMounted(() => {
649
649
  i();
650
- }), O(() => e.value, () => {
650
+ }), watch(() => e.value, () => {
651
651
  i();
652
652
  }, {
653
653
  deep: !0
654
- }), () => v(K, null, [n.default({
655
- videoUrl: o.value,
654
+ }), () => v(Z, null, [o.default({
655
+ videoUrl: n.value,
656
656
  loading: r.value,
657
657
  onDirectionControl: f,
658
658
  onZoomControl: s
659
659
  })]);
660
660
  }
661
661
  });
662
- function rt(t) {
663
- const n = _(0), e = _(), {
662
+ function st(t) {
663
+ const o = ref(0), e = ref(), {
664
664
  toggle: l,
665
665
  isFullscreen: r
666
- } = oe(e);
666
+ } = te(e);
667
667
  return {
668
- render: () => v(Ve, {
668
+ render: () => v(je, {
669
669
  ref: e,
670
670
  gridNum: t.gridNum,
671
- activeIndex: n.value,
672
- "onUpdate:activeIndex": (i) => n.value = i,
671
+ activeIndex: o.value,
672
+ "onUpdate:activeIndex": (i) => o.value = i,
673
673
  showFn: (i) => !!t.deviceList[i]
674
674
  }, {
675
675
  default: ({
676
676
  index: i
677
677
  }) => {
678
678
  const f = t.deviceList[i], s = t.source;
679
- return v(st, {
679
+ return v(it, {
680
680
  deviceInfo: f,
681
681
  source: s
682
682
  }, {
@@ -684,10 +684,10 @@ function rt(t) {
684
684
  videoUrl: u,
685
685
  onDirectionControl: c,
686
686
  onZoomControl: g,
687
- loading: b
688
- }) => v(Je, {
687
+ loading: _
688
+ }) => v(Xe, {
689
689
  type: "live",
690
- loading: b,
690
+ loading: _,
691
691
  videoUrl: u,
692
692
  title: f.deviceName,
693
693
  onDirectionControl: c,
@@ -700,7 +700,7 @@ function rt(t) {
700
700
  toggleFullscreen: l
701
701
  };
702
702
  }
703
- const at = /* @__PURE__ */ $({
703
+ const rt = /* @__PURE__ */ L({
704
704
  __name: "index",
705
705
  props: {
706
706
  visible: { type: Boolean, default: !1 },
@@ -709,11 +709,11 @@ const at = /* @__PURE__ */ $({
709
709
  source: {}
710
710
  },
711
711
  emits: ["update:visible"],
712
- setup(t, { emit: n }) {
713
- const e = t, l = n, r = x({
712
+ setup(t, { emit: o }) {
713
+ const e = t, l = o, r = x({
714
714
  get: () => e.visible,
715
715
  set: (s) => l("update:visible", s)
716
- }), { render: o, toggleFullscreen: i } = rt(e), f = x(() => {
716
+ }), { render: n, toggleFullscreen: i } = st(e), f = x(() => {
717
717
  let s = {};
718
718
  switch (e.gridNum) {
719
719
  case 1:
@@ -728,7 +728,7 @@ const at = /* @__PURE__ */ $({
728
728
  }
729
729
  return s;
730
730
  });
731
- return (s, u) => (y(), h(a(ge), {
731
+ return (s, u) => (y(), h(a(me), {
732
732
  size: "mini",
733
733
  title: "视频监控",
734
734
  "custom-class": `das-linakge-video-dialog ${f.value}`,
@@ -752,7 +752,7 @@ const at = /* @__PURE__ */ $({
752
752
  )),
753
753
  v(a(w), { content: "页面全屏" }, {
754
754
  default: m(() => [
755
- v(a(ye), {
755
+ v(a(ge), {
756
756
  class: "icon",
757
757
  color: "#999",
758
758
  onClick: a(i)
@@ -763,15 +763,15 @@ const at = /* @__PURE__ */ $({
763
763
  })
764
764
  ]),
765
765
  default: m(() => [
766
- r.value ? (y(), h(a(o), { key: 0 })) : I("v-if", !0)
766
+ r.value ? (y(), h(a(n), { key: 0 })) : b("v-if", !0)
767
767
  ]),
768
768
  _: 1
769
769
  /* STABLE */
770
770
  }, 8, ["custom-class", "modelValue"]));
771
771
  }
772
- }), bt = me(at), wt = () => _(null);
772
+ }), _t = fe(rt), wt = () => I(null);
773
773
  export {
774
- bt as DasVideoDialog,
774
+ _t as DasVideoDialog,
775
775
  wt as DasVideoDialogRef,
776
- rt as useVideo
776
+ st as useVideo
777
777
  };