"use strict";const e=require("../../../common/vendor.js"),l=require("./model.js"),a=require("../../../common/libraries/apiLoading.js"),o=require("../../../gen/Apis.js"),d=()=>{var e,d;a.getApiLoading(o.Apis.Emergency.EmergencyEventFollows.List,null==(d=null==(e=l.useModel)?void 0:e.formDataLogs)?void 0:d.value).then(e=>{var a,o;l.useModel.logsData.value=[...null==(o=null==(a=l.useModel)?void 0:a.logsData)?void 0:o.value,...null==e?void 0:e.data],l.useModel.metaData.value=null==e?void 0:e.meta})},n={getShow:()=>{var e,n;a.getApiLoading(o.Apis.Emergency.EmergencyEvents.Show,null==(n=null==(e=l.useModel)?void 0:e.formData)?void 0:n.value).then(e=>{var a;l.useModel.showData.value=null==e?void 0:e.data,l.useModel.formDataLogs.value={emergency_events_id:null==(a=null==e?void 0:e.data)?void 0:a.id,page:1},d()})},handlePreview(a){var o,d,n,i;e.index.previewImage({urls:null==(i=null==(n=null==(d=null==(o=l.useModel)?void 0:o.showData)?void 0:d.value)?void 0:n.emergency_images)?void 0:i.map(e=>(null==e?void 0:e.url)||""),current:a})},handleLoad(e){console.log(e),l.useModel.formDataLogs.value.page=e,d()},handleClose(){var a,o,d;e.index.navigateTo({url:`/ME/emergency/update/index?id=${null==(d=null==(o=null==(a=l.useModel)?void 0:a.showData)?void 0:o.value)?void 0:d.id}&type=申请关闭`})},handleUpdate(){var a,o,d;e.index.navigateTo({url:`/ME/emergency/update/index?id=${null==(d=null==(o=null==(a=l.useModel)?void 0:a.showData)?void 0:o.value)?void 0:d.id}&type=更新进度`})},handleUpdateFollow(){var a,o,d;e.index.navigateTo({url:`/ME/emergency/change/index?id=${null==(d=null==(o=null==(a=l.useModel)?void 0:a.showData)?void 0:o.value)?void 0:d.id}`})}};exports.method=n;
