2 lines
8.2 KiB
JavaScript
2 lines
8.2 KiB
JavaScript
|
import{d as ue,a as n,r as ie,b as C,c as q,w as t,f as p,l as re,G as L,I as D,e as l,m as me,t as h,A as r,N as d,X as ce,Z as pe,$ as ve,a0 as fe,a1 as _e,a2 as ye,br as xe,a3 as ge,U as be,_ as Ne}from"./index-7b3f5fdc.js";import{c as Se}from"./index-a832a56d.js";import{s as ke}from"./index-ed1abe32.js";import{a as Ve}from"./index-e96dc078.js";import{w as we}from"./index-81f068f9.js";import{V as Ce}from"./index-a513db85.js";import{y as qe,f as he}from"./index-4ab1e1d9.js";import{b as ze}from"./index-c31677f3.js";import{j as Ue}from"./index-d0b57c12.js";const Ae={style:{display:"flex"}},Be={style:{flex:"1",padding:"10px","over-flow":"auto"}},Ke={style:{padding:"20px"}},$e={style:{width:"100%","text-align":"center"}},Fe=ue({__name:"level",setup(Le){const I=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}]),J=n(!1),b=n(""),N=n({id:0,title:""}),f=n(!1),v=n({userAccount:"",userName:"",sex:""});function O(){v.value={userAccount:"",userName:"",sex:""}}function R(o){N.value=JSON.parse(JSON.stringify(o)),x.current=N.value.id,V(x)}function E(){x.current=1,V(x)}const S=n(!1),k=n(),x=ie({current:1,limit:10,total:100}),M=n([{title:"选项",width:"55px",type:"checkbox",fixed:"left"},{title:"编号",width:"80px",key:"id",fixed:"left"},{title:"所属科室",width:"120px",key:"department"},{title:"级别名称",width:"120px",key:"levelName"},{title:"名额",width:"80px",key:"quota"},{title:"最高评分",width:"100px",key:"maxScore"},{title:"操作",width:"150px",customSlot:"operator",key:"operator",fixed:"right"}]),V=o=>{S.value=!0,setTimeout(()=>{w.value=G(o.current,o.limit),S.value=!1},1e3)},T=(o,e)=>{d.msg(`字段${o} - 排序${e}, 你可以利用 sort-change 实现服务端排序`)},w=n([{id:"1",department:"呼吸内科",levelName:"A级",quota:3,maxScore:95},{id:"2",department:"呼吸内科",levelName:"B级",quota:5,maxScore:90},{id:"3",department:"心血管内科",levelName:"A级",quota:2,maxScore:95},{id:"4",department:"心血管内科",levelName:"B级",quota:4,maxScore:90},{id:"5",department:"消化内科",levelName:"A级",quota:3,maxScore:95},{id:"6",department:"消化内科",levelName:"B级",quota:5,maxScore:90},{id:"7",department:"普通外科",levelName:"A级",quota:2,maxScore:95},{id:"8",department:"普通外科",levelName:"B级",quota:4,maxScore:90},{id:"9",department:"骨科",levelName:"A级",quota:2,maxScore:95},{id:"10",department:"骨科",levelName:"B级",quota:3,maxScore:90}]),j=(o,e)=>{w.value.forEach(m=>{m.id===e.id&&d.msg("Success",{icon:1},()=>{m.status=o})})},G=(o,e)=>{var m=[],g=(o-1)*e+1,y=o*e;const u=["A级","B级","C级"];for(var i=g;i<=y;i++)m.push({id:`${i}`,department:N.value.title||"呼吸内科",levelName:u[i%3],quota:Math.floor(Math.random()*5)+1,maxScore:90+i%3*5});return m},s=n({department:"",levelName:"",quota:0,maxScore:0}),Q=n(),_=n(!1),z=n("新增"),U=(o,e)=>{if(z.value=o,e!=null){let m=JSON.parse(JSON.stringify(e));s.value=m}else s.value={department:"",levelName:"",quota:0,maxScore:0};_.value=!_.value};function X(){if(k.value.length==0){d.msg("您未选择数据,请先选择要删除的数据",{icon:3,time:2e3});return}d.confirm("您将删除所有选中的数据?",{title:"提示",btn:[{text:"确定",callback:o=>{d.msg("您已成功删除"),d.close(o)}},{text:"取消",callback:o=>{d.msg("您已取消操作"),d.close(o)}}]})}function Z(){d.msg("保存成功!",{icon:1,time:1e3}),_.value=!1,A.value=!1}function H(){_.value=!1,A.value=!1}function P(){d.msg("您已成功删除")}function W(){d.msg("您已取消操作")}n({organization:"",name:"",fullName:"",code:"",type:"",sort:0,remark:""}),n();const A=n(!1);return n("新建"),(o,e)=>{const m=ze,g=ce,y=pe,u=ve,i=qe,B=fe,Y=_e,c=ye,ee=he,K=Ue,le=Ce,te=xe,ae=ge,oe=we,ne=Ve,$=ke,se=be,de=Se;return C(),q(de,{fluid:"true",class:"organization-box"},{default:t(()=>[p("div",Ae,[p("div",{style:re({width:f.value?"0px":"300px"}),class:"left-tree"},[L(p(
|