import {
    G as x,
    R as S,
    r as u,
    A,
    w as a,
    a6 as C,
    B as L,
    $ as U,
    H as f,
    I as b,
    Q as d,
    J as s,
    an as M,
    au as c,
    O as $,
    N as p,
    aA as D,
    P as r,
    at as I,
    K as V,
    M as P
} from "./common.modules-af1f85b9.js";
import {
    bA as n,
    cn as Q,
    _ as j
} from "./page-activity-ActivityDetail-09e806d3.js";
import {
    L as q
} from "./page-activity-DailySignIn-a76bf4fc.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2c2af617.js";
import "./en-8dc3e88f.js";
import "./page-activity-Bonus-78dc3749.js";
const G = {
        class: "subordinate__container"
    },
    J = {
        class: "subordinate__container-header"
    },
    O = {
        class: "subordinate__container-content"
    },
    T = x({
        __name: "index",
        setup(E) {
            const H = S();

            function k() {
                H.back()
            }
            const g = u(!0),
                Y = u(),
                t = A({
                    startDate: a(n().today.start * 1e3).format("YYYY-MM-DD HH:mm:ss"),
                    endDate: a(n().today.end * 1e3).format("YYYY-MM-DD HH:mm:ss"),
                    level: 1
                });
            let l = C("permission", null);
            l && (l = JSON.parse(l.value));
            const m = u([]),
                h = L(() => l ? l[16] : !0),
                w = new Date,
                y = new Date(w);
            y.setDate(y.getDate() - 1);
            const _ = u(0);
            return U(_, o => {
                switch (o) {
                    case 0:
                        t.startDate = a(n().today.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().today.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break;
                    case 1:
                        t.startDate = a(n().yesterday.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().yesterday.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break;
                    case 2:
                        t.startDate = a(n().thisMonth.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().thisMonth.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break
                }
                Y.value.resetRefresh()
            }), (o, i) => {
                const B = f("NavBar"),
                    v = f("van-tab"),
                    N = f("van-tabs");
                return p(), b("div", G, [d(B, {
                    title: o.$t("addSubor"),
                    "left-arrow": "",
                    onClickLeft: k
                }, null, 8, ["title"]), s("div", J, [M(` <van-tabs class="top-tabBar" v-model:active="topActive" type="card" color="transparent" background="transparent"
				ref="tabsRef" ellipsis>
				<van-tab>
					<template #title> 直属下级 </template>
				</van-tab>
				<van-tab>
					<template #title> 全部下级 </template>
				</van-tab>
			</van-tabs> `), d(N, {
                    class: "footer-tabBar",
                    active: _.value,
                    "onUpdate:active": i[0] || (i[0] = e => _.value = e),
                    type: "card",
                    color: "transparent",
                    background: "transparent",
                    ref: "tabsRef",
                    ellipsis: ""
                }, {
                    default: c(() => [d(v, null, {
                        title: c(() => [D(r(o.$t("code9101")), 1)]),
                        _: 1
                    }), d(v, null, {
                        title: c(() => [D(r(o.$t("code9102")), 1)]),
                        _: 1
                    }), h.value ? (p(), I(v, {
                        key: 0
                    }, {
                        title: c(() => [D(r(o.$t("code9105")), 1)]),
                        _: 1
                    })) : M("v-if", !0)]),
                    _: 1
                }, 8, ["active"])]), d(q, {
                    list: m.value,
                    "onUpdate:list": i[1] || (i[1] = e => m.value = e),
                    "page-query": t,
                    "onUpdate:pageQuery": i[2] || (i[2] = e => t = e),
                    api: $(Q),
                    distance: 100,
                    ref_key: "listRef",
                    ref: Y,
                    "is-auto-load": g.value
                }, {
                    content: c(() => [s("div", O, [(p(!0), b(V, null, P(m.value, (e, R) => (p(), b("div", {
                        class: "subordinate__container-content__item ar-1px-b",
                        key: R
                    }, [s("div", null, [s("span", null, r(e.bindUserName), 1), s("span", null, "UID:" + r(e.bindUserID), 1)]), s("div", null, [s("span", null, r(o.$t("heroDirectSub")), 1), s("span", null, r(e.bindTime), 1)])]))), 128))])]),
                    _: 1
                }, 8, ["list", "page-query", "api", "is-auto-load"])])
            }
        }
    });
const te = j(T, [
    ["__scopeId", "data-v-221aa0df"],
    ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/promotion/Subordinate/index.vue"]
]);
export {
    te as
    default
};