"use strict";
const common_vendor = require("../../common/vendor.js");
const gen_Enums = require("../../gen/Enums.js");
const WORKORDER_list_log_method = require("./method.js");
const WORKORDER_list_log_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_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_hs_up_rate2 = common_vendor.resolveComponent("hs-up-rate");
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  (_easycom_hs_enum_tag2 + _easycom_hs_up_rate2 + _easycom_hs_button2 + _easycom_cc_scroll_loading2)();
}
const _easycom_hs_enum_tag = () => "../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_hs_up_rate = () => "../../components/hs-up-rate/hs-up-rate.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) {
  (MyHeader + _easycom_hs_enum_tag + _easycom_hs_up_rate + _easycom_hs_button + _easycom_cc_scroll_loading)();
}
const MyHeader = () => "./components/header.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onShow(() => {
      var _a;
      WORKORDER_list_log_model.useModel.formData.value.page = 1;
      WORKORDER_list_log_model.useModel.dataList.value = [];
      (_a = WORKORDER_list_log_method.method) == null ? void 0 : _a.getList();
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e;
      return {
        a: common_vendor.f((_b = (_a = common_vendor.unref(WORKORDER_list_log_model.useModel)) == null ? void 0 : _a.dataList) == null ? void 0 : _b.value, (i, index, i0) => {
          var _a2, _b2;
          return common_vendor.e({
            a: "9ec83e52-2-" + i0 + ",9ec83e52-1",
            b: common_vendor.p({
              value: i == null ? void 0 : i.type,
              Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersTypeEnum)
            }),
            c: i == null ? void 0 : i.location
          }, (i == null ? void 0 : i.location) ? {
            d: "9ec83e52-3-" + i0 + ",9ec83e52-1",
            e: common_vendor.p({
              value: i == null ? void 0 : i.location,
              Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersLocationEnum)
            })
          } : {}, {
            f: "9ec83e52-4-" + i0 + ",9ec83e52-1",
            g: common_vendor.p({
              value: i == null ? void 0 : i.status,
              Enums: common_vendor.unref(gen_Enums.HouseWorkOrdersStatusEnum)
            }),
            h: common_vendor.n(`btn_status btn_status_${i == null ? void 0 : i.status}`),
            i: common_vendor.t(((_a2 = i == null ? void 0 : i.asset_house) == null ? void 0 : _a2.full_name) || ((_b2 = i == null ? void 0 : i.asset_project) == null ? void 0 : _b2.name)),
            j: common_vendor.t(i == null ? void 0 : i.content),
            k: (i == null ? void 0 : i.expect_start_time) && (i == null ? void 0 : i.status) !== "Closed" && (i == null ? void 0 : i.status) !== "Completed"
          }, (i == null ? void 0 : i.expect_start_time) && (i == null ? void 0 : i.status) !== "Closed" && (i == null ? void 0 : i.status) !== "Completed" ? {
            l: common_vendor.t(i == null ? void 0 : i.expect_start_time)
          } : {}, {
            m: (i == null ? void 0 : i.status) === "Completed" && !(i == null ? void 0 : i.accept_time)
          }, (i == null ? void 0 : i.status) === "Completed" && !(i == null ? void 0 : i.accept_time) ? {
            n: common_vendor.t(i == null ? void 0 : i.accept_time)
          } : {
            o: common_vendor.t(i == null ? void 0 : i.created_at)
          }, {
            p: i == null ? void 0 : i.evaluation_score
          }, (i == null ? void 0 : i.evaluation_score) ? {
            q: "9ec83e52-5-" + i0 + ",9ec83e52-1",
            r: common_vendor.p({
              valueModel: i == null ? void 0 : i.evaluation_score
            })
          } : {}, {
            s: common_vendor.o(($event) => {
              var _a3;
              return (_a3 = common_vendor.unref(WORKORDER_list_log_method.method)) == null ? void 0 : _a3.handleToDetail(i);
            }, `items_${index}`),
            t: (i == null ? void 0 : i.location) !== "MyHome" && (i == null ? void 0 : i.status) === "PendingAcceptance"
          }, (i == null ? void 0 : i.location) !== "MyHome" && (i == null ? void 0 : i.status) === "PendingAcceptance" ? {
            v: common_vendor.o(($event) => {
              var _a3;
              return (_a3 = common_vendor.unref(WORKORDER_list_log_method.method)) == null ? void 0 : _a3.handleAssignEmployee(i);
            }, `items_${index}`),
            w: "9ec83e52-6-" + i0 + ",9ec83e52-1",
            x: common_vendor.p({
              type: "ghost",
              label: "验收工单"
            })
          } : {}, {
            y: `items_${index}`
          });
        }),
        b: common_vendor.o((_c = common_vendor.unref(WORKORDER_list_log_method.method)) == null ? void 0 : _c.handleLoad),
        c: common_vendor.p({
          meta: (_e = (_d = common_vendor.unref(WORKORDER_list_log_model.useModel)) == null ? void 0 : _d.meta) == null ? void 0 : _e.value
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/WORKORDER/list_log/index.vue"]]);
wx.createPage(MiniProgramPage);
