"use strict"; const common_vendor = require("../../common/vendor.js"); const defaultAvatar = "/static/logo.png"; const _sfc_main = { data() { return { activeTab: "personal", personalData: { duration: [ { id: 1, name: "三多", value: 90, progress: 100, avatar: defaultAvatar }, { id: 2, name: "雅秋", value: 78, progress: 78 / 90 * 100, avatar: defaultAvatar }, { id: 3, name: "炫辰", value: 60, progress: 60 / 90 * 100, avatar: defaultAvatar } ], customers: [ { id: 1, name: "三多", value: 3, progress: 100, avatar: defaultAvatar }, { id: 2, name: "曼云", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar }, { id: 3, name: "雅秋", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar } ], sop: [ { id: 1, name: "三多", value: 91.5, progress: 100, avatar: defaultAvatar }, { id: 2, name: "曼云", value: 75, progress: 75 / 91.5 * 100, avatar: defaultAvatar } ] }, // 团队排行:门店维度数据 teamStoreData: { serviceTime: [ { rank: 1, name: "A门店", value: 33, progress: 100, badgeType: "gold", isMine: false }, { rank: 2, name: "B门店", value: 28, progress: 28 / 33 * 100, badgeType: "silver", isMine: false }, { rank: 3, name: "C门店", value: 16, progress: 16 / 33 * 100, badgeType: "bronze", isMine: false }, { rank: 11, name: "我的门店", value: 12, progress: 12 / 33 * 100, badgeType: "normal", isMine: true } ], badgeUsage: [ { rank: 1, name: "A门店", used: 9, opened: 10, rate: 90, badgeType: "gold", isMine: false }, { rank: 2, name: "B门店", used: 8, opened: 10, rate: 80, badgeType: "silver", isMine: false }, { rank: 3, name: "C门店", used: 7, opened: 10, rate: 70, badgeType: "bronze", isMine: false }, { rank: 5, name: "我的门店", used: 5, opened: 10, rate: 50, badgeType: "normal", isMine: true } ] } }; }, computed: { currentData() { return this.personalData; } }, methods: { changeTab(tab) { if (this.activeTab === tab) return; this.activeTab = tab; }, onBack() { const pages = getCurrentPages(); if (pages && pages.length > 1) { common_vendor.index.navigateBack(); } else { common_vendor.index.navigateTo({ url: "/pages-subpackage/customer/customer" }); } }, onMore(type) { common_vendor.index.__f__("log", "at pages/team/team.vue:333", "点击更多", type, this.activeTab); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return common_vendor.e({ a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)), b: $data.activeTab === "personal" ? 1 : "", c: common_vendor.o(($event) => $options.changeTab("personal")), d: $data.activeTab === "team" ? 1 : "", e: common_vendor.o(($event) => $options.changeTab("team")), f: $data.activeTab === "personal" ? "translateX(0)" : "translateX(100%)", g: $data.activeTab === "personal" }, $data.activeTab === "personal" ? { h: common_vendor.o(($event) => $options.onMore("duration")), i: common_vendor.f($options.currentData.duration, (item, k0, i0) => { return { a: item.avatar, b: common_vendor.t(item.name), c: item.progress + "%", d: common_vendor.t(item.value), e: item.id }; }), j: common_vendor.o(($event) => $options.onMore("customers")), k: common_vendor.f($options.currentData.customers, (item, k0, i0) => { return { a: item.avatar, b: common_vendor.t(item.name), c: item.progress + "%", d: common_vendor.t(item.value), e: item.id }; }), l: common_vendor.o(($event) => $options.onMore("sop")), m: common_vendor.f($options.currentData.sop, (item, k0, i0) => { return { a: item.avatar, b: common_vendor.t(item.name), c: item.progress + "%", d: common_vendor.t(item.value), e: item.id }; }) } : { n: common_vendor.f($data.teamStoreData.serviceTime, (item, k0, i0) => { return { a: common_vendor.t(item.rank), b: common_vendor.n("rank-badge--" + item.badgeType), c: common_vendor.t(item.name), d: item.isMine ? 1 : "", e: item.progress + "%", f: common_vendor.t(item.value), g: item.isMine ? 1 : "", h: item.rank }; }), o: common_vendor.f($data.teamStoreData.badgeUsage, (item, k0, i0) => { return { a: common_vendor.t(item.rank), b: common_vendor.n("rank-badge--" + item.badgeType), c: common_vendor.t(item.name), d: item.isMine ? 1 : "", e: common_vendor.t(item.used), f: common_vendor.t(item.opened), g: common_vendor.t(item.rate), h: item.isMine ? 1 : "", i: item.rank }; }) }); } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/team/team.js.map