"use strict";
const common_vendor = require("../../../common/vendor.js");
const INDEX_task_list_model = require("./model.js");
const common_libraries_apiLoading = require("../../../common/libraries/apiLoading.js");
const gen_Apis = require("../../../gen/Apis.js");
const getList = () => {
  var _a, _b;
  common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.WorkOrder.HouseWorkOrders.UnassignedList, (_b = (_a = INDEX_task_list_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then(
    (res) => {
      INDEX_task_list_model.useModel.listData.value = [...INDEX_task_list_model.useModel.listData.value, ...res == null ? void 0 : res.data];
      INDEX_task_list_model.useModel.metaData.value = res == null ? void 0 : res.meta;
    }
  );
};
const method = {
  getList,
  handleLoad(res) {
    INDEX_task_list_model.useModel.formData.value.page = res == null ? void 0 : res.page;
    getList();
  },
  handleToDetail(e) {
    common_vendor.index.navigateTo({
      url: `/INDEX/task/show/index?id=${e == null ? void 0 : e.id}`
    });
  }
};
exports.method = method;
