"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_api = require("../../utils/api.js");
const utils_previewImage = require("../../utils/previewImage.js");
if (!Array) {
  const _easycom_uv_steps_item2 = common_vendor.resolveComponent("uv-steps-item");
  const _easycom_uv_steps2 = common_vendor.resolveComponent("uv-steps");
  (_easycom_uv_steps_item2 + _easycom_uv_steps2)();
}
const _easycom_uv_steps_item = () => "../../uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.js";
const _easycom_uv_steps = () => "../../uni_modules/uv-steps/components/uv-steps/uv-steps.js";
if (!Math) {
  (MapContainer + _easycom_uv_steps_item + _easycom_uv_steps + NoData)();
}
const MapContainer = () => "../../components/MapContainer.js";
const NoData = () => "../../components/noData.js";
const _sfc_main = {
  __name: "track",
  setup(__props) {
    common_vendor.onLoad((options) => {
      currentId.value = options.id;
      getData();
    });
    const currentId = common_vendor.ref();
    const activeIndex = common_vendor.ref(0);
    const searchList = common_vendor.ref([
      {
        value: 0,
        text: "今天"
      },
      {
        value: 1,
        text: "昨天"
      },
      {
        value: 2,
        text: "前天"
      }
    ]);
    const list = common_vendor.ref([]);
    const customStyle = {
      marginBottom: "30rpx"
    };
    const getData = async () => {
      const res = await utils_api.myRequest({
        url: "/wanzai/api/smartFaceDiscern/track",
        data: {
          id: currentId.value,
          dateTime: activeIndex.value
        }
      });
      if (res.code == 200) {
        list.value = res.data;
      }
    };
    const changeIndex = (v) => {
      activeIndex.value = v;
      getData();
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.f(searchList.value, (item, k0, i0) => {
          return {
            a: common_vendor.t(item.text),
            b: item.value === activeIndex.value ? 1 : "",
            c: item.value,
            d: common_vendor.o(($event) => changeIndex(item.value), item.value)
          };
        }),
        b: list.value.length
      }, list.value.length ? {
        c: common_vendor.f(list.value, (item, k0, i0) => {
          return common_vendor.e({
            a: common_vendor.t(item.type),
            b: common_vendor.t(item.location),
            c: common_vendor.t(item.dateTime),
            d: item.image
          }, item.image ? {
            e: item.image,
            f: common_vendor.o(($event) => common_vendor.unref(utils_previewImage.previewImage)(item.image), item.id)
          } : {}, {
            g: item.id,
            h: "132a14af-2-" + i0 + ",132a14af-1"
          });
        }),
        d: common_vendor.p({
          customStyle
        }),
        e: common_vendor.p({
          activeColor: "#1E7DFB",
          direction: "column",
          dot: true,
          current: list.value.length
        })
      } : {});
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-132a14af"], ["__file", "E:/workSpace/WanZai_School_app/pages/track/track.vue"]]);
wx.createPage(MiniProgramPage);
