"use strict";
const common_vendor = require("../../../common/vendor.js");
const ME_emergency_list_model = require("./model.js");
const ME_emergency_list_method = require("./method.js");
const gen_Enums = require("../../../gen/Enums.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_u_search2 = common_vendor.resolveComponent("u-search");
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_u_search2 + _easycom_hs_enum_tag2 + _easycom_cc_scroll_loading2 + _easycom_hs_footer2)();
}
const _easycom_u_search = () => "../../../node-modules/uview-plus/components/u-search/u-search.js";
const _easycom_hs_enum_tag = () => "../../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_cc_scroll_loading = () => "../../../common/components/cc-scroll-loading/cc-scroll-loading.js";
const _easycom_hs_footer = () => "../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_u_search + _easycom_hs_enum_tag + _easycom_cc_scroll_loading + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onShow(() => {
      var _a;
      ME_emergency_list_model.useModel.formData.value.page = 1;
      ME_emergency_list_model.useModel.listData.value = [];
      (_a = ME_emergency_list_method.method) == null ? void 0 : _a.getList();
    });
    common_vendor.onUnload(() => {
      ME_emergency_list_model.useModel.formData.value.name = "";
      ME_emergency_list_model.useModel.formData.value.page = 1;
      ME_emergency_list_model.useModel.listData.value = [];
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e;
      return {
        a: common_vendor.o((_a = common_vendor.unref(ME_emergency_list_method.method)) == null ? void 0 : _a.onSearch),
        b: common_vendor.o(($event) => common_vendor.unref(ME_emergency_list_model.useModel).formData.value.name = $event),
        c: common_vendor.p({
          placeholder: "请输入关键词搜索",
          showAction: false,
          modelValue: common_vendor.unref(ME_emergency_list_model.useModel).formData.value.name
        }),
        d: common_vendor.f(common_vendor.unref(ME_emergency_list_model.useModel).listData.value, (i, index, i0) => {
          var _a2, _b2, _c2;
          return {
            a: common_vendor.t(i == null ? void 0 : i.emergency_event_levels_name),
            b: "35e31d32-2-" + i0 + ",35e31d32-1",
            c: common_vendor.p({
              value: i == null ? void 0 : i.status,
              Enums: common_vendor.unref(gen_Enums.EmergencyEventsStatusEnum)
            }),
            d: common_vendor.n(`status status_${i == null ? void 0 : i.status}`),
            e: common_vendor.t(i == null ? void 0 : i.name),
            f: common_vendor.t((_a2 = i == null ? void 0 : i.asset_project) == null ? void 0 : _a2.name),
            g: common_vendor.t(i == null ? void 0 : i.created_at),
            h: common_vendor.t(((_c2 = (_b2 = i == null ? void 0 : i.emergency_event_follows) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.created_at) || "-"),
            i: `item_${index}`,
            j: common_vendor.o(($event) => {
              var _a3;
              return (_a3 = common_vendor.unref(ME_emergency_list_method.method)) == null ? void 0 : _a3.handleDetail(i);
            }, `item_${index}`)
          };
        }),
        e: common_vendor.o((_b = common_vendor.unref(ME_emergency_list_method.method)) == null ? void 0 : _b.handleLoad),
        f: common_vendor.p({
          meta: (_d = (_c = common_vendor.unref(ME_emergency_list_model.useModel)) == null ? void 0 : _c.metaData) == null ? void 0 : _d.value
        }),
        g: common_vendor.o((_e = common_vendor.unref(ME_emergency_list_method.method)) == null ? void 0 : _e.handleAdd),
        h: common_vendor.p({
          btnParimaryName: "新增突发事件"
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/ME/emergency/list/index.vue"]]);
wx.createPage(MiniProgramPage);
