"use strict";
const common_vendor = require("../../../common/vendor.js");
const ME_instrument_list_method = require("./method.js");
const ME_instrument_list_model = require("./model.js");
require("../../../common/libraries/apiLoading.js");
require("../../../gen/Apis.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWatermarkStore.js");
require("../../../common/store/useWorkStore.js");
if (!Array) {
  const _easycom_hs_tabs2 = common_vendor.resolveComponent("hs-tabs");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
  const _easycom_hs_popup_project2 = common_vendor.resolveComponent("hs-popup-project");
  const _easycom_hs_popup_building2 = common_vendor.resolveComponent("hs-popup-building");
  const _easycom_hs_radio_picker_enum2 = common_vendor.resolveComponent("hs-radio-picker-enum");
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  (_easycom_hs_tabs2 + _easycom_uni_icons2 + _easycom_up_search2 + _easycom_hs_popup_project2 + _easycom_hs_popup_building2 + _easycom_hs_radio_picker_enum2 + _easycom_hs_button2 + _easycom_cc_scroll_loading2)();
}
const _easycom_hs_tabs = () => "../../../components/hs-tabs/hs-tabs.js";
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_up_search = () => "../../../node-modules/uview-plus/components/u-search/u-search.js";
const _easycom_hs_popup_project = () => "../../../components/hs-popup-project/hs-popup-project.js";
const _easycom_hs_popup_building = () => "../../../components/hs-popup-building/hs-popup-building.js";
const _easycom_hs_radio_picker_enum = () => "../../../components/hs-radio-picker-enum/hs-radio-picker-enum.js";
const _easycom_hs_button = () => "../../../components/hs-button/hs-button.js";
const _easycom_cc_scroll_loading = () => "../../../common/components/cc-scroll-loading/cc-scroll-loading.js";
if (!Math) {
  (_easycom_hs_tabs + _easycom_uni_icons + _easycom_up_search + _easycom_hs_popup_project + _easycom_hs_popup_building + _easycom_hs_radio_picker_enum + _easycom_hs_button + _easycom_cc_scroll_loading)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const tablist = [
      { label: "住户仪表", value: "HouseMeter" },
      { label: "公共仪表", value: "CommonMeter" }
    ];
    const meterTypes = [
      {
        name: "全部",
        value: void 0
      },
      {
        name: "已抄表",
        value: "read"
      },
      {
        name: "未抄表",
        value: "unread"
      }
    ];
    common_vendor.onShow(() => {
      var _a;
      ME_instrument_list_model.useModel.formData.value.page = 1;
      ME_instrument_list_model.useModel.listData.value = [];
      (_a = ME_instrument_list_method.method) == null ? void 0 : _a.getList();
    });
    common_vendor.onUnload(() => {
      ME_instrument_list_model.useModel.formData.value = { page: 1, keyword: "", meter_type: "HouseMeter" };
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
      return {
        a: common_vendor.o((_a = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _a.handleChangeTabs),
        b: common_vendor.p({
          list: tablist,
          current: (_c = (_b = common_vendor.unref(ME_instrument_list_model.useModel)) == null ? void 0 : _b.currentTabs) == null ? void 0 : _c.value
        }),
        c: common_vendor.p({
          type: "right",
          size: "13",
          color: "#333"
        }),
        d: common_vendor.o(($event) => {
          var _a2;
          return (_a2 = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _a2.handleToLog();
        }),
        e: common_vendor.o((_d = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _d.handleSearch),
        f: common_vendor.o(($event) => common_vendor.unref(ME_instrument_list_model.useModel).formData.value.keyword = $event),
        g: common_vendor.p({
          ["show-action"]: false,
          placeholder: "搜索房屋名称/仪表名称",
          modelValue: common_vendor.unref(ME_instrument_list_model.useModel).formData.value.keyword
        }),
        h: common_vendor.o((_e = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _e.handleChangeFilter),
        i: common_vendor.o((_f = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _f.handleChangeFilter),
        j: common_vendor.p({
          params: common_vendor.unref(ME_instrument_list_model.useModel).formData.value
        }),
        k: common_vendor.o((_g = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _g.handleChangeFilterReadingStatus),
        l: common_vendor.p({
          Enums: meterTypes,
          title: "抄表状态"
        }),
        m: common_vendor.f((_i = (_h = common_vendor.unref(ME_instrument_list_model.useModel)) == null ? void 0 : _h.listData) == null ? void 0 : _i.value, (i, index, i0) => {
          return common_vendor.e({
            a: (i == null ? void 0 : i.usage_type) === "WaterMeter"
          }, (i == null ? void 0 : i.usage_type) === "WaterMeter" ? {} : {}, {
            b: (i == null ? void 0 : i.usage_type) === "ElectricMeter"
          }, (i == null ? void 0 : i.usage_type) === "ElectricMeter" ? {} : {}, {
            c: common_vendor.f(i == null ? void 0 : i.house_meter_has_houses, (res, index2, i1) => {
              return {
                a: common_vendor.t(res == null ? void 0 : res.full_name),
                b: `house_${index2}`
              };
            }),
            d: common_vendor.t(i == null ? void 0 : i.name),
            e: common_vendor.t(i == null ? void 0 : i.latest_value),
            f: common_vendor.t(i == null ? void 0 : i.latest_time),
            g: common_vendor.o(($event) => {
              var _a2;
              return (_a2 = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _a2.handleToAdd(i);
            }, `items_${index}`),
            h: "7f08fc71-7-" + i0 + ",7f08fc71-6",
            i: `items_${index}`
          });
        }),
        n: common_vendor.p({
          type: "primary",
          label: "抄表"
        }),
        o: common_vendor.o((_j = common_vendor.unref(ME_instrument_list_method.method)) == null ? void 0 : _j.handleLoad),
        p: common_vendor.p({
          meta: (_l = (_k = common_vendor.unref(ME_instrument_list_model.useModel)) == null ? void 0 : _k.metaData) == null ? void 0 : _l.value
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/ME/instrument/list/index.vue"]]);
wx.createPage(MiniProgramPage);
