index-a249735f.js 4.0 KB

1
  1. var E=Object.defineProperty,K=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?E(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,_=(o,e)=>{for(var t in e||(e={}))W.call(e,t)&&C(o,t,e[t]);if(b)for(var t of b(e))j.call(e,t)&&C(o,t,e[t]);return o},g=(o,e)=>K(o,P(e));var m=(o,e,t)=>new Promise((p,u)=>{var y=r=>{try{i(t.next(r))}catch(n){u(n)}},l=r=>{try{i(t.throw(r))}catch(n){u(n)}},i=r=>r.done?p(r.value):Promise.resolve(r.value).then(y,l);i((t=t.apply(o,e)).next())});import{u as O,_ as U}from"./useTable-98d6d579.js";import{_ as z}from"./FormItem.vue_vue_type_script_lang-39d09a3e.js";import{au as Q,_ as Z}from"./index.js";import{c as q,_ as A,s as G}from"./FormModal.vue_vue_type_script_setup_true_lang-bdccb1a9.js";import{a as H,b as F}from"./patrolWardApi-1300fa15.js";import{u as J}from"./index-4f5bc708.js";import{l as v}from"./antd-f259b82a.js";import{_ as L}from"./componentMap-61ccdbb2.js";import{u as X}from"./useForm-bff27c7a.js";import{d as I,f as ee,r as te,Y as w,Z as M,_ as x,l as Y,u as c,a7 as ae,F as oe,E as ie,$ as re,a9 as k,a6 as ne}from"./vue-aed314e3.js";import"./useForm-c7f42ee0.js";import"./componentMap-175d8229.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-6e9d633b.js";import"./onMountedOrActivated-d9097634.js";import"./sortable.esm-4ae27e0b.js";import"./useFormItem-421691fe.js";import"./useSortable-7d2b6665.js";import"./download-2ecc6b15.js";import"./index-7fe9c1e2.js";import"./copyTextToClipboard-328ee3b1.js";import"./index-6811a03f.js";import"./index-a4e1ec38.js";import"./TextEditor-4892fcd0.js";const se={class:"flex justify-end"},ce={class:"mr-2",style:{width:"700px"}},le=I({__name:"index",props:{info:{type:Object,default:()=>{}}},setup(o){const e=o,{createConfirm:t,createMessage:p}=Q(),[u,{openModal:y}]=J(),l=ee([{field:"create_time",direction:"DESC"}]),i=te({patrolTime:[v().subtract(3,"month").format("YYYY-MM-DD"),v().add(1,"day").format("YYYY-MM-DD")],content:""}),[r,{getFieldsValue:n}]=X({schemas:G,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[T,{reload:f,getSelectRowKeys:D}]=O({api:H,rowKey:"id",columns:q,showIndexColumn:!1,bordered:!1,striped:!1,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:V,sortFn:B});function R(a){y(!0,{record:_({patientBasicId:e.info.id},a),isUpdate:!0})}function S(a){return m(this,null,function*(){a?(yield F([a.id]),p.success("删除成功!"),yield f()):t({content:"你确定要删除?",iconType:"warning",onOk:()=>m(this,null,function*(){const d=D();yield F(d),p.success("删除成功!"),yield f()})})})}function B(a){a!=null&&a.order&&(a!=null&&a.columnKey)&&(l.value=[{field:a.columnKey,direction:a.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function V(a){var d,s;return console.log(g(_({},a),{orders:l.value,patientBasicId:(d=e.info)==null?void 0:d.id})),g(_({},a),{orders:l.value,patientBasicId:(s=e.info)==null?void 0:s.id,patrolTime:[i.patrolTime[0],v(i.patrolTime[1]).add(1,"day").format("YYYY-MM-DD")],content:i.content})}function N(){return m(this,null,function*(){yield f()})}function $(){return m(this,null,function*(){i.content=n().content||"",i.patrolTime=n().patrolTime||"",yield f()})}return(a,d)=>(w(),M("div",null,[x("div",se,[x("div",null,[x("div",ce,[Y(c(L),{onRegister:c(r),onFieldValueChange:$},null,8,["onRegister"])])])]),Y(c(U),{onRegister:c(T)},{bodyCell:ae(({column:s,record:h})=>[s.key==="updatorName"?(w(),M(oe,{key:0},[ie(re(h.updatorName),1)],64)):k("",!0),s.key==="action"?(w(),ne(c(z),{key:1,actions:[{auth:"archives:patrolWard:edit",icon:"icon-xt-details_edit_default|iconfont",tooltip:"编辑",onClick:R.bind(null,h)},{auth:"archives:patrolWard:remove",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",popConfirm:{title:"是否取消删除",placement:"left",confirm:S.bind(null,h,s)}}]},null,8,["actions"])):k("",!0)]),_:1},8,["onRegister"]),Y(A,{onRegister:c(u),onSuccess:N},null,8,["onRegister"])]))}});const $e=Z(le,[["__scopeId","data-v-757077a1"]]);export{$e as default};