@das-fed/ui 7.0.14 → 7.1.0-dev.10

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