import { defineComponent as Q, computed as x, ref as c, onMounted as K, onUnmounted as et, createElementBlock as a, openBlock as p, createElementVNode as r, Fragment as S, renderList as w, normalizeClass as f, toDisplayString as D, withDirectives as $, vModelText as lt, createCommentVNode as C, withModifiers as z, vShow as H, pushScopeId as rt, popScopeId as st } from "vue";
import "../../text-text-basic/index.mjs";
import "../../text-table-basic/index.mjs";
import "../../chart-other-gauge/index.mjs";
import "../../chart-other-gauge-stage/index.mjs";
import "../../chart-other-gauge-grade/index.mjs";
import "../../chart-other-word-cloud/index.mjs";
import "../../chart-other-liquidfill/index.mjs";
import "../../chart-other-funnel/index.mjs";
import "../../chart-other-force/index.mjs";
import "../../chart-other-radar/index.mjs";
import "../../chart-other-funnel-split/index.mjs";
import "../../chart-other-funnel-contrast/index.mjs";
import "../../chart-other-candlestick-basic/index.mjs";
import "../../chart-other-candlestick-shanghai/index.mjs";
import "../../chart-other-candlestick-demo/index.mjs";
import "../../chart-other-heatmap/index.mjs";
import "../../chart-other-force2/index.mjs";
import "../../chart-other-graph-basic/index.mjs";
import "../../chart-other-graph-basic2/index.mjs";
import "../../chart-other-graph-calendar/index.mjs";
import "../../chart-other-tree-line/index.mjs";
import "../../chart-other-treemap-basic/index.mjs";
import "../../chart-other-sunburst-basic/index.mjs";
import "../../chart-other-sunburst-basic2/index.mjs";
import "../../chart-other-sunburst-basic3/index.mjs";
import "../../chart-other-sunburst-basic4/index.mjs";
import "../../chart-other-sunburst-book/index.mjs";
import "../../chart-other-sunburst-radius/index.mjs";
import "../../chart-other-sunburst-flavors/index.mjs";
import "../../chart-other-parallel-basic/index.mjs";
import "../../chart-other-parallel-mul/index.mjs";
import "../../chart-other-circular-graph/index.mjs";
import "../../map-earth-basic/index.mjs";
import "../../map-earth-cool-tech/index.mjs";
import "../../map-earth-particle/index.mjs";
import "../../map-earth-hacker/index.mjs";
import "../../map-earth-fly-line/index.mjs";
import "../../chart-other-grid-percentage/index.mjs";
import "../../chart-other-radar-stack/index.mjs";
import "../../chart-other-funnel2/index.mjs";
import "../../chart-other-label-gauge/index.mjs";
import "../../chart-other-theme-river/index.mjs";
import "../../chart-other-tree/index.mjs";
import "../../chart-other-treemap/index.mjs";
import "../../commons-product-model/index.mjs";
import "../../commons-vr-photo/index.mjs";
import "../../commons-vr-video/index.mjs";
import "../../commons-three-loader/index.mjs";
import "../../commons-three-loader3/index.mjs";
import "../../commons-loop-iterator/index.mjs";
import "../../commons-gaussian-splatting-view/index.mjs";
import "../../commons-babylon/index.mjs";
import "../../commons-svg/index.mjs";
import "../../commons-weather/index.mjs";
import "../../commons-weather-dynamic/index.mjs";
import "../../media-wavesurfer/index.mjs";
import "../../interaction-tabs/index.mjs";
import "../../interaction-tabs2/index.mjs";
import "../../interaction-button/index.mjs";
import "../../interaction-button-image/index.mjs";
import "../../interaction-select/index.mjs";
import "../../interaction-input/index.mjs";
import "../../interaction-radio/index.mjs";
import "../../interaction-slider/index.mjs";
import "../../interaction-switch/index.mjs";
import "../../interaction-data-picker/index.mjs";
import "../../interaction-button-refresh/index.mjs";
import "../../media-image/index.mjs";
import "../../text-title/index.mjs";
import "../../commons-qrcode/index.mjs";
import "../../media-video/index.mjs";
import "../../media-audio/index.mjs";
import "../../text-real-time/index.mjs";
import "../../media-carousel/index.mjs";
import "../../media-carousel-slides/index.mjs";
import "../../media-iframe-carousel/index.mjs";
import "../../media-iframe/index.mjs";
import "../../media-m3u8/index.mjs";
import "../../media-m3u8-dynamic/index.mjs";
import "../../media-audio-dynamic/index.mjs";
import "../../media-video-dynamic/index.mjs";
import "../../media-image-dynamic/index.mjs";
import "../../media-iframe-dynamic/index.mjs";
import "../../media-flv/index.mjs";
import "../../commons-echarts/index.mjs";
import "../../text-over-number/index.mjs";
import "../../text-table-scroll/index.mjs";
import "../../text-carousel/index.mjs";
import "../../text-row-scroll/index.mjs";
import "../../text-text-dynamic/index.mjs";
import "../../text-count-down/index.mjs";
import "../../graphical-circle/index.mjs";
import "../../graphical-diamond/index.mjs";
import "../../graphical-hexagon/index.mjs";
import "../../graphical-isosceles-triangle/index.mjs";
import "../../graphical-pentagon/index.mjs";
import "../../graphical-rect/index.mjs";
import "../../graphical-right-triangle/index.mjs";
import "../../scene-map3d/index.mjs";
import "../../scene-amap2d/index.mjs";
import "../../scene-amap3d/index.mjs";
import "../../scene-vr/index.mjs";
import "../../scene-unity-iframe/index.mjs";
import "../../scene-unity-webgl/index.mjs";
import "../../scene-ue-iframe/index.mjs";
import "../../scene-ue-shj/index.mjs";
import "../../scene-default/index.mjs";
import "../../interaction/tabs/index.mjs";
import "../../interaction/tabs-icon/index.mjs";
import "../../interaction/button/index.mjs";
import "../../interaction/date-picker/src/date-picker/index.mjs";
import "../../interaction/date-picker/src/date-picker-range/index.mjs";
import "../../text/list/index.mjs";
import "../../chart/src/bar/basic/index.mjs";
import "../../chart/src/bar/animation/index.mjs";
import "../../chart/src/bar/contrast/index.mjs";
import "../../chart/src/bar/contrast2/index.mjs";
import "../../chart/src/bar/contrast3/index.mjs";
import "../../chart/src/bar/gradient-column-chart/index.mjs";
import "../../chart/src/bar/horizontal/index.mjs";
import "../../chart/src/bar/horizontal-stack/index.mjs";
import "../../chart/src/bar/line-bar/index.mjs";
import "../../chart/src/bar/line-bar2/index.mjs";
import "../../chart/src/bar/loop/index.mjs";
import "../../chart/src/bar/mini/index.mjs";
import "../../chart/src/bar/polar/index.mjs";
import "../../chart/src/bar/polar-stack/index.mjs";
import "../../chart/src/bar/polar2/index.mjs";
import "../../chart/src/bar/radius-circle/index.mjs";
import "../../chart/src/bar/rank/index.mjs";
import "../../chart/src/bar/segmented-progress/index.mjs";
import "../../chart/src/bar/spire/index.mjs";
import "../../chart/src/bar/stack/index.mjs";
import "../../chart/src/bar/stack-line/index.mjs";
import "../../chart/src/bar/stack2/index.mjs";
import "../../chart/src/bar/stack3/index.mjs";
import "../../chart/src/bar/staggered/index.mjs";
import "../../chart/src/bar/three/index.mjs";
import "../../chart/src/bar/waterfall/index.mjs";
import "../../chart/src/bar/zebra/index.mjs";
import "../../chart/src/line/area-gradient/index.mjs";
import "../../chart/src/line/area-highlight/index.mjs";
import "../../chart/src/line/area-highlight2/index.mjs";
import "../../chart/src/line/basic/index.mjs";
import "../../chart/src/line/bump/index.mjs";
import "../../chart/src/line/dashed/index.mjs";
import "../../chart/src/line/ladder/index.mjs";
import "../../chart/src/line/logarithm/index.mjs";
import "../../chart/src/line/multix/index.mjs";
import "../../chart/src/line/polar-double/index.mjs";
import "../../chart/src/line/rain-flow/index.mjs";
import "../../chart/src/line/scale/index.mjs";
import "../../chart/src/line/smooth/index.mjs";
import "../../chart/src/line/smooth-area/index.mjs";
import "../../chart/src/line/stack/index.mjs";
import "../../chart/src/line/stack-area/index.mjs";
import "../../chart/src/line/temp/index.mjs";
import "../../chart/src/line/vertical/index.mjs";
import "../../chart/src/map/basic/index.mjs";
import "../../chart/src/map/bmap-basic/index.mjs";
import "../../chart/src/map/bmap-heatmap/index.mjs";
import "../../chart/src/map/bmap-rich/index.mjs";
import "../../chart/src/map/customize/index.mjs";
import "../../chart/src/map/lines/index.mjs";
import "../../chart/src/map/scatter/index.mjs";
import "../../chart/src/pie/3d/index.mjs";
import "../../chart/src/pie/basic/index.mjs";
import "../../chart/src/pie/basic2/index.mjs";
import "../../chart/src/pie/customized/index.mjs";
import "../../chart/src/pie/index/index.mjs";
import "../../chart/src/pie/interval/index.mjs";
import "../../chart/src/pie/legend-scroll/index.mjs";
import "../../chart/src/pie/radius/index.mjs";
import "../../chart/src/pie/rose/index.mjs";
import "../../chart/src/pie/round/index.mjs";
import "../../chart/src/pie/sunburst/index.mjs";
import "../../chart/src/scatter/basic/index.mjs";
import "../../chart/src/scatter/basic2/index.mjs";
import "../../chart/src/scatter/bubble/index.mjs";
import "../../chart/src/scatter/ripples/index.mjs";
import "../zv-hj-tree-list/index.mjs";
import "../zv-hj-model-resource/index.mjs";
import "../zv-hj-one-map-config/index.mjs";
import "../zv-hj-video-control/index.mjs";
import "../zv-hj-video-page/index.mjs";
import "../zv-hj-password-input/index.mjs";
import "../zv-hj-carousel/index.mjs";
import "../zv-hj-video-monitor/index.mjs";
import "../zv-hj-scene-amap2d/index.mjs";
import "../zv-hj-scene-amap3d/index.mjs";
import "../zv-hj-person-face/index.mjs";
import "../zv-hj-resource-type-phone/index.mjs";
import "../zv-hj-tree-list-phone/index.mjs";
import "./index.mjs";
import "../zv-hj-model-resource-phone/index.mjs";
import "../zv-hj-bottom-suspend/index.mjs";
import "../zv-hj-pagination/index.mjs";
import "../zv-hj-password-input-phone/index.mjs";
/* empty css                           */
/* empty css                                  */
import { SHJDatasourceV2 as at } from "../../../plugins/datasource/index.mjs";
import "lodash";
import "../../../plugins/event/actions/fullScreenAction.mjs";
import { HJLYDatasourceApi as F } from "../../../plugins/datasource/hjly/index.mjs";
const A = (b) => (rt("data-v-5a2b8c0f"), b = b(), st(), b), pt = { class: "index" }, mt = { class: "tab-box" }, ct = ["onClick"], nt = { class: "tab-item" }, dt = { class: "title" }, ut = { class: "tab1" }, vt = { class: "search-box" }, ht = { class: "search" }, _t = /* @__PURE__ */ A(() => /* @__PURE__ */ r("div", { class: "icon left" }, null, -1)), gt = /* @__PURE__ */ A(() => /* @__PURE__ */ r("div", { class: "icon right" }, null, -1)), kt = { class: "body" }, ft = {
  key: 0,
  class: "left"
}, Nt = ["onClick"], Lt = {
  key: 1,
  class: "right"
}, yt = { class: "right-content" }, Ct = /* @__PURE__ */ A(() => /* @__PURE__ */ r("div", { class: "head-item" }, null, -1)), bt = { class: "list-item-box" }, Vt = ["onClick"], St = { class: "item-title" }, wt = ["onClick"], Dt = {
  key: 0,
  class: "no-data"
}, Ft = /* @__PURE__ */ A(() => /* @__PURE__ */ r("div", { class: "bottom-item" }, null, -1)), It = {
  key: 2,
  class: "no-data"
}, Et = { class: "tab2" }, Tt = ["onClick"], xt = { class: "item-title" }, $t = ["onClick"], At = {
  key: 0,
  class: "no-data middle"
}, Pt = { class: "tab2" }, Ot = ["onClick"], Bt = { class: "item-title" }, Jt = ["onClick"], jt = {
  key: 0,
  class: "no-data middle"
}, zt = Q({ name: "zv-hj-video-page-phone" }), xl = /* @__PURE__ */ Q({
  ...zt,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: ["on-click"],
  setup(b, { emit: Ht }) {
    const M = b;
    x(() => {
      var t, i, o;
      return ((o = (i = (t = u.value[0]) == null ? void 0 : t.list[V.value]) == null ? void 0 : i.list[L.value]) == null ? void 0 : o.childList) || [];
    });
    const I = x(() => {
      var t, i;
      return ((i = (t = u.value[0]) == null ? void 0 : t.list[V.value]) == null ? void 0 : i.list) || [];
    }), P = x(() => {
      var t, i, o, e, l, s, v;
      return O.value >= 0 ? ((e = (o = (i = (t = u.value[0]) == null ? void 0 : t.list[V.value]) == null ? void 0 : i.list[L.value]) == null ? void 0 : o.childList[O.value]) == null ? void 0 : e.listDeviceVos) || [] : ((v = (s = (l = u.value[0]) == null ? void 0 : l.list[V.value]) == null ? void 0 : s.list[L.value]) == null ? void 0 : v.listDeviceVos) || [];
    }), U = x(() => {
      var i, o;
      const t = [];
      return (o = (i = u.value[0]) == null ? void 0 : i.list) == null || o.forEach((e) => {
        var l;
        (l = e == null ? void 0 : e.list) == null || l.forEach((s) => {
          var v, k;
          (v = s == null ? void 0 : s.childList) == null || v.forEach((m) => {
            var d;
            (d = m == null ? void 0 : m.listDeviceVos) == null || d.forEach((y) => {
              y != null && y.collectId && t.push(y);
            });
          }), (k = s == null ? void 0 : s.listDeviceVos) == null || k.forEach((m) => {
            m != null && m.collectId && t.push(m);
          });
        });
      }), t;
    }), W = c([]), X = c([
      { id: 1, title: "监控列表", icon: "video-list" },
      { id: 2, title: "最近浏览", icon: "video-history" },
      { id: 3, title: "收藏夹", icon: "video-collect" }
    ]), N = c(1), E = c(null), u = c([]), V = c(0), L = c(0), O = c(-1), h = c(!0), T = c([]), _ = "视频监控中心", g = "车载视频监控", Z = c(2), n = c({}), G = c(!1);
    K(() => {
      at.parse({
        tId: M.uuid,
        sources: M.sources,
        callback: ({ data: t }) => {
          W.value = t[0].data;
        }
      }), R();
    });
    const tt = (t) => {
      N.value = t, t === 1 && B(), t === 2 && ot(), t === 3 && B();
    }, B = () => {
      u.value = [], n.value = {}, R();
    }, ot = (t) => {
      h.value = !0;
      {
        const i = {
          dataType: 1
        };
        F.videoPreviewList(i).then((o) => {
          const e = o == null ? void 0 : o.data;
          T.value = (e == null ? void 0 : e.list) || [];
        });
      }
      setTimeout(() => {
        h.value = !1;
      }, 2e3);
    }, J = (t, i, o, e) => {
      G.value = !0, window && window.localStorage.setItem("redStyleFullPlayInfo", JSON.stringify({ item: t, i, arr: o, channelId: e })), window.location.href = F.preUrl + "/subPackageB/pages/videoSurveillance/full-play?moduleStyleFunllScreen=" + G.value;
    }, j = (t) => {
      if (t.collectId) {
        const i = {
          resourceId: t.resourceId
        };
        F.videoNotCollect(i).then((o) => {
          t.collectId = null;
        });
      } else {
        const i = {
          resourceId: t == null ? void 0 : t.resourceId,
          typeId: t == null ? void 0 : t.typeId,
          videoType: (t == null ? void 0 : t.protocolId) || (t == null ? void 0 : t.videoType) || 1
        };
        F.videoCollect(i).then((o) => {
          t.collectId = 1;
        });
      }
    }, R = () => {
      h.value = !0, Y({
        typeId: "27",
        // 视频监控
        checklistPatternFilerInList: [
          {
            filedName: "branchId",
            filedValue: ""
          }
        ],
        filter: E.value,
        checkListCode: "A3-05-05",
        // 视频监控模板code
        groupName: _
      }), Y({
        typeId: "49",
        // 车流监控
        checklistPatternFilerInList: [],
        filter: E.value,
        checkListCode: "A3-05-07",
        // 视频监控模板code
        groupName: g,
        dutyAreaId: ""
      });
    }, Y = (t) => {
      const i = {
        typeId: t.typeId,
        // 视频监控
        checklistPatternFilerInList: t.checklistPatternFilerInList,
        filter: t.filter,
        dutyAreaId: t.dutyAreaId,
        pageNo: 1,
        pageSize: 2e3,
        checkListCode: t.checkListCode || "A3-05-05"
        // 视频监控模板code/车流监控模板
      };
      F.loadCheckList(i).then((o) => {
        var s;
        const l = ((o == null ? void 0 : o.data) || {}).listRet || [];
        if (t.groupName === g && q(l), n.value[t.groupName] = l, Object.keys(n.value).length >= Z.value) {
          u.value = [];
          let v = [];
          if (n.value[_] && n.value[_].length > 0)
            if (n.value[_][0].listDeviceVos.length === 0)
              v = [];
            else {
              let k = 0, m = 0;
              n.value[_].forEach((d) => {
                d.total = 0, d.lineNum = 0, d.listDeviceVos && d.listDeviceVos.forEach((y) => {
                  y.offlineFlag === 0 && (d.lineNum += 1, m++), k++, d.total++;
                });
              }), v.push({
                groupName: _,
                name: _,
                total: k || 0,
                lineNum: m,
                expendFlag: !1,
                list: n.value[_]
              });
            }
          if (n.value[g] && n.value[g].length > 0) {
            let k = 0, m = 0;
            n.value[g].forEach((d) => {
              k += d.onlineNum, m += d.totalNum;
            }), v.push({
              groupName: g,
              name: g,
              total: m,
              lineNum: k,
              expendFlag: !1,
              list: n.value[g]
            });
          }
          u.value.push({
            groupName: "监控中心",
            name: "监控中心",
            list: v
          }), window && ((s = window == null ? void 0 : window.localStorage) == null || s.setItem("previewVideoList", JSON.stringify(u.value)));
        }
        setTimeout(() => {
          h.value = !1;
        }, 2e3);
      });
    }, q = (t) => {
      var e;
      let i = 0, o = 0;
      return (e = t == null ? void 0 : t.forEach) == null || e.call(t, (l) => {
        if (l.list && l.list.forEach((s) => {
          s.isCarVideoTag = !0;
        }), l.listDeviceVos && (l.onlineNum = 0, l.totalNum = 0, l.listDeviceVos.forEach((s) => {
          s.isCarVideoTag = !0, s.offlineFlag === 0 && (i++, l.onlineNum++), o++, l.totalNum++;
        })), l.childList) {
          l.onlineNum = 0, l.totalNum = 0;
          const s = q(l.childList);
          l.onlineNum = s.onlineNum, l.totalNum = s.totalNum;
        }
      }), {
        onlineNum: i,
        totalNum: o
      };
    }, it = (t, i) => {
      L.value = i, O.value = -1;
    };
    return K(() => {
    }), et(() => {
    }), (t, i) => (p(), a("div", pt, [
      r("div", mt, [
        (p(!0), a(S, null, w(X.value, (o, e) => (p(), a("div", {
          key: e + "A",
          class: f(["tab-item-box", [o.id === N.value ? "active" : ""]]),
          onClick: (l) => tt(o.id)
        }, [
          r("div", nt, [
            r("div", {
              class: f(["icon", [o.icon]])
            }, null, 2),
            r("div", dt, D(o.title), 1)
          ])
        ], 10, ct))), 128))
      ]),
      r("div", {
        class: f(["content", [N.value == 1 ? "no-scroll" : ""]])
      }, [
        $(r("div", ut, [
          r("div", vt, [
            r("div", ht, [
              _t,
              $(r("input", {
                "onUpdate:modelValue": i[0] || (i[0] = (o) => E.value = o),
                class: "input",
                type: "text",
                placeholder: "请输入监控地点名称"
              }, null, 512), [
                [
                  lt,
                  E.value,
                  void 0,
                  { trim: !0 }
                ]
              ]),
              r("div", {
                class: "text",
                onClick: i[1] || (i[1] = (o) => B())
              }),
              gt
            ])
          ]),
          r("div", kt, [
            I.value.length > 0 ? (p(), a("div", ft, [
              (p(!0), a(S, null, w(I.value, (o, e) => (p(), a("div", {
                key: e + "B",
                class: f(["left-item", [L.value == e ? "active" : ""]]),
                onClick: (l) => it(o, e)
              }, D(o.groupName), 11, Nt))), 128))
            ])) : C("", !0),
            I.value.length > 0 ? (p(), a("div", Lt, [
              r("div", yt, [
                Ct,
                r("div", bt, [
                  (p(!0), a(S, null, w(P.value, (o, e) => (p(), a("div", {
                    key: e + "D",
                    class: "list-item",
                    onClick: (l) => J(o, e, P.value, null)
                  }, [
                    r("div", St, D(o.resourceName), 1),
                    r("div", {
                      class: f(["item-img", [o.collectId ? "collect" : ""]]),
                      onClick: z((l) => j(o), ["stop"])
                    }, null, 10, wt)
                  ], 8, Vt))), 128))
                ]),
                P.value.length == 0 && !h.value ? (p(), a("div", Dt, " 暂无数据 ")) : C("", !0),
                Ft
              ])
            ])) : C("", !0),
            I.value.length == 0 && !h.value ? (p(), a("div", It, " 暂无数据 ")) : C("", !0)
          ])
        ], 512), [
          [H, N.value == 1]
        ]),
        $(r("div", Et, [
          (p(!0), a(S, null, w(T.value, (o, e) => (p(), a("div", {
            key: e + "E",
            class: "list-item",
            onClick: (l) => J(o, e, T.value, null)
          }, [
            r("div", xt, D(o.resourceName), 1),
            r("div", {
              class: f(["item-img", [o.collectId ? "collect" : ""]]),
              onClick: z((l) => j(o), ["stop"])
            }, null, 10, $t)
          ], 8, Tt))), 128)),
          T.value.length == 0 && !h.value ? (p(), a("div", At, " 暂无数据 ")) : C("", !0)
        ], 512), [
          [H, N.value == 2]
        ]),
        $(r("div", Pt, [
          (p(!0), a(S, null, w(U.value, (o, e) => (p(), a("div", {
            key: e + "F",
            class: "list-item",
            onClick: (l) => J(o, e, u.value[0].list[V.value].list[L.value].listDeviceVos, null)
          }, [
            r("div", Bt, D(o.resourceName), 1),
            r("div", {
              class: f(["item-img", [o.collectId ? "collect" : ""]]),
              onClick: z((l) => j(o), ["stop"])
            }, null, 10, Jt)
          ], 8, Ot))), 128)),
          U.value.length == 0 && !h.value ? (p(), a("div", jt, " 暂无数据 ")) : C("", !0)
        ], 512), [
          [H, N.value == 3]
        ])
      ], 2)
    ]));
  }
});
export {
  xl as default
};
