| 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,j=(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},E=(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-090b9009.js";import{u as te}from"./useForm-2d0613b7.js";import"./FormItem.vue_vue_type_script_lang-d3f182d4.js";import{aR as ie,aj as se,at as oe,_ as ne}from"./index.js";import{P as le}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-153d3ad5.js";import"./index-74ee4d87.js";import{l as $}from"./index-971488e0.js";import{u as ce,a as re,_ as ue}from"./useTable-4417017a.js";import{u as de,a as P,c as me,b as pe,g as fe,F as ye,s as ve}from"./formDrawer-6346a04e.js";import{u as he}from"./index-187f76c9.js";import{X as _e}from"./XTTab-2f7efd67.js";import{l as ge,h as F,a7 as we}from"./antd-d98832c6.js";import{d as be,f as v,B as Ce,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-7b00e5b4.js";import"./index-a7810134.js";import"./useFormItem-9c6d112e.js";import"./uuid-31b8b5a4.js";import"./useSortable-7338e303.js";import"./download-fac9a150.js";import"./copyTextToClipboard-ba2fd847.js";import"./TextEditor-e80f27f2.js";import"./onMountedOrActivated-cb072c10.js";import"./useWindowSizeFn-e2b93e2a.js";import"./useForm-bca35dcc.js";import"./componentMap-4cfd6e0f.js";import"./sortable.esm-4ae27e0b.js";import"./dialysisDeviceApi-42fc5982.js";const Te=t=>(Be("data-v-7b9b9cf6"),t=t(),Me(),t),ze={class:"m-4"},Ne={class:"flex justify-between"},Ve=Te(()=>g("span",null,"新增保养",-1)),je={class:"flex justify-between my-4"},Ee={class:"flex"},$e={key:1},Pe=be({__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();Ce(()=>o(this,null,function*(){f.value=yield $({dictCode:"dmc"}),G(),C()}));const{createMessage:l}=oe(),[w,{openDrawer:x}]=he(),M=v([{field:"create_time",direction:"DESC"}]),[U,{reload:b,clearSelectedRowKeys:T}]=ce({api:de,batchDelApi:P,delAuthList:["biz:dialysisMaintain:remove"],rowKey:"id",columns:me,showIndexColumn:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:q,sortFn:K});function Y(e){x(!0,{record:e,isUpdate:!0})}function L(e){e=="add"&&x(!0,{isUpdate:!1,record:{}})}function O(e){return o(this,null,function*(){e&&(yield P([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(j({},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 C(){return o(this,null,function*(){r.value=yield $({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 b()})}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 b()})}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=>L("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",je,[_(n(_e),{type:"illness",width:180,selected:c.value,data:r.value,onItemClick:Q},null,8,["selected","data"]),g("div",Ee,[_(n(ae),{onRegister:n(i),onFieldValueChange:Z,style:{width:"450px"},class:"mr-2"},null,8,["onRegister"])])]),_(n(ue),{onRegister:n(U)},{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",$e,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:Y.bind(null,p)},{auth:"biz:dialysisMaintain:remove",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",popConfirm:{title:"是否确认删除",placement:"left",confirm:O.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(Pe,[["__scopeId","data-v-7b9b9cf6"]]);export{pa as default};
|