@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.
Files changed (38) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/device-panel/index.js +1131 -1114
  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-search-form/index.js +1 -1
  7. package/packages/business-components/process-search-form/index.js.gz +0 -0
  8. package/packages/business-components/process-table/hooks/useProcessTable.d.ts +14 -13
  9. package/packages/business-components/process-table/index.d.ts +67 -18
  10. package/packages/business-components/process-table/index.js +527 -522
  11. package/packages/business-components/process-table/index.js.gz +0 -0
  12. package/packages/business-components/process-table/src/App.vue.d.ts +16 -4
  13. package/packages/business-components/process-table/style.css +1 -1
  14. package/packages/business-components/urgent-panel/index.js +1341 -1324
  15. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  16. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/hooks/index.d.ts +4 -1
  17. package/packages/business-components/urgent-panel/style.css +1 -1
  18. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  19. package/packages/business-components/video-dialog/index.js +234 -225
  20. package/packages/business-components/video-dialog/index.js.gz +0 -0
  21. package/packages/business-components/video-dialog/src/api.d.ts +3 -0
  22. package/packages/business-components/video-dialog/src/hooks/use-video/PlayerProvider.d.ts +6 -0
  23. package/packages/business-components/video-dialog/src/type.d.ts +2 -0
  24. package/packages/components/edit-table/index.js +959 -957
  25. package/packages/components/edit-table/index.js.gz +0 -0
  26. package/packages/components/edit-table/src/index.vue.d.ts +4 -1
  27. package/packages/components/search/index.js +54 -106
  28. package/packages/components/search/index.js.gz +0 -0
  29. package/packages/components/search/src/Index.vue.d.ts +1 -1
  30. package/packages/components/search/style.css +1 -1
  31. package/packages/components/search/style.css.gz +0 -0
  32. package/packages/components/table/index.d.ts +11 -2
  33. package/packages/components/table/index.js +2886 -2881
  34. package/packages/components/table/index.js.gz +0 -0
  35. package/packages/components/table/src/Table.vue.d.ts +1 -0
  36. package/packages/components/table/src/type.d.ts +3 -4
  37. package/packages/components/table/style.css +1 -1
  38. 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 k, watch as O, defineComponent as $, useCssVars as ue, computed as x, openBlock as g, createElementBlock as R, normalizeClass as de, renderSlot as Z, createCommentVNode as w, Fragment as K, renderList as ve, createBlock as h, withCtx as m, withModifiers as y, createVNode as v, createElementVNode as p, toDisplayString as pe, toRefs as fe } from "vue";
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 C } from "@das-fed/ui/packages/components/tooltip/index";
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 Ce } from "@das-fed/ui/packages/components/spin/index";
10
- import Ie from "dayjs";
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 be } from "@das-fed/utils/common-info";
12
+ import { getProjectInfo as V, getToken as Ce } from "@das-fed/utils/common-info";
13
13
  var B;
14
- const z = typeof window < "u", we = (t) => typeof t == "string", he = () => {
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, o = !0) {
27
- ce() ? Y(t) : o ? t() : L(t);
26
+ function Oe(t, n = !0) {
27
+ ce() ? Y(t) : n ? t() : L(t);
28
28
  }
29
29
  function te(t) {
30
- var o;
30
+ var n;
31
31
  const e = J(t);
32
- return (o = e == null ? void 0 : e.$el) != null ? o : e;
32
+ return (n = e == null ? void 0 : e.$el) != null ? n : e;
33
33
  }
34
- const Fe = z ? window : void 0, De = z ? window.document : void 0;
35
- function Se(...t) {
36
- let o, e, l, r;
37
- if (we(t[0]) || Array.isArray(t[0]) ? ([e, l, r] = t, o = Fe) : [o, e, l, r] = t, !o)
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 n = [], s = () => {
41
- n.forEach((c) => c()), n.length = 0;
42
- }, f = (c, _, I, E) => (c.addEventListener(_, I, E), () => c.removeEventListener(_, I, E)), i = O(() => [te(o), J(r)], ([c, _]) => {
43
- s(), c && n.push(...e.flatMap((I) => l.map((E) => f(c, I, E, _))));
44
- }, { immediate: !0, flush: "post" }), d = () => {
45
- i(), s();
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(d), d;
47
+ return ee(u), u;
48
48
  }
49
- function Re(t, o = !1) {
50
- const e = k(), l = () => e.value = !!t();
51
- return l(), Oe(l, o), e;
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 ne(t, o = {}) {
98
- const { document: e = De, autoExit: l = !1 } = o, r = t || (e == null ? void 0 : e.querySelector("html")), n = k(!1);
99
- let s = A[0];
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 s = F, !0;
104
+ return i = F, !0;
105
105
  } else
106
106
  return !1;
107
107
  return !1;
108
- }), [i, d, c, , _] = s;
109
- async function I() {
110
- f.value && (e != null && e[c] && await e[d](), n.value = !1);
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 I();
115
+ await b();
116
116
  const F = te(r);
117
- F && (await F[i](), n.value = !0);
117
+ F && (await F[s](), o.value = !0);
118
118
  }
119
119
  async function T() {
120
- n.value ? await I() : await E();
120
+ o.value ? await b() : await E();
121
121
  }
122
- return e && Se(e, _, () => {
123
- n.value = !!(e != null && e[c]);
124
- }, !1), l && ee(I), {
122
+ return e && De(e, g, () => {
123
+ o.value = !!(e != null && e[c]);
124
+ }, !1), l && ee(b), {
125
125
  isSupported: f,
126
- isFullscreen: n,
126
+ isFullscreen: o,
127
127
  enter: E,
128
- exit: I,
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, o, e) => o in t ? $e(t, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[o] = e, xe = (t, o) => {
137
- for (var e in o || (o = {}))
138
- Pe.call(o, e) && W(t, e, o[e]);
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(o))
141
- Le.call(o, e) && W(t, e, o[e]);
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: o }) {
180
+ setup(t, { emit: n }) {
181
181
  ue((c) => ({
182
- "9b3a2c32": d.value
182
+ "9b3a2c32": u.value
183
183
  }));
184
- const e = t, l = o, r = k(), { toggle: n, isFullscreen: s } = ne(r), f = () => {
185
- r.value != document.fullscreenElement && (s.value ? (s.value = !1, L(() => {
186
- n();
187
- })) : n());
188
- }, i = () => {
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
- }, d = x(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
191
- return (c, _) => (g(), R(
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: _[0] || (_[0] = (I) => f()),
198
- onClick: _[1] || (_[1] = (I) => i())
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, o) => {
207
+ }), N = (t, n) => {
208
208
  const e = t.__vccOpts || t;
209
- for (const [l, r] of o)
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: o }) {
221
- const e = t, l = o, r = (n) => {
222
- l("update:activeIndex", n);
220
+ setup(t, { emit: n }) {
221
+ const e = t, l = n, r = (o) => {
222
+ l("update:activeIndex", o);
223
223
  };
224
- return (n, s) => (g(), R("div", ze, [
225
- w(' :active="index === activeIndex" '),
226
- (g(!0), R(
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, i) => (g(), h(Ue, {
229
+ ve(e.gridNum, (f, s) => (y(), h(Ue, {
230
230
  active: !1,
231
231
  "grid-num": e.gridNum,
232
- onItemClick: (d) => r(i)
232
+ onItemClick: (u) => r(s)
233
233
  }, {
234
234
  default: m(() => [
235
- n.showFn(i) ? Z(n.$slots, "default", {
235
+ o.showFn(s) ? Z(o.$slots, "default", {
236
236
  key: 0,
237
- index: i
238
- }, void 0, !0) : w("v-if", !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: o }) {
252
- const e = o, l = (r) => {
251
+ setup(t, { emit: n }) {
252
+ const e = n, l = (r) => {
253
253
  e("change", r);
254
254
  };
255
- return (r, n) => (g(), R(
255
+ return (r, o) => (y(), R(
256
256
  "div",
257
257
  {
258
258
  class: "direction-control",
259
- onDblclick: n[9] || (n[9] = y((s) => s.stopPropagation(), ["stop"]))
259
+ onDblclick: o[9] || (o[9] = k((i) => i.stopPropagation(), ["stop"]))
260
260
  },
261
261
  [
262
- v(a(C), { content: "左上" }, {
262
+ v(a(w), { content: "左上" }, {
263
263
  default: m(() => [
264
264
  p("div", {
265
265
  class: "icon icon-top-left",
266
- onClick: n[0] || (n[0] = y((s) => l("leftUp"), ["stop"]))
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(C), { content: "上" }, {
272
+ v(a(w), { content: "上" }, {
273
273
  default: m(() => [
274
274
  p("div", {
275
275
  class: "icon icon-top",
276
- onClick: n[1] || (n[1] = y((s) => l("up"), ["stop"]))
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(C), { content: "右上" }, {
282
+ v(a(w), { content: "右上" }, {
283
283
  default: m(() => [
284
284
  p("div", {
285
285
  class: "icon icon-top-right",
286
- onClick: n[2] || (n[2] = y((s) => l("rightUp"), ["stop"]))
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(C), { content: "左" }, {
292
+ v(a(w), { content: "左" }, {
293
293
  default: m(() => [
294
294
  p("div", {
295
295
  class: "icon icon-left",
296
- onClick: n[3] || (n[3] = y((s) => l("left"), ["stop"]))
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(C), { content: "自动" }, {
302
+ v(a(w), { content: "自动" }, {
303
303
  default: m(() => [
304
304
  p("div", {
305
305
  class: "icon icon-auto",
306
- onClick: n[4] || (n[4] = y((s) => l("auto"), ["stop"]))
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(C), { content: "右" }, {
312
+ v(a(w), { content: "右" }, {
313
313
  default: m(() => [
314
314
  p("div", {
315
315
  class: "icon icon-right",
316
- onClick: n[5] || (n[5] = y((s) => l("right"), ["stop"]))
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(C), { content: "左下" }, {
322
+ v(a(w), { content: "左下" }, {
323
323
  default: m(() => [
324
324
  p("div", {
325
325
  class: "icon icon-bottom-left",
326
- onClick: n[6] || (n[6] = y((s) => l("leftDown"), ["stop"]))
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(C), { content: "下" }, {
332
+ v(a(w), { content: "下" }, {
333
333
  default: m(() => [
334
334
  p("div", {
335
335
  class: "icon icon-bottom",
336
- onClick: n[7] || (n[7] = y((s) => l("down"), ["stop"]))
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(C), { content: "右下" }, {
342
+ v(a(w), { content: "右下" }, {
343
343
  default: m(() => [
344
344
  p("div", {
345
345
  class: "icon icon-bottom-right",
346
- onClick: n[8] || (n[8] = y((s) => l("rightDown"), ["stop"]))
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: o }) {
374
- const e = t, l = o;
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 = k(!0), n = k(), s = k(!1), f = k(), i = x(() => {
383
- var u;
384
- return (u = f.value) == null ? void 0 : u.video;
385
- }), d = k(!1), c = k(!0), _ = (u) => {
386
- n.value = u, n.value.on(window.mpegts.Events.ERROR, (b) => {
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
- }, I = () => {
389
- r.value = !r.value, n.value && (n.value.muted = r.value);
388
+ }, b = () => {
389
+ r.value = !r.value, o.value && (o.value.muted = r.value);
390
390
  }, E = () => {
391
- s.value = !s.value;
392
- }, T = k(""), F = () => {
393
- const u = document.createElement("canvas");
394
- if (i.value) {
395
- u.width = i.value.clientWidth, u.height = i.value.clientHeight;
396
- const b = u.getContext("2d");
397
- b == null || b.drawImage(i.value, 0, 0, u.width, u.height);
398
- const S = u.toDataURL("image/jpg"), se = `【${e.title}】${Ie().format("YYYYMMDDHHmmss").toString()}.jpg`;
399
- if (T.value = S, "download" in document.createElement("a")) {
400
- const D = document.createElement("a");
401
- D.download = se, D.style.display = "none", D.href = S, document.body.appendChild(D), document.body.appendChild(u), D.click(), URL.revokeObjectURL(D.href), document.body.removeChild(D), document.body.removeChild(u);
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 = (u) => {
405
- l("directionControl", u);
406
- }, j = (u) => {
407
- l("zoomControl", u);
408
- }, U = (u) => e.authType.includes(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
- () => i.value,
410
+ () => s.value,
411
411
  () => {
412
- i.value && i.value.addEventListener("ended", () => {
413
- d.value = !0, e.type === "playback" && (c.value = !1);
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
- () => i.value,
417
+ () => s.value,
418
418
  () => {
419
- i.value && L(() => {
420
- i.value.playbackRate = e.playbackRate || 1;
419
+ s.value && L(() => {
420
+ s.value.playbackRate = e.playbackRate || 1;
421
421
  });
422
422
  }
423
423
  ), O(
424
- () => n.value,
424
+ () => o.value,
425
425
  () => {
426
- n.value && L(() => {
427
- n.value.muted = r.value;
426
+ o.value && L(() => {
427
+ o.value.muted = r.value;
428
428
  });
429
429
  }
430
430
  ), O(
431
431
  () => e.playbackRate,
432
432
  () => {
433
- i.value && (i.value.playbackRate = e.playbackRate || 1);
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
- n.value && (e.paused ? n.value.pause() : n.value.play());
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
- ), (u, b) => (g(), R("div", Qe, [
451
- v(a(Ce), {
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(u.type) ? (g(), R("span", Ye, "正在实时预览")) : w("v-if", !0),
471
- w(' <das-icon class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
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 ? (g(), h(a(_e), {
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"])) : w("v-if", !0),
482
+ }, null, 8, ["muted", "src"])) : I("v-if", !0),
483
483
  p("div", Ze, [
484
- b[3] || (b[3] = p(
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: b[2] || (b[2] = y((S) => S.stopPropagation(), ["stop"]))
496
+ onDblclick: C[2] || (C[2] = k((D) => D.stopPropagation(), ["stop"]))
497
497
  },
498
498
  [
499
- v(a(C), { content: "声音" }, {
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: y(I, ["stop"])
504
+ onClick: k(b, ["stop"])
505
505
  }, null, 8, ["icon"])
506
506
  ]),
507
507
  _: 1
508
508
  /* STABLE */
509
509
  }),
510
- v(a(C), { content: "截图" }, {
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: y(F, ["stop"])
515
+ onClick: k(F, ["stop"])
516
516
  })
517
517
  ]),
518
518
  _: 1
519
519
  /* STABLE */
520
520
  }),
521
- U("control") ? (g(), h(a(C), {
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) ? (g(), h(a(P), {
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: b[0] || (b[0] = y((S) => j("zoomOut"), ["stop"]))
531
- })) : w("v-if", !0)
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
- })) : w("v-if", !0),
536
- U("control") ? (g(), h(a(C), {
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) ? (g(), h(a(P), {
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: b[1] || (b[1] = y((S) => j("zoomIn"), ["stop"]))
546
- })) : w("v-if", !0)
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
- })) : w("v-if", !0),
551
- U("control") ? (g(), h(a(C), {
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) ? (g(), h(a(P), {
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: y(E, ["stop"])
561
- })) : w("v-if", !0)
560
+ onClick: k(E, ["stop"])
561
+ })) : I("v-if", !0)
562
562
  ]),
563
563
  _: 1
564
564
  /* STABLE */
565
- })) : w("v-if", !0)
565
+ })) : I("v-if", !0)
566
566
  ],
567
567
  32
568
568
  /* NEED_HYDRATION */
569
569
  )
570
570
  ])
571
571
  ]),
572
- s.value ? (g(), h(Me, {
572
+ i.value ? (y(), h(Me, {
573
573
  key: 1,
574
574
  onChange: ie
575
- })) : w("v-if", !0)
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", nt = X(`/api/enterpriseright/permission/${tt}`), oe = X(`${et}`, ot);
583
- function ot(t) {
584
- const o = V() ? V().id : 1;
585
- return t.params || (t.params = {}), t.params.project = o, t.params.projectId = o, t;
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 o = new URLSearchParams("");
588
+ const n = new URLSearchParams("");
589
589
  for (let [e, l] of Object.entries(t))
590
- o.append(e, l);
591
- return o.toString();
590
+ n.append(e, l);
591
+ return n.toString();
592
592
  }
593
593
  function H(t) {
594
- return oe.post(`/ptz?${le(t)}`)().run();
594
+ return ne.post(`/ptz?${le(t)}`)().run();
595
595
  }
596
596
  function lt(t) {
597
- return oe.post(`/url/preview?${le(t)}`)().run();
597
+ return ne.post(`/url/preview?${le(t)}`)().run();
598
598
  }
599
- nt.post("data/device-auth");
599
+ ot.post("data/device-auth");
600
600
  const it = (t) => {
601
- const o = be();
602
- return `${t}?token=${o}`;
601
+ const n = Ce();
602
+ return `${t}?token=${n}`;
603
603
  };
604
- k([]);
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: o
616
+ slots: n
614
617
  }) {
615
618
  const {
616
- deviceInfo: e
617
- } = fe(t), l = k(!1), r = k(""), n = async () => {
618
- var c;
619
- if (!((c = e.value) != null && c.deviceId)) return;
620
- l.value = !0;
621
- const [i, d] = await lt({
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
- i || (r.value = it(d == null ? void 0 : d.wsFlvStreamURL)), l.value = !1;
626
- }, s = (i) => {
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: i,
631
- zoom: ""
635
+ direction: u,
636
+ zoom: "",
637
+ source: l.value || "web"
632
638
  });
633
- }, f = (i) => {
639
+ }, s = (u) => {
634
640
  H({
635
641
  productId: e.value.productId,
636
642
  deviceId: e.value.deviceId,
637
643
  direction: "",
638
- zoom: i
644
+ zoom: u,
645
+ source: l.value || "web"
639
646
  });
640
647
  };
641
648
  return Y(() => {
642
- n();
649
+ i();
643
650
  }), O(() => e.value, () => {
644
- n();
651
+ i();
645
652
  }, {
646
653
  deep: !0
647
- }), () => v(K, null, [o.default({
648
- videoUrl: r.value,
649
- loading: l.value,
650
- onDirectionControl: s,
651
- onZoomControl: f
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 o = k(0), e = k(), {
663
+ const n = _(0), e = _(), {
657
664
  toggle: l,
658
665
  isFullscreen: r
659
- } = ne(e);
666
+ } = oe(e);
660
667
  return {
661
668
  render: () => v(Ve, {
662
669
  ref: e,
663
670
  gridNum: t.gridNum,
664
- activeIndex: o.value,
665
- "onUpdate:activeIndex": (s) => o.value = s,
666
- showFn: (s) => !!t.deviceList[s]
671
+ activeIndex: n.value,
672
+ "onUpdate:activeIndex": (i) => n.value = i,
673
+ showFn: (i) => !!t.deviceList[i]
667
674
  }, {
668
675
  default: ({
669
- index: s
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: i,
677
- onDirectionControl: d,
678
- onZoomControl: c,
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: i,
690
+ loading: b,
691
+ videoUrl: u,
684
692
  title: f.deviceName,
685
- onDirectionControl: d,
686
- onZoomControl: c,
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: o }) {
704
- const e = t, l = o, r = x({
712
+ setup(t, { emit: n }) {
713
+ const e = t, l = n, r = x({
705
714
  get: () => e.visible,
706
- set: (i) => l("update:visible", i)
707
- }), { render: n, toggleFullscreen: s } = rt(e), f = x(() => {
708
- let i = {};
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
- i = "one-video";
720
+ s = "one-video";
712
721
  break;
713
722
  case 4:
714
- i = "four-video";
723
+ s = "four-video";
715
724
  break;
716
725
  case 9:
717
- i = "nine-video";
726
+ s = "nine-video";
718
727
  break;
719
728
  }
720
- return i;
729
+ return s;
721
730
  });
722
- return (i, d) => (g(), h(a(ge), {
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": d[0] || (d[0] = (c) => r.value = c),
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
- d[1] || (d[1] = p(
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(C), { content: "页面全屏" }, {
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(s)
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 ? (g(), h(a(n), { key: 0 })) : w("v-if", !0)
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
- }), Ct = me(at), It = () => k(null);
772
+ }), bt = me(at), wt = () => _(null);
764
773
  export {
765
- Ct as DasVideoDialog,
766
- It as DasVideoDialogRef,
774
+ bt as DasVideoDialog,
775
+ wt as DasVideoDialogRef,
767
776
  rt as useVideo
768
777
  };