You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient/docker/nginx/html/dist/static/js/PlanTable-d7306032.js

2 lines
4.7 KiB
JavaScript

import{g as T,c as k,e,d as N,r as f,u as S,o as H,b as M,j as l,H as d,af as p,f as s,w as g,m as R,x as Z,y as j,_ as B}from"./index-93dfb385.js";import{t as q}from"./inspect_icon-f65a427c.js";import{e as E}from"./empty-7fcb43df.js";import{D as b}from"./del-4c409db9.js";import{h as O,i as V}from"./consultation-6fd72a36.js";import{u as y}from"./consultation-10bd4098.js";import"./inquiry-8a7adca2.js";const z={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},A=e("g",{"clip-path":"url(#a)"},[e("path",{fill:"#4287FF",stroke:"#4287FF","stroke-width":".1",d:"M.925 15.067a.568.568 0 0 1 0-.604.648.648 0 0 1 .552-.302v.05-.05l-.552.906Zm0 0a.65.65 0 0 0 .552.297m-.552-.297.552.247m13.236.05a.648.648 0 0 0 .553-.297l-.043-.027.043.027a.564.564 0 0 0-.002-.608.649.649 0 0 0-.552-.298L1.477 15.314m13.236.05v-.05.05Zm0 0H1.477m0 0v-.05m0 .05v-.05m7.032-4.527.002-.002 5.28-5.276a1.702 1.702 0 0 0 0-2.404L12.005 1.32a1.751 1.751 0 0 0-2.41 0h-.001l-5.28 5.275-.002.001a4.124 4.124 0 0 0-1.044 2.25v.002l-.12 1.433v.01c-.056.668-.084 1.01-.075 1.205.005.1.02.168.05.224a.564.564 0 0 0 .112.14l.003.002a.612.612 0 0 0 .43.177c.064 0 .355-.024.872-.066l.282-.023 1.436-.12h.002a4.124 4.124 0 0 0 2.25-1.043Zm-3.786-.038-.406.033.033-.406.12-1.43c.081-.56.324-1.083.699-1.506l5.276-5.272a.505.505 0 0 1 .708 0l1.714 1.712.07.072a.505.505 0 0 1 .003.707L7.662 9.931a2.897 2.897 0 0 1-1.505.698l-1.434.12Z"})],-1),G=e("defs",null,[e("clipPath",{id:"a"},[e("path",{fill:"#fff",d:"M0 0h16v16H0z"})])],-1),J=[A,G];function K(o,u){return T(),k("svg",z,J)}const w={render:K},x=o=>(Z("data-v-30b179c1"),o=o(),j(),o),Q={class:"PlanTable"},U={class:"header_title"},W={class:"title"},X=["src"],Y=x(()=>e("span",null,"处置计划列表",-1)),ee={class:"main_table"},te={class:"left"},ae={style:{display:"flex","justify-content":"center",cursor:"pointer"}},le={class:"right"},se={style:{display:"flex","justify-content":"center",cursor:"pointer"}},oe={class:"empty_list"},ne=["src"],ce=x(()=>e("span",null,"暂无相关数据,请在“设置处置计划”中添加",-1)),re=N({name:"PlanTable",__name:"PlanTable",emits:["edit"],setup(o,{expose:u,emit:C}){const n=f([]),c=f([]),P=S(),I=[{id:0,name:"口服"},{id:1,name:"静脉注射"},{id:2,name:"静脉输液"},{id:3,name:"皮下注射"},{id:4,name:"局部用药"},{id:5,name:"气雾剂/粉雾剂吸入"},{id:6,name:"雾化吸入"},{id:7,name:"鞘内注射"}],$=[{label:"处置计划",prop:"disposalPlanName"},{label:"一级措施",prop:"firstMeasures"},{label:"说明",prop:"guide"},{label:"操作",slot:"operation"}],L=[{id:0,name:"每日一次"},{id:1,name:"每日两次"},{id:2,name:"每日三次"},{id:3,name:"每日四次"}],D=[{label:"处置计划",prop:"disposalPlanName"},{label:"药物名称",prop:"drugName"},{label:"用药途径",formatter:({drugRoute:t})=>{var a;return`${((a=I[t])==null?void 0:a.name)||""}`}},{label:"用药间隔",prop:"select",formatter:({intervalDay:t,intervalHour:a})=>{var r;return t!==null?(r=L[t])==null?void 0:r.name:`${a}小时`}},{label:"说明",prop:"guide"},{label:"操作",slot:"operation",width:120}],m=async()=>{const t=await O({processId:P.query.processId});t.data.userTreatmentPlanType===0||t.data.userTreatmentPlanType===1?y().planTypeFlag=t.data.userTreatmentPlanType:y().planTypeFlag="",n.value=t.data.otherTreatmentPlan,c.value=t.data.drugTreatmentPlan};H(()=>{m()}),u({reset(){m()}});const F=C,h=t=>{F("edit",t)},v=async t=>{(await V({id:t})).code===200&&(R("删除成功",{type:"success"}),m())};return(t,a)=>{const r=M("pure-table");return T(),k("div",Q,[e("div",U,[e("div",W,[e("img",{src:l(q),alt:""},null,8,X),Y])]),d(e("div",ee,[d(e("div",te,[s(r,{ref:"tableRef","align-whole":"center",showOverflowTooltip:"",style:{height:"calc(100vh - 800px)"},class:"mt-4",data:n.value,columns:$,"header-cell-style":{background:"var(--el-table-row-hover-bg-color)",color:"var(--el-text-color-primary)"}},{operation:g(({row:i})=>[e("div",ae,[s(l(w),{onClick:_=>h(i),class:"mr-4"},null,8,["onClick"]),s(l(b),{onClick:_=>v(i.id)},null,8,["onClick"])])]),_:1},8,["data","header-cell-style"])],512),[[p,n.value.length>0]]),d(e("div",le,[s(r,{"align-whole":"center",showOverflowTooltip:"",style:{height:"calc(100vh - 800px)"},class:"mt-4",data:c.value,columns:D,"header-cell-style":{background:"var(--el-table-row-hover-bg-color)",color:"var(--el-text-color-primary)"}},{operation:g(({row:i})=>[e("div",se,[s(l(w),{onClick:_=>h(i),class:"mr-4"},null,8,["onClick"]),s(l(b),{onClick:_=>v(i.id)},null,8,["onClick"])])]),_:1},8,["data","header-cell-style"])],512),[[p,c.value.length>0]])],512),[[p,n.value.length>0||c.value.length>0]]),d(e("div",oe,[e("img",{src:l(E),alt:""},null,8,ne),ce],512),[[p,n.value.length===0&&c.value.length===0]])])}}});const ve=B(re,[["__scopeId","data-v-30b179c1"]]);export{ve as default};