"use strict";const e=require("../../../common/vendor.js");require("../../../common/libraries/request.js"),require("../../../common/store/useWatermarkStore.js");const o=require("../../../common/store/useWeAppAuthStore.js");require("../../../common/store/useWorkStore.js");const r=require("./model.js"),s=require("../../../gen/Apis.js"),i=require("../../../common/libraries/apiLoading.js"),l=require("../../../common/libraries/naviHelper.js"),u=o.useWeAppAuthStore(),n={init(o){var s;e.index.setNavigationBarTitle({title:null==o?void 0:o.type}),console.log("init",null==u?void 0:u.data),r.useModel.formData.value={...o,pageType:null==o?void 0:o.type,assign_employees:null==(s=null==u?void 0:u.data)?void 0:s.user,house_work_orders_id:null==o?void 0:o.id}},handleSubmit(){var e,o;console.log("handleSubmit",r.useModel.formData.value);let u=null==(o=null==(e=r.useModel)?void 0:e.formData)?void 0:o.value;return(null==u?void 0:u.level)?"指派工单"!==(null==u?void 0:u.pageType)||(null==u?void 0:u.assign_employees_id)?void i.getApiLoading("指派工单"===(null==u?void 0:u.pageType)?s.Apis.WorkOrder.HouseWorkOrders.Assign:s.Apis.WorkOrder.HouseWorkOrders.Receive,u).then(e=>{l.showToastBack("指派工单"===(null==u?void 0:u.pageType)?"提交成功！":"领取成功！",1,!0),console.log(e)}):l.showToast("请先选择处理人！"):l.showToast("请先选择优先级！")}};exports.method=n;
