| 1 |
- var H=Object.defineProperty,J=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var V=(t,i,a)=>i in t?H(t,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[i]=a,E=(t,i)=>{for(var a in i||(i={}))I.call(i,a)&&V(t,a,i[a]);if(N)for(var a of N(i))ee.call(i,a)&&V(t,a,i[a]);return t},$=(t,i)=>J(t,W(i));var o=(t,i,a)=>new Promise((c,u)=>{var d=l=>{try{f(a.next(l))}catch(w){u(w)}},r=l=>{try{f(a.throw(l))}catch(w){u(w)}},f=l=>l.done?c(l.value):Promise.resolve(l.value).then(d,r);f((a=a.apply(t,i)).next())});import{_ as ae}from"./componentMap-6df01015.js";import{u as te}from"./useForm-c3e28b04.js";import"./FormItem.vue_vue_type_script_lang-35d3ca4d.js";import{aO as ie,f as se,ao as oe,_ as ne}from"./index.js";import{P as le}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-1f52fa9b.js";import"./index-8cbf1e33.js";import{a as j}from"./index-b614de6b.js";import{u as ce,a as re,_ as ue}from"./useTable-3abd6d70.js";import{u as de,a as O,c as me,b as pe,g as fe,F as ye,s as ve}from"./formDrawer-321d7ceb.js";import{u as he}from"./index-e473004f.js";import{X as _e}from"./XTTab-2f7efd67.js";import{l as ge,h as F,a7 as we}from"./antd-ecb53b14.js";import{d as Ce,f as v,B as be,j as ke,a5 as De,q as xe,Y as h,Z as S,_ as g,l as _,u as n,n as Fe,a6 as R,a7 as B,F as Se,a9 as D,$ as Re,a1 as Be,a2 as Me}from"./vue-8fccce23.js";import"./index-22d6b33a.js";import"./index-3eef3423.js";import"./useFormItem-d8cab136.js";import"./uuid-31b8b5a4.js";import"./useSortable-987ef813.js";import"./download-c6c2acd3.js";import"./copyTextToClipboard-ab85e052.js";import"./TextEditor-284232fa.js";import"./onMountedOrActivated-cb072c10.js";import"./useWindowSizeFn-8ad2dbf2.js";import"./useForm-19fca69f.js";import"./componentMap-16efd70f.js";import"./sortable.esm-4ae27e0b.js";import"./dialysisDeviceApi-8d5a8df7.js";const Te=t=>(Be("data-v-f6f42fd1"),t=t(),Me(),t),ze={class:"m-4"},Ne={class:"flex justify-between"},Ve=Te(()=>g("span",null,"新增保养",-1)),Ee={class:"flex justify-between my-4"},$e={class:"flex"},je={key:1},Oe=Ce({__name:"index",setup(t){const[i,{getFieldsValue:a}]=te({schemas:ve,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),c=v(),u=v(""),d=v([]),r=v(),f=v();be(()=>o(this,null,function*(){f.value=yield j({dictCode:"dmc"}),G(),b()}));const{createMessage:l}=oe(),[w,{openDrawer:x}]=he(),M=v([{field:"create_time",direction:"DESC"}]),[P,{reload:C,clearSelectedRowKeys:T}]=ce({api:de,batchDelApi:O,delAuthList:["biz:dialysisMaintain:remove"],rowKey:"id",columns:me,showIndexColumn:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:q,sortFn:K});function U(e){x(!0,{record:e,isUpdate:!0})}function Y(e){e=="add"&&x(!0,{isUpdate:!1,record:{}})}function L(e){return o(this,null,function*(){e&&(yield O([e.id]),l.success("记录删除成功!"),T(),yield C(),yield b())})}function K(e){e!=null&&e.order&&(e!=null&&e.columnKey)&&(M.value=[{field:e.columnKey,direction:e.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function q(e){return o(this,null,function*(){const s=[];return d.value&&d.value.length>0&&(s.push(d.value[0]),s.push(d.value[1]),s[1]=ge(s[1]).add(1,"day").format("YYYY-MM-DD")),$(E({},e),{orders:M.value,uniqueCode:u.value==""?void 0:u.value,maintainCompany:c.value=="total"?void 0:c.value,maintainTime:s.length<=0?void 0:s})})}function b(){return o(this,null,function*(){r.value=yield j({dictCode:"dmc"});const e=yield pe();let s=[];yield r.value.splice(0,0,{value:"total",label:"全部"}),r.value.forEach(y=>{let k={};Object.keys(e).forEach(m=>{y.value==m&&(k={key:y.value,label:y.label,value:e[m],hasValue:!0,prefixColor:y.prefixColor,hasBracket:!0},s.push(k))})}),r.value=s,c.value===void 0&&(c.value=r.value[0].key)})}function A(){return o(this,null,function*(){T(),yield C(),yield b()})}function X(y){return o(this,arguments,function*({isUpdate:e,values:s}){console.log(e),console.log(s),yield C(),yield b()})}function Q(e){return o(this,null,function*(){c.value=e.value,yield C()})}function Z(){return o(this,null,function*(){d.value=a().shiftDate?a().shiftDate:"",u.value=a().searchNames?a().searchNames:"",console.log("callForm:::",u.value),yield C()})}function G(){return o(this,null,function*(){const e=yield fe();e&&e.length>0&&(yield F.warning({key:"1",content:"有需要保养的设备",duration:8,style:{color:"#1890ff",cursor:"pointer"},onClick:()=>o(this,null,function*(){x(!0,{isUpdate:!1,isRecently:!0}),yield F.destroy("1")})}))})}return ke(()=>o(this,null,function*(){yield F.destroy("1")})),(e,s)=>{const y=De("Icon"),k=xe("auth");return h(),S("div",ze,[g("div",null,[g("div",Ne,[_(n(le),{title:"保养记录"}),g("div",null,[Fe((h(),R(n(ie),{border:!1,size:"large",type:"primary",onClick:s[0]||(s[0]=m=>Y("add"))},{icon:B(()=>[_(y,{icon:"icon-xt-add_default|iconfont",size:18,color:"#fff",class:"mr-1"})]),default:B(()=>[Ve]),_:1})),[[k,["biz:dialysisMaintain:add"]]])])]),g("div",Ee,[_(n(_e),{type:"illness",width:180,selected:c.value,data:r.value,onItemClick:Q},null,8,["selected","data"]),g("div",$e,[_(n(ae),{onRegister:n(i),onFieldValueChange:Z,style:{width:"550px"},class:"mr-2"},null,8,["onRegister"])])]),_(n(ue),{onRegister:n(P)},{bodyCell:B(({column:m,record:p})=>{var z;return[m.key==="picture"?(h(),S(Se,{key:0},[p.files&&p.files.length>0?(h(),R(n(we),{key:0,width:80,src:p.files?(z=p.files[0])==null?void 0:z.absolutePath:null},null,8,["src"])):D("",!0)],64)):D("",!0),m.key==="maintainCompany"?(h(),S("span",je,Re(n(se)(f.value,p.maintainCompany,"label")),1)):D("",!0),m.key==="action"?(h(),R(n(re),{key:2,actions:[{auth:"biz:dialysisMaintain:edit",icon:"icon-xt-details_edit_default|iconfont",tooltip:"编辑",onClick:U.bind(null,p)},{auth:"biz:dialysisMaintain:remove",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",popConfirm:{title:"是否确认删除",placement:"left",confirm:L.bind(null,p)}}]},null,8,["actions"])):D("",!0)]}),_:1},8,["onRegister"])]),_(ye,{onRegister:n(w),onSuccess:X,onCancel:A},null,8,["onRegister"])])}}});const pa=ne(Oe,[["__scopeId","data-v-f6f42fd1"]]);export{pa as default};
|