2 lines
7.7 KiB
JavaScript
2 lines
7.7 KiB
JavaScript
|
import{d as de,a as n,r as ue,b as z,c as N,w as l,f as c,l as re,G as I,I as J,e as t,m as me,t as S,A as d,N as i,X as ce,Z as pe,$ as fe,a0 as ve,a1 as _e,a2 as ye,br as xe,a3 as ge,U as be,_ as ke}from"./index-7b3f5fdc.js";import{c as we}from"./index-a832a56d.js";import{Z as Ve}from"./index-44f083e6.js";import{a as Ce}from"./index-e96dc078.js";import{w as he}from"./index-81f068f9.js";import{V as ze}from"./index-a513db85.js";import{y as Ne,f as Se}from"./index-4ab1e1d9.js";import{b as Ue}from"./index-c31677f3.js";import{j as $e}from"./index-d0b57c12.js";const Ke={style:{display:"flex"}},Fe={style:{flex:"1",padding:"10px","over-flow":"auto"}},Ae={style:{padding:"20px"}},Le={style:{width:"100%","text-align":"center"}},De=de({__name:"opinion",setup(Ie){const O=n([{title:"内科",id:1,children:[{title:"呼吸内科",id:2},{title:"心血管内科",id:3},{title:"消化内科",id:4}]},{title:"外科",id:5,children:[{title:"普通外科",id:6},{title:"骨科",id:7}]},{title:"妇产科",id:8},{title:"儿科",id:9}]),R=n(!1),b=n(""),k=n({id:0,title:""}),f=n(!1),p=n({userAccount:"",userName:"",sex:""});function B(){p.value={userAccount:"",userName:"",sex:""}}function E(o){k.value=JSON.parse(JSON.stringify(o)),_.current=k.value.id,C(_)}function T(){_.current=1,C(_)}const w=n(!1),V=n(),_=ue({current:1,limit:10,total:100}),Z=n([{title:"选项",width:"55px",type:"checkbox",fixed:"left"},{title:"编号",width:"80px",key:"id",fixed:"left"},{title:"部门名称",width:"120px",key:"department"},{title:"意见内容",width:"300px",key:"content"},{title:"是否采纳",width:"100px",customSlot:"status"},{title:"操作",width:"150px",customSlot:"operator",key:"operator",fixed:"right"}]),C=o=>{w.value=!0,setTimeout(()=>{h.value=G(o.current,o.limit),w.value=!1},1e3)},j=(o,e)=>{i.msg(`字段${o} - 排序${e}, 你可以利用 sort-change 实现服务端排序`)},h=n([{id:"1",department:"呼吸内科",content:"建议增加呼吸科专业设备配置",status:!0},{id:"2",department:"心血管内科",content:"关于心血管科室人员培训的建议",status:!1},{id:"3",department:"消化内科",content:"建议增加消化科专业设备配置",status:!0},{id:"4",department:"普通外科",content:"建议增加普通外科专业设备配置",status:!1},{id:"5",department:"骨科",content:"建议增加骨科专业设备配置",status:!0}]),q=(o,e)=>{h.value.forEach(r=>{r.id===e.id&&i.msg("Success",{icon:1},()=>{r.status=o})})},G=(o,e)=>{for(var r=[],x=(o-1)*e+1,y=o*e,s=x;s<=y;s++)r.push({id:`${s}`,department:k.value.title||"呼吸内科",content:`意见内容${s}`,status:s%2===0});return r},u=n({id:"",department:"",content:"",status:!1}),Q=n(),v=n(!1),U=n("新增"),$=(o,e)=>{if(U.value=o,e!=null){let r=JSON.parse(JSON.stringify(e));u.value=r}else u.value={id:"",department:"",content:"",status:!1};v.value=!v.value};function X(){if(V.value.length==0){i.msg("您未选择数据,请先选择要删除的数据",{icon:3,time:2e3});return}i.confirm("您将删除所有选中的数据?",{title:"提示",btn:[{text:"确定",callback:o=>{i.msg("您已成功删除"),i.close(o)}},{text:"取消",callback:o=>{i.msg("您已取消操作"),i.close(o)}}]})}function H(){i.msg("保存成功!",{icon:1,time:1e3}),v.value=!1,K.value=!1}function M(){v.value=!1,K.value=!1}function P(){i.msg("您已成功删除")}function W(){i.msg("您已取消操作")}n({organization:"",name:"",fullName:"",code:"",type:"",sort:0,remark:""}),n();const K=n(!1);return n("新建"),(o,e)=>{const r=Ue,x=ce,y=pe,s=fe,g=Ne,F=ve,Y=_e,m=ye,ee=Se,A=$e,te=ze,L=xe,le=ge,ae=he,oe=Ce,ne=Ve,se=be,ie=we;return z(),N(ie,{fluid:"true",class:"organization-box"},{default:l(()=>[c("div",Ke,[c("div",{style:re({width:f.value?"0px":"300px"}),class:"left-tree"},[I(c("div",null," 科室列表 ",512),[[J,!f.value]]),I(t(r,{style:{"margin-top":"10px"},data:O.value,selectedKey:b.value,"onUpdate:selectedKey":e[0]||(e[0]=a=>b.value=a),showLine:R.value,expandKeys:[1,3,4],onNodeClick:E},{title:l(({data:a})=>[c("span",{class:me(b.value==a.id?"isChecked":"")},S(a.title)+" "+S(a.id),3)]),_:1},8,["data","selectedKey","show
|