| 1 |
- var E=Object.defineProperty,$=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var S=(t,a,e)=>a in t?E(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,Y=(t,a)=>{for(var e in a||(a={}))A.call(a,e)&&S(t,e,a[e]);if(D)for(var e of D(a))K.call(a,e)&&S(t,e,a[e]);return t},F=(t,a)=>$(t,L(a));var c=(t,a,e)=>new Promise((u,l)=>{var d=n=>{try{m(e.next(n))}catch(f){l(f)}},i=n=>{try{m(e.throw(n))}catch(f){l(f)}},m=n=>n.done?u(n.value):Promise.resolve(n.value).then(d,i);m((e=e.apply(t,a)).next())});import{u as X,a as q,_ as H}from"./useTable-73a94506.js";import{P as Z}from"./ImportModal.vue_vue_type_style_index_0_scoped_375ed303_lang-e4747dd7.js";import"./index-b6d25274.js";import{l as N}from"./index-1a7dcfc1.js";import{ak as C,au as G,aj as R,at as J,_ as Q}from"./index.js";import{m as U,d as W,f as _,B as ee,Y as w,Z as I,_ as v,l as g,u as r,a7 as te,F as ae,a0 as oe,ad as se,$ as ne,a9 as T,a6 as re}from"./vue-8fccce23.js";import{S as le,l as ie}from"./antd-49db3de3.js";import{X as ce}from"./XTTab-84704c87.js";import{_ as ue}from"./componentMap-f3325263.js";import{u as de}from"./useForm-2d0613b7.js";import"./FormItem.vue_vue_type_script_lang-6bf2d5cb.js";import"./useForm-d6319719.js";import"./componentMap-584a36c5.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-e2b93e2a.js";import"./onMountedOrActivated-cb072c10.js";import"./sortable.esm-4ae27e0b.js";import"./index-25070af3.js";import"./index-52147ed8.js";import"./useFormItem-73ca0ac9.js";import"./useSortable-7338e303.js";import"./download-fac9a150.js";import"./copyTextToClipboard-e5179ded.js";import"./TextEditor-621cb2fc.js";const me=[{title:"宣教时间",dataIndex:"updateTime"},{title:"治疗阶段",dataIndex:"treatmentStage"},{title:"患者姓名",dataIndex:"name"},{title:"宣教标题",dataIndex:"title"},{title:"宣教人",dataIndex:"updatorName"}],pe=[{field:"shiftDate",component:"RangePicker",componentProps:{format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD"},colProps:{span:12}},{field:"searchNames",component:"Input",componentProps:{placeholder:"请输入宣教标题"},renderComponentContent:()=>({prefix:()=>U(le)}),colProps:{span:12}}],fe=t=>C.post({url:"/biz/educationRecord/query/page",params:G(t)}),x=t=>C.post({url:"/biz/educationRecord/removeByIds",params:t}),he=()=>C.get({url:"/biz/educationRecord/statusNumber"}),ve={class:"m-4"},_e={class:"flex justify-between"},ye={class:"flex items-center justify-between my-4"},ge={class:"flex"},be=W({__name:"index",setup(t){const[a,{getFieldsValue:e}]=de({schemas:pe,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),u=_(),l=_(""),d=_([]),i=_(),m=_();ee(()=>c(this,null,function*(){m.value=yield N({dictCode:"d"}),b()}));const{createConfirm:n,createMessage:f}=J(),[M,{reload:y,clearSelectedRowKeys:B,getSelectRowKeys:P}]=X({api:fe,batchDelApi:x,delAuthList:["biz:educationRecord:remove"],rowKey:"id",columns:me,showIndexColumn:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:V});function z(s){return c(this,null,function*(){s?(yield x([s.id]),f.success("删除成功!"),B(),yield y(),yield b()):n({content:"你确定要删除?",iconType:"warning",onOk:()=>c(this,null,function*(){const o=P();yield x(o),f.success("删除成功!"),yield y(),yield b()})})})}function V(s){return c(this,null,function*(){const o=[];return d.value&&d.value.length>0&&(o.push(d.value[0]),o.push(d.value[1]),o[1]=ie(o[1]).add(1,"day").format("YYYY-MM-DD")),console.log("searchNames:::",l.value),F(Y({},s),{title:l.value==""?void 0:l.value,treatmentStage:u.value=="total"?void 0:u.value,time:o.length<=0?void 0:o})})}function b(){return c(this,null,function*(){i.value=yield N({dictCode:"d"});const s=yield he();let o=[];yield i.value.splice(0,0,{value:"total",label:"全部"}),i.value.forEach(p=>{let h={};Object.keys(s).forEach(k=>{p.value==k&&(h={key:p.value,label:p.label,value:s[k],hasValue:!0,prefixColor:p.prefixColor,hasBracket:!0},o.push(h))})}),i.value=o,u.value=i.value[0].key})}function O(s){return c(this,null,function*(){u.value=s.value,yield y()})}function j(){return c(this,null,function*(){l.value=e().searchNames?e().searchNames:"",d.value=e().shiftDate?e().shiftDate:"",console.log("callForm:::",l.value),yield y()})}return(s,o)=>(w(),I("div",ve,[v("div",null,[v("div",_e,[g(r(Z),{title:"宣教记录"})]),v("div",ye,[g(r(ce),{type:"record",width:180,selected:u.value,data:i.value,onItemClick:O},null,8,["selected","data"]),v("div",ge,[g(r(ue),{onRegister:r(a),onFieldValueChange:j,style:{width:"450px"},class:"mr-2"},null,8,["onRegister"])])])]),g(r(H),{onRegister:r(M)},{bodyCell:te(({column:p,record:h})=>[p.key==="treatmentStage"?(w(),I(ae,{key:0},[v("span",{class:oe(["table-dot"]),style:se({backgroundColor:r(R)(m.value,h.treatmentStage,"label")})},null,4),v("span",null,ne(r(R)(m.value,h.treatmentStage,"label")),1)],64)):T("",!0),p.key==="action"?(w(),re(r(q),{key:1,actions:[{auth:"biz:educationRecord:remove",icon:"icon-xt-details_delete_default|iconfont",tooltip:"删除",popConfirm:{title:"是否确认删除",placement:"left",confirm:z.bind(null,h)}}]},null,8,["actions"])):T("",!0)]),_:1},8,["onRegister"])]))}});const qe=Q(be,[["__scopeId","data-v-249ce822"]]);export{qe as default};
|